? ? ? Pending

User tests: Successful: Unsuccessful:

avatar bembelimen
bembelimen
9 Aug 2018

Pull Request for Issue #21476 (comment).

Summary of Changes

Now one can use languages constants to have multilingual states

Testing Instructions

Create a state called "JPUBLISHED" and check it everywhere in the system (state list, article edit form, article list, transition edit form, ...)

Expected result

The language constant will be translated

Actual result

No translation at all

avatar bembelimen bembelimen - open - 9 Aug 2018
avatar bembelimen bembelimen - change - 9 Aug 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Aug 2018
Category Administration com_content SQL Installation Libraries
avatar bembelimen bembelimen - change - 9 Aug 2018
Title
Translate states via language files
[4.0] Translate states via language files
avatar bembelimen bembelimen - edited - 9 Aug 2018
avatar bembelimen bembelimen - change - 9 Aug 2018
Labels Added: ?
avatar infograf768
infograf768 - comment - 10 Aug 2018

Also:
same corrections should be done for Transitions
Using maybe the existing strings
JTOOLBAR_UNPUBLISH, etc. or new specific COM_WORKFLOW strings

To obtain (here for French. just modified for unpublished)

screen shot 2018-08-10 at 09 02 43

In both cases Modifier Non Publié for the title is not very nice phrasing. Maybe add a : between.

avatar joomla-cms-bot joomla-cms-bot - change - 10 Aug 2018
Category Administration com_content SQL Installation Libraries Administration com_content com_workflow SQL Installation Libraries
avatar bembelimen
bembelimen - comment - 10 Aug 2018

@infograf768 I'll create a new PR for this, but thanks for the suggestion!

avatar infograf768
infograf768 - comment - 13 Aug 2018

Can conflicts be solved?
And obviously adapted to the new stage name instead of state

avatar bembelimen
bembelimen - comment - 13 Aug 2018

Sure, I waited for #21566

avatar infograf768
infograf768 - comment - 13 Aug 2018

I think that also Joomla! Default should be a string btw.

avatar bembelimen bembelimen - change - 13 Aug 2018
Labels Added: ?
avatar bembelimen bembelimen - change - 13 Aug 2018
Title
[4.0] Translate states via language files
[4.0] Translate stages via language files
avatar bembelimen bembelimen - edited - 13 Aug 2018
avatar infograf768
infograf768 - comment - 14 Aug 2018

Also conflict with new file name.

avatar infograf768
infograf768 - comment - 14 Aug 2018

And I foresee issues with #21520 as the sql does not use string constants.

avatar infograf768
infograf768 - comment - 23 Aug 2018

Missing Text:: line 118 of tmpl/transitions/default.php to get
<a href="<?php echo $edit; ?>" title="<?php echo Text::_('JACTION_EDIT'); ?> <?php echo Text::_($this->escape(addslashes($item->title))); ?>">

Otherwise good first step for me

avatar bembelimen
bembelimen - comment - 23 Aug 2018

Thanks @infograf768

avatar infograf768 infograf768 - test_item - 24 Aug 2018 - Tested successfully
avatar infograf768
infograf768 - comment - 24 Aug 2018

I have tested this item successfully on 9d0ba73

Let's advance with this.

One more tester, if possible.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21506.

avatar infograf768
infograf768 - comment - 24 Aug 2018

I have tested this item successfully on 9d0ba73

Let's advance with this.

One more tester, if possible.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21506.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 24 Aug 2018 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Aug 2018

I have tested this item successfully on 9d0ba73


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21506.

avatar franz-wohlkoenig franz-wohlkoenig - change - 24 Aug 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Aug 2018

Ready to Commit after two successful tests.

avatar alikon
alikon - comment - 24 Aug 2018
avatar alikon
alikon - comment - 24 Aug 2018

question:
should we do the same on the #__workflow_transitions ?

avatar franz-wohlkoenig franz-wohlkoenig - change - 24 Aug 2018
Status Ready to Commit Pending
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 24 Aug 2018

Status back on "Pending".

avatar infograf768
infograf768 - comment - 24 Aug 2018

@alikon
I thought we could do that after the follow-up on this.
I explain:

We also need to translate the transitions. I.e. enter in db some string for the actions
Unpublish, Publish, etc.
Then translate the titles in transitions Manager with something like

										<?php echo $editIcon; ?><?php echo Text::_($item->title); ?>
											</a>
										<?php else: ?>
											<?php echo Text::_($item->title); ?>
										<?php endif; ?>

so basically we would have something like

INSERT INTO `#__workflow_transitions` (`id`, `asset_id`, `published`, `ordering`, `workflow_id`, `title`, `description`, `from_stage_id`, `to_stage_id`) VALUES
(1, 0, 1, 1, 1, 'JUNPUBLISH', '', -1, 1),
(2, 0, 1, 2, 1, 'JPUBLISH', '', -1, 2),
(3, 0, 1, 3, 1, 'JTRASH', '', -1, 3),
(4, 0, 1, 4, 1, 'JARCHIVE', '', -1, 4);

And add the new lang strings.
Is it worth changing now db or do it in the next PR?

avatar infograf768
infograf768 - comment - 24 Aug 2018

Or do it in this PR?

avatar alikon
alikon - comment - 24 Aug 2018

Yes we can do in a next PR,

Il ven 24 ago 2018, 07:28 infograf768 notifications@github.com ha scritto:

Or do it in this PR?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#21506 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALFsUncU2NFikLUdWpf3BuGOLrdUC2Gks5uT47fgaJpZM4V2Qbn
.

avatar infograf768
infograf768 - comment - 24 Aug 2018

@bembelimen
Your decision. If you do transitions in next PR, let's not forget @alikon necessary updated patch.

avatar joomla-cms-bot joomla-cms-bot - change - 24 Aug 2018
Category Administration com_content SQL Installation Libraries com_workflow SQL Administration com_admin Postgresql com_content com_workflow Installation Libraries
avatar bembelimen
bembelimen - comment - 24 Aug 2018

Thanks @alikon for the PR

I would do the translation in a new PR, so we have small code changes.

avatar infograf768
infograf768 - comment - 25 Aug 2018

Drone error is unrelated to this PR.

@wilsonge Please merge.

avatar infograf768 infograf768 - change - 25 Aug 2018
Status Pending Ready to Commit
Labels
avatar infograf768
infograf768 - comment - 25 Aug 2018

rtc


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21506.
avatar brianteeman
brianteeman - comment - 25 Aug 2018

Whoever merges can you directly fix the drone error

avatar bembelimen bembelimen - change - 25 Aug 2018
Labels Added: ?
avatar wilsonge wilsonge - change - 31 Aug 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-08-31 20:02:58
Closed_By wilsonge
avatar wilsonge wilsonge - close - 31 Aug 2018
avatar wilsonge wilsonge - merge - 31 Aug 2018
avatar wilsonge
wilsonge - comment - 31 Aug 2018

Thanks guys!

Add a Comment

Login with GitHub to post a comment