Internationalization of Fatdog64-700b2
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Internationalization of Fatdog64-700b2
Internationalization of Fatdog
This is NOT Puppy (right?) ... Quirky6x is also NOT Puppy,
And both use puppy's langpacks as base, and their langpacks, langpackFatdog_* and langpackQuirky_* are just additions.
We will use puppy tools and puppy knowledge to make Fatdog bark in many languages.
EDIT 2014-12-31
fatdog64-700 is different, all infos for a fresh start
-
EDIT 2014-12-20
fatdog64-700 is different, fresh start from 4th page
-
EDIT 2014-10-13
fatdog64-700 is different, start from 3rd page
-
EDIT 2014-11-06
fatdog64-700 is different, start from 3rd page
-
This is NOT Puppy (right?) ... Quirky6x is also NOT Puppy,
And both use puppy's langpacks as base, and their langpacks, langpackFatdog_* and langpackQuirky_* are just additions.
We will use puppy tools and puppy knowledge to make Fatdog bark in many languages.
EDIT 2014-12-31
fatdog64-700 is different, all infos for a fresh start
-
EDIT 2014-12-20
fatdog64-700 is different, fresh start from 4th page
-
EDIT 2014-10-13
fatdog64-700 is different, start from 3rd page
-
EDIT 2014-11-06
fatdog64-700 is different, start from 3rd page
-
- Attachments
-
- DickerHund.png
- (8.96 KiB) Downloaded 1547 times
Last edited by L18L on Wed 31 Dec 2014, 14:09, edited 14 times in total.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Internationalization of Fatdog
To enable your language (other than English) you have to install
glibc_locale package from Fatdog64 Package Manager
and then choose Fatdog64 Set Locale from Localisation tab in Fatdog64 Control Panel
momanager is the tool to manage translations of
scripts, menu items, help files, man pages...
You will find a version of momanger in fatdog's devx
or the latest version at the end of
http://www.murga-linux.com/puppy/viewtopic.php?t=81259
momanager needs pupdialog from puppy which is attached here..
Now it is time to install the official langpack_ of your language.
Then some apps will already run in your language.
Our job is to make all of them run in your language.
-
glibc_locale package from Fatdog64 Package Manager
and then choose Fatdog64 Set Locale from Localisation tab in Fatdog64 Control Panel
momanager is the tool to manage translations of
scripts, menu items, help files, man pages...
You will find a version of momanger in fatdog's devx
or the latest version at the end of
http://www.murga-linux.com/puppy/viewtopic.php?t=81259
momanager needs pupdialog from puppy which is attached here..
Now it is time to install the official langpack_ of your language.
Then some apps will already run in your language.
Our job is to make all of them run in your language.
-
- Attachments
-
- pupdialog.gz
- save to /usr/bin and
gunzip pupdialog.gz
or simply click on it and decompress it
...and don't forget to make it executable - (4.55 KiB) Downloaded 732 times
Last edited by L18L on Thu 09 Jan 2014, 16:17, edited 8 times in total.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Internationalization of Fatdog
Sort of TOC
in accordance with Barry's momanager
(Fatdog's momanager renders just what is already tested to work)
scripts
menu items
menu categories
XML files
SSS, documentation, help files, man pages...see first result here fatdog's help
binaries (ELF programms)
_______________
in accordance with Barry's momanager
(Fatdog's momanager renders just what is already tested to work)
scripts
menu items
menu categories
XML files
SSS, documentation, help files, man pages...see first result here fatdog's help
binaries (ELF programms)
_______________
Last edited by L18L on Thu 16 Jan 2014, 13:04, edited 6 times in total.
Marking my place here so that I can find it again.
L18L, I will copy the FPM stanzas to other gtk-server based tools too.
cheers!
L18L, I will copy the FPM stanzas to other gtk-server based tools too.
cheers!
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
For everyone interested:jamesbond wrote: I will copy the FPM stanzas to other gtk-server based tools too.
Fatdog uses gtk-server and XML files where translatable items are marked 'translatable="yes"' .
The translator will not have to take care about this because momanager can handle these things so that the translator will translate just the msgstr in po files as usual.
The only script ready for translation shipped in Fatdog64-630RC2 is FPM (Fatdog Package Manager). Therefore you will not see much more in "scripts that do not have a mo file".
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Internationalization of Fatdog
Let us start with Fatdog Control Panel
This script uses LANG=C (faster) if user's language is English.
...and the translations of Name and Comment in .desktop files are used,
ex: /usr/share/applications.in/fatdog-package-manager.desktop. Translation of Comment is tooltip in control panel
This script uses LANG=C (faster) if user's language is English.
...and the translations of Name and Comment in .desktop files are used,
ex: /usr/share/applications.in/fatdog-package-manager.desktop.
Code: Select all
[Desktop Entry]
Encoding=UTF-8
Name[de]=Fatdog64 Paket-Manager
Name=Fatdog64 Package Manager
Icon=pet48x.png
Comment=Download and manage installed application software
Comment[de]=Herunterladen und Verwaltung installierter Anwendungs-Software
Exec=fatdog-package-manager.sh
Terminal=false
Type=Application
Categories=X-SetupEntry
GenericName=Fatdog64 Package Manager
NoDisplay=true
- Attachments
-
- control-panel-using_name_and_comment.png
- (13.79 KiB) Downloaded 1501 times
-
- fatdog-control-panel.sh.gz
- save to /usr/bin and
gunzip and
chmod +x fatdog-control-panel.sh - (3.96 KiB) Downloaded 665 times
Thanks L18L.
Pupdialog committed; momanager 20131219 committed to devx (with t12s stuff); desktop file for package-manager committed; fatdog-control-panel.sh committed (with changes, I took the stanza from FPM as the one you provided didn't work ${VARy} is bash-only and fatdog-control-panel uses ash).
Keep it coming
cheers!
PS: "DickerHund" ("Thick Dog") - I like that
Pupdialog committed; momanager 20131219 committed to devx (with t12s stuff); desktop file for package-manager committed; fatdog-control-panel.sh committed (with changes, I took the stanza from FPM as the one you provided didn't work ${VARy} is bash-only and fatdog-control-panel uses ash).
Keep it coming
cheers!
PS: "DickerHund" ("Thick Dog") - I like that
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Why? Translations have to go into langpackFatdog only.jamesbond wrote:desktop file for package-manager committed
You mean just the linejamesbond wrote:fatdog-control-panel.sh committed (with changes, I took the stanza from FPM as the one you provided didn't work ${VARy} is bash-only and fatdog-control-panel uses ash).
Code: Select all
[ "${LANG:0:2}" = "en" ] && LANG=C # because it is faster
or from a script named varxy:my Terminal wrote:# echo $LANG
de_DE.UTF-8
# echo ${LANG:0:2}
de
# echo ${LANG%_*}
de
#
Code: Select all
#!/bin/ash
echo $LANG
#de_DE.UTF-8
echo ${LANG:0:2}
#de
echo ${LANG%_*}
#de
#
If it is not working then there should be another reason.my Terminal wrote:# varxy
de_DE.UTF-8
de
de
#
# LANG=en_AU varxy
en_AU
en
en
#
It is difficult for me to reproduce your not working situation. Where can I download your committed things?
Hmh... namesshould not be translated, translated back it isjamesbond wrote:PS: "DickerHund" ("Thick Dog") - I like that
)
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Here is how it works English (very fast) and translatedjamesbond wrote:...I took the stanza from FPM as the one you provided didn't work...
Code: Select all
# Note to myself: gtk_tree_store_set must always be defined before use
#next 2 lines need to be set at boot time only
export TEXTDOMAINDIR=/usr/share/locale
export OUTPUT_CHARSET=UTF-8
# std localisation stanza
export TEXTDOMAIN=fatdog
. gettext.sh
TRANSLATE_CATEGORIES_AND_PACKAGE_DESCIPTIONS=/usr/share/locale/${LC_MESSAGES}/translate
# performance tweak - disable LC_MESSAGES unless there is localisation, makes it faster
#! [ -e $TEXTDOMAINDIR/${LC_MESSAGES%.*}/LC_MESSAGES/$TEXTDOMAIN.po ] &&
#unset LC_MESSAGES # disable translation and make things go really really faster
#LANG=C # make bash run faster
[ "${LANG%_*}" = "en" ] && LANG=C # make bash run faster
### configuration
APPTITLE="$(gettext 'Fatdog64 Package Manager')"
Oops! Ok will remove it.L18L wrote:Why? Translations have to go into langpackFatdog only.jamesbond wrote:desktop file for package-manager committed
Yes, that's the line.You mean just the linejamesbond wrote:fatdog-control-panel.sh committed (with changes, I took the stanza from FPM as the one you provided didn't work ${VARy} is bash-only and fatdog-control-panel uses ash).? It is running in my Fatdog installationCode: Select all
[ "${LANG:0:2}" = "en" ] && LANG=C # because it is faster
No that's my mistake - the code actually works under 'ash' (!) I would have expected it *not* to work because that syntax belongs to bash, not ash (if you look at http://linux.die.net/man/1/ash you can't find it; and in fact if you try it with a plain 'dash' it won't work). It actually works in 'ash' because I enabled some "bash-compatible" syntax when I built ash (which is part of busybox). The problem with "some" is that you'll never know which ones work and which ones don't unless you test for them. Plus different version of busybox tend to have different ideas of how much "bash-compatibility" it can support.It is difficult for me to reproduce your not working situation.
Here: http://www.ibiblio.org/fatdogscm/cgi-bi ... i/timeline (login first as anonymous).Where can I download your committed things?
I didn't know it is a name, I thought it is a literal translation of "Fat" "Dog"Hmh... namesshould not be translated, translated back it isjamesbond wrote:PS: "DickerHund" ("Thick Dog") - I like that
)
Okay I will take this, but I still want to revert to "C" if langpack isn't installed even though the locale isn't "en".Code: Select all
[ "${LANG%_*}" = "en" ] && LANG=C # make bash run faster
EDIT: Here's the new stanza looks like:
Code: Select all
# std localisation stanza
[ -z $TEXTDOMAINDIR ] && export TEXTDOMAINDIR=/usr/share/locale
[ -z $TEXTDOMAIN ] && export TEXTDOMAIN=fatdog
. gettext.sh
# performance tweak - use "C" if language is "en" and there is no localisation
[ "${LANG%_*}" = "en" ] && LANG=C
! [ -e $TEXTDOMAINDIR/${LANG%.*}/LC_MESSAGES/$TEXTDOMAIN.mo ] &&
! [ -e $TEXTDOMAINDIR/${LANG%_*}/LC_MESSAGES/$TEXTDOMAIN.mo ] && LANG=C
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Internationalization of Fatdog
Thanks, I will login and look in.jamesbond wrote:Here: http://www.ibiblio.org/fatdogscm/cgi-bi ... i/timeline (login first as anonymous).
You are right. It is not a name. It is the brand of a GNU/Linux distribution.jamesbond wrote:I didn't know it is a name, I thought it is a literal translation of "Fat" "Dog"
One or the other but not both please.jamesbond wrote:Okay I will take this, but I still want to revert to "C" if langpack isn't installed even though the locale isn't "en".Code: Select all
[ "${LANG%_*}" = "en" ] && LANG=C # make bash run faster
Let us retain the option of using translations for en_AUS or en_GB and forget [ "${LANG%_*}" = "en" ] && LANG=C.
Here is mine:jamesbond wrote:EDIT: Here's the new stanza looks like:Code: Select all
# std localisation stanza.....
Code: Select all
export TEXTDOMAIN=fatdog
# std localisation stanza
. gettext.sh
! [ -e $TEXTDOMAINDIR/${LANG%.*}/LC_MESSAGES/$TEXTDOMAIN.mo ] &&
! [ -e $TEXTDOMAINDIR/${LANG%_*}/LC_MESSAGES/$TEXTDOMAIN.mo ] && LANG=C
Note
Code: Select all
[ -z $TEXTDOMAIN ] && export TEXTDOMAIN=fatdog
- momanager to not recognize the script as using gettext translations
- TEXTDOMAIN becoming unchangeable.
_______________________
Puppy user since 1.04
Last edited by L18L on Mon 13 Jan 2014, 13:17, edited 2 times in total.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Internationalization of Fatdog
The tree view of language>country>locale is excellent.
Much simpler to use than with puppy where it is always difficult (for old geezers at least) to choose the locale from a very long list.
Even better would it be when fatdog-choose-locale.sh displays names of language in the language of language. ex: Deutsch not German, Suomi not Finnish, Pycckuu not Russian,.......
It is possible, I have been trying but without success.
/usr/share/i18n/locales/<locale> does contain lang_nameSort by this lang_name and the Non-English world will be happy.
One and only problem I see is some east Asian languages will not be rendered...
We can live with this if this lang_name is additional to (English) name (or insert Asian font or a graphic )
EDIT: problem SOLVED, see http://www.murga-linux.com/puppy/viewto ... 1&start=41
Much simpler to use than with puppy where it is always difficult (for old geezers at least) to choose the locale from a very long list.
Even better would it be when fatdog-choose-locale.sh displays names of language in the language of language. ex: Deutsch not German, Suomi not Finnish, Pycckuu not Russian,.......
It is possible, I have been trying but without success.
/usr/share/i18n/locales/<locale> does contain lang_name
Code: Select all
lang_name="`grep lang_name /usr/share/i18n/locales/de_DE`";lang_name=${lang_name#*\"}
lang_name=${lang_name//>}
lang_name=${lang_name//</\\}
printf "$lang_name"
Deutsch"
One and only problem I see is some east Asian languages will not be rendered...
We can live with this if this lang_name is additional to (English) name (or insert Asian font or a graphic )
EDIT: problem SOLVED, see http://www.murga-linux.com/puppy/viewto ... 1&start=41
Last edited by L18L on Wed 29 Jan 2014, 15:15, edited 2 times in total.
Agreed and done.One or the other but not both please.
Let us retain the option of using translations for en_AUS or en_GB and forget [ "${LANG%_*}" = "en" ] && LANG=C.
Why does it have to be exported? Why wouldn't TEXTDOMAIN=fatdog suffice?Here is mine:Code: Select all
export TEXTDOMAIN=fatdog
Agreed and done.Note: no TEXTDOMAINDIR as it is now should be set in /etc/profile and is available for all to use.
Note
Code: Select all
[ -z $TEXTDOMAIN ] && export TEXTDOMAIN=fatdog
On the contrary it means you can export TEXTDOMAIN=xxx before you launch the app and the app will use that "xxx" as the text-domain instead "fatdog". The question is, whether this is valuable enough functionality to justify modifying momanager for recognise it?- TEXTDOMAIN becoming unchangeable.
As above.- momanager to not recognize the script as using gettext translations
I will look into choose-locale later ...
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Internationalization of Fatdog
For a very short moment I have been attempted to answer "because we have always exported the TEXTDOMAIN" but let us prove it right now.jamesbond wrote:Why does it have to be exported? Why wouldn't TEXTDOMAIN=fatdog suffice?
My /usr/share/locale/de/LC_MESSAGES/fatdog.mo has content:
Code: Select all
msgid "Description"
msgstr "Beschreibung"
msgfmt <this po file> -o - > /usr/share/locale/en_AUS/LC_MESSAGES/fatdog.mo)
Hope that helps to understand (not why but that export is needed)my Terminal wrote:# gettext "Description"
Description#
#
# gettext "fatdog" "Description"
Beschreibung#
#
# TEXTDOMAIN=fatdog gettext "Description"
Beschreibung#
#
# TEXTDOMAIN=fatdog
# gettext "Description"
Description#
#
# export TEXTDOMAIN=fatdog
# gettext "Description"
Beschreibung#
#
# echo $TEXTDOMAINDIR
#
#
...and see that /usr/share/locale is used if TEXTDOMAINDIR is not set
gtk server needs it to be set.
Yes, thanks for that L18L. I was being extremely silly - I forgot that in scripts "gettext" is another application, not a C function linked into the main executable (in which case it doesn't need to be exported). Same reason for gtk-server.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
No worries.
So - what do you think of this:
So - what do you think of this:
jamesbond wrote:NotecausesCode: Select all
[ -z $TEXTDOMAIN ] && export TEXTDOMAIN=fatdog
On the contrary it means you can export TEXTDOMAIN=xxx before you launch the app and the app will use that "xxx" as the text-domain instead "fatdog". The question is, whether this is valuable enough functionality to justify modifying momanager for recognise it?- TEXTDOMAIN becoming unchangeable.As above.- momanager to not recognize the script as using gettext translations
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
momanager uses find '^export TEXTDOMAIN='jamesbond wrote:So - what do you think of this:jamesbond wrote:NotecausesCode: Select all
[ -z $TEXTDOMAIN ] && export TEXTDOMAIN=fatdog
On the contrary it means you can export TEXTDOMAIN=xxx before you launch the app and the app will use that "xxx" as the text-domain instead "fatdog". The question is, whether this is valuable enough functionality to justify modifying momanager for recognise it?- TEXTDOMAIN becoming unchangeable.As above.- momanager to not recognize the script as using gettext translations
The app needs a TEXTDOMAIN defined by the developer.
An app could use more than one TEXTDOMAINs.
If we had NOT defined the TEXTDOMAIN inside the script we would need an additional file containing all the scripts that use a TEXTDOMAIN.
I cannot see any good reason to export TEXTDOMAIN before launching the app.
That's all for now.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Internationalization of Fatdog
Code: Select all
#!/bin/sh
# fhelp is fatdog's internationalized help
# each language in their own subdirectory linked back to original
#
# Austrian help starts at /usr/share/doc/help/de_AT/home.htm (if any)
# German help starts at /usr/share/doc/help/de/home.htm (if any)
# English help starts at /usr/share/doc/home.htm
#
for i in help/${LANG%.*}/ help/${LANG%_*}/ ""
do
h_file=/usr/share/doc/${i}home.htm
[ -f $h_file ] && break
done
#echo $h_file
defaulthtmlviewer file://$h_file
@jamesbond
take it and change menu entry for help to "fhelp" please.
I have made translations directly in text editor geany:
Some notes, howto create these translations will follow. EDIT: done... see 9 posts down
- Attachments
-
- faq.png
- (12.81 KiB) Downloaded 1031 times
-
- help_de_1.tar.gz
- see image for content
- (5.96 KiB) Downloaded 571 times
Last edited by L18L on Mon 20 Jan 2014, 14:33, edited 2 times in total.