Change record status: 
Project: 
Introduced in branch: 
11.4.x
Introduced in version: 
11.4.0
Description: 

All of the content of locale.translations.inc have been deprecated.

New service: LocaleSources

Before After
locale_translation_load_sources LocaleSource->loadSources
locale_translation_build_sources LocaleSource->buildSources
locale_translation_source_check_file LocaleSource->sourceCheckFile
locale_translation_source_build LocaleSource->sourceBuild
locale_translation_build_server_pattern LocaleSource->buildServerPattern
_locale_translation_file_is_remote Protected

New service LanguageDefaultOptions

This needs to be static where it is called.

Before After
_locale_translation_default_update_options LanguageDefaultOptions::updateOptions

locale_translation_get_projects

Important note: in this CR locale_translation_get_projects was moved to LocaleProjectStorage
Before 11.4.0 LocaleProjectStorage was deprecated so the replacement was moved. See: https://www.drupal.org/node/3037033

Before After
locale_translation_get_projects \Drupal::service(LocaleProjectRepository::class)->getMultiple($project_names);

Deprecate / remove without replacement

  • locale_translation_clear_cache_projects -> replace with local static cache property
  • locale_cron_fill_queue -> Logic inlined into LocaleHooks
  • _locale_translation_source_compare ->Logic simplified and inlined into TranslationStatusForm
  • LOCALE_TRANSLATION_SOURCE_COMPARE_LT
  • LOCALE_TRANSLATION_SOURCE_COMPARE_EQ
  • LOCALE_TRANSLATION_SOURCE_COMPARE_GT
Impacts: 
Module developers