Permalink
Browse files

Fixed #26341 (again) -- Addressed multiple occurrences per line use case

  • Loading branch information...
claudep committed May 1, 2016
1 parent 4e2ee86 commit 4731e9d82ea72b6d793fb06713d11d228eb89ace
Showing with 3 additions and 1 deletion.
  1. +1 −1 django/core/management/commands/makemessages.py
  2. +2 −0 tests/i18n/commands/templates/test.html
@@ -136,7 +136,7 @@ def postprocess_messages(self, msgs):
return re.sub(
r'^(#: .*)(' + re.escape(old_path) + r')',
- r'\1' + new_path,
+ lambda match: match.group().replace(old_path, new_path),
msgs,
flags=re.MULTILINE
)
@@ -72,6 +72,8 @@
<!-- Source file inside a msgid, should be left as-is. -->
{% trans "#: templates/test.html.py" %}
+<!-- Deliberate duplicated string. -->
+{% trans "This literal should be included." %}
{% blocktrans context "Special blocktrans context #1" %}Translatable literal #8a{% endblocktrans %}
{% blocktrans count 2 context "Special blocktrans context #2" %}Translatable literal #8b-singular{% plural %}Translatable literal #8b-plural{% endblocktrans %}

0 comments on commit 4731e9d

Please sign in to comment.