1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

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

This commit is contained in:
Claude Paroz 2016-05-01 19:21:43 +02:00
parent 4e2ee86627
commit 4731e9d82e
2 changed files with 3 additions and 1 deletions

View File

@ -136,7 +136,7 @@ class BuildFile(object):
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
)

View File

@ -72,6 +72,8 @@ continued here.{% endcomment %}
<!-- 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 %}