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

[Fixes #6534] Missing translation tags in layer_list and layer_detail #6565

Merged
merged 11 commits into from
Nov 10, 2020

Conversation

gannebamm
Copy link
Contributor

Iso-Category texts will not get translated throughout the application. This PR fixes the fixtures (done) and will add {% trans %} tags were needed (not done yet)

Checklist

Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by completing the following items. Feel free to ask in a comment if you have troubles with any of them.

For all pull requests:

  • Confirm you have read the contribution guidelines
  • You have sent a Contribution Licence Agreement (CLA) as necessary (not required for small changes, e.g., fixing typos in the documentation)
  • Make sure the first PR targets the master branch, eventual backports will be managed later. This can be ignored if the PR is fixing an issue that only happens in a specific branch, but not in newer ones.

The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):

  • There is a ticket in https://github.com/GeoNode/geonode/issues describing the issue/improvement/feature (a notable exemption is, changes not visible to end-users)
  • The issue connected to the PR must have Labels and Milestone assigned
  • PR for bug fixes and small new features are presented as a single commit
  • Commit message must be in the form "[Fixes #<issue_number>] Title of the Issue"
  • New unit tests have been added covering the changes, unless there is an explanation on why the tests are not necessary/implemented
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • This PR passes the QA checks: flake8 geonode
  • Commits changing the settings, UI, existing user workflows, or adding new functionality, need to include documentation updates

Submitting the PR does not require you to check all items, but by the time it gets merged, they should be either satisfied or inapplicable.

@gannebamm gannebamm self-assigned this Oct 23, 2020
@cla-bot cla-bot bot added the cla-signed CLA Bot: community license agreement signed label Oct 23, 2020
@codecov
Copy link

codecov bot commented Oct 23, 2020

Codecov Report

Merging #6565 (fab9948) into master (68be33a) will not change coverage.
The diff coverage is 50.00%.

@@           Coverage Diff           @@
##           master    #6565   +/-   ##
=======================================
  Coverage   59.34%   59.34%           
=======================================
  Files         188      188           
  Lines       21198    21198           
  Branches     3506     3506           
=======================================
  Hits        12579    12579           
  Misses       7521     7521           
  Partials     1098     1098           

@afabiani afabiani added this to the 3.1 milestone Oct 26, 2020
@afabiani afabiani force-pushed the master branch 5 times, most recently from 6485901 to 4cc776e Compare October 27, 2020 14:51
@afabiani afabiani force-pushed the master branch 2 times, most recently from 4edaa14 to e4aa2cd Compare November 4, 2020 17:33
@afabiani afabiani force-pushed the master branch 2 times, most recently from b025b3c to 6927a65 Compare November 5, 2020 18:07
# Conflicts:
#	geonode/locale/de/LC_MESSAGES/django.po
#	requirements.txt
@gannebamm
Copy link
Contributor Author

I merged current master in my branch and updated the (german) translations again. I am still stuck with getting translated iso-categories from tastypie. Therefore the search side-bar categories are not yet translated (see #6534 second picture, left-hand side). The other missing strings do now work (tested for the german translation).

@afabiani I would wait for the tests and then merge this. I changed the fixtures as discussed. The other issue is most likely soon obsolete due to the new v2 api? @t-book told me I could write a serializer for tastypi to get the strings translated, but that is to much work, for a (for me at least) minor issue. What do you think?

@gannebamm gannebamm marked this pull request as ready for review November 9, 2020 16:55
@afabiani
Copy link
Member

@gannebamm before merging this one two things:

  1. The PR includes the removal of grappelli, is this wanted?
  2. The messages should be regenerated for all languages imho, even if not providing translations for all of them of course
DJANGO_SETTINGS_MODULE=geonode.local_settings django-admin makemessages --all -d djangojs -e "js" -i docs -i node_modules -i lib

DJANGO_SETTINGS_MODULE=geonode.local_settings django-admin makemessages --all -d django -e "html,txt,py" -i docs

@gannebamm
Copy link
Contributor Author

gannebamm commented Nov 10, 2020

@afabiani

  • The PR includes the removal of Grappelli, is this wanted?

No, it is not. I am sorry. Some local commit must have been accidentally pushed to my branch on GitHub.

  • The messages should be regenerated for all languages imho, even if not providing translations for all of them of course

There are no new msgids so I think this is not needed. Nonetheless, I have used the commands but do not see any local changes after git status. But I see some warnings for the monitoring js files, like:

./geonode/monitoring/frontend/monitoring/src/containers/app/actions.js:88: warning: RegExp literal terminated too early
./geonode/monitoring/frontend/monitoring/src/pages/alert-config/actions/set.js:80: warning: RegExp literal terminated too early
./geonode/monitoring/frontend/monitoring/src/pages/alerts-settings/actions.js:81: warning: RegExp literal terminated too early
./geonode/monitoring/frontend/src/api/index.js:155: warning: unterminated string
./geonode/monitoring/frontend/src/utils/RouteUtils.js:28: warning: RegExp literal terminated too early

But I think those can be ignored

@afabiani afabiani merged commit 437914c into GeoNode:master Nov 10, 2020
afabiani pushed a commit that referenced this pull request Nov 10, 2020
…#6565)

* updated geo limit texts and cart [#6131]

* iso-categories translation msgid fix

* layer detail trans tags [FIXES #6534]

* adds layer list objects and layer detail iso category translations.

* Revert " - Add django-grappelli==2.14.2 admin interface"

This reverts commit c9f594c

* get Iso categories po texts back and updated german trans for geoapps. Defuzzied some strings

* added compiled .mo file

* - Revert "grappelli" removal

Co-authored-by: Alessio Fabiani <alessio.fabiani@geo-solutions.it>
(cherry picked from commit 437914c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed CLA Bot: community license agreement signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants