site  contact  subhomenews

Translating help files in Easy

August 19, 2017 — BarryK
I posted recently about an overhaul of the help files in Easy:
http://bkhome.org/news/201708/easy-help-overhauled.html

Then I considered moving from html to markdown:
http://bkhome.org/news/201708/markdown-to-html.html

But no, the richness of html is far superior to markdown, and mdview only supports a basic set of tags.

Folder /usr/share/doc/easy has help.sh, home.sh and welcome.sh. When run, these generate help_lang.htm, home_lang.htm and welcome_lang.htm, where "lang" is the two-character code for the language, ex "de" for German.

Symlinks help.htm, home.htm and welcome.htm are also created.

I am using momanager to create .mo files for help.sh, home.sh and welcome.sh. Just a note: currently there is a bug with latest momanager, so I am using an older version. As a precaution, I will leave the older version in woofQ, at /usr/sbin/momanager0.

TEXTDOMAIN is "easyhelp", and so far I have done fr, de and da, using google online translator:
https://translate.google.com.au/

Google asked for $68 to translate an entire .po file, but it can be done for free, more slowly, by pasting the text into the left-hand English side. But, the easyhelp.po file has to be done in two parts.

Obviously, the google translations are going to be less than optimum. I will upload 'easyos.po' and invite anyone interested, to insert translations. Will post a comment when that is done.

Comments

Here is the 'easyhelp.po' file:
http://distro.ibiblio.org/easyos/project/easyhelp.po.gz

Download and click on it to uncompress.

Translations can be done in a text editor, such as Geany. Do not break the long lines.

Where you see back-slashes, keep them. For example, \"
Where you see the word "Easy", leave as-is, do not translate.

Also, this line will need to be edited:
"Language-Team: French\n"

Insert the translations, save it as easyhelp_lang.po, where "lang" is the two-character lanuage code, and email it to me, at b#ka#ul#er#@g#ma#il#.c#om (obfuscated!)

I can then generate the .mo file (compiled form) and put it into the build. Then, at first startup, when a user selects that language in QuickSetup, all the help files will already be translated. No need for a "langpack" pet to get going.

Note, welcome.htm replaces welcome1stboot, it displays immediately after Quicksetup at first bootup, and has a lot more getting-started info than the original welcome1stboot.

Help doing this will be greatly appreciated! I already mentioned that I did fr, de and da, however, that was using google's translator so will be less than optimum.

http://murga-linux.com/puppy/viewtopic.php?t=111338

Tags: easy