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

Remove PG translations and don't add those to the po and pot files. #2225

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

drgrice1
Copy link
Member

@drgrice1 drgrice1 commented Oct 5, 2023

PG will no longer use the language handle from webwork2. It will now provide its own language handle. So the PG code is no longer scanned for translations.

Also, the new WeBWorK::PG::Localize module is shared to PG's safe compartment. That is PG's language handle module.

This is the alternate to #2213 that we discussed.

This is paired with openwebwork/pg#936.

Note that the po and pot files have not actually been updated. So at this point all of PG's translations are still in those files. Those are saved for now, but can be removed later.


xgettext.pl -o webwork2.pot -D $WEBWORK_ROOT/lib -D $PG_ROOT/lib -D $PG_ROOT/macros -D $WEBWORK_ROOT/templates \
xgettext.pl -o webwork2.pot -D $WEBWORK_ROOT/lib -D -D $WEBWORK_ROOT/templates \
Copy link
Member

Choose a reason for hiding this comment

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

I think there's an extra -D on this line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing that out. I did that in this and an the paired PG pull request. I fixed both. I am a little surprised the script was still working with that.

Copy link
Member

@pstaabp pstaabp left a comment

Choose a reason for hiding this comment

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

This looks good. Tested inside a problem both the ability to do plurality as well as translation using an already existing translation.

@drgrice1 drgrice1 force-pushed the remove-pg-localization branch 2 times, most recently from 0537a3e to 99969cc Compare October 6, 2023 10:26
@drgrice1 drgrice1 force-pushed the remove-pg-localization branch 3 times, most recently from e30bb5b to 1b8fe19 Compare October 11, 2023 21:04
PG will no longer use the language handle from webwork2.  It will now
provide its own language handle.  So the PG code is no longer scanned
for translations.

Also, the new WeBWorK::PG::Localize module is shared to PG's safe
compartment.  That is PG's language handle code.
@drgrice1 drgrice1 force-pushed the remove-pg-localization branch from 1b8fe19 to 7b21258 Compare October 22, 2023 20:02
@pstaabp pstaabp merged commit 604be5c into openwebwork:develop Oct 23, 2023
1 check passed
@drgrice1 drgrice1 deleted the remove-pg-localization branch October 23, 2023 21:34
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.

2 participants