Improve the maintenance of messages and translations (i18n) #32

Open
opened 2021-07-05 17:12:34 +02:00 by hansegucker · 9 comments
hansegucker commented 2021-07-05 17:12:34 +02:00 (Migrated from edugit.org)

Maintaining our *.po files is a very difficult thing at the moment. I would like to discuss some ideas that might be helpful to make this business a littler bit easier.

  • Tox env: I think that tox -e makemessages should be introduced for all apps to unify the way how *.po files are created.
  • Detect possible changes: We should find a way to check whether there are changed messages in the source code and we have to run makemessages. One possible option is, to run makemessages and check if there is a diff, but that won't work as expected because of changes like the following:
-"POT-Creation-Date: 2021-06-08 16:49+0200\n"
+"POT-Creation-Date: 2021-07-05 17:02+0200\n"
 "PO-Revision-Date: 2021-06-12 10:28+0000\n"
 "Last-Translator: Jonathan Weth <teckids@jonathanweth.de>\n"
-"Language-Team: German <https://translate.edugit.org/projects/aleksis/aleksis/"
-"de/>\n"
+"Language-Team: German <https://translate.edugit.org/projects/aleksis/aleksis/de/>\n"

Edit: There seems to be a working method: https://github.com/django-waffle/django-waffle/blob/master/run.sh#L32

Maybe we also can find (or write) a kind of bot (like Renovate) for updating these files automatically and then opening a merge request.

Edit: Or just include a job in the lint stage with the method used in django-waffle to ensure that all files are up-to-date.

  • Detect untranslated changes: There is a very interesting discussion in the Jazzband project how to solve that (https://github.com/orgs/jazzband/teams/members/discussions/13).
  • Auto update in weblate: Although I added webhooks for all repos some time ago, the automatic pull of new *.po files by Weblate doesn't work.
  • Include in CI: These items should be included in our CI, but I am very unsure at which points. Maybe only for tagging?
Maintaining our *.po files is a very difficult thing at the moment. I would like to discuss some ideas that might be helpful to make this business a littler bit easier. - [x] **Tox env:** I think that `tox -e makemessages` should be introduced for all apps to unify the way how *.po files are created. - [x] **Detect possible changes:** We should find a way to check whether there are changed messages in the source code and we have to run `makemessages`. One possible option is, to run `makemessages` and check if there is a diff, but that won't work as expected because of changes like the following: ```diff -"POT-Creation-Date: 2021-06-08 16:49+0200\n" +"POT-Creation-Date: 2021-07-05 17:02+0200\n" "PO-Revision-Date: 2021-06-12 10:28+0000\n" "Last-Translator: Jonathan Weth <teckids@jonathanweth.de>\n" -"Language-Team: German <https://translate.edugit.org/projects/aleksis/aleksis/" -"de/>\n" +"Language-Team: German <https://translate.edugit.org/projects/aleksis/aleksis/de/>\n" ``` **Edit**: There seems to be a working method: https://github.com/django-waffle/django-waffle/blob/master/run.sh#L32 Maybe we also can find (or write) a kind of bot (like Renovate) for updating these files automatically and then opening a merge request. **Edit:** Or just include a job in the lint stage with the method used in `django-waffle` to ensure that all files are up-to-date. - [ ] **Detect untranslated changes:** There is a very interesting discussion in the Jazzband project how to solve that (https://github.com/orgs/jazzband/teams/members/discussions/13). - [ ] **Auto update in weblate:** Although I added webhooks for all repos some time ago, the automatic pull of new *.po files by Weblate doesn't work. - [ ] **Include in CI:** These items should be included in our CI, but I am very unsure at which points. Maybe only for tagging?
hansegucker commented 2021-07-05 17:13:13 +02:00 (Migrated from edugit.org)

changed title from {-Lint-} messages and translations{-?-} to {+Improve the maintenance of+} messages and translations{+ (i18n)+}

changed title from **{-Lint-} messages and translations{-?-}** to **{+Improve the maintenance of+} messages and translations{+ (i18n)+}**
hansegucker commented 2021-07-05 17:16:16 +02:00 (Migrated from edugit.org)

changed the description

changed the description
hansegucker commented 2021-07-05 17:17:44 +02:00 (Migrated from edugit.org)

changed the description

changed the description
hansegucker commented 2021-08-15 20:34:21 +02:00 (Migrated from edugit.org)

mentioned in merge request AlekSIS-Core!809

mentioned in merge request AlekSIS-Core!809
hansegucker commented 2021-08-15 21:08:05 +02:00 (Migrated from edugit.org)

marked the checklist item Detect possible changes: We should find a way to check whether there are changed messages in the source code and we have to run makemessages. One possible option is, to run makemessages and check if there is a diff, but that won't work as expected because of changes like the following: as completed

marked the checklist item ****Detect possible changes:** We should find a way to check whether there are changed messages in the source code and we have to run `makemessages`. One possible option is, to run `makemessages` and check if there is a diff, but that won't work as expected because of changes like the following:** as completed
hansegucker commented 2021-08-15 21:08:06 +02:00 (Migrated from edugit.org)

marked the checklist item *Tox env: I think that tox -e makemessages should be introduced for all apps to unify the way how .po files are created. as completed

marked the checklist item ****Tox env:** I think that `tox -e makemessages` should be introduced for all apps to unify the way how *.po files are created.** as completed
hansegucker commented 2021-10-03 20:48:39 +02:00 (Migrated from edugit.org)

assigned to @hansegucker

assigned to @hansegucker
nik commented 2021-10-03 23:37:04 +02:00 (Migrated from edugit.org)
  • Tox env: I think that tox -e makemessages should be introduced for all apps to unify the way how *.po files are created.

That's AlekSIS/official/AlekSIS-Core#266

> * **Tox env:** I think that `tox -e makemessages` should be introduced for all apps to unify the way how \*.po files are created. That's AlekSIS/official/AlekSIS-Core#266
hansegucker commented 2026-05-28 20:41:03 +02:00 (Migrated from edugit.org)

unassigned @hansegucker

unassigned @hansegucker
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aleksis/AlekSIS#32
No description provided.