From 25fdda06e37fbfbdeb91848a934b12a56ba4b1cc Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sun, 7 Aug 2022 16:56:51 -0700 Subject: [PATCH] (dev/translation#78) Settings - Define partial_locales. Display on admin UI. --- CRM/Admin/Form/Setting/Localization.php | 1 + settings/Localization.setting.php | 14 ++++++++++++++ templates/CRM/Admin/Form/Setting/Localization.tpl | 6 ++++++ 3 files changed, 21 insertions(+) diff --git a/CRM/Admin/Form/Setting/Localization.php b/CRM/Admin/Form/Setting/Localization.php index 06e8c56039..c71256cf44 100644 --- a/CRM/Admin/Form/Setting/Localization.php +++ b/CRM/Admin/Form/Setting/Localization.php @@ -35,6 +35,7 @@ class CRM_Admin_Form_Setting_Localization extends CRM_Admin_Form_Setting { 'inheritLocale' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME, 'lcMessages' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME, 'legacyEncoding' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME, + 'partial_locales' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME, 'format_locale' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME, 'monetaryThousandSeparator' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME, 'monetaryDecimalPoint' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME, diff --git a/settings/Localization.setting.php b/settings/Localization.setting.php index 6a55c01d98..19e0be3164 100644 --- a/settings/Localization.setting.php +++ b/settings/Localization.setting.php @@ -409,6 +409,20 @@ return [ 'callback' => 'CRM_Core_I18n::languages', ], ], + 'partial_locales' => [ + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'partial_locales', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => '0', + 'add' => '5.54', + 'title' => ts('Partial Locales'), + 'is_domain' => 1, + 'is_contact' => 0, + 'help_text' => NULL, + 'description' => ts('If Yes, the system will allow processing data in locales which are not fully supported. (Some tokens or resources may unavailable or substituted from other locales.)'), + ], 'format_locale' => [ 'group_name' => 'Localization Preferences', 'group' => 'localization', diff --git a/templates/CRM/Admin/Form/Setting/Localization.tpl b/templates/CRM/Admin/Form/Setting/Localization.tpl index 05fd577a9b..b27ca04611 100644 --- a/templates/CRM/Admin/Form/Setting/Localization.tpl +++ b/templates/CRM/Admin/Form/Setting/Localization.tpl @@ -49,6 +49,12 @@ {$settings_fields.contact_default_language.description} + + {$form.partial_locales.label} + {$form.partial_locales.html}
+ {$settings_fields.partial_locales.description} + + {$form.defaultCurrency.label} {help id='defaultCurrency' title=$form.defaultCurrency.label} {$form.defaultCurrency.html} -- 2.25.1