[ovirt-devel] [ACTION REQUESTED] i18n default English text is now stored in properties files

Martin Sivak msivak at redhat.com
Tue May 24 09:29:36 UTC 2016


Hi,

We still have three almost identical files. Can we somehow keep just
one and generate the other two? I was actually playing a bit with a
change in the opposite direction - keeping just the EngineMessages
enum with added default english translations and generating all other
files from it.

Do you think it would make sense? It would not require a test then as
the consistency would be checked during compilation phase directly.

Martin

On Mon, May 23, 2016 at 7:38 PM, Scott Dickerson <sdickers at redhat.com> wrote:
> Hi,
>
> In order to resolve bug [1] and prep [2], the default English text for I18N
> Constants and Messages have been moved to their corresponding properties
> files.  Going forward, if a new constant or message needs to be added,
> please add the key method to the proper interface and then add the key plus
> English text to the interface's corresponding properties file.  Checks will
> be added, in the next few days, to fail the build process if the GWT
> annotations (@DefaultStringValue, @DefaultMessage) are used.
>
> This change has been made to simplify the translation process [1] and to
> prepare for the replacement of the GWT i18n engine in 4.1 [2].
>
> For example, in the webadmin project, the ApplicationConstants [3] interface
> previously looked like:
>    package org.ovirt.engine.ui.webadmin;
>
>    import org.ovirt.engine.ui.common.CommonApplicationConstants;
>
>    public interface ApplicationConstants extends CommonApplicationConstants
> {
>
>        @DefaultStringValue("oVirt Engine Web Administration")
>        String applicationTitle();
>
>        @DefaultStringValue("About")
>        String aboutPopupCaption();
>
>        @DefaultStringValue("oVirt Engine Version:")
>        String ovirtVersionAbout();
>
> Now, the interface looks like this [4]:
>    package org.ovirt.engine.ui.webadmin;
>
>    import org.ovirt.engine.ui.common.CommonApplicationConstants;
>
>    public interface ApplicationConstants extends CommonApplicationConstants
> {
>        String applicationTitle();
>
>        String aboutPopupCaption();
>
>        String ovirtVersionAbout();
>
> With a new properties file created, ApplicationContants.properties [5], with
> this kind of content :
>    #
>    #
>    # Bundle name: org.ovirt.engine.ui.webadmin.ApplicationConstants
>    #
>    #
>    #Thu May 19 01:24:21 EDT 2016
>    aboutPopupCaption=About
>    applicationTitle=oVirt Engine Web Administration
>    ovirtVersionAbout=oVirt Engine Version\:
>
> Let me know if there are any questions.
>
> Regards,
> Scott
>
> --
> Scott Dickerson
> Senior Software Engineer
> RHEV-M Engineering - UX Team
> Red Hat, Inc
>
>
> [1] - https://bugzilla.redhat.com/show_bug.cgi?id=1224423
> [2] - https://bugzilla.redhat.com/show_bug.cgi?id=1287408
> [3] -
> https://github.com/oVirt/ovirt-engine/blob/569695916d2325d0c1e1fdabb6f85cd9e97d7232/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
> [4] -
> https://github.com/oVirt/ovirt-engine/blob/master/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/ApplicationConstants.java
> [5] -
> https://github.com/oVirt/ovirt-engine/blob/master/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/ApplicationConstants.properties
>
> _______________________________________________
> Devel mailing list
> Devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/devel



More information about the Devel mailing list