diff --git a/app/components/LanguageSwitcher.vue b/app/components/LanguageSwitcher.vue new file mode 100644 index 0000000..3335528 --- /dev/null +++ b/app/components/LanguageSwitcher.vue @@ -0,0 +1,46 @@ + + + diff --git a/app/components/app/EditPresetDialog.vue b/app/components/app/EditPresetDialog.vue index b470e3e..81e10a0 100644 --- a/app/components/app/EditPresetDialog.vue +++ b/app/components/app/EditPresetDialog.vue @@ -2,9 +2,9 @@ - Edit Preset + {{ t('editPreset') }} - Make changes to your preset here. Click save when you're done. + {{ t('editPresetDescription') }} - Preset name + {{ t('presetName') }} - Ice Servers (JSON) + {{ t('iceServersJson') }}
@@ -47,10 +47,10 @@ - Set as default preset + {{ t('setAsDefaultPreset') }} - This preset will be selected by default on the preset selector. + {{ t('setAsDefaultPresetDescription') }} - +
@@ -84,6 +84,8 @@ import { Input } from "~/components/ui/input"; import { Switch } from "~/components/ui/switch"; import { schema } from "~/lib/schema/new-preset"; +const { t } = useI18n(); + const props = defineProps<{ initialValues?: { name: string; @@ -153,14 +155,14 @@ const form = useForm({ if (request.success) { toast.success( props.isEdit - ? "Preset updated successfully!" - : "Preset created successfully!", + ? t('presetUpdatedSuccessfully') + : t('presetCreatedSuccessfully'), ); emit("success"); } } catch (e) { toast.error( - props.isEdit ? "Failed to update preset." : "Failed to create preset.", + props.isEdit ? t('failedToUpdatePreset') : t('failedToCreatePreset'), ); } }, diff --git a/app/components/app/PresetSelect.vue b/app/components/app/PresetSelect.vue index 2c7bc1f..eb7a613 100644 --- a/app/components/app/PresetSelect.vue +++ b/app/components/app/PresetSelect.vue @@ -11,6 +11,7 @@ import { Plus } from "lucide-vue-next"; import type { ApiResponse, PresetUser } from "~/lib/types/PresetGetResponse"; import { useStreamerStore } from "~/state/streamer"; +const { t } = useI18n(); const router = useRouter(); const selectedValue = ref(""); const presets = ref([]); @@ -70,7 +71,7 @@ watch(selectedValue, (newValue) => {