Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Untranslatable app #2

Open
ghost opened this issue Apr 11, 2016 · 14 comments
Open

Untranslatable app #2

ghost opened this issue Apr 11, 2016 · 14 comments

Comments

@ghost
Copy link

ghost commented Apr 11, 2016

Hello,
Could you please make this app translatable?
Thanks for this great work!

@nomelif
Copy link
Owner

nomelif commented Apr 12, 2016

Thanks. I have been trying to wrap my head around the translation thing, but I can't understand how to do it. I would myself really like to see it in my native language too. Could you help me do it? I will try to RTFM more.

@ghost
Copy link
Author

ghost commented Apr 17, 2016

Unfortunately, I don't know much more about it...
Maybe you could ask help to @bhdouglass, since we've worked together on the ownCloud File Scope?

@bhdouglass
Copy link

@nomelif there is a tutorial about adding translations to qml here: https://developer.ubuntu.com/en/phone/apps/qml/tutorials/internationalizing-your-app/
Mostly you just wrap your strings with i18n.tr() and the sdk should take care of the rest.

@ghost ghost mentioned this issue Aug 8, 2016
@ghost
Copy link
Author

ghost commented Aug 8, 2016

OK, it took a while but I think I have understood.
I have added i18n.tr() in the .qml files where translation was possible (title: "..." and text: "...").
Then I have opened the .qmlproject file in the Ubuntu SDK and have generated the translation template (.pot file) by going into the menu Compile/Ubuntu/Translations/Update translations template (this was the hardest part to understand).
Finally I have duplicated and renamed the .pot file in a fr.po file and have translated in French the msgid "" strings in the msgstr "" lines (you should be able to add more languages by doing it again and again).
Could you give me a feedback to tell me if it is OK?

@nomelif
Copy link
Owner

nomelif commented Aug 9, 2016

Supposing it builds the French looks very good. I'm not exactly sure about "markings" -> "notations", but I can't come up with anything better either.

@nomelif
Copy link
Owner

nomelif commented Aug 9, 2016

Am I right in believing that adding another language is just adding another .PO file?

@ghost
Copy link
Author

ghost commented Aug 9, 2016

For the translation of "markings", I used this article, but now I think "coordonnées" ("coordinates") could be more accurate.

To add another language, you can duplicate the .pot file in the same folder and rename it (de.po for German, it.po for Italian, etc.) then perform the translations in the .po file created.

@nomelif
Copy link
Owner

nomelif commented Aug 9, 2016

I think markings is actually a poor wording on my part. Coordinates would make more sense both in English and in French. To my understanding the notation on the article refers to the whole way of describing moves including coordinates and what pawns are moved.

@ghost
Copy link
Author

ghost commented Aug 9, 2016

I agree.

@nomelif
Copy link
Owner

nomelif commented Aug 9, 2016

Would you want direct coming rights? (Btw. I added Finnish.)

@ghost
Copy link
Author

ghost commented Aug 10, 2016

No thanks.
I think the best solution for long term is to host the translations in Launchpad, this way the translations could be more easily reviewed by Ubuntu Translators.

@nomelif
Copy link
Owner

nomelif commented Aug 12, 2016

(I was away until now and got access to QtCreator only today.)

@bhdouglass I am sorry to spam you, but I can't figure out the

and the sdk should take care of the rest.

part.

I have been fighting with the thing for the whole day, read through that tutorial thrice and - I kid you not - installed ubuntu into three different virtual machines thinking my frankensetup was simply broken. I can't get QtCreator to detect the po folder.

Did you actually get the thing to build, @Anne017 ?

To quote the document:

The SDK automatically builds it during the build step of your application. When you run it, create your click package or click the build button, it generates or re-generates it.

This doesn't happen.

The project doesn't have a cmake file, could that be the reason?

Sorry for my overwhelming stupidness.

@bhdouglass
Copy link

Sorry I can't be more help, I haven't had a whole lot of luck with translations myself. There is a "Ubuntu App Dev" group on Telegram that might be a good place to ask.

@ghost
Copy link
Author

ghost commented Aug 14, 2016

In the tutorial:

The SDK automatically builds it [the .pot file] during the build step of your application. When you run it, create your click package or click the build button, it generates or re-generates it.

For me it has not worked and I have manually created the .pot file:

Then I have opened the .qmlproject file in the Ubuntu SDK and have generated the translation template (.pot file) by going into the menu Compile/Ubuntu/Translations/Update translations template (this was the hardest part to understand).

Maybe you could add a CMakeLists.txt file in the po folder to see what's happen?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants