Update localization for the renderer.#30
Merged
somiaj merged 1 commit intoopenwebwork:developfrom Aug 5, 2025
Merged
Conversation
99ee425 to
4209b59
Compare
somiaj
approved these changes
Jun 27, 2025
617d97b to
250fae3
Compare
The renderer no longer should have translations for PG since PG now has its own translations. So the localilzations only include the `maketext` calls in the `templates`, `lib/WeBWorK`, and `lib/RenderApp` directories, as well as any in the `lib/RenderApp.pm` file. Although in actuallity all of them are in the `templates` directory. The `docs/make_translation_files.md` file has been removed. Instead the `bin/update-localization-files` script handles this. Run `./bin/update-localization-files -h` for usage. Basically run `./bin/update-localization-files` to only update the pot file, or run `./bin/update-localization-files -p` to update the pot file and the po files. You can also run `./bin/update-localization-files -l heb` (for example) to update the pot file and the heb.po file. Note that the pot file is renamed to `lib/WeBWorK/Localize/renderer.pot` instead of `lib/WeBWorK/Localize/standalone.pot` since this is the `renderer` app, not the `standalone` app. Generally, I would like to stop calling this the "standalone renderer" and just call it the "renderer" (or perhaps better the "pg-renderer"?). The `lib/WeBWorK/Localize.pm` file has been updated with changes similar to those made for WeBWorK. Also remove the `language_subroutine` from the `WeBWorK::PG->new` calls. That is not a valid translation option anymore, and doesn't do anything.
250fae3 to
4f8d521
Compare
somiaj
reviewed
Aug 5, 2025
Comment on lines
-206
to
+147
| #: WeBWorK/lib/WeBWorK/Utils/AttemptsTable.pm:244 | ||
| msgid "correct" | ||
| msgstr "נכון" | ||
| #~ msgid "Your browser does not support the video tag." | ||
| #~ msgstr "הדפדפן שלך לא תומך ב-video tag." |
Contributor
There was a problem hiding this comment.
Any reason these older translations are kept around? It appears the strings are no longer present in the renderer.pot template.
Member
Author
|
The script does that automatically (this is a gettext feature). It moves old translations into comments so that if the string is added back into the code, then the translation can be recovered without effort from the translator. They can probably be removed, but that requires manual effort. I just ran the script. |
Contributor
|
Just double checking, I did see they were commented out. I'll just merge, they could be removed later if desired. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The renderer no longer should have translations for PG since PG now has its own translations. So the localilzations only include the
maketextcalls in thetemplates,lib/WeBWorK, andlib/RenderAppdirectories, as well as any in thelib/RenderApp.pmfile. Although in actuallity all of them are in thetemplatesdirectory.The
docs/make_translation_files.mdfile has been removed. Instead thebin/update-localization-filesscript handles this. Run./bin/update-localization-files -hfor usage. Basically run./bin/update-localization-filesto only update the pot file, or run./bin/update-localization-files -pto update the pot file and the po files. You can also run./bin/update-localization-files -l heb(for example) to update the pot file and the heb.po file.Note that the pot file is renamed to
lib/WeBWorK/Localize/renderer.potinstead oflib/WeBWorK/Localize/standalone.potsince this is therendererapp, not thestandaloneapp. Generally, I would like to stop calling this the "standalone renderer" and just call it the "renderer" (or perhaps better the "pg-renderer"?).The
lib/WeBWorK/Localize.pmfile has been updated with changes similar to those made for WeBWorK.Also remove the
language_subroutinefrom theWeBWorK::PG->newcalls. That is not a valid translation option anymore, and doesn't do anything.