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 Fri 24 Oct 2014, 13:00
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Pcreole Language Support
Moderators: Lobster, MU, raffy
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count_1  
Author Message
mcewanw

Joined: 16 Aug 2007
Posts: 2346
Location: New Zealand

PostPosted: Sat 21 May 2011, 20:41    Post_subject:  Pcreole Language Support  

Pcreole Language Support

English - Native
German - L18L (real name currently unknown...:-)

You can download Pcreole and its current translation dotpets here

Many thanks to the translator(s). Especial thanks to L18L who helped me invaluably with my wishes to internationalise Pcreole, and to shinobar, who unwittingly helped me in that regard with his ffconvert implementation, which also uses gettext.

New translations invited! Some help on how to do this is provided below. I would be grateful if you could post your translations at the end of this thread (either as dotpets which place the .po and .mo files into the directories indicated below, of simply as the files themselves from which I or someone else, will create a dotpet to ease installation with the Petget package manager). I will later store the download copy of your translation dotpets at the main Pcreole thread/post here.


ABOUT NLS

Pcreole is internationalised using gettext to display all programme text and labels. The Pcreole bash script exports the following three variables into its environment to allow this all to work (note that translators don't need to do this bit since it is part of the Pcreole programme itself):

Code:

export TEXTDOMAIN=pcreole
export TEXTDOMAINDIR=/usr/share/locale
export OUTPUT_CHARSET=UTF-8


The gettext strings embedded in the Pcreole programme script have all been collected and stored in a separate text file called pcreole.pot, which pcreole-x.x.x.pet installs into the directory /usr/share/doc/pcreole/nls/. If you have the DEVX sfs added to your Puppy system, you can alternatively make a new pot file of your own for pcreole by running the command:

Code:
xgettext --lang=shell -o pcreole.pot /usr/bin/pcreole


You can then store the resultant pcreole.pot file in directory /usr/share/doc/pcreole/nls/

Next step is to create the .po text translation file from the .pot file. You can do that by running the following command line:

Code:
msginit --locale=your_locale --output-file=your_locale.po --input=pcreole.pot


where "your_locale" might be, for example, de, ru_RU, zh_CN, fr, it or whatever...

Now edit your_locale.po file using your favourite text editor to add the new "msgstr" translations (or better still, use an editor like Poedit, which is specially designed for this task). For an example, if you have L18L's pcreole German translation installed, you can refer to the file /usr/share/doc/pcreole/nls/de.po

You should also store your "your_locale.po" translation in the directory /usr/share/doc/pcreole/nls/

Next you need to create the binary pcreole.mo file from the your_locale.po file. You can do that with the following commandline:

Code:
msgfmt --check --output-file=pcreole.mo your_locale.po


Finally, store the resultant pcreole.mo file in the directory /usr/share/locale/your_locale/LC_MESSAGES/ and if you set your system locale to "your_locale" Pcreole should now provide all its text in your language.

One way of checking that everything is working, without having to change locale first, is to start pcreole from the commandline with the following command:

Code:
LANGUAGE=your_locale pcreole


For example:
Code:
LANGUAGE=de pcreole


Here is a screenshot (courtesy of L18L) which shows Pcreole-3.0.0 running, in small gui mode, with LANGUAGE=de (German):


_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count_1  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0467s ][ Queries: 12 (0.0032s) ][ GZIP on ]