Hello!
I want to help translating Visopsys to german and spanish language.
What have I to do? And how have I to do it?
Greetings,
Jens W.
Translating Visopsys OS
Re: Translating Visopsys OS
Hi Jens,
That would be great
I have (unreleased, attached) German translations for a bunch of stuff. If you could enhance or extend this, or add stuff for other languages, that would be great.
Are you familiar with GNU gettext? https://www.gnu.org/software/gettext/ma ... ttext.html
I use this set of programs to generate its message files (*.po) from the source code, and compile them into binaries (*.pot) on my Linux dev system. There's a script utils/makemsgs.sh that helps to automate the process.
If you look at a simple program such as src/programs/cmdwin.c, you can see how I mark the strings that need to be translated in the source code, with a macro _(...) which at compile time gets turned into gettext() calls.
Then, when Visopsys is running, it uses gettext() in 'libintl' to return the correct messages for the given language.
Let me know if you need more info about how all of this works...
Andy
That would be great
I have (unreleased, attached) German translations for a bunch of stuff. If you could enhance or extend this, or add stuff for other languages, that would be great.
Are you familiar with GNU gettext? https://www.gnu.org/software/gettext/ma ... ttext.html
I use this set of programs to generate its message files (*.po) from the source code, and compile them into binaries (*.pot) on my Linux dev system. There's a script utils/makemsgs.sh that helps to automate the process.
If you look at a simple program such as src/programs/cmdwin.c, you can see how I mark the strings that need to be translated in the source code, with a macro _(...) which at compile time gets turned into gettext() calls.
Then, when Visopsys is running, it uses gettext() in 'libintl' to return the correct messages for the given language.
Let me know if you need more info about how all of this works...
Andy
- Attachments
-
- german.tar.gz
- (19.97 KiB) Downloaded 2634 times
Re: Translating Visopsys OS
Hi!
I readed some capiteles of the "gnu-gettext-documentation-bible" but I don't understand how exactly have I to generate the .po files from the source code. Is there a way to generate one time ALL .po files?
If I understood right, I have to rename the .po files to .pot files and after translating everything, I have to compile that .pot files to .mo files. Right? And the compiled files have I to put with the .po files in a same directory named "es", "de", etc?
Another question - sorry... - how I install gettext and is this everything I need?
sudo apt-get install gettext
And maybe
sudo apt-get poedit
?
Ok. Enough questions for now...
I never translated with gettext but I am interested to learn.
Thank you,
Jens
I readed some capiteles of the "gnu-gettext-documentation-bible" but I don't understand how exactly have I to generate the .po files from the source code. Is there a way to generate one time ALL .po files?
If I understood right, I have to rename the .po files to .pot files and after translating everything, I have to compile that .pot files to .mo files. Right? And the compiled files have I to put with the .po files in a same directory named "es", "de", etc?
Another question - sorry... - how I install gettext and is this everything I need?
sudo apt-get install gettext
And maybe
sudo apt-get poedit
?
Ok. Enough questions for now...
I never translated with gettext but I am interested to learn.
Thank you,
Jens
Re: Translating Visopsys OS
Sorry! I got it wrong before. It's been a while since I've done this.fosforito wrote:I don't understand how exactly have I to generate the .po files from the source code. Is there a way to generate one time ALL .po files?
.pot (PO template) files:fosforito wrote:If I understood right, I have to rename the .po files to .pot files and after translating everything, I have to compile that .pot files to .mo files. Right? And the compiled files have I to put with the .po files in a same directory named "es", "de", etc?
These are generated from the C source using the xgettext command. Using it is a little bit fiddly, and you shouldn't need it unless you're actually changing the strings in the program itself. The .pot files for the programs are already generated, and in the source tree with the corresponding .c file.
.po files:
These are copies of .pot files that you edit for your new language. Wherever the .pot file is, create a subdirectory there named after the 2-letter language code. Put the .po file in the subdirectory named 'de' or 'es' or 'fr', etc., and just add the translation underneath each original English string
Code: Select all
#: cmdwin.c:100
#, c-format
msgid "Unable to load shell\n"
msgstr "Your translation goes here\n"
That looks about right to me, assuming the repository has the packages under those names (I haven't used apt for a couple of years)fosforito wrote:Another question - sorry... - how I install gettext and is this everything I need?
sudo apt-get install gettext
And maybe
sudo apt-get poedit
Re: Translating Visopsys OS
Correction/clarification: a bunch of them are already generated, from when we were doing that original German translation. But not all.andymc wrote:The .pot files for the programs are already generated, and in the source tree with the corresponding .c file.
If you wanted to translate other programs, then they'd have to have those macros and calls that you see in (for example) cmdwin.c, and you'd have to run xgettext to generate additional .pot files
Re: Translating Visopsys OS
Also, it should be noted that not every string needs to be translated, such as debugging/error messages. In most cases, we'd be fine with just the main strings that the user sees. The other ones, I believe you can just leave them empty and the library will default to using the original English.
- espectalll123
- Posts: 54
- Joined: Tue Jan 25, 2011 7:58 pm
- Location: Toledo, Spain
- Contact:
Re: Translating Visopsys OS
Here a Spanish translator! I can work with fosforito, as he's from Bolivia and I'm from Spain, we can do together a standard translation, then he can put it together in BO (or MX or something like that!), and I can do the ES one.
P. S.: Long time no see!
P. S.: Long time no see!
espectalll123, making dreams work!
Re: Translating Visopsys OS
Hello Espectalll,espectalll123 wrote:Here a Spanish translator! I can work with fosforito, as he's from Bolivia and I'm from Spain, we can do together a standard translation, then he can put it together in BO (or MX or something like that!), and I can do the ES one.
P. S.: Long time no see!
I'm German and I live in Paraguay - not Bolivia....
Ok. I have now generated all the pot files of the programs directory and I can send you the files who need to be translated into spanish and I will translate the same files into german.
The files attached in Andys post in this topic I already translated to spanish.
In 10 hours I will attach the others here.
Saludos,
Jens Wagner
Re: Translating Visopsys OS
Fosforito! Can you split it in half and send me one half for english/spanish translation???
I can help with plain text translation but i don't have Linux to compile the files.
I can help with plain text translation but i don't have Linux to compile the files.