Skip to content

Commit

Permalink
feat(fr): add category translations for library (#183)
Browse files Browse the repository at this point in the history
* Translate categories.json via GitLocalize

* fix: add category language translations

* chore: format files

* fix: categories

* fix: check command

---------

Co-authored-by: Jérémy La Scala <[email protected]>
Co-authored-by: spaenleh <[email protected]>
  • Loading branch information
3 people authored Jul 28, 2023
1 parent 5af5dda commit 4f86aea
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 59 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,14 @@ jobs:
runs-on: ubuntu-latest

steps:
# Check-out repository under $GITHUB_WORKSPACE, so the job can access it
- name: Check out code
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ inputs.tag }}

- name: Setup node
id: setup-node
uses: actions/setup-node@v3
with:
node-version: '16'
check-latest: true

- name: Yarn install and Cache dependencies
- name: Yarn install and cache dependencies
uses: graasp/graasp-deploy/.github/actions/yarn-install-and-cache@v1

- name: Check code styling and linting
run: yarn check

- name: Yarn build
run: yarn build
21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"engines": {
"node": ">=16.0.0"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"source": "src/index.ts",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"source": "./src/index.ts",
"description": "Graasp Translations",
"repository": {
"type": "git",
Expand All @@ -20,8 +20,12 @@
"Víctor González",
"Basile Spaenlehauer",
"Alexandre Chau",
"Julien Torrent"
"Julien Torrent",
"Jérémy La Scala"
],
"dependencies": {
"i18next": "22.4.15"
},
"scripts": {
"prepack": "yarn build",
"prepare": "yarn build && yarn hooks:install",
Expand All @@ -32,7 +36,9 @@
"test:watch": "exit 0",
"test": "exit 0",
"lint": "eslint .",
"pre-commit": "yarn prettier:check && yarn lint",
"type-check": "yarn tsc --noEmit",
"check": "yarn prettier:check && yarn lint && yarn type-check",
"pre-commit": "yarn check",
"post-commit": "git status",
"build": "tsc"
},
Expand All @@ -53,8 +59,5 @@
"ts-node": "10.9.1",
"typescript": "5.1.6"
},
"packageManager": "[email protected]",
"dependencies": {
"i18next": "22.4.15"
}
"packageManager": "[email protected]"
}
9 changes: 5 additions & 4 deletions src/constants/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const LIBRARY = {
SEARCH_BUTTON_ARIA_LABEL: 'SEARCH_BUTTON_ARIA_LABEL',
SEARCH_ARIA_LABEL: 'SEARCH_ARIA_LABEL',
SEARCH_PLACEHOLDER: 'SEARCH_PLACEHOLDER',
SEARCH_RESULTS_FOR_TEXT: "SEARCH_RESULTS_FOR_TEXT",
SEARCH_RESULTS_FOR_TEXT: 'SEARCH_RESULTS_FOR_TEXT',
COLLECTION_PLAYER_BUTTON: 'COLLECTION_PLAYER_BUTTON',
ERROR_TITLE: 'ERROR_TITLE',
ERROR_RETURN_TO_HOME: 'ERROR_RETURN_TO_HOME',
Expand Down Expand Up @@ -107,7 +107,8 @@ export const LIBRARY = {
SUMMARY_ACTIONS_COPY: 'SUMMARY_ACTIONS_COPY',
SUMMARY_ACTIONS_EMBED: 'SUMMARY_ACTIONS_EMBED',
SUMMARY_CONTENT_TITLE: 'SUMMARY_CONTENT_TITLE',
FILTER_DROPDOWN_NO_FILTER: "FILTER_DROPDOWN_NO_FILTER",
FILTER_DROPDOWN_CLEAR_FILTERS: "FILTER_DROPDOWN_CLEAR_FILTERS",
FILTER_DROPDOWN_NO_CATEGORIES_AVAILABLE: "FILTER_DROPDOWN_NO_CATEGORIES_AVAILABLE",
FILTER_DROPDOWN_NO_FILTER: 'FILTER_DROPDOWN_NO_FILTER',
FILTER_DROPDOWN_CLEAR_FILTERS: 'FILTER_DROPDOWN_CLEAR_FILTERS',
FILTER_DROPDOWN_NO_CATEGORIES_AVAILABLE:
'FILTER_DROPDOWN_NO_CATEGORIES_AVAILABLE',
};
23 changes: 20 additions & 3 deletions src/langs/de/categories.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
{
"DISCIPLINE": "Disziplin",
"EDUCATION_LEVEL": "Bildungsniveau",
"LANGUAGE": "Sprache"
"discipline": "Disziplin",
"level": "Bildungsniveau",
"language": "Sprache",

"Math": "Mathematik",
"Literature": "Literatur",
"Social Science": "Sozialwissenschaft",
"Natural Science": "Naturwissenschaft",
"Arts": "Kunst",

"Kindergarten": "Kindergarten",
"Primary School": "Grundschule",
"Lower Secondary School": "Mittelschule",
"Upper Secondary School": "Sekundaroberstufe",
"Vocational Training": "Berufsausbildung",
"Higher Education": "Hochschulbildung",

"English": "Englisch",
"French": "Französisch",
"German": "Deutsch"
}
43 changes: 15 additions & 28 deletions src/langs/en/categories.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
{
"DISCIPLINE": "Discipline",
"EDUCATION_LEVEL": "Education Level",
"LANGUAGE": "Language",

"MATH": "Math",
"LITERATURE": "Literature",
"SOCIAL_SCIENCE": "Social Science",
"NATURAL_SCIENCE": "Natural Science",
"ARTS": "Arts",

"KINDERGARTEN": "Kindergarten",
"PRIMARY_SCHOOL": "Primary School",
"LOWER_SECONDARY_SCHOOL": "Lower Secondary School",
"UPPER_SECONDARY_SCHOOL": "Upper Secondary School",
"VOCATIONAL_TRAINING": "Vocational Training",
"HIGHER_EDUCATION": "Higher Education",

"discipline": "Discipline",
"level": "Education Level",
"language": "Language",

"math": "Math",
"literature": "Literature",
"social science": "Social Science",
"natural science": "Natural Science",
"arts": "Arts",
"Math": "Math",
"Literature": "Literature",
"Social Science": "Social Science",
"Natural Science": "Natural Science",
"Arts": "Arts",

"Kindergarten": "Kindergarten",
"Primary School": "Primary School",
"Lower Secondary School": "Lower Secondary School",
"Upper Secondary School": "Upper Secondary School",
"Vocational Training": "Vocational Training",
"Higher Education": "Higher Education",

"kindergarten": "Kindergarten",
"primary school": "Primary School",
"lower secondary school": "Lower Secondary School",
"upper secondary school": "Upper Secondary School",
"vocational training": "Vocational Training",
"higher education": "Higher Education"
"English": "English",
"French": "French",
"German": "German"
}
23 changes: 20 additions & 3 deletions src/langs/fr/categories.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
{
"DISCIPLINE": "Discipline",
"EDUCATION_LEVEL": "Niveau d'éducation",
"LANGUAGE": "Langue"
"discipline": "Discipline",
"level": "Niveau éducatif",
"language": "Language",

"Math": "Mathématiques",
"Literature": "Littérature",
"Social Science": "Sciences sociales",
"Natural Science": "Sciences naturelles",
"Arts": "Arts",

"Kindergarten": "Jardin d'enfants",
"Primary School": "École primaire",
"Lower Secondary School": "École secondaire inférieure",
"Upper Secondary School": "École secondaire supérieure",
"Vocational Training": "Enseignement professionel",
"Higher Education": "Éducation supérieure",

"English": "Anglais",
"French": "Français",
"German": "Allemand"
}

0 comments on commit 4f86aea

Please sign in to comment.