diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.3-2021-09-05.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.3-2021-09-05.sql new file mode 100644 index 0000000000000..431115b5f0a98 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/4.0.3-2021-09-05.sql @@ -0,0 +1,7 @@ +UPDATE `#__workflow_transitions` SET `title` = 'PUBLISH' WHERE `title`= 'Publish'; +UPDATE `#__workflow_transitions` SET `title` = 'UNPUBLISH' WHERE `title`= 'Unpublish'; +UPDATE `#__workflow_transitions` SET `title` = 'TRASH' WHERE `title`= 'Trash'; +UPDATE `#__workflow_transitions` SET `title` = 'ARCHIVE' WHERE `title`= 'Archive'; +UPDATE `#__workflow_transitions` SET `title` = 'FEATURE' WHERE `title`= 'Feature'; +UPDATE `#__workflow_transitions` SET `title` = 'UNFEATURE' WHERE `title`= 'Unfeature'; +UPDATE `#__workflow_transitions` SET `title` = 'PUBLISH_AND_FEATURE' WHERE `title`= 'Publish & Feature'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.3-2021-09-05.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.3-2021-09-05.sql new file mode 100644 index 0000000000000..57cd9dc8fe41e --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.3-2021-09-05.sql @@ -0,0 +1,7 @@ +UPDATE "#__workflow_transitions" SET "title" = 'PUBLISH' WHERE "title"= 'Publish'; +UPDATE "#__workflow_transitions" SET "title" = 'UNPUBLISH' WHERE "title"= 'Unpublish'; +UPDATE "#__workflow_transitions" SET "title" = 'TRASH' WHERE "title"= 'Trash'; +UPDATE "#__workflow_transitions" SET "title" = 'ARCHIVE' WHERE "title"= 'Archive'; +UPDATE "#__workflow_transitions" SET "title" = 'FEATURE' WHERE "title"= 'Feature'; +UPDATE "#__workflow_transitions" SET "title" = 'UNFEATURE' WHERE "title"= 'Unfeature'; +UPDATE "#__workflow_transitions" SET "title" = 'PUBLISH_AND_FEATURE' WHERE "title"= 'Publish & Feature'; diff --git a/administrator/components/com_content/src/Model/ArticlesModel.php b/administrator/components/com_content/src/Model/ArticlesModel.php index e9b8e02a02a43..ea629cbb71fb6 100644 --- a/administrator/components/com_content/src/Model/ArticlesModel.php +++ b/administrator/components/com_content/src/Model/ArticlesModel.php @@ -14,6 +14,7 @@ use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Factory; use Joomla\CMS\Language\Associations; +use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\Model\ListModel; use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Table\Table; @@ -664,6 +665,8 @@ public function getTransitions() { unset($transitions[$key]); } + + $transitions[$key]['text'] = Text::_($transition['text']); } $this->cache[$store] = $transitions; diff --git a/administrator/language/en-GB/joomla.ini b/administrator/language/en-GB/joomla.ini index 2ba39e4e88657..bfcfc92d79d57 100644 --- a/administrator/language/en-GB/joomla.ini +++ b/administrator/language/en-GB/joomla.ini @@ -1139,8 +1139,11 @@ JTABLE_OPTIONS_ORDERING="Order by:" ; States assets translations ARCHIVE="Archive" ARCHIVED="Archived" +FEATURE="Feature" +UNFEATURE="Unfeature" PUBLISH="Publish" PUBLISHED="Published" +PUBLISH_AND_FEATURE="Publish & Feature" TRASH="Trash" TRASHED="Trashed" UNPUBLISH="Unpublish" diff --git a/installation/sql/mysql/base.sql b/installation/sql/mysql/base.sql index d475b0c8cb483..d7a5ea81915de 100644 --- a/installation/sql/mysql/base.sql +++ b/installation/sql/mysql/base.sql @@ -1161,10 +1161,10 @@ CREATE TABLE IF NOT EXISTS `#__workflow_transitions` ( -- INSERT INTO `#__workflow_transitions` (`id`, `asset_id`, `published`, `ordering`, `workflow_id`, `title`, `description`, `from_stage_id`, `to_stage_id`, `options`) VALUES -(1, 58, 1, 1, 1, 'Unpublish', '', -1, 1, '{"publishing":"0"}'), -(2, 59, 1, 2, 1, 'Publish', '', -1, 1, '{"publishing":"1"}'), -(3, 60, 1, 3, 1, 'Trash', '', -1, 1, '{"publishing":"-2"}'), -(4, 61, 1, 4, 1, 'Archive', '', -1, 1, '{"publishing":"2"}'), -(5, 62, 1, 5, 1, 'Feature', '', -1, 1, '{"featuring":"1"}'), -(6, 63, 1, 6, 1, 'Unfeature', '', -1, 1, '{"featuring":"0"}'), -(7, 64, 1, 7, 1, 'Publish & Feature', '', -1, 1, '{"publishing":"1","featuring":"1"}'); +(1, 58, 1, 1, 1, 'UNPUBLISH', '', -1, 1, '{"publishing":"0"}'), +(2, 59, 1, 2, 1, 'PUBLISH', '', -1, 1, '{"publishing":"1"}'), +(3, 60, 1, 3, 1, 'TRASH', '', -1, 1, '{"publishing":"-2"}'), +(4, 61, 1, 4, 1, 'ARCHIVE', '', -1, 1, '{"publishing":"2"}'), +(5, 62, 1, 5, 1, 'FEATURE', '', -1, 1, '{"featuring":"1"}'), +(6, 63, 1, 6, 1, 'UNFEATURE', '', -1, 1, '{"featuring":"0"}'), +(7, 64, 1, 7, 1, 'PUBLISH_AND_FEATURE', '', -1, 1, '{"publishing":"1","featuring":"1"}'); diff --git a/installation/sql/postgresql/base.sql b/installation/sql/postgresql/base.sql index e97ec4dc88463..55d319d745aae 100644 --- a/installation/sql/postgresql/base.sql +++ b/installation/sql/postgresql/base.sql @@ -1180,12 +1180,12 @@ CREATE INDEX "#__workflow_transitions_idx_workflow_id" ON "#__workflow_transitio CREATE INDEX "#__workflow_transitions_idx_checked_out" ON "#__workflow_transitions" ("checked_out"); INSERT INTO "#__workflow_transitions" ("id", "asset_id", "published", "ordering", "workflow_id", "title", "description", "from_stage_id", "to_stage_id", "options") VALUES -(1, 58, 1, 1, 1, 'Unpublish', '', -1, 1, '{"publishing":"0"}'), -(2, 59, 1, 2, 1, 'Publish', '', -1, 1, '{"publishing":"1"}'), -(3, 60, 1, 3, 1, 'Trash', '', -1, 1, '{"publishing":"-2"}'), -(4, 61, 1, 4, 1, 'Archive', '', -1, 1, '{"publishing":"2"}'), -(5, 62, 1, 5, 1, 'Feature', '', -1, 1, '{"featuring":"1"}'), -(6, 63, 1, 6, 1, 'Unfeature', '', -1, 1, '{"featuring":"0"}'), -(7, 64, 1, 7, 1, 'Publish & Feature', '', -1, 1, '{"publishing":"1","featuring":"1"}'); +(1, 58, 1, 1, 1, 'UNPUBLISH', '', -1, 1, '{"publishing":"0"}'), +(2, 59, 1, 2, 1, 'PUBLISH', '', -1, 1, '{"publishing":"1"}'), +(3, 60, 1, 3, 1, 'TRASH', '', -1, 1, '{"publishing":"-2"}'), +(4, 61, 1, 4, 1, 'ARCHIVE', '', -1, 1, '{"publishing":"2"}'), +(5, 62, 1, 5, 1, 'FEATURE', '', -1, 1, '{"featuring":"1"}'), +(6, 63, 1, 6, 1, 'UNFEATURE', '', -1, 1, '{"featuring":"0"}'), +(7, 64, 1, 7, 1, 'PUBLISH_AND_FEATURE', '', -1, 1, '{"publishing":"1","featuring":"1"}'); SELECT setval('#__workflow_transitions_id_seq', 8, false); diff --git a/language/en-GB/joomla.ini b/language/en-GB/joomla.ini index 4ffcb0e3db2a9..017453cff4e93 100644 --- a/language/en-GB/joomla.ini +++ b/language/en-GB/joomla.ini @@ -507,3 +507,16 @@ JTABLE_OPTIONS_ORDERING="Order by:" JGLOBAL_READ_MORE="Read more ..." JGLOBAL_READ_MORE_TITLE="Read more: %s" JGLOBAL_REGISTER_TO_READ_MORE="Register to read more ..." + +; States assets translations +ARCHIVE="Archive" +ARCHIVED="Archived" +FEATURE="Feature" +UNFEATURE="Unfeature" +PUBLISH="Publish" +PUBLISHED="Published" +PUBLISH_AND_FEATURE="Publish & Feature" +TRASH="Trash" +TRASHED="Trashed" +UNPUBLISH="Unpublish" +UNPUBLISHED="Unpublished" diff --git a/libraries/src/Form/Field/TransitionField.php b/libraries/src/Form/Field/TransitionField.php index dbe29272c0832..87c0c9e065e02 100644 --- a/libraries/src/Form/Field/TransitionField.php +++ b/libraries/src/Form/Field/TransitionField.php @@ -154,8 +154,10 @@ function ($item) use ($user, $component) } ); - // Sort by transition name - $items = ArrayHelper::sortObjects($items, 'value', 1, true, true); + foreach ($items as $item) + { + $item->text = Text::_($item->text); + } } // Get workflow stage title