Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DateItem localization problem -- wrong name of one month

    Hi, I've got problem with DateItem field (com.smartgwt.client.widgets.form.fields.DateItem) related to localization to Russian.

    --------------------------------------------------
    environment:
    0. GWT 2.6.1
    1. SmartGWT version: 4.1
    2. browser(s) and version(s) involved: FireFox 31.0, but actually it is reproduced in any browser.
    --------------------------------------------------

    The problem is that we have a big SmartGWT GUI application which uses DateItem fields, the application was developed against
    GWT 2.6.1 and SmartGWT 2.4.
    Now we are transfering development to latest versions, GWT 2.6.1 and SmartGWT 4.1.
    With some minor changes in the code like replacing calls to depricated functions to new analogues, the application generally works,
    but we have a number of very small but annoying problems, one of this is the following:

    We use DateItem field in some forms, and the application is localized to Russian interface (there is a switch in the app's GUI between English and Russian). And in Russian mode all month names are OK, except the first one, which is displayed as "Jan" instead of "Янв".
    (see the attached screenshot). Nevertheless, the application works correctly.

    I downloaded SGWT sources and looked into the translation file for ru_RU:

    ./src/com/smartgwt/client/i18n/SmartGwtMessages_ru_RU.properties

    and found the value for

    date_shortMonthNames_1=\u042f\u043d\u0432

    which seems to be OK.
    So the obvious source of error is eliminated.

    Can someone tell me what this could be and how to fix this ?
    Attached Files

    #2
    The public Showcase has internationalization enabled, so you can just go to the Various Controls example and see that "Jan" does not appear in any of the date-related controls that show months.

    So we will need detailed instructions on how you are reproducing this issue.

    Comment


      #3
      DateItem localization problem -- wrong name of one month -- this is a bug.

      I have actually found this is a bug, very trivial, so I would like to send a fix somewhere, where can I send it ?

      The idea is very easy, it's due to copy-paste:
      file

      ./main/src/com/smartgwt/client/i18n/SmartGwtMessages.java

      Code:
        1250   /**
         1251    * Translated "Jan".
         1252    * 
         1253    * @return translated "Jan"
         1254    */
         1255   @DefaultMessage("Jan")
         1256   @Key("date_monthNames_1")
         1257   String date_shortMonthNames_1();
         1258 
         1259   /**
         1260    * Translated "Feb".
         1261    * 
         1262    * @return translated "Feb"
         1263    */
         1264   @DefaultMessage("Feb")
         1265   @Key("date_shortMonthNames_2")
         1266   String date_shortMonthNames_2();
      line

      1256 @Key("date_monthNames_1")

      should apparently be

      1256 @Key("date_shortMonthNames_1")

      instead. Hence the property is not got from the corr. file and the default is applied. This is going to influence all languages, not only Russian.

      I have not yet tryed the fix, but tommorrow it will be applied and checked by me.

      Comment


        #4
        Originally posted by Isomorphic View Post
        The public Showcase has internationalization enabled, so you can just go to the Various Controls example and see that "Jan" does not appear in any of the date-related controls that show months.
        I can see the bug here, at Various Controls, in "Date controls" section, too, but it reveals itself as showing long Russian name of January instead of short name of January ("Январь" instead of "Янв"). This whould be more logical, but in my env. I see "Jan", the default for the lost value, as I suspect. I don't have now chance to see it in action.

        Comment


          #5
          We've fixed this for builds dated September 12 and later - let us know if you still see issues

          Comment


            #6
            Isomorphic, thanks for fixing the problem, all is OK, workds properly now.

            Comment

            Working...
            X