MoManager: SSS domains
February 08, 2012 —
BarryK
MoManager is my GUI application that intends to make it easy for anyone to translate Puppy for their (non-English) language. See earlier blog posts:
http://bkhome.org/archive/blog2/201202/introducing-momanager.html
http://bkhome.org/archive/blog2/201202/momanager-handles-desktop-files.html
There has been much progress. Here is a snapshot:
I have been studying shinobar's technique of using gettext translation for all types of text files. Very impressive, but I decided to play around with a different technique, that I have named SSS, Simple String Substitution -- to make it seem much more fancy than it is . I even introduced the term SSS Domains to make it seem even more clever!
The SSS files are at /usr/share/nls. So far I have only created one SSS-domain, /usr/share/nls/menu_strings/, and the way to understand what it is all about is to look at the files in that directory. Then look at script /usr/sbin/fixmenus to see how it reads the SSS file -- for example, if running with LANG=de_DE.UTF-8, the appropriate translation-file for the 'menu_strings' SSS-domain is /usr/share/nls/menu_strings/menu_strings.de.
It really is very simple. I have only created 'menu_strings' so far, and that even incomplete (only handling JWM), as people might tell me it is a really dumb method.
Yes, it is a dumb method, but does have some great advantages. Firstly, it is very easy to understand and create translations. Secondly, it handles any type of text files -- absolutely anything that needs English text substituted for another language. No knowledge of the syntax in the text file is required.
To view the appropriate files, here is the Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/cc6861c1a2
I plan to build a Puppy from latest Woof in a couple of days, for those who would like to play with this.
Note, there is one change I am thinking of making, change /usr/share/nls to /usr/share/sss.
Comments
poeditRe Poedit
Username: BarryK
"Yes, I could put in some code to detect if poedit is installed and use that.
reinventing the wheel
Username: Bert
"I'm always thrilled when Barry announces "I have my nose down working on something" :)( some blog posts ago) This is a wonderful development. Thank you! [img]http://i.imgur.com/uC9Mv.jpg[/img]
awesome
Username: voxatron
"Dear Barry, Thank you from the bottom of my heart. Seeing this post is a dream come true to me. You sir are awesome and have my highest respect. cheers from Greece.
Tags: woof