Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 871293

Summary: [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.
Product: Red Hat Enterprise Virtualization Manager Reporter: Yuko Katabami <ykatabam>
Component: ovirt-engine-webadmin-portalAssignee: Shahar Havivi <shavivi>
Status: CLOSED CURRENTRELEASE QA Contact: Yuko Katabami <ykatabam>
Severity: urgent Docs Contact:
Priority: high    
Version: 3.1.0CC: dyasny, ecohen, eng-i18n-bugs, iheim, lijli, Rhev-m-bugs, sgordon, sgrinber, shavivi, ykaul
Target Milestone: ---Keywords: CodeChange, i18n, Translation
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard: ux
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:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 883912, 893283, 894498    

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