diff --git a/app/i18n.config.ts b/app/i18n.config.ts new file mode 100644 index 0000000..c8ea792 --- /dev/null +++ b/app/i18n.config.ts @@ -0,0 +1,5 @@ +export default defineI18nConfig(() => { + return { + fallbackLocale: ['de', 'en'] + }; +}); diff --git a/app/lang/de.json b/app/lang/de.json index 1f1c96c..7982d00 100644 --- a/app/lang/de.json +++ b/app/lang/de.json @@ -1,30 +1,27 @@ { - "hello": "Hallo", - "locales": { - "en": "Englisch", - "de": "Deutsch" - }, "auth": { + "accept": "Akzeptieren", + "conflict": "Diese Email wird bereits verwendet, bitte verwende eine andere!", + "email": "E-Mail", + "hidePassword": "Passwort ausblenden", + "invalid": "Email oder Passwort sind falsch, bitte versuche es erneut!", "login": "Anmelden", "login_instead": "Stattdessen anmelden", + "logout": "Abmelden", + "name": "Name", + "password": "Passwort", "register": "Registrieren", "register_instead": "Stattdessen registrieren", - "logout": "Abmelden", - "email": "E-Mail", - "password": "Passwort", - "name": "Name", - "accept": "Akzeptieren", - "showPassword": "Passwort einblenden", - "hidePassword": "Passwort ausblenden", "reset": "Zurücksetzen", - "conflict": "Diese Email wird bereits verwendet, bitte verwende eine andere!", - "invalid": "Email oder Passwort sind falsch, bitte versuche es erneut!" + "showPassword": "Passwort einblenden" }, - "layouts": { - "title": "{title} {'|'} PicHunt", - "default_tile": "PicHunt", - "switch_lang": "Sprache ändern zu {locale}", - "refresh": "Aktualisieren" + "enums": { + "text_type": { + "INTEGER": "Ganzzahl", + "NUMBER": "Zahl", + "TEXT": "Freitext", + "WORD": "Ein Wort" + } }, "error": { "401": "Bitte melde dich vorher an!", @@ -32,95 +29,112 @@ "default": "Unbekannter Fehler", "team_not_found": "Team nicht gefunden oder Passwort inkorrekt!" }, + "hello": "Hallo", + "layouts": { + "default_tile": "PicHunt", + "refresh": "Aktualisieren", + "switch_lang": "Sprache ändern zu {locale}", + "title": "{title} {'|'} PicHunt" + }, + "locales": { + "de": "Deutsch", + "en": "Englisch" + }, + "page": { + "home": { + "click_hunt_below_to_join": "Klick auf einen Hunt um ihm beizutreten!", + "end": "Ende: {start}", + "joined_hunts": "Bereits beigetretenen Hunts:", + "login_first": "Melde dich erst an", + "n_quests": "Keine Quest bisher | Eine Quest | {n} Quests", + "n_teams_joined": "Kein Team ist bisher beigetreten! | Ein Team ist bisher beigetreten! | {n} Teams sind bisher beigetreten!", + "new_hunts_soon": "Neue Hunts tauchen bald auf!", + "no_hunt_created": "Bisher wurde kein Hunt erstellt", + "no_hunt_joined": "Noch keinem Hunt beigetreten!", + "open_to_join": "Bereit zum Beitreten:", + "start": "Start: {start}" + } + }, "validation": { + "confirm": "Sind Sie sich sicher?", + "date_past": "Zeit darf nicht in der Zukunft liegen", + "date_range_past": "Zeitraum darf nicht in der Zukunft liegen", + "invalid": "Ungültiges Format", "max_length": "{name} darf maximal {max} Zeichen lang sein", + "min_array": "Du brauchst mindestens {min} {name}", "min_length": "{name} muss mindestens {min} Zeichen lang sein", "numeric": "{name} muss numerisch sein", - "min_array": "Du brauchst mindestens {min} {name}", "required": "{name} ist erforderlich", - "invalid": "Ungültiges Format", - "taken": "Bereits vergeben", - "date_range_past": "Zeitraum darf nicht in der Zukunft liegen", - "date_past": "Zeit darf nicht in der Zukunft liegen", - "confirm": "Sind Sie sich sicher?" + "taken": "Bereits vergeben" }, "vuestic": { - "search": "Search", - "noOptions": "Items not found", - "ok": "OK", - "cancel": "Cancel", - "uploadFile": "Upload file", - "undo": "Undo", - "dropzone": "Drop files here to upload", - "fileDeleted": "File deleted", - "closeAlert": "close alert", - "backToTop": "back to top", - "toggleDropdown": "toggle dropdown", - "carousel": "carousel", - "goPreviousSlide": "go previous slide", - "goNextSlide": "go next slide", - "goSlide": "go slide {index}", - "slideOf": "slide {index} of {length}", - "close": "close", - "openColorPicker": "open color picker", - "colorSelection": "color selection", - "colorName": "color {color}", - "decreaseCounter": "decrease counter", - "increaseCounter": "increase counter", - "selectAllRows": "select all rows", - "sortColumnBy": "sort column by {name}", - "selectRowByIndex": "select row {index}", - "resetDate": "reset date", - "nextPeriod": "next period", - "switchView": "switch view", - "previousPeriod": "previous period", - "removeFile": "remove file", - "reset": "reset", - "pagination": "pagination", - "goToTheFirstPage": "go to the first page", - "goToPreviousPage": "go to the previous page", - "goToSpecificPage": "go to the {page} page", - "goToSpecificPageInput": "enter the page number to go", - "goNextPage": "go next page", - "goLastPage": "go last page", - "currentRating": "current rating {value} of {max}", - "voteRating": "vote rating {value} of {max}", - "optionsFilter": "options filter", - "splitPanels": "split panels", + "back": "Zurück", + "backToTop": "zurück nach oben", + "breadcrumbs": "breadcrumbs", + "cancel": "Abbrechen", + "carousel": "karussell", + "close": "schließen", + "closeAlert": "alert schließen", + "closeToast": "toast schließen", + "color": "farbe", + "colorName": "farbe {color}", + "colorSelection": "farbauswahl", + "counterValue": "counter wert", + "currentRating": "aktuell Bewertung {value} von {max}", + "decreaseCounter": "counter verringern", + "dropzone": "Dateien hier ablegen zum Hochladen", + "fileDeleted": "Datei gelöscht", + "fileTypeIncorrect": "Dateityp ist inkorrekt", + "finish": "Fertig", + "goLastPage": "gehe zur letzten Seite", + "goNextPage": "gehe zur nächsten Seite", + "goNextSlide": "gehe zur nächsten Slide", + "goPreviousSlide": "gehe zur vorherigen Slide", + "goSlide": "gehe zur Slide {index}", + "goToPreviousPage": "gehe zur vorherigen Seite", + "goToSpecificPage": "gehe zur {page} Seite", + "goToSpecificPageInput": "gib eine Seitennummer ein", + "goToTheFirstPage": "gehe zur ersten Seite", + "increaseCounter": "counter erhöhen", + "inputField": "Eingabefeld", + "loading": "Läd", "movePaginationLeft": "move pagination left", "movePaginationRight": "move pagination right", - "resetTime": "reset time", - "closeToast": "close toast", - "selectedOption": "Selected option", + "next": "Nächstes", + "nextPeriod": "next period", + "noOptions": "Items not found", "noSelectedOption": "Option is not selected", - "breadcrumbs": "breadcrumbs", - "counterValue": "counter value", - "selectedDate": "selected date", - "selectedTime": "selected time", - "progressState": "progress state", - "color": "color", - "next": "Next", - "back": "Previous", - "finish": "Finish", - "step": "step", + "ok": "OK", + "openColorPicker": "open color picker", + "optionsFilter": "options filter", + "pagination": "pagination", + "previousPeriod": "previous period", "progress": "progress", - "loading": "Loading", - "sliderValue": "Current slider value is {value}", + "progressState": "progress state", + "removeFile": "remove file", + "reset": "zurücksetzen", + "resetDate": "Datum zurücksetzen", + "resetTime": "Zeit zurücksetzen", + "search": "Suche", + "select": "Wähle eine Option", + "selectAllRows": "select all rows", + "selectRowByIndex": "select row {index}", + "selectedDate": "selected date", + "selectedOption": "Selected option", + "selectedTime": "selected time", + "slideOf": "slide {index} of {length}", "sliderDot": "Slider dot", "sliderMaxDot": "Maximum slider value", "sliderMinDot": "Minimum slider value", + "sliderValue": "Current slider value is {value}", + "sortColumnBy": "sort column by {name}", + "splitPanels": "split panels", + "step": "step", "switch": "Switch", - "inputField": "Input field", - "fileTypeIncorrect": "File type is incorrect", - "select": "Select an option" - }, - "enums": { - "text_type": { - "TEXT": "Freitext", - "WORD": "Ein Wort", - "NUMBER": "Zahl", - "INTEGER": "Ganzzahl" - - } + "switchView": "switch view", + "toggleDropdown": "toggle dropdown", + "undo": "Rückgängig", + "uploadFile": "Datei hochladen", + "voteRating": "vote rating {value} of {max}" } -} +} \ No newline at end of file diff --git a/app/lang/en.json b/app/lang/en.json index f87e59c..1e3aaea 100644 --- a/app/lang/en.json +++ b/app/lang/en.json @@ -1,126 +1,140 @@ { - "hello": "Hello", - "locales": { - "en": "English", - "de": "German" - }, "auth": { + "accept": "Accept", + "conflict": "This e-mail is already in use, please use a different one!", + "email": "Email", + "hidePassword": "Hide password", + "invalid": "E-mail or password is invalid, please try again!", "login": "Login", "login_instead": "Login instead", + "logout": "Logout", + "name": "Name", + "password": "Password", "register": "Register", "register_instead": "Register instead", - "logout": "Logout", - "email": "Email", - "password": "Password", - "name": "Name", - "accept": "Accept", - "showPassword": "Show password", - "hidePassword": "Hide password", "reset": "Reset", - "conflict": "This e-mail is already in use, please use a different one!", - "invalid": "E-mail or password is invalid, please try again!" + "showPassword": "Show password" }, - "layouts": { - "title": "{title} {'|'} PicHunt", - "default_tile": "PicHunt", - "switch_lang": "Switch locale to {locale}", - "refresh": "Refresh" + "enums": { + "text_type": { + "INTEGER": "Whole number", + "NUMBER": "Number", + "TEXT": "Free text", + "WORD": "One Word" + } }, "error": { "401": "Please login!", "404": "Not found", - "default": "Unkown error", + "default": "Unknown error", "team_not_found": "Team not found or password incorrect!" }, + "hello": "Hello", + "layouts": { + "default_tile": "PicHunt", + "refresh": "Refresh", + "switch_lang": "Switch locale to {locale}", + "title": "{title} {'|'} PicHunt" + }, + "locales": { + "de": "German", + "en": "English" + }, + "page": { + "home": { + "click_hunt_below_to_join": "Click on a hunt below and join them!", + "end": "End: {start}", + "joined_hunts": "Joined hunts:", + "login_first": "Login first", + "n_quests": "No quests yet | One quest | {n} quests", + "n_teams_joined": "No teams joined yet! | One team joined! | {n} teams joined!", + "new_hunts_soon": "New hunts will appear soon!", + "no_hunt_created": "No hunt created yet", + "no_hunt_joined": "No hunt joined yet!", + "open_to_join": "Open to join hunts:", + "start": "Start: {start}" + } + }, "validation": { + "confirm": "Are you sure?", + "date_past": "Date cannot be in the future", + "date_range_past": "Date range cannot be in the future", + "invalid": "Invalid format", "max_length": "{name} has to be max {max} chars long", + "min_array": "You need at least {min} {name}", "min_length": "{name} has to at least {min} chars long", "numeric": "{name} need to be numeric", - "min_array": "You need at least {min} {name}", "required": "{name} is required", - "invalid": "Invalid format", - "taken": "Already taken", - "date_range_past": "Date range cannot be in the future", - "date_past": "Date cannot be in the future", - "confirm": "Are you sure?" + "taken": "Already taken" }, "vuestic": { - "search": "Search", - "noOptions": "Items not found", - "ok": "OK", + "back": "Previous", + "backToTop": "back to top", + "breadcrumbs": "breadcrumbs", "cancel": "Cancel", - "uploadFile": "Upload file", - "undo": "Undo", + "carousel": "carousel", + "close": "close", + "closeAlert": "close alert", + "closeToast": "close toast", + "color": "color", + "colorName": "color {color}", + "colorSelection": "color selection", + "counterValue": "counter value", + "currentRating": "current rating {value} of {max}", + "decreaseCounter": "decrease counter", "dropzone": "Drop files here to upload", "fileDeleted": "File deleted", - "closeAlert": "close alert", - "backToTop": "back to top", - "toggleDropdown": "toggle dropdown", - "carousel": "carousel", - "goPreviousSlide": "go previous slide", + "fileTypeIncorrect": "File type is incorrect", + "finish": "Finish", + "goLastPage": "go last page", + "goNextPage": "go next page", "goNextSlide": "go next slide", + "goPreviousSlide": "go previous slide", "goSlide": "go slide {index}", - "slideOf": "slide {index} of {length}", - "close": "close", - "openColorPicker": "open color picker", - "colorSelection": "color selection", - "colorName": "color {color}", - "decreaseCounter": "decrease counter", - "increaseCounter": "increase counter", - "selectAllRows": "select all rows", - "sortColumnBy": "sort column by {name}", - "selectRowByIndex": "select row {index}", - "resetDate": "reset date", - "nextPeriod": "next period", - "switchView": "switch view", - "previousPeriod": "previous period", - "removeFile": "remove file", - "reset": "reset", - "pagination": "pagination", - "goToTheFirstPage": "go to the first page", "goToPreviousPage": "go to the previous page", "goToSpecificPage": "go to the {page} page", "goToSpecificPageInput": "enter the page number to go", - "goNextPage": "go next page", - "goLastPage": "go last page", - "currentRating": "current rating {value} of {max}", - "voteRating": "vote rating {value} of {max}", - "optionsFilter": "options filter", - "splitPanels": "split panels", + "goToTheFirstPage": "go to the first page", + "increaseCounter": "increase counter", + "inputField": "Input field", + "loading": "Loading", "movePaginationLeft": "move pagination left", "movePaginationRight": "move pagination right", - "resetTime": "reset time", - "closeToast": "close toast", - "selectedOption": "Selected option", - "noSelectedOption": "Option is not selected", - "breadcrumbs": "breadcrumbs", - "counterValue": "counter value", - "selectedDate": "selected date", - "selectedTime": "selected time", - "progressState": "progress state", - "color": "color", "next": "Next", - "back": "Previous", - "finish": "Finish", - "step": "step", + "nextPeriod": "next period", + "noOptions": "Items not found", + "noSelectedOption": "Option is not selected", + "ok": "OK", + "openColorPicker": "open color picker", + "optionsFilter": "options filter", + "pagination": "pagination", + "previousPeriod": "previous period", "progress": "progress", - "loading": "Loading", - "sliderValue": "Current slider value is {value}", + "progressState": "progress state", + "removeFile": "remove file", + "reset": "reset", + "resetDate": "reset date", + "resetTime": "reset time", + "search": "Search", + "select": "Select an option", + "selectAllRows": "select all rows", + "selectRowByIndex": "select row {index}", + "selectedDate": "selected date", + "selectedOption": "Selected option", + "selectedTime": "selected time", + "slideOf": "slide {index} of {length}", "sliderDot": "Slider dot", "sliderMaxDot": "Maximum slider value", "sliderMinDot": "Minimum slider value", + "sliderValue": "Current slider value is {value}", + "sortColumnBy": "sort column by {name}", + "splitPanels": "split panels", + "step": "step", "switch": "Switch", - "inputField": "Input field", - "fileTypeIncorrect": "File type is incorrect", - "select": "Select an option" - }, - "enums": { - "text_type": { - "TEXT": "Free text", - "WORD": "One Word", - "NUMBER": "Number", - "INTEGER": "Whole number" - - } + "switchView": "switch view", + "toggleDropdown": "toggle dropdown", + "undo": "Undo", + "uploadFile": "Upload file", + "voteRating": "vote rating {value} of {max}" } -} +} \ No newline at end of file diff --git a/app/pages/index.vue b/app/pages/index.vue index 40efea4..3d0602d 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -13,7 +13,9 @@ watch(loggedIn, () => refresh());
-

