From 729b3bf314ac256fc5746cfb665f31d55d4ed3b1 Mon Sep 17 00:00:00 2001 From: Alex <40072887+alexdcrane@users.noreply.github.com> Date: Fri, 17 Oct 2025 16:01:39 -0700 Subject: [PATCH] Fix widget name setting not being used on some widget labels (#7582) * Fix widget name setting not being used on some widget labels * Update app_languages.php * Add translations for active calls labels and titles * Update active_calls.php * Update call_forward.php * Update device_keys.php * Add multi-lingual support for widget labels Updated widget label to support multi-lingual text. * Update caller_id.php * Add multilingual support and update widget label * Update switch_status.php * Update system_counts.php * Replace static title with localized widget label Updated widget title to use localized label. * Add multilingual support for disk usage widget * Add translations for system disk usage labels * Update system_status.php * Update system_network_status.php * Add multi-lingual support for CPU status widget * Update app_languages.php * Update app_languages.php * Update voicemails.php * Add multi-lingual support for missed calls widget * Update recent_calls.php * Simplify widget label assignment using null coalescing * Update call_center_agents.php * Update app_languages.php --- app/active_calls/app_languages.php | 26 +++++ .../resources/dashboard/active_calls.php | 8 +- app/call_centers/app_languages.php | 26 +++++ .../dashboard/call_center_agents.php | 8 +- .../resources/dashboard/call_forward.php | 8 +- .../resources/dashboard/device_keys.php | 8 +- .../resources/dashboard/domain_limits.php | 8 +- .../resources/dashboard/caller_id.php | 8 +- .../dashboard/ring_group_forward.php | 10 +- .../resources/dashboard/switch_status.php | 8 +- app/system/app_languages.php | 104 ++++++++++++++++++ .../resources/dashboard/system_counts.php | 8 +- .../resources/dashboard/system_cpu_status.php | 8 +- .../resources/dashboard/system_disk_usage.php | 8 +- .../dashboard/system_network_status.php | 8 +- .../resources/dashboard/system_services.php | 8 +- .../resources/dashboard/system_status.php | 12 +- .../resources/dashboard/voicemails.php | 8 +- .../resources/dashboard/missed_calls.php | 8 +- .../resources/dashboard/recent_calls.php | 8 +- core/domains/resources/dashboard/domains.php | 5 +- core/user_settings/app_languages.php | 52 ++++----- 22 files changed, 305 insertions(+), 50 deletions(-) diff --git a/app/active_calls/app_languages.php b/app/active_calls/app_languages.php index 4dec946e63..c56bb4d51b 100644 --- a/app/active_calls/app_languages.php +++ b/app/active_calls/app_languages.php @@ -52,6 +52,32 @@ $text['title']['zh-cn'] = "主动通话"; $text['title']['ja-jp'] = "アクティブな通話"; $text['title']['ko-kr'] = "활성 통화"; +$text['label-active_calls']['en-us'] = "Active Calls"; +$text['label-active_calls']['en-gb'] = "Active Calls"; +$text['label-active_calls']['ar-eg'] = "المكالمات النشطة"; +$text['label-active_calls']['de-at'] = "Aktive Gespräche"; +$text['label-active_calls']['de-ch'] = "Aktive Gespräche"; +$text['label-active_calls']['de-de'] = "Aktive Gespräche"; +$text['label-active_calls']['el-gr'] = "Ενεργές κλήσεις"; +$text['label-active_calls']['es-cl'] = "Llamadas Activas"; +$text['label-active_calls']['es-mx'] = "Llamadas Activas"; +$text['label-active_calls']['fr-ca'] = "Communications Actives"; +$text['label-active_calls']['fr-fr'] = "Communications Actives"; +$text['label-active_calls']['he-il'] = "הגדרת חשבון"; +$text['label-active_calls']['it-it'] = "Chiamate Attive"; +$text['label-active_calls']['ka-ge'] = "აქტიური ზარები"; +$text['label-active_calls']['nl-nl'] = "Aktieve gesprekken"; +$text['label-active_calls']['pl-pl'] = "Aktywne Rozmowy"; +$text['label-active_calls']['pt-br'] = "Configurações da Conta"; +$text['label-active_calls']['pt-pt'] = "Chamadas Ativas"; +$text['label-active_calls']['ro-ro'] = "Apeluri active"; +$text['label-active_calls']['ru-ru'] = "Активные вызовы"; +$text['label-active_calls']['sv-se'] = "Aktiva Samtal"; +$text['label-active_calls']['uk-ua'] = "Активні дзвінки"; +$text['label-active_calls']['zh-cn'] = "主动通话"; +$text['label-active_calls']['ja-jp'] = "アクティブな通話"; +$text['label-active_calls']['ko-kr'] = "활성 통화"; + $text['label-time']['en-us'] = "Time"; $text['label-time']['en-gb'] = "Time"; $text['label-time']['ar-eg'] = "وقت"; diff --git a/app/active_calls/resources/dashboard/active_calls.php b/app/active_calls/resources/dashboard/active_calls.php index 9055dc2b0d..374cffa2e5 100644 --- a/app/active_calls/resources/dashboard/active_calls.php +++ b/app/active_calls/resources/dashboard/active_calls.php @@ -43,9 +43,15 @@ $row_style["1"] = "row_style1"; //set the dashboard icon to a solid color phone $widget_icon = 'fa-solid fa-phone'; +//convert to a key +$widget_key = str_replace(' ', '_', strtolower($widget_name)); + //add multi-lingual support $text = (new text)->get($settings->get('domain', 'language', 'en-us'), 'app/active_calls'); +//get the dashboard label +$widget_label = $text['label-'.$widget_key] ?? $widget_name; + //show the widget echo "