Page 1 of 1
Slacko64 7.0 jwm_config internationalization
Posted: Mon Jan 25, 2021 9:57 pm
by HerrBert
Hello.
I've spent serveral hours trying to translate /usr/local/jwm_config/* to LANG=de_DE.UTF-8 without success.
I've encountered two problems:
TEXTDOMAIN=jwm
IMHO this is wrong and a very big problem when trying to internationalize jwm_config. Apart from that it breaks my translation for jwm binary in /usr/share/locale/de/LC_MESSAGES/jwm.mo. It should be solely used for jwm binary, not for additional stuff in puppy jwm_configs like:
/usr/local/jwm_config/corner
/usr/local/jwm_config/jwm_restart
/usr/local/jwm_config/menu
/usr/local/jwm_config/menu_build_clock
/usr/local/jwm_config/menu_build_mouseaction
/usr/local/jwm_config/menu_build_places
/usr/local/jwm_config/menu_build_recent_docs
/usr/local/jwm_config/shortcuts
/usr/local/jwm_config/theme_switcher
/usr/local/jwm_config/time
/usr/local/jwm_config/tray
/usr/local/jwm_config/window
/usr/local/jwm_config/window_buttons
I've set the TEXTDOMAIN of the afore mentioned files to jwmconfig and compiled my jwm.po to /usr/share/locale/de/LC_MESSAGES/jwmconfig.mo.
At least i got it translated, but it won't apply to the original .iso files due to missing care about TEXTDOMAIN and LANG.
Re: Slacko64 7.0 jwm_config internationalization
Posted: Sat Jan 30, 2021 11:40 pm
by zigbert
@HerrBert
No problem for me changing the TEXTDOMAIN to eg. jwm_config, but I am uncertain of the implications. @01micko , what do you say? Does there exist other translations?
The LANG=C should be fixable...
Can you share your *.mo file - it will be easier for me to look into the tray-configuration issue
edit.
I have looked briefly at the code, and can't determine exactly the problem by using LANG=C since it is used locally in some functions to speed up the grep function. This is the trick to make the tray-configuration responsive. What exactly is not translated?
- is it the only parts of the Tray-configuration gui? I see by the screeny that button says "Setup tray 1". Guess that is wrong. What else?
- is it the modified tray-configuration file?
- is it problem for the app to read the german tray-configuration?
Re: Slacko64 7.0 jwm_config internationalization
Posted: Sun Jan 31, 2021 11:11 am
by HerrBert
@zigbert
In langpack_de-20150419.pet there is jwmconfig.mo, jwmconfig2.mo and jwm.mo but it does not translate anything in tray-configuration, window-settings, shortcuts, menu-manager.
Also there are a lot of strings for jwm-configuration in puppy.mo which is used by pdesktop.
What exactly is not translated?
- is it the only parts of the Tray-configuration gui? I see by the screeny that button says "Setup tray 1". Guess that is wrong. What else?
- is it the modified tray-configuration file?
- is it problem for the app to read the german tray-configuration?
The above screenshot (1st post) is showing the translated jwm-configuration.
I refuse to translate common terms and definitions like Desktop (Arbeitsfläche), Icons (Symbole|Ikonen?), Tray (Ablage), Dock, ...
Setup (Einrichtung|Installation) may not be a common term but was kept in this case. Many things should be self-explanatory in 2021
Other things may lead to confusion when translated word by word, so need to get creative.
With the new generated .mo file (TEXTDOMAIN=jwmconfig) /root/.jwm/tmp/tray_statusbar /root/.jwm/tmp/tray_tree /root/.jwm/tmp/tray_VISIBILITY are translated by the function read_settings, but anything past this function is not translated.
Code: Select all
read_settings () {
...
set_icons
set_placement_icons
}
set_icons (){
LANG=C
...
}
- quickshot-210131-095906.jpg (59.4 KiB) Viewed 1196 times
The only modification i did was to add OLDLANG=$LANG before functions and LANG=$OLDLANG after read_settings is called in line 793(+1) and of course set TEXTDOMAIN=jwmconfig
(Help and some error messages not translated in attached .mo - consider as a draft)
edit:
Keep in mind that the files mentioned in first post are also affected by TEXTDOMAIN...
Re: Slacko64 7.0 jwm_config internationalization
Posted: Sun Jan 31, 2021 9:05 pm
by zigbert
I have tried to implement your fix. I have changed the TEXTDOMAIN to jwm_config, since this is the name of the package.
Does it work for you?
If this works, let's look at window-settings, shortcuts and menu-manager.
... and we will of course change TEXTDOMAIN in all apps in the jwm_config pack
Re: Slacko64 7.0 jwm_config internationalization
Posted: Mon Feb 01, 2021 3:04 pm
by HerrBert
I have renamed jwmconfig.mo to jwm_config.mo (Project-Id-Version will be updated when adding help strings).
Also i've set TEXTDOMAIN=jwm_config in all affected files in /usr/local/jwm_config.
Works here standalone, but not when started from ptheme. Same problem with LANG=C exist in ptheme.
I have added the MYLANG=$LANG and reverse to ptheme and all works well (also translated today).
Apart from TEXTDOMAIN no further modifications needed in jwm_config pack - translation works adequate for them.
Re: Slacko64 7.0 jwm_config internationalization
Posted: Tue Feb 02, 2021 5:33 pm
by zigbert
@HerrBert
Should be fixed in Woof-CE now. Thank you for your work!
Since you know how to dive into the Puppy code, please consider to pull requests directly to github.
Sigmund