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

Issue of encoding apostrophes when using a plural rule in translation #3734

Open
qiaeru opened this issue Feb 15, 2023 · 3 comments
Open

Issue of encoding apostrophes when using a plural rule in translation #3734

qiaeru opened this issue Feb 15, 2023 · 3 comments
Labels

Comments

@qiaeru
Copy link
Contributor

qiaeru commented Feb 15, 2023

Current Behavior

I have an issue that I can't solve. I'm the author of the French translation of Flarum and its extensions.

This issue concerns the display of the apostrophe which is badly encoded. Instead of displaying ', it displays '. The issue seems to appear only when there is a singular or plural rule.

You can see on line 69 of the translation file:
tags_text: '{count, plural, one {l''étiquette {tags}} other {les étiquettes {tags}}}'

This should work, but it displays l'étiquette, not l'étiquette.

Again, the display of apostrophes works everywhere else in the translation, it's really related to the plural rule. I also checked, the file is encoded in UTF8 without BOM so that's okay. Do you have any idea how to solve this issue? Thank you.

This issue have been reported by a user of the translation: https://discuss.flarum.org/d/615-french-language-pack/314

Steps to Reproduce

Install the French language pack and see the issue.

You can see the issue on: https://lepointdarret.com/public/d/32-avatar-autre-que-gravatar

Expected Behavior

Display ' instead of '.

Screenshots

No response

Environment

  • Flarum version: 1.6.3

Output of php flarum info

Output of "php flarum info", run this in terminal in your Flarum directory.

Possible Solution

No response

Additional Context

No response

@clarkwinkelmann
Copy link
Member

I think this is a duplicate of #3685

@qiaeru
Copy link
Contributor Author

qiaeru commented Feb 15, 2023

I think this is a duplicate of #3685

Yep you're right it's the same issue. Do I close this one?

@rob006
Copy link
Contributor

rob006 commented Feb 15, 2023

These are different issues. This bug is caused by using trans() result as parameter for another trans() call - I have failing test for this in #3735 without using plural rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants