Skip to content

Commit

Permalink
🧑‍💻 add i18n-ally (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildmodeOne authored Jul 22, 2024
1 parent e07c4c6 commit 9accc24
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"stylelint.vscode-stylelint"
"stylelint.vscode-stylelint",
"Lokalise.i18n-ally"
]
}
7 changes: 7 additions & 0 deletions .vscode/i18n-ally-custom-framework.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
languageIds:
- javascript
- javascriptreact
scopeRangeRegex: "useTranslation\\(\\s*\\[?\\s*['\"`](.*?)['\"`]"
monopoly: true
usageMatchRegex:
- "[^\\w\\d]t\\(['\"`]({key})['\"`]"
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,11 @@
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"terminal.integrated.cwd": "rogue-thi-app"
"terminal.integrated.cwd": "rogue-thi-app",
"i18n-ally.localesPaths": ["rogue-thi-app/public/locales"],
"i18n-ally.namespace": true,
"i18n-ally.pathMatcher": "{locale}/{namespaces}.json",
"i18n-ally.sourceLanguage": "en",
"i18n-ally.theme.annotation": "rgb(200, 147, 124)",
"i18n-ally.theme.annotationBorder": "rgba(200, 147, 124,0.5)"
}
8 changes: 6 additions & 2 deletions rogue-thi-app/public/locales/de/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"empty": "Der heutige Speiseplan ist leer.",
"generic": "Fehler beim Abruf des Speiseplans.<br />Irgendetwas scheint kaputt zu sein."
},
"text.additional": "und {{count}} weitere Gerichte"
"text": {
"additional": "und {{count}} weitere Gerichte"
}
},
"transport": {
"title": {
Expand All @@ -56,7 +58,9 @@
},
"events": {
"title": "Veranstaltungen",
"organizer.attribute": "von"
"organizer": {
"attribute": "von"
}
},
"rooms": {
"title": "Raumvorschläge",
Expand Down
8 changes: 6 additions & 2 deletions rogue-thi-app/public/locales/en/dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"empty": "Today's menu is empty.",
"generic": "Error retrieving the menu.<br />Something seems to be broken."
},
"text.additional": "and {{count}} more dishes"
"text": {
"additional": "and {{count}} more dishes"
}
},
"transport": {
"title": {
Expand All @@ -56,7 +58,9 @@
},
"events": {
"title": "Events",
"organizer.attribute": "by"
"organizer": {
"attribute": "by"
}
},
"rooms": {
"title": "Room Suggestions",
Expand Down

0 comments on commit 9accc24

Please sign in to comment.