Page 1 of 2

pClock language support

Posted: Mon 23 Jul 2012, 17:54
by zigbert
_______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

pClock language support

Posted: Tue 24 Jul 2012, 12:28
by L18L
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>

Posted: Tue 24 Jul 2012, 13:04
by zigbert
Yes 'Quit' could be grabbed from gtk (as the Ok/Cancel buttons). Preferences would need to be translated anyway.
Image

Regarding gettext, I have not seen enough advantages to bother...


Sigmund

Posted: Tue 24 Jul 2012, 13:42
by L18L
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

pClock language support

Posted: Tue 24 Jul 2012, 14:07
by L18L
You can translate using
momanager
available here:
http://bkhome.org/blog/?viewDetailed=02751

Posted: Tue 24 Jul 2012, 18:33
by zigbert
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

Posted: Tue 24 Jul 2012, 19:16
by L18L
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

Posted: Tue 24 Jul 2012, 19:18
by zigbert
What does this mean

Code: Select all

export TEXTDOMAIN=pclock

Posted: Tue 24 Jul 2012, 19:26
by L18L
zigbert wrote:What does this mean

Code: Select all

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>.
#

Posted: Tue 24 Jul 2012, 20:26
by zigbert
L18L
Thank you for the explanation.


Sigmund

Posted: Tue 24 Jul 2012, 20:41
by zigbert
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: Select all

#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 :oops:
Pclock runs fine - but in english

pclock

Posted: Wed 25 Jul 2012, 09:13
by L18L
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
#

Code: Select all

LANG=de_DE pclock
see picture, same as with you: I do not have a locale de_DE
so fallback to C

but

Code: Select all

LANGUAGE=de_DE pclock 
or simply

Code: Select all

LANGUAGE=de pclock 
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/man ... iable.html

Of course you will not get gtk stock item texts because you don´t have german gtk20.mo

So try

Code: Select all

LANGUAGE=de pclock
please.


------

In 1st post a link back to pclock-0.4 could be useful for people who like to translate and not know pclock :wink:

Posted: Wed 25 Jul 2012, 17:03
by zigbert
L18L
Thank you for spreading your knowledge. It works as expected now.

Link to pClock is added in main post.


Sigmund

Russian translation

Posted: Wed 25 Jul 2012, 20:52
by rodin.s
Russian translation made in momanager after installing pClock pet (distro: Racy-5.3).

Posted: Wed 25 Jul 2012, 21:18
by zigbert
Russian added


Thank you
Sigmund

Posted: Wed 25 Jul 2012, 21:20
by zigbert
Version 0.5 does not include any new NLS variables, but for later:
Would there be any reason for keeping track of a NLS changelog when using gettext?


Sigmund

Posted: Thu 26 Jul 2012, 09:52
by L18L
For later:

momanager (msgmerge exactly) will
- comment out the msgid/msgstr which is no more actual
- create the actual msgid and try to find a translation from all the others, this will be marked as "fuzzy"
The translator will have to check all empty msgstrs and all that that are marked "fuzzy"

No more used translation may stay for users that are using older version
The worst case is just: get a not translated message.

So I don´t think a changelog is necessary. for now
and in every case you will be helped by rodin.s and/or me.

---

I did not look into version 5 yet but I want to make a suggestion for improvement:
using Fullscreen I did not know how to come back, a warning before would have been helpful.

----
edit
I had forgotten the term "Fullscreen" so it was very useful to launch

Code: Select all

LANGUAGE=en pclock

Posted: Thu 26 Jul 2012, 10:44
by zigbert
There is a close button in fullscreen mode.

Image

Posted: Thu 26 Jul 2012, 10:46
by zigbert
Thank you for the explanation!!!


Sigmund

Posted: Thu 26 Jul 2012, 11:23
by L18L
zigbert wrote:There is a close button in fullscreen mode.
I have seen it now, thank you.

But my clock is not running in fullscreen, it is just a picture. :cry: