Gilad Chaplik has uploaded a new change for review.

Change subject: webadmin: Host General sub-tab  unlocalized strings found
......................................................................

webadmin: Host General sub-tab  unlocalized strings found

changes are described in bugzilla.

Change-Id: I59b0ba281c912d1a9e09b9ab3dde1be93b0c7e56
Bug-Url: https://bugzilla.redhat.com/952091
Signed-off-by: Gilad Chaplik <gchap...@redhat.com>
---
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
M 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/DiskStatusColumn.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Constants.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Enums.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Messages.java
M 
frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/Enums.properties
M 
frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/disk/SubTabDiskVmView.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java
12 files changed, 72 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/59/14059/1

diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
index 43be6d0..6f79ba7 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/CommonApplicationConstants.java
@@ -616,10 +616,10 @@
     String deactivateDisk();
 
     @DefaultStringValue("Active")
-    String activeDisk();
+    String active();
 
     @DefaultStringValue("Inactive")
-    String inactiveDisk();
+    String inactive();
 
     @DefaultStringValue("Move")
     String moveDisk();
diff --git 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/DiskStatusColumn.java
 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/DiskStatusColumn.java
index 6cb015a..e506dfe 100644
--- 
a/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/DiskStatusColumn.java
+++ 
b/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/DiskStatusColumn.java
@@ -20,7 +20,7 @@
         }
 
         boolean isDiskPlugged = disk.getPlugged() != null && 
disk.getPlugged().booleanValue();
-        setTitle(isDiskPlugged ? getCommonConstants().activeDisk() : 
getCommonConstants().inactiveDisk());
+        setTitle(isDiskPlugged ? getCommonConstants().active() : 
getCommonConstants().inactive());
         return isDiskPlugged ? getCommonResources().upImage() : 
getCommonResources().downImage();
     }
 }
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
index 65c9b673..51f6292 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostGeneralModel.java
@@ -33,11 +33,14 @@
 import org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult;
 import org.ovirt.engine.ui.uicompat.IFrontendActionAsyncCallback;
 import org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback;
+import org.ovirt.engine.ui.uicompat.Messages;
 import org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs;
 
 @SuppressWarnings("unused")
 public class HostGeneralModel extends EntityModel
 {
+    private static final Constants constants = 
ConstantsManager.getInstance().getConstants();
+    private static final Messages messages = 
ConstantsManager.getInstance().getMessages();
 
     public static EventDefinition RequestEditEventDefinition;
     private Event privateRequestEditEvent;
@@ -250,7 +253,7 @@
     private Integer spmDefaultPriorityValue;
     private int spmLowPriorityValue;
     private int spmHighPriorityValue;
-    private int spmNeverPriorityValue = -1;
+    private final int spmNeverPriorityValue = -1;
 
     public Integer getSpmPriorityValue() {
         return spmPriorityValue;
@@ -296,7 +299,6 @@
     }
 
     private void updateSpmPriority() {
-        Constants constants = ConstantsManager.getInstance().getConstants();
         if (spmPriorityValue == null) {
             setSpmPriority(null);
         }
@@ -313,7 +315,7 @@
             setSpmPriority(constants.neverTitle());
         }
         else {
-            
setSpmPriority(ConstantsManager.getInstance().getMessages().customSpmPriority(spmPriorityValue));
+            setSpmPriority(messages.customSpmPriority(spmPriorityValue));
         }
     }
 
