-
Notifications
You must be signed in to change notification settings - Fork 89
move config to git in order to make it easier to keep all production … #547
Conversation
…configs up to date, closes #543
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tr looks fine, I've just made a small commit to wordlist to fix #545
much better than status quo 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-applied the typo corrections from #552
README.md
Outdated
@@ -76,13 +76,14 @@ Click on "Issues" in the menu above to see what we need help with. | |||
|
|||
Adding a new language should be pretty straightforward. If you need help, you can always ask in the Telegram group chat or contact us by email. The following is needed in order to set up a new language: | |||
|
|||
- Set up a new config file: `cp config.example.json config.json`. `LOCALE` should be one of the locales from [here](https://github.com/ladjs/i18n-locales). `CONTRY_CODE` should be the Alpha-2-code listed here: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes | |||
- Set up a new config file: `cp config.example.json config.json`. `CONTRY_CODE` should be the Alpha-2-code listed here: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Set up a new config file: `cp config.example.json config.json`. `CONTRY_CODE` should be the Alpha-2-code listed here: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes | |
- Set up a new config file: `cp config.example.json config.json`. `COUNTRY_CODE` should be the Alpha-2-code (two-letter country codes) as listed here: [ISO_3166-1 alpha 2 country codes](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes). |
README.md
Outdated
- In `app/locales` you have to add | ||
- Translations for all the sentences in `en.json`. The keys are the same in all the `{LOCALE}.json`-files, and the values are the translations. We recommend translating everything in the file first, and then testing the site in order to verify that the translations look ok in context. Some texts conains `{{ SOME_VALUE }}`. The content in `{{ }}` will be replace with a country specific variable. | ||
- Translations for all the sentences in `en.json`. The translations should be placed in `{LOCALE}.json` (`LOCALE` should be one of the locales from [here](https://github.com/ladjs/i18n-locales)). The keys are the same in all the `{LOCALE}.json`-files, and the values are the translations. We recommend translating everything in the file first, and then testing the site in order to verify that the translations look ok in context. Some texts conains `{{ SOME_VALUE }}`. The content in `{{ }}` will be replace with a country specific variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Translations for all the sentences in `en.json`. The translations should be placed in `{LOCALE}.json` (`LOCALE` should be one of the locales from [here](https://github.com/ladjs/i18n-locales)). The keys are the same in all the `{LOCALE}.json`-files, and the values are the translations. We recommend translating everything in the file first, and then testing the site in order to verify that the translations look ok in context. Some texts conains `{{ SOME_VALUE }}`. The content in `{{ }}` will be replace with a country specific variable. | |
- Translations for all the sentences in `en.json`. The translations should be placed in `{LOCALE}.json` (`LOCALE` should be one of the locales from [here](https://github.com/ladjs/i18n-locales)). The keys are the same in all the `{LOCALE}.json`-files, and the values are the translations. We recommend translating everything in the file first, and then testing the site in order to verify that the translations look okay in context. Some texts contain `{{ SOME_VALUE }}`. The content in `{{ }}` will be replaced with a country-specific variable (as set in `text-variables.ts`). |
README.md
Outdated
@@ -91,7 +92,6 @@ Adding a new language should be pretty straightforward. If you need help, you ca | |||
- You also need a domain (preferably `coronastatus.tld` if it is available), and a server to run the app on. We can assist you with setting this up. | |||
- Generate images for social media etc. using [this guide](https://github.com/BustByte/coronastatus#generating-social-images) | |||
- We can host the site for you if you want that. Just send a message to us in telegram. This makes it easier to maintain and deploy new changes to all the sites. We will give you access to the server as well. If you insist on hosting it yourself, please add your name to the README [here](ops) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- We can host the site for you if you want that. Just send a message to us in telegram. This makes it easier to maintain and deploy new changes to all the sites. We will give you access to the server as well. If you insist on hosting it yourself, please add your name to the README [here](ops) | |
- We can host the site for you if you want that. Just send a message to us in Telegram. This makes it easier to maintain and deploy new changes to all the sites. We will give you access to the server as well. If you insist on hosting it yourself, please add your name to the README [here](ops) |
@jkspn Did you look at each commit separately or all together in "Files changed"? I think the stuff you commented on are outdated, check out https://github.com/BustByte/coronastatus/pull/547/files#diff-04c6e90faac2675aa89e2176d2eec7d8R79 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
My bad! It may have been the outdated file. Checked it again now it's good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so much cleaner then before!
…configs up to date, closes #543
Sorry guys, large PR again, but most of the changes are just moving files around.
Maintaining the configs on all the servers is a big pain in the ass, and there are nothing secret or sensitive in the config. We can therefore make it simpler and less fragile by moving the config into the project files (and git).
config.json
now only containsThe rest of the config values are stored in
app/countrySpecific/xx/config.ts
, so that it is easier to keep the server-configs up to date. As they are now.ts
-files instead of.json
, we get type safety as well.It is also still possible to override config values with env-variables.
This is the new structure for country specific files:
![image](https://user-images.githubusercontent.com/8818089/78458395-3fce6000-76b1-11ea-8a3b-f9e148dc6a6d.png)