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
statusboolean optional property to TranslationType attribute defaulting toTRUE. - 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
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
Comment #2
claudiu.cristeaRescoped to take the status from the plugin definition rather than be configurable.
Comment #3
claudiu.cristeaWorking on this
Comment #5
claudiu.cristeaReady for review
Comment #6
dxvargas commentedThis feature request is useful and it's implementation is working. I mark as RTBC.
Comment #8
claudiu.cristea