@@ -783,7 +785,7 @@
     {
         setRequestEditEvent(new Event(RequestEditEventDefinition));
         setRequestGOToEventsTabEvent(new 
Event(RequestGOToEventsTabEventDefinition));
-        setTitle(ConstantsManager.getInstance().getConstants().generalTitle());
+        setTitle(constants.generalTitle());
         setHashName("general"); //$NON-NLS-1$
 
         setSaveNICsConfigCommand(new UICommand("SaveNICsConfig", this)); 
//$NON-NLS-1$
@@ -813,7 +815,7 @@
 
         InstallModel model = new InstallModel();
         setWindow(model);
-        
model.setTitle(ConstantsManager.getInstance().getConstants().installHostTitle());
+        model.setTitle(constants.installHostTitle());
         model.setHashName("install_host"); //$NON-NLS-1$
         model.getOVirtISO().setIsAvailable(false);
         model.getRootPassword().setIsAvailable(false);
@@ -840,8 +842,7 @@
                             model.getHostVersion().setIsAvailable(true);
 
                             if (isos.isEmpty()) {
-                                model.setMessage(ConstantsManager.getInstance()
-                                        .getConstants()
+                                model.setMessage(constants
                                         
.thereAreNoISOversionsVompatibleWithHostCurrentVerMsg());
                             }
 
@@ -872,14 +873,14 @@
         if (!isOnlyClose) {
 
             UICommand command = new UICommand("OnInstall", this); //$NON-NLS-1$
-            
command.setTitle(ConstantsManager.getInstance().getConstants().ok());
+            command.setTitle(constants.ok());
             command.setIsDefault(true);
             model.getCommands().add(command);
         }
 
         UICommand command = new UICommand("Cancel", this); //$NON-NLS-1$
-        command.setTitle(isOnlyClose ? 
ConstantsManager.getInstance().getConstants().close()
-                : ConstantsManager.getInstance().getConstants().cancel());
+        command.setTitle(isOnlyClose ? constants.close()
+                : constants.cancel());
         command.setIsCancel(true);
         model.getCommands().add(command);
     }
@@ -989,12 +990,15 @@
         if (vds.getVdsGroupCompatibilityVersion() != null
                 && 
Version.v3_2.compareTo(vds.getVdsGroupCompatibilityVersion()) > 0) {
             // Members of pre-3.2 clusters don't support SMT; here we act like 
a 3.1 engine
-            setThreadsPerCore("Unsupported"); //$NON-NLS-1$
+            setThreadsPerCore(constants.unsupported());
         } else if (vds.getCpuThreads() == null || vds.getCpuCores() == null) {
-            setThreadsPerCore("Unknown"); //$NON-NLS-1$
+            setThreadsPerCore(constants.unknown());
         } else {
             Integer threads = vds.getCpuThreads() / vds.getCpuCores();
-            setThreadsPerCore(threads.toString() + (threads > 1 ? " (SMT 
Enabled)" : " (SMT Disabled)")); //$NON-NLS-1$ //$NON-NLS-2$
+            setThreadsPerCore(messages
+                    .commonMessageWithBrackets(threads.toString(),
+                            threads > 1 ? constants.smtEnabled()
+                                    : constants.smtDisabled()));
         }
 
         setPhysicalMemory(vds.getPhysicalMemMb());
@@ -1079,8 +1083,7 @@
                                 {
                                     hostGeneralModel.getInstallCommand()
                                             .getExecuteProhibitionReasons()
-                                            .add(ConstantsManager.getInstance()
-                                                    .getConstants()
+                                            .add(constants
                                                     
.switchToMaintenanceModeToEnableUpgradeReason());
                                 }
                                 
hostGeneralModel.getInstallCommand().setIsExecutionAllowed(executionAllowed);
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Constants.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Constants.java
index 0add184..39b7228 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Constants.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Constants.java
@@ -1808,4 +1808,16 @@
 
     @DefaultStringValue("Any Host in Cluster")
     String anyHostInCluster();
+
+    @DefaultStringValue("Unsupported")
+    String unsupported();
+
+    @DefaultStringValue("Unknown")
+    String unknown();
+
+    @DefaultStringValue("SMT Disabled")
+    String smtDisabled();
+
+    @DefaultStringValue("SMT Enabled")
+    String smtEnabled();
 }
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Enums.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Enums.java
index f7cbfbe..b7d12ed 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Enums.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Enums.java
@@ -309,12 +309,6 @@
 
     String VdsSpmStatus___SPM();
 
-    String VdsTransparentHugePagesState___Never();
-
-    String VdsTransparentHugePagesState___MAdvise();
-
-    String VdsTransparentHugePagesState___Always();
-
     String LunStatus___Free();
 
     String LunStatus___Used();
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
index 1fa8e95..3adeebc 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
@@ -663,4 +663,9 @@
 
     String QuotaEnforcementTypeEnum___HARD_ENFORCEMENT();
 
+    String VdsTransparentHugePagesState___Never();
+
+    String VdsTransparentHugePagesState___MAdvise();
+
+    String VdsTransparentHugePagesState___Always();
 }
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Messages.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Messages.java
index e2e352d..b45ac7b 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Messages.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Messages.java
@@ -268,4 +268,7 @@
     @DefaultMessage("{0} ({1} Running VM(s))")
     String hostNumberOfRunningVms(String hostName, int runningVms);
 
+    @DefaultMessage("{0} ({1})")
+    String commonMessageWithBrackets(String subject, String inBrackets);
+
 }
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/Enums.properties
 
