Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Export and import .tr files in other languages than english<-->LANG
Export and import .tr files in other languages than english<-->LANG [message #34172] Thu, 27 October 2011 19:51 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
Hi,

I'd like to give a friend my app text to translate in German... but he can't speak english, so the best would be to give him some ITALIAN<-->GERMAN list, which is not actually possible with .tr files.
Another option would be to give him all .t files from upp project (that one would be my preferred solution....), but then most special chars are converted to \xxx codes, which makes transaltion almost impossible from outside theide.

So, the best would be, imho, to add an "export/import .t translations", which could gather all .t files and produce a single .t file with all languages and with \xxx codes converted to readable chars.

Would it be possible to add it ?

Max
Re: Export and import .tr files in other languages than english<-->LANG [message #34173 is a reply to message #34172] Thu, 27 October 2011 21:23 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

Hi Max

What about temporarily switching the content of corresponding T_() and itIT() macros? Then Italian would became the default language and it would be simple to do the it -> de translation using the .tr files. It should be quite simple to write a script or few lines of U++ to do the switching... Of course it is just a workaround Smile

Best regards,
Honza
Re: Export and import .tr files in other languages than english<-->LANG [message #34174 is a reply to message #34173] Thu, 27 October 2011 22:00 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
Well, yes, but then I could also write a small app that replaces all \xxx code with corresponding chars... but It'll be also a workaround... Anyways, I could also write a script that "repairs" .t files replacing \xxx codes with corresponding chars and back, but that one would also be a workaround.

The best would be to ask theide to do it automatically Smile

Maybe a good idea would be to have a file with 2 choosen languages:

IT-IT <--> DE-DE
someitaliantranslation
somegermantranslation
.....


Or, maybe keep it as it is now, with english + space for dest language AND a language of choice as comment/guideline between them. That'll make translation easy also for people that can't speak english.

Max

Re: Export and import .tr files in other languages than english<-->LANG [message #34175 is a reply to message #34172] Thu, 27 October 2011 22:10 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1071
Registered: March 2006
Location: Italy
Experienced Contributor
mdelfede wrote on Thu, 27 October 2011 19:51


Another option would be to give him all .t files from upp project (that one would be my preferred solution....), but then most special chars are converted to \xxx codes, which makes transaltion almost impossible from outside theide.



If he uses a utf8 editor he will be able to see the characters correctly (I assume utf8 is your default). Under linux it is very easy to found such a editor.
Another possibility is to send him the whole theide with the tyranslation.t. Theide will be used as editor.

Ciao,
Luigi

[Updated on: Thu, 27 October 2011 22:11]

Report message to a moderator

Re: Export and import .tr files in other languages than english<-->LANG [message #34176 is a reply to message #34175] Thu, 27 October 2011 22:12 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
forlano wrote on Thu, 27 October 2011 22:10


If he uses a utf8 editor he will be able to see the characters correctly (I assume utf8 is your default). Under linux it is very easy to found such a editor.
Another possibility is to send him the whole theide with the tyranslation.t. Theide will be used as editor.

Ciao,
Luigi



Uhmmmm.... I loaded .t into an utf8 editor, but special chars are replaced with \xxx codes, so I guess is something inside .t files, not an editor problem....
Re: Export and import .tr files in other languages than english<-->LANG [message #34177 is a reply to message #34172] Fri, 28 October 2011 01:10 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

Actually it is quite simple to add this functionality Smile To any application, this is not related to theide, just to Core. See the attached patch. It allows to add comments in desired language into the .tr file. Usage is "myapp --export-tr deDE itIT", where both of the parameters are optional.

It is just quickly stiched together, but since it is mostly copy-paste of existing code, it should work Smile

Honza
Re: Export and import .tr files in other languages than english<-->LANG [message #34178 is a reply to message #34177] Fri, 28 October 2011 09:53 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
Hi Honza,

that would be a perfect solution Smile

Mirek, could you apply it to Core ?

Max
Re: Export and import .tr files in other languages than english<-->LANG [message #34256 is a reply to message #34178] Mon, 07 November 2011 09:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
Applied, with some changes. Would be nice if somebody checked it still works Wink
Re: Export and import .tr files in other languages than english<-->LANG [message #34305 is a reply to message #34256] Thu, 10 November 2011 18:55 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
mirek wrote on Mon, 07 November 2011 09:27

Applied, with some changes. Would be nice if somebody checked it still works Wink



Yep, it works Smile

Btw, manual page is wrong about where the .tr file is exported in linux (it took me 30 minutes to find it...) :

File is named as translation and exported into home folder :

/home/massimo/dede.tr

for example.

Max
Re: Export and import .tr files in other languages than english<-->LANG [message #34315 is a reply to message #34305] Fri, 11 November 2011 14:13 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
Could you update documentation please?

Mirek
Re: Export and import .tr files in other languages than english<-->LANG [message #34330 is a reply to message #34315] Sun, 13 November 2011 13:38 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
mirek wrote on Fri, 11 November 2011 14:13

Could you update documentation please?

Mirek


I tried, but I got "access denied" error from svn....

Max
Re: Export and import .tr files in other languages than english<-->LANG [message #34368 is a reply to message #34330] Fri, 18 November 2011 18:42 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12098
Registered: November 2005
Ultimate Member
mdelfede wrote on Sun, 13 November 2011 07:38

mirek wrote on Fri, 11 November 2011 14:13

Could you update documentation please?

Mirek


I tried, but I got "access denied" error from svn....

Max



Hopefully fixed, could you try again please?
Re: Export and import .tr files in other languages than english<-->LANG [message #34443 is a reply to message #34368] Tue, 22 November 2011 18:57 Go to previous message
mdelfede is currently offline  mdelfede
Messages: 1259
Registered: September 2007
Senior Contributor
Done, it works now.

Max
Previous Topic: Semi-automated translation for U++
Next Topic: Help for Indian Language Unicode display
Goto Forum:
  


Current Time: Thu Nov 14 19:57:48 CET 2019

Total time taken to generate the page: 0.01929 seconds