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 Wed 22 Oct 2014, 04:49
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Documents
Pcreole programmable application + nme (creole converter)
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 3 of 4 Posts_count   Goto page: Previous 1, 2, 3, 4 Next
Author Message
L18L

Joined: 19 Jun 2010
Posts: 2525
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Wed 11 May 2011, 06:09    Post_subject: pcreole
Sub_title: internationalization
 

I am thinking our trial and errors might serve as a good example for other users. Smile

Back to subject.
If you run pcreole without arguments (LANGUAGE=de ./pcreole) you see all terms that are gettexted by you display nicely in German. (Not sure whether my German is nice but that is another question).

So you can continue to gettext every string that will show up in GUI.
There are some comments in de.po stuff for further discussion but
I don't want to slow down your further development of pcreole too much.

Edited: my programming experiences:
COBOL, Fortran, DATA (Philipps/Motorola Midi computer), TI99/4A Extended Basic, Sinclair QL ..., php, bash, BaCon
No C (except for internationalization)

Edited_times_total
Back to top
View user's profile Send_private_message 
mcewanw

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

PostPosted: Wed 11 May 2011, 07:10    Post_subject: Re: pcreole
Sub_title: internationalization
 

L18L wrote:

If you run pcreole without arguments (LANGUAGE=de ./pcreole) you see all terms that are gettexted by you display nicely in German.

There are some comments in de.po stuff for further discussion.


I see. Yes, that seems to work fine. Sorry, that I haven't replied before, but I have a lot going on here at the moment. However, I'll try and examine your de.po comments tomorrow, or the next day if I run out of time, and get back to you. All going well, once I'm sure I understand where to store the .po files and so on, I'll package this one up and upload it.

Further developments to pcreole will probably not come for a while, because I'm needing to use it for some website development work I'm doing. I would also like to amend Precord to use gettext, after which any contributions to the translation work for that would be useful.

_________________
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 
mcewanw

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

PostPosted: Wed 11 May 2011, 21:59    Post_subject: Re: pcreole
Sub_title: internationalization
 

L18L wrote:

There are some comments in de.po stuff for further discussion but
I don't want to slow down your further development of pcreole too much.


Code:

#: Couldn't we just display the entered value ???
#: pcreole:597
msgid ""
"Save pcreole configuration file to target /path/filename entered in TMP_"


Your above suggestion is how I had things in earlier test versions of Pcreole. Unfortunately, gtkdialog keeps the old entry box (even after putting in a new entry) unless the dialog is refreshed. I didn't like doing that since it was too slow redrawing the dialog for me (and it needed more code anyway), hence I'm sticking with the generic message.

Code:

#: Or "Click to unselect....." ???????????????
#: pcreole:803 pcreole:868 pcreole:933 pcreole:998 pcreole:1063 pcreole:1128
msgid "Click to select this command to run:"


Of course, clicking the checkbox is a really a toggle (select/deselect) action, but the existing english text is what I prefer.
----

During the original creation of Pcreole, I also considered taking chunks of any duplicated text and declaring them in variables at the start of the Program, but I decided against such refactoring (though I might, or might not, reconsider that later). Hence, I'm not using T_source etc for now.

I have now created a .pot file from what was pcreole-2.0.3 (with the three header lines you told me about L18L), made the de.po and altered that with your translations before making the .mo.

I have now put all the bits and pieces into the appropriate places in /usr/share hierarchy and am in the process of uploading a new pcreole-2.0.4. The main thing thing missing, which I particularly want to add in my next pcreole release will be some code changes to pcreole itself to allow internationalisation of the Help button textfile, various gtkdialog frame labels, and the gtkdialog title window text (all of which currently remain only in english). I'm working on that now.

@L18L: Note I would be happy if you could just provide me with any text and label translations for the moment rather than modify the program itself, since it is much easier for me just to add to your translation file after creating the original .pot file myself now. Once the code is more stable, I will invite others to contribute .po/.mo files for different languages based on the pcreole.pot I will supply with the main dotpet distribution. Thanks for all your invaluable help, which, on top of what I had already read in work by shinobar and from the web, and your link to Barry's related blog, got things going very quickly.

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.

Edited_times_total
Back to top
View user's profile Send_private_message Visit_website 
mcewanw

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

PostPosted: Wed 11 May 2011, 22:43    Post_subject: Pcreole version 2.0.4 uploaded
Sub_title: Now with partial internationalisation support
 

Now with partial internationalisation support (thanks to L18L, and, indirectly... shinobar, for help with that)

To add your own translation files (e.g. for different languages) please refer to the installed file: /usr/share/doc/pcreole/pcreole.txt

and to Barry's nice article on using gettext for internationalisation at:

http://bkhome.org/bacon/international.htm

Much of Barry's info being relevant not only for BACON
----

Changes:
Pcreole 2.0.4:
Added necessary header lines in code below to allow internationalisation with gettext to work (Thanks L18L for the information):
Code:

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

Created a new pcreole.pot, used the translation work of L18L with that to create de.po and pcreole.mo files, and put these in their appropriate places in the /usr/share directory hierarchy.

