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

Re-run babel-extract #2526

Merged
merged 4 commits into from
Sep 26, 2024
Merged

Re-run babel-extract #2526

merged 4 commits into from
Sep 26, 2024

Conversation

samuelhwilliams
Copy link
Contributor

fixes #1974

@samuelhwilliams
Copy link
Contributor Author

well that's a lot of test failures for something innocuous 🤔

@samuelhwilliams samuelhwilliams force-pushed the update-babel-admin-pot branch 2 times, most recently from 5a4d370 to 44a0ec7 Compare September 24, 2024 21:16
@samuelhwilliams
Copy link
Contributor Author

Right, I think that's all sorted now.

@ElLorans @LeXofLeviafan - would you mind having a glance over this and seeing if you're happy with the updates? It shouldn't affect any translation strings other than:

  • Removing old strings that are no longer present
  • Adding new msgids with empty msgstrs, ready for translations to be put in
  • Adding equivalent msgstrs to the en file.

I haven't used Babel before to do any translation work, so would appreciate someone else looking over this unless I've done something unexpected/undesirable.

@LeXofLeviafan
Copy link
Contributor

Note that unless you override the POT-Creation-Date timestamp within the template file with a static value (e.g. using sed or any equivalent after executing pybabel extract), this timestamp will be updated in all translations every time you run the generation script (even if that particular translation was not changed and you only wanted to make sure all translations are compiled); which would also modify all compiled translations as well.

Also, here's some (ad-hoc) translations for the "Delete record" string that were merged in buku (…can't say for sure if they're accurate though 😅)

# de
msgid "Delete record"
msgstr "Datenzatz löschen"

# fr
msgid "Delete record"
msgstr "Supprimer l'enregistrement"

# ru
msgid "Delete record"
msgstr "Удалить запись"

@samuelhwilliams
Copy link
Contributor Author

samuelhwilliams commented Sep 25, 2024

Note that unless you override the POT-Creation-Date timestamp within the template file with a static value (e.g. using sed or any equivalent after executing pybabel extract), this timestamp will be updated in all translations every time you run the generation script (even if that particular translation was not changed and you only wanted to make sure all translations are compiled)

Interesting - good shout out - let me look at handling that 🤔 (although it doesn't particularly bother me immediately)

I'll pull in those translations, thanks!

babel/babel.sh Outdated Show resolved Hide resolved
msgid "Are you sure you want to delete this record?"
msgstr "Is jy seker jy wil hierdie rekord verwyder?"
#~ msgid "ObjectId equals"
#~ msgstr ""
Copy link
Contributor

Choose a reason for hiding this comment

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

Incidentally, these commented out strings are obsolete; if you no longer need these translations (as opposed to "slightly modified"/"temporarily renamed") you can remove them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep I spotted those. I'm happy to leave them - easy to restore later if somehow they come back, and there aren't so many that they're really causing a problem (AFAIK).

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually if they do come back they won't get automatically restored (and if they get obsoleted again even for a single run, the old translations will be removed automatically)… I'd suggest relying on git history instead, like it's done with regular code 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noted, thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually if they do come back they won't get automatically restored (and if they get obsoleted again even for a single run, the old translations will be removed automatically)… I'd suggest relying on git history instead, like it's done with regular code 😅

That's really not my experience. If the previously obsolete string reappears in the source code and you run babel extract again, babel extract will:

  1. Recognize that the string is present in the source code again.
  2. Uncomment the translation and restore it to the active list of translatable strings
  3. The translation itself (if already provided) will also be restored, assuming the context hasn't changed (same msgid)

@samuelhwilliams
Copy link
Contributor Author

Going to merge this as-is now. If anything needs tweaking or there are more translations, another PR is just a few clicks away :)

@samuelhwilliams samuelhwilliams merged commit 5f884cc into master Sep 26, 2024
11 checks passed
@samuelhwilliams samuelhwilliams deleted the update-babel-admin-pot branch September 26, 2024 12:06
@ElLorans
Copy link
Contributor

ElLorans commented Oct 6, 2024

Right, I think that's all sorted now.

@ElLorans @LeXofLeviafan - would you mind having a glance over this and seeing if you're happy with the updates? It shouldn't affect any translation strings other than:

* Removing old strings that are no longer present

* Adding new msgids with empty msgstrs, ready for translations to be put in

* Adding equivalent msgstrs to the `en` file.

I haven't used Babel before to do any translation work, so would appreciate someone else looking over this unless I've done something unexpected/undesirable.

I confirm that now the strings are translated and everything looks right to me!

@ElLorans ElLorans mentioned this pull request Oct 11, 2024
18 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Translations not extracted
3 participants