FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Internationalization / translation

 
Post new topic   Reply to topic     Forum Index -> Indigo
View previous topic :: View next topic  
Author Message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Sat Jul 30, 2005 1:15 pm    Post subject: Internationalization / translation Reply with quote

Once on the NG, we discussed translation issues, epecially gettext (used by KDE) and the stuff in Qt.
Anyway, I don't know whether you've started on this, or is planning it at all, but there exist a XML standard for translation files called XLIFF (search for XLIFF on Google, it is a OASIS standard, but many pages of interest exist).

If I were to suggest anything, it is that if/when you/someone decide to implement support for such things in Indigo, then it should use XLIFF. Hmm, maybe it should be a library of it's own, it being a standard and all?

Well, that's a couple of cents up there.
Back to top
View user's profile Send private message
uwe



Joined: 05 Apr 2005
Posts: 34
Location: Stuttgart, Germany

PostPosted: Tue Aug 02, 2005 6:23 am    Post subject: Reply with quote

Translation is already implemented and works like a charm. It uses the Qt format (TS) for the translation files, and that was mostly chosen because of its simplicity. I also considered using the PO format like gettext, but discarded it because of some features i did not want to implement; XLIFF was totally unknown to me.

I will consider adding XLIFF support, but this will definitely take some time, as i am currently working on localization (number formatting, etc.) which is helluva complex theme on its own, and Stewart is working on Codecs and TextStream which proved to be much more complicated to implement than i thought.

The most important question is: are there tools for working with XLIFF? The TS format is of course editable with the Qt Linguist, or with KBabel, and i guess there could be some other editors, too. Does XLIFF provide something like that?

Anyways, the XML format is only used for the translation process. After translation a binary file is created out of it that is easy and fast to load for Indigo (otherwise it would need an XML parser just for translation).

Thanks for the idea! Ciao
uwe
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Tue Aug 02, 2005 11:49 am    Post subject: Reply with quote

uwe wrote:

The most important question is: are there tools for working with XLIFF? The TS format is of course editable with the Qt Linguist, or with KBabel, and i guess there could be some other editors, too. Does XLIFF provide something like that?


I don't know of any editors at the moment, but adding XLIFF support to KBabel is a Google Summer of Coding-project by a student studying such technologies (so I think it can be good). Some of the problems with other systems is apparently bad handling of plurals and contexts.

I would have liked to help, but I know from experience that now isn't the right time for me to commit myself to another project Smile
Back to top
View user's profile Send private message
uwe



Joined: 05 Apr 2005
Posts: 34
Location: Stuttgart, Germany

PostPosted: Tue Aug 02, 2005 12:23 pm    Post subject: Reply with quote

A quick look at the KBabel homepage shows that they already added XLIFF support in version 1.10!

I do not know what you mean with "context handling", but the current system in Indigo definitely has a bad plural handling - there is no such facility. Adding it would have required to add a simple C expression parser (to parse the plural selection expression in the PO file), and that was something i definitely do not want to add currently. Does XLIFF provide sophisticated plural support (as GNU gettext does)?

Perhaps plural support will be added in a later version. Currently this would be just overkill, as i don't know who is even using the translation module yet. My impression is that everybody is coding some more or less quick'n'dirty apps that only speak english; and they are mostly D code editors. Then again, i did not search through all dsource projects intensively.

By the way, which project are you working on currently?

Ciao
uwe
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Tue Aug 02, 2005 12:32 pm    Post subject: Reply with quote

uwe wrote:


By the way, which project are you working on currently?

Ciao
uwe


When it comes to XLIFF, gettext, etc, I don't know more than I already said Smile

For current projects:

* Eh, I'm kinda involved with dsource/sinbad, but it has been slow going...
* dsource/dcurses is mine, but currently abandoned
* looking into some minor std additions together with Matthew, but he is rather busy at the time
* Working (at least a while ago) on a TBA command line app (which I will add i18n to (atleast english and neo-norwegian))
* Oh, I added D support to www.a-a-p.org once, but I haven't tried/supported it in a while
* I've got an account on the www.yzis.org project (C++)
* Have made a couple of KDE patches recently, planning to do more
* Fiancee, two kids, house and a job
Back to top
View user's profile Send private message
uwe



Joined: 05 Apr 2005
Posts: 34
Location: Stuttgart, Germany

PostPosted: Tue Aug 02, 2005 12:49 pm    Post subject: Reply with quote

Somehow i think that you can trust your experience... Very Happy

Ciao
uwe
Back to top
View user's profile Send private message
uwe



Joined: 05 Apr 2005
Posts: 34
Location: Stuttgart, Germany

PostPosted: Tue Aug 02, 2005 11:12 pm    Post subject: Reply with quote

By the way, what does "TBA" mean?

Thai Bankers Association?
Tennessee Brokerage Agency?
Thyroxine Binding Albumine?
Trenes de Buenos Aires?
Technisch Bureau Andriessen?
Thuis Begeleiding Autisme???

:)
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Tue Aug 02, 2005 11:48 pm    Post subject: Reply with quote

uwe wrote:
By the way, what does "TBA" mean?

Thai Bankers Association?
Tennessee Brokerage Agency?
Thyroxine Binding Albumine?
Trenes de Buenos Aires?
Technisch Bureau Andriessen?
Thuis Begeleiding Autisme???

Smile


All of the above + To Be Announced
Back to top
View user's profile Send private message
uwe



Joined: 05 Apr 2005
Posts: 34
Location: Stuttgart, Germany

PostPosted: Sun Aug 07, 2005 12:46 pm    Post subject: Message formatting Reply with quote

A little update on i18n: I am currently working on other localization issues, and message formatting is already finished for strings and integers. That means you can output things like "Copying text.txt - file 3 of 8." in a completely localized manner. Look at the indigo.i18n.format module to read more. The above example would be coded like this:

Code:
char[] out = Format(i18n("Copying ?1 - file ?2 of ?3.")).arg(fileName).arg(curFile).arg(totalFiles).utf8;


Perhaps this is useful for your project...

Ciao
uwe
Back to top
View user's profile Send private message
larsivi
Site Admin


Joined: 27 Mar 2004
Posts: 453
Location: Trondheim, Norway

PostPosted: Mon Aug 08, 2005 12:16 am    Post subject: Re: Message formatting Reply with quote

uwe wrote:


Perhaps this is useful for your project...

Ciao
uwe


Looks nice, and yes, it will probably be useful. It'll probably be some time before I look into it again, sadly.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Indigo All times are GMT - 6 Hours
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


Powered by phpBB © 2001, 2005 phpBB Group