Announcement

Collapse
No announcement yet.

Bad formatted default Date

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bad formatted default Date

    Hello,

    I've got problems with de date format in Open-Xchange Catalan (ca_ES) translation. This is a community i18n package.

    The problem is that the default date format for Catalan is not well formed and appears like this: AM-01-11 or PM-01-11. I guess the problem is the String that defines the format according to java class SimpleDateFormat. But I don't know where to check for this format string.

    First of suggested me to change the translation the following strings in .po files:


    But I did it and the problem was not solved, so I suppose that the default format is defined in another file. As a result of bad formed default format, when a user try to add a new event on the calendar, the event is inserted at year 1970. If I change the language preferences, all works well, so it's only a problem with Catalan.

    I have to mention that if the user manually set the format by editing preferences > language > date format, then works fine. The problem is only with the default format.

    What can I check to solve it? Is a problem with the Pootle generated files? or is a source code problem?


    Thanks,
    Gerard Bosch.

  • #2
    As far as I see, these strings are still untranslated in Pootle. If you have your own ox.ca_ES.po file, what does it contain for the following two entries?
    Code:
    msgid "yyyy-MM-dd"
    and
    Code:
    msgctxt "label"
    msgid "yyyy-MM-dd"

    Comment


    • #3
      Hello,

      I undone all changes in date translation strings I found in Pottle to see if was a problem of translations. Then I commited the changes and the day after upgraded the newly rpm packages.

      Viktor, I don't find ox.ca_ES.po in my system. The files provided by these RPM are the following ones:

      Code:
      # rpm -ql open-xchange-gui-lang-community-ca-es
      
      /opt/open-xchange/etc/i18n.d/ca_ES.name
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/langs/ca.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/advhr/langs/ca_dlg.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/advimage/langs/ca_dlg.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/advlink/langs/ca_dlg.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/emotions/langs/ca_dlg.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/ca_dlg.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/media/langs/ca_dlg.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/paste/langs/ca_dlg.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/ca_dlg.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/style/langs/ca_dlg.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/table/langs/ca_dlg.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/template/langs/ca_dlg.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/langs/ca_dlg.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/themes/advanced/langs/ca.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/themes/advanced/langs/ca_dlg.js
      /var/www/html/ox6/3rdparty/tinymce/jscripts/tiny_mce/themes/simple/langs/ca.js
      /var/www/html/ox6/lang
      /var/www/html/ox6/lang/ca_ES.js
      Code:
      # rpm -ql open-xchange-lang-community-ca-es
      
      /opt/open-xchange/i18n
      /opt/open-xchange/i18n/server.ca_ES.po

      Almost all are .js files and the strings you mention are shown here:

      Code:
      # grep yyyy-MM-dd `rpm -ql open-xchange-gui-lang-community-ca-es`
      
      /var/www/html/ox6/lang/ca_ES.js:"yyyy-MM-dd":"yyyy-MM-dd",
      /var/www/html/ox6/lang/ca_ES.js:"label\0yyyy-MM-dd":"yyyy-MM-dd",
      I don't know what is wrong in ca-es language configuration and I'd need to find the solution soon...


      Thanks,
      Gerard B.

      Comment


      • #4
        Bad formatted default Date

        Viktor: as the strings were shown as PM-01-11 or AM-01-11, I thought it might be because of this former translation:

        msgid yyyy-MM-dd
        msgstr aaaa-MM-dd

        But Gerard changed this in the meanwhile and kept the English date format - but the problem persists. I have no idea where AM or PM comes from and why the year 1970 is used.

        Comment


        • #5
          Yes, that's the translation which caused this. Is this ca_ES.js file really downloaded by the browser?
          Can you use Firefox and Firebug to see which file gets actually downloaded as the translation. To find it, change your language to English, logout and login again, then change the language to Catalan. After the last step, there should be exactly one file in the log, which is the one used as the new translation.

          Comment


          • #6
            Hello Viktor,

            you're in truth... the problem seems related to the browser. If I use Firefox and check default date I see PM-01-21. If I use Chromium browser I see the format defined in Pottle 2011-01-21. The same happens with other translated strings that are not upgraded in firefox browse...

            Is the .js stored in firefox cache or something similar? I don't understand...
            How can I see the log of Firebug downloaded files?? There are too much tabs and options in Firebug and I don't find it.

            This is to get crazy, hehe.

            Cheers,
            Gerard.


            Originally posted by Viktor Pracht View Post
            Yes, that's the translation which caused this. Is this ca_ES.js file really downloaded by the browser?
            Can you use Firefox and Firebug to see which file gets actually downloaded as the translation. To find it, change your language to English, logout and login again, then change the language to Catalan. After the last step, there should be exactly one file in the log, which is the one used as the new translation.

            Comment


            • #7
              Hey! It was solved! The problem was the caché of Firefox... I cleaned and I get the latest translations....

              Thanks!
              Gerard.

              Comment

              Working...
              X