From e3992d9187f06f74ef9222fb94d66d57717dc25e Mon Sep 17 00:00:00 2001
From: steffenrapp <88974099+steffenrapp@users.noreply.github.com>
Date: Sat, 21 Sep 2024 09:30:17 +0000
Subject: [PATCH] copy
---
 locales/de.yml                       | 15 ++++++++++++++-
 locales/en.yml                       | 13 +++++++++++++
 src/components/FormatTransformer.vue |  7 ++++---
 src/components/InputCopyable.vue     |  3 ++-
 src/components/SpanCopyable.vue      |  5 +++--
 src/components/TextareaCopyable.vue  |  5 +++--
 6 files changed, 39 insertions(+), 9 deletions(-)
diff --git a/locales/de.yml b/locales/de.yml
index 3926e190..5c65e18e 100644
--- a/locales/de.yml
+++ b/locales/de.yml
@@ -78,6 +78,19 @@ toolCard:
   new: Neu
 search:
   label: Suche
+textareaCopyable:
+  copy: In die Zwischenablage kopieren
+  copied: Kopiert!
+spanCopyable:
+  copy: In die Zwischenablage kopieren
+  copied: Kopiert!
+inputCopyable:
+  copy: In die Zwischenablage kopieren
+  copied: Kopiert!
+formatTransformer:
+  input: Eingabe
+  input-placeholder: Eingabe...
+  output: Ausgabe
 tools:
   categories:
     favorite-tools: Deine Lieblingstools
@@ -553,4 +566,4 @@ tools:
     multiline: Ermöglicht die Übereinstimmung von ^ und $ neben Zeilenumbruchzeichen.
     dotAll: Lässt . als Treffer für Zeilenumbruchzeichen zu.
     unicode: Unicode; behandelt ein Muster als eine Folge von Unicode-Codepunkten.
-    unicodeSets: Ein Upgrade zum U-Modus mit mehr Unicode-Funktionen.
+    unicodeSets: Ein Upgrade zum u-Modus mit mehr Unicode-Funktionen.
diff --git a/locales/en.yml b/locales/en.yml
index ae8f0429..5cbc8c90 100644
--- a/locales/en.yml
+++ b/locales/en.yml
@@ -72,6 +72,19 @@ toolCard:
   new: New
 search:
   label: Search
+textareaCopyable:
+  copy: Copy to clipboard
+  copied: Copied!
+spanCopyable:
+  copy: Copy to clipboard
+  copied: Copied!
+inputCopyable:
+  copy: Copy to clipboard
+  copied: Copied!
+formatTransformer:
+  input: Input
+  input-placeholder: Input...
+  output: Output
 tools:
   categories:
     favorite-tools: Your favorite tools
diff --git a/src/components/FormatTransformer.vue b/src/components/FormatTransformer.vue
index bcfcdb58..10833bf5 100644
--- a/src/components/FormatTransformer.vue
+++ b/src/components/FormatTransformer.vue
@@ -2,6 +2,7 @@
 import _ from 'lodash';
 import type { UseValidationRule } from '@/composable/validation';
 import CInputText from '@/ui/c-input-text/c-input-text.vue';
+import { translate as t } from '@/plugins/i18n.plugin';
 
 const props = withDefaults(
   defineProps<{
@@ -16,10 +17,10 @@ const props = withDefaults(
   {
     transformer: _.identity,
     inputValidationRules: () => [],
-    inputLabel: 'Input',
+    inputLabel: t('formatTransformer.input'),
     inputDefault: '',
-    inputPlaceholder: 'Input...',
-    outputLabel: 'Output',
+    inputPlaceholder: t('formatTransformer.input-placeholder'),
+    outputLabel: t('formatTransformer.output'),
     outputLanguage: '',
   },
 );
diff --git a/src/components/InputCopyable.vue b/src/components/InputCopyable.vue
index a69a039a..3c25c6d3 100644
--- a/src/components/InputCopyable.vue
+++ b/src/components/InputCopyable.vue
@@ -1,13 +1,14 @@
 
 
 
diff --git a/src/components/SpanCopyable.vue b/src/components/SpanCopyable.vue
index 5643cff9..81385687 100644
--- a/src/components/SpanCopyable.vue
+++ b/src/components/SpanCopyable.vue
@@ -1,13 +1,14 @@
 
 
 
diff --git a/src/components/TextareaCopyable.vue b/src/components/TextareaCopyable.vue
index 9585177d..d4b32774 100644
--- a/src/components/TextareaCopyable.vue
+++ b/src/components/TextareaCopyable.vue
@@ -9,6 +9,7 @@ import yamlHljs from 'highlight.js/lib/languages/yaml';
 import iniHljs from 'highlight.js/lib/languages/ini';
 import markdownHljs from 'highlight.js/lib/languages/markdown';
 import { useCopy } from '@/composable/copy';
+import { translate as t } from '@/plugins/i18n.plugin';
 
 const props = withDefaults(
   defineProps<{
@@ -22,7 +23,7 @@ const props = withDefaults(
     followHeightOf: null,
     language: 'txt',
     copyPlacement: 'top-right',
-    copyMessage: 'Copy to clipboard',
+    copyMessage: t('textareaCopyable.copy'),
   },
 );
 hljs.registerLanguage('sql', sqlHljs);
@@ -37,7 +38,7 @@ const { value, language, followHeightOf, copyPlacement, copyMessage } = toRefs(p
 const { height } = followHeightOf.value ? useElementSize(followHeightOf) : { height: ref(null) };
 
 const { copy, isJustCopied } = useCopy({ source: value, createToast: false });
-const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.value);
+const tooltipText = computed(() => isJustCopied.value ? t('textareaCopyable.copied') : copyMessage.value);