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

Commit

Permalink
Feature: Localization support (#357)
Browse files Browse the repository at this point in the history
* ✨ Localization support
* ♻️ Telegram translation fix
* ✨ District wise translations
* ♻️ Hover over district issue
* ♻️ Translations cleanup

Co-authored-by: Jeremy <jeremyphilemon@outlook.com>
  • Loading branch information
harshzalavadiya and jeremyphilemon committed Mar 31, 2020
1 parent c4a8b33 commit bce4c9a
Show file tree
Hide file tree
Showing 32 changed files with 9,443 additions and 165 deletions.
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"workbench.colorCustomizations": {
"activityBar.background": "#0156b1",
"titleBar.activeBackground": "#007bff",
"titleBar.activeForeground": "#F3FCF6"
},
"i18n-ally.localesPaths": ["public/locales", "src/i18n"],
"i18n-ally.keystyle": "nested",
"i18n-ally.sourceLanguage": "en"
}
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ Two kinds of issues can be raised in this project:
- People looking to contribute, filter issues by ["Status:Available"](https://github.com/covid19india/covid19india-react/issues?q=is%3Aissue+is%3Aopen+label%3A%22Status%3A+Available%22) and comment on the issue that they would like to be assigned to work on it.
- Mods change the status label to "Status:Accepted" and assign the issue to the contributor.
- Contributor change the label to "Status: In Progress" and finally submit the pull request.

## Localization

If you are using vscode as your IDE then [i18n-ally](https://marketplace.visualstudio.com/items?itemName=antfu.i18n-ally) might save you some jumps in google translate

### Adding new language

- create entry in `src/i18n/locales.json`
- add translation file at `public/locales/[yourLanguage].json`
38 changes: 38 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@
"d3": "^5.15.0",
"d3-svg-legend": "^2.25.6",
"date-fns": "^2.11.0",
"i18next": "^19.3.4",
"i18next-xhr-backend": "^3.2.2",
"install": "^0.13.0",
"json2csv": "^5.0.0",
"node-sass": "^4.13.1",
"npm": "^6.14.3",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-feather": "^2.0.3",
"react-i18next": "^11.3.4",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.0",
"react-table": "^7.0.0",
Expand Down
Loading

0 comments on commit bce4c9a

Please sign in to comment.