Skip to content

Commit ec9adcc

Browse files
committed
update translation script to ignore locales without .mo files
1 parent f2b5cea commit ec9adcc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

i18n.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
locales = []
2525
for dirpath, dirnames, filenames in os.walk(localedir):
2626
for dirname in dirnames:
27-
locales.append(dirname)
27+
if os.path.exists(f"{localedir}/{dirname}/LC_MESSAGES/messages.mo"):
28+
locales.append(dirname)
2829
break
2930

3031
all_translations = {}

0 commit comments

Comments
 (0)