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 26 Nov 2014, 06:05
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 Posts_count   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
zigbert


Joined: 29 Mar 2006
Posts: 5788
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_website 
vicmz


Joined: 15 Jan 2012
Posts: 1143

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: 2579
Location: www.eussenheim.de/

PostPosted: Mon 27 Aug 2012, 15:16    Post_subject: Re: pburn
Sub_title: 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: 5788
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  287 Time(s) 

_________________
Stardust resources
Back to top
View user's profile Send_private_message Visit_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  280 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  292 Time(s) 
Back to top
View user's profile Send_private_message 
vovchik


Joined: 23 Oct 2006
Posts: 1287
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: 5788
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_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: 5788
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_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: 5788
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_website 
L18L

Joined: 19 Jun 2010
Posts: 2579
Location: www.eussenheim.de/

PostPosted: Thu 06 Sep 2012, 16:57    Post_subject: pburn help
Sub_title: 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   570 Time(s)

pburn_doc_440px.png

pburn_doc.png
 Description   
 Filesize   33.63 KB
 Viewed   402 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: 2579
Location: www.eussenheim.de/

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  366 Time(s) 
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 4 of 5 Posts_count   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:  

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.0854s ][ Queries: 13 (0.0110s) ][ GZIP on ]