Our team suggested to shorten all the messages, I'm not sure if everybody likes this.

So this is a proposal and I would like to have more input here.

Following changes:

Old New
This content translation is being edited by the user @name and is therefore locked to prevent other users changes. This lock is in place since @date. This content translation is locked by @name. This lock exists since @date.
This content translation is now locked by you against simultaneous editing. This content translation will remain locked if you navigate away from this page without saving or unlocking it. This content translation is now locked by you against simultaneous editing. You can unlock this content translation by clicking here: !unlock
This content translation is now locked against simultaneous editing. This content translation will remain locked if you navigate away from this page without saving or unlocking it. This content translation is now locked by you against simultaneous editing. You can unlock this content translation by clicking here: !unlock
Lock broken. Anyone can now edit this content translation. Unlocked. Anyone can edit this content translation now.
Lock broken. Anyone can now edit this content. Unlocked. Anyone can edit this content now.
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kfritsche created an issue. See original summary.

kfritsche’s picture

Issue summary: View changes
Related issues: +#2925247: Always add unlock link if possible
FileSize
5.92 KB

Here a patch which would do this, but this is a patch after #2925247: Always add unlock link if possible.

kfritsche’s picture

FileSize
5.91 KB
561 bytes

Small additional change:

- You can unlock this content by clicking here: @link
+ You can unlock it by clicking here: @link

In the sentence before there is just already this content, so just a bit shorter.

hchonov’s picture

Issue summary: View changes
FileSize
14.83 KB

Not sure where should I post it, but when an admin unlocks content locked by others then two messages are shown:

kfritsche’s picture

@hchonov: What is the issue exactly here? Its two messages as its unlocked and locked again. What is wrong here or what do you propose to change in this case?

hchonov’s picture

The problem is that after the second message the first one isn't true anymore :). Probably the correct solution would be not to redirect the user to the form but to the view ..

kfritsche’s picture

FileSize
5.75 KB

Re-roll after latest changes.

kfritsche’s picture

FileSize
5.75 KB

Re-roll...

oknate’s picture

Adding an update to fix a grammar issue. "Since" is for dates, not quantities of time. So you can say, "since Jan 1st", but not "since 33 seconds".

This lock is in place since @date

to

The content has been locked for @date

hchonov’s picture

Status: Active » Needs work
+++ b/src/ContentLock/ContentLock.php
@@ -555,7 +562,7 @@ class ContentLock extends ServiceProviderBase {
+          drupal_set_message($this->t('You can unlock it by clicking here: @link', ['@link' => $link]), 'warning');

Only this message is of type "warning" and all others of the type "status". Having two different types for two messages shown one after another leads to showing them in different message boxes - one for status messages and one for warning messages.

hchonov’s picture

+++ b/src/ContentLock/ContentLock.php
@@ -555,7 +562,7 @@ class ContentLock extends ServiceProviderBase {
+          drupal_set_message($this->t('You can unlock it by clicking here: @link', ['@link' => $link]), 'warning');

Actually here we have to use the $type parameter provided to the method unlockStatusMessage, then it should be fine.

oknate’s picture

Adding messenger service to EntityBreakLockForm, since it's used in ContentLock, for consistency.

@honchov, I don't see ContentLock::unlockStatusMessage(). It must have been removed at some point.

oknate’s picture

It looks like some work needs to be done to fix the tests with this patch.

I started working on it, but it needs to be on Drupal 8.6, as some of the tests require it.

smustgrave’s picture

smustgrave’s picture

smustgrave’s picture

Title: Rename drupal messages » Rename drupal messages + suggestion for string overrides
smustgrave’s picture

smustgrave’s picture

smustgrave’s picture

Title: Rename drupal messages + suggestion for string overrides » Update README For how to override strings
Version: 8.x-1.x-dev » 8.x-2.x-dev

smustgrave’s picture

Status: Needs work » Needs review

Added update to README will see if committer wants to update the defaults.

penyaskito’s picture

I think this is quite opinionated unless there's some UX study behind it which seems overkill?
Personally I think "Lock broken" is weird, "Unlocked" looks more user friendly to me, but I'm not a native English speaker.
I have not a very strong position on the other proposed changes.

smustgrave’s picture

Also liked Unlocked more personally, if that's the only change probably can make that. Just don't want to bikeshed for 6 years :)

alexpott made their first commit to this issue’s fork.

alexpott’s picture

Status: Needs review » Needs work

Let's change "Lock broken" to "Unlocked" and be done.

  • alexpott committed 5b7156d8 on 8.x-2.x
    Issue #2925274 follow-up: Update README For how to override strings
    

smustgrave’s picture

Status: Needs work » Needs review

Actually was only 2 spots.

  • alexpott committed 56572d71 on 8.x-2.x authored by smustgrave
    Issue #2925274 by kfritsche, smustgrave, oknate, alexpott, hchonov,...
alexpott’s picture

Status: Needs review » Fixed

Let's get this done.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.