Problem/Motivation

Some projects might need to set the status as published, others as unpublished, when a source string is discovered. It would be nice to be defined per-plugin. Then, by altering the plugin definitions, 3rd-party is able to modify this.

Proposed resolution

  • Add a new status boolean optional property to TranslationType attribute defaulting to TRUE.
  • In BabeStorage, when a new source string is inserted check if the hash already exists:
    • If the inserted source string is new (its hash doesn't exist yet in DB), create the hash with the (plugin) default status of the new string.
    • If existing source string status is TRUE, don't change it. Regardless of the (plugin) default status of the inserted string, the existing TRUE wins.
    • If existing source string status is FALSE, change the status to the (plugin) default status of the newly inserted string

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

New TranslationType definition property

Issue fork babel-3539336

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:

Comments

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

Title: Allow different default status configurable per-plugin » Allow different default status per-plugin
Issue summary: View changes

Rescoped to take the status from the plugin definition rather than be configurable.

claudiu.cristea’s picture

Assigned: Unassigned » claudiu.cristea

Working on this

claudiu.cristea’s picture

Assigned: claudiu.cristea » Unassigned
Status: Active » Needs review

Ready for review

dxvargas’s picture

Status: Needs review » Reviewed & tested by the community

This feature request is useful and it's implementation is working. I mark as RTBC.

  • claudiu.cristea committed 23eefb93 on 1.x
    Issue #3539336 by claudiu.cristea, dxvargas: Allow different default...
claudiu.cristea’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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