diff --git a/frontend/components/Layout/AppHeader.vue b/frontend/components/Layout/AppHeader.vue index 0e8fec6af..8594548b6 100644 --- a/frontend/components/Layout/AppHeader.vue +++ b/frontend/components/Layout/AppHeader.vue @@ -28,7 +28,7 @@ :prepend-inner-icon="$globals.icons.search" background-color="primary lighten-1" color="white" - placeholder="Press '/'" + :placeholder="$t('search.search-hint')" > diff --git a/frontend/components/Layout/AppSidebar.vue b/frontend/components/Layout/AppSidebar.vue index cf78d8632..426eb2fb1 100644 --- a/frontend/components/Layout/AppSidebar.vue +++ b/frontend/components/Layout/AppSidebar.vue @@ -8,7 +8,9 @@ {{ $auth.user.fullName }} - Favorite Recipes + + {{ $t("user.favorite-recipes") }} + diff --git a/frontend/components/global/AppButtonCopy.vue b/frontend/components/global/AppButtonCopy.vue index b2d591998..2f8fcf94b 100644 --- a/frontend/components/global/AppButtonCopy.vue +++ b/frontend/components/global/AppButtonCopy.vue @@ -22,14 +22,14 @@ @blur="on.blur" > {{ $globals.icons.contentCopy }} - {{ icon ? "" : "Copy" }} + {{ icon ? "" : $t("general.copy") }} {{ $globals.icons.clipboardCheck }} - {{ $t("general.copied") }}! + {{ $t("general.copied_message") }} @@ -42,7 +42,7 @@ export default defineComponent({ props: { copyText: { type: String, - default: "Default Copy Text", + required: true, }, color: { type: String, @@ -81,10 +81,9 @@ export default defineComponent({ show, copyToolTip, textToClipboard, - } + }; }, }); - + diff --git a/frontend/components/global/AutoForm.vue b/frontend/components/global/AutoForm.vue index 3b9059ffb..fa6238783 100644 --- a/frontend/components/global/AutoForm.vue +++ b/frontend/components/global/AutoForm.vue @@ -129,7 +129,9 @@ - New + + {{ $t("general.new") }} + diff --git a/frontend/components/global/BannerExperimental.vue b/frontend/components/global/BannerExperimental.vue index 002175f25..895e551f6 100644 --- a/frontend/components/global/BannerExperimental.vue +++ b/frontend/components/global/BannerExperimental.vue @@ -1,14 +1,13 @@ - Experimental Feature - This page contains experimental or still-baking features. Please excuse the mess. + {{ $t("banner-experimental.title") }} + {{ $t("banner-experimental.description") }} - Track our progress here + {{ $t("banner-experimental.issue-link-text") }} - \ No newline at end of file + diff --git a/frontend/components/global/BaseButton.vue b/frontend/components/global/BaseButton.vue index fdfa82018..1d404dbeb 100644 --- a/frontend/components/global/BaseButton.vue +++ b/frontend/components/global/BaseButton.vue @@ -109,40 +109,40 @@ export default defineComponent({ }, }, setup(props) { - const { $globals } = useContext(); + const { $globals, i18n } = useContext(); const buttonOptions = { create: { - text: "Create", + text: i18n.t("general.create"), icon: $globals.icons.createAlt, color: "success", }, update: { - text: "Update", + text: i18n.t("general.update"), icon: $globals.icons.edit, color: "success", }, save: { - text: "Save", + text: i18n.t("general.save"), icon: $globals.icons.save, color: "success", }, edit: { - text: "Edit", + text: i18n.t("general.edit"), icon: $globals.icons.edit, color: "info", }, delete: { - text: "Delete", + text: i18n.t("general.delete"), icon: $globals.icons.delete, color: "error", }, cancel: { - text: "Cancel", + text: i18n.t("general.cancel"), icon: $globals.icons.close, color: "grey", }, download: { - text: "Download", + text: i18n.t("general.download"), icon: $globals.icons.download, color: "info", }, @@ -189,13 +189,11 @@ export default defineComponent({ return buttonStyles.defaults; }); - const api = useUserApi(); function downloadFile() { api.utils.download(props.downloadUrl); } - return { btnAttrs, btnStyle, diff --git a/frontend/components/global/BaseCardSectionTitle.vue b/frontend/components/global/BaseCardSectionTitle.vue index 1d1d8634a..71fe97ad6 100644 --- a/frontend/components/global/BaseCardSectionTitle.vue +++ b/frontend/components/global/BaseCardSectionTitle.vue @@ -1,4 +1,3 @@ - "Create", }, keepOpen: { diff --git a/frontend/components/global/BaseOverflowButton.vue b/frontend/components/global/BaseOverflowButton.vue index c4c75469c..b753823e7 100644 --- a/frontend/components/global/BaseOverflowButton.vue +++ b/frontend/components/global/BaseOverflowButton.vue @@ -1,4 +1,4 @@ - + @@ -94,6 +94,7 @@ export default defineComponent({ btnText: { type: String, required: false, + // TODO Figure out how to localize this default value default: "Actions", }, }, @@ -115,7 +116,7 @@ export default defineComponent({ function setValue(v: MenuItem) { context.emit(INPUT_EVENT, v.value); - activeObj.value = v; + activeObj.value = v; } return { @@ -127,6 +128,3 @@ export default defineComponent({ }, }); - - - \ No newline at end of file diff --git a/frontend/components/global/ButtonLink.vue b/frontend/components/global/ButtonLink.vue index 13bd50fe2..7580a4dda 100644 --- a/frontend/components/global/ButtonLink.vue +++ b/frontend/components/global/ButtonLink.vue @@ -20,7 +20,7 @@ export default defineComponent({ }, text: { type: String, - default: "Link", + required: true, }, icon: { type: String, @@ -28,4 +28,4 @@ export default defineComponent({ }, }, }); - \ No newline at end of file + diff --git a/frontend/components/global/CrudTable.vue b/frontend/components/global/CrudTable.vue index ee0905b31..e94e19ad5 100644 --- a/frontend/components/global/CrudTable.vue +++ b/frontend/components/global/CrudTable.vue @@ -37,7 +37,7 @@ - + {{ $globals.icons.download }} - {{ $tc("general.download") }} + {{ $t("general.download") }} diff --git a/frontend/components/global/InputColor.vue b/frontend/components/global/InputColor.vue index 878b32a90..8114c69ea 100644 --- a/frontend/components/global/InputColor.vue +++ b/frontend/components/global/InputColor.vue @@ -1,5 +1,5 @@ - + @@ -63,4 +63,4 @@ export default defineComponent({ }; }, }); - \ No newline at end of file + diff --git a/frontend/components/global/InputQuantity.vue b/frontend/components/global/InputQuantity.vue index 9eef5c8e1..1defa6072 100644 --- a/frontend/components/global/InputQuantity.vue +++ b/frontend/components/global/InputQuantity.vue @@ -3,7 +3,7 @@ \ No newline at end of file + diff --git a/frontend/components/global/MarkdownEditor.vue b/frontend/components/global/MarkdownEditor.vue index 60415c14a..bbc648325 100644 --- a/frontend/components/global/MarkdownEditor.vue +++ b/frontend/components/global/MarkdownEditor.vue @@ -5,7 +5,7 @@ :buttons="[ { icon: previewState ? $globals.icons.edit : $globals.icons.eye, - text: previewState ? $tc('general.edit') : 'Preview Markdown', + text: previewState ? $t('general.edit') : $t('markdown-editor.preview-markdown-button-label'), event: 'toggle', }, ]" diff --git a/frontend/components/global/ReportTable.vue b/frontend/components/global/ReportTable.vue index 70b6564e1..22b305c8d 100644 --- a/frontend/components/global/ReportTable.vue +++ b/frontend/components/global/ReportTable.vue @@ -25,7 +25,7 @@ diff --git a/frontend/layouts/error.vue b/frontend/layouts/error.vue index be5db67a3..8b944057a 100644 --- a/frontend/layouts/error.vue +++ b/frontend/layouts/error.vue @@ -39,9 +39,15 @@ export default defineComponent({ }, }, setup(props) { - useMeta({ title: props.error.statusCode === 404 ? "404 Not Found" : "An error occurred" }); - const { $globals, i18n } = useContext(); + + useMeta({ + title: + props.error.statusCode === 404 + ? (i18n.t("page.404-not-found") as string) + : (i18n.t("page.an-error-occurred") as string), + }); + const buttons = [ { icon: $globals.icons.home, to: "/", text: i18n.t("general.home") }, { icon: $globals.icons.primary, to: "/recipes/all", text: i18n.t("page.all-recipes") }, @@ -50,7 +56,7 @@ export default defineComponent({ return { buttons, - } + }; }, // Needed for useMeta head: {}, @@ -67,4 +73,3 @@ p { font-size: 200px; } -