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 29 Aug 2014, 16:26
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects » Localization Project
zigbert and gettext
Moderators: Lobster, MU, raffy
Post new topic   Reply to topic View previous topic :: View next topic
Page 4 of 5 [72 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
zigbert


Joined: 29 Mar 2006
Posts: 5686
Location: Valåmoen, Norway

PostPosted: Sun 26 Aug 2012, 15:54    Post subject: Re: pburn  

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

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
vicmz


Joined: 15 Jan 2012
Posts: 1105

PostPosted: Sun 26 Aug 2012, 16:47    Post subject:  

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.
_________________
OB Precise 14.07.26 Woof-CE|Puppy Linux en español
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Mon 27 Aug 2012, 15:16    Post subject: Re: pburn
Subject description: LANGUAGE
 

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/manual/gettext.html#The-LANGUAGE-variable

Hope that helps Smile
Back to top
View user's profile Send private message 
rodin.s

Joined: 22 Sep 2010
Posts: 338
Location: Ukraine

PostPosted: Mon 27 Aug 2012, 16:13    Post subject: Re: pburn  

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.
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5686
Location: Valåmoen, Norway

PostPosted: Tue 28 Aug 2012, 02:16    Post subject:  

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:
#set variables
. $CONFIG 2> /dev/null
export LANGUAGE="$MY_LANGUAGE"
[ "$MY_LANGUAGE" = "auto" ] && export LANGUAGE="${LANG%%_*}"
pburn-3.7.5.pet
Description 
pet

 Download 
Filename  pburn-3.7.5.pet 
Filesize  67.08 KB 
Downloaded  270 Time(s) 

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
rodin.s

Joined: 22 Sep 2010
Posts: 338
Location: Ukraine

PostPosted: Sun 02 Sep 2012, 14:17    Post subject: Russian for pfilesearch and pfind, gettext for pmirror  

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.
pmirror.tar.gz
Description  gettext in pMirror
gz

 Download 
Filename  pmirror.tar.gz 
Filesize  4.78 KB 
Downloaded  265 Time(s) 
MoManager-ru_UA-WOOF.tar.gz
Description  pfilesearch.mo and pmiror.mo for Russian
gz

 Download 
Filename  MoManager-ru_UA-WOOF.tar.gz 
Filesize  8.95 KB 
Downloaded  278 Time(s) 
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Sun 02 Sep 2012, 14:25    Post subject:  

Dear rodin.s,

Thanks for all your work.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5686
Location: Valåmoen, Norway

PostPosted: Mon 03 Sep 2012, 12:01    Post subject:  

rodin.s
This is great stuff


Thank you
Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
rodin.s

Joined: 22 Sep 2010
Posts: 338
Location: Ukraine

PostPosted: Wed 05 Sep 2012, 16:59    Post subject: Pburn  

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:
 . $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.
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5686
Location: Valåmoen, Norway

PostPosted: Thu 06 Sep 2012, 11:19    Post subject:  

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

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

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



Please test
Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
rodin.s

Joined: 22 Sep 2010
Posts: 338
Location: Ukraine

PostPosted: Thu 06 Sep 2012, 14:21    Post subject: pBurn  

No, it still doesn't work:
Code:
# 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.
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5686
Location: Valåmoen, Norway

PostPosted: Thu 06 Sep 2012, 15:12    Post subject:  

I see
Code:
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 ?

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Thu 06 Sep 2012, 16:57    Post subject: pburn help
Subject description: doc
 

How would you like this /usr/share/doc/pburn Question

Liquid design
ideal for small screens
pburn_doc_440px.png
 Description   this one has a width of 440px
 Filesize   29.75 KB
 Viewed   512 Time(s)

pburn_doc_440px.png

pburn_doc.png
 Description   
 Filesize   33.63 KB
 Viewed   344 Time(s)

pburn_doc.png

Back to top
View user's profile Send private message 
rodin.s

Joined: 22 Sep 2010
Posts: 338
Location: Ukraine

PostPosted: Thu 06 Sep 2012, 17:07    Post subject: pBurn  

Yes, with that code pBurn works.
And I quess I like that doc design.
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Thu 06 Sep 2012, 17:15    Post subject: Re: pBurn  

rodin.s wrote:
And I quess I like that doc design.

Easier to translate to /usr/share/doc/help/<language>/pburn.html
pburn.html.gz
Description 
gz

 Download 
Filename  pburn.html.gz 
Filesize  18.45 KB 
Downloaded  344 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 4 of 5 [72 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0794s ][ Queries: 13 (0.0054s) ][ GZIP on ]