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

Translate QFieldCloud admin #1105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

gounux
Copy link
Contributor

@gounux gounux commented Jan 14, 2025

This PR sets up Django translations for QFieldCloud admin.

Spanish should be the first available language.

  • set up repository's transifex config using tx add
  • sync translations with Transifex through a cron GitHub workflow, that will :
    • Generate Django translation po files
    • Push translation files to Transifex
    • Pull translation files from Transifex
    • Add and commit new translations to the repository
  • make spanish available in QFieldCloud admin

@duke-nyuki
Copy link
Collaborator

Task linked: DEV-1640 Translate QFieldCloud Admin

@gounux
Copy link
Contributor Author

gounux commented Jan 14, 2025

Seems like at this point, I can get some spanish text in my local setup :

image

Don't get exactly where translated strings come from actually, between the one native from Django, the custom ones from QFieldCloud... Need some more learning from my side.

.env.example Outdated Show resolved Hide resolved
@gounux gounux marked this pull request as ready for review January 16, 2025 13:28
@gounux gounux changed the title [WIP] Translate QFieldCloud admin Translate QFieldCloud admin Jan 16, 2025
@gounux gounux requested a review from suricactus January 16, 2025 13:28
.github/workflows/translations_push.yml Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@gounux gounux requested a review from suricactus January 22, 2025 09:13
Copy link
Collaborator

@suricactus suricactus left a comment

Choose a reason for hiding this comment

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

Would you mind squashing to one/two commits and rebasing to latest master?

Copy link
Collaborator

@suricactus suricactus left a comment

Choose a reason for hiding this comment

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

Code looks good! Let me know if the pull/push approach works and if yes, we are ready to merge!

Add django en and es po files

Activate i18n and es language in django settings

Add transifex pull and push gh workflows

Edit pull workflow trigger conditions

Remove `minimum_perc` from tx config

Rename es to Spanish in Django language settings

Remove minimum-perc when pulling translations from transifex

Remove `makemessages` from push workflow

Compile messages during pull workflow

Variabilize `USE_I18N` and `LANGUAGE_CODE` in .env file

Keep only en and es in settings languages

Export the env variables file in pull workflow

Update docker-app/qfieldcloud/settings.py

Co-authored-by: Ivan Ivanov <suricactus@users.noreply.github.com>

Update .env.example

Co-authored-by: Ivan Ivanov <suricactus@users.noreply.github.com>

Git-ignore compiled translations

Add compile translations command in `README.md`

Checkout repo as Duke-Nyuki when pulling translations

Finalize translations push and pull CI workflows

Add more CI verbosity

Update .github/workflows/translations_push.yml

Co-authored-by: Ivan Ivanov <suricactus@users.noreply.github.com>

Set unique GH workflow that syncs translations with Transifex
@gounux gounux force-pushed the QF-371-translate-qfc-admin branch from d6703aa to 1571f34 Compare January 22, 2025 11:17
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.

3 participants