Coder Social home page Coder Social logo

bbenjamin / drupal-8-draft-translation-helper Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3 KB

Drupal 8: Prevents editing translations when there is a draft-in-progress in the default language

CSS 100.00%
drupal-8 drupal-module drupal-translation

drupal-8-draft-translation-helper's Introduction

Moderation + Translation Helper for Drupal 8

This was built to make life a little easier for content editors on multilingual sites with Content Moderation or Workbench Moderation enabled.

Currently, if the default language version of a node has a draft-in-progress, it's not possible to update/publish a translation of that node if there are any untranslateable fields (including files) or if the URL alias is generated by pathauto.

This works as-intended, but to a non-technical user this seems more like a bug that prevents them from publishing changes. It's also not particularly easy explaining to non-technical users how to address the issue via Drupal's UI.

This module prevents the "I can't save my changes" scenario by providing some restrictions to content editors.

If this module is installed, editors will not be able to edit a node's translation if there is a draft-in-progress of t the default language version.

If a user visits a not-default-language node on the front end, and the default language node has a draft in progress:

Local task buttons are grayed out (with css, so you can still get into the node if needed)

An alert appears stating:

There is a draft in progress for the [default language] version of this page. Editing options are disabled until the [default language] draft is published or removed. The [default language] draft-in-progress can be found [link to active draft in default language]

If a user visits a not-default-language node edit form, and the default language node has a draft in progress:

The node form is hidden from the user and replaced with same "There is a draft in progress..." notice that is quoted above.

This does limit user workflows a bit. As long as there isn't a need to work on translations while the default language version has an active draft, this module can reduce support tickets and behavior that many users would perceive as buggy.

drupal-8-draft-translation-helper's People

Contributors

bbenjamin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.