Swap path / domain in locale dict in setup.py

This commit is contained in:
Philipp Wolfer
2023-08-24 12:13:21 +02:00
parent 83f6b6fc93
commit 75def55b59

View File

@@ -683,13 +683,13 @@ def cflags_to_include_dirs(cflags):
def _picard_get_locale_files():
locales = []
path_domain = {
'po': 'picard',
os.path.join('po', 'attributes'): 'picard-attributes',
os.path.join('po', 'constants'): 'picard-constants',
os.path.join('po', 'countries'): 'picard-countries',
domain_path = {
'picard': 'po',
'picard-attributes': os.path.join('po', 'attributes'),
'picard-constants': os.path.join('po', 'constants'),
'picard-countries': os.path.join('po', 'countries'),
}
for path, domain in path_domain.items():
for domain, path in domain_path.items():
for filepath in glob.glob(os.path.join(path, '*.po')):
filename = os.path.basename(filepath)
locale = os.path.splitext(filename)[0]