Translate to Brazilian Portuguese (pt_BR) #144

Merged
erinn merged 1 commits from agentofuser/ui:pt_BR into master 2019-03-18 23:55:16 +00:00
Contributor

First stab at a translation. I haven't been able to compile it and run locally yet so some things might be off. I'll update the branch once I manage to do that.

First stab at a translation. I haven't been able to compile it and run locally yet so some things might be off. I'll update the branch once I manage to do that.
Member

Drone Build Status: success

https://build.openprivacy.ca/cwtch.im/ui/111

Drone Build Status: success https://build.openprivacy.ca/cwtch.im/ui/111
Owner

awesome

I updated the translation instruction in the README a bit.

To test your translation you'll want to follow those and add the new file to ui.pro and then you can use 'lupdate' to update it and 'lrelease' to compile it and test it in cwtch.

If you need any help, just ask!

awesome I updated the translation instruction in the README a bit. To test your translation you'll want to follow those and add the new file to ui.pro and then you can use 'lupdate' to update it and 'lrelease' to compile it and test it in cwtch. If you need any help, just ask!
Author
Contributor

Still haven't been able to run the app, but managed to use Qt Linguist and compile the translations (added to ui.pro).

Still haven't been able to run the app, but managed to use Qt Linguist and compile the translations (added to `ui.pro`).
Member

Drone Build Status: success

https://build.openprivacy.ca/cwtch.im/ui/120

Drone Build Status: success https://build.openprivacy.ca/cwtch.im/ui/120
Member

Drone Build Status: success

https://build.openprivacy.ca/cwtch.im/ui/121

Drone Build Status: success https://build.openprivacy.ca/cwtch.im/ui/121
Author
Contributor

@dan I managed to build and run the desktop Qt app on macOS, but I can't figure out how to change the translation file that it loads.

I tried changing the line

translator.Load("translation_"+core.QLocale_System().Name(), ":/i18n/", "", "")

to

translator.Load("translation_pt", ":/i18n/", "", "")

then run go build and qtdeploy build desktop, but the UI still uses English. Is there an easy way to switch that, perhaps even without having to recompile/restart the app?

@dan I managed to build and run the desktop Qt app on macOS, but I can't figure out how to change the translation file that it loads. I tried changing the line ``` translator.Load("translation_"+core.QLocale_System().Name(), ":/i18n/", "", "") ``` to ``` translator.Load("translation_pt", ":/i18n/", "", "") ``` then run `go build` and `qtdeploy build desktop`, but the UI still uses English. Is there an easy way to switch that, perhaps even without having to recompile/restart the app?
Owner

my bad, the README needs an update. You need to add your translation file to the qml.qrc file listing, under the other two. Without that it appears that the compile translation resource file isn't being copied into the compiled directory and isn't loadable. We'll update the README shortly :) thanks for catching this!

Also yes, erinn is working on a UI locale switcher now too

my bad, the README needs an update. You need to add your translation file to the qml.qrc file listing, under the other two. Without that it appears that the compile translation resource file isn't being copied into the compiled directory and isn't loadable. We'll update the README shortly :) thanks for catching this! Also yes, erinn is working on a UI locale switcher now too
erinn closed this pull request 2019-03-18 23:55:14 +00:00
Owner

the file also needs to be added to the qrc. i have another PR (with the language switcher!) that i'll submit momentarily.

@agentofuser thanks so much for being our first completed translation!!! :D

the file also needs to be added to the qrc. i have another PR (with the language switcher!) that i'll submit momentarily. @agentofuser thanks so much for being our first completed translation!!! :D
Author
Contributor

@erinn oh, nice! The language switcher will come in very handy. I'm glad to help, thank you for your work on this much-needed project :)

@erinn oh, nice! The language switcher will come in very handy. I'm glad to help, thank you for your work on this much-needed project :)
This repo is archived. You cannot comment on pull requests.
No description provided.