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

12 add translations #258

Merged
merged 96 commits into from
Mar 4, 2024
Merged

12 add translations #258

merged 96 commits into from
Mar 4, 2024

Conversation

mhhd2020
Copy link
Contributor

@mhhd2020 mhhd2020 commented May 16, 2023

  • Add Flask-Babel to the project and mark all strings for translation
  • Provide German translations
  • Use everything still applicable from the Portuguese translations for the old version of the Sketch Map Tool
  • link to crowdin in CONTRIBUTING.md
  • Document Error Translation
  • tests
  • ruff
  • vcr

Closes #367

@mhhd2020 mhhd2020 linked an issue May 16, 2023 that may be closed by this pull request
@mhhd2020 mhhd2020 self-assigned this May 16, 2023
@mhhd2020 mhhd2020 added documentation Improvements or additions to documentation enhancement New feature or request component:website labels May 16, 2023
@mhhd2020 mhhd2020 force-pushed the 12-add-translations branch from 901c7df to 8339ebf Compare May 26, 2023 11:41
Dockerfile Outdated
@@ -39,6 +39,9 @@ COPY --chown=smt:smt sketch_map_tool sketch_map_tool
COPY --chown=smt:smt data/ data/
RUN python -m poetry install --no-ansi --no-interaction

# Compile translations
RUN python3 -m poetry run pybabel compile -d sketch_map_tool/translations
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RUN python3 -m poetry run pybabel compile -d sketch_map_tool/translations
RUN python -m poetry run pybabel compile -d sketch_map_tool/translations

@@ -61,7 +61,7 @@ celery --app sketch_map_tool.tasks worker --loglevel=INFO

```bash
mamba activate smt
flask --app sketch_map_tool/routes.py --debug run
flask --app sketch_map_tool/routes.py --debug run -p 5000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
flask --app sketch_map_tool/routes.py --debug run -p 5000
flask --app sketch_map_tool/routes.py --debug run

pyproject.toml Outdated
Comment on lines 24 to 27
# these dependencies are maintained by your local setup and have to be fixed for now, since poetry and (py)gdal packages can't work together
# if you change these versions, please change them in development-setup.md, Dockerfile and .github/workflows/python.yml as well
#numpy = "1.23.5"
#pygdal = "3.4.1.10"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# these dependencies are maintained by your local setup and have to be fixed for now, since poetry and (py)gdal packages can't work together
# if you change these versions, please change them in development-setup.md, Dockerfile and .github/workflows/python.yml as well
#numpy = "1.23.5"
#pygdal = "3.4.1.10"

@@ -1,8 +1,10 @@
import logging
import os
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed?

esbuild.js Outdated
@@ -16,7 +17,7 @@ require("esbuild")
entryNames: "[dir]", // will name the result files by their folder names
outbase: "./client-src",
bundle: true,
minify: true,
// minify: true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

flask_app.config.update(
CELERY_CONFIG=CELERY_CONFIG,
BABEL_DEFAULT_LOCALE="en",
LANGUAGES={"en": "English", "de": "Deutsch", "pt": "Portuguese"},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LANGUAGES={"en": "English", "de": "Deutsch", "pt": "Portuguese"},
LANGUAGES={"en": "English", "de": "Deutsch"},

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add fr

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and es

@mhhd2020
Copy link
Contributor Author

mhhd2020 commented Mar 1, 2024

@mhhd2020 nice job so far :). The topic of i18n has now resurfaced and we are glad to have your contribution!

👍 Nice to see that the Sketch Map Tool is still flourishing and continues to be improved!

@matthiasschaub
Copy link
Collaborator

@mhhd2020 nice job so far :). The topic of i18n has now resurfaced and we are glad to have your contribution!

👍 Nice to see that the Sketch Map Tool is still flourishing and continues to be improved!

Great to hear from you. Yeah, the Sketch Map Tool is in active development :)

@matthiasschaub matthiasschaub marked this pull request as ready for review March 4, 2024 08:40
matthiasschaub
matthiasschaub previously approved these changes Mar 4, 2024
@ElJocho ElJocho merged commit 8817f8f into main Mar 4, 2024
1 check passed
@ElJocho ElJocho deleted the 12-add-translations branch March 4, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:website documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: add how to set path_lib env for pycharm to development docs Add translations
4 participants