diff --git a/resources/lang/cs/translations.php b/resources/lang/cs/translations.php index 7f59f4b..a5531b0 100644 --- a/resources/lang/cs/translations.php +++ b/resources/lang/cs/translations.php @@ -6,4 +6,6 @@ 'open-documentation' => 'Otevřít dokumentaci', 'close' => 'Zavřít', 'back-to-default-panel' => 'Zpět', + 'url-copied' => 'URL adresa byla zkopírována do schránky.', + 'code-copied' => 'Kód byl zkopírován do schránky.', ]; diff --git a/resources/lang/de/translations.php b/resources/lang/de/translations.php index 0aafaf1..2eb4540 100644 --- a/resources/lang/de/translations.php +++ b/resources/lang/de/translations.php @@ -6,4 +6,6 @@ 'open-documentation' => 'Dokumentation öffnen', 'close' => 'Schließen', 'back-to-default-panel' => 'Zurück', + 'url-copied' => 'URL wurde in die Zwischenablage kopiert.', + 'code-copied' => 'Code wurde in die Zwischenablage kopiert.', ]; diff --git a/resources/lang/en/translations.php b/resources/lang/en/translations.php index 5f8e03f..a46a498 100644 --- a/resources/lang/en/translations.php +++ b/resources/lang/en/translations.php @@ -6,4 +6,6 @@ 'open-documentation' => 'Open documentation', 'close' => 'Close', 'back-to-default-panel' => 'Back', + 'url-copied' => 'URL was copied to your clipboard.', + 'code-copied' => 'Code copied to your clipboard.', ]; diff --git a/resources/views/code-block.blade.php b/resources/views/code-block.blade.php index fe0c1c3..4c37270 100644 --- a/resources/views/code-block.blade.php +++ b/resources/views/code-block.blade.php @@ -23,7 +23,7 @@ class="hover:cursor-pointer hover:text-white/70 flex items-center justify-center x-on:click.prevent=" if (navigator.clipboard) { navigator.clipboard.writeText($root.querySelector('.shiki').textContent); - new FilamentNotification().title('Code copied to your clipboard.').success().send(); + new FilamentNotification().title(filamentKnowledgeBaseTranslations.codeCopied).success().send(); } const range = document.createRange(); range.selectNodeContents($root.querySelector('.shiki')); diff --git a/resources/views/documentation.blade.php b/resources/views/documentation.blade.php index 2d8676c..66ff320 100644 --- a/resources/views/documentation.blade.php +++ b/resources/views/documentation.blade.php @@ -11,6 +11,11 @@ url: event.target.href }); })) + + var filamentKnowledgeBaseTranslations = { + urlCopied: "@lang('filament-knowledge-base::translations.url-copied')", + codeCopied: "@lang('filament-knowledge-base::translations.code-copied')", + }; @endpush {{--js(<< { - (new FilamentNotification()).title('URL was copied to your clipboard') + (new FilamentNotification()).title(filamentKnowledgeBaseTranslations.urlCopied) .success() .send(); }).catch((err) => {