Author |
Message |
zigbert

Joined: 29 Mar 2006 Posts: 6572 Location: Valåmoen, Norway
|
Posted: Mon 23 Jul 2012, 13:54 Post subject:
pClock language support |
|
_______pClock language support__________________________________
English - Native
French - Jean-Jacques Moulinier (esmourguit) 0.8
German - Lutz-Ulrich Ringel (L18L) 0.6
Hungarian - Unknown 0.3.5
Italian - David Maria Galardi (xanad) 0.8
Polish - Robert Wojewódzki (robwoj44) 0.8
Russian - Sergey Rodin (rodin.s) 0.6
Download
username: puppy
password: linux
pclock_NLS.pet [Mirror]
You can translate using
momanager
available here:
http://bkhome.org/blog/?viewDetailed=02751
pClock main page
_________________ Stardust resources
Last edited by zigbert on Wed 13 Dec 2017, 13:53; edited 15 times in total
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3445 Location: www.eussenheim.de/
|
Posted: Tue 24 Jul 2012, 08:28 Post subject:
pClock language support Subject description: on the way to use gettext |
|
Without label of stock items gtk20 is translating, see picture
export pClock='
<window title="pClock">
<vbox>
<menubar>
<menu>
<menuitem stock="gtk-preferences">
<action>preferences</action>
</menuitem>
<menuitem label="'$(gettext "Set system time")'">
<action>system_time &</action>
</menuitem>
<menuitem label="'$(gettext "Set system time zone")'">
<action>countrywizard &</action>
</menuitem>
<menuitemseparator></menuitemseparator>
<menuitem stock="gtk-quit" >
<action>exit:EXIT</action>
</menuitem>
<label>'$(gettext "File")'</label>
</menu>
.
.
. <cut>
Description |
"Preferences" and "Quit" translated by /usr/share/locale/de/LC_MESSAGES/gtk20.mo |
Filesize |
112.3 KB |
Viewed |
966 Time(s) |

|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6572 Location: Valåmoen, Norway
|
Posted: Tue 24 Jul 2012, 09:04 Post subject:
|
|
Yes 'Quit' could be grabbed from gtk (as the Ok/Cancel buttons). Preferences would need to be translated anyway.
Regarding gettext, I have not seen enough advantages to bother...
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3445 Location: www.eussenheim.de/
|
Posted: Tue 24 Jul 2012, 09:42 Post subject:
|
|
zigbert wrote: | ...Regarding gettext, I have not seen enough advantages to bother... |
Don´t bother, I have just finished it.
Just a little testing...
Some advantages:
Maintaining should be easier
Translating using momanager is standard tool
You can run the program in different languages
Description |
running english and german |
Filesize |
30.07 KB |
Viewed |
837 Time(s) |

|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3445 Location: www.eussenheim.de/
|
Posted: Tue 24 Jul 2012, 10:07 Post subject:
pClock language support Subject description: pClock gettexted |
|
You can translate using
momanager
available here:
http://bkhome.org/blog/?viewDetailed=02751
Description |
|
Filesize |
52.42 KB |
Viewed |
888 Time(s) |

|
Description |
save as /usr/sbin/pclock
|

