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 17 Dec 2014, 19:26
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 3 of 3 Posts_count   Goto page: Previous 1, 2, 3
Author Message
nyu


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

PostPosted: Mon 15 May 2006, 22:36    Post_subject:  

[quote="GuestToo"]
Quote:


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?


When I run dillo in an rxvt console, I got the following errors but I am not sure they are related to my problem:

debianinstallerrc :38: unexpected string constant "send", expected symbol
debianinstallerrc :38: unexpected string constant "referer", expected symbol

And yes, I am using MU's dotpup Dillo file.
Back to top
View user's profile Send_private_message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Mon 15 May 2006, 23:17    Post_subject:  

that is strange ... i do not know why dillo would be accessing a file called debianinstallerrc ... i do not have that file, i just unzipped MU's package and copied the files to the appropriate places, i try to avoid registering things with pupget, and i did not want the package to mess with my menus either ... i try to make my own packages so that they are as independent of Puppy as possible

it seems that your locale is working, or there would be an error message "locale set to C"

maybe the locale is using the wrong character set ... as i said, i do not know a lot localisation
Back to top
View user's profile Send_private_message 
nyu


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

PostPosted: Tue 16 May 2006, 06:02    Post_subject:  

GuestToo wrote:
that is strange ... i do not know why dillo would be accessing a file called debianinstallerrc ... i do not have that file, i just unzipped MU's package and copied the files to the appropriate places, i try to avoid registering things with pupget, and i did not want the package to mess with my menus either ... i try to make my own packages so that they are as independent of Puppy as possible

it seems that your locale is working, or there would be an error message "locale set to C"

maybe the locale is using the wrong character set ... as i said, i do not know a lot localisation


I need to spend some more time to find out what is going on......
Back to top
View user's profile Send_private_message 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Tue 16 May 2006, 08:16    Post_subject:  

Dillo is based on Gtk1.
Gtk1 cannot display Unicode as far as I know.

So Dillo will not be able to display chinese in the menus and option-dialogs.
The next release of Dillo will be based on Fltk, maybe that can display unicode.

Mark
Back to top
View user's profile Send_private_message Visit_website 
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Tue 16 May 2006, 12:44    Post_subject:  

This is something I will look into (FLTK + unicode) but right off my guess would be that unicode will be supported. Dillo is not the only major project porting over to FLTK, Cinepaint is doing so as well. I have to assume the developers at least took this into consideration.

If my memory serves I did read about it once, and the reply given was that unicode will be supported by FLTK but that support is not fully complete yet. Like I said, I'll research it.

Nathan

_________________
Bring on the locusts ...
Back to top
View user's profile Send_private_message AIM YIM MSNM 
nyu


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

PostPosted: Tue 16 May 2006, 20:44    Post_subject:  

Thanks, I am learning more and more. There are many software
packages in Puppy which can't display Chinese. I want to know why.
Basically because they were written in gtk 1.x? I brought up Dillo because
it is the internal web browser for Puppy. It will be nice to display menus
and option-dialogs in Chinese. More and easier localization of Puppy will
spread Puppy to China, Taiwan, Hong Kong and oversea Chinese Laughing
I am just wondering why the following Dillo setup page can display Japanese.
http://teki.jpn.ph/pc/software/dillo-cfg-i18n.png
Are they using other than Unicode? I also have tried a Knoppix Chinese
distribution which uses zh_TW.Big5 as the locale. It can display menus
and option-dialogs in Traditional Chinese. Searching google gave me some
information of how to make a file in /etc/gtk to deal with gtk 1.x and Unicode.
But I have tried in Puppy without success. I am stuck. If some more
knowledgale people in this community can give me hands, I will be really
appreciated it.
Thanks again,
nyu
Back to top
View user's profile Send_private_message 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Tue 16 May 2006, 23:43    Post_subject:  

nyu, I have no idea...
I think Gtk itself might have to be compiled with UTF8-support?
Maybe Barry deactivated it?

maybe at http://gtk.org some hints can be found.

I know from wxWidgets (that uses Gtk), that the Utf8-feature in version 2.6 was very difficult to compile, one reason why wxBasic still uses the older wxWidgets 2.4.
Back to top
View user's profile Send_private_message Visit_website 
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Wed 17 May 2006, 00:28    Post_subject:  

I haven't tried it but this seems on target:
Quote:
GTK 1.x method

XMMS use GTK 1.x and sometimes don't display utf-8. this is a little tweak. Just define a gtk1 font for the your user by creating (or editing) ~/.gtkrc:

Type "nano ~/.gtkrc" and put the following into the file.


