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
This commit is contained in:
Alex
2025-10-17 16:01:39 -07:00
committed by GitHub
parent a11b79e1b5
commit 729b3bf314
22 changed files with 305 additions and 50 deletions

View File

@@ -13,10 +13,16 @@
//access granted
}
//convert to a key
$widget_key = str_replace(' ', '_', strtolower($widget_name));
//add multi-lingual support
$language = new text;
$text = $language->get($settings->get('domain', 'language', 'en-us'), 'app/switch');
//get the dashboard label
$widget_label = $text['label-'.$widget_key] ?? $widget_name;
//switch status
echo "<div class='hud_box'>\n";
@@ -78,7 +84,7 @@
//show the content
echo "<div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_switch_status_details').slideToggle('fast');\"").">\n";
echo " <span class='hud_title'>".$text['label-switch_status']."</span>\n";
echo " <span class='hud_title'>".escape($widget_label)."</span>\n";
if (!isset($widget_chart_type) || $widget_chart_type == "doughnut") {
//add doughnut chart