mirror of
https://github.com/Hopiu/django-rosetta.git
synced 2026-04-11 17:10:59 +00:00
Update regular expressions to support PEP 3101
This commit is contained in:
parent
9713471de1
commit
155ed011a7
2 changed files with 2 additions and 2 deletions
|
|
@ -89,7 +89,7 @@ google.setOnLoadCallback(function() {
|
|||
$('.translation textarea').blur(function() {
|
||||
if($(this).val()) {
|
||||
$('.alert', $(this).parents('tr')).remove();
|
||||
var RX = /%(?:\([^\s\)]*\))?[sdf]/g,
|
||||
var RX = /%(?:\([^\s\)]*\))?[sdf]|\{[\w\d_]+?\}/g,
|
||||
origs=$('.original', $(this).parents('tr')).html().match(RX),
|
||||
trads=$(this).val().match(RX),
|
||||
error = $('<span class="alert">Unmatched variables</span>');
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import six
|
|||
|
||||
|
||||
register = template.Library()
|
||||
rx = re.compile(r'(%(\([^\s\)]*\))?[sd])')
|
||||
rx = re.compile(r'(%(\([^\s\)]*\))?[sd]|\{[\w\d_]+?\})')
|
||||
|
||||
|
||||
def format_message(message):
|
||||
|
|
|
|||
Loading…
Reference in a new issue