bungeni-org / bungeni-exist

The eXist XML Db is used as a repository for XML archival documents by Bungeni.
1 stars 0 forks source link

Bungeni message strings and message Ids #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We the case of translating literal strings on the XML portal -- i.e. the field 
labels. 

We have different kinds of message strings in the XML UI -- 

 1- the ones coming in html templates (these could be translated in place - by having different templates for different languages ) - and could also be scripted out by having placeholders for literal strings. This is easy to implement.

 2- there are literal strings that could be "shared" with bungeni . e.g. a question is entered in the bungeni workspace and also displayed in the bungnei workspace. There are message strings shown there rendered from Zope .po files. These could be used in eXist by converting the PO to xml and using the message ids as placeholders.  This is relatively more dificult to implement.

Original issue reported on code.google.com by ashok.ha...@gmail.com on 28 Oct 2011 at 1:44

GoogleCodeExporter commented 9 years ago
Here is a clearer way --- 

1) 

the commandline msgfmt utility supports converting po files to java resource 
bundle files (see : 
http://www.gnu.org/s/hello/manual/gettext/msgfmt-Invocation.html).  
so the way would be to manage all the primary translations in PO (via 
translate.bungeni.org ), add msgfmt to the xml-ui transform chain, and use the 
resource bundles for translation in eXist.  

2)

Add i18n message id translation into eXist as a pass-thru servlet filter[could 
be outsourced ]

Original comment by ashok.ha...@gmail.com on 3 Nov 2011 at 10:34

GoogleCodeExporter commented 9 years ago
This script looks better :

https://raw.github.com/fileformat/lptools/master/po2prop.py

takes a PO file and outputs a well formatted java properties file

Original comment by ashok.ha...@gmail.com on 10 Nov 2011 at 10:33