scripts for language support in applications
This is following the gettext standard as used in NoteTree.
To be honest I don't always use it, this was actually the first application I did not just stuff in an implementation of my own because I wanted to get to know the canonical way (that Django also uses). I generally find my own easier to work with (for instance in Rst2Html).
- binfab lang.init <project> <lang>
Generates a directory "locale" onder de <project> directory containing an LC_MESSAGES directory for each language indicated by <lang> ('.' is default, this creates both "en" and "nl").
- binfab lang.gettext <project> <source>
Generates a POT file per <source> in the "locale" directory. When you enter "." for <source> the entire project is inspected. The POT file is named messages-<source>.pot except for "." there the name is messages-all.pot.
- binfab lang.merge <project> <lang> <source>
Generates a PO file for <lang> based on (changes in) the POT file. <source> werks like with gettext <lang> must be a regular language code zijn so you can't do all-in-one with a default as with init
- binfab lang.poedit <project> <lang>
Lets you edit a specific PO file using the program POEDIT. From this program you can directly compile to MO (is it done by default on saving? Is this why there isn't a separate command for this in this file?)
- binfab lang.place <project> <lang> <appname>
Copies a specific <lang>.mo file to the appropriate LC_MESSAGES directory en renames it to <appname>.mo.