Faced with the perplexing use of a space before a comma in
oils_i18n_gettext() keys, db-seed-i18n.py's regex failed. The solution
for a sloppy regex? More powerful regex!
Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
num = 0
findi18n = re.compile(r'.*?oils_i18n_gettext\((.*?)\'\)')
- intkey = re.compile(r'\s*(?P<id>\d+),\s*\'(?P<string>.+?)\',\s*\'(?P<class>.+?)\',\s*\'(?P<property>.+?)$')
- textkey = re.compile(r'\s*\'(?P<id>.*?)\',\s*\'(?P<string>.+?)\',\s*\'(?P<class>.+?)\',\s*\'(?P<property>.+?)$')
+ intkey = re.compile(r'\s*(?P<id>\d+)\s*,\s*\'(?P<string>.+?)\',\s*\'(?P<class>.+?)\',\s*\'(?P<property>.+?)$')
+ textkey = re.compile(r'\s*\'(?P<id>.*?)\'\s*,\s*\'(?P<string>.+?)\',\s*\'(?P<class>.+?)\',\s*\'(?P<property>.+?)$')
serts = dict()
# Iterate through the source SQL grabbing table names and l10n strings