diff --git a/modules/backend/lang/en/lang.php b/modules/backend/lang/en/lang.php index 5bbaff5e5..8dfde181e 100644 --- a/modules/backend/lang/en/lang.php +++ b/modules/backend/lang/en/lang.php @@ -48,6 +48,21 @@ return [ 'widget_label' => 'Widget', 'widget_width' => 'Width', 'add_widget' => 'Add widget', + 'widget_inspector_title' => 'Widget configuration', + 'widget_inspector_description' => 'Configure the report widget', + 'widget_columns_label' => 'Width :columns', + 'widget_columns_description' => 'The widget width, a number between 1 and 10.', + 'widget_columns_error' => 'Please enter the widget width as a number between 1 and 10.', + 'columns' => '{1} column|[2,Inf] columns', + 'widget_new_row_label' => 'Force new row', + 'widget_new_row_description' => 'Put the widget in a new row.', + 'widget_title_label' => 'Widget title', + 'widget_title_error' => 'The Widget Title is required.', + 'status' => [ + 'widget_title_default' => 'System status', + 'online' => 'online', + 'update_available' => '{0} updates available!|{1} update available!|[2,Inf] updates available!', + ] ], 'user' => [ 'name' => 'Administrator', diff --git a/modules/backend/widgets/ReportContainer.php b/modules/backend/widgets/ReportContainer.php index 61bd8e94d..5dc8eb8b9 100644 --- a/modules/backend/widgets/ReportContainer.php +++ b/modules/backend/widgets/ReportContainer.php @@ -6,6 +6,7 @@ use Request; use Backend\Classes\WidgetManager; use Backend\Models\UserPreferences; use File; +use Lang; /** * Report Container Widget @@ -282,30 +283,30 @@ class ReportContainer extends WidgetBase $property = [ 'property' => 'ocWidgetWidth', - 'title' => 'Width (1-10)', - 'description' => 'The widget width, a number between 1 and 10.', + 'title' => Lang::get('backend::lang.dashboard.widget_columns_label', ['columns' => '(1-10)']), + 'description' => Lang::get('backend::lang.dashboard.widget_columns_description'), 'type' => 'dropdown', 'validationPattern' => '^[0-9]+$', - 'validationMessage' => 'Please enter the widget width as a number between 1 and 10.', + 'validationMessage' => Lang::get('backend::lang.dashboard.widget_columns_error'), 'options' => [ - 1 => '1 column', - 2 => '2 columns', - 3 => '3 columns', - 4 => '4 columns', - 5 => '5 columns', - 6 => '6 columns', - 7 => '7 columns', - 8 => '8 columns', - 9 => '9 columns', - 10 => '10 columns' + 1 => '1 ' . Lang::choice('backend::lang.dashboard.columns', 1), + 2 => '2 ' . Lang::choice('backend::lang.dashboard.columns', 2), + 3 => '3 ' . Lang::choice('backend::lang.dashboard.columns', 3), + 4 => '4 ' . Lang::choice('backend::lang.dashboard.columns', 4), + 5 => '5 ' . Lang::choice('backend::lang.dashboard.columns', 5), + 6 => '6 ' . Lang::choice('backend::lang.dashboard.columns', 6), + 7 => '7 ' . Lang::choice('backend::lang.dashboard.columns', 7), + 8 => '8 ' . Lang::choice('backend::lang.dashboard.columns', 8), + 9 => '9 ' . Lang::choice('backend::lang.dashboard.columns', 9), + 10 => '10 ' . Lang::choice('backend::lang.dashboard.columns', 10) ] ]; $result[] = $property; $property = [ 'property' => 'ocWidgetNewRow', - 'title' => 'Force new row', - 'description' => 'Put the widget in a new row.', + 'title' => Lang::get('backend::lang.dashboard.widget_new_row_label'), + 'description' => Lang::get('backend::lang.dashboard.widget_new_row_description'), 'type' => 'checkbox' ]; diff --git a/modules/backend/widgets/reportcontainer/partials/_widget.htm b/modules/backend/widgets/reportcontainer/partials/_widget.htm index 14cfb8a1f..f345bcbfb 100644 --- a/modules/backend/widgets/reportcontainer/partials/_widget.htm +++ b/modules/backend/widgets/reportcontainer/partials/_widget.htm @@ -11,8 +11,8 @@ [ - 'title' => 'Widget title', - 'default' => 'System status', + 'title' => Lang::get('backend::lang.dashboard.widget_title_label'), + 'default' => Lang::get('backend::lang.dashboard.status.widget_title_default'), 'type' => 'string', 'validationPattern' => '^.+$', - 'validationMessage' => 'The Widget Title is required.' + 'validationMessage' => Lang::get('backend::lang.dashboard.widget_title_error') ] ]; } diff --git a/modules/system/reportwidgets/status/partials/_widget.htm b/modules/system/reportwidgets/status/partials/_widget.htm index f29960443..90f24d1dd 100644 --- a/modules/system/reportwidgets/status/partials/_widget.htm +++ b/modules/system/reportwidgets/status/partials/_widget.htm @@ -4,11 +4,13 @@