Announcement

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

    [bug] DateRangeDialog doesn't apply locale

    Smartclient 8.0 and SC_SNAPSHOT-2011-06-07

    I noticed that DateRangeDialog doesn't get localized messages (even if they are present in the properties file)

    I don't know if there are other widgets with the same problem...I think that some js code is missing in the properties files.

    #2
    Which specific localized messages are you saying are not picked up, for which parts of the UI (ideally, a screenshot and circled text in red).

    Comment


      #3
      go to:
      http://www.smartclient.com/?skin=Gra...=it#liveFilter
      and modify sample as:
      Code:
      isc.ListGrid.create({
          ID: "countryList",
          width:500, height:300, alternateRecordStyles:true,
          dataSource: worldDS,
          fields:[
              {name:"countryCode", title:"Code", width:50},
              {name:"countryName", title:"Country"},
              {name:"independence", title:"Nationhood"},
              {name:"continent", title:"Continent"}
          ],
          autoFetchData: true,
          showFilterEditor: true,
          filterOnKeypress: true
      })
      click "try it" and then filter by "Nationhood". See attached image.

      at least all messages in the dialog aren't picked up (same behaviour with french locale):

      dateRangeDialog_headerTitle
      dateRangeDialog_okButtonTitle
      dateRangeDialog_cancelButtonTitle
      miniDateRangeItem_pickerIconPrompt
      relativeDateItem_presetOptions_today
      relativeDateItem_presetOptions_yesterday
      relativeDateItem_presetOptions_tomorrow
      relativeDateItem_presetOptions_minus_1w
      relativeDateItem_presetOptions_plus_1w
      relativeDateItem_presetOptions_minus_1m
      relativeDateItem_presetOptions_plus_1m
      relativeDateItem_daysAgoTitle
      relativeDateItem_daysFromNowTitle
      relativeDateItem_weeksAgoTitle
      relativeDateItem_weeksFromNowTitle
      relativeDateItem_monthsAgoTitle
      relativeDateItem_monthsFromNowTitle
      Attached Files

      Comment


        #4
        The website does not reflect the latest nightly builds. Please let us know if you're seeing this in the latest.

        Comment


          #5
          I can see it in SC_SNAPSHOT-2011-06-07

          Comment


            #6
            I tested it out using the fr_FR locale and it seems to be fine.
            Attached Files

            Comment


              #7
              snapshot 2011-06-09

              see attached image, I have a French DateChooser with an English DateRangeDialog !
              Attached Files

              Comment


                #8
                I just "discovered" something strange...in the localization sample (snapshot 2011-06-09), if I change to french or other locale, at least those messages not picked up:

                multiSortDialog_levelUpPrompt
                multiSortDialog_levelDownPrompt
                dateItem_pickerIconPrompt
                dateItem_daySelectorPrompt
                dateItem_monthSelectorPrompt
                dateItem_yearSelectorPrompt
                and the filter builder messages already displayed. But if I add another filter condition, the messages are picked up.

                Then, if I switch to js tab, and then click "try it", then all the localization messages are picked up!

                Why? There's something special I must know in loading the localization properties file? I load it after the modules and skin.

                verified in "Localization" sample, snapshot 2011-06-09
                Last edited by claudiobosticco; 10 Jun 2011, 07:52.

                Comment


                  #9
                  besides, also isc.DateRangeDialog.askForRange() gives me a non-localized Dialog.
                  But, if I add
                  isc.DateRangeDialog.addProperties({headerTitle: isc.i18nMessages.dateRangeDialog_headerTitle});
                  to the .properties file, then it picks up the correct header title (but not the DateRangeDialog created as the Dialog for the filter column on the grid).
                  Last edited by claudiobosticco; 12 Jun 2011, 23:23.

                  Comment


                    #10
                    Originally posted by claudiobosticco
                    Then, if I switch to js tab, and then click "try it", then all the localization messages are picked up!
                    not exactly! the DateRangeDialog remains not-localized!

                    Comment


                      #11
                      Originally posted by sjivan
                      I tested it out using the fr_FR locale and it seems to be fine.
                      which version/sample did you try?

                      Comment


                        #12
                        I tried it out using the Smart GWT Grid DateRange Filter showcase sample. The issue you're seeing with the SmartClient showcase and locales had to do with the was it was loading the resource bundles using isc.FileLoader. This has been corrected so please try it out using the next build.

                        Sanjiv

                        Comment


                          #13
                          SC_SNAPSHOT-2011-06-12/PowerEdition

                          DateRangeDialog: localized messages are not picked up.

                          MultiSortDialog: multiSortDialog_levelUpPrompt and multiSortDialog_levelDownPrompt are not picked up.

                          the others messages are correctly picked up.

                          but there is another regression on this sample: context click on the grid editor does not open context menu.

                          Comment


                            #14
                            Originally posted by sjivan
                            The issue you're seeing with the SmartClient showcase and locales had to do with the was it was loading the resource bundles using isc.FileLoader.
                            Actually I get better results loading the resource bundle with a static <script> tag (it'll be nice if <loadISC> tag could load it).
                            But the DateRangeDialog still doesn't pick up localized messages.

                            Comment


                              #15
                              We are using latest night builds of SmartGWT and we have similar problem. Attached you can find two dialogs which we see. They are partially translated. Interesting is that for example buttons are in english and they are for sure translated. Or translation file is incomplete? Where can I fix that?
                              Attached Files

                              Comment

                              Working...
                              X