Pcreole programmable application + nme (creole converter)

Word processors, spreadsheets, presentations, translation, etc.
Message
Author
mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Re: Pcreole 2.0.2 and nme-10.03.31r uploaded

#16 Post by mcewanw »

L18L wrote: Did you use bash? bash4 :?:
I developed Pcreole on pristine Puppy Wary 5.00, which uses bash 3:

Code: Select all

# bash --version
GNU bash, version 3.00.16(1)-release (i486-t2-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
You said you were trying Pcreole on is Puppy 511. Is that a Lupu or Wary or some other? Which bash --version does it use?

Though I've developed Pcreole using bash 3, I note from the bash 4.1 Reference at http://www.gnu.org/software/bash/manual/bashref.html
Functions may be exported so that subshells automatically have them defined with the -f option to the export builtin (see Bourne Shell Builtins).
which suggests the -f (as in my provided Pcreole) is required. Without the -f after the command "export" (for bash functions), Pcreole would indeed, I feel, not find the functions such as run () or do_cmd ().

It would be certainly good to find a solution to your problem and hear if anyone else has a duplicate issue. Perhaps you could investigate exporting a simple function in your version of bash to find out how to do that? With that information, fingers crossed, I could probably easily alter Pcreole to suit your system.
Last edited by mcewanw on Fri 06 May 2011, 19:56, edited 1 time in total.
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#17 Post by mcewanw »

[EDIT]. Probably not worth doing trying the following. I checked the bash 4 reference and using the word "function" remains optional and is allowed, so that should be causing any problem.

Previous message:

One thing that comes to mind is that I specifically add the word "function" to the function declarations, which is optional in bash 3 at least. I can't imagine that should cause a problem in bash 4, but you could try removing the word "function" from each declared function (but leave the -f in export) and see if that fixes your issue. I'll check the bash 4.1 ref manual about that.
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#18 Post by mcewanw »

I'm also wondering if your Linux is using the same version of gtkdialog3?

Puppy Wary 5 reports:

Code: Select all

# gtkdialog3 --version
gtkdialog version 0.7.20 (C) 2004, 2005, 2006, 2007 by Laszlo Pere
I'm using some complex quoting in Pcreole to make some of its tricks work with gtkdialog3, so if the gtkdialog version was different there might be problems (I wouldn't know though).
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#19 Post by mcewanw »

@L18L:

If that pcreole delta you posted doesn't actually "fix" your problem, I'd be grateful if you'd either remove it or change its description since I would want anyone messing up Pcreole on their systems by thinking the delta is required for correct functionality.

If the "delta" takes out the -f in the exported bash functions, I am pretty sure it will break Pcreole altogether and SHOULD NOT be used at all on successfully working Pcreole installations. I just don't want anyone to be confused about that.

On Puppy Wary 5 and Puppy 2.17, at least, Pcreole-2.0.2, as supplied as a dotpet in the first post of this thread, seems to work fine as per its design. I'd like to find a solution to the problems you are having though, so thanks for all your efforts.
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#20 Post by mcewanw »

It may well be that you need to use full bash rather than busybox sh. I'll edit the first line of Pcreole from#!/bin/sh to #!/bin/bash to reflect that next time I upload it. In Puppy Wary (and many other Puppy's) /bin/sh is simply a symbolic linkto /bin/bash.

@L18L: If you are still having a problem, you could try that simple change to the default installation (assuming you have bash on your system). You should similarly change the header line of the associated scripts: /usr/bin/nmecss and /usr/bin/pcnotes
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Pcreole 2.0.3 uploaded. Uses /bin/bash, not /bin/sh per se

#21 Post by mcewanw »

Pcreole provides a GUI frontend to pretty much ANY bash commandline. You don't need to use it for (wiki)creole mark-up at all (though you may find it very useful as a frontend to creole or txt2tags for that matter... That's one of the things I use it for). Also, you don't need to understand bash commandline at all really; you can just use the "pre-programmed" commandlines provided if you wish. Later on, should you learn bash, you can add to the commandline lists for your own purposes.

