Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 31 Jul 2014, 22:04
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects » Localization Project
pClock language support
Moderators: Lobster, MU, raffy
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [23 Posts]   Goto page: 1, 2 Next
Author Message
zigbert


Joined: 29 Mar 2006
Posts: 5651
Location: Valåmoen, Norway

PostPosted: Mon 23 Jul 2012, 13:54    Post subject:  pClock language support  

_______pClock language support__________________________________


English - Native
German - Lutz-Ulrich Ringel (L18L) (0.6)
Russian - Sergey Rodin (rodin.s) (0.6)


Download
username: puppy
password: linux

pclock_NLS.pet


You can translate using
momanager
available here:
http://bkhome.org/blog/?viewDetailed=02751

pClock main page

_________________
Stardust resources

Last edited by zigbert on Sun 26 Aug 2012, 15:18; edited 9 times in total
Back to top
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: 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>
translated_by_gtk20.png
 Description   "Preferences" and "Quit"
translated by
/usr/share/locale/de/LC_MESSAGES/gtk20.mo
 Filesize   112.3 KB
 Viewed   573 Time(s)

translated_by_gtk20.png

Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5651
Location: Valåmoen, Norway

PostPosted: 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
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: 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
pclock_gettexted.png
 Description   running english and german
 Filesize   30.07 KB
 Viewed   545 Time(s)

pclock_gettexted.png

Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: 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
momanaging_pclock.png
 Description   
 Filesize   52.42 KB
 Viewed   557 Time(s)

momanaging_pclock.png

pclock_gettexted.gz
Description  save as
/usr/sbin/pclock
gz

 Download 
Filename  pclock_gettexted.gz 
Filesize  38.7 KB 
Downloaded  398 Time(s) 
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5651
Location: Valåmoen, Norway

PostPosted: Tue 24 Jul 2012, 14:33    Post subject:  

L18L
I have no interest in translating - I am a gui-maker Smile

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
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: 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
MoManager-de_DE-pclock-0.3-1.tar.gz
Description 
gz

 Download 
Filename  MoManager-de_DE-pclock-0.3-1.tar.gz 
Filesize  1.57 KB 
Downloaded  330 Time(s) 

Last edited by L18L on Tue 24 Jul 2012, 15:31; edited 1 time in total
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5651
Location: Valåmoen, Norway

PostPosted: Tue 24 Jul 2012, 15:18    Post subject:  

What does this mean
Code:

export TEXTDOMAIN=pclock

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: 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
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5651
Location: Valåmoen, Norway

PostPosted: Tue 24 Jul 2012, 16:26    Post subject:  

L18L
Thank you for the explanation.


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5651
Location: Valåmoen, Norway

PostPosted: 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 Embarassed
Pclock runs fine - but in english

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: 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
#

Code:
LANG=de_DE pclock

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
Code:
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/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
Code:
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
launching_with_LANGUAGE.png
 Description   
 Filesize   33.87 KB
 Viewed   502 Time(s)

launching_with_LANGUAGE.png

Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5651
Location: Valåmoen, Norway

PostPosted: 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
View user's profile Send private message Visit poster's website 
rodin.s

Joined: 22 Sep 2010
Posts: 338
Location: Ukraine

PostPosted: Wed 25 Jul 2012, 16:52    Post subject: Russian translation  

Russian translation made in momanager after installing pClock pet (distro: Racy-5.3).
MoManager-ru_UA-pclock-0.4.tar.gz
Description  Russian translation
gz

 Download 
Filename  MoManager-ru_UA-pclock-0.4.tar.gz 
Filesize  1.97 KB 
Downloaded  338 Time(s) 
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5651
Location: Valåmoen, Norway

PostPosted: Wed 25 Jul 2012, 17:18    Post subject:  

Russian added


Thank you
Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 2 [23 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0836s ][ Queries: 13 (0.0045s) ][ GZIP on ]