mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Correct docs
Change array.push guideline to not using _t at class-load time which was probably the actual problem. Update guidelines to include punctuation.
This commit is contained in:
parent
bde501a9ce
commit
5356eab159
@ -22,5 +22,5 @@
|
||||
## Things to know/Style Guides
|
||||
|
||||
- Do not use it inside ``getDefaultProps`` at the point where ``getDefaultProps`` is initialized the translations aren't loaded yet and it causes missing translations.
|
||||
- Do use ``Array.push()`` instead of directly defining it inside the array. Arrays are not able to access ``_t()`` at runtime.
|
||||
- Do not include full stops, Emoji or similiar miscellaneous Things to the strings. They are not required to be translated.
|
||||
- If using translated strings as constants, translated strings can't be in constants loaded at class-load time since the translations won't be loaded.
|
||||
- If a string is presented in the UI with punctuation like a full stop, include this in the translation strings, since punctuation varies between languages too.
|
||||
|
Loading…
Reference in New Issue
Block a user