Everything tested (without error) on Wary 5 (frugal with pfix=ram), but I believe it should work on any recent Puppy (especially now that I've fixed the header line from #!/bin/sh to #!/bin/bash ...:-), and probably many earlier ones (for example, also tested on Puppy 2.17). Should be a trivial matter to port it to many other Linux distributions too (that's what I'm aiming towards).

Recent Changes:

Pcreole 2.0.3: Changed script header line to specifically use #!/bin/bash (rather than #!/bin/sh). Sorry, I should have done that before... (/bin/sh is a symbolic link to /bin/bash on Puppy Wary 5). Also I removed an errant "break" from inside one case statement that, for some reason or other, didn't cause any problem with Puppy Wary 5.0. Hopefully Pcreole should work on more Linux systems now. Thanks L18L. Let me know if that solves the problems you were having.

[Note: Though nothing at all to do with Pcreole, this discussion makes me think about Precord which also refers to /bin/sh but may need /bin/bash to work on other systems (Lupu?)].
----

Otherwise I changed almost nothing in Pcreole itself. No other change at all for anyone just using it to run arbitrary commandlines.

However, for those using it for its ability to process creole markup into html, I made major changes to the postprocess script called "nmecss". That is the script which is run when a user presses the button labelled "+" in Pcreole.

I also recompiled nme to compile in the option to allow "raw" code to be inserted in creole marked-up documents. With the help of that, nmecss now includes some macro's to allow a user to postprocess the nme-created html. Brief explanation is provided in Pcreole's help text, relevant extract of which is below. If I have time later, I'll try and expand on that with some examples, but for now I leave the user to simply experiment:

Extract from Pcreole 2.0.2 help text:
Major change to Pcreole 2.0.2 nmecss script (nmecss is what runs when you press Pcreole css "+" button):

Added the following postnme html processing macros which you can use if required (i.e. optional):

<<raw @@new:... >>; <<raw @@title:... >>; and <<raw @@csspath:... >>

You can (optionally) embed these in your source creole markup for later processing by the postprocessor script "nmecss".

Note that for these macros to work you also need to install nme-10.03.31r.pet which now includes the compiled-in functionality to embed "raw" code into your creole mark-up using the construct:

<<raw code_you_don't_want_nme_to_process >>

For example, you can insert a raw piece of html code into your creole markup such as the following:

<<raw
<div id="content">
>>


The available "nmecss" macros are as follows:

1. <<raw @@title:Web Page Html Title >>

@@title: allows changing the html <title>string</title> from Pcreole default "dummytitle".
Insert it once only near top of creole markup text file if you need it.
You must include a blank line in the <<raw @@title: >> stanza as shown in example below.

Usage example:

<<raw
@@title:Home Page

>>


2. <<raw @@csspath:path_to_your_css_stylesheet >>

@@csspath: allows changing the <link> href= string from Pcreole default "~/pcnotes.css".
Insert it once only near top of creole markup text file if you need it.
You must include a blank line in the <<raw @@csspath: >> stanza as shown below.

Usage example:

<<raw
@@csspath:css/mystyle.css

>>


3. <<raw @@new:new_line_of_html >>

The @@new macro allows changing specific (immediately below) lines of html.
i.e. The @@new: macro is used to "replace" existing html.

For example:

<<raw
@@new:<ul id="navlist">
>>

will replace an immediately underneath default nme creole generated html list <ul> line, adding an id= attribute for css purposes. Note well that no blank line should be included in the <<raw construct for this example, or it won't work.

Sometimes, however, you must include a blank line in the <<raw @@new: >> stanza to successfully "replace" the immediately below it creole text (depends on the html construct involved). For example, if you wanted to "replace" am immediately following simple line of text surrounded by html <p> markers you need the added blank line shown:

<<raw
@@new:<p>some new line of text</p>

>>
github mcewanw

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

Re: Pcreole 2.0.3 uploaded. Uses /bin/bash, not /bin/sh per

#22 Post by L18L »

mcewanw wrote: ...
Recent Changes:

Pcreole 2.0.3: Changed script header line to specifically use #!/bin/bash (rather than #!/bin/sh). Sorry, I should have done that before... (/bin/sh is a symbolic link to /bin/bash on Puppy Wary 5). Also I removed an errant "break" from inside one case statement that, for some reason or other, didn't cause any problem with Puppy Wary 5.0. Hopefully Pcreole should work on more Linux systems now. Thanks L18L. Let me know if that solves the problems you were having.

[Note: Though nothing at all to do with Pcreole, this discussion makes me think about Precord which also refers to /bin/sh but may need /bin/bash to work on other systems (Lupu?)].
----
...
Yes, problem is solved !
I have downloaded 2.0.3 in wary5.1.1.53
and there is another good news now:
pcreole seems to work for unprivileged user fido :D

# bash --version
GNU bash, version 3.00.16(1)-release (i486-t2-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.
# whoami
fido
# pcreole
^C# gtkdialog3 --version
gtkdialog version 0.7.20 (C) 2004, 2005, 2006, 2007 by Laszlo Pere
#

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Re: Pcreole 2.0.3 uploaded. Uses /bin/bash, not /bin/sh per

#23 Post by mcewanw »

L18L wrote: Yes, problem is solved !
I have downloaded 2.0.3 in wary5.1.1.53
and there is another good news now:
pcreole seems to work for unprivileged user fido :D
I'm happy to hear that, though I'm not currently in a position to give that a thorough test myself since I haven't downloaded fido on my dialup account as yet... I was hoping Pcreole would run without problem as a non-root user and kept that constantly in mind whilst I was designing it

[e.g. using $HOME (~) in pathnames and for config files throughout the program rather than /root and using /tmp as fast temporary RAM storage whist program is actually running, plus setting read and executable permissions for all users. At installation time, I've arranged Pcreole to store its "default" readonly configuration in /etc/.pcreole, which I believe is quite a standard practice in Linux world more generally(?) However, I'm thinking that /usr/etc might be better, so I might make that slight change later (?) since Pcreole isn't needed till /usr is mounted anyway...

Personally, I also prefer using /usr/bin for the main app now rather than /usr/local/bin, again since that seems to be a more standard practice across distributions, but that's just my preference for now anyway.

Finally, in the hope that it will help implement internationalisation/language for Pcreole, I've used gettext for strings, labels and help text. I don't myself know more about internationalisation etc., so I expect there is more to do, but from the brief readings I've done on the topic, it seems to me that gettext is the way to go in terms of writing applications that could be made usable, in that sense, across distributions].

Time I looked over Precord code now to make some such adjustments.
github mcewanw

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

Pcreole

#24 Post by L18L »

mcewanw wrote:...
I've used gettext for strings, labels and help text. I don't myself know more about internationalisation etc., so I expect there is more to do, but from the brief readings I've done on the topic, it seems to me that gettext is the way to go in terms of writing applications that could be made usable, in that sense, across distributions].
...
It is late night here, so just a little demo that you can reproduce when downloaded attachment.

#LANGUAGE=de pcreole --help
Pcreole Version 2.0.4
Start von der Kommandozeile:
pcreole [Optionen]
Kommandozeilen-Optionen:
quit : Alles säubern und Programmm beenden.
--help : diese kurze Hilfe.
-? : diese kurze Hilfe.
Beachte, daß pcreole automatisch die laufenden Prozess-IDs verfolgt.
Falls keine Optionen eingegeben sind, startet das GUI (Grafische Benutzerschnittstelle) von Pcreole.
#
#LANGUAGE=la pcreole --help
Pcreole Version 2.0.4
Currere ex linea comandi:
pcreole [Optionen]
Kommandozeilen-Optionen:
quit : omnia munda relinquere program.
--help : auxilium brevem.
-? : auxilium brevem.
Et nota quod Pcreole ipso ferventis semita IDs processum custodit.
Si non ingressi sunt optiones GUI (usoris interfaciei graphice) Pcreolis surgamus.
#
nice toy?
And why this demo?
You don't need to set locale to German and I did not need to set locale to Latin. (g**gle is not very good with Latin) :)

Yes, there is more to do but I liked to show just the technical side of internationalization now.

(just copy to / , script pcreole in /root, to run from there in console)

Edited:
attachment deleted
use that in next post, please
Last edited by L18L on Mon 09 May 2011, 08:17, edited 2 times in total.

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Re: Pcreole

#25 Post by mcewanw »

L18L wrote: #LANGUAGE=de pcreole --help
Just trying it now. Seems to be good, though I've not managed to get it to work yet (in Puppy Wary 5.0). I'm probably not understanding something or does something need to be done inside Wary itself?

I put the following files in / (which is how I interpreted your istructions):

de.po, la.po, pcreole.mo, pcreole.pot

and I put the script pcreole in /root and ran it from the console, but didn't get German help. Please correct me.

Code: Select all

# LANGUAGE=de pcreole --help
Pcreole version 2.0.3
From commandline run as:
pcreole [options]
Commandline options:
quit : clean up all and quit program.
--help : this brief usage help.
-? : this brief usage help.
Note that Pcreole automatically keeps
track of the running process IDs.
If no options are entered the Pcreole GUI will start.
I presume that the final version will work per normal once locale IS set to target language.

Once you have the language stuff inserted, please send me a patch (diff) if you can, since I'm continually developing pcreole and need to be able to merge your work in with my developments. Just now, its easy because there are only a few changes required to pcreole itself, but if there is a great deal more, a patch would help me. I knew there were files like *.po to create but I didn't delve deeper in my quick research into using gettext/internationalisation because I wanted to get pcreole working first (for my own needs really).

Thanks for your help. It will be nice if all Puppy apps are developed to implement internationalisation in a standards-oriented way (though I'm hopeless at other languages than English myself). Hende vashen and breakfast for me now...

Exciting stuff. If this works well, I'll implement it in Precord too.
github mcewanw

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

Re: Pcreole

#26 Post by L18L »

mcewanw wrote: ...
I put the following files in / (which is how I interpreted your istructions):

de.po, la.po, pcreole.mo, pcreole.pot

and I put the script pcreole in /root and ran it from the console, but didn't get German help. Please correct me.
...
You interpreted right.
Sorry, it was my fault having tested not at all. :oops:
(Yesterday there was a special day for Mrs. L18L and she will always have priority in my life)
So accept my apologies and take the new attachment please.

pcreole will be in /root (just for this test / demo)
.pot and .po files also in /root, just for reference. (just for this test / demo)
different pcreole.mo in /usr/share/locale/<language code>/LC_MESSAGES

I will add some explanation later if wanted.

Now: Hände waschen and Abendessen?
Attachments
pcreole-intl-test1.tar.gz
test only for mcewanw
select all
extract to /
start in console
(13.09 KiB) Downloaded 483 times

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#27 Post by mcewanw »

Everything untarred to the correct places, but still only giving me English. Maybe something different about my setup (default Wary 5.0)?

Doesn't matter, I'm sure it all works so far. Looking forwards to more once you have time.

Just as a matter of interest, the reason I used "gettext" in Pcreole was that I noticed it used in shinobar's ffconvert script and realised that that was probably for internationalisation (I believe shinobar is from Japan, though I could be wrong). In ffconvert, I also noted the line: export TEXTDOMAIN=$MYNAME, and meant to look into that later (but never did prior to your coming along and offering to help - though I did read up about gettext and the .po and .mo world, albeit just as an overview). I presume ffconvert will display in other languages. Alas my ignorance is such that I don't know how to change locale off the top of my head, but I can google that much...:-)

As for.. "Hende vashen".. just my poor phonetic spelling (typical scottish: useless at languages other than Scottish/English). I excuse myself, cos it was early here and I was half asleep. Otherwise I might have guessed the correct spelling (the w in washen I certainly do know). My two teenage daughters, who live with me, are half German and bilingual, so I have no excuse.

EDIT: For ffconvert I tried:

Code: Select all

export LANGUAGE=de
and then started ffconvert, and... everything came up in German, so I see where we are going...
github mcewanw

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

Re: Pcreole

#28 Post by L18L »

mcewanw wrote: ...
Thanks for your help. It will be nice if all Puppy apps are developed to implement internationalisation in a standards-oriented way (though I'm hopeless at other languages than English myself).
...
BarryK has come up with the brilliant idea introducing internationalization by using dialects, see http://bkhome.org/bacon/international.htm.

So you could give New_Zealand_English a try. :idea:

Note, there is no need to translate everything, just some terms (msgstr).
gettext will use what is found in /usr/share/locale/en_NZ/LC_MESSAGES/pcreole.mo (assuming en_NZ is in your locale) then take that was not found from /usr/share/locale/en/LC_MESSAGES/pcreole.mo (if that exists) and all other from the script pcreole.

The variable LANGUAGE is used prior to LANG set in locale (prove it by: locale -a)

Howto create the message catalog template file (*.pot)
xgettext --language=shell pcreole -o - > pcreole.pot

Howto create /usr/share/locale/en/LC_MESSAGES/pcreole.mo
Follow Barry's link above and see "What about en_AU, en_CA, en_DK, en_US..."
I presume that the final version will work per normal once locale IS set to target language.
Yes but some work will still have to be done.
- using in title
- some messages
- SD_ TD_
- general controls ...

At the moment I see you have dowloaded....
I think best is that I will install Wary 5.0
no problem since I am on broadband (remember well when I had just dialup)
__________________________________________
Now in wary 5.0

downloaded and expanded to /

Code: Select all

# 
# pwd
/root
# ./pcreole
Name des QUELLE-Verzeichnisses hierherziehen oder eintippen
Default config files missing, please reinstall Pcreole
# 
# LANGUAGE=en ./pcreole
Drag or type name of the SOURCE Directory here
Default config files missing, please reinstall Pcreole
#

Ahem... that's was I have got.
1st line "Drag or type..." was a test using printf with SOURCE as value for a variable, another value would be TARGET. This was thought to make translation easier.

2nd line is the surprise for me, too. (It was not yet gettext'ed, so the surprise is not that it is not translated but that it is not working) I'll have to dig a bit deeper.
please wait, probing..... :roll:
yes, there is no default config file /etc/.pcreole/pcreole_default.rc :!:
So I will have to install the pet first!
Done.
Now either

Code: Select all

mv /usr/bin/pcreole /usr/bin/pcreole
cp /root/pcreole /usr/bin
pcreole
Or

Code: Select all

cd /root
./pcreole
Both is working for me as expected :)
No more doubts about puppy version in the future :wink:
And: when testing start a program always in console using dotslash

BTW, do you have devx ?
if not I can make for you a small tool which has included everything that is needed to create pot, po and mo files.

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

ffconvert

#29 Post by L18L »

mcewanw wrote: ...
EDIT: For ffconvert I tried:

Code: Select all

export LANGUAGE=de
and then started ffconvert, and... everything came up in German, so I see where we are going...
But it did not come up correctly.
Anyway having the German ffconvert in wary5.0 was useful :lol:
There is a bug fix in http://www.murga-linux.com/puppy/viewto ... 2&start=90

-download from there
-rename /usr/share/locale/de/LC_MESSAGES/ffconvert.mo if you like to do so
-copy ffconvert.mo to /usr/share/locale/de/LC_MESSAGES
-edit /usr/bin/ffconvert

Code: Select all

#!/bin/sh
# FFConvert - a frontend of ffmpeg
# 20 Jul 2010 by shinobar <shino@pos.to>
export OUTPUT_CHARSET=UTF-8
VERSION="1.0" 
It is just including the line "export OUTPUT_CHARSET=UTF-8"
- save the edited script
-start it from console

Code: Select all

LANGUAGE=de ffconvert
And ffconvert will run German.

And thank Barry for having "bloated" this version by a German translation. :lol:

keep the faith

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#30 Post by mcewanw »

@L18L

Yes, I have devx. I'm a C programmer usually, though given up programming for a few years till I needed/wanted pcreole.

Oops. I wasn't concentrating and did daftly try to start your demo /root/pcreole without the ./ (I must have been drinking too much coffee; as you say, "too err is human")! Of course, that started my default pcreole in the /usr/bin PATH instead... sigh
github mcewanw

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

pcreole

#31 Post by L18L »

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

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)
Last edited by L18L on Wed 11 May 2011, 12:10, edited 2 times in total.

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Re: pcreole

#32 Post by mcewanw »

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.
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Re: pcreole

#33 Post by mcewanw »

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: Select all

#: 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: Select all

#: 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.
Last edited by mcewanw on Thu 12 May 2011, 02:50, edited 3 times in total.
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Pcreole version 2.0.4 uploaded

#34 Post by mcewanw »

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: Select all

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...
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#35 Post by mcewanw »

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... :-)
github mcewanw

Post Reply