From edc81bd2463dc502ebb7a11e9d3f95fb757e8091 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Thu, 19 Feb 2026 14:40:24 +0700 Subject: [PATCH 1/2] fix: Localize title of keyboard details page --- _includes/includes/ui/keyboard-details.php | 2 +- _includes/locale/strings/keyboards/details/de.php | 3 +++ _includes/locale/strings/keyboards/details/en.php | 3 +++ _includes/locale/strings/keyboards/details/es.php | 3 +++ _includes/locale/strings/keyboards/details/fr.php | 3 +++ _includes/locale/strings/keyboards/details/km.php | 3 +++ 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/_includes/includes/ui/keyboard-details.php b/_includes/includes/ui/keyboard-details.php index 2df5c203..1e3ef961 100644 --- a/_includes/includes/ui/keyboard-details.php +++ b/_includes/includes/ui/keyboard-details.php @@ -209,7 +209,7 @@ protected static function LoadData() { if(is_object($s)) { self::$keyboard = $s; self::$title = htmlentities(self::$keyboard->name); - if (!preg_match('/keyboard$/i', self::$title)) self::$title .= ' keyboard'; + if (!preg_match('/keyboard$/i', self::$title)) self::$title = $_m_KeyboardDetails("details_page_title", self::$title); self::$description = isset(self::$keyboard->description) ? self::$keyboard->description : ''; self::$authorName = isset(self::$keyboard->authorName) ? self::$keyboard->authorName : ''; self::$minVersion = isset(self::$keyboard->minKeymanVersion) ? self::$keyboard->minKeymanVersion : $stable_version; diff --git a/_includes/locale/strings/keyboards/details/de.php b/_includes/locale/strings/keyboards/details/de.php index f3b3576b..9fa19d1c 100644 --- a/_includes/locale/strings/keyboards/details/de.php +++ b/_includes/locale/strings/keyboards/details/de.php @@ -10,6 +10,9 @@ declare(strict_types=1); return [ + # Page Title + "details_page_title" => "%1\$s-Tastatur", + # Placeholder for new keyboard search "new_keyboard_search" => "Neue Tastatursuche", diff --git a/_includes/locale/strings/keyboards/details/en.php b/_includes/locale/strings/keyboards/details/en.php index e6e7c872..22ccde87 100644 --- a/_includes/locale/strings/keyboards/details/en.php +++ b/_includes/locale/strings/keyboards/details/en.php @@ -10,6 +10,9 @@ declare(strict_types=1); return [ + # Page Title + "details_page_title" => "%1\$s keyboard", + # Placeholder for new keyboard search "new_keyboard_search" => "New keyboard search", diff --git a/_includes/locale/strings/keyboards/details/es.php b/_includes/locale/strings/keyboards/details/es.php index ac11c8da..5f346f1a 100644 --- a/_includes/locale/strings/keyboards/details/es.php +++ b/_includes/locale/strings/keyboards/details/es.php @@ -9,6 +9,9 @@ declare(strict_types=1); return [ + # Page Title + "details_page_title" => "Teclado %1\$s", + # Placeholder for new keyboard search "new_keyboard_search" => "Nueva búsqueda de teclado", diff --git a/_includes/locale/strings/keyboards/details/fr.php b/_includes/locale/strings/keyboards/details/fr.php index f48a93c8..231719f5 100644 --- a/_includes/locale/strings/keyboards/details/fr.php +++ b/_includes/locale/strings/keyboards/details/fr.php @@ -10,6 +10,9 @@ declare(strict_types=1); return [ + # Page Title + "details_page_title" => "Clavier %1\$s", + # Placeholder for new keyboard search "new_keyboard_search" => "Nouvelle recherche de clavier", diff --git a/_includes/locale/strings/keyboards/details/km.php b/_includes/locale/strings/keyboards/details/km.php index a09e68db..a81785ac 100644 --- a/_includes/locale/strings/keyboards/details/km.php +++ b/_includes/locale/strings/keyboards/details/km.php @@ -10,6 +10,9 @@ declare(strict_types=1); return [ + # Page Title + "details_page_title" => "%1\$s ក្តារចុច", + # Placeholder for new keyboard search "new_keyboard_search" => "ស្វែងរកក្ដារចុចថ្មី", From c3b0e9e996263abfa33be9d915f3f369dc4f3d9f Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Thu, 19 Feb 2026 15:13:31 +0700 Subject: [PATCH 2/2] fix: Localize title of keyboard install page --- _includes/locale/strings/keyboards/install/de.php | 3 +++ _includes/locale/strings/keyboards/install/en.php | 3 +++ _includes/locale/strings/keyboards/install/es.php | 3 +++ _includes/locale/strings/keyboards/install/fr.php | 3 +++ _includes/locale/strings/keyboards/install/km.php | 3 +++ keyboards/install.php | 3 ++- 6 files changed, 17 insertions(+), 1 deletion(-) diff --git a/_includes/locale/strings/keyboards/install/de.php b/_includes/locale/strings/keyboards/install/de.php index fb97c1a2..16fee29c 100644 --- a/_includes/locale/strings/keyboards/install/de.php +++ b/_includes/locale/strings/keyboards/install/de.php @@ -10,6 +10,9 @@ declare(strict_types=1); return [ + # Page Title + "install_page_title" => "%1\$s-Tastatur", + # {Keyboard} download should start shortly "download_start_shortly" => "Ihr %1\$s Tastatur-Download sollte in Kürze beginnen. diff --git a/_includes/locale/strings/keyboards/install/en.php b/_includes/locale/strings/keyboards/install/en.php index e64cc61b..77e41547 100644 --- a/_includes/locale/strings/keyboards/install/en.php +++ b/_includes/locale/strings/keyboards/install/en.php @@ -10,6 +10,9 @@ declare(strict_types=1); return [ + # Page Title + "install_page_title" => "%1\$s keyboard", + # {Keyboard} download should start shortly "download_start_shortly" => "Your %1\$s keyboard download should start shortly. diff --git a/_includes/locale/strings/keyboards/install/es.php b/_includes/locale/strings/keyboards/install/es.php index 318b62af..f898d0ad 100644 --- a/_includes/locale/strings/keyboards/install/es.php +++ b/_includes/locale/strings/keyboards/install/es.php @@ -9,6 +9,9 @@ declare(strict_types=1); return [ + # Page Title + "install_page_title" => "Teclado %1\$s", + # {Keyboard} download should start shortly "download_start_shortly" => "La descarga de tu teclado %1\$s debería comenzar en breve. diff --git a/_includes/locale/strings/keyboards/install/fr.php b/_includes/locale/strings/keyboards/install/fr.php index b299048b..c274f680 100644 --- a/_includes/locale/strings/keyboards/install/fr.php +++ b/_includes/locale/strings/keyboards/install/fr.php @@ -9,6 +9,9 @@ declare(strict_types=1); return [ + # Page Title + "install_page_title" => "Clavier %1\$s", + # {Keyboard} download should start shortly "download_start_shortly" => "Le téléchargement de votre clavier %1\$s devrait démarrer sous peu. diff --git a/_includes/locale/strings/keyboards/install/km.php b/_includes/locale/strings/keyboards/install/km.php index 36bbda77..27f64dd4 100644 --- a/_includes/locale/strings/keyboards/install/km.php +++ b/_includes/locale/strings/keyboards/install/km.php @@ -10,6 +10,9 @@ declare(strict_types=1); return [ + # Page Title + "install_page_title" => "%1\$s ក្តារចុច", + # {Keyboard} download should start shortly "download_start_shortly" => "ការទាញយក ក្ដារចុច %1\$s របស់អ្នកគួរចាប់ផ្ដើមក្នុងពេលឆាប់ៗនេះ។ diff --git a/keyboards/install.php b/keyboards/install.php index d188a85b..9f8237b0 100644 --- a/keyboards/install.php +++ b/keyboards/install.php @@ -377,6 +377,7 @@ protected static function WriteiOSBoxes() { protected static function LoadData() { self::$error = ""; + global $_m; // Get Keyboard Metadata @@ -391,7 +392,7 @@ protected static function LoadData() { if(is_object($s)) { self::$keyboard = $s; self::$title = htmlentities(self::$keyboard->name); - if (!preg_match('/keyboard$/i', self::$title)) self::$title .= ' keyboard'; + if (!preg_match('/keyboard$/i', self::$title)) self::$title = $_m('install_page_title', self::$title); } else { self::$error .= "Error returned from ".KeymanHosts::Instance()->api_keyman_com.": $s\n"; self::$title = 'Failed to load keyboard ' . self::$id;