Download |
Filename |
pclock_gettexted.gz |
Filesize |
38.7 KB |
Downloaded |
953 Time(s) |
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6572 Location: Valåmoen, Norway
|
Posted: Tue 24 Jul 2012, 14:33 Post subject:
|
|
L18L
I have no interest in translating - I am a gui-maker
Please give me a .mo file (or is it .po - I know nothing about gettext) to include in the pclock_NLS.pet.
Thank you
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3445 Location: www.eussenheim.de/
|
Posted: Tue 24 Jul 2012, 15:16 Post subject:
|
|
Zigbert,
in another thread you wrote: | ...I have just put all this NLS on hold until things get settled in Puppy. Now when Barry has started the work on NLS, all I see is many different standards. I hoped that Puppy should use one (or a few) to standardize the handling of language files.... |
Here is german translation of pclock-03-1
packed by Barry`s momanager (the standard you have been hoping for)
All you have to do is take the gettexted version of pclock
Thank you
---
edited
it contains:
/usr/share/locale/de/LC_MESSAGES/pclock.mo
Description |
|

Download |
Filename |
MoManager-de_DE-pclock-0.3-1.tar.gz |
Filesize |
1.57 KB |
Downloaded |
798 Time(s) |
Last edited by L18L on Tue 24 Jul 2012, 15:31; edited 1 time in total
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6572 Location: Valåmoen, Norway
|
Posted: Tue 24 Jul 2012, 15:18 Post subject:
|
|
What does this mean
Code: |
export TEXTDOMAIN=pclock |
_________________ Stardust resources
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3445 Location: www.eussenheim.de/
|
Posted: Tue 24 Jul 2012, 15:26 Post subject:
|
|
zigbert wrote: | What does this mean
Code: |
export TEXTDOMAIN=pclock |
|
1: This means that the name of the translation file is pclock.mo
It is at /usr/share/locale/<LANGUAGE_CODE>/
2: momanager is searching in some directories for
export TEXTDOMAIN=
and handles everything, creation of pclock.pot and pclock.po....
TEXTDOMAIN must be the name of the executable script.
---
edit
# gettext --help wrote: | Usage: gettext [OPTION] [[TEXTDOMAIN] MSGID]
or: gettext [OPTION] -s [MSGID]...
Display native language translation of a textual message.
-d, --domain=TEXTDOMAIN retrieve translated messages from TEXTDOMAIN
-e enable expansion of some escape sequences
-E (ignored for compatibility)
-h, --help display this help and exit
-n suppress trailing newline
-V, --version display version information and exit
[TEXTDOMAIN] MSGID retrieve translated message corresponding
to MSGID from TEXTDOMAIN
If the TEXTDOMAIN parameter is not given, the domain is determined from the
environment variable TEXTDOMAIN. If the message catalog is not found in the
regular directory, another location can be specified with the environment
variable TEXTDOMAINDIR.
When used with the -s option the program behaves like the `echo' command.
But it does not simply copy its arguments to stdout. Instead those messages
found in the selected catalog are translated.
Standard search directory: /usr/share/locale
Report bugs to <bug-gnu-gettext@gnu.org>.
# |
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6572 Location: Valåmoen, Norway
|
Posted: Tue 24 Jul 2012, 16:26 Post subject:
|
|
L18L
Thank you for the explanation.
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6572 Location: Valåmoen, Norway
|
Posted: Tue 24 Jul 2012, 16:41 Post subject:
|
|
Ok, I tested the german pclock.mo file, but couldn't get any german translation. I placed the .mo file in /usr/share/locale/de/LC_MESSAGES/pclock.mo, and executed in a terminal:
Code: | #export LANG=de_DE; pclock
(process:11910): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
|
So, how does this actually works
Pclock runs fine - but in english
_________________ Stardust resources
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 3445 Location: www.eussenheim.de/
|
Posted: Wed 25 Jul 2012, 05:13 Post subject:
pclock Subject description: running with another language |
|
I have reproduced it and hope to make it clear for everyone.
My locales are:
# locale -a
C
de_DE.utf8
en_US
en_US.utf8
POSIX
#
see picture, same as with you: I do not have a locale de_DE
so fallback to C
but
Code: | LANGUAGE=de_DE pclock |
or simply
succeeds.
LANGUAGE is a system variable, you can define a list of languages that you understand, ex: no:de:fr for norwegian german french if you like it so.
http://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html
Of course you will not get gtk stock item texts because you don´t have german gtk20.mo
So try please.
------
In 1st post a link back to pclock-0.4 could be useful for people who like to translate and not know pclock
Description |
|
Filesize |
33.87 KB |
Viewed |
805 Time(s) |

|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6572 Location: Valåmoen, Norway
|
Posted: Wed 25 Jul 2012, 13:03 Post subject:
|
|
L18L
Thank you for spreading your knowledge. It works as expected now.
Link to pClock is added in main post.
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
rodin.s
Joined: 22 Sep 2010 Posts: 344 Location: Ukraine
|
Posted: Wed 25 Jul 2012, 16:52 Post subject:
Russian translation |
|
Russian translation made in momanager after installing pClock pet (distro: Racy-5.3).
Description |
Russian translation
|

Download |
Filename |
MoManager-ru_UA-pclock-0.4.tar.gz |
Filesize |
1.97 KB |
Downloaded |
804 Time(s) |
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6572 Location: Valåmoen, Norway
|
Posted: Wed 25 Jul 2012, 17:18 Post subject:
|
|
Russian added
Thank you
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
|