Le 24.08.20 à 09:58, אורי a écrit :
> 
> ‪On Mon, Aug 24, 2020 at 10:50 AM ‫אורי‬‎ <u...@speedy.net
> <mailto:u...@speedy.net>> wrote:‬
> 
>     Hi Claude,
> 
>     I'm trying to translate again "%d weeks" for 1 and 2 weeks, and I
>     get an error message "The expression '%d' is not present in the
>     translation.". I'm not sure if it was saved at all. Why do we need
>     "%d" to be present? I wrote the word "one" in Hebrew (שבוע אחד) and
>     for 2 weeks there is a special word - שבועיים. Is it possible to
>     cancel this check, at least for the numbers 1 and 2?
> 
> 
> In Hebrew (and probably also English) "one week" looks better than "1 week".

There are two possible things at play here:

1. A gettext requirement that if the first plural form is not unique,
the %d is mandatory. That seems the case with Hebrew whose plural forms
start with "plural=(n == 1 && n % 1 == 0)"

2. An overzealous check by Transifex about that "%d" presence in some
strings (a bug was reported years ago).

You can check by downloading the .po file, changing your string manually
and then running a msgfmt -vc your_file.po. If gettext complains, you
have no other choice, you have to include the %d placeholder.

Claude
-- 
www.2xlibre.net

-- 
You received this message because you are subscribed to the Google Groups 
"Django internationalization and localization" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-i18n+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-i18n/d023ce37-24b2-bbc8-5684-4657674501e1%402xlibre.net.

Reply via email to