Code:
style "user-font"
      fontset = "-misc-fixed-*-*-*-*-12-*-*-*-*-*-iso10646-1"
       
widget_class "*" style "user-font"


From some gentoo documentation on enabling unicode, this is a GTK-1.x section. It mentions XMMS but hopefully the same applies to other GTK-1 apps as well.

Nathan

_________________
Bring on the locusts ...
Back to top
View user's profile Send_private_message AIM YIM MSNM 
nyu


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

PostPosted: Wed 17 May 2006, 05:59    Post_subject:  

I have tried it but it didn't work for me.
Back to top
View user's profile Send_private_message 
nyu


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

PostPosted: Wed 17 May 2006, 08:42    Post_subject:  

MU wrote:
nyu, I have no idea...
I think Gtk itself might have to be compiled with UTF8-support?
Maybe Barry deactivated it?

maybe at http://gtk.org some hints can be found.

I know from wxWidgets (that uses Gtk), that the Utf8-feature in version 2.6 was very difficult to compile, one reason why wxBasic still uses the older wxWidgets 2.4.


Since Barry is very interested in the OLPC project, he should be more aware of Internationalization and localization of Puppy. I assume most of these laptops
will be end up to developing countries Embarassed
nyu
Back to top
View user's profile Send_private_message 
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Wed 17 May 2006, 09:19    Post_subject:  

Good point, but let's approach that with some tact.

Nathan

_________________
Bring on the locusts ...
Back to top
View user's profile Send_private_message AIM YIM MSNM 
sin

Joined: 11 Apr 2006
Posts: 23

PostPosted: Tue 24 Oct 2006, 03:02    Post_subject: Some thoughts  

I just want to propose an approach to simplify Puppy scripts and wizards internationalization.

There is an approach without MU's 1'st step (Replace each word with a variable): every localizable piece of text is left in place in english but passed as a peremeter to translating function t(). t() is trivial when locale (or other variable) set to english, and returns appropriate translation in other case.

Similar thing is used in Drupal CMS for localization. Actual translated pieces of code are stored in database (we can use SQLLite) and exported/imported using .po files. We can replace database with a gettext library to work with po and mo without database.

The advantage of this approach is tiny the ammount of effort from developers of scripts and wizards -- no need to insert constants, just add t() function calls. English po files for translations are created automatically from script/wizard by a perl or php script (we can use Drupal's extract.php).

The disadvantage is speed and duplication (we can't throw out english from localized version, it wasetes space cause it is built into sources).
Back to top
View user's profile Send_private_message 
sin

Joined: 11 Apr 2006
Posts: 23

PostPosted: Tue 24 Oct 2006, 04:14    Post_subject:  

GuestToo alredy tested proposed approach, I just found his gettext translating program - demo 2 topic. Just "eval_gettext" instead of "t".
Back to top
View user's profile Send_private_message 
JohnMc

Joined: 07 Apr 2006
Posts: 118

PostPosted: Thu 26 Oct 2006, 12:02    Post_subject: Localization  

I would like to get back to Kingskid's remark on getting the translations done. If the developers can settle on the approach (ie gettext, or?) and provide the necessary translation file & format some of us lesser mortals could do translations.

And I'll put the stake in the ground right now -- I'll sign my family up for the Russian translation.
Back to top
View user's profile Send_private_message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Thu 26 Oct 2006, 23:25    Post_subject:  

my dotpup handler script in Puppy 210 and 211 uses gettext for translation ... there are only 2 translations so far, de and fr

the trouble is, i used xmessage/gxmessage to display the messages ... xmessage is small and simple ... xmessage is a gtk1 app, so it does not display unicode properly ... gxmessage is a gtk2 app, and can display unicode characters

so i have to think about what to do ... gxmessage is small, 21k (11k if compressed with UPX), but it is not included in the standard Puppy iso

i could rewrite the handler script so that it uses another program to display messages that will support UFT8

or i could make sure gxmessage is installed when translations are installed, and if gxmessage is not available to force en messages

the handler script is really just the first alpha version of an experiment using gettext, but since the older script supposedly did not work in Puppy 210, the experimental alpha script was put in Puppy 210 ... it seems to work ok, so far, but translations are not fully supported, because of xmessage

i guess it could be rewritten using gtkdialog ... xmessage has a simpler syntax, though ... i like to keep things simple ... maybe a puppybasic wrapper would keep it the script simple ...

oh, and the script has changed since the .po file was made ... the strings are still the same, just the line numbers are a little different
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 3 of 3 Posts_count   Goto page: Previous 1, 2, 3
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.0840s ][ Queries: 12 (0.0055s) ][ GZIP on ]