From 605336f317134d9b34fb788ec552152f6182aba0 Mon Sep 17 00:00:00 2001
From: Marc Durdin
Date: Wed, 3 Jun 2026 13:42:21 +0200
Subject: [PATCH] fix: update version landing pages with new i18n references
* Update the call to `downloadSection()` in version landing pages to
match the new identifiers used in ui/downloads.php. Fixes the base
issue for the versioned landing pages.
* Refactor `Locale::definePageScope` to declare standard `$_m_`
variable and `_m_()` function, so that we can skip the Locale
initialization boilerplate in more places. Also make it possible to
declare multiple scopes (supporting includes in the future), and make
the function idempotent.
* Update references to `[$]_m*` to the common pattern provided in
`Locale::definePageScope`.
* Add version landing pages to _test/ so that they are crawled in the
link checker.
Fixes: #764
Fixes: KEYMAN-COM-3H1
Test-bot: skip
---
_content/10/index.php | 10 +-
_content/11/index.php | 10 +-
_content/14/index.php | 10 +-
_content/15/index.php | 10 +-
_content/downloads/index.php | 6 +-
_content/downloads/pre-release/index.php | 2 -
.../downloads/releases/_version_downloads.php | 2 -
_content/keyboards/index.php | 24 ++--
_content/keyboards/install.php | 80 +++++------
_content/keyboards/share.php | 20 +--
_includes/includes/ui/downloads.php | 4 +-
_includes/includes/ui/keyboard-details.php | 128 +++++++++---------
_includes/locale/Locale.php | 37 ++++-
_test/index.md | 9 ++
14 files changed, 183 insertions(+), 169 deletions(-)
diff --git a/_content/10/index.php b/_content/10/index.php
index 1cb0f3d5..5d4a2eca 100644
--- a/_content/10/index.php
+++ b/_content/10/index.php
@@ -49,7 +49,7 @@
What's New in Keyman Desktop 10 for Windows?
@@ -58,7 +58,7 @@
supports Unicode 11.0 and BCP 47 language identifiers. Desktop 10 also includes additional user interface for Turkish.
What's New in Keyman 10 for macOS?
@@ -68,7 +68,7 @@
and easily install keyboard packages by double-clicking the kmp file.
Keyman for Android is also available on the Play Store.
= $playstoreTable ?>
@@ -92,7 +92,7 @@
Swift 4.0 app.
What's New in KeymanWeb 10?
@@ -104,7 +104,7 @@
Developer Software
Keyman Developer 10 allows you to create
diff --git a/_content/11/index.php b/_content/11/index.php
index 311ee8e3..1482d7ac 100644
--- a/_content/11/index.php
+++ b/_content/11/index.php
@@ -52,7 +52,7 @@
Keyman Desktop 11
Stable
@@ -66,7 +66,7 @@
What's New in Keyman 11 for macOS?
@@ -92,7 +92,7 @@
Keyman for Android is available on the Play Store.
= $playstoreTable ?>
@@ -122,7 +122,7 @@
@@ -131,7 +131,7 @@
Developer Software
What's new in Keyman Developer 11?
diff --git a/_content/14/index.php b/_content/14/index.php
index 29c70214..23f75d30 100644
--- a/_content/14/index.php
+++ b/_content/14/index.php
@@ -72,7 +72,7 @@
User Software
What's New in Keyman 14 for Windows?
@@ -98,7 +98,7 @@
What's New in Keyman 14 for macOS?
@@ -144,7 +144,7 @@
= $playstoreTable ?>
@@ -188,7 +188,7 @@
What's New in KeymanWeb 14?
@@ -208,7 +208,7 @@
Developer Software
What's new in Keyman Developer 14?
diff --git a/_content/15/index.php b/_content/15/index.php
index d891b24d..79fc5237 100644
--- a/_content/15/index.php
+++ b/_content/15/index.php
@@ -99,7 +99,7 @@
User Software
What's New in Keyman 15 for Windows?
@@ -111,7 +111,7 @@
What's New in Keyman 15 for macOS?
@@ -146,7 +146,7 @@
= $playstoreTable ?>
@@ -184,7 +184,7 @@
What's New in KeymanWeb 15?
@@ -201,7 +201,7 @@
Developer Software
What's new in Keyman Developer 15?
diff --git a/_content/downloads/index.php b/_content/downloads/index.php
index 21917a9f..c8f96deb 100644
--- a/_content/downloads/index.php
+++ b/_content/downloads/index.php
@@ -7,8 +7,6 @@
use Keyman\Site\com\keyman\Locale;
Locale::definePageScope('LOCALE_DOWNLOADS', 'downloads');
- $_m_Downloads = function($id, ...$args) { return Locale::m(LOCALE_DOWNLOADS, $id, ...$args); };
- function _m_Downloads($id, ...$args) { return Locale::m(LOCALE_DOWNLOADS, $id, ...$args); }
// Required
head([
@@ -23,13 +21,13 @@ function _m_Downloads($id, ...$args) { return Locale::m(LOCALE_DOWNLOADS, $id
= _m_Downloads('downloads_page_title') ?>
- = _m_Downloads('get_the_latest',
+ = _m_Downloads('get_the_latest',
sprintf('%s ', _m_Downloads('downloads_pre_release_page')),
sprintf('%s ', _m_Downloads('downloads_old_versions_page')) ) ?>
- = _m_Downloads('keyman_version_history_1') ?>
+ = _m_Downloads('keyman_version_history_1') ?>
= _m_Downloads('keyman_version_history_2') ?>
diff --git a/_content/downloads/pre-release/index.php b/_content/downloads/pre-release/index.php
index 12a0ba2f..9151024e 100644
--- a/_content/downloads/pre-release/index.php
+++ b/_content/downloads/pre-release/index.php
@@ -6,8 +6,6 @@
use Keyman\Site\com\keyman\Locale;
Locale::definePageScope('LOCALE_DOWNLOADS', 'downloads');
- $_m_Downloads = function($id, ...$args) { return Locale::m(LOCALE_DOWNLOADS, $id, ...$args); };
- function _m_Downloads($id, ...$args) { return Locale::m(LOCALE_DOWNLOADS, $id, ...$args); }
// Required
head([
diff --git a/_content/downloads/releases/_version_downloads.php b/_content/downloads/releases/_version_downloads.php
index b2ab39de..a6b56f1d 100644
--- a/_content/downloads/releases/_version_downloads.php
+++ b/_content/downloads/releases/_version_downloads.php
@@ -7,8 +7,6 @@
use Keyman\Site\com\keyman\Locale;
Locale::definePageScope('LOCALE_DOWNLOADS', 'downloads');
- $_m_Downloads = function($id, ...$args) { return Locale::m(LOCALE_DOWNLOADS, $id, ...$args); };
- function _m_Downloads($id, ...$args) { return Locale::m(LOCALE_DOWNLOADS, $id, ...$args); }
if(!isset($_REQUEST['version'])) {
echo "version parameter is required.";
diff --git a/_content/keyboards/index.php b/_content/keyboards/index.php
index 3f3675f2..f5c37eb2 100644
--- a/_content/keyboards/index.php
+++ b/_content/keyboards/index.php
@@ -10,12 +10,10 @@
use Keyman\Site\com\keyman\Locale;
Locale::definePageScope('LOCALE_KEYBOARDS', 'keyboards');
- $_m = function($id, ...$args) { return Locale::m(LOCALE_KEYBOARDS, $id, ...$args); };
- function _m($id, ...$args) { return Locale::m(LOCALE_KEYBOARDS, $id, ...$args); }
$head_options = [
- 'title' => _m('page_title'),
- 'description' => _m('page_description'),
+ 'title' => _m_Keyboards('page_title'),
+ 'description' => _m_Keyboards('page_description'),
'css' => [Util::cdn('css/template.css'), Util::cdn('keyboard-search/search.css')],
'js' => [
Util::cdn('keyboard-search/jquery.mark.js'),
@@ -62,14 +60,14 @@ function _m($id, ...$args) { return Locale::m(LOCALE_KEYBOARDS, $id, ...$args
'>
-
+
@@ -84,13 +82,13 @@ function _m($id, ...$args) { return Locale::m(LOCALE_KEYBOARDS, $id, ...$args
-
= _m('enter_name') ?> (= _m('popular_keyboards') ?> | = _m('all_keyboards') ?> )
+
= _m_Keyboards('enter_name') ?> (= _m_Keyboards('popular_keyboards') ?> | = _m_Keyboards('all_keyboards') ?> )
-
= _m('hints') ?>
+
= _m_Keyboards('hints') ?>
- = _m('searchbox_description') ?>
- = _m('searchbox_hint_2', 'k:', 'l:', 's:', 'c:', 'c:thailand') ?>
- = _m('searchbox_hint_3', 'l:id:', 'l:id:ti-et') ?>
+ = _m_Keyboards('searchbox_description') ?>
+ = _m_Keyboards('searchbox_hint_2', 'k:', 'l:', 's:', 'c:', 'c:thailand') ?>
+ = _m_Keyboards('searchbox_hint_3', 'l:id:', 'l:id:ti-et') ?>
diff --git a/_content/keyboards/install.php b/_content/keyboards/install.php
index 1f5d6f02..a5c43d59 100644
--- a/_content/keyboards/install.php
+++ b/_content/keyboards/install.php
@@ -19,12 +19,6 @@
use Keyman\Site\com\keyman\Locale;
Locale::definePageScope('LOCALE_KEYBOARDS_INSTALL', 'keyboards/install');
- $_m = function($id, ...$args) {
- return Locale::m(LOCALE_KEYBOARDS_INSTALL, $id, ...$args);
- };
- function _m($id, ...$args) {
- return Locale::m(LOCALE_KEYBOARDS_INSTALL, $id, ...$args);
- }
// Bundled downloads will make use of Keyman tier, which the site visitor
// can override with tier=[alpha|beta|stable]. If no override has been
@@ -98,7 +92,7 @@ public static function render_keyboard_details($id, $tier, $bcp47) {
}
protected static function WriteWindowsBoxes() {
- global $_m;
+ global $_m_Keyboards_Install;
$keyboard = self::$keyboard;
$tier = self::$tier;
@@ -136,15 +130,15 @@ protected static function WriteWindowsBoxes() {
$result = <<
- {$_m('download_start_shortly', $h['name'])}
-
+ {$_m_Keyboards_Install('download_start_shortly', $h['name'])}
+
END;
@@ -152,7 +146,7 @@ protected static function WriteWindowsBoxes() {
}
protected static function WritemacOSBoxes() {
- global $_m;
+ global $_m_Keyboards_Install;
$keyboard = self::$keyboard;
$tier = self::$tier;
@@ -187,17 +181,17 @@ protected static function WritemacOSBoxes() {
$result = <<
@@ -206,7 +200,7 @@ protected static function WritemacOSBoxes() {
}
protected static function WriteLinuxBoxes() {
- global $_m;
+ global $_m_Keyboards_Install;
$keyboard = self::$keyboard;
$tier = self::$tier;
@@ -244,19 +238,19 @@ protected static function WriteLinuxBoxes() {
startAfterPageLoad_Linux(document.currentScript.dataset);
@@ -265,7 +259,7 @@ protected static function WriteLinuxBoxes() {
}
protected static function WriteAndroidBoxes() {
- global $_m;
+ global $_m_Keyboards_Install;
$keyboard = self::$keyboard;
$tier = self::$tier;
@@ -306,14 +300,14 @@ protected static function WriteAndroidBoxes() {
@@ -322,7 +316,7 @@ protected static function WriteAndroidBoxes() {
}
protected static function WriteiOSBoxes() {
- global $_m;
+ global $_m_Keyboards_Install;
$keyboard = self::$keyboard;
$tier = self::$tier;
@@ -357,17 +351,17 @@ protected static function WriteiOSBoxes() {
$result = <<
@@ -377,7 +371,7 @@ protected static function WriteiOSBoxes() {
protected static function LoadData() {
self::$error = "";
- global $_m;
+ global $_m_Keyboards_Install;
// Get Keyboard Metadata
@@ -392,7 +386,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 = $_m('install_page_title', self::$title);
+ if (!preg_match('/keyboard$/i', self::$title)) self::$title = $_m_Keyboards_Install('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;
@@ -416,7 +410,7 @@ protected static function LoadData() {
}
protected static function WriteTitle() {
- global $_m;
+ global $_m_Keyboards_Install;
$head_options = [
'title' => self::$title,
'js' => [Util::cdn('keyboard-search/keyboard-details.js'), Util::cdn('keyboard-search/install.js')],
@@ -430,7 +424,7 @@ protected static function WriteTitle() {
// If parameters are missing ...
?>
= htmlentities(self::$id); ?>
- = $_m('keyboard_not_found', htmlentities(self::$id)) ?>
+ = $_m_Keyboards_Install('keyboard_not_found', htmlentities(self::$id)) ?>
Tier() == KeymanHosts::TIER_DEVELOPMENT && (ini_get('display_errors') !== '0')) {
diff --git a/_content/keyboards/share.php b/_content/keyboards/share.php
index 37d2d6a0..4c1dd394 100644
--- a/_content/keyboards/share.php
+++ b/_content/keyboards/share.php
@@ -7,12 +7,6 @@
use Keyman\Site\com\keyman\Locale;
Locale::definePageScope('LOCALE_KEYBOARDS_SHARE', 'keyboards/share');
- $_m = function($id, ...$args) {
- return Locale::m(LOCALE_KEYBOARDS_SHARE, $id, ...$args);
- };
- function _m($id, ...$args) {
- return Locale::m(LOCALE_KEYBOARDS_SHARE, $id, ...$args);
- }
if(!isset($_REQUEST['id'])) {
header('Location: /keyboards');
@@ -47,19 +41,19 @@ function find_keyboard($id) {
// Keyboard not found, so let's explain.
$head_options = [
- 'title' => $_m('head_title', $id)
+ 'title' => $_m_Keyboards_Share('head_title', $id)
];
head($head_options);
?>
-= $_m('h1_sharing_keyboard', $id) ?>
+= $_m_Keyboards_Share('h1_sharing_keyboard', $id) ?>
-= $_m('line1') ?> = $_m('line2') ?> =$id?> , = $_m('line3') ?>
+= $_m_Keyboards_Share('line1') ?> = $_m_Keyboards_Share('line2') ?> =$id?> , = $_m_Keyboards_Share('line3') ?>
-= $_m('h2_how_to_get') ?>
+= $_m_Keyboards_Share('h2_how_to_get') ?>
-= $_m('how_to_get_1') ?>
+= $_m_Keyboards_Share('how_to_get_1') ?>
-= $_m('how_to_get_2') ?>
-= $_m('keyman_forum') ?> = $_m('how_to_get_3') ?>
\ No newline at end of file
+= $_m_Keyboards_Share('how_to_get_2') ?>
+= $_m_Keyboards_Share('keyman_forum') ?> = $_m_Keyboards_Share('how_to_get_3') ?>
\ No newline at end of file
diff --git a/_includes/includes/ui/downloads.php b/_includes/includes/ui/downloads.php
index aaed54cf..b572c71b 100644
--- a/_includes/includes/ui/downloads.php
+++ b/_includes/includes/ui/downloads.php
@@ -2,6 +2,8 @@
require_once _KEYMANCOM_INCLUDES . '/autoload.php';
use Keyman\Site\Common\KeymanHosts;
+ use Keyman\Site\com\keyman\Locale;
+ Locale::definePageScope('LOCALE_DOWNLOADS', 'downloads');
$versions = @json_decode(file_get_contents(KeymanHosts::Instance()->SERVER_downloads_keyman_com . '/api/version/2.0'));
//if($versions === NULL || $versions === FALSE) {
@@ -29,7 +31,7 @@ function formatSizeUnits($bytes) {
function downloadSection($product, $platform, $filepattern, $tiers = '', $target = '') {
if($target == '') $target = $platform;
- echo sprintf("%s \n\n",
+ echo sprintf("%s \n\n",
$target, _m_Downloads($product));
$tiers = explode(' ',$tiers);
foreach($tiers as $tier) {
diff --git a/_includes/includes/ui/keyboard-details.php b/_includes/includes/ui/keyboard-details.php
index dd6f94ad..8468a3b8 100644
--- a/_includes/includes/ui/keyboard-details.php
+++ b/_includes/includes/ui/keyboard-details.php
@@ -13,12 +13,6 @@
use \Keyman\Site\com\keyman;
Locale::definePageScope('LOCALE_KEYBOARDS_DETAILS', 'keyboards/details');
- $_m_KeyboardDetails = function($id, ...$args) {
- return Locale::m(LOCALE_KEYBOARDS_DETAILS, $id, ...$args);
- };
- function _m_KeyboardDetails($id, ...$args) {
- return Locale::m(LOCALE_KEYBOARDS_DETAILS, $id, ...$args);
- }
define('GITHUB_ROOT', 'https://github.com/keymanapp/keyboards/tree/master/');
define('DOCUMENTATION_ROOT', KeymanHosts::Instance()->help_keyman_com . '/keyboard/');
@@ -109,21 +103,21 @@ protected static function map_license($s) {
}
protected static function WriteDeveloperCloneBox() {
- global $_m_KeyboardDetails;
+ global $_m_Keyboards_Details;
$filename = self::$id . ".kpj";
$installLink = 'keyman:keyboard/install/' . rawurlencode(self::$id);
if(!empty(self::$bcp47)) $installLink .= "?bcp47=" . rawurlencode(self::$bcp47);
return <<
- {$_m_KeyboardDetails('new_project_details', htmlspecialchars($filename))}
+ {$_m_Keyboards_Details('new_project_details', htmlspecialchars($filename))}
END;
//
}
protected static function download_box($platform) {
- global $_m_KeyboardDetails;
+ global $_m_Keyboards_Details;
if(!empty(self::$deprecatedBy)) {
return "";
@@ -133,14 +127,14 @@ protected static function download_box($platform) {
if(!empty(self::$bcp47)) $installLink .= "?bcp47=" . rawurlencode(self::$bcp47);
return <<
- {$_m_KeyboardDetails('install_keyboard')}
- {$_m_KeyboardDetails('install_keyboard_button_description', htmlspecialchars($filename), self::platformTitles[$platform])}
+ {$_m_Keyboards_Details('install_keyboard')}
+ {$_m_Keyboards_Details('install_keyboard_button_description', htmlspecialchars($filename), self::platformTitles[$platform])}
END;
} else {
return <<
- {$_m_KeyboardDetails('keyboard_not_supported')}
+ {$_m_Keyboards_Details('keyboard_not_supported')}
END;
}
@@ -148,7 +142,7 @@ protected static function download_box($platform) {
protected static function WriteWebBoxes($useDescription) {
global $embed_target;
- global $_m_KeyboardDetails;
+ global $_m_Keyboards_Details;
// only show if the jsFilename property is present in the .keyboard_info
if(empty(self::$keyboard->jsFilename)) {
@@ -179,11 +173,11 @@ protected static function WriteWebBoxes($useDescription) {
$url = KeymanHosts::Instance()->keymanweb_com ."/#$lang,Keyboard_" . self::GetWebKeyboardId();
if($useDescription) {
$description = htmlentities(self::$keyboard->name);
- $description = "".$_m_KeyboardDetails("use_keyboard_button_description", $description)."
";
- $linktext = $_m_KeyboardDetails("use_keyboard_online");
+ $description = "".$_m_Keyboards_Details("use_keyboard_button_description", $description)."
";
+ $linktext = $_m_Keyboards_Details("use_keyboard_online");
} else {
$description = '';
- $linktext = $_m_KeyboardDetails("full_online_editor");
+ $linktext = $_m_Keyboards_Details("full_online_editor");
}
return <<
@@ -195,39 +189,39 @@ protected static function WriteWebBoxes($useDescription) {
protected static function LoadData() {
global $stable_version;
- global $_m_KeyboardDetails;
+ global $_m_Keyboards_Details;
self::$error = "";
$s = @file_get_contents(KeymanHosts::Instance()->SERVER_api_keyman_com. '/keyboard/' . rawurlencode(self::$id));
if ($s === FALSE) {
// Will fail later in the script
self::$error .= error_get_last()['message'] . "\n";
- self::$title = $_m_KeyboardDetails("failed_to_load_keyboard_package", self::$id);
+ self::$title = $_m_Keyboards_Details("failed_to_load_keyboard_package", self::$id);
header('HTTP/1.0 404 Keyboard not found');
} else {
$s = json_decode($s);
if(is_object($s)) {
self::$keyboard = $s;
self::$title = htmlentities(self::$keyboard->name);
- if (!preg_match('/keyboard$/i', self::$title)) self::$title = $_m_KeyboardDetails("details_page_title", self::$title);
+ if (!preg_match('/keyboard$/i', self::$title)) self::$title = $_m_Keyboards_Details("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;
self::$license = self::map_license(isset(self::$keyboard->license) ? self::$keyboard->license : 'Unknown');
} else {
- self::$error .= $_m_KeyboardDetails("error_returned_from_api", KeymanHosts::Instance()->api_keyman_com, $s);
- self::$title = $_m_KeyboardDetails("failed_to_load_keyboard_package", self::$id);
+ self::$error .= $_m_Keyboards_Details("error_returned_from_api", KeymanHosts::Instance()->api_keyman_com, $s);
+ self::$title = $_m_Keyboards_Details("failed_to_load_keyboard_package", self::$id);
header('HTTP/1.0 500 Internal Server Error');
}
}
if(!empty(self::$keyboard)) {
if (in_array('unicode', self::$keyboard->encodings) && in_array('ansi', self::$keyboard->encodings))
- self::$keyboardEncoding = $_m_KeyboardDetails("encoding_list");
+ self::$keyboardEncoding = $_m_Keyboards_Details("encoding_list");
else if (in_array('unicode', self::$keyboard->encodings))
- self::$keyboardEncoding = $_m_KeyboardDetails("unicode");
+ self::$keyboardEncoding = $_m_Keyboards_Details("unicode");
else // ansi
- self::$keyboardEncoding = $_m_KeyboardDetails("legacy_ansi");
+ self::$keyboardEncoding = $_m_Keyboards_Details("legacy_ansi");
// TODO: i18n date format, but would require a lot more Dockerfile dependencies
$date = new DateTime(self::$keyboard->lastModifiedDate);
@@ -294,7 +288,7 @@ protected static function WriteTitle() {
global $embed, $session_query_q, $embed_win, $embed_version;
global $embed_target;
- global $_m_KeyboardDetails;
+ global $_m_Keyboards_Details;
if ($embed != 'none') {
$head_options += [
@@ -335,7 +329,7 @@ protected static function WriteTitle() {
// If parameters are missing ...
?>
= self::$id ?>
- = $_m_KeyboardDetails("package_not_found", self::$id); ?>
+ = $_m_Keyboards_Details("package_not_found", self::$id); ?>
Tier() == KeymanHosts::TIER_DEVELOPMENT && (ini_get('display_errors') !== '0')) {
@@ -348,7 +342,7 @@ protected static function WriteTitle() {
?>
@@ -358,9 +352,9 @@ protected static function WriteTitle() {
- " . $_m_KeyboardDetails("important_note") . " " .
- $_m_KeyboardDetails("obsolete_version") .
- " $dep " . $_m_KeyboardDetails("instead") . "
+ " . $_m_Keyboards_Details("important_note") . " " .
+ $_m_Keyboards_Details("obsolete_version") .
+ " $dep " . $_m_Keyboards_Details("instead") . "
" .
- $_m_KeyboardDetails("view_obsolete_details") . "
+ $_m_Keyboards_Details("view_obsolete_details") . "
";
@@ -393,7 +387,7 @@ protected static function WriteTitle() {
protected static function WriteDownloadBoxes() {
global $embed, $embed_win, $embed_version;
global $embed_developer;
- global $_m_KeyboardDetails;
+ global $_m_Keyboards_Details;
// We'll write all the different platforms here and then let Bowser determine
// which box to show. This is true for both embedded and web-based viewing.
@@ -413,7 +407,7 @@ protected static function WriteDownloadBoxes() {
if ($embed_win && isset(self::$keyboard->minKeymanVersion) && version_compare(self::$keyboard->minKeymanVersion, $embed_version) > 0) {
?>
-
= $_m_KeyboardDetails("requires_keyman_minimum_version", self::$keyboard->minKeymanVersion) ?>
+
= $_m_Keyboards_Details("requires_keyman_minimum_version", self::$keyboard->minKeymanVersion) ?>
-
+
@@ -528,49 +522,49 @@ protected static function WriteDescription() {
protected static function WriteKeyboardDetails() {
global $embed_target, $session_query_q;
- global $_m_KeyboardDetails;
+ global $_m_Keyboards_Details;
// this is html, trusted in database
?>
-
= $_m_KeyboardDetails("keyboard_details") ?>
+
= $_m_Keyboards_Details("keyboard_details") ?>
- = $_m_KeyboardDetails("keyboard_ID") ?>
+ = $_m_Keyboards_Details("keyboard_ID") ?>
= htmlentities(self::$id) ?>
- = $_m_KeyboardDetails("supported_platforms") ?>
+ = $_m_Keyboards_Details("supported_platforms") ?>
= self::$keyboardPlatforms ?>
- = $_m_KeyboardDetails("author") ?>
+ = $_m_Keyboards_Details("author") ?>
= htmlentities(self::$authorName) ?>
- = $_m_KeyboardDetails("license") ?>
+ = $_m_Keyboards_Details("license") ?>
= self::$license ?>
- = $_m_KeyboardDetails("documentation") ?>
+ = $_m_Keyboards_Details("documentation") ?>
helpLink)) {
?>
- href='= self::$keyboard->helpLink ?>'>= $_m_KeyboardDetails("keyboard_help") ?>
+ href='= self::$keyboard->helpLink ?>'>= $_m_Keyboards_Details("keyboard_help") ?>
- = $_m_KeyboardDetails("source") ?>
+ = $_m_Keyboards_Details("source") ?>
sourcePath) && preg_match('/^(release|experimental)\//', self::$keyboard->sourcePath)) {
@@ -579,15 +573,15 @@ protected static function WriteKeyboardDetails() {
href='= GITHUB_ROOT . htmlentities(self::$keyboard->sourcePath) ?>'>= htmlentities(self::$keyboard->sourcePath) ?>
- = $_m_KeyboardDetails("keyboard_version") ?>
+ = $_m_Keyboards_Details("keyboard_version") ?>
= htmlentities(self::$keyboard->version) ?>
- = $_m_KeyboardDetails("last_updated") ?>
+ = $_m_Keyboards_Details("last_updated") ?>
= self::$keyboardLastModifiedDate ?>
@@ -602,7 +596,7 @@ protected static function WriteKeyboardDetails() {
if(isset(self::$keyboard->packageFilename)) {
?>
- = $_m_KeyboardDetails("package_download") ?>
+ = $_m_Keyboards_Details("package_download") ?>
= self::$keyboard->id ?>.kmp
- = $_m_KeyboardDetails("monthly_downloads") ?>
+ = $_m_Keyboards_Details("monthly_downloads") ?>
= number_format(self::$downloadCount) ?>
- = $_m_KeyboardDetails("total_downloads") ?>
- = number_format(self::$totalDownloadCount) ?>
+ = $_m_Keyboards_Details("total_downloads") ?>
+ = number_format(self::$totalDownloadCount) ?>
- = $_m_KeyboardDetails("encoding") ?>
+ = $_m_Keyboards_Details("encoding") ?>
= self::$keyboardEncoding ?>
- = $_m_KeyboardDetails("minimum_version", "Keyman") ?>
+ = $_m_Keyboards_Details("minimum_version", "Keyman") ?>
= self::$minVersion ?>
related)) { ?>
- = $_m_KeyboardDetails("related_keyboards") ?>
+ = $_m_Keyboards_Details("related_keyboards") ?>
related as $name => $value) {
@@ -638,17 +632,17 @@ protected static function WriteKeyboardDetails() {
$s = @file_get_contents(KeymanHosts::Instance()->SERVER_api_keyman_com.'/keyboard/' . rawurlencode($name));
if ($s === FALSE) {
echo "$hname ";
} else {
echo "$hname ";
}
if (isset($value->deprecates) && $value->deprecates) {
- echo $_m_KeyboardDetails("deprecated");
+ echo $_m_Keyboards_Details("deprecated");
}
if (isset($value->deprecatedBy) && $value->deprecatedBy) {
- echo $_m_KeyboardDetails("new_version");
+ echo $_m_Keyboards_Details("new_version");
}
}
?>
@@ -656,11 +650,11 @@ protected static function WriteKeyboardDetails() {
- = $_m_KeyboardDetails("supported_languages") ?>
+ = $_m_Keyboards_Details("supported_languages") ?>
languages)) - 3;
@@ -672,9 +666,9 @@ protected static function WriteKeyboardDetails() {
foreach($langs as $bcp47 => $detail) {
if($n == 3) {
echo " " .
- $_m_KeyboardDetails("expand_more", $count) . " ";
+ $_m_Keyboards_Details("expand_more", $count) . "";
echo "" .
- $_m_KeyboardDetails("collapse") . " ";
+ $_m_Keyboards_Details("collapse") . " ";
}
if (property_exists($detail, 'languageName')) {
echo
@@ -700,7 +694,7 @@ protected static function WriteKeyboardDetails() {
- = $_m_KeyboardDetails("permanent_link_to_this_keyboard") ?>
+ = $_m_Keyboards_Details("permanent_link_to_this_keyboard") ?>
href='= KeymanHosts::Instance()->keyman_com ?>/keyboards/= self::$keyboard->id ?>'>
= KeymanHosts::Instance()->keyman_com ?>/keyboards/= self::$keyboard->id ?>
@@ -709,11 +703,11 @@ protected static function WriteKeyboardDetails() {
}
protected static function WriteQRCode($context) {
- global $_m_KeyboardDetails;
+ global $_m_Keyboards_Details;
?>
-
= $_m_KeyboardDetails("scan_qr_code") ?>
+
= $_m_Keyboards_Details("scan_qr_code") ?>