Problem/Motivation
Surfaced by @alexpott while reviewing #3398982: ConfigFormBase + validation constraints: support non-1:1 form element-to-config property mapping again — it'd have been out of scope there.
Convert
/**
* UI option for override of existing translations. Override any translation.
*/
const LOCALE_TRANSLATION_OVERWRITE_ALL = 'all';
/**
* UI option for override of existing translations.
*
* Only override non-customized translations.
*/
const LOCALE_TRANSLATION_OVERWRITE_NON_CUSTOMIZED = 'non_customized';
/**
* UI option for override of existing translations.
*
* Don't override existing translations.
*/
const LOCALE_TRANSLATION_OVERWRITE_NONE = 'none';
to a backed enum.
(These were introduced by #1804688: Download and import interface translations over a decade ago, when enums were a distant dream 😄.)
Steps to reproduce
N/A
Proposed resolution
Convert to backed enum.
Remaining tasks
Add backed enum.Deprecate the old constants- Reviews
User interface changes
None.
API changes
Deprecate the 3 constants.
Data model changes
None.
Release notes snippet
None.
Issue fork drupal-3401493
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 #3
wim leersComment #4
wim leersComment #5
wim leersComment #7
wim leersActually, I think @alexpott also meant to refactor
in
locale.settings.yamlto use this enum instead.