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

Processing translate names and groups #2213

Merged
merged 2 commits into from
Jul 20, 2015

Conversation

arnaud-morvan
Copy link
Contributor

Add a python tool function to generate a python file which calls QCoreApplication.translate with algorithm names and groups.
This script have to be run from QGIS console (import of processing so qgis python api may be on python path).

from processing.tools.translation import updateTranslations
updateTranslations()

pylupdate will push these strings in .ts file when running update_ts.sh.

Alter AlgorithmClassification to return translated names and groups for the toolbox.

For the moment, I hav'nt pushed the produced python file.

Need validation for translation context strings for names and groups.

@volaya
Copy link
Contributor

volaya commented Jul 17, 2015

Looks good, but don't forget that there is another toolbox in the modeler, were algorithms and groups should also be translated. You PR doesn't seems to address that.

@arnaud-morvan
Copy link
Contributor Author

@volaya
Thanks for review

I've translated modeleur toolbox groups, for the names, it already use displayName() which return translated strings.
I've also added some comments in files and used "AlgorithmClassification" as context string for groups.
I've commited the python module containing translation strings (not pushed to transifex for now).
(commit amended, forced push)

@volaya
Copy link
Contributor

volaya commented Jul 20, 2015

Ok, this looks good to me. I will leave it to @alexbruy to confirm the merge, since he is the one that started all the Processing translation effort, and I do not know very well how the translation system works, but i think this is fine to merge.

Thanks for your work, Arnaud!

alexbruy added a commit that referenced this pull request Jul 20, 2015
[processing] translate algorithm names and groups
@alexbruy alexbruy merged commit eaddba6 into qgis:master Jul 20, 2015
@m-kuhn
Copy link
Member

m-kuhn commented Jul 22, 2015

When compiling latest master I get:

/dev/cpp/qgis/build/python/plugins/processing/stageinstall.cmake:12648: error: file COPY cannot find "/dev/cpp/qgis/QGIS/python/plugins/processing/algs/translations.py".

Is this related to this PR? Is this only a local issue and how can it be fixed?

@alexbruy
Copy link
Contributor

@m-kuhn looks like related to this PR, but I can not reproduce it. Maybe local issue

@m-kuhn
Copy link
Member

m-kuhn commented Jul 24, 2015

I realized that it is related to having WITH_STAGED_PLUGINS activated, but it no longer happens, so maybe only with a clean build dir?

@arnaud-morvan arnaud-morvan deleted the processing-translation branch May 23, 2016 09:24
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

Successfully merging this pull request may close these issues.

None yet

4 participants