1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-23 23:29:41 +02:00

chore: make vue global components and layouts localizable (#1565)

This commit is contained in:
Philipp Fischbeck 2022-08-15 23:55:51 +02:00 committed by GitHub
parent 7af48d51be
commit ba15006bb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 193 additions and 153 deletions

View file

@ -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;
}
</style>