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

Use "c-format" flag instead of "javascript-format" in POT #752

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

lslezak
Copy link
Contributor

@lslezak lslezak commented Sep 14, 2023

Problem

  • Originally we used a simple javascript format flag which basically supported only simple %s or %d formats
  • But since we switched to the sprintf-js library (see Use the sprintf-js library instead of format-util #735), which supports full C-like format strings, we can use the c-format flag in the POT file
  • So do not change the language flag and keep the original c-format used by xgettext
  • Additionally the translators might be more familiar with the C format than the Javascript format

Testing

  • Tested manually, the generated POT file contains the c-format flags
  • I manually updated the existing PO files and all translations still validate (via msgfmt --check-format)

Originally we used a simple javascript format but since we switched to
the sprintf-js library which supports full C-like format strings
we can use the "c-format" flag in the POT file
@coveralls
Copy link

Coverage Status

coverage: 72.814%. remained the same when pulling 5e4ea91 on pot_langugage_attribute into 5612a99 on master.

@lslezak lslezak merged commit 5dc90d5 into master Sep 14, 2023
8 checks passed
@lslezak lslezak deleted the pot_langugage_attribute branch September 14, 2023 11:33
@imobachgs imobachgs mentioned this pull request Sep 26, 2023
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