Sorry guys, don't use it as is, the Python config parser removes comments from the config file, not what we want, back to the drawing board.
Cheers Lex 2009/8/28 Lex Trotman <[email protected]>: > Hi Nick, Enrico, Frank, > > As I understand it intltool handles config files by creating a C file > with their strings that can be processed with the other code, and then > updates the config files with the translations from the .po files. > > Inspired by this here is a 50 line python script to do this for build > menu entries in filetypes files. > > run as: > xbuildmenu.py mkc cfile list_of_filetypes_files.. > > it creates the file cfile as a C file with strings containing all the > build menu labels it finds in the listed filetypes files (filetypes.* > would be good:-) > this cfile can be processed by your translation tools (tested with > xgettext) along with all the other program files to extract strings > for translation. > A good name for cfile might be buildmenutranslate.h > > run as: > xbuildmenu.py upd cfile podir > > it searches the po files in podir for strings taken from the cfile and > using the information in the structured comments in the cfile copies > the translation back into the filetypes files with a language marker > the same as the po file name, eg de.po gives [de] on the config file > entry. > > It should be easy to call this from the waf script since you are > guaranteed that python is available :-). We are only talking about > the standard filetypes as delivered with the system so there is no > need for users to run this, just run when translations are updated in > svn. > > It uses grep to speed its file search by eliminating lots of files (hopefully) > > Cheers > Lex > > 2009/8/26 Lex Trotman <[email protected]>: >> 2009/8/26 Nick Treleaven <[email protected]>: >>> >>> Yes, but any default string could be added to the codebase for >>> translations, not just compile and build. Assuming it's a 'general' >>> kind of menu label, things which would be useful for several filetypes. >>> >> >> All the strings in the code that appear as labels should already be >> marked for translation, if I missed any thats a bug :-) >> >> There isn't any way of changing the default label string to a >> different default depending on filetype. The intention is that if you >> want to change a filetype menu label it is configured in the filetypes >> file along with the command and overrides the default. >> >> Let me look at a possible solution in a few days. >> >> Cheers >> Lex >> >>> Regards, >>> Nick >>> _______________________________________________ >>> Geany-devel mailing list >>> [email protected] >>> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel >>> >> > _______________________________________________ Geany-devel mailing list [email protected] http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
