Go Back   maemo.org - Talk > OS / Platform > Maemo 5 / Fremantle
 
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
  #1  
Old 2010-04-30, 10:11
Chrome's Avatar
Chrome Chrome is offline
 
Join Date: Feb 2010
Location: PS/IL
Posts: 349
Thanks!: 1,068
Thanked 309 Times in 104 Posts
Default Is there a way to translate application/games?

Hello,

There is an easy way to translate Maemo OS by translating .po/.mo files located in usr/share/locale using poedit program, shown in this thread: http://talk.maemo.org/showthread.php?t=50980

Is there a similar way to translate any application/game?

Like locating the files that are responsible for the language output in the source of the package?

Thanks in advance.
Reply With Quote
  #2  
Old 2010-04-30, 10:17
benny1967's Avatar
benny1967 benny1967 is offline
 
Join Date: Mar 2006
Location: Vienna, Austria
Posts: 3,790
Thanks!: 5,264
Thanked 5,718 Times in 1,546 Posts
Default Re: Is there a way to translate application/games?

It's the same mechanism usually - if the author of the software uses it (which most do).

Are you trying to provide translations for existing software?
Or do you want to write new software and find a way to have it translated?
Reply With Quote
  #3  
Old 2010-04-30, 10:19
Chrome's Avatar
Chrome Chrome is offline
 
Join Date: Feb 2010
Location: PS/IL
Posts: 349
Thanks!: 1,068
Thanked 309 Times in 104 Posts
Default Re: Is there a way to translate application/games?

Quote:
Originally Posted by benny1967 View Post
It's the same mechanism usually - if the author of the software uses it (which most do).

Are you trying to provide translations for existing software?
Or do you want to write new software and find a way to have it translated?
I want to provide translated versions of the currently available apps/games.
Reply With Quote
  #4  
Old 2010-04-30, 10:31
benny1967's Avatar
benny1967 benny1967 is offline
 
Join Date: Mar 2006
Location: Vienna, Austria
Posts: 3,790
Thanks!: 5,264
Thanked 5,718 Times in 1,546 Posts
Default Re: Is there a way to translate application/games?

What I do is:

a) Check if the application is in http://www.transifex.net/ - most probably it's not, far to few developers use this infrastructure, but if it is: start there.

b) If it's not in transifex, download the source package, look for the pot/po-files there and start working on them with an editor (such as poedit).

c) Put the the mo-file you created on your own N900 and look if it behaves well.

d) send it to the developer or open a bug in the projects bugzilla with the po-file attached.
Reply With Quote
The Following 4 Users Say Thank You to benny1967 For This Useful Post:
  #5  
Old 2010-04-30, 10:40
Chrome's Avatar
Chrome Chrome is offline
 
Join Date: Feb 2010
Location: PS/IL
Posts: 349
Thanks!: 1,068
Thanked 309 Times in 104 Posts
Default Re: Is there a way to translate application/games?

Quote:
Originally Posted by benny1967 View Post
What I do is:

a) Check if the application is in http://www.transifex.net/ - most probably it's not, far to few developers use this infrastructure, but if it is: start there.

b) If it's not in transifex, download the source package, look for the pot/po-files there and start working on them with an editor (such as poedit).

c) Put the the mo-file you created on your own N900 and look if it behaves well.

d) send it to the developer or open a bug in the projects bugzilla with the po-file attached.
Sounds easy to do, But can you provide me with a way/guide on how to deal with the application source, how to locate the .po files there? Do i depackage the .deb and search for the .po files in it?

Please forgive my ignorance, i know my questions are really stupid

Also can i keep the translated package for myself and share the translated .deb with other people without sending it to the author?
Reply With Quote
  #6  
Old 2010-04-30, 11:01
thp's Avatar
thp thp is offline
 
Join Date: Sep 2007
Location: Vienna, Austria
Posts: 1,391
Thanks!: 1,034
Thanked 4,271 Times in 842 Posts
Default Re: Is there a way to translate application/games?

Quote:
Originally Posted by Chrome View Post
Sounds easy to do, But can you provide me with a way/guide on how to deal with the application source, how to locate the .po files there? Do i depackage the .deb and search for the .po files in it?

Please forgive my ignorance, i know my questions are really stupid

