#31172: Wrong translation for "yes,no,maybe" in several .po files.
-----------------------------------+------------------------------------
Reporter: José Antonio Ruiz | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 2.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Changes (by Baptiste Mispelon):
* component: Internationalization => Template system
* stage: Unreviewed => Accepted
Comment:
Hi and thanks for the report.
This does appear to be a bug. I guess it's not a problem most of the time
because HTML doesn't care too much about spaces but the interaction with
`capfirst` makes it more obvious.
Rather than fixing all the broken `.po` file, I think it might be better
to change the code so it automatically removes spaces before and after
each yes/no/maybe string.
For backwards compatibility with users who might deliberately want spaces,
maybe we should only strip the spaces from the translated string, but not
from ay user-provided string.
The code for the `yesno` filter is in django/templates/defaultfilters [1]
if you'd like to take a look and try a pull request (make sure you assign
the ticket to yourself once you start working on it).
[1]
https://github.com/django/django/blob/master/django/template/defaultfilters.py#L773
--
Ticket URL: <https://code.djangoproject.com/ticket/31172#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.38389c6f4d6363e277a5867560b75eb7%40djangoproject.com.