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.
pull/4035/head
David Baker 2017-05-26 13:16:36 +01:00
parent bde501a9ce
commit 5356eab159
1 changed files with 2 additions and 2 deletions

View File

@ -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.