From 3dd040abd1a7dbf13b7d3058b6e430fdfcac7354 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 7 Apr 2025 17:00:59 +0200 Subject: [PATCH] Plugins: Translate descriptions (fix #994) --- adminer/include/plugin.inc.php | 2 +- plugins/backward-keys.php | 4 ++++ plugins/before-unload.php | 4 ++++ plugins/codemirror.php | 4 ++++ plugins/config.php | 1 + plugins/dark-switcher.php | 4 ++++ plugins/database-hide.php | 7 +++++++ plugins/designs.php | 7 +++++++ plugins/dump-alter.php | 7 +++++++ plugins/dump-bz2.php | 7 +++++++ plugins/dump-date.php | 7 +++++++ plugins/dump-json.php | 7 +++++++ plugins/dump-php.php | 7 +++++++ plugins/dump-xml.php | 7 +++++++ plugins/dump-zip.php | 7 +++++++ plugins/edit-calendar.php | 7 +++++++ plugins/edit-foreign.php | 7 +++++++ plugins/edit-textarea.php | 7 +++++++ plugins/editor-setup.php | 4 ++++ plugins/editor-views.php | 7 +++++++ plugins/email-table.php | 7 +++++++ plugins/enum-option.php | 7 +++++++ plugins/file-upload.php | 7 +++++++ plugins/foreign-system.php | 7 +++++++ plugins/frames.php | 7 +++++++ plugins/json-column.php | 7 +++++++ plugins/login-ip.php | 7 +++++++ plugins/login-otp.php | 7 +++++++ plugins/login-password-less.php | 7 +++++++ plugins/login-servers.php | 7 +++++++ plugins/login-ssl.php | 7 +++++++ plugins/login-table.php | 7 +++++++ plugins/master-slave.php | 7 +++++++ plugins/menu-links.php | 1 + plugins/monaco.php | 4 ++++ plugins/pretty-json-column.php | 7 +++++++ plugins/prism.php | 4 ++++ plugins/select-email.php | 2 +- plugins/slugify.php | 7 +++++++ plugins/sql-gemini.php | 1 + plugins/sql-log.php | 7 +++++++ plugins/table-indexes-structure.php | 7 +++++++ plugins/table-structure.php | 7 +++++++ plugins/tables-filter.php | 7 +++++++ plugins/tinymce.php | 7 +++++++ plugins/translation.php | 7 +++++++ plugins/version-github.php | 4 ++++ plugins/version-noverify.php | 7 +++++++ 48 files changed, 282 insertions(+), 2 deletions(-) diff --git a/adminer/include/plugin.inc.php b/adminer/include/plugin.inc.php index 98f76b4b..08c8f216 100644 --- a/adminer/include/plugin.inc.php +++ b/adminer/include/plugin.inc.php @@ -9,7 +9,7 @@ abstract class Plugin { * @return string */ function description() { - return ''; + return $this->lang(''); } /** Translate a string from static::$translations; use Adminer\lang() for strings used by Adminer diff --git a/plugins/backward-keys.php b/plugins/backward-keys.php index 491ce3d5..67bb5a08 100644 --- a/plugins/backward-keys.php +++ b/plugins/backward-keys.php @@ -52,4 +52,8 @@ ORDER BY ORDINAL_POSITION", null, "") as $row } } } + + protected static $translations = array( + 'cs' => array('' => 'Zobrazí odkazy na tabulky odkazující aktuální řádek, stejně jako Adminer Editor'), + ); } diff --git a/plugins/before-unload.php b/plugins/before-unload.php index 68e14774..2cf98a36 100644 --- a/plugins/before-unload.php +++ b/plugins/before-unload.php @@ -30,4 +30,8 @@ onbeforeunload = () => editChanged; array('' => 'Zobrazí potvrzení před odnahráním stránky, pokud bylo změněno formulářové políčko'), + ); } diff --git a/plugins/codemirror.php b/plugins/codemirror.php index 1d476fc8..746a1ac6 100644 --- a/plugins/codemirror.php +++ b/plugins/codemirror.php @@ -97,4 +97,8 @@ addEventListener('DOMContentLoaded', () => { array('' => 'Použít CodeMirror 5 pro zvýrazňování syntaxe a '; } } + + protected static $translations = array( + 'cs' => array('' => 'Použije