mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Fix crash when trying to parse translation files
As some translation files are named with a .def.json.pot extension, they were previously considered for checking as if they were definition files. They are now filtered out.
This commit is contained in:
parent
0f805983a2
commit
ee227673d1
1 changed files with 2 additions and 2 deletions
|
@ -14,10 +14,10 @@ def getLinter(file: Path, settings: dict) -> Optional[List[Linter]]:
|
|||
if not file.exists():
|
||||
return [Directory(file, settings)]
|
||||
|
||||
if ".inst" in file.suffixes and ".cfg" in file.suffixes:
|
||||
if ".inst" in file.suffixes and file.suffixes[-1] == ".cfg":
|
||||
return [Directory(file, settings), Profile(file, settings), Formulas(file, settings)]
|
||||
|
||||
if ".def" in file.suffixes and ".json" in file.suffixes:
|
||||
if ".def" in file.suffixes and file.suffixes[-1] == ".json":
|
||||
if file.stem in ("fdmprinter.def", "fdmextruder.def"):
|
||||
return [Formulas(file, settings)]
|
||||
return [Directory(file, settings), Definition(file, settings), Formulas(file, settings)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue