Results 1 to 10 of 10

Thread: .properties file

  1. #1
    JeffT is offline Junior Member
    Join Date
    Mar 2006
    Posts
    6
    Rep Power
    9

    Default .properties file

    Hi,

    I am trying to get the com_zimbra_reminder zimlet to work.
    Currently, I have successfully deployed the zimlet.
    The zimlet icon etc appear fine.

    I am having trouble with the com_zimbra_reminder.properties file.
    Currently the zimlet icon does not seem to read in the values from the .properties file and all attributes are showing as the variable name, ie: {$msg.propertyname}

    How are these files included by the zimlet? I can find no reference.

    The zimlet whitepaper only offers:

    "The messages properties file consists of a set of Java properties that represent the localizable
    messages used by the Zimlet. Additional property files should be provided for each desired
    locale. These files follow the following standard localization convention for property files as
    follows:
    messages_xx_YY.properties
    Where xx is the language and YY is the locale. As an example, the properties file for the English
    language would be named messages_en.properties, and the properties file for the British locale
    would be named messages_en_GB.properties
    The properties files form a hierarchy such that subsequent nodes in the hierarchy need only
    override messages that need to be changed for the given language or locale.
    Message properties may be accessed within the Zimlet definition file as follows:
    ${msg.propertyName}. For example, message property username would be accessed as follows:
    ${msg.username}"

    Which (perhaps in my ignorance) does not provide the information as to how to get this file to be utilised.

    Any help greatly appreciated.

    JT

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

    Default

    Are you running a build from CVS? If not you won't have the code needed to load these properties. A work around would be to manually replace the property values in the .js files of the Zimlet.
    Looking for new beta users -> Co-Founder of Acompli. Previously worked at Zimbra (and Yahoo! & VMware) since 2005.

  3. #3
    caio80 is offline Senior Member
    Join Date
    Mar 2007
    Location
    Ferrara, Italy
    Posts
    55
    Rep Power
    8

    Default

    Quote Originally Posted by JeffT View Post
    Currently the zimlet icon does not seem to read in the values from the .properties file and all attributes are showing as the variable name, ie: {$msg.propertyname}
    Same here in 2009, with a stock 5.0.11 NE edition...

    Even more, I strictly followed Zimbra official suggestions about learning zimlet development: just read the 40 pages 3yrs old draft and start crawling thru existing zimlet sources....

    Therefore I made a folder with ALL the unzipped Zimbra zimlets included in the official package, and started fgrepping them to find an example of localization IN the XML definition file, but no luck! Seems that there's no zimlet using it! That made me think I wasn't the only one not being able to localize my zimlet.

    Has anybody got it working?

    We thank you all in advance

  4. #4
    rrao is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    187
    Rep Power
    9

    Default

    Quote Originally Posted by caio80 View Post
    Same here in 2009, with a stock 5.0.11 NE edition...

    Even more, I strictly followed Zimbra official suggestions about learning zimlet development: just read the 40 pages 3yrs old draft and start crawling thru existing zimlet sources....

    Therefore I made a folder with ALL the unzipped Zimbra zimlets included in the official package, and started fgrepping them to find an example of localization IN the XML definition file, but no luck! Seems that there's no zimlet using it! That made me think I wasn't the only one not being able to localize my zimlet.

    Has anybody got it working?

    We thank you all in advance
    Attached is one of the few Zimlets that has localization. Please check it out and lets know if you need more help.
    Attached Files Attached Files
    Bugzilla - Wiki - Downloads - Before posting... Search!

  5. #5
    caio80 is offline Senior Member
    Join Date
    Mar 2007
    Location
    Ferrara, Italy
    Posts
    55
    Rep Power
    8

    Default

    Nope, no way out. I can see this amazon zimlet working here, at least it gets the phrase from the base com_zimbra_amzn.properties file. Not from the _it_IT (just curiosity: does zimbra guess my language client-side by checking the browser setting, or by its lang user env variable? - here set on "C" as default - ), but still somehow the tag is interpreted by Zimbra.

    But trying to do the same in my zimlet (upon comparation with the amzn one, my code was correct already), it does not translate ${msg.tooltip} as it should. it just prints out the tag itself (-> "${msg.tooltip}")

    Notice that I created <zimlet>.properties (US english), <zimlet>_it.properties and even <zimlet>_it_IT.properties (Italian) to be 120% sure.

    :-(

    Even more, I tried to use ${prop.<something>} in the past, but Firebug gives me an error which blocks all zimlets from being loaded:

    Code:
    B is undefined
    replaceObj()()1e9izTxJ...2Fg%3D%3D (riga 614)
    replaceObj()(/(^|[^\\])\$\{prop\.([\$a-zA-Z0-9_]+)\}/g, "${prop.srcExt}", undefined)1e9izTxJ...2Fg%3D%3D (riga 607)
    process()("${prop.srcExt}", undefined, undefined)1e9izTxJ...2Fg%3D%3D (riga 596)
    ZmZimletContext()(6, Object userProperties=[1] zimletPanelItem=[1])1e9izTxJ...2Fg%3D%3D (riga 481)
    _loadZimlets()([Object zimlet=[1] zimletContext=[1], Object zimlet=[1] zimletContext=[1], Object zimlet=[1] zimletConfig=[1] zimletContext=[1], 4 more... 0=Object 1=Object 2=Object 3=Object 4=Object 5=Object], [Object zimlet=com_zimbra_phone _content=2602, Object zimlet=com_zimbra_phone _content=547 name=srcExt 0=Object 1=Object], undefined, undefined, undefined)1e9izTxJ...2Fg%3D%3D (riga 784)
    loadZimlets()([Object zimlet=[1] zimletContext=[1], Object zimlet=[1] zimletContext=[1], Object zimlet=[1] zimletConfig=[1] zimletContext=[1], 4 more... 0=Object 1=Object 2=Object 3=Object 4=Object 5=Object], [Object zimlet=com_zimbra_phone _content=2602, Object zimlet=com_zimbra_phone _content=547 name=srcExt 0=Object 1=Object], undefined, undefined, undefined)1e9izTxJ...2Fg%3D%3D (riga 774)
    _loadZimlets()([Object zimlet=[1] zimletContext=[1], Object zimlet=[1] zimletContext=[1], Object zimlet=[1] zimletConfig=[1] zimletContext=[1], 4 more... 0=Object 1=Object 2=Object 3=Object 4=Object 5=Object], [Object zimlet=com_zimbra_phone _content=2602, Object zimlet=com_zimbra_phone _content=547 name=srcExt 0=Object 1=Object])Startup1...117052447 (riga 602)
    run1()(undefined)#1 (riga 530)
    _postLoadCallback()(["Zimlet" 0=Zimlet], true, AjxCallback obj=ZmSettings args=[2], undefined)#1 (riga 869)
    _continueRequire()(["Zimlet" 0=Zimlet], false, AjxCallback obj=ZmSettings args=[2], undefined)#1 (riga 850)
    require()(["Zimlet" 0=Zimlet], false, AjxCallback obj=ZmSettings args=[2], undefined, undefined)#1 (riga 836)
    (?)()()Startup1...117052447 (riga 592)
    run()()#1 (riga 522)
    _runNextPostRenderCallback()()Startup1...117052447 (riga 8726)
    run()()#1 (riga 522)
    _exec()(7)Startup1...117052447 (riga 1452)
    (?)()Startup1...117052447 (riga 1441)
    [Break on this error] }}}else{if(typeof B[I]!="undefined"){if(B[I] instanceof Object){D+=B[I].value
    Last but not least, even
    Code:
    ${config.global.<something>}
    does not work...


    UPDATE: just before posting this msg, I found out that ${msg.<something>} does work, but just when deploying the .zip via zmzimletctl. Using the _dev dir, it does not get translated... Not a big deal, actually. As long as it is limited to localization...

    About ${config.global.<something>}, it doesn't work either way, as well as ${prop.<something>}... :-(

    Any idea anybody anyhow?

  6. #6
    rrao is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    187
    Rep Power
    9

    Default

    Please file a bug. We will look into that issue.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  7. #7
    caio80 is offline Senior Member
    Join Date
    Mar 2007
    Location
    Ferrara, Italy
    Posts
    55
    Rep Power
    8

    Default

    I will, as soon as I find a good moment to collect some tech info. Think I'll file it as a "problems accessing user and global properties in zimlet definition files", or something like that.

    I'll maybe file something similar for the missing localization when developing code in the _dev dir, though it's not a big deal once you know the trick. For sure I'll mark it low priority!

    Thanks in advance for your support!

  8. #8
    rrao is offline Zimbra Employee
    Join Date
    Sep 2005
    Posts
    187
    Rep Power
    9

  9. #9
    caio80 is offline Senior Member
    Join Date
    Mar 2007
    Location
    Ferrara, Italy
    Posts
    55
    Rep Power
    8

    Default

    Thanks, I was gonna file it as well in a few days!

  10. #10
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,201
    Rep Power
    56

    Default

    Quote Originally Posted by caio80 View Post
    Thanks, I was gonna file it as well in a few days!
    Don't forget to vote on it if you want to see some movement in the bug.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. centos 5 zimbra 4.5.6 no statistics
    By rutman286 in forum Installation
    Replies: 9
    Last Post: 08-14-2007, 09:30 AM
  2. Opensource backup Question.
    By nfear24 in forum Administrators
    Replies: 3
    Last Post: 03-31-2007, 11:47 PM
  3. Replies: 5
    Last Post: 03-01-2007, 03:20 AM
  4. Traslation SVN tree status
    By meikka in forum I18N/L10N - Translations
    Replies: 7
    Last Post: 02-13-2007, 11:13 AM
  5. M3 problem with shares
    By titangears in forum Users
    Replies: 4
    Last Post: 01-12-2006, 01:01 PM

Posting Permissions

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