TO DO:
More on Internationalisation. In particular:
Add gettext routine and translation(s) for
the main Pcreole helpfile: $HOME/.pcreole/pcreolehelp.txt
Gtkdialog window titles and frame labels etc...

_________________
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 
mcewanw

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

PostPosted: Thu 12 May 2011, 02:44    Post_subject:  

In my "being-tested" pcreole version 2.0.5 I now have gettext used on all the frame labels and the gtkdialog title windows... coming soon. Just the Help button text to deal with. Pcreole is, I feel, a bit slower to load with all these gettext calls, but that's the price of supporting the world's languages I suppose... :-)
_________________
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 
L18L

Joined: 19 Jun 2010
Posts: 2525
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Thu 12 May 2011, 07:23    Post_subject: Re: pcreole
Sub_title: internationalization
 

mcewanw wrote:
Once the code is more stable, I will invite others to contribute .po/.mo files for different languages based on the pcreole.pot I will supply with the main dotpet distribution.

Okay, that's the way to go.

And I am now going to download 2.0.4 Smile

Quote:
Proceed, proceed: wee'l begin these rights,

As we do trust, they'l end in true delights.

Shakespeare
now available as etext see http://murga-linux.com/puppy/viewtopic.php?p=521993
Back to top
View user's profile Send_private_message 
mcewanw

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

PostPosted: Sun 15 May 2011, 03:47    Post_subject: Pcreole 2.0.5 uploaded
Sub_title: Fully internationalised. Translations now invited!
 

Recent Changes:
Pcreole 2.0.5:
Finished the 2.0.4 TODOs!

Internationalisation support now complete I think (including the Help button text ready for translation)! Hopefully people will now upload their own tarred up translation files(po and mo files from the included pcreole.pot).

Please do that, and I'll later include these in a single separate dotpet along with the main pcreol dotpet on the first post of this thread.

You'll find pcreole.pot (once you install pcreole) in directory:

/usr/share/doc/pcreole/nls

I'm assuming you know how to create the .po and .mo files from pcreole.pot. If not refer to near to the top of the first post of this thread for some links about doing that.

@L18L: I have included a de.po and associated .mo in the pcreole dotpet, but the translation in there remains incomplete (just needs you or someone else fluent in German to fill in the missing de.po translations etc). For now, it just uses the strings you have translated so far, and I'd be grateful if you'd also add to that and upload the new de.po and associated mo in a tar file for everyone to use. Thanks in advance. Note that the included de.po does contain the pcreole main help text, but currently in english awaiting a translator! :-)

_________________
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 
L18L

Joined: 19 Jun 2010
Posts: 2525
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Tue 17 May 2011, 15:59    Post_subject: Re: Pcreole 2.0.5 uploaded
Sub_title: Fully internationalised. location of translation file
 

mcewanw wrote:
You'll find pcreole.pot (once you install pcreole) in directory:

/usr/share/doc/pcreole/nls

Found it.
May a suggest a better location for this?

/usr/share/doc/nls/pcreole
There is a chance that other interested translators will find it independent of this thread.

Updated translation is coming soon...

Edited:
en.po is superredundant:
gettext uses the strings in the script if no pcreole.mo exists.
gettext uses msgid if msgstr is ""

Translation of HELP text ! I have just changed some words to see if that works. Seems to work...........

That is your trick. Where did you learn it from?
Back to top
View user's profile Send_private_message 
mcewanw

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

PostPosted: Tue 17 May 2011, 19:27    Post_subject: Re: Pcreole 2.0.5 uploaded
Sub_title: Fully internationalised. location of translation file
 

L18L wrote:

/usr/share/doc/pcreole/nls

Found it.
May a suggest a better location for this?

/usr/share/doc/nls/pcreole
There is a chance that other interested translators will find it independent of this thread.

Updated translation is coming soon...

Edited:
en.po is superredundant:
gettext uses the strings in the script if no pcreole.mo exists.
gettext uses msgid if msgstr is ""

Translation of HELP text ! I have just changed some words to see if that works. Seems to work...........

That is your trick. Where did you learn it from?[/quote]

Yes, I take your point about location of the pot file. I kept to the system used by ffconvert at the moment. As pcreole develops I may want to add other stuff in the /usr/share/doc/pcreole hierarchy so for now I'll leave things as they are.

Yes en.po is "almost" redundant, (I could cut much f it) but not completely so because of the way I'm doing the helptext file. I didn't learn the "trick" from anywhere, it just came to me as a way to handle the helptext file without having to add make many changes or add the english version in Pcreole itself.

Looking forward to your translation which I'll post as a dotpet addition in first post. To keep the install size small I'll probably keep any and all translation (po, mo addons) as separate dotpets. Then a user will only have to install the language file they need or want.

_________________
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 
L18L

Joined: 19 Jun 2010
Posts: 2525
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Fri 20 May 2011, 04:36    Post_subject: Re: Pcreole 2.0.5 uploaded
Sub_title: Fully internationalised. location of translation file
 

mcewanw wrote:
...
I kept to the system used by ffconvert at the moment. As pcreole develops I may want to add other stuff in the /usr/share/doc/pcreole hierarchy so for now I'll leave things as they are.

