From 149dc3840bd78f7a6c5b99a031f1b7867ae3474a Mon Sep 17 00:00:00 2001 From: PaulinaNiederhoefer Date: Mon, 30 Jul 2018 19:29:26 +0200 Subject: [PATCH 1/2] Language File Update --- .../language/en-GB/en-GB.com_workflow.ini | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/administrator/language/en-GB/en-GB.com_workflow.ini b/administrator/language/en-GB/en-GB.com_workflow.ini index e2fead128ba22..1e205cd607871 100644 --- a/administrator/language/en-GB/en-GB.com_workflow.ini +++ b/administrator/language/en-GB/en-GB.com_workflow.ini @@ -3,12 +3,12 @@ ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php ; Note : All ini files need to be saved as UTF-8 -COM_CONTACT_FIELD_CATEGORY_LIST_DESC="Please choose a Category from the list." +COM_CONTACT_FIELD_CATEGORY_LIST_DESC="Please choose a category from the list." COM_WORKFLOW_ARE_YOU_SURE="Are you sure?" COM_WORKFLOW_ASC_CONDITION="Condition ascending" COM_WORKFLOW_AUTHOR="Author" COM_WORKFLOW_BASIC_TAB="Basic" -COM_WORKFLOW_CONDITION="Condition of items in this State: " +COM_WORKFLOW_CONDITION="Condition of items in this state: " COM_WORKFLOW_CONDITION_DESC="Defines item behaviour." COM_WORKFLOW_CONFIGURATION="Workflow: Options" COM_WORKFLOW_COUNT_STATES="States" @@ -27,7 +27,7 @@ COM_WORKFLOW_DESC_TAB="Description" COM_WORKFLOW_DISABLE_DEFAULT="Cannot change default state of this item." COM_WORKFLOW_EDIT="Edit" COM_WORKFLOW_EDIT_TAB="Edit" -COM_WORKFLOW_ERROR_UPDATE_STATE="Error while updating the State." +COM_WORKFLOW_ERROR_UPDATE_STATE="Error while updating the state." COM_WORKFLOW_FIELD_CATEGORY_LIST_LABEL="Category List" COM_WORKFLOW_FIELD_IS_DEFAULT_DESC="If set to default, this will be saved for the component." COM_WORKFLOW_FIELD_IS_DEFAULT_LABEL="Default" @@ -35,8 +35,8 @@ COM_WORKFLOW_FIELD_TITLE_DESC="Title" COM_WORKFLOW_FIELD_TITLE_LABEL="Title" COM_WORKFLOW_FILTER_SEARCH_DESC="Filter the list of items." COM_WORKFLOW_FILTER_SEARCH_LABEL="Search" -COM_WORKFLOW_FROM_STATE="From State" -COM_WORKFLOW_FROM_STATE_DESC="Select current State." +COM_WORKFLOW_FROM_STATE="From state" +COM_WORKFLOW_FROM_STATE_DESC="Select current state." COM_WORKFLOW_ID="ID" COM_WORKFLOW_ITEM_MUST_PUBLISHED="Item must be published to set default state." COM_WORKFLOW_ITEM_SET_DEFAULT="Item set to default." @@ -84,14 +84,14 @@ COM_WORKFLOW_TITLE="Title" COM_WORKFLOW_TOOLBAR_SET_HOME="Default" COM_WORKFLOW_TO_MANY_ITEMS="Too many items selected." COM_WORKFLOW_TO_STATE="To State" -COM_WORKFLOW_TO_STATE_DESC="Select target State." +COM_WORKFLOW_TO_STATE_DESC="Select target state." COM_WORKFLOW_TRANSITION="Transition" COM_WORKFLOW_TRANSITIONS="Transitions" COM_WORKFLOW_TRANSITIONS_LIST="%s Transitions List" COM_WORKFLOW_TRANSITION_ADD="Add Transition" COM_WORKFLOW_TRANSITION_DUPLICATE="This transition already exists." COM_WORKFLOW_TRANSITION_EDIT="Edit Transition" -COM_WORKFLOW_TRANSITION_THE_SAME_STATE="Current State and target State are the same." +COM_WORKFLOW_TRANSITION_THE_SAME_STATE="Current state and target state are the same." COM_WORKFLOW_TRASHED="Trashed" COM_WORKFLOW_UNPUBLISHED="Unpublished" COM_WORKFLOW_USER_GROUPS="User Group" From c747a75bf55dd8692cf86695b44ce276bbf0960c Mon Sep 17 00:00:00 2001 From: PaulinaNiederhoefer Date: Thu, 2 Aug 2018 10:47:13 +0200 Subject: [PATCH 2/2] when trying to delete default state, false error message thrown -> fixed error message (must be COM_WORKFLOW_MSG_DELETE_DEFAULT) -> fixed conformation message. now only if number of items deleted is greater than 0 a message will be displayed => otherwise confusing for user --- administrator/components/com_workflow/Model/StateModel.php | 4 ++-- libraries/src/MVC/Controller/AdminController.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/administrator/components/com_workflow/Model/StateModel.php b/administrator/components/com_workflow/Model/StateModel.php index 2d6d5f6839c3f..6ee084cf64cec 100644 --- a/administrator/components/com_workflow/Model/StateModel.php +++ b/administrator/components/com_workflow/Model/StateModel.php @@ -265,7 +265,7 @@ public function setDefault($pk, $value = 1) if ($table->load(array('id' => $pk))) { - if ($table->published !== 1) + if (!$table->published) { $this->setError(\JText::_("COM_WORKFLOW_ITEM_MUST_PUBLISHED")); @@ -320,7 +320,7 @@ public function publish(&$pks, $value = 1) if ($table->load(array('id' => $pk)) && $table->default) { // Prune items that you can't change. - $app->enqueueMessage(\JText::_('COM_WORKFLOW_ITEM_MUST_PUBLISHED'), 'error'); + $app->enqueueMessage(\JText::_('COM_WORKFLOW_MSG_DELETE_DEFAULT'), 'error'); unset($pks[$i]); } } diff --git a/libraries/src/MVC/Controller/AdminController.php b/libraries/src/MVC/Controller/AdminController.php index 30bf269f8ea46..461a5744296d9 100644 --- a/libraries/src/MVC/Controller/AdminController.php +++ b/libraries/src/MVC/Controller/AdminController.php @@ -249,7 +249,7 @@ public function publish() $ntext = $this->text_prefix . '_N_ITEMS_TRASHED'; } - if ($ntext !== null) + if (count($cid)) { $this->setMessage(\JText::plural($ntext, count($cid))); }