Skip to content

Commit

Permalink
Merge pull request #101 from Terralego/improve_translations
Browse files Browse the repository at this point in the history
Improve translations
  • Loading branch information
submarcos committed Dec 11, 2020
2 parents 5f7f167 + 811ad5b commit e76f53f
Show file tree
Hide file tree
Showing 18 changed files with 134 additions and 90 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ on:

jobs:
lint:

runs-on: ubuntu-18.04
strategy:
matrix:
python-version: ['3.9']
python-version: ['3.6']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -83,4 +82,4 @@ jobs:
- name: Coverage upload
run: |
pip install codecov
codecov
codecov
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ coverage.xml
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
Expand Down Expand Up @@ -104,3 +103,5 @@ venv.bak/
# mypy
.mypy_cache/
.idea/
/test_geostore/locale/en/LC_MESSAGES/django.mo
/test_geostore/locale/fr/LC_MESSAGES/django.mo
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CHANGELOG
0.5.6.dev0 (XXXX-XX-XX)
---------------------------

* Fix and include translations
* Fix template export mail with hyperlink


Expand Down
2 changes: 1 addition & 1 deletion doc/vectortiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Here we describe available json keys and its content, then we provide your an ex
metadata
--------

Contains all data metadatas that can be added to tile content, it allows you to store it in a
Contains all data metadata that can be added to tile content, it allows you to store it in a
convenient way.

attribution
Expand Down
4 changes: 2 additions & 2 deletions geostore/import_export/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ def send_mail_export(user, path=None):
url = default_storage.url(path)
context = {"username": user.get_username(), "url": url}
if not path:
template_email = 'exports_no_datas'
template_email = 'exports_no_data'
else:
template_email = 'exports'
html = get_template('geostore/emails/{}.html'.format(template_email))
html_content = html.render(context)
txt = get_template('geostore/emails/{}.txt'.format(template_email))
txt_content = txt.render(context)
send_mail(_('Export ready'), txt_content, None, [getattr(user, user.get_email_field_name())],
send_mail(_('Your data export is ready'), txt_content, None, [getattr(user, user.get_email_field_name())],
html_message=html_content, fail_silently=True)


Expand Down
Binary file added geostore/locale/en/LC_MESSAGES/django.mo
Binary file not shown.
25 changes: 16 additions & 9 deletions geostore/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-11-18 17:09+0000\n"
"POT-Creation-Date: 2020-12-11 10:46+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -21,7 +21,7 @@ msgstr ""
msgid "Geographic Store"
msgstr ""

msgid "Export ready"
msgid "Your data export is ready"
msgstr ""

msgid "Import INSEE data from csv to db."
Expand Down Expand Up @@ -75,12 +75,12 @@ msgid "Specify type of layer"
msgstr ""

msgid ""
"Name of created layer containing GeoJSON datas.If not provided an uuid4 is "
"Name of created layer containing GeoJSON data. If not provided an uuid4 is "
"set."
msgstr ""

msgid ""
"PK of the layer where to insertthe features.\n"
"PK of the layer where to insert the features.\n"
"A new layer is created if not present."
msgstr ""

Expand Down Expand Up @@ -153,8 +153,10 @@ msgstr ""
msgid ""
"\n"
"Hello <strong>%(username)s</strong>\n"
"\n"
"Your file is ready : %(url)s\n"
"<br>\n"
"<br>\n"
"Your file is ready : <a href=\"%(url)s\">%(url)s</a>\n"
"<br>\n"
msgstr ""

#, python-format
Expand All @@ -169,16 +171,18 @@ msgstr ""
msgid ""
"\n"
"Hello <strong>%(username)s</strong>\n"
"\n"
"There are no datas in the layer you asked for.\n"
"<br>\n"
"<br>\n"
"There are no data in the layer you asked for.\n"
"<br>\n"
msgstr ""

#, python-format
msgid ""
"\n"
"Hello %(username)s\n"
"\n"
"There are no datas in the layer you asked for.\n"
"There are no data in the layer you asked for.\n"
msgstr ""

#, python-brace-format
Expand All @@ -202,3 +206,6 @@ msgstr ""

msgid "Features are missing in GeoJSON"
msgstr ""

msgid "Invalid \"property\" GET parameter"
msgstr ""
Binary file added geostore/locale/fr/LC_MESSAGES/django.mo
Binary file not shown.

0 comments on commit e76f53f

Please sign in to comment.