Skip to content

Commit a1d0e2a

Browse files
authoredOct 8, 2024
Update validation to check for invalid translation files (linuxmint#542)
1 parent ac2485b commit a1d0e2a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎validate-spice

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ def validate_xlet(uuid):
4747
if len(glob.glob("files/*/po/*.pot")) > 1:
4848
raise CheckError(f"[{uuid}] Too many .pot files!")
4949

50+
# Check if there are any improperly named file(s)
51+
for file in glob.glob("files/*/po/*"):
52+
if not (file.endswith(".po") or file.endswith(".pot")):
53+
raise CheckError(f"[{uuid}] Invalid file found in translation directory: {file}")
54+
5055
# Check forbidden .nemo_action.in format
5156
keyfile = GLib.KeyFile.new()
5257
try:

0 commit comments

Comments
 (0)
Please sign in to comment.