Results 1 to 10 of 10

Thread: i18n, bug 5912 and other considerations

  1. #1
    Kafka is offline Active Member
    Join Date
    Jan 2006
    Posts
    27
    Rep Power
    9

    Default i18n, bug 5912 and other considerations

    Hi,

    Lots of things to report about my localization (to French) endeavor:

    1) Translation to French: I have completed the whole translation, aside from the admin console. The localization mimics Outlook in all details.

    2) Bug 5912: it seems that the month and day are not reversed anymore since I completed the AjaxMsg_fr.properties localization and in particular set the proper day/month order in the said file. Users don't have to set their browser's default language to English to have proper behavior of their appointments;

    3) Having said that, another Appointment bug has arised: if one sets an appointment on the 8th or 9th of any month, the appointment is saved exactly 3 weeks and 1 day or 3 weeks and 2 days after the appointment was set (i.e., if an appointment is set on February the 8th, it will be saved on March the Third, or set on the 9th->saved March the third). I could reproduce the bug locally and on the hosted demo, using fr and ru default languages. English seems fine. I also changed my local date/time to check if the bug is relative to Today: it isn't. Whatever the local date/time is, the bug is always on the 8th/9th.

    4) Regarding the .properties files: At first, after installing the localized files in the appropriate folder and having restarted Tomcat, I could only get a blank page after logging in. I painstakingly checked all entries in the .properties files, and did determine that an entry that contains both a single quote ( ' ) and a variable placeholder (say, {0}) would make the application crash. When I got rid of any single quote on lines with a placeholder, everything went fine.

    5) I don't know if this is related to localization, but I can't delete tags anymore. When I right-click Tags->Delete, nothing happens.

    6) Regarding timezones full and abbreviated names: I don't know how the English entries were produced in the ZmMsg.properties file, but I would certainly appreciate to know how, so that I could translate them to French easily.

    HTH

    Francois

  2. #2
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    So for you point #2 is not a bug?

    For #3 I filed bug 5962

    #4 can you post the entire string that caused the error.

    #5 Can you login with ?debug=3, this will open a popup debug window. Try to delete a tag and see if anything happens in the debug window. Also please try on Firefox and check the JavaScript console for any errors/warnings.

    #6 I think these were generated from Java or Windows. I'll ask.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  3. #3
    Kafka is offline Active Member
    Join Date
    Jan 2006
    Posts
    27
    Rep Power
    9

    Default Re: i18n, bug 5912 and other considerations

    Quote Originally Posted by KevinH
    So for you point #2 is not a bug?

    For #3 I filed bug 5962

    #4 can you post the entire string that caused the error.

    #5 Can you login with ?debug=3, this will open a popup debug window. Try to delete a tag and see if anything happens in the debug window. Also please try on Firefox and check the JavaScript console for any errors/warnings.

    #6 I think these were generated from Java or Windows. I'll ask.
    #2 is still a bug in my opinion (though I did fix it locally), because a proper AjxMsg_?.properties file would need to be provided at installation time, by default, so users with European locales have proper behavior from the Calendar. I could forward you mine.

    #4
    Blank screen after login in:
    invalidAwayMessage = Le message d'absence doit contenir au moins {0} caract\u00e8res
    Normal behavior after login in:
    invalidAwayMessage = Le message d absence doit contenir au moins {0} caract\u00e8res

    The only difference is the single quote

    I've noticed elsewhere in the properties files that I had the combination single quote + placeholder, but the application doesn't seem to mind. Quite boggling.

    #5 Nothing in the ?debug=3 console, but the FF JavaScript console says:

    Error: uncaught exception: unterminated string literal

    #3 & #6: Thanks, Kevin


    Francois

  4. #4
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    Quote Originally Posted by Kafka
    #2 is still a bug in my opinion (though I did fix it locally), because a proper AjxMsg_?.properties file would need to be provided at installation time, by default, so users with European locales have proper behavior from the Calendar. I could forward you mine.

    #4
    Blank screen after login in:
    invalidAwayMessage = Le message d'absence doit contenir au moins {0} caract\u00e8res
    Normal behavior after login in:
    invalidAwayMessage = Le message d absence doit contenir au moins {0} caract\u00e8res

    The only difference is the single quote

    I've noticed elsewhere in the properties files that I had the combination single quote + placeholder, but the application doesn't seem to mind. Quite boggling.

    #5 Nothing in the ?debug=3 console, but the FF JavaScript console says:

    Error: uncaught exception: unterminated string literal

    #3 & #6: Thanks, Kevin


    Francois

    #2 can you just attach it to the bug and add any more info that may help us fix it or reproduce it?

    #4 What is you escape the ' like \' Will that solve it?

    #5 Is there a line number or filename? Seems like another unescaped value in a string.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  5. #5
    Kafka is offline Active Member
    Join Date
    Jan 2006
    Posts
    27
    Rep Power
    9

    Default

    #2 can you just attach it to the bug and add any more info that may help us fix it or reproduce it?

    #4 What is you escape the ' like \' Will that solve it?

    #5 Is there a line number or filename? Seems like another unescaped value in a string.
    #2: Done

    #4: Tried that yesterday: didn't work (as did not \uXXXX unicode single quote string). Checked out java 5 API (http://java.sun.com/j2se/1.5.0/docs/...perties.html): single quote does not have to be escaped, if this is the class in question. I thought that that class might have been extended by Zimbra's developers to parse variable placeholders (and that this extended class might be at fault here), but since I don't know the app class structure, it's at best a guess.

    #5: Unfortunatly, the console just gives out the error, not the line number or the file .

    HTH

    Francois

  6. #6
    andyc is offline Zimbra Employee
    Join Date
    Oct 2005
    Location
    California
    Posts
    79
    Rep Power
    9

    Default Bugs 5912 and 5962

    I think both of these bugs were caused by trying to use "parseInt('09')" in JavaScript. When there are leading zeros, the parseInt function attempts to parse the number as octal which will give you completely wrong dates.

    I've submitted a fix for this problem and closed these bugs. You can get the code from CVS.

  7. #7
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    Quote Originally Posted by Kafka
    #4: Tried that yesterday: didn't work (as did not \uXXXX unicode single quote string). Checked out java 5 API (http://java.sun.com/j2se/1.5.0/docs/...perties.html): single quote does not have to be escaped, if this is the class in question. I thought that that class might have been extended by Zimbra's developers to parse variable placeholders (and that this extended class might be at fault here), but since I don't know the app class structure, it's at best a guess.
    Ok for this you have to use two ' so it should be like:

    Code:
    won''t
    Let us know how it works.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  8. #8
    Kafka is offline Active Member
    Join Date
    Jan 2006
    Posts
    27
    Rep Power
    9

    Default Follow up

    Thanks Kevin! Fixed the single quote situation.

    Now for the Calendar bug (bugs?):

    I want to thank Andrew for the quick answer, and the code line.

    var value = parseInt(s.substring(head, tail));

    to change for:

    var value = parseInt(s.substring(head, tail).replace(/^0+(\d)/,"$1"));


    Did change the said line in the two AjxText.js files, cleared the cache of FF, restarted Tomcat, reloaded the page but... unfortunatly, the same problem (setting an appointment on the 8th or 9th of February, and the appointment being set on the Third of March).

    Have I forgotten something in the process?

    Thanks again!

    Francois

  9. #9
    KevinH's Avatar
    KevinH is offline Expert Member
    Join Date
    Aug 2005
    Location
    San Mateo, CA
    Posts
    4,789
    Rep Power
    19

    Default

    Well the files get compressed so you can't just edit the single file.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  10. #10
    andyc is offline Zimbra Employee
    Join Date
    Oct 2005
    Location
    California
    Posts
    79
    Rep Power
    9

    Default

    Quote Originally Posted by KevinH
    Well the files get compressed so you can't just edit the single file.
    You also need to make the change in Ajax_all.js.

    After my initial fix, I actually made a much cleaner, simpler one. Change:

    var value = parseInt(s.substring(head, tail));

    to:

    var value = parseInt(s.substring(head, tail), 10);

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •