Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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';
Original file line number Diff line number Diff line change
@@ -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';
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -664,6 +665,8 @@ public function getTransitions()
{
unset($transitions[$key]);
}

$transitions[$key]['text'] = Text::_($transition['text']);
}

$this->cache[$store] = $transitions;
Expand Down
3 changes: 3 additions & 0 deletions administrator/language/en-GB/joomla.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 7 additions & 7 deletions installation/sql/mysql/base.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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"}');
14 changes: 7 additions & 7 deletions installation/sql/postgresql/base.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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);
13 changes: 13 additions & 0 deletions language/en-GB/joomla.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 4 additions & 2 deletions libraries/src/Form/Field/TransitionField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down