mirror of https://github.com/zulip/zulip.git
df70fa962e
There are four regexes which try to ensure that the i18n strings are properly captured. 1) The one which disallows multiline strings. ``` i18n\.t\([^)]+[^,\{\)]$ // Disallows: i18n.t('some ' + 'text'); ``` 2) The one which disallows concatenation within argument to i18n.t(): ``` i18n\.t\([\'\"].+?[\'\"]\s*\+ // Disallows: i18n.t("some " + "text"); ``` 3) There are two which disallow concatenation with i18n.t(): ``` i18n\.t\(.+\).*\+ // Disallows: i18n.t('some text') + \+.*i18n\.t\(.+\) // Disallows: + i18n.t('some text') ``` The ideal case is that you try to bring the string argument to the i18n.t() on one line. In case this is not possible, you can do the following: ``` var1 = i18n.t("Some text to be translated"); var2 = i18n.t("Some more text to be translated"); complete = var1 + var2; |
||
---|---|---|
.. | ||
__init__.py | ||
custom_check.py | ||
exclude.py | ||
pep8.py | ||
printer.py | ||
pyflakes.py |