diff --git a/_content/downloads/_downloads.php b/_content/downloads/_downloads.php
index 7337c69a..2bd26a40 100644
--- a/_content/downloads/_downloads.php
+++ b/_content/downloads/_downloads.php
@@ -1,29 +1,29 @@
-
Keyman for Android is also available on the Play Store.
+= _m_Downloads('available_on_play_store') ?>
= $playstoreTable ?>
-Keyman for iPhone and iPad
-Keyman for iPhone and iPad can be found on the App Store.
+= _m_Downloads('product_ios') ?>
+= _m_Downloads('available_on_app_store') ?>
= $appstoreTable ?>
-Keyman for Linux
+= _m_Downloads('product_linux') ?>
-Ubuntu, Wasta-Linux: Keyman for Linux can be installed via launchpad:
+- = _m_Downloads('install_via_launchpad') ?>
sudo add-apt-repository ppa:keymanapp/keyman
sudo apt install keyman onboard-keyman
-Products for Software Developers
+= _m_Downloads('products_for_software_developers') ?>
diff --git a/_content/downloads/index.php b/_content/downloads/index.php
index d50cb2d8..21917a9f 100644
--- a/_content/downloads/index.php
+++ b/_content/downloads/index.php
@@ -4,28 +4,37 @@
require_once _KEYMANCOM_INCLUDES . '/includes/appstore.php';
require_once _KEYMANCOM_INCLUDES . '/includes/playstore.php';
use Keyman\Site\Common\KeymanHosts;
+ 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([
- 'title' =>'Keyman Downloads',
- 'description' => 'Keyman stable downloads',
+ 'title' => _m_Downloads('downloads_page_title'),
+ 'description' => _m_Downloads('downloads_page_description'),
'css' => ['template.css','index.css','app-store-links.css', 'prism.css'],
'js' => ['prism.js'],
'showMenu' => true
]);
?>
-Keyman Downloads
+= _m_Downloads('downloads_page_title') ?>
- Get the latest version of Keyman here. These are standalone downloads and do not contain keyboard layouts
- for your language. See also the pre-release download page and the old versions download page.
+ = _m_Downloads('get_the_latest',
+ sprintf('%s', _m_Downloads('downloads_pre_release_page')),
+ sprintf('%s', _m_Downloads('downloads_old_versions_page')) ) ?>
-Keyman version history (all products)
+
+ = _m_Downloads('keyman_version_history_1') ?>
+ = _m_Downloads('keyman_version_history_2') ?>
+
- Browse all versions (14.0 onwards)
+ = _m_Downloads('browse_all_versions') ?>
$product\n\n";
+ echo sprintf("%s
\n\n",
+ $target, _m_Downloads($product));
$tiers = explode(' ',$tiers);
foreach($tiers as $tier) {
echo downloadLinks($product, $platform, $tier, $filepattern);
@@ -38,9 +39,7 @@ function downloadSection($product, $platform, $filepattern, $tiers = '', $target
function downloadLinks($product, $platform, $tier, $filepatterns) {
global $versions;
- $tierTitle = ucFirst($tier);
- echo "$tierTitle
\n";
- echo "\n";
+ echo sprintf("%s
\n\n", ucFirst(_m_Downloads($tier)));
if(!empty($versions->$platform->$tier)) {
if(!is_array($filepatterns)) $filepatterns = array($filepatterns);
foreach($filepatterns as $filepattern) {
@@ -50,12 +49,18 @@ function downloadLinks($product, $platform, $tier, $filepatterns) {
if(!empty($versions->$platform->$tier->files->$file)) {
$fileData = $versions->$platform->$tier->files->$file;
$fileSize = formatSizeUnits($fileData->size);
- echo "- $file $tier (released $fileData->date, $fileSize)
\n";
+ echo sprintf("- %s %s %s
\n",
+ KeymanHosts::Instance()->downloads_keyman_com ,
+ $platform, $tier,
+ $versions->$platform->$tier->version,
+ $file, $file, $tier,
+ _m_Downloads('released_date_size', $fileData->date, $fileSize));
}
}
}
- echo "- All $product $tier releases
\n";
- echo "
\n";
+ echo sprintf("- %s
\n
\n",
+ KeymanHosts::Instance()->downloads_keyman_com, $platform, $tier,
+ _m_Downloads('all_product_releases', _m_Downloads($product), _m_Downloads($tier)));
}
function downloadLargeCTA($product, $platform, $tier, $filepattern) {
diff --git a/_includes/locale/strings/downloads/en.php b/_includes/locale/strings/downloads/en.php
new file mode 100644
index 00000000..2d81b3a2
--- /dev/null
+++ b/_includes/locale/strings/downloads/en.php
@@ -0,0 +1,94 @@
+ "Keyman Downloads",
+
+ # Downloads_page_description
+ "downloads_page_description" => "Keyman stable downloads",
+
+ # Get the latest
+ "get_the_latest" =>
+ "Get the latest version of Keyman here. These are standalone downloads and do not contain keyboard layouts
+ for your language. See also the %1\$s and the %2\$s.",
+
+ # Downloads pre-release page
+ "downloads_pre_release_page" => "pre-release download page",
+
+ # Downloads old versions page
+ "downloads_old_versions_page" => "old versions download page",
+
+ # Keyman version history
+ "keyman_version_history_1" => "Keyman version history",
+
+ # Keyman version history (description)
+ "keyman_version_history_2" => "(all products)",
+
+ # Browse all versions
+ "browse_all_versions" => "Browse all versions (14.0 onwards)",
+
+ ### Product Downloads
+
+ # Keyman for Windows
+ "product_windows" => "Keyman for Windows",
+
+ # Keyman for macOS
+ "product_macos" => "Keyman for macOS",
+
+ # Keyman for Android
+ "product_android" => "Keyman for Android",
+
+ "available_on_play_store" => "Keyman for Android is also available on the Play Store.",
+
+ # Keyman for iPhone and iPad
+ "product_ios" => "Keyman for iPHone and iPad",
+
+ "available_on_app_store" => "Keyman for iPhone and iPad can be found on the App Store.",
+
+ # Keyman for Linux
+ "product_linux" => "Keyman for Linux",
+
+ "install_via_launchpad" => "Ubuntu, Wasta-Linux: Keyman for Linux can be installed via launchpad:",
+
+ # Products for Software Developers
+ "products_for_software_developers" => "Products for Software Developers",
+
+ # KeymanWeb
+ "product_keymanweb" => "KeymanWeb",
+
+ # Keyman Developer
+ "product_developer" => "Keyman Developer",
+
+ # Keyman Engine for Android
+ "product_engine_android" => "Keyman Engine for Android",
+
+ # Keyman Engine for iOS
+ "product_engine_ios" => "Keyman Engine for iOS",
+
+ ## Tiers
+ "alpha" => "alpha",
+
+ "beta" => "beta",
+
+ "stable" => "stable",
+
+ # (released {date}, {file size})
+ "released_date_size" => "(released %1\$s, %2\$s)",
+
+ # All {product} {tier} releases
+ "all_product_releases" => "All %1\$s %2\$s releases",
+
+ # No downloads found for {product}
+ "no_downloads_found" => "No downloads found for %1\$s."
+]
+;
+
diff --git a/_includes/locale/strings/downloads/es.php b/_includes/locale/strings/downloads/es.php
new file mode 100644
index 00000000..270b0ee1
--- /dev/null
+++ b/_includes/locale/strings/downloads/es.php
@@ -0,0 +1,94 @@
+ "Descargas de Keyman",
+
+ # Downloads_page_description
+ "downloads_page_description" => "Descargas estables de Keyman",
+
+ # Get the latest
+ "get_the_latest" =>
+ "Obtenga la última versión de Keyman aquí. Estas son descargas independientes y no contienen diseños de teclado
+ para su idioma. Ver también la %1\$s y la %2\$s.",
+
+ # Downloads pre-release page
+ "downloads_pre_release_page" => "página de descarga de la versión preliminar",
+
+ # Downloads old versions page
+ "downloads_old_versions_page" => "páginas de descarga de versiones antiguas",
+
+ # Keyman version history
+ "keyman_version_history_1" => "Historial de versiones de Keyman",
+
+ # Keyman version history (description)
+ "keyman_version_history_2" => "(todos los productos)",
+
+ # Browse all versions
+ "browse_all_versions" => "Ver todas las versiones (14.0 en adelante)",
+
+ ### Product Downloads
+
+ # Keyman for Windows
+ "product_windows" => "Teclado para Windows",
+
+ # Keyman for macOS
+ "product_macos" => "Teclado para macOS",
+
+ # Keyman for Android
+ "product_android" => "Teclado para Android",
+
+ "available_on_play_store" => "Keyman para Android también está disponible en Play Store.",
+
+ # Keyman for iPhone and iPad
+ "product_ios" => "Teclado para iPhone e iPad",
+
+ "available_on_app_store" => "Keyman para iPhone e iPad se puede encontrar en la App Store.",
+
+ # Keyman for Linux
+ "product_linux" => "Keyman para Linux",
+
+ "install_via_launchpad" => "Ubuntu, Wasta-Linux: Keyman para Linux puede instalarse a través de launchpad:",
+
+ # Products for Software Developers
+ "products_for_software_developers" => "Productos para desarrolladores de software",
+
+ # KeymanWeb
+ "product_keymanweb" => "KeymanWeb",
+
+ # Keyman Developer
+ "product_developer" => "Keyman Developer",
+
+ # Keyman Engine for Android
+ "product_engine_android" => "Motor Keyman para Android",
+
+ # Keyman Engine for iOS
+ "product_engine_ios" => "Motor Keyman para iOS",
+
+ ## Tiers
+ "alpha" => "alfa",
+
+ "beta" => "beta",
+
+ "stable" => "estable",
+
+ # (released {date}, {file size})
+ "released_date_size" => "(publicado el %1\$s, %2\$s)",
+
+ # All {product} {tier} releases
+ "all_product_releases" => "Todas las versiones %1\$s %2\$s",
+
+ # No downloads found for {product}
+ "no_downloads_found" => "No se encontraron descargas para %1\$s."
+]
+;
+
diff --git a/crowdin.yml b/crowdin.yml
index d7946f58..59fa1d56 100644
--- a/crowdin.yml
+++ b/crowdin.yml
@@ -85,6 +85,19 @@ files:
fr: fr
km: km
+ # Product Download files
+ - source: /_includes/locale/strings/downloads/en.php
+ dest: /downloads/en.php
+ translation: /_includes/locale/strings/downloads/%locale%.php
+ languages_mapping:
+ locale:
+ # Canonical locales as needed
+ es-ES: es
+ de: de
+ fr: fr
+ km: km
+
+
# crowdin parameters descriptions:
#