Opened 5 years ago

Closed 5 years ago

#28279 closed Cleanup/optimization (invalid)

Feature - Stable output for the makemessages command

Reported by: Pierre Sassoulas Owned by: nobody
Component: Core (Management commands) Version: 1.11
Severity: Normal Keywords: makemessages stable vcs
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I'm using a VCS to track my i18n directory, and very often after changing one or two strings, the content change elsewhere after launching "python manage.py makemessages".

For example :

-"    lorem ipsum etc.\n"
+"   lorem ipsum "
+"etc.\n"

Or :

-msgstr ""
-"Django, Le framework web pour les perfectionnistes ayant des échéances"
+msgstr "Django, Le framework web pour les perfectionnistes ayant des échéances"

It makes merge and rebase a lot more complicated, because it prevent them to be done automatically by the VCS.

Would it be feasible to have some fixed format that would make the locale directory more stable ?

Change History (1)

comment:1 Changed 5 years ago by Claude Paroz

Resolution: invalid
Status: newclosed

You are talking about the --no-wrap option of many gettext tools. Django also offers the same option with the makemessages command.
If your .po files are transiting through some translation tool or platform, it may happen that one of these is using --no-wrap, hence the formatting difference.
I don't see what Django can do for this. It's up to you to set your wrapping policy and enforce it throughout your translation toolchain.

Note: See TracTickets for help on using tickets.
Back to Top