| View previous topic :: View next topic |
| Author |
Message |
tegarden n00b

Joined: 02 Nov 2003 Posts: 22
|
Posted: Mon Nov 03, 2003 3:30 pm Post subject: Portage internationalization / localization |
|
|
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 |
|
 |
tegarden n00b

Joined: 02 Nov 2003 Posts: 22
|
Posted: Mon Nov 03, 2003 4:56 pm Post subject: Initial emerge patch |
|
|
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 |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8657 Location: beyond the rim
|
Posted: Mon Nov 03, 2003 5:17 pm Post subject: |
|
|
| 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 |
|
 |
tegarden n00b

Joined: 02 Nov 2003 Posts: 22
|
Posted: Tue Nov 04, 2003 4:18 am Post subject: |
|
|
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 |
|
 |
|
|
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
|
|