X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=po%2Flyx_pot.py;h=4e15b1f13971cdd6ac1034225d1443463d65ab43;hb=6bf8a0ade8bd804f634a14cd9cd2ac61e7d3a153;hp=d16a1393821cc2c27d4027f8aa0f20f07aa24c56;hpb=43c05fe16b35d302352d540a30012b353342687a;p=lyx.git
diff --git a/po/lyx_pot.py b/po/lyx_pot.py
index d16a139382..4e15b1f139 100755
--- a/po/lyx_pot.py
+++ b/po/lyx_pot.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
# file lyx_pot.py
@@ -18,7 +18,7 @@
#
from __future__ import print_function
-import sys, os, re, getopt
+import glob, sys, os, re, getopt
import io
def relativePath(path, base):
@@ -47,6 +47,7 @@ def ui_l10n(input_files, output, base):
output = io.open(output, 'w', encoding='utf_8', newline='\n')
Submenu = re.compile(r'^[^#]*Submenu\s+"([^"]*)"', re.IGNORECASE)
Popupmenu = re.compile(r'^[^#]*PopupMenu\s+"[^"]+"\s+"([^"]*)"', re.IGNORECASE)
+ Dynamicmenu = re.compile(r'^[^#]*DynamicMenu\s+"[^"]+"\s+"([^"]*)"', re.IGNORECASE)
IconPalette = re.compile(r'^[^#]*IconPalette\s+"[^"]+"\s+"([^"]*)"', re.IGNORECASE)
Toolbar = re.compile(r'^[^#]*Toolbar\s+"[^"]+"\s+"([^"]*)"', re.IGNORECASE)
Item = re.compile(r'[^#]*Item\s+"([^"]*)"', re.IGNORECASE)
@@ -59,6 +60,8 @@ def ui_l10n(input_files, output, base):
string = string.replace('_', ' ')
elif Popupmenu.match(line):
(string,) = Popupmenu.match(line).groups()
+ elif Dynamicmenu.match(line):
+ (string,) = Dynamicmenu.match(line).groups()
elif IconPalette.match(line):
(string,) = IconPalette.match(line).groups()
elif Toolbar.match(line):
@@ -442,8 +445,8 @@ def layouts_l10n(input_files, output, base, layouttranslations):
out.close()
-def qt4_l10n(input_files, output, base):
- '''Generate pot file from src/frontends/qt4/ui/*.ui'''
+def qt_l10n(input_files, output, base):
+ '''Generate pot file from src/frontends/qt/ui/*.ui'''
output = io.open(output, 'w', encoding='utf_8', newline='\n')
pat = re.compile(r'\s*(.*)')
prop = re.compile(r'\s*