Joined hunts:

+

+ {{ $t('page.home.joined_hunts') }} +

refresh()); {{ hunt.description }}
-

{{ hunt._count.quests }} Quests

+

{{ $t('page.home.n_quests', hunt._count.quests) }}

- Start: {{ - $d(hunt.start, { - dateStyle: 'medium', - timeStyle: 'medium' + $t('page.home.start', { + start: $d(hunt.start, { + dateStyle: 'medium', + timeStyle: 'medium' + }) }) }}

- End: {{ - $d(hunt.end, { - dateStyle: 'medium', - timeStyle: 'medium' + $t('page.home.end', { + start: $d(hunt.end, { + dateStyle: 'medium', + timeStyle: 'medium' + }) }) }}

-

{{ hunt._count.teams }} teams joined!

+

{{ $t('page.home.n_teams_joined', hunt._count.teams) }}

- No hunt joined yet - Click on a hunt below and join them! + {{ $t('page.home.no_hunt_joined') }} + {{ + $t('page.home.click_hunt_below_to_join') + }}
- Login first + {{ + $t('page.home.login_first') + }}
-

Open to join hunts:

+

+ {{ $t('page.home.open_to_join') }} +

refresh()); {{ hunt.description }}
-

{{ hunt._count.quests }} Quests

+

{{ $t('page.home.n_quests', hunt._count.quests) }}

- Start: {{ - $d(hunt.start, { - dateStyle: 'medium', - timeStyle: 'medium' + $t('page.home.start', { + start: $d(hunt.start, { + dateStyle: 'medium', + timeStyle: 'medium' + }) }) }}

- End: {{ - $d(hunt.end, { - dateStyle: 'medium', - timeStyle: 'medium' + $t('page.home.end', { + start: $d(hunt.end, { + dateStyle: 'medium', + timeStyle: 'medium' + }) }) }}

-

{{ hunt._count.teams }} teams joined!

+

{{ $t('page.home.n_teams_joined', hunt._count.teams) }}

- No hunt created yet - New hunts will appear soon! + {{ $t('page.home.no_hunt_created') }} + {{ $t('page.home.new_hunts_soon') }}
diff --git a/docker-compose.yml b/docker-compose.yml index 973ca17..df3b175 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,6 +23,8 @@ services: image: redis:6.2-alpine networks: - internal + profiles: + - future restart: always command: redis-server --save 20 1 --loglevel warning --requirepass ${NUXT_REDIS_PASSWORD} healthcheck: diff --git a/nuxt.config.ts b/nuxt.config.ts index 5bb6d04..e0f336d 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -35,6 +35,8 @@ export default defineNuxtConfig({ customRoutes: 'page', strategy: 'prefix_and_default', defaultLocale: 'de', + hmr: true, + autoDeclare: true, langDir: 'lang', restructureDir: 'app', baseUrl: 'https://pichunt.syma.dev'