Bug 1269132

Summary: [ALL_LANG] Unlocalized warning messages on volume->geo replication->add pane.
Product: Red Hat Enterprise Virtualization Manager Reporter: Bhushan Barve <bbarve>
Component: ovirt-engineAssignee: Ramesh N <rnachimu>
Status: CLOSED ERRATA QA Contact: Yuko Katabami <ykatabam>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.6.0CC: anbabu, bbarve, bgraveno, gklein, lsurette, rbalakri, Rhev-m-bugs, rnachimu, sabose, sasundar, srevivo, ykaul, ylavi
Target Milestone: ovirt-4.1.0-betaKeywords: Translation
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Gluster RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ja_JP untranslated warning messages
none
warnings localized none

Description Bhushan Barve 2015-10-06 12:15:31 UTC
Description of problem: Need to translate following warning messages on volume->geo replication->add pane. 
'Destination and master volumes should not be from same cluster.'
'Destination volume should be emoty'
'No up server in the Destination volume'

These warning messages appear after unchecking the first check-box.


Version-Release number of selected component (if applicable):
Red Hat Enterprise Virtualization Manager バージョン: 3.6.0-0.16.master.el6

How reproducible:
always

Steps to Reproduce:
1. login to rhev with ja_JP locale
2. go to volume->geo replication->add pane.
3. uncheck the first check-box.
4. observe the warning messages.

Actual results:
The warning messages are untranslated.

Expected results:
The warning messages should be translated.

Additional info:

Comment 1 Bhushan Barve 2015-10-06 12:16:34 UTC
Created attachment 1080219 [details]
ja_JP untranslated warning messages

Comment 2 Oved Ourfali 2015-10-08 12:07:05 UTC
In the future, please set "gluster" whiteboard on gluster bugs.

Comment 3 Einav Cohen 2015-10-12 12:52:05 UTC
The problem is that the messages in the relevant Messages java file (in the code) are defined within the AlternateMessage annotation, rather than the "regular" DefaultMessage. 

The PropertiesFormat class that we are currently using to auto-generate .properties files out of the Messages java files does not generate records for messages within AlternateMessage. 

It seems that we should use PropertyCatalogFactory instead of PropertiesFormat in order to auto-generate the .properties files [1]. 

I will try to resolve that in the code; assuming it will indeed help, this would become an i18n BZ and we'd just need to monitor the translation of the missing messages. 

[1] https://code.google.com/p/google-web-toolkit/issues/detail?id=7033

Comment 4 Einav Cohen 2015-10-14 19:49:11 UTC
unfortunately, it seems like that the .properties files being generated by the PropertyCatalogFactory are problematic and cannot be used. 

gluster team: please change the relevant messages [1] to not use the AlternateMessage annotation - use separate default messages instead. thanks. 

[1] @DefaultMessage("Incorrect enum")
    @AlternateMessage({
        "UNKNOWN", "None",
        "INTERVAL", "Minute",
        "HOURLY", "Hourly",
        "DAILY", "Daily",
        "WEEKLY", "Weekly",
        "MONTHLY", "Monthly"
    })
    String recurrenceType(@Select GlusterVolumeSnapshotScheduleRecurrence recurrence);

    @DefaultMessage("{0} TiB")
    @AlternateMessage({
        "BYTES", "{0} B",
        "KiB", "{0} KiB",
        "MiB", "{0} MiB",
        "GiB", "{0} GiB",
        "TiB", "{0} TiB"
    })
    String sizeUnitString(String size, @Select SizeUnit sizeUnit);

    @DefaultMessage("")
    @AlternateMessage({
        "SLAVE_AND_MASTER_VOLUMES_SHOULD_NOT_BE_IN_SAME_CLUSTER", "Destination and master volumes should not be from same cluster.",
        "SLAVE_VOLUME_SIZE_SHOULD_BE_GREATER_THAN_MASTER_VOLUME_SIZE", "Capacity of destination volume should be greater than or equal to that of master volume.",
        "SLAVE_CLUSTER_AND_MASTER_CLUSTER_COMPATIBILITY_VERSIONS_DO_NOT_MATCH", "Cluster Compatibility version of destination and master volumes should be same.",
        "SLAVE_VOLUME_SHOULD_NOT_BE_SLAVE_OF_ANOTHER_GEO_REP_SESSION", "Destination volume is already a part of another geo replication session.",
        "SLAVE_VOLUME_SHOULD_BE_UP", "Destination volume should be up.",
        "SLAVE_VOLUME_SIZE_TO_BE_AVAILABLE", "Capacity information of the destination volume is not available.",
        "MASTER_VOLUME_SIZE_TO_BE_AVAILABLE", "Capacity information of the master volume is not available.",
        "SLAVE_VOLUME_TO_BE_EMPTY", "Destination volume should be empty.",
        "NO_UP_SLAVE_SERVER", "No up server in the destination volume"
    })
    String geoRepEligibilityViolations(@Select GlusterGeoRepNonEligibilityReason reason);

