-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20e1904
commit 46f12b2
Showing
21 changed files
with
455 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "firefox", | ||
"request": "launch", | ||
"name": "Nuxt client", | ||
"url": "http://localhost:3000", | ||
"webRoot": "${workspaceFolder}" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Nuxt server", | ||
"outputCapture": "std", | ||
"program": "${workspaceFolder}/node_modules/nuxi/bin/nuxi.mjs", | ||
"args": [ | ||
"dev" | ||
] | ||
} | ||
], | ||
"compounds": [ | ||
{ | ||
"name": "Nuxt fullstack", | ||
"configurations": [ | ||
"Nuxt server", | ||
"Nuxt client" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"i18n-ally.localesPaths": [ | ||
"locales" | ||
], | ||
"i18n-ally.keystyle": "nested" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script setup lang="ts"> | ||
const { locale, locales } = useI18n(); | ||
const switchLocalePath = useSwitchLocalePath(); | ||
const availableLocales = computed(() => (locales.value as { code: string; name: string }[]).filter(({ code }) => code !== locale.value)); | ||
</script> | ||
|
||
<template> | ||
<div class="flex items-center gap-2"> | ||
<UButton v-for="{ code, name } in availableLocales" :key="code" color="gray" variant="link" :to="switchLocalePath(code)"> | ||
{{ name }} | ||
</UButton> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
<script setup lang="ts"> | ||
useHead({ title: "Home" }); | ||
const { t } = useI18n(); | ||
useHead({ title: t("home") }); | ||
</script> | ||
|
||
<template> | ||
<div id="page-home">...</div> | ||
<div id="page-home"> | ||
<h1 class="h1">{{ $t("home") }}</h1> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
<script setup lang="ts"> | ||
defineProps<{ title: string | undefined }>(); | ||
const localePath = useLocalePath(); | ||
</script> | ||
|
||
<template> | ||
<div class="max-w-sm space-y-8"> | ||
<div class="w-96 space-y-8"> | ||
<h1 v-if="title" class="h3">{{ title }}</h1> | ||
<slot /> | ||
<UButton to="/" color="gray" variant="link" :padded="false" label="Retour à l'accueil" icon="i-heroicons-arrow-left" /> | ||
<UButton :to="localePath('/')" color="gray" variant="link" :padded="false" :label="$t('auth.go_back_home')" icon="i-heroicons-arrow-left" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export default defineI18nConfig(() => ({ | ||
legacy: false, | ||
locale: "en", | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
auth: | ||
go_back_home: Return home | ||
logging_in: Logging in... | ||
logging_out: Logging out... | ||
login_failed_description: Login failed, please try again later | ||
login_title: Login to your account | ||
login: Login | ||
logout_failed_description: Logout failed, please try again later | ||
logout_title: Confirm logout | ||
logout: Logout | ||
role_administrator: Administrator | ||
role_verified: User | ||
signing_up: Signing up... | ||
signup_failed_description: Signup failed, email already in use | ||
signup_success_description: Signup successful for {email} | ||
signup_title: Signup for an account | ||
signup: Signup | ||
unauthorized: Unauthorized | ||
email: Email | ||
error: Error | ||
home: Home | ||
password: Password | ||
role: Role | ||
success: Success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
auth: | ||
go_back_home: Retourner à l'accueil | ||
logging_in: Connexion en cours... | ||
logging_out: Déconnexion en cours... | ||
login_failed_description: Authentification échouée, veuillez essayer plus tard | ||
login_title: Connectez-vous à votre compte | ||
login: Connexion | ||
logout_failed_description: La déconnexion a échoué, veuillez réessayer plus tard | ||
logout_title: Confirmez la déconnexion | ||
logout: Déconnexion | ||
role_administrator: Administrateur | ||
role_verified: Utilisateur | ||
signing_up: Inscription en cours... | ||
signup_failed_description: L'inscription a échoué, le courriel est déjà utilisé | ||
signup_success_description: Inscription réussie pour {email} | ||
signup_title: Inscrivez un compte | ||
signup: Inscription | ||
unauthorized: Opération non permise | ||
email: Courriel | ||
error: Erreur | ||
home: Accueil | ||
password: Mot de passe | ||
role: Rôle | ||
success: Succès |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
// https://nuxt.com/docs/api/configuration/nuxt-config | ||
export default defineNuxtConfig({ | ||
extends: ["./app", "./auth", "./graphql", "./jobs", "./prisma"], | ||
i18n: { | ||
defaultLocale: "en", | ||
langDir: "locales", | ||
locales: [ | ||
{ code: "en", iso: "en-US", file: "en.yaml", name: "English" }, | ||
{ code: "fr", iso: "fr-CA", file: "fr.yaml", name: "Français" }, | ||
], | ||
}, | ||
modules: ["@nuxtjs/i18n"], | ||
typescript: { typeCheck: true }, | ||
vite: { build: { sourcemap: process.env.NODE_ENV === "production" ? true : "inline" } }, | ||
}); |
Oops, something went wrong.