Hi, I just had following issue with pootle:
I want to translate a Java project using Java resource bundles. I have created some gradle scripts to automate initial import of existing resourcebundles and updating the files on changes in the project (using prop2po, msginit, msgmerge, po2prop) -- http://github.com/tschulte/gradle-gettext-plugin. As is the nature of Java properties files, the translations are property files ending on .properties, translations to eg. German end on _de.properties or _de_DE.properties, _de_AT.properties or even _de_DE_BY. We do even have bundles with _de__CustomerA.properties (no country code, but with variant to support customer specific translations). To support automatic processing of the bundles, we have a naming convention in place. We do only allow A-Z, a-z and a hyphen ([A-Za-z-]+). With this the language code can be found by using "[A-Za-z-]+_(.*)". Our project does have a couple of files like messages-all.properties. These where not found by pootle. I found the source of my problem in pootle/apps/pootle_app/project_tree.py: #: Case insensitive match for language codes as postfix LANGCODE_POSTFIX_RE = re.compile('^.*?[-_.]([a-z]{2,3}([_-][a-z]{2,3})?(@[a-z0-9]+)?)$', re.IGNORECASE) I fixed this in my pootle server by changing the regex to '^.*?[_]([a-z]{2,3}....' But I think this should somehow go into the pootle sourcecode. Maybe using some type of preference on project level. Maybe as a fourth option for "Project Tree Style". Although I do not have any experience in python, I am willing to try implementing this, but do need some hints on how to do this. Regards, Tobias ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Translate-pootle mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/translate-pootle
