Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#19202 closed Bug (needsinfo)

Django ugettext strings not taken into account for translation

Reported by:… Owned by: nobody
Component: Internationalization Version: 1.4
Severity: Normal Keywords: makemessages, template, filter, filesizeformat
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I have been trying to do l10n on strings provided by the filesizeformat template filter.
These strings are file size units (eg. KB, MB, GB), and are marked for translation with the use of ugettext.
But, alas, they are not in Django's default .po file, and not found either with the makemessages command, therefore I cannot translate those strings to other languages.

I have found (or understood) nothing about this in the docs. LOCALE_PATHS does obviously not help (since the app has no locale folder). I file this because it could be a bug (by omission). Or one could provide a way to handle this.

Attachments (0)

Change History (6)

comment:1 Changed 18 months ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to needsinfo
  • Status changed from new to closed

These strings are in Django's default .po file.

I don't read anything in this ticket description that could make me think that there is a bug. Please provide more details (examples?) if you still think there's a bug.

comment:2 Changed 18 months ago by…

Oh, ehm, sorry. They were actually in the .po file, thank you.
But the fr translations are wrong according to fr rules on these units.
I guess I have now to learn how to contribute to the django package.

comment:3 Changed 18 months ago by claudep

Mmmh, you are right. I never noticed. As I am a French translator, I can fix them. Are you ok with KB -> Kio, MB -> Mio, etc.?

comment:4 Changed 18 months ago by…

Hello Claude.
I have just applied to the django-fr team at Transifex.
Kio, Mio would be perfect, even though "Ko" and "Mo" are of more common use.

comment:5 Changed 18 months ago by claudep

Translation fixed.

comment:6 Changed 18 months ago by aaugustin

I've never met anyone who knows what a kibioctet or a mébioctet is — I just learnt it from Wikipédia.

The "common use" box at the top right of this page lists ko / Mo / Go. We should stick with that until the "technically correct" acronyms become widely used (if they ever do).

I'm -1 on Kio / Mio / Gio / etc. and +1 on ko / Mo / Go / etc.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.