b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/Enums.properties
index 18a0488..391adf7 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/Enums.properties
+++ 
b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/Enums.properties
@@ -149,9 +149,6 @@
 VdsSpmStatus___None=None
 VdsSpmStatus___Contending=Contending
 VdsSpmStatus___SPM=SPM
-VdsTransparentHugePagesState___Never=Never
-VdsTransparentHugePagesState___MAdvise=MAdvise
-VdsTransparentHugePagesState___Always=Always
 LunStatus___Free=Free
 LunStatus___Used=Used
 LunStatus___Unusable=Unusable
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
 
b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
index 06bae33..4e175cf 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
+++ 
b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
@@ -328,3 +328,6 @@
 QuotaEnforcementTypeEnum___DISABLED=Disabled
 QuotaEnforcementTypeEnum___SOFT_ENFORCEMENT=Audit
 QuotaEnforcementTypeEnum___HARD_ENFORCEMENT=Enforced
+VdsTransparentHugePagesState___Never=Never
+VdsTransparentHugePagesState___MAdvise=MAdvise
+VdsTransparentHugePagesState___Always=Always
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
index d94c36a..f4503e4 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
@@ -605,7 +605,8 @@
     @DefaultStringValue("CPU Threads")
     String clusterPopupCpuThreadsPanelTitle();
 
-    @DefaultStringValue("Allow guests to use host threads as virtual CPU 
cores, utilizing AMD Clustered MultiThreading or Intel" +
+    @DefaultStringValue("Allow guests to use host threads as virtual CPU 
cores, utilizing AMD Clustered MultiThreading or Intel"
+            +
             " Hyper-Threading technology on the virtualization host. Enabling 
this option may be useful for less" +
             " CPU-intensive workloads, or to run guests with CPU 
configurations that would otherwise be restricted.")
     String clusterPopupCpuThreadsInfo();
@@ -2606,4 +2607,16 @@
 
     @DefaultStringValue("Cluster Node Type")
     String clusterType();
+
+    @DefaultStringValue("used")
+    String used();
+
+    @DefaultStringValue("total")
+    String total();
+
+    @DefaultStringValue("free")
+    String free();
+
+    @DefaultStringValue("Unknown")
+    String unknown();
 }
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/disk/SubTabDiskVmView.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/disk/SubTabDiskVmView.java
index 1eb6547..85c87f8 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/disk/SubTabDiskVmView.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/disk/SubTabDiskVmView.java
@@ -42,7 +42,7 @@
             @Override
             public ImageResource getValue(VM object) {
                 boolean isDiskPlugged = 
getDetailModel().isDiskPluggedToVm(object);
-                setTitle(isDiskPlugged ? constants.activeDisk() : 
constants.inactiveDisk());
+                setTitle(isDiskPlugged ? constants.active() : 
constants.inactive());
                 return isDiskPlugged ? getCommonResources().upImage() : 
getCommonResources().downImage();
             }
         };
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java
index cd29884..fc3389c 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/host/SubTabHostGeneralView.java
@@ -47,6 +47,7 @@
 
     // We need this in order to find the icon for alert messages:
     private final ApplicationResources resources;
