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.
[ja_JP] Test case failure: Hosts main tab/Hosts sub-tab in Clusters main tab:...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-webadmin-portal (Show other bugs)
3.1.0
Unspecified Linux
high Severity urgent
: ---
: 3.2.0
Assigned To: Shahar Havivi
Yuko Katabami
ux
: CodeChange, i18n, Translation
Depends On:
Blocks: 883912 893283 894498
  Show dependency treegraph
 
Reported: 2012-10-30 03:20 EDT by Yuko Katabami
Modified: 2013-06-11 05:38 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 883912 893283 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Yuko Katabami 2012-10-30 03:20:21 EDT
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 12:44:00 EST
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 09:31:50 EST
posted at: http://gerrit.ovirt.org/#/c/9082/
Comment 5 Shahar Havivi 2012-11-11 07:08:50 EST
Fix NPE that previous patch cause:
http://gerrit.ovirt.org/#/c/9151/
Comment 8 Shahar Havivi 2012-11-12 06:11:06 EST
Prevent NPE to clusters tab as well,
posted at: http://gerrit.ovirt.org/#/c/9181/
Comment 15 Itamar Heim 2013-06-11 05:11:15 EDT
3.2 has been released
Comment 16 Itamar Heim 2013-06-11 05:11:17 EDT
3.2 has been released
Comment 17 Itamar Heim 2013-06-11 05:38:46 EDT
3.2 has been released

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