MoManager: documentation files

Continuing to enhance MoManager to be a one-stop-shop for language translation of everything in Puppy, I have added management of documentation files.

Forum member esmourguit, who is working on a 'fr' langpack, was wondering how to handle /usr/local/petget/help.htm. This is a help file for Puppy Package Manager.

An application usually has help or other doc files with naming to identify the language, for example 'help.htm', 'help-de.htm', 'help-fr.htm', etc.

So, I have modified /usr/local/petget/ui_Classic and ui_Ziggy to use a translation file if it exists, for example 'help-fr.htm'. In fact, I have put 'help-fr.htm' into Woof as esmourguit has already created it and it is a good example.

Translation of such documentation files is now handled by MoManager via /usr/share/sss/doc_strings/doc_strings -- the easiest way to understand it would be to look at that file.

The end result is that it is now in MoManager, you choose 'doc_strings' and click 'Edit' or 'Create', and an appropriate editor will open with the file to be translated -- in the case of HTML files, the 'defaulthtmleditor' is used, which is usually Composer.

Currently only the PPM help file is being managed by MoManager. I will have to identify other help files and add them to /usr/share/sss/doc_strings/doc_strings.

To see the details, and grab the latest files if you want, here is the Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/49d5144356


Posted on 24 Feb 2012, 23:55


Comments:

Posted on 24 Feb 2012, 24:34 by rodin.s
PPM help
I have also translated PPM help but since it is part of langpack_ru it just replaces original help.htm when langpack is installed. I have also translated homepage home.htm but it cannot be part of the langpack because it's different for Wary, Racy and Slacko. Name of distro is changed.


Posted on 25 Feb 2012, 9:18 by BarryK
Doc translations
I have significantly enhanced MoManager to manage all documentation files in Puppy, at least, those that are from Woof.

It is a fairly simple process of sequencing through them via the GUI.

I have worked out how files such as home.htm can be in a langpack, but it required modifications to Woof. Will announce details soon, after I have tested it.



Posted on 25 Feb 2012, 9:43 by 01micko
3builddisto bug
@line 2130

this works, whereas the old errored:

cp -rf rootfs-complete/usr/share/doc/nls/* devx/usr/share/doc/nls/

rm -r rootfs-complete/usr/share/doc/nls



Posted on 25 Feb 2012, 11:18 by BarryK
re 3builddistro bug
Thanks, fixed.



Posted on 25 Feb 2012, 14:17 by 01micko
3builddistro bug 2
@line 2085 you have $KMSFLAG ... should be:
   case $KMSFLG in


I was wondering why there was no entry when I flipped!


Posted on 25 Feb 2012, 22:11 by BarryK
Re KMSFLG
Thanks again!



Posted on 25 Feb 2012, 22:17 by BarryK
MoManager working
I have done a test build, MoManager is now handling all of the documentations files, works well.

I fixed a few bugs, various enhancements to MoManager, fixed a bug with desktop icons going back to English when the SFS layers change.

It is fairly late here, 10pm, will relax now and will do another build in the morning, a sanity check, then will upload latest Woof. Wary/Racy beta2 should also be coming tomorrow.



Posted on 25 Feb 2012, 23:46 by rodin.s
desktop icons
fixed a bug with desktop icons going back to English when the SFS layers change
That's great.


Posted on 26 Feb 2012, 4:52 by 01micko
drive icons
I have witnessed something very strange in my latest slacko build back to beta (woof 120224, all commits of that day). I have 2 hard drives, sda and sdb, both with several partitions (about 6 on each iirc, not at that machine). On every X restart the icons for sda redraw but the icons on sdb do not. I haven't a clue ATM but am looking into it. It looked very strange when I changed screen res, the sda icons redrew in the right spot but sdb icons were stranded up screen.


Posted on 26 Feb 2012, 8:29 by BarryK
re drive icons
01micko,
Was that when you used xrandr in QuickSetup to change resolution? I have put in a change to cause drive icons to redraw in that situation.



Posted on 26 Feb 2012, 8:16 by technosaurus
Accessibility 4 vission impaired
I have previously compiled the espeak package for converting text to speech, but I never really did anything really useful with it. I think it would be fairly straightforward to add a gettext/textviewer wrapper to /etc/functions4puppy (or something similar in the NLS packages) that would speak all text passed to gettext and/or defaulttexteditor/viewer if an environment variable is set.
Let me know if you are interested (AFAIK, Knoppix is the only distro with something similar to support the vision impaired)


Posted on 26 Feb 2012, 8:24 by 01micko
re re drive icons
Actually no.

What I did was use my "unload_nouveau" script to unload nouveau and reboot. It boots straight to desktop but "vesa" is chosen. Vesa sets the res at 1440x1024 (iirc) which works on my monitor but is out of range. (I get a persistent splash from the monitor in centre screen "Out of range" but the screen still shows). This is when I see the sda icons redrawn at an appropriate position and the sdb icons still halfway up screen. The highest res for the monitor is 1280x1024 and that's what nouveau sets it at. I didn't touch xrandr or use quicksetup at that point.

My "unload_nouveau" script is based on the files that come with the "official" proprietary nvidia driver and it works quite well (see your attachment in PM).

By the way, when I boot racy I get "vesa" loaded by default, must "choose" nouveau in xorgwizard. In racy I still get the odd behaviour of 1440x1024 resolution. (This is with racy 522, haven't got bet 5.3 yet).

Hope this sheds some light.


Posted on 26 Feb 2012, 9:04 by BarryK
Re unload_nouvea
01micko,
Put this into unload_nouveau:

echo "ICONWIPE" > /var/local/pup_event_icon_change_flag

/root/.xinitrd calls clean_desk_icons which reads the above and wipes the desktop drive icons and they get redrawn.



Posted on 26 Feb 2012, 17:51 by 01micko
iconwipe
just saw the commit in the woof tree for nouveau_unload.

Should you have added to the disablefunc function
echo "ICONWIPE" > /var/local/pup_event_icon_change_flag

?


Posted on 26 Feb 2012, 19:41 by BarryK
Re iconwipe
I noticed that xorgwizard does it, right at bottom of script.



Posted on 26 Feb 2012, 21:53 by 01micko
re re iconwipe
ok, but nouveau_unload avoids xorgwizard altogether.. goes straight to reboot or quits. I think you were right to suggest it in the first place in the case where my machine reboots straight to desktop with vesa at a different res.

Actually, it just occurred to me that xorgwizard can't run if nouveau is loaded, so maybe I need a bit of a logic shake up. Busy day tomorrow so Tuesday. :)


Posted on 27 Feb 2012, 5:20 by 01micko
scratch that
The second paragraph in my last post can be scratched. It works ok how it is. Still probably needs iconwipe.