mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
Allow for templates/settings to be read and compiled.
This allows for the handlebars templates in the template/settings subdirectory to be found and compiled.
This commit is contained in:
committed by
Tim Abbott
parent
82764d0215
commit
3efe3601b8
@@ -146,9 +146,9 @@ class Command(makemessages.Command):
|
||||
translation_strings = {} # type: Dict[str, str]
|
||||
dirname = self.get_template_dir()
|
||||
|
||||
for filename in os.listdir(dirname):
|
||||
if filename.endswith('handlebars'):
|
||||
with open(os.path.join(dirname, filename), 'r') as reader:
|
||||
for dirpath, dirnames, filenames in os.walk(dirname):
|
||||
for filename in [f for f in filenames if f.endswith(".handlebars")]:
|
||||
with open(os.path.join(dirpath, filename), 'r') as reader:
|
||||
data = reader.read()
|
||||
data = data.replace('\n', '\\n')
|
||||
translation_strings.update(self.extract_strings(data))
|
||||
|
||||
Reference in New Issue
Block a user