diff --git a/l10n.py b/l10n.py index c1ad0552..ecefd24e 100755 --- a/l10n.py +++ b/l10n.py @@ -140,12 +140,12 @@ class Translations(object): def available(self): path = self.respath() if getattr(sys, 'frozen', False) and platform == 'darwin': - available = set([ + available = { x[:-len('.lproj')] for x in os.listdir(path) if x.endswith('.lproj') and isfile(join(x, 'Localizable.strings')) - ]) + } else: - available = set([x[:-len('.strings')] for x in os.listdir(path) if x.endswith('.strings')]) + available = {x[:-len('.strings')] for x in os.listdir(path) if x.endswith('.strings')} return available # Available language names by code @@ -279,10 +279,11 @@ if __name__ == "__main__": import re regexp = re.compile(r'''_\([ur]?(['"])(((?