| Welcome to the Zimbra :: Forums! | |
Welcome, if you would like to post a comment please register.
We also encourage you to explore all things Zimbra with our team and members of the community.
|  | 
03-09-2006, 09:13 PM
| | | .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 | 
03-09-2006, 09:52 PM
| | Zimbra Employee | |
Posts: 4,792
| | 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. | 
01-30-2009, 09:40 AM
| | | Quote:
Originally Posted by JeffT 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 | 
01-30-2009, 12:12 PM
| | Zimbra Employee | |
Posts: 187
| | Quote:
Originally Posted by caio80 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. | 
02-02-2009, 03:30 AM
| | | 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? | 
02-02-2009, 07:56 AM
| | Zimbra Employee | |
Posts: 187
| | Please file a bug. We will look into that issue. | 
02-02-2009, 09:37 AM
| | | 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! | 
02-02-2009, 12:10 PM
| | Zimbra Employee | |
Posts: 187
| | | 
02-05-2009, 09:26 AM
| | | Thanks, I was gonna file it as well in a few days! | 
02-05-2009, 10:33 AM
| | Zimbra Consultant & Moderator | |
Posts: 19,653
| | Quote:
Originally Posted by caio80 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
| | Thread Tools | Search this Thread | | | | | Display Modes | Linear Mode | | Why Join? Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.  |