Fix untranslated strings (#756)

* add missing translations and translate page titles

* fix: actually use the declared localized variables

* lint and prettier fixes

* add missing translations for toasts and confirms

* use components for shift/enter keys, add pluralization for photos, and fix primary photo conditional

* remove prop defaults since we're computing these anyways
This commit is contained in:
Nikolai Oakfield
2025-05-29 08:56:30 -04:00
committed by GitHub
parent e6f7397b30
commit 3a4fae5eb8
27 changed files with 478 additions and 233 deletions

View File

@@ -30,12 +30,15 @@
</template>
<script setup lang="ts">
import { useI18n } from "vue-i18n";
import { toast } from "@/components/ui/sonner";
import { Button, ButtonGroup } from "~/components/ui/button";
import BaseModal from "@/components/App/CreateModal.vue";
import type { LocationSummary } from "~~/lib/api/types/data-contracts";
import { useDialog, useDialogHotkey } from "~/components/ui/dialog-provider";
const { t } = useI18n();
const { activeDialog, closeDialog } = useDialog();
useDialogHotkey("create-location", { code: "Digit3", shift: true });
@@ -94,7 +97,7 @@
async function create(close = true) {
if (loading.value) {
toast.error("Already creating a location");
toast.error(t("components.location.create_modal.toast.already_creating"));
return;
}
loading.value = true;
@@ -109,11 +112,11 @@
if (error) {
loading.value = false;
toast.error("Couldn't create location");
toast.error(t("components.location.create_modal.toast.create_failed"));
}
if (data) {
toast.success("Location created");
toast.success(t("components.location.create_modal.toast.create_success"));
}
reset();