🌐(react) add i18n

We need to be able to use localized texts for various components, like for
accessible labels. We decided to setup a lightweight implementation of
localizable to avoid relying on an existing heavy library.
The Provider includes by default full translations for english, and it is
also made to be able to load easily any custom locale directly from the
Provider.
This commit is contained in:
Nathan Vasse
2023-02-20 16:26:30 +01:00
committed by NathanVss
parent 1df3b82571
commit 90feb4ba4a
14 changed files with 322 additions and 3 deletions

View File

@@ -0,0 +1,20 @@
{
"components": {
"pagination": {
"goto_label": "Go to",
"goto_label_aria": "Go to any page",
"next_aria": "Go to next page",
"previous_aria": "Go to previous page",
"goto_page_aria": "Go to page {page}",
"current_page_aria": "You are currently on page {page}"
},
"datagrid": {
"empty": "This table is empty",
"empty_alt": "Illustration of an empty table",
"loader_aria": "Loading data"
},
"provider": {
"test": "This is a test: {name}"
}
}
}

View File

@@ -0,0 +1,20 @@
{
"components": {
"pagination": {
"goto_label": "Aller à",
"goto_label_aria": "Aller à la page",
"next_aria": "Aller à la page suivante",
"previous_aria": "Aller à la page précédente",
"goto_page_aria": "Aller à la page {page}",
"current_page_aria": "Vous êtes actuellement sur la page {page}"
},
"datagrid": {
"empty": "Ce tableau est vide",
"empty_alt": "Illustration d'un tableau vide",
"loader_aria": "Loading data"
},
"provider": {
"test": "Ceci est un test : {name}"
}
}
}