Bug 871293 - [ja_JP] Test case failure: Hosts main tab/Hosts sub-tab in Clusters main tab: Load column: number-of-VMs string needs to be revised.
Summary: [ja_JP] Test case failure: Hosts main tab/Hosts sub-tab in Clusters main tab:...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-webadmin-portal
Version: 3.1.0
Hardware: Unspecified
OS: Linux
high
urgent
Target Milestone: ---
: 3.2.0
Assignee: Shahar Havivi
QA Contact: Yuko Katabami
URL:
Whiteboard: ux
Depends On:
Blocks: 883912 893283 894498
TreeView+ depends on / blocked
 
Reported: 2012-10-30 07:20 UTC by Yuko Katabami
Modified: 2013-06-11 09:38 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 883912 893283 (view as bug list)
Environment:
Last Closed:
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yuko Katabami 2012-10-30 07:20:21 UTC
Filed from caserun (INSERT URL HERE)

Version-Release number of selected component (if applicable):
unspecified

Steps to Reproduce: 

  * Click on Clusters tab.
  * Select a cluster from the list
  * Click on Host tab in the details pane.
  * Under the "Load"column header it shows number of VMs.

Actual results: 
#FIXME
A simple format of {0} Virtual Machine(s) is used here, but we need to add a counter suffix after the number (before the word VM).
Expected results:
If the string for this "Virtual Machine(s)" is only used for this, I can add the counter suffix in front of "Virtual Machine(s)" string, which will fix the problem. If so, please let me know the string with its file name and Resource ID.
If it is used in other parts of Web Admin Portal, you have to fix in a different way. Please add a sinble string combining the number (in variable) + VM, so that we can translate appropriately.

Comment 1 Einav Cohen 2012-11-04 17:44:00 UTC
The problem is that the "{x} VMs" is not a full, single sentence in the application - it is constructed as follows:
    return object.getvm_active() + " " + constants.vmsClusterHost();
[see SubTabClusterHostView.java, "initTable()" methods, towards the end]

We simply need to add a message (it has to be a message, not a constant, since a constant cannot contain variables), in uicompat's Messages.java file, for example, in the form of:

    @DefaultMessage("{0} VMs")
    String numberOfVmsForHostsLoad(int numberOfVms);

and use it as the string that is displayed in the Load column (instead of the string concatenation that currently exists there).
When pushed to Zanata, each locale will construct this sentence according to the relevant locale's grammar rules.

Note that in the Hosts main tab, the problem is a bit worse, as the "VMs" part of the string is not localized at all - the displayed string there is:

    return numOfActiveVMs + " VMs";

So both Hosts main tab and Hosts sub-tab in Clusters main tab should be fixed.

Comment 2 Shahar Havivi 2012-11-06 14:31:50 UTC
posted at: http://gerrit.ovirt.org/#/c/9082/

Comment 5 Shahar Havivi 2012-11-11 12:08:50 UTC
Fix NPE that previous patch cause:
http://gerrit.ovirt.org/#/c/9151/

Comment 8 Shahar Havivi 2012-11-12 11:11:06 UTC
Prevent NPE to clusters tab as well,
posted at: http://gerrit.ovirt.org/#/c/9181/

Comment 15 Itamar Heim 2013-06-11 09:11:15 UTC
3.2 has been released

Comment 16 Itamar Heim 2013-06-11 09:11:17 UTC
3.2 has been released

Comment 17 Itamar Heim 2013-06-11 09:38:46 UTC
3.2 has been released


Note You need to log in before you can comment on or make changes to this bug.