mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
Plugins: Move lang() to Adminer\Plugin
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerConfig {
|
||||
class AdminerConfig extends Adminer\Plugin {
|
||||
|
||||
function headers() {
|
||||
static $called; // this function is called from page_header() and it also calls page_header()
|
||||
@@ -53,10 +53,6 @@ class AdminerConfig {
|
||||
}
|
||||
}
|
||||
|
||||
protected function lang($idf, $number = null) {
|
||||
return Adminer\lang_format(Adminer\idx(self::$translations[Adminer\LANG], $idf) ?: $idf, $number);
|
||||
}
|
||||
|
||||
protected static $translations = array(
|
||||
'cs' => array(
|
||||
'Configuration' => 'Konfigurace',
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerMenuLinks {
|
||||
class AdminerMenuLinks extends Adminer\Plugin {
|
||||
private $menu;
|
||||
|
||||
/** @param ''|'table'|'select'|'auto' $menu see config() for explanation */
|
||||
@@ -65,10 +65,6 @@ class AdminerMenuLinks {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function lang($idf, $number = null) {
|
||||
return Adminer\lang_format(Adminer\idx(self::$translations[Adminer\LANG], $idf) ?: $idf, $number);
|
||||
}
|
||||
|
||||
protected static $translations = array(
|
||||
'cs' => array(
|
||||
'Menu table links' => 'Odkazy na tabulky v menu',
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerSelectEmail {
|
||||
class AdminerSelectEmail extends Adminer\Plugin {
|
||||
|
||||
function selectEmailPrint($emailFields, $columns) {
|
||||
if ($emailFields) {
|
||||
@@ -100,11 +100,7 @@ class AdminerSelectEmail {
|
||||
return mail($email, $this->emailHeader($subject), $beginning . $message . $attachments, $headers);
|
||||
}
|
||||
|
||||
private function lang($idf, $number = null) {
|
||||
return Adminer\lang_format(Adminer\idx(self::$translations[Adminer\LANG], $idf) ?: $idf, $number);
|
||||
}
|
||||
|
||||
private static $translations = array(
|
||||
protected static $translations = array(
|
||||
'ar' => array('E-mail' => 'البريد الإلكتروني', 'From' => 'من', 'Subject' => 'الموضوع', 'Send' => 'إرسال', '%d e-mail(s) have been sent.' => 'تم إرسال %d رسالة.', 'Attachments' => 'ملفات مرفقة'),
|
||||
'bg' => array('E-mail' => 'E-mail', 'From' => 'От', 'Subject' => 'Тема', 'Attachments' => 'Прикачени', 'Send' => 'Изпращане', '%d e-mail(s) have been sent.' => array('%d писмо беше изпратено.', '%d писма бяха изпратени.')),
|
||||
'bn' => array('E-mail' => 'ই-মেইল', 'From' => 'থেকে', 'Subject' => 'বিষয়', 'Send' => 'পাঠান', '%d e-mail(s) have been sent.' => array('%d ইমেইল(গুলি) পাঠানো হয়েছে।', '%d ইমেইল(গুলি) পাঠানো হয়েছে।'), 'Attachments' => 'সংযুক্তিগুলো'),
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerSqlGemini {
|
||||
class AdminerSqlGemini extends Adminer\Plugin {
|
||||
private $apiKey;
|
||||
private $model;
|
||||
|
||||
@@ -92,11 +92,7 @@ geminiText.onkeydown = event => {
|
||||
<?php
|
||||
}
|
||||
|
||||
private function lang($idf, $number = null) {
|
||||
return Adminer\lang_format(Adminer\idx(self::$translations[Adminer\LANG], $idf) ?: $idf, $number);
|
||||
}
|
||||
|
||||
private static $translations = array(
|
||||
protected static $translations = array(
|
||||
'cs' => array(
|
||||
'Ask Gemini' => 'Zeptat se Gemini',
|
||||
'Just a sec...' => 'Chviličku...',
|
||||
|
Reference in New Issue
Block a user