rename locale batch operation callbacks to match the API methods they call

Created on 21 February 2024, 12 months ago
Updated 22 February 2024, 12 months ago

Problem/Motivation

locale_config_batch_set_config_langcodes() and locale_config_batch_refresh_name() are batch operation callbacks which are just wrappers around API methods on the LocaleConfigManager.

However, the names don't match up at all which is confusing:

function locale_config_batch_set_config_langcodes(&$context) {
  Locale::config()->updateDefaultConfigLangcodes();

and:

function locale_config_batch_refresh_name(array $names, array $langcodes, &$context) {
  SNIP
  $context['results']['stats']['config'] += Locale::config()->updateConfigTranslations($names, $langcodes);

Steps to reproduce

Proposed resolution

Rename both callbacks to 'locale_config_batch_' + snake case version of the API method it calls.

No BC handling is necessary as batch API callbacks are internal.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component
Locale 

Last updated about 3 hours ago

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024