mirror of https://github.com/zulip/zulip.git
pep8: Add compliance with rule E261 makemessages.py.
This commit is contained in:
parent
5b0b8fd8bb
commit
15ea059aad
|
@ -141,7 +141,7 @@ class Command(makemessages.Command):
|
||||||
def extract_strings(self, data):
|
def extract_strings(self, data):
|
||||||
# type: (str) -> Dict[str, str]
|
# type: (str) -> Dict[str, str]
|
||||||
data = self.ignore_javascript_comments(data)
|
data = self.ignore_javascript_comments(data)
|
||||||
translation_strings = {} # type: Dict[str, str]
|
translation_strings = {} # type: Dict[str, str]
|
||||||
for regex in frontend_compiled_regexes:
|
for regex in frontend_compiled_regexes:
|
||||||
for match in regex.findall(data):
|
for match in regex.findall(data):
|
||||||
match = match.strip()
|
match = match.strip()
|
||||||
|
@ -162,7 +162,7 @@ class Command(makemessages.Command):
|
||||||
|
|
||||||
def get_translation_strings(self):
|
def get_translation_strings(self):
|
||||||
# type: () -> Dict[str, str]
|
# type: () -> Dict[str, str]
|
||||||
translation_strings = {} # type: Dict[str, str]
|
translation_strings = {} # type: Dict[str, str]
|
||||||
dirname = self.get_template_dir()
|
dirname = self.get_template_dir()
|
||||||
|
|
||||||
for dirpath, dirnames, filenames in os.walk(dirname):
|
for dirpath, dirnames, filenames in os.walk(dirname):
|
||||||
|
@ -226,7 +226,7 @@ class Command(makemessages.Command):
|
||||||
Missing strings are removed, new strings are added and already
|
Missing strings are removed, new strings are added and already
|
||||||
translated strings are not touched.
|
translated strings are not touched.
|
||||||
"""
|
"""
|
||||||
new_strings = {} # Dict[str, str]
|
new_strings = {} # Dict[str, str]
|
||||||
for k in translation_strings:
|
for k in translation_strings:
|
||||||
k = k.replace('\\n', '\n')
|
k = k.replace('\\n', '\n')
|
||||||
new_strings[k] = old_strings.get(k, k)
|
new_strings[k] = old_strings.get(k, k)
|
||||||
|
|
Loading…
Reference in New Issue