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

[I18N] Gettext escaping issue #655

Open
meskobalazs opened this issue May 31, 2022 · 0 comments
Open

[I18N] Gettext escaping issue #655

meskobalazs opened this issue May 31, 2022 · 0 comments
Labels
0. to triage bug Something isn't working

Comments

@meskobalazs
Copy link

I had an issue while translating the following string:

{{ t('suspicious_login', 'During evaluation, the latest model (trained {time}) has shown to capture {recall}% of all suspicious logins (recall), whereas {precision}% of the logins classified as suspicious are indeed suspicious (precision). Below you see a visualization of historic model performance.', {

The string in question is using a percent sign without escaping, which causes in a problem down the line. Specifically I cannot put suffixes after the % character, because it causes a validation error.

Just for further context, this part:

{recall}% of all suspicious logins

would be this in Hungarian:

összes gyanús bejelentkezés {recall}%-át

but I can't save this on Transifex (currently I am spelling out the percent as text).

I am not sure how it should be escaped, because I haven't used gettext in JavaScript yet, so I cannot give a solution.

@joshtrichards joshtrichards added bug Something isn't working 0. to triage labels Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. to triage bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants