From ba0b7c916a79f5dbe3ae10e80b3a738c062f9942 Mon Sep 17 00:00:00 2001 From: MarcosCoelho Date: Wed, 7 Sep 2011 16:05:11 -0300 Subject: [PATCH] fixes bug on messages that are not in english, may have more occurrence cases; bug sample: http://cl.ly/9x70 --- static_gettext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static_gettext.py b/static_gettext.py index 69d1e7e..756d99c 100755 --- a/static_gettext.py +++ b/static_gettext.py @@ -104,7 +104,7 @@ def xgettext( self, file, locale ): potfile = self.potpath( locale ) msgs, errors = _popen( Localizer.XGETTEXT_CMD, src.encode( 'utf-8' ) ) - msgs = re.sub( r'#: standard input:(\d+)', r'#: %s:\1' % file, msgs ) + msgs = re.sub( r'#: .+?:(\d+)', r'#: %s:\1' % file, msgs ) if os.path.exists( potfile ): msgs = '\n'.join( dropwhile( len, msgs.split( '\n' ) ) ) else: