Index: po/lyx_pot.py
===================================================================
--- po/lyx_pot.py (revision 38490)
+++ po/lyx_pot.py (working copy)
@@ -44,12 +44,12 @@ def writeString(outfile, infile, basefil
def ui_l10n(input_files, output, base):
'''Generate pot file from lib/ui/*'''
output = open(output, 'w')
- Submenu = re.compile(r'^[^#]*Submenu\s+"([^"]*)"')
- Popupmenu = re.compile(r'^[^#]*PopupMenu\s+"[^"]+"\s+"([^"]*)"')
- IconPalette = re.compile(r'^[^#]*IconPalette\s+"[^"]+"\s+"([^"]*)"')
- Toolbar = re.compile(r'^[^#]*Toolbar\s+"[^"]+"\s+"([^"]*)"')
- Item = re.compile(r'[^#]*Item\s+"([^"]*)"')
- TableInsert = re.compile(r'[^#]*TableInsert\s+"([^"]*)"')
+ Submenu = re.compile(r'^[^#]*Submenu\s+"([^"]*)"', re.IGNORECASE)
Are we sure this is what we want here? This regex matches, eg:
SubSubmenu "Entry"
because [^#]* matches the first "Sub". Probably not an issue now, but if
the idea is to exclude an initial #, then I think we need a negative
lookahead assertion, like:
r'^(?!#)\s*Submenu\s+...'
I assume Python supports this.
Similarly elsewhere, of course.
rh