Convert 3 LOCALE_TRANSLATION_OVERWRITE_* constants used in the UI to a backed enum

Created on 14 November 2023, 10 months ago

Problem/Motivation

Surfaced by @alexpott while reviewing πŸ“Œ ConfigFormBase + validation constraints: support composite form elements Needs review β€” 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

  • Reviews

User interface changes

None.

API changes

Deprecate the 3 constants.

Data model changes

None.

Release notes snippet

None.

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component
LocaleΒ  β†’

Last updated 1 day ago

Created by

πŸ‡§πŸ‡ͺBelgium Wim Leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024