diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-11-09 10:08:59 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-11-09 12:34:19 +0100 |
commit | ee119c434e35a3d3addf76b718f4828b8cf0b656 (patch) | |
tree | 924ac6ee046fa15b03850b73fbc17f8f2909ed46 | |
parent | d4f6f03479830b5973db38015496e37938cb7780 (diff) | |
download | ayatana-settings-ee119c434e35a3d3addf76b718f4828b8cf0b656.tar.gz ayatana-settings-ee119c434e35a3d3addf76b718f4828b8cf0b656.tar.bz2 ayatana-settings-ee119c434e35a3d3addf76b718f4828b8cf0b656.zip |
data/applications/ayatana-settings.desktop: Don't in-file update locale strings, rather use an input and an output file.
-rw-r--r-- | data/applications/ayatana-settings.desktop.in (renamed from data/applications/ayatana-settings.desktop) | 0 | ||||
-rwxr-xr-x | setup.py | 10 |
2 files changed, 7 insertions, 3 deletions
diff --git a/data/applications/ayatana-settings.desktop b/data/applications/ayatana-settings.desktop.in index f416c39..f416c39 100644 --- a/data/applications/ayatana-settings.desktop +++ b/data/applications/ayatana-settings.desktop.in @@ -7,10 +7,10 @@ import os, polib, configparser m_lstDataFiles = [] -oFile = open('data/applications/{}.desktop'.format(APPNAME), 'r+') +iFile = open('data/applications/{}.desktop.in'.format(APPNAME), 'r') oConfigParser = configparser.ConfigParser() oConfigParser.optionxform = str -oConfigParser.read_file(oFile) +oConfigParser.read_file(iFile) for strRoot, lstDirnames, lstFilenames in os.walk('po'): @@ -34,7 +34,7 @@ for sSection in oConfigParser.sections(): oConfigParser[sSection] = dict(sorted(oConfigParser[sSection].items(), key=lambda lParams: lParams[0])) -oFile.seek(0) +oFile = open('data/applications/{}.desktop'.format(APPNAME), 'w') oConfigParser.write(oFile, False) oFile.truncate @@ -62,6 +62,10 @@ for strRoot, lstDirnames, lstFilenames in os.walk('data'): continue + elif strFilename == 'ayatana-settings.desktop.in': + + continue + strPath = os.path.join(strRoot, strFilename) m_lstDataFiles.append(("share/{data}".format(data=os.path.dirname(strPath).replace('data/', '')), [strPath])) |