Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

added country config #237

Merged
merged 3 commits into from
Mar 22, 2020
Merged

added country config #237

merged 3 commits into from
Mar 22, 2020

Conversation

zacel
Copy link
Contributor

@zacel zacel commented Mar 22, 2020

my local env is rewriting the locale files whenever I start the server to test but everything is setup and looks good

Copy link
Contributor

@adriaandotcom adriaandotcom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two little things

@@ -138,7 +138,9 @@
<a target="_blank" href="<%= urls.profile %>/<%= passcode %>"><%= baseUrl %><%= urls.profile %>/<%= passcode %></a>.
</div>
<% } else { %>
<p class="slogan"><%= __("Join the most important crowdsource! Regardless if you're healthy or not, please submit the form below – that is also valuable information! ") %></p>
<p class="slogan">
<%= __('Are you from ') + __(locals.country) + "? "%>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove the spacing from the translation and add it in the HTML.

"Added to form": "Toegevoegd aan formulier",
"Are you from ":"Kom je uit ",
"Norway":"Noorwegen",
"Netherlands":"Nederland",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, tabs here!

@zacel
Copy link
Contributor Author

zacel commented Mar 22, 2020

Ok will fix these things now

@fossecode
Copy link
Member

mashpie/i18n-node#266

Root cause could be any error in you scripts and/or json files. Please ensure that you json files are valid to strict json specs, like using " and not ', don't have trailing commas or comments.

One possible scenario might be: A wrong typed json file get's read by i18n. An empty locale object get's initiated due to json-parsing-errors and as soon any i18n.__() get invoked i18n writes back a new json file but with freshly initiated object containing keys only.

The config setting will safe you from destroying your data. But i18n might not work until you fix the root cause of that error.

@fossecode
Copy link
Member

We could consider setting the following in the i18n config:

updateFiles: false

@zacel
Copy link
Contributor Author

zacel commented Mar 22, 2020

Ok thank you fossecode. Maybe it was the trailing commas. My mistake I thought we were supposed to do that still as it was said to do yesterday

@adriaandotcom
Copy link
Contributor

updateFiles: false

would be great I think

@adriaandotcom adriaandotcom merged commit 16d5e63 into BustByte:master Mar 22, 2020
@mashpie
Copy link

mashpie commented Aug 15, 2020

Hi there! Author of i18n here... if you need any help with implementation, just drop me a line!

updateFiles: false will be default in an upcoming release

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants