mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
refactor: 🌐 Internationalize every string
This commit is contained in:
parent
8c3ddc2a28
commit
2ceee4827f
41 changed files with 932 additions and 428 deletions
|
|
@ -12,6 +12,7 @@ import {
|
|||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import * as m from "~/paraglide/messages.js";
|
||||
import type { ConfirmModalOptions, ConfirmModalResult } from "./composable.ts";
|
||||
|
||||
defineProps<{
|
||||
|
|
@ -41,14 +42,14 @@ const inputValue = ref<string>("");
|
|||
|
||||
<div v-if="modalOptions.inputType === 'text'" class="grid gap-4 py-4">
|
||||
<div class="grid grid-cols-4 items-center gap-4">
|
||||
<Label for="confirmInput" class="text-right">Value</Label>
|
||||
<Label for="confirmInput" class="text-right">{{ m.mean_mean_badger_inspire() }}</Label>
|
||||
<Input id="confirmInput" v-model="inputValue" class="col-span-3" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="modalOptions.inputType === 'textarea'" class="grid gap-4 py-4">
|
||||
<div class="grid grid-cols-4 items-center gap-4">
|
||||
<Label for="confirmTextarea" class="text-right">Value</Label>
|
||||
<Label for="confirmTextarea" class="text-right">{{ m.mean_mean_badger_inspire() }}</Label>
|
||||
<Textarea id="confirmTextarea" v-model="inputValue" class="col-span-3" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import {
|
|||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import * as m from "~/paraglide/messages.js";
|
||||
import {
|
||||
type ConfirmModalOptions,
|
||||
type ConfirmModalResult,
|
||||
|
|
@ -20,11 +21,11 @@ import {
|
|||
|
||||
const isOpen = ref(false);
|
||||
const modalOptions = ref<ConfirmModalOptions>({
|
||||
title: "Confirm",
|
||||
title: m.antsy_whole_alligator_blink(),
|
||||
message: "",
|
||||
inputType: "none",
|
||||
confirmText: "Confirm",
|
||||
cancelText: "Cancel",
|
||||
confirmText: m.antsy_whole_alligator_blink(),
|
||||
cancelText: m.soft_bold_ant_attend(),
|
||||
});
|
||||
const inputValue = ref("");
|
||||
const resolvePromise = ref<((result: ConfirmModalResult) => void) | null>(null);
|
||||
|
|
@ -32,11 +33,11 @@ const resolvePromise = ref<((result: ConfirmModalResult) => void) | null>(null);
|
|||
function open(options: ConfirmModalOptions): Promise<ConfirmModalResult> {
|
||||
isOpen.value = true;
|
||||
modalOptions.value = {
|
||||
title: options.title || "Confirm",
|
||||
title: options.title || m.antsy_whole_alligator_blink(),
|
||||
message: options.message,
|
||||
inputType: options.inputType || "none",
|
||||
confirmText: options.confirmText || "Confirm",
|
||||
cancelText: options.cancelText || "Cancel",
|
||||
confirmText: options.confirmText || m.antsy_whole_alligator_blink(),
|
||||
cancelText: options.cancelText || m.soft_bold_ant_attend(),
|
||||
};
|
||||
inputValue.value = options.defaultValue || "";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue