zigbert and gettext

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:

Re: pfind

#41 Post by zigbert »

L18L wrote:
zigbert wrote:$TEXTDOMAIN=pfilesearch in your pFind. I guess it's because there only can be one text domain, and code from pFilesearch is embedded into pFind.
Good guess!
That was before Barry changed momanager.
Now everything is possible:
I will separate them and make a version 5.03
TEXTDOMAIN=pfind
and pfilesearch using TEXTDOMAIN=pfilesearch containing the messages from pfilesearch only.
Thank you.
I will be back Tuesday (probably).


Sigmund

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

Re: pfind

#42 Post by L18L »

L18L wrote:I will separate them and make a version 5.03
TEXTDOMAIN=pfind
done
included is german pfind.mo so you can test changinging of GUI language

for testers only, delete /root/.pfind/pfindrc :arrow:

a lot of warnings like:
/usr/local/pfind/func: line 4: /tmp/pfind-TREE6413: Datei oder Verzeichnis nicht gefunden <-- not found
cat: /tmp/pfind-treeitems6413: Datei oder Verzeichnis nicht gefunden <-- not found
Attachments
pfind-5.03.pet
TEXTDOMAIN=pfind
was pfilesearch before
(23.33 KiB) Downloaded 558 times

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

#43 Post by zigbert »

Ok, updated stuff


Thank you guys
Sigmund

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

#44 Post by zigbert »

I have started on the next cycle of pMusic, and will add gettext to it

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

pburn

#45 Post by rodin.s »

Pburn doesn't switch to Russian automatically. But it does when 'ru' is selected in Preferences. Usually gettext doesn't need this manual language switching. The language of an application is defined by global locale settings of the system.

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

Re: pburn

#46 Post by zigbert »

rodin.s wrote:Pburn doesn't switch to Russian automatically. But it does when 'ru' is selected in Preferences. Usually gettext doesn't need this manual language switching. The language of an application is defined by global locale settings of the system.
Does this occur only for pBurn or is it so for all the zigbert gettext apps?


Sigmund

User avatar
vicmz
Posts: 1262
Joined: Sun 15 Jan 2012, 22:47

#47 Post by vicmz »

To me that only happens with Pburn so far, Pmusic and Pprocess are usually set to the same language of the system. I don't know about the others, I haven't tried them yet.
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]

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

Re: pburn

#48 Post by L18L »

zigbert wrote:
rodin.s wrote:Pburn doesn't switch to Russian automatically. But it does when 'ru' is selected in Preferences. Usually gettext doesn't need this manual language switching. The language of an application is defined by global locale settings of the system.
Does this occur only for pBurn or is it so for all the zigbert gettext apps?


Sigmund
Running pburn from latest precise 5.2.69
added
echo LANGUAGE=$LANGUAGE
to line 271 of /usr/local/pburn/pburn
my console wrote:# pburn
LANGUAGE=auto
EXIT="Ready"
gettext is using a LANGUAGE named auto here but for auto there is no pburn.mo :wink:

gettext uses automagically user´s language from LANG
-> the option auto has to be removed from the list of available languages
LANGUAGE is a system variable, do use it in its intended purpose only: http://www.gnu.org/software/gettext/man ... E-variable

Hope that helps :)

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

Re: pburn

#49 Post by rodin.s »

zigbert wrote:Does this occur only for pBurn or is it so for all the zigbert gettext apps?
Yes, it happens in pBurn only.
Interesting explanation from L18L.

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

#50 Post by zigbert »

Ok, I have changed $LANGUAGE to $MY_LANGUAGE, and added 2 lines after reading rc file. I had no idea gettext relies on $LANGUAGE.

Code: Select all

#set variables
. $CONFIG 2> /dev/null
export LANGUAGE="$MY_LANGUAGE"
[ "$MY_LANGUAGE" = "auto" ] && export LANGUAGE="${LANG%%_*}"
Attachments
pburn-3.7.5.pet
(67.08 KiB) Downloaded 469 times

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

Russian for pfilesearch and pfind, gettext for pmirror

#51 Post by rodin.s »

I was making Russian remastering of Slacko and I have added gettext to pMirror for it. Also there are Russian mo-files for pfind and pfilesearch made in momanager in Precise-5.2.72.
Attachments
pmirror.tar.gz
gettext in pMirror
(4.78 KiB) Downloaded 458 times
MoManager-ru_UA-WOOF.tar.gz
pfilesearch.mo and pmiror.mo for Russian
(8.95 KiB) Downloaded 473 times

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#52 Post by vovchik »

Dear rodin.s,

Thanks for all your work.

With kind regards,
vovchik

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

#53 Post by zigbert »

rodin.s
This is great stuff


Thank you
Sigmund

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

Pburn

#54 Post by rodin.s »

One small problem with pBurn-3.7.5. Sometimes it doesn't start. Problem is in line 279 of /usr/local/pburn/pburn. I have changed it like this:

Code: Select all

 . $HOME/.pburn/pburnhlp-auto #$LANGUAGE #read help text (preferable in installed language)
It seems that pburnhlp-auto is expecting auto from $LANGUAGE, file pburnhlp-ru is not found and pBurn doesn't start.

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

#55 Post by zigbert »

rodin.s
I think a better solution would be to switch line 279 and 280.

From

Code: Select all

. $HOME/.pburn/pburnhlp-$LANGUAGE #read help text (preferable in installed language)
export LANGUAGE=$TMP_LANG
To

Code: Select all

export LANGUAGE=$TMP_LANG
. $HOME/.pburn/pburnhlp-$LANGUAGE #read help text (preferable in installed language)

Please test
Sigmund

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

pBurn

#56 Post by rodin.s »

No, it still doesn't work:

Code: Select all

# pburn
/usr/local/pburn/pburn: line 280: /root/.pburn/pburnhlp-ru: No such file or directory
Maybe it would work with file pburnhlp-ru. But if there's no such file it should switch to auto.

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

#57 Post by zigbert »

I see

Code: Select all

export LANGUAGE=$TMP_LANG
[ -s $HOME/.pburn/pburnhlp-$LANGUAGE ] && . $HOME/.pburn/pburnhlp-$LANGUAGE || $HOME/.pburn/pburnhlp-auto #read help text (preferable in installed language)
Better ?

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

pburn help

#58 Post by L18L »

How would you like this /usr/share/doc/pburn :?:

Liquid design
ideal for small screens
Attachments
pburn_doc_440px.png
this one has a width of 440px
(29.75 KiB) Downloaded 704 times
pburn_doc.png
(33.63 KiB) Downloaded 473 times

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

pBurn

#59 Post by rodin.s »

Yes, with that code pBurn works.
And I quess I like that doc design.

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

Re: pBurn

#60 Post by L18L »

rodin.s wrote:And I quess I like that doc design.
Easier to translate to /usr/share/doc/help/<language>/pburn.html
Attachments
pburn.html.gz
(18.45 KiB) Downloaded 531 times

Post Reply