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

No highlighting of delimiters in placeholders #9406

Closed
2 tasks done
comradekingu opened this issue Jun 14, 2023 · 3 comments
Closed
2 tasks done

No highlighting of delimiters in placeholders #9406

comradekingu opened this issue Jun 14, 2023 · 3 comments

Comments

@comradekingu
Copy link
Contributor

Describe the issue

https://l10n.elementary.io/translate/files/files/es/?checksum=158eab1af1b7f04b#comments

Here ' is used as a flag character which allows us to show the , delimiter depending on the number, e.g. 1,000,000 items. From $ man printf.3:

Flag characters
The character % is followed by zero or more of the following flags:
……

   '      For  decimal  conversion (i, d, u, f, F, g, G) the output is to be grouped with thousands' grouping characters if the locale information indicates any.  (See setlocale(3).)  Note that many versions of gcc(1) cannot parse
          this option and will issue a warning.  (SUSv2 did not include %'F, but SUSv3 added it.)

I already tried

  • I've read and searched the documentation.
  • I've searched for similar issues in this repository.

Steps to reproduce the behavior

  1. Add delimiter
  2. Have it be part of the highlighting
  3. Trick translators into believing it needs to be included

Expected behavior

%'d instead of %'d would be expected(?)

Screenshots

No response

Exception traceback

No response

How do you run Weblate?

weblate.org service

Weblate versions

Using Weblate 4.17

Weblate deploy checks

No response

Additional context

Maybe it could include something in "info" by default to explain the delimiters used in various languages,
or use the defaults for any given language?

@nijel
Copy link
Member

nijel commented Jun 14, 2023

%'d is highlighted in both source and translation, that looks correct. Note that ' flag uses locale specific separator, so if it is used in the source string, it should be IMHO used in the translation as well.

@comradekingu
Copy link
Contributor Author

OK, that seems fine.

@github-actions
Copy link

The issue you have reported is now resolved. If you don’t feel it’s right, please follow its labels to get a clue for further steps.

  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

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

No branches or pull requests

2 participants