Comment 5 Yaniv Lavi 2015-12-22 16:16:14 UTC
3.6.1 is out, moving to 3.6.2.

Comment 6 Sahina Bose 2016-04-06 16:52:02 UTC
Anmol, do you understand what needs to be done here?

Comment 7 anmol babu 2016-04-08 10:43:10 UTC
@Sahina, yes currently it operates like a switch statement and switches on @Select criteria so this was done to avoid multiple DefaultMessage entries. But now since Einav says this causes issues, we just need to convert this into individual DefaultMessages.

Comment 8 Ramesh N 2016-08-01 06:59:15 UTC
we have to remove the AlternateMessage annotations in UiMessages. I will these annotations from UiMessages and post a patch with EnumTranslator.

Comment 9 Ramesh N 2016-08-01 12:58:45 UTC
Considering this will addressed as part of bz#1358837, Targeting for 4.0.4.

Comment 10 Ramesh N 2016-08-22 09:12:21 UTC
*** Bug 1368829 has been marked as a duplicate of this bug. ***

Comment 11 Yuko Katabami 2016-09-26 11:06:18 UTC
@Gil and all,

I could not find those messages in Zanata.
It seems that the change did not make it for 4.0 -- Ramesh's comment is dated in August, but our last translation cycle ended in July and no updates have been pushed to Zanata nor translated in Zanata after that.

We do not have any plan for 4.0.z translation updates, thus it will have to be done in 4.1.

You will have to change the target release accordingly.

Comment 12 Gil Klein 2016-09-26 11:10:45 UTC
(In reply to Yuko Katabami from comment #11)
> @Gil and all,
> 
> I could not find those messages in Zanata.
> It seems that the change did not make it for 4.0 -- Ramesh's comment is
> dated in August, but our last translation cycle ended in July and no updates
> have been pushed to Zanata nor translated in Zanata after that.
> 
> We do not have any plan for 4.0.z translation updates, thus it will have to
> be done in 4.1.
> 
> You will have to change the target release accordingly.
Ramesh, could you please check why this was missed from 4.0.4 and if so, please retarget accordingly in order to allow verification.

Comment 13 Gil Klein 2016-09-26 11:11:55 UTC
Moving back to assigned based on comment #11

Comment 14 Ramesh N 2016-09-26 12:11:49 UTC
(In reply to Gil Klein from comment #12)
> (In reply to Yuko Katabami from comment #11)
> > @Gil and all,
> > 
> > I could not find those messages in Zanata.
> > It seems that the change did not make it for 4.0 -- Ramesh's comment is
> > dated in August, but our last translation cycle ended in July and no updates
> > have been pushed to Zanata nor translated in Zanata after that.
> > 
> > We do not have any plan for 4.0.z translation updates, thus it will have to
> > be done in 4.1.
> > 
> > You will have to change the target release accordingly.
> Ramesh, could you please check why this was missed from 4.0.4 and if so,
> please retarget accordingly in order to allow verification.

As Yuko Katabami pointed at in comment#11, this patch was merged on 2nd August 2016. But looks like translation cycle ended in July and no updates have been pushed to Zanata nor translated in Zanata after that. And they do not have any plan for 4.0.z translation updates. 

Considering there is no plan of translation update to 4.Z, I would suggest to re-target it for 4.1.

Comment 16 Ramesh N 2016-12-26 05:42:31 UTC
All the fixes were merged long back in master. Fix should be available in 4.1.0. Translation will be available once all the 4.1 messages are translated.

Comment 18 Yuko Katabami 2017-04-03 12:10:39 UTC
Created attachment 1268368 [details]
warnings localized

Comment 19 Yuko Katabami 2017-04-03 12:12:58 UTC
Checked on 4.1.1.4-0.1.el7 and verified that those message are now localized, included in the WebAdmin as shown in the attached screenshot.

Moving the status to VERIFIED.