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 Sun 20 Apr 2014, 01:49
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Discussion: translating Puppys System-tools
Moderators: Lobster, MU, raffy
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [45 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Sun 14 May 2006, 02:32    Post subject:  

i can't get $"text" to work either ... that's why i put LANG= on each line, to be absolutely sure LANG was set when the line executed

except, the way bash works, i think it substitutes all $"text" strings before any line in the script executes, so to work properly (for demo purposes), LANG variables should be set and exported before ever calling the script

also, gettext uses LANG, but i think bash uses LC_ALL ... but i still couldn't get $"text" to work

maybe it's the way bash was compiled ... maybe it was compiled without NLS support?
Back to top
View user's profile Send private message 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Sun 14 May 2006, 10:33    Post subject:  

GuestToo wrote:
so to work properly (for demo purposes), LANG variables should be set and exported before ever calling the script
I just wanted to make sure that other readers understand that when implementing gettext in their scripts they should rely on the locale set for the system.

Thanks for your demo.

_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to
Back to top
View user's profile Send private message Visit poster's website 
nyu


Joined: 14 Mar 2006
Posts: 110
Location: good earth

PostPosted: Sun 14 May 2006, 22:56    Post subject: Re: Discussion: translating Puppys System-tools  

MU wrote:


So we need coders that start adding the functions, and later users (without programming-experience) to translate .mo -files.

Mark


I am not a coder but I can translate English to Traditional Chinese Laughing
Can someone help me to translate Dillo-0.5.8-i18n-misc into zh_TW.UTF-8
environment under Puppy?
Thanks,
nyu
Back to top
View user's profile Send private message 
Kingskid

Joined: 22 Jan 2006
Posts: 4
Location: Czech Republic, Kladno

PostPosted: Mon 15 May 2006, 01:36    Post subject: Rosetta  

Hi there!
Does anyone know if there is a way to upload all the texts into Rosetta to easier internationalize Puppy?
If you never heard about it just check www.launchpad.net. Its a great tool for translating.
Another question: How can Linux beginner extract the texts from Puppy to translate it? And later put them back translated? Maybe some experienced user could do the extraction for others who don't know how & later help to load them back? What do you think?
Back to top
View user's profile Send private message 
ICQ Number 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Mon 15 May 2006, 06:30    Post subject:  

Quote:
Can someone help me to translate Dillo-0.5.8-i18n-misc into zh_TW.UTF-8

i think it is already translated to zh_TW ... does the font that is used make a difference? ... if it does, then you should be able to get the zh_TW.po file from the source and adapt it ... zh_TW.po already seems to be a UTF8 text file

maybe you need to add a locale named zh_TW.UTF-8 in /usr/local/share/locale/ ? ... it could probably be a copy or a symlink to the zh_TW locale

source:
http://www.murga.org/~puppy/viewtopic.php?t=7473

i do not know if the Puppy unleased package is significantly different from MU's
Back to top
View user's profile Send private message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Mon 15 May 2006, 06:36    Post subject:  

Quote:
How can Linux beginner extract the texts from Puppy to translate it?

for programs, the programs should be written (re-written) to support translations ... if the programs are written properly, the strings can be automatically extracted to a .po file (a text file with the text strings and spaces for the translations) ... for example, for a bash script, text stings in quotes with a leading $ will be extracted ( $"text" ) to the .po file

normally, the programmer would provide a .po file with a list of the text strings that need translation ... someone could add the translations and upload the translated .po file

a .po file would look something like this:

msgid "Reset"
msgstr ""

msgid "Reload"
msgstr ""

msgid "Save"
msgstr ""

after translation, it would look something like this:

# Dillo Chinese Translation

msgid "Reset"
msgstr "重設"

msgid "Reload"
msgstr "重載"

msgid "Save"
msgstr "儲存"
Back to top
View user's profile Send private message 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Mon 15 May 2006, 10:21    Post subject: Re: Rosetta  

Kingskid wrote:
How can Linux beginner extract the texts from Puppy to translate it?
As Guesttoo explained:

"Translating" consist on two steps:

Internationalization (i18n):
Consist on enabling the application for multiple locales: (Language, text directionality, etc)

Localization (l10n):
Is the actuall translation of the strings apearing in an Internationalized application.

A developer does the i18n a translator the l10n.

_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to
Back to top
View user's profile Send private message Visit poster's website 
nyu


Joined: 14 Mar 2006
Posts: 110
Location: good earth

PostPosted: Mon 15 May 2006, 12:21    Post subject:  

GuestToo wrote:
Quote:
Can someone help me to translate Dillo-0.5.8-i18n-misc into zh_TW.UTF-8

i think it is already translated to zh_TW ... does the font that is used make a difference? ... if it does, then you should be able to get the zh_TW.po file from the source and adapt it ... zh_TW.po already seems to be a UTF8 text file

maybe you need to add a locale named zh_TW.UTF-8 in /usr/local/share/locale/ ? ... it could probably be a copy or a symlink to the zh_TW locale

source:
http://www.murga.org/~puppy/viewtopic.php?t=7473

i do not know if the Puppy unleased package is significantly different from MU's


Hi GuestToo,
Thanks for leading me to the right direction. Here is my locale environment:
-----------------------------------------------------------------
#locale
LANG=zh_TW.UTF-8
LC_CTYPE=zh_TW.UTF-8
LC_NUMERIC="zh_TW.UTF-8"
LC_TIME="zh_TW.UTF-8"
LC_COLLATE="zh_TW.UTF-8"
LC_MONETARY="zh_TW.UTF-8"
LC_MESSAGES="zh_TW.UTF-8"
LC_PAPER="zh_TW.UTF-8"
LC_NAME="zh_TW.UTF-8"
LC_ADDRESS="zh_TW.UTF-8"
LC_TELEPHONE="zh_TW.UTF-8"
LC_MEASUREMENT="zh_TW.UTF-8"
LC_IDENTIFICATION="zh_TW.UTF-8"
LC_ALL=

#locale -a
C
en_AU
en_US
POSIX
zh_CN.utf8
zh_TW.UTF-8
-----------------------------------------------------------------
I downloaded dillo-0.8.5-i18n-misc source file and found the zh_TW.po file.
I can open the file using Leafpad. It is indeed in Unicode (UTF-8 ) format and I can
read the Chinese translation under my installed fonts. I wnat to compile the po file to
generate zh_TW.mo file but I can not do it in Puppy. Fortunately, I have another
system with Ubuntu and it has "gettext " installed by default. I used "msgfmt" to
generate the corresponding .mo file successfully. Then I copied the file back to my
Puppy computer and changed the file name from zh_TW.mo to dillo.mo because Dillo
suppose to read this file under /usr/local/share/locale/zh_TW/LC_MESSAGES/dillo.mo.
But when I open Dillo browser, the system sub-menus are still not readable in Chinese.
My question is when I compile zh_TW.po file, does it generate Unicode .mo file?

nyu
Back to top
View user's profile Send private message 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Mon 15 May 2006, 13:50    Post subject:  

nyu wrote:
But when I open Dillo browser, the system sub-menus are still not readable in Chinese.
Do you mean that they have garbage characters? or that they are in English?
_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to
Back to top
View user's profile Send private message Visit poster's website 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Mon 15 May 2006, 14:00    Post subject:  

look at this page. There is a section for Dilo:

http://puppylinux.org/wikka/LanguageSupport

_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to
Back to top
View user's profile Send private message Visit poster's website 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Mon 15 May 2006, 21:28    Post subject:  

nyu, i am not an expert in localisation

maybe what you need is to add a locale for
zh_TW.UTF-8 ... there is a locale for zh_TW, but maybe you need one for zh_TW.UTF-8 too

i think maybe the dillo.mo file for zh_TW.UTF-8 would be identical to the dillo.mo file for zh_TW

i installed MU's dillo package, and if is set LANG and LC_ALL to zh_TW or to zh_TW.UTF-8, i get an error message:

Gdk-WARNING **: locale not supported by Xlib, locale set to C

and dillo just runs in english ... maybe i would need to use localedef or something to setup my locales first?
Back to top
View user's profile Send private message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Mon 15 May 2006, 21:36    Post subject:  

Quote:
when I compile zh_TW.po file, does it generate Unicode .mo file?

i do not know ... i would think that since the .po file is UTF8 then the .mo file will be too

and locale -a seems to show that you have a zh_TW.UTF-8 locale

do you get any error messages if you start dillo in an rxvt console?

and of course, you are using the internationalised dillo and not the standard version?
Back to top
View user's profile Send private message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Mon 15 May 2006, 21:47    Post subject:  

Quote:
maybe it's the way bash was compiled ... maybe it was compiled without NLS support?

well, i tried using bash from 2 other distros that i have installed, and the implicit $"text" method does not seem to work with those version of bash either ... maybe they were compiled without NLS support either

maybe i'm not using the right syntax, but i think i'm doing it right ... for example, see here
Back to top
View user's profile Send private message 
nyu


Joined: 14 Mar 2006
Posts: 110
Location: good earth

PostPosted: Mon 15 May 2006, 22:12    Post subject:  

rarsa wrote:
nyu wrote:
But when I open Dillo browser, the system sub-menus are still not readable in Chinese.
Do you mean that they have garbage characters? or that they are in English?


Yes, they have garbage characters.
Back to top
View user's profile Send private message 
nyu


Joined: 14 Mar 2006
Posts: 110
Location: good earth

PostPosted: Mon 15 May 2006, 22:25    Post subject:  

rarsa wrote:
look at this page. There is a section for Dilo:

http://puppylinux.org/wikka/LanguageSupport


I have visited the page several times already. It mentions to view web pages in other
languages and I can read pages in Chinese but the problem is that I can't read the Dillo system sub-menus. The characters are all unreadable - garbage.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 3 [45 Posts]   Goto page: Previous 1, 2, 3 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.0726s ][ Queries: 11 (0.0041s) ][ GZIP on ]