From 7187634f184b360764b7d1db8861869248ebdfc3 Mon Sep 17 00:00:00 2001 From: sephrat <34862846+sephrat@users.noreply.github.com> Date: Mon, 28 Jun 2021 22:28:17 +0200 Subject: [PATCH] Localization (#596) * Localize recipe import popup * Add Italian language * Use named formatting * Remove unused strings * Use dedicated strings for the sidebar This will allow for shorter texts, so the text is not truncated, without impacting other uses --- frontend/src/components/UI/TheRecipeFab.vue | 12 ++++----- frontend/src/components/UI/TheSidebar.vue | 22 +++++++-------- frontend/src/locales/messages/en-US.json | 27 ++++++++++++++----- frontend/src/pages/Admin/Profile/UserCard.vue | 2 +- frontend/src/plugins/vuetify.js | 2 ++ frontend/src/store/modules/language.js | 4 +++ 6 files changed, 45 insertions(+), 24 deletions(-) diff --git a/frontend/src/components/UI/TheRecipeFab.vue b/frontend/src/components/UI/TheRecipeFab.vue index 05e603df7..e9e6cb46d 100644 --- a/frontend/src/components/UI/TheRecipeFab.vue +++ b/frontend/src/components/UI/TheRecipeFab.vue @@ -44,13 +44,13 @@ target="_blank" rel="noreferrer nofollow" > - Google ld+json Info + {{ $t('new-recipe.google-ld-json-info') }} - GitHub Issues + {{ $t('new-recipe.github-issues') }} - Recipe Markup Specification + {{ $t('new-recipe.recipe-markup-specification') }}
@@ -61,7 +61,7 @@ @click="addRecipe = false" > {{ $globals.icons.externalLink }} - View Scraped Data + {{ $t('new-recipe.view-scraped-data') }}
@@ -85,7 +85,7 @@

- {{ $t("group.group") }}: {{ user.group }} + {{ $t("group.group-with-value", { groupID: user.group }) }}

diff --git a/frontend/src/plugins/vuetify.js b/frontend/src/plugins/vuetify.js index b43f388f9..85c19acd7 100644 --- a/frontend/src/plugins/vuetify.js +++ b/frontend/src/plugins/vuetify.js @@ -7,6 +7,7 @@ import de from "vuetify/es5/locale/de"; import en from "vuetify/es5/locale/en"; import es from "vuetify/es5/locale/es"; import fr from "vuetify/es5/locale/fr"; +import it from "vuetify/es5/locale/it"; import nl from "vuetify/es5/locale/nl"; import pl from "vuetify/es5/locale/pl"; import sv from "vuetify/es5/locale/sv"; @@ -44,6 +45,7 @@ const vuetify = new Vuetify({ "en-US": en, "es-ES": es, "fr-FR": fr, + "it-IT": it, "nl-NL": nl, "pl-PL": pl, "sv-SE": sv, diff --git a/frontend/src/store/modules/language.js b/frontend/src/store/modules/language.js index d1416609a..8928bd65a 100644 --- a/frontend/src/store/modules/language.js +++ b/frontend/src/store/modules/language.js @@ -17,6 +17,10 @@ const state = { name: "Français (French)", value: "fr-FR", }, + { + name: "Italiano (Italian)", + value: "it-IT", + }, { name: "Nederlands (Dutch)", value: "nl-NL",