diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2017-02-23 11:53:39 +0000 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2017-02-23 19:02:32 +0000 |
commit | 4df88c0df3d97f277388f25e64d0250760cd0ded (patch) | |
tree | f7fd1f4a905978c1fb971afca503fa93a8c46c6a /generate_pot.py | |
parent | 3529036f550d3e284e86eae9f8e97685d5999f2c (diff) | |
download | deluge-4df88c0df3d97f277388f25e64d0250760cd0ded.tar.gz deluge-4df88c0df3d97f277388f25e64d0250760cd0ded.tar.bz2 deluge-4df88c0df3d97f277388f25e64d0250760cd0ded.zip |
[UI] Refactor appdata.xml code and markup translatable text
Diffstat (limited to 'generate_pot.py')
-rwxr-xr-x | generate_pot.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/generate_pot.py b/generate_pot.py index 6f510ac7e..470b8f40c 100755 --- a/generate_pot.py +++ b/generate_pot.py @@ -53,12 +53,18 @@ for (dirpath, dirnames, filenames) in os.walk('deluge'): filepath = os.path.join(dirpath, filename) if os.path.splitext(filepath)[1] in ('.py', '.glade'): to_translate.append(filepath) - elif filename.endswith('.in'): - call(['intltool-extract', '--quiet', '--type=gettext/ini', filepath]) - to_translate.append(filepath + '.h') - elif filename.endswith('.ui'): - call(['intltool-extract', '--quiet', '--type=gettext/glade', filepath]) - to_translate.append(filepath + '.h') + else: + if filename.endswith('.xml.in'): + gtxt_type = 'gettext/xml' + elif filename.endswith('.in'): + gtxt_type = 'gettext/ini' + elif filename.endswith('.ui'): + gtxt_type = 'gettext/glade' + else: + continue + call(['intltool-extract', '--quiet', '--type=%s' % gtxt_type, filepath]) + filepath += '.h' + to_translate.append(filepath) with open(INFILES_LIST, 'w') as f: for line in to_translate: |