Yes en.po is "almost" redundant, (I could cut much f it) but not completely so because of the way I'm doing the helptext file. I didn't learn the "trick" from anywhere, it just came to me as a way to handle the helptext file without having to add make many changes or add the english version in Pcreole itself.

Looking forward to your translation which I'll post as a dotpet addition in first post. To keep the install size small I'll probably keep any and all translation (po, mo addons) as separate dotpets. Then a user will only have to install the language file they need or want.

Rethinking about location...
/usr/share/doc/nls seems to be specific to multilingual wary
and
/usr/share/doc/pcreole seems to be standard with unix/linux
so leave things as they are. Smile

helptext English
So /usr/share/locale/en/LC_MESSAGES/pcreole.mo has to be included in the standard pcreole.pet (you could delete line 19 to 307 to get smaller files)

German translation is attached.
It does not claim to be perfect so anyone who can improve it is invited to contribute a better translation.
I think it is just the pcreole.mo which have to be included into pcreole_NLS.pet
Installing by PPM one can use "trim the fat" to get just the languages that one wishes to get.

Edit
download 5 times now
I replace the attachment now having correct location for de.po (see next post) soory, that was my fault Embarassed
pcreole-german.tar.gz
Description  /usr/share/doc/pcreole/nls/de.po
/usr/share/locale/de/LC_MESSAGES/pcreole.mo
gz

 Download 
Filename  pcreole-german.tar.gz 
Filesize  11.34 KB 
Downloaded  270 Time(s) 

Edited_times_total
Back to top
View user's profile Send_private_message 
mcewanw

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

PostPosted: Fri 20 May 2011, 18:58    Post_subject:  

@Li1L: I repackaged your translation files into a separate dotpet which is now available in the second post of this thread along with an invitation for further translations from anyone able to help with that. Note that, in the dotpet, I moved your de.po file to /usr/share/doc/pcreole/nls/ from the location you had it inside your tar.gz (/usr/share/doc/nls). I'd be obliged if you would modify your tar.gz accordingly or delete that one.

Thanks greatly for all your efforts and for your translation, which will be very useful I'm sure.

_________________
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 
mcewanw

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

PostPosted: Fri 20 May 2011, 19:25    Post_subject: Pcreole version 2.0.6 uploaded  

Changes very minor (no new functionality). As detailed in first post of this thread.

However, L18L has now completed and generously provided a full German translation for the pcreole interface and Help text. Refer to second post of this thread for the dotpet to add that. Invitations for further translations and some help links on doing that are provided there.

Pcreole should work on most any Puppy Linux from Puppy 2 series upwards at least. I'd be grateful for quick confirmations of which distributions it has been successfully run on since I only have dialup Internet and can only test it on what I have (Wary 5.0 and Puppy 4.3.1 and Puppy 2.17)

_________________
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 
mcewanw

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

PostPosted: Fri 20 May 2011, 22:45    Post_subject: Pcreole version 3.0.0 also uploaded today
Sub_title: Same functionality, but provides an alternative small interface
 

Pcreole version 3.0.0 also uploaded today

I didn't find the small interface option provided in Pcreole 2.0.x useful for my purposes. Pcreole 3.0.0 is identical in funtionality to 2.0.6 (including it working with the L18L provided German interface translation dotpet). However, the shrink window "small gui" has been re-designed to a form which is useful to myself at least. You have the choice...

An advantage of choosing to use the "shrinked gui" in either 2.0.6 and 3.0.0 is that Pcreole will start faster in that mode (albeit with less configuration options being immediately compared to either of these versions' Config/Large "GUI mode").

The shrinked "GUI mode" of either also uses less screen real-estate than the full Config/Large GUI of course.

Whichever version you prefer, Pcreole has been designed to be usable on any screen resolution of width 640 pixels and above.

_________________
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 
L18L

Joined: 19 Jun 2010
Posts: 2525
Location: Moved from Hosla to www.eussenheim.de

PostPosted: Sat 21 May 2011, 05:25    Post_subject: Re: Pcreole version 3.0.0 also uploaded today
Sub_title: Same functionality, but provides an alternative small interface
 

mcewanw wrote:
...
The shrinked "GUI mode" of either also uses less screen real-estate than the full Config/Large GUI of course.

Whichever version you prefer, Pcreole has been designed to be usable on any screen resolution of width 640 pixels and above.

Here is how the new shrinked GUI looks, localized: Smile


BTW:
- corrected my mistake three posts above
- missing Sections B, C, ... in help
- opening a thread in Localization Project might be helpful ?
Back to top
View user's profile Send_private_message 
mcewanw

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

PostPosted: Sat 21 May 2011, 21:43    Post_subject: Re: Pcreole version 3.0.0 also uploaded today
Sub_title: Same functionality, but provides an alternative small interface
 

L18L wrote:

- opening a thread in Localization Project might be helpful ?


Done: http://www.murga-linux.com/puppy/viewtopic.php?p=525522

_________________
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 3 of 4 Posts_count   Goto page: Previous 1, 2, 3, 4 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Documents
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.1176s ][ Queries: 12 (0.0172s) ][ GZIP on ]