yarindeoh / safe-home-haytiSham

THE MICHAL SELA HACKATHON
https://hayti-sham.co.il/
5 stars 4 forks source link

Add i18n support #58

Closed grount closed 4 years ago

grount commented 4 years ago

Closes #35

@yarindeoh I am unable to refactor StoryView.js since I don't understand the logic of usage the lang.json. Please push another commit that resolves this. We should possibly add this to README under development instructions.

Signed-off-by: Daniel Gront grount1@gmail.com

yarindeoh commented 4 years ago

@grount  The fields that needs to be translated in StoryView are: 'background', 'whatTriggeredChange', 'howDidYouManged', 'additionalnfo', 'whatHelpedYou', 'storyContent',

And we are mapping them in a loop. Tell me if you have any issues. Also please:

grount commented 4 years ago

@yarindeoh as far as I understand those fields are used as keys in the object, they cannot be translated so there is no point in adding them to the translate file.

grount commented 4 years ago

@yarindeoh, the PR is ready. I would say we can tidy the lang-he.js but it can be done later one. We should merge this asap to avoid future conflicts. Couldn't find any hard-coded strings. and added README.