pClock language support

For efforts in internationalising Puppy and solving problems in this area
Message
Author
User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

pClock language support

#1 Post 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
Last edited by zigbert on Wed 13 Dec 2017, 17:53, edited 15 times in total.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

pClock language support

#2 Post 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>
Attachments
translated_by_gtk20.png
&quot;Preferences&quot; and &quot;Quit&quot;
translated by
/usr/share/locale/de/LC_MESSAGES/gtk20.mo
(112.3 KiB) Downloaded 1225 times

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#3 Post 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

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#4 Post 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
Attachments
pclock_gettexted.png
running english and german
(30.07 KiB) Downloaded 1089 times

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

pClock language support

#5 Post by L18L »

You can translate using
momanager
available here:
http://bkhome.org/blog/?viewDetailed=02751
Attachments
momanaging_pclock.png
(52.42 KiB) Downloaded 1131 times
pclock_gettexted.gz
save as
/usr/sbin/pclock
(38.7 KiB) Downloaded 1397 times

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#6 Post 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

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#7 Post 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
Attachments
MoManager-de_DE-pclock-0.3-1.tar.gz
(1.57 KiB) Downloaded 1268 times
Last edited by L18L on Tue 24 Jul 2012, 19:31, edited 1 time in total.

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#8 Post by zigbert »

What does this mean

Code: Select all

export TEXTDOMAIN=pclock

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

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

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#10 Post by zigbert »

L18L
Thank you for the explanation.


Sigmund

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#11 Post 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

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

pclock

#12 Post 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:
Attachments
launching_with_LANGUAGE.png
(33.87 KiB) Downloaded 1047 times

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#13 Post by zigbert »

L18L
Thank you for spreading your knowledge. It works as expected now.

Link to pClock is added in main post.


Sigmund

rodin.s
Posts: 344
Joined: Wed 22 Sep 2010, 19:50
Location: Ukraine

Russian translation

#14 Post by rodin.s »

Russian translation made in momanager after installing pClock pet (distro: Racy-5.3).
Attachments
MoManager-ru_UA-pclock-0.4.tar.gz
Russian translation
(1.97 KiB) Downloaded 1284 times

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#15 Post by zigbert »

Russian added


Thank you
Sigmund

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#16 Post 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

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#17 Post 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
Attachments
ru.png
One picture tells more than thousand words
(21.41 KiB) Downloaded 819 times

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#18 Post by zigbert »

There is a close button in fullscreen mode.

Image

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#19 Post by zigbert »

Thank you for the explanation!!!


Sigmund

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#20 Post 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:

Post Reply