Skip to content

[4.0] Make transitions translateable#35457

Merged
wilsonge merged 7 commits intojoomla:4.0-devfrom
bembelimen:4.0/workflow-translation
Sep 11, 2021
Merged

[4.0] Make transitions translateable#35457
wilsonge merged 7 commits intojoomla:4.0-devfrom
bembelimen:4.0/workflow-translation

Conversation

@bembelimen
Copy link
Contributor

Pull Request for Issue #35094 .

Summary of Changes

Transitions are now translateable everywhere.

For example:

Backend article edit view:
grafik

Backend article list view:
grafik

Testing Instructions

  • Make a fresh install of this PR
  • Activate the workflow
  • Go to the transitions
  • See that there are now language keys as title
  • Check the different occurrence of the transitions (backend/frontend edit article, list view backend)
  • Use own language keys in transitions + language override function.

Actual result BEFORE applying this Pull Request

Transitions are not (everywhere) translated

Expected result AFTER applying this Pull Request

Transitions are translated everywhere.

@Kostelano
Copy link
Contributor

Probably, we need to add new lines including to api/language/en-GB/joomla.ini

@brianteeman
Copy link
Contributor

Yes please, at least for now, it is helpful if we just keep these files in sync

@brianteeman
Copy link
Contributor

I am not a fan of editing previous update sql. They should be immutable.

@brianteeman
Copy link
Contributor

Also the update sql you have will fail on an existing site.

/* SQL Error (1062): Duplicate entry '1' for key 'hvu3i_workflow_transitions.PRIMARY' */

@richard67
Copy link
Member

I am not a fan of editing previous update sql. They should be immutable.

@brianteeman I thought you meanwhile had understand that "immutable" is wrong due to all my past work on old update SQL files. And here you are again wrong: We can and should change the old update SQL because there is no risk in doing it and it makes the workflow transitions to be translatable also after update from 3.10 to 4.0.

Also the update sql you have will fail on an existing site.
/* SQL Error (1062): Duplicate entry '1' for key 'hvu3i_workflow_transitions.PRIMARY' */

Than only happens if you apply the update SQL changed by this PR to a Joomla 4 database. But that will never happen since this SQL will only run when updating a 3.10.

@brianteeman
Copy link
Contributor

I stick by my views

@richard67
Copy link
Member

As usual.

@brianteeman
Copy link
Contributor

No point in having opinions if you don't believe in them. To repeat it's not about the technical need but as pointed out previously by another user changes to existing dated files can break complex work flows for server management

@bembelimen
Copy link
Contributor Author

Hello,
thanks for the feedback.

Also the update sql you have will fail on an existing site.

/* SQL Error (1062): Duplicate entry '1' for key 'hvu3i_workflow_transitions.PRIMARY' */

My concerns were, that I didn't want to change existing workflows, so I updated only the 3.x => 4.x path, not adding a new file which changes existing data. How did you raise this error? Could you give me please a little guide, so I can fix it?

@brianteeman
Copy link
Contributor

If you are updating manually (perhaps you want to keep everything in github) then its reasonable to assume that someone would run the sql updates manually. Thats when you get the error. also see #22754

My concerns were, that I didn't want to change existing workflows,

So now we have two sites with different data depending on when they were installed

When you now tell a user that workflows are translatable and they just need to create a language override it will only work on one of the two sites.

If you do an update query instead then everyone is on the same data (unless they changed the text already in which case their changed data is untouched)

UPDATE #__workflow_transitions SET title="PUBLISH_AND_FEATURE" WHERE title = "Publish & Feature"

@bembelimen
Copy link
Contributor Author

Thanks @brianteeman I've pushed the update files.

@Kostelano
Copy link
Contributor

I have tested this item ✅ successfully on c091084


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

@RickR2H
Copy link
Member

RickR2H commented Sep 9, 2021

I have tested this item ✅ successfully on c091084

All overrides work!


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

@richard67
Copy link
Member

@bembelimen This PR has conflicts now due to the names of the SQL update scripts already being used. That comes from the merged PR #35483 . Could you solve that?

@richard67
Copy link
Member

Conflict solved, Since it doesn't have changed anything on what was relevant for the test, I restore the test results in the issue tracker so they are counted, and will set RTC.

@richard67
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Sep 11, 2021
@wilsonge wilsonge merged commit 3ab6503 into joomla:4.0-dev Sep 11, 2021
@wilsonge
Copy link
Contributor

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Sep 11, 2021
@wilsonge wilsonge added this to the Joomla 4.0.3 milestone Sep 11, 2021
supachaiteasakul added a commit to supachaiteasakul/joomla-laithai that referenced this pull request Sep 13, 2021
@bembelimen bembelimen deleted the 4.0/workflow-translation branch March 15, 2024 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language Change This is for Translators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

Comments