+    private final ApplicationConstants constants = 
GWT.create(ApplicationConstants.class);
 
     TextBoxLabel oS = new TextBoxLabel();
     TextBoxLabel kvmVersion = new TextBoxLabel();
@@ -59,10 +60,10 @@
     TextBoxLabel threadsPerCore = new TextBoxLabel();
     VersionLabel vdsmVersion = new VersionLabel();
     PercentLabel<Integer> sharedMemory = new PercentLabel<Integer>();
-    BooleanLabel memoryPageSharing = new BooleanLabel("Active", "Inactive"); 
//$NON-NLS-1$ //$NON-NLS-2$
+    BooleanLabel memoryPageSharing = new BooleanLabel(constants.active(), 
constants.inactive());
     NullableNumberLabel<Integer> activeVms = new 
NullableNumberLabel<Integer>();
-    NullableNumberLabel<Integer> numberOfSockets = new 
NullableNumberLabel<Integer>("Unknown"); //$NON-NLS-1$
-    NullableNumberLabel<Integer> coresPerSocket = new 
NullableNumberLabel<Integer>("Unknown"); //$NON-NLS-1$
+    NullableNumberLabel<Integer> numberOfSockets = new 
NullableNumberLabel<Integer>(constants.unknown());
+    NullableNumberLabel<Integer> coresPerSocket = new 
NullableNumberLabel<Integer>(constants.unknown());
     TextBoxLabel spmPriority = new TextBoxLabel();
 
     MemorySizeLabel<Integer> physicalMemory;
@@ -76,11 +77,15 @@
 
     @Ignore
     DetailsLabel<ArrayList<ValueLabel<Integer>>, Integer> 
physicalMemoryDetails =
-            new DetailsLabel<ArrayList<ValueLabel<Integer>>, Integer>("total", 
"used", "free"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            new DetailsLabel<ArrayList<ValueLabel<Integer>>, 
Integer>(constants.total(),
+                    constants.used(),
+                    constants.free());
 
     @Ignore
     DetailsLabel<ArrayList<ValueLabel<Long>>, Long> swapSizeDetails =
-            new DetailsLabel<ArrayList<ValueLabel<Long>>, Long>("total", 
"used", "free"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            new DetailsLabel<ArrayList<ValueLabel<Long>>, 
Long>(constants.total(),
+                    constants.used(),
+                    constants.free());
 
     @Ignore
     EnumLabel<VdsTransparentHugePagesState> automaticLargePage = new 
EnumLabel<VdsTransparentHugePagesState>();
@@ -110,12 +115,12 @@
 
     @Inject
     public SubTabHostGeneralView(DetailModelProvider<HostListModel, 
HostGeneralModel> modelProvider,
-            ApplicationResources resources, ApplicationConstants constants) {
+            ApplicationResources resources) {
         super(modelProvider);
-        initMemorySizeLabels(constants);
 
         // Inject a reference to the resources:
         this.resources = resources;
+        initMemorySizeLabels();
 
         // Init form panel:
         formPanel = new GeneralFormPanel();
@@ -180,7 +185,7 @@
         }
     }
 
-    void initMemorySizeLabels(ApplicationConstants constants) {
+    void initMemorySizeLabels() {
         this.physicalMemory = new MemorySizeLabel<Integer>(constants);
         this.usedMemory = new MemorySizeLabel<Integer>(constants);
         this.freeMemory = new MemorySizeLabel<Integer>(constants);


--
To view, visit http://gerrit.ovirt.org/14059
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I59b0ba281c912d1a9e09b9ab3dde1be93b0c7e56
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <gchap...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to