Question about gettext! [SOLVED]

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#31 Post by Argolance »

Hello,
Wary 5.2.2:
Adding line inside /etc/profile doesn't work! (Don't know if I copied the line at the right place, as mentioned above!)
This works when completing /Startup/retrovol_tray:
#!/bin/sh

#exec retrovol -hide ${BGOPT} #BGOPT is exported from /usr/sbin/delayedrun.

#retrovol 0.10, -bg option no longer needed...
export OUTPUT_CHARSET=UTF-8
exec retrovol -hide
Cordialement.

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

export OUTPUT_CHARSET=UTF-8

#32 Post by L18L »

Argolance wrote:Is there a right place to put the line?
Sorry, my quick shot /etc/profile is not good for this.
echo $OUTPUT_CHARSET shows UTF-8 but retrovol has been started earlier.

I did not find a file called xinitrc in my running slacko so I have put

Code: Select all

OUTPUT_CHARSET=UTF-8
export OUTPUT_CHARSET
at the beginning of /usr/sbin/delayedrun and it works (showing correct messages from beginning without utf8 locale)

I am sure Barry will put that code into the right location if there is a better one than delayedrun. The entire system can benefit from this and not just retrovol.

______________________

Time for a retrovol_NLS.pet :?:

_______________________

Edited after seen Argolance´s last post:
There is no Startup/retrovol_tray in slacko !!!

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#33 Post by Argolance »

Hello,
I did not find a file called xinitrc in my running slacko
/root/.xinitrc? (hidden file)
Time for a retrovol_NLS
I sent the French UTF-8 mo and po files to Pizzasgood (=> http://www.murga-linux.com/puppy/viewtopic.php?t=50744)
The entire system can benefit from this and not just retrovol.
Yes! It is ok! ... and better! Will test when back home.

Best regards

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

export OUTPUT_CHARSET=UTF-8

#34 Post by L18L »

Argolance wrote:/root/.xinitrc? (hidden file)
:D :oops: :oops: :oops: :D

Yes, and delayedrun is launched near the end of /root/.xinitrc :oops:
So the best location seems to be the beginning of /root/.xinitrc or even PUPSTATE which could be launched from sort of fido/.xinitrc, too.
Argolance wrote:I sent the French UTF-8 mo and po files to Pizzasgood (=> http://www.murga-linux.com/puppy/viewtopic.php?t=50744)
And so will I :)
Thank you.

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

gettext with and without utf8

#35 Post by L18L »

L18L wrote:I have been playing with retrovol with and without utf8 in latest slacko.

1st problem was:
Could not change to my locale without utf8
...
Started with utf8

# locale -a
C
de_DE.utf8
en_US
POSIX
#
----------------
chooselocale: choose de_DE without utf8

# locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory

C
de_DE.utf8
en_US
en_US.utf8
POSIX
#

----------------
Bugfix in /usr/sbin/chooselocale:
#120129 enabling adding locale without utf8 using regexp. L18L

#if [ "`locale -a | grep "${LANGCHOICE}${UTF8}"`" = "" ];then
if [ "`locale -a | grep -E "${LANGCHOICE}${UTF8}$"`" = "" ];then #120129
----------------

chooselocale: choose de_DE without utf8

# locale -a
C
de_DE
de_DE.utf8
en_US
en_US.utf8
POSIX
#

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#36 Post by Argolance »

Hello L18L,
#120129 enabling adding locale without utf8 using regexp. L18L

#if [ "`locale -a | grep "${LANGCHOICE}${UTF8}"`" = "" ];then
if [ "`locale -a | grep -E "${LANGCHOICE}${UTF8}$"`" = "" ];then #120129
If I well undertood, this has to be copied into /usr/sbin/chooselocale? And this instead of all the different "solutions" called above? But where?

... And what about the commented line? What is it used for? then... then what?
Sorry to ask so many questions...

Thank you!

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

bugfix for chooselocale

#37 Post by L18L »

Hello Argolance,

yes, edit /usr/sbin/chooselocale
find the line

Code: Select all

if [ "`locale -a | grep "${LANGCHOICE}${UTF8}"`" = "" ];then

it is something like 147 and replace it by:

Code: Select all

if [ "`locale -a | grep -E "${LANGCHOICE}${UTF8}$"`" = "" ];then
No, this is just a bugfix which enables you now to choose for example fr_FR if you have started using fr_FR.UTF-8

The other issue was to have OUTPUT_CHARSET=UTF-8 permanent.
Put

Code: Select all

export OUTPUT_CHARSET=UTF-8
into /root/.xinitrc

Cordialment :)

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#38 Post by Argolance »

Thank you a lot: now, all is just and perfect indeed!

Herzlich! :wink: :D

Post Reply