Also can i keep the translated package for myself and share the translated .deb with other people without sending it to the author?
If you can't find the application listed on Transifex, this is roughly how you can do a new translation from the source package (in case the application is already "prepared" for translations, i.e. "gettextized"). Please be sure to contact the application maintainer first, as (s)he will be able to tell you exactly how translations are handled for that specific project. Sometimes it makes more sense to use the development repository (SVN, Git, etc..) instead of the source package, for example. In other cases, maybe the app has already been translated into your language, but the new translations have not been released yet.

Here's a quick HOW-TO for packages in Maemo.org Extras:
  • Go to http://maemo.org/packages/
  • Search for the package you want to translate
  • Click on the search result
  • Select the "Fremantle Extras-Devel free armel" package
  • Click on the link for "Source:"
  • Download the .tar.gz file
  • Extract the downloaded file and look for a messages.pot file
  • If you find the messages.pot file, rename it to yourlang.po (e.g. de.po for german) - alternatively, use an existing .po file and copy it to yourlang.po
  • Open the .po file with tools like poedit, translate and then send it to the maintainer (the maintainer can be found on the maemo.org/packages page as well)

Quote:
Originally Posted by Chrome View Post
Also can i keep the translated package for myself and share the translated .deb with other people without sending it to the author?
It depends on the license of the application - sometimes you have to share the source if you distribute the binary. What you need to do is set up some kind of build environment (Scratchbox) and build the package with your added translation from source and install that on your device (that's the recommended way - it would work if you compile the .po file to a .mo file [poedit does this automatically] and copy it to the right folder on the device, but that's really awkward and something you don't really want to do).

In short: The easiest (and most sane) way to do this is to submit the translated .po file to the application author and wait for an updated package.

Last edited by thp; 2010-04-30 at 11:05.
Reply With Quote
The Following 4 Users Say Thank You to thp For This Useful Post:
  #7  
Old 2010-04-30, 11:02
tommiasp tommiasp is offline
 
Join Date: Apr 2010
Location: Finland
Posts: 13
Thanks!: 7
Thanked 12 Times in 7 Posts
Default Re: Is there a way to translate application/games?

Qt has its own translation system
http://doc.trolltech.com/4.6/internationalization.html
Basically it allows users to provide their own translation packages
Reply With Quote
The Following 4 Users Say Thank You to tommiasp For This Useful Post:
  #8  
Old 2010-04-30, 11:45
Chrome's Avatar
Chrome Chrome is offline
 
Join Date: Feb 2010
Location: PS/IL
Posts: 349
Thanks!: 1,068
Thanked 309 Times in 104 Posts
Default Re: Is there a way to translate application/games?

@thp: Thanks very much, pretty much what i wanted to know.

@tommiasp: But thats only for Qt based apps, right?
Reply With Quote
  #9  
Old 2010-04-30, 12:29
Chrome's Avatar
Chrome Chrome is offline
 
Join Date: Feb 2010
Location: PS/IL
Posts: 349
Thanks!: 1,068
Thanked 309 Times in 104 Posts
Default Re: Is there a way to translate application/games?

I downloaded the source of Call-forward app.

i found po directory and it has a file called: POTFILES and POTFILES.in

also found .deps directory, contains: call-forward.Po

i tried to open them with poedit, and it doesn't show any strings.

also i didn't find messages.pot in the package

any of these are related to the language files?
Reply With Quote
  #10  
Old 2010-04-30, 12:38
benny1967's Avatar
benny1967 benny1967 is offline
 
Join Date: Mar 2006
Location: Vienna, Austria
Posts: 3,790
Thanks!: 5,264
Thanked 5,718 Times in 1,546 Posts
Default Re: Is there a way to translate application/games?

OK, this one's probably easy - I think...

http://repository.maemo.org/extras/p...ing_1.0.tar.gz
is the source package.

It contains a ./po directory. Within this directory, you'll find:
en_GB.po
fi_FI.po
pl_PL.po

to start with.

Leave the other files alone. The package maintainer should adapt them if necessary. I'd take the English en_GB.po as a template, translate it (I speak german, so I'd save it as de_DE.po then) and ask the package maintainer if he wants it.
Reply With Quote
The Following User Says Thank You to benny1967 For This Useful Post:
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 20:35.