Gentoo Forums
Gentoo Forums
Quick Search: in
Portage internationalization / localization
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
tegarden
n00b
n00b


Joined: 02 Nov 2003
Posts: 22

PostPosted: Mon Nov 03, 2003 3:30 pm    Post subject: Portage internationalization / localization Reply with quote

Is anyone working to internationalize / localize portage? Given the international character of the Gentoo community, I would expect there would be an effort underway. If not, let's start one. The python stuff at least should be pretty easy to gettext'ize.

If other people are interested in working on this, respond and we'll work on distributing the task among us. I've started on emerge.

--Ben
Back to top
View user's profile Send private message
tegarden
n00b
n00b


Joined: 02 Nov 2003
Posts: 22

PostPosted: Mon Nov 03, 2003 4:56 pm    Post subject: Initial emerge patch Reply with quote

I've submitted a patch marking the easiest strings translatable -- to complete this task will require quite a bit of work, as portage prints a lot of things like this
Code:
print 'This is my ', foo, ' example'

instead of
Code:
print 'This is my %s example' % foo

which makes marking the strings (and eventually translating them) much more difficult. So, for the most part, I've avoided these strings so far.

To really do this right, we could use some people who have a lot of experience with this stuff (ie, not me) to mark up the C files (and modify the corresponding build scripts). I don't have faith that I could do this correctly, so I'll stick with Python code for the time being.

--Ben
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 8657
Location: beyond the rim

PostPosted: Mon Nov 03, 2003 5:17 pm    Post subject: Reply with quote

Personally I don't think it's worth the effort, portage is moving too fast to really provide translations. And the amount of work to implement it in the current codebase would probably be equal to a half rewrite. Also the portage developers don't have much (if any) expierience with gettext.
Back to top
View user's profile Send private message
tegarden
n00b
n00b


Joined: 02 Nov 2003
Posts: 22

PostPosted: Tue Nov 04, 2003 4:18 am    Post subject: Reply with quote

Even if we don't translate everything (or anything) right now, marking strings as translateable is a good practice. At some point, we'll want the application translated, and it'll be easier to do that if we've been marking the strings properly along the way.

As for the code rewrite required, it's true that a lot of the printing code needs to be rearranged (as I described above) to allow proper translation. However, this will need to be done eventually and there's no time like the present.

In terms of gettext experience, marking translateable strings is a pretty easy process, well documented in the gettext module documentation at www.python.org. Basically, we need to import the gettext module and instead of having
Code:
print "Hello world!"

have
Code:
print _("Hello world!")


BTW, work on this is associated with Bug 13618: http://bugs.gentoo.org/show_bug.cgi?id=13618

--Ben
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
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