Bug 1269132 - [ALL_LANG] Unlocalized warning messages on volume->geo replication->add pane.
[ALL_LANG] Unlocalized warning messages on volume->geo replication->add pane.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.6.0
All Linux
medium Severity medium
: ovirt-4.1.0-beta
: ---
Assigned To: Ramesh N
Yuko Katabami
: Translation
: 1368829 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-06 08:15 EDT by Bhushan Barve
Modified: 2017-04-24 21:07 EDT (History)
13 users (show)

See Also:
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: ---


Attachments (Terms of Use)
ja_JP untranslated warning messages (73.58 KB, image/png)
2015-10-06 08:16 EDT, Bhushan Barve
no flags Details
warnings localized (126.60 KB, image/png)
2017-04-03 08:10 EDT, Yuko Katabami
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 61749 master MERGED webadmin: fix @AlternateMessage annotation in UiMessages 2016-08-01 08:00 EDT
oVirt gerrit 61773 ovirt-engine-4.0 MERGED webadmin: fix @AlternateMessage annotation in UiMessages 2016-08-02 02:53 EDT
oVirt gerrit 62274 master MERGED gluster: fix enumtranslater issue in SizeConverter 2016-08-16 02:09 EDT
oVirt gerrit 62349 ovirt-engine-4.0 MERGED gluster: fix enumtranslater issue in SizeConverter 2016-08-16 08:05 EDT

  None (edit)
Description Bhushan Barve 2015-10-06 08:15:31 EDT
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 08:16 EDT
Created attachment 1080219 [details]
ja_JP untranslated warning messages
Comment 2 Oved Ourfali 2015-10-08 08:07:05 EDT
In the future, please set "gluster" whiteboard on gluster bugs.
Comment 3 Einav Cohen 2015-10-12 08:52:05 EDT
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 15:49:11 EDT
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 (Dary) 2015-12-22 11:16:14 EST
3.6.1 is out, moving to 3.6.2.
Comment 6 Sahina Bose 2016-04-06 12:52:02 EDT
Anmol, do you understand what needs to be done here?
Comment 7 anmol babu 2016-04-08 06:43:10 EDT
@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 02:59:15 EDT
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 08:58:45 EDT
Considering this will addressed as part of bz#1358837, Targeting for 4.0.4.
Comment 10 Ramesh N 2016-08-22 05:12:21 EDT
*** Bug 1368829 has been marked as a duplicate of this bug. ***
Comment 11 Yuko Katabami 2016-09-26 07:06:18 EDT
@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 07:10:45 EDT
(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 07:11:55 EDT
Moving back to assigned based on comment #11
Comment 14 Ramesh N 2016-09-26 08:11:49 EDT
(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 00:42:31 EST
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 08:10 EDT
Created attachment 1268368 [details]
warnings localized
Comment 19 Yuko Katabami 2017-04-03 08:12:58 EDT
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.

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