Risposta al messaggio di MRAB :
gialloporpora wrote:
Hi all,
I would like to extract string from a PO file. To do this I have created
a little python function to parse po file and extract string:
import re
regex=re.compile("msgid (.*)\\nmsgstr (.*)\\n\\n")
m=r.findall(s)
where s is a po file
Risposta al messaggio di Hallvard B Furuseth :
I don't know the syntax of a po file, but this works for the
snippet you posted:
arg_re = r'"[^\\\"]*(?:\\.[^\\\"]*)*"'
arg_re = '%s(?:\s+%s)*' % (arg_re, arg_re)
find_re = re.compile(
r'^msgid\s+(' + arg_re + ')\s*\nmsgstr\s+(' + arg_re + '
gialloporpora wrote:
Hi all,
I would like to extract string from a PO file. To do this I have created
a little python function to parse po file and extract string:
import re
regex=re.compile("msgid (.*)\\nmsgstr (.*)\\n\\n")
m=r.findall(s)
where s is a po file like this:
msgctxt "write ubiqu
gialloporpora writes:
> I would like to extract string from a PO file. To do this I have created
> a little python function to parse po file and extract string:
>
> import re
> regex=re.compile("msgid (.*)\\nmsgstr (.*)\\n\\n")
> m=r.findall(s)
I don't know the syntax of a po file, but this works
Hi all,
I would like to extract string from a PO file. To do this I have created
a little python function to parse po file and extract string:
import re
regex=re.compile("msgid (.*)\\nmsgstr (.*)\\n\\n")
m=r.findall(s)
where s is a po file like this:
msgctxt "write ubiquity commands.descripti