Commit 1f703ac0 authored by Michal Čihař's avatar Michal Čihař

Always assume English language for template

With existing code it failed to parse with filemask
Solution/Project/Resources.*.resx and template
Solution/Project/Resources.resx as it did match beginning and end, but
those matches were overlapping.

Issue #153
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent d559c51c
...@@ -960,9 +960,8 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin): ...@@ -960,9 +960,8 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
# No * in mask? # No * in mask?
if len(parts) == 1: if len(parts) == 1:
return 'INVALID' return 'INVALID'
# Assume English language for template if we can not parse it # Assume English language for template
if ((not path.startswith(parts[0]) or not path.endswith(parts[1])) and if path == self.template:
path == self.template):
return 'en' return 'en'
# Get part matching to first wildcard # Get part matching to first wildcard
if len(parts[1]) == 0: if len(parts[1]) == 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment