Software interface translation

This is one of the three pillars of the Drupal 8 Multilingual Initiative and focuses on the core functionality of locale.module from Drupal 7 relating to interface language translation. Think the backend behind t(), format_plural() and friends.

Although there is some support to establish an entirely new system for storing and referencing translatable strings (see http://groups.drupal.org/node/154394), there are much bigger problems in the other two pillars of the initiative to solve, so to set a reasonable target, we plan to keep t() and format_plural() as-is and instead focus this pillar on user problems like making it easier to pull in translations and developer problems like easier to grok APIs and decoupling of intertwined subcomponents.

In short this pillar of the initiative works off of English source strings at all times, which come from module/theme/distribution source code files. The strings are stored in the database and are made available for translation on the user interface. For community contributed projects, the strings are pre-parsed and made translatable on localize.drupal.org. The pre-translated text should be possible to be fed to Drupal 8 sites with just core automatically from localize.drupal.org like Drupal 7 with the added l10n_update module.

The main focus of planned changes are:

  • Fix bugs for the API and improve performance (speed up lookups, fix plural storage and lookup, etc)
  • Provide an API for the interface translations
  • Consolidate the .po file source directories that can be all around Drupal to one central directory
  • Automate the discovery and download of files to that central directory (integrate l10n_update module
    in core)
  • Decouple this system from configuration translation (remove support for textgroups), with upgrade path in the contributed i18n module where the feature was actually used
  • Improve the built-in editing interface for interface translations
  • Make this available under a new and more logical name like interface_translation.module or somesuch
Legend:
Critical issue
Major issue
Current top priority

Currently in the works for Drupal 8

See all these issues also at https://drupal.org/project/issues/search/drupal?issue_tags=language-ui%2C+D8MI&issue_tags_op=all+of. This view of issues is automatically cached and might be out of date up to two hours at times.

To do

#2499639: Use better labels for numeric fields when using a multiple plural forms language
8.5.x-devbug reportMajorneeds worktranslationsprintlanguage-configUsability
#1853534: Reintroduce Views integration for locale.module
8.5.x-devtaskMajorneeds workNeeds testsVDC
#1912886: Improve installation language requirement descriptions and offline detection
8.4.x-devtaskMajorneeds workmediumSprintWeekend2015needs issue summary updateSprintWeekend2015QueueNeeds testsdrupaldevdays
#2466553: Untranslated menu items are displayed in menus
8.4.x-devbug reportMajorneeds worklanguage-config
#2580671: Locale DB schema case insensitive (blob) only on MySQL not on other databases
8.5.x-devbug reportMajorneeds workPostgreSQLsqliteneeds backport to D7SprintWeekend2017Perfomance
#2575275: {% trans %} (and other parts of templates) are unable to use URL escaping
8.4.x-devbug reportMajorneeds workSafeMarkupNeeds change recordsecurityTriaged D8 majorNeeds followupTwig
#1220964: Number field prefix/suffix get t()'ed through format_plural()
8.5.x-devbug reportNormalneeds workneeds backport to D7language-content
#1635298: Allow non-case-sensitive searching of strings in UI translation
8.4.x-devfeature requestNormalneeds work
Assigned to Désiré
#1861930: Use "Drupal translations website" instead of Drupal translation server or Community translation server
8.4.x-devtaskNormalneeds workSunrise Sanity Cruisedistributionsneeds issue summary update
#1887136: PHP warning/notice when disabling and uninstalling modules
8.4.x-devbug reportNormalneeds workNeeds manual testing
#2042143: [META] Fix unsafe core translatable strings
8.4.x-devtaskNormalactivedrushstring freeze
#2503893: Regression: not possible to delete source strings in Drupal 8 interface translation
8.4.x-devbug reportNormalneeds workNeeds testsNeeds screenshots
#2512672: Add secure debug output to twig trans extension
8.4.x-devtaskNormalactiveTwigNeeds tests

To be committed

(None)
Legend:
Critical issue
Major issue
Current top priority

Other related issues

See all these issues also at https://drupal.org/project/issues/search/drupal?issue_tags=language-ui%2C+D8MI&issue_tags_op=all+of. This view of issues is automatically cached and might be out of date up to two hours at times.

Backport

#2182265: Drupal.t() placeholder substitution doesn't always work correctly (backport part of the Javascript file translation fixes from Drupal 8)
7.x-devbug reportMajorclosed (fixed)JavaScriptSprintWeekend2014needs issue summary updateneeds backport to D6Drupal bugfix target
#655048: Plural formula information blanked when importing a poorly-formed .po file
6.x-devbug reportNormalclosed (fixed)needs backport to D7needs backport to D6
#746240: Race condition in locale() - duplicates in {locales_source}
6.x-devbug reportNormalClosed (outdated)needs backport to D77.13 release notes
#1027074: Add string context to Enabled & Disabled in Shortcut module
7.x-devtaskNormalpatch (to be ported)string context
#1191614: Make t() formatter available as its own function
7.x-devfeature requestNormalclosed (fixed)API addition
#1261212: Static cache for language_list() is not cleared in _locale_rebuild_js()
7.x-devbug reportNormalneeds workNeeds testsneeds issue summary updateneeds backport to D7needs steps to reproduce
#1664528: It's impossible to search for "Strings not translated to language ..."
7.x-devbug reportNormalclosed (fixed)7.15 release notes
#2269165: Short month names lack context, other contexts overly specific
7.x-devbug reportNormalneeds reviewneeds backport to D7
Assigned to aloyr

Postponed

#2600798: Translation files import not working properly when installing dev version
8.4.x-devbug reportMajorpostponed (maintainer needs more info)sprintRandom test failure

Closed

#532512: Plural string storage is broken, editing UI is missing
8.0.x-devbug reportCriticalclosed (fixed)Needs testsD8 upgrade path
Assigned to andypost
#1336170: Add locale module to upgrade tests
8.0.x-devtaskCriticalclosed (fixed)D8 upgrade pathlanguage-base
Assigned to rvilar
#1975490: Convert locale_custom_strings_* to settings
8.0.x-devtaskCriticalclosed (fixed)Configuration system
#1998088: Convert locale_translate_english variable to CMI
8.0.x-devtaskCriticalclosed (fixed)Configuration system
#2022549: Regression: No interface translation in the first installer steps
8.0.x-devbug reportCriticalclosed (fixed)regression
#2030537: Translations not downloaded when adding a new language
8.0.x-devbug reportCriticalclosed (fixed)Needs testsDrupalaton 2014
#2043953: Singular/plural strings don't work in JavaScript anymore
8.0.x-devbug reportCriticalclosed (duplicate)JavaScriptregressionPHP 5.4
#2182603: Remove LocaleUninstallTest
8.0.x-devtaskCriticalclosed (fixed)beta blockerConfiguration system
#2338081: Local Tasks, Actions, and Contextual links mark strings from derivatives (or alter hooks) as safe and translated
8.0.x-devbug reportCriticalclosed (fixed)SafeMarkupD8 AccelerateD8 Security BountysecurityTriaged D8 critical
#2532476: Menu links should use a TranslationWrapper to encapsulate safe translatable strings from YAML files
8.0.x-devbug reportCriticalclosed (fixed)SafeMarkupsecurityTriaged D8 criticalD8 Accelerate
#2557113: Make t() return a TranslationWrapper object to remove reliance on a static, unpredictable safe list
8.0.x-devtaskCriticalclosed (fixed)SafeMarkupSecurity improvementsD8 Accelerate
#2567159: Fix improper usage of t() in ViewsBlock
8.0.x-devtaskCriticalclosed (fixed)SafeMarkupSecurity improvementsVDCblockerD8 Accelerate
#361597: CRUD API for locale source and locale target strings
8.0.x-devtaskMajorclosed (duplicate)i18n sprintmontreal
#1188430: Rip out textgroup support from locale module
8.0.x-devtaskMajorclosed (fixed)needs issue summary updatelanguage-config
#1642602: Language export screen is showing wrong options
8.0.x-devbug reportMajorclosed (works as designed)
#1742894: Get status of local and remote translation files
8.0.x-devfeature requestMajorclosed (fixed)
Assigned to Sutharsan
#1785086: Introduce a generic API for interface translation strings
8.0.x-devfeature requestMajorclosed (fixed)NoviceAcross the finish line
#1804688: Download and import interface translations
8.0.x-devtaskMajorclosed (fixed)feature freeze
#1813762: Introduce unified interfaces, use dependency injection for interface translation
8.0.x-devtaskMajorclosed (fixed)Stalking CrellPHPUnit Blocker
#1848490: Import translations automatically during installation
8.0.x-devfeature requestMajorclosed (fixed)Usability
Assigned to Sutharsan
#1850080: Entity type labels lack plurality, cannot generate UI text based on label if plural is needed
8.1.x-devbug reportMajorclosed (fixed)Entity systemVDC8.1.0 release notes
#1927584: Add support for the Twig {% trans %} tag extension
8.0.x-devtaskMajorclosed (fixed)i18nTwig
Assigned to markcarver
#2218313: Toolbar subtree is broken if you use a different language.
8.0.x-devbug reportMajorclosed (fixed)JavaScript
Assigned to jessebeach
#2344967: Localization update does not update configuration translations
8.0.x-devbug reportMajorclosed (fixed)language-configD8MIAMSAmsterdam2014
#2351667: Can't add another language (due to validation errors)
8.0.x-devbug reportMajorclosed (fixed)Barcelona2015formapi
#2454859: Not possible to format plural an already translated string
8.0.x-devbug reportMajorclosed (fixed)Security improvementsblocker
#2455739: formatPlural() is not fully tested for SafeMarkup
8.0.x-devbug reportMajorclosed (fixed)Security improvements
#2501639: Remove SafeMarkup::set in drupal_check_module()
8.0.x-devtaskMajorclosed (fixed)SafeMarkupTwigD8 Accelerate
#2538514: Remove argument support from Translation Annotation
8.0.x-devbug reportMajorclosed (works as designed)Needs change recordNeeds beta evaluationAPI change
#2539246: Search page local task label was an XSS vector—add tests
8.0.x-devbug reportMajorclosed (fixed)SafeMarkupD8 AccelerateD8 Security Bountysecurity
#2569069: Replace TranslationWrapper with TranslatableString and deprecate TranslationWrapper
8.0.x-devtaskMajorclosed (fixed)Security improvementsD8 AccelerateSafeMarkup
#2570037: Remove the ability to return unsafe string from Translation->translate()
8.0.x-devtaskMajorclosed (duplicate)SafeMarkupSecurity improvementsD8 AccelerateNeeds tests
#2578377: Make translatable docs consolidated and better for developers
8.0.x-devbug reportMajorclosed (fixed)rc eligiblesecurity
Assigned to YesCT
#2610436: Twig templates incorrectly use % trans % with arbitrary filters
8.2.x-devbug reportMajorclosed (fixed)TwigTriaged D8 major
#2599594: Multilingual content: Menu link is not correctly stored on translation.
8.0.0bug reportMajorclosed (fixed)multilingualdrupalconasia2016Triaged for D8 major current state
#2690389: Fix string translation in MigrateUpgradeRunBatch
8.2.x-devbug reportMajorclosed (fixed)DevDaysMilanDrupalatonNovicerc eligible
#322549: t() should work regardless of the bootstrap phase
8.0.x-devtaskNormalclosed (duplicate)Needs reroll
#323919: Add hint to download translation before adding language
8.0.x-devfeature requestNormalclosed (won't fix)
#993820: UI for locale string versions
8.0.x-devbug reportNormalclosed (works as designed)
#1029554: Translations update feature user experience
8.0.x-devtaskNormalclosed (duplicate)
#1082902: Improve language switcher usability
8.0.x-devtaskNormalclosed (duplicate)UsabilitySprintWeekend2015SprintWeekend2015Queue
#1189184: OOP & PSR-0-ify gettext .po file parsing and generation
8.0.x-devtaskNormalclosed (fixed)API changePSR-0
#1191488: META: Integrate l10n_update functionality in core
8.0.x-devtaskNormalclosed (fixed)D8MI-metaneeds celebration video
#1213510: A modern t()
8.0.x-devfeature requestNormalclosed (duplicate)i18nneeds issue summary updatel10nAPI changeneeds profiling
Assigned to sun
#1222072: Split translation editing functionality out of locale.admin.inc and locale.inc
8.0.x-devtaskNormalclosed (fixed)needs issue summary updateFramework Initiativelocale-split
#1223502: Update for ripping out textgroup support in Drupal locale module
8.0.x-devtaskNormalclosed (duplicate)D8 upgrade pathlanguage-config
#1260520: Apply language_save and language_load to the locale management UI
8.0.x-devtaskNormalclosed (duplicate)language-base
Assigned to svendecabooter
#1261034: Can we add hook_locale_alter ?
8.0.x-devsupport requestNormalclosed (works as designed)
#1273968: remove eval from locale.module
8.0.x-devtaskNormalclosed (fixed)JavaScriptchallenging
#1445004: Implement customized translation bit on translations
8.0.x-devtaskNormalclosed (fixed)localization update
#1452188: New UI for string translation
8.0.x-devfeature requestNormalclosed (fixed)JavaScript
#1623564: Wrong text at translation UI
8.0.x-devbug reportNormalclosed (fixed)
#1627006: Collect project information for translation update
8.0.x-devtaskNormalclosed (fixed)
Assigned to Sutharsan
#1635084: Track import status of files in the locale .po file directory
8.0.x-devfeature requestNormalclosed (fixed)Random test failure
#1637348: Import Gettext .po files in progressive batches to avoid time limits
8.0.x-devtaskNormalclosed (fixed)
Assigned to vasi1186
#1640050: Locale summary in language table should be "not applicable" for locked languages
8.0.x-devbug reportNormalclosed (fixed)
Assigned to Schnitzel
#1642966: Typo: coddition instead of condition
8.0.x-devbug reportNormalclosed (duplicate)
#1658842: Introduce a translations:// stream wrapper to access the .po file directory
8.0.x-devfeature requestNormalclosed (fixed)Needs tests
Assigned to webflo
#1744228: Auto-detect the language code of an imported file by file name
8.0.x-devfeature requestNormalclosed (fixed)JavaScript
#1751326: When locale import happens on module enable, many notices are thrown
8.0.x-devbug reportNormalclosed (cannot reproduce)Needs tests
#1751380: Inconsistencies in linking to various download pages
8.0.x-devfeature requestNormalclosed (fixed)
#1787520: Translations not imported on installation
8.0.x-devbug reportNormalclosed (cannot reproduce)Needs tests
#1804702: Display interface translation status
8.0.x-devtaskNormalclosed (fixed)needs accessibility reviewfeature freeze
Assigned to Sutharsan
#1826294: Remove cache_locale
8.0.x-devtaskNormalclosed (fixed)
#1831672: translation .po file can't get imported
8.0.x-devbug reportNormalclosed (fixed)mediumneeds initial patch
#1832614: Unchanged strings on page become customized when editing others
8.0.x-devbug reportNormalclosed (fixed)Needs testsNovicemedium
Assigned to smiletrl
#1833184: Find a consistent naming scheme for translation-related modules
8.0.x-devtaskNormalclosed (fixed)Usabilitylanguage-configlanguage-contentbudapest2012
#1838310: Remove st(), get_t() and $t for good
8.0.x-devtaskNormalclosed (fixed)DX (Developer Experience)
#1848552: Toolbar icons disappear with translated menu
8.0.x-devbug reportNormalclosed (fixed)Needs teststoolbar-followup
Assigned to rvilar
#1978916: Convert locale_translate_page to a Controller
8.0.x-devtaskNormalclosed (fixed)WSCCI-conversionLONDON_2013_JULY
#1978918: Convert locale_translate_import_form to a Controller
8.0.x-devtaskNormalclosed (fixed)FormInterfaceWSCCI-conversion
#1978924: Convert locale_translate_export_form to a Controller
8.0.x-devtaskNormalclosed (fixed)FormInterfaceWSCCI-conversion
Assigned to alexpott
#1978926: Convert locale_translation_status_form to a Controller
8.0.x-devtaskNormalclosed (fixed)FormInterfaceWSCCI-conversion
#1978928: Convert locale_translation_manual_status to a Controller
8.0.x-devtaskNormalclosed (fixed)WSCCI-conversionCodeSprintUARTBC July 1
#1998056: Automatically update interface translations using cron
8.0.x-devtaskNormalclosed (fixed)
Assigned to Sutharsan
#2004684: Improve Accessibility for String Translation UI
8.0.x-devtaskNormalclosed (fixed)accessibilitylanguage of partslanguage-interface
#2029505: Exporting translations does not correctly generate empty strings
8.0.x-devbug reportNormalclosed (fixed)RTBC July 1
#2031175: Translation imports take a lot of time in tests even when not needed
8.0.x-devbug reportNormalclosed (fixed)testbotSimpletest
#2031441: Add unit test for PoHeader::evaluatePlural
8.0.x-devtaskNormalclosed (fixed)phpunit
#2049241: Add support for language options to the Twig {% trans %} tag extension
8.0.x-devtaskNormalclosed (fixed)i18nTwig
Assigned to markcarver
#2049387: Locale string change styles applied too excessively
8.0.x-devbug reportNormalclosed (fixed)CSSQuick fixregressionstyleguidefrontendlanguage-content
Assigned to mdrummond
#2052233: Ensure list of translatable languages is available early in bootstrap
8.0.x-devtaskNormalclosed (duplicate)Configuration system
Assigned to Jose Reyero
#2068207: Mistyped error message in core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php
8.0.x-devbug reportNormalclosed (fixed)Quick fix
Assigned to hron84
#2091459: Update hook_help for Locale module
8.0.x-devtaskNormalclosed (fixed)NoviceDrupalCampSpain
#2114069: Routing / tabs / actions lack way to attach context to UI strings
8.0.x-devbug reportNormalclosed (fixed)phpunitLocal TasksMenuSystemRevampblockerRouting
#2115025: Content admin views title saved localized to the menu table
8.0.x-devbug reportNormalclosed (fixed)menu systemVDCConfiguration contextVienna2013
#2122175: String translation does not honor language fallback
8.0.x-devbug reportNormalclosed (fixed)SprintWeekend2014D8SVQ
#2149195: Replace format_plural with \Drupal::translation()->formatPlural()
8.0.x-devtaskNormalclosed (fixed)PHPUnit BlockerAPI clean-up@deprecatedDX (Developer Experience)
#2175355: Add a configure link to locale.info.yml
8.0.x-devtaskNormalclosed (fixed)uxQuick fix
#2238659: Clean up StringDatabaseStorage doxygen
8.0.x-devbug reportNormalclosed (fixed)documentation
#2240555: Preselect language when importing translations previously exported
8.0.x-devbug reportNormalclosed (fixed)UsabilityJavaScript
#2254495: Move language_admin_predefined_list to ConfigurableLanguageManager
8.0.x-devtaskNormalclosed (fixed)WSCCI-conversionAPI change
#2287063: Remove remains of t() in watchdog messages
8.0.x-devbug reportNormalclosed (fixed)Quick fix
#2318381: Message not styled properly on interface translation page
8.0.x-devbug reportNormalclosed (fixed)Drupalaton 2014frontend
#2319233: Double escaped string on Available translation update page
8.0.x-devbug reportNormalclosed (fixed)Amsterdam2014SafeMarkupNovicedcdelhiCatalystAcademySprintWeekend2015SprintWeekend2015Queue
#2338011: Cleanup of locale tests
8.0.x-devtaskNormalclosed (fixed)
#2346629: When on report translations page, wrong update messages displayed.
8.0.x-devbug reportNormalclosed (fixed)D8MIAMSAmsterdam2014
#2397281: Languages not translated when you add them
8.0.x-devbug reportNormalclosed (fixed)SprintWeekend2015SprintWeekend2015Queue
#2471136: Improve user interface for translating strings
8.0.x-devbug reportNormalclosed (fixed)JavaScript
#2501183: LocaleLookup cache ID is using numeric indexes of the roles field, not role ID's
8.0.x-devbug reportNormalclosed (fixed)PerformanceNoviceSprintWeekend2015
#2504297: Base field translations caching too agressive
8.0.x-devbug reportNormalclosed (works as designed)
#2565981: Remove $this->t() and SafeMarkup::format() in SelectLanguageForm
8.0.x-devbug reportNormalclosed (fixed)SafeMarkup
Assigned to Gábor Hojtsy
#2572637: Update the hook_help for the Interface translation module again
8.0.x-devtaskNormalclosed (fixed)Barcelona2015Novicerc deadline
#2604902: Allow entity types to override EntityType::getLowercaseLabel()
8.1.x-devfeature requestNormalclosed (duplicate)
#2697291: Config translation form labels are not translated
8.1.x-devbug reportNormalclosed (fixed)language-config
#2844181: PluralTranslatableMarkup serialization error
8.2.x-devbug reportNormalclosed (fixed)SprintWeekend2017
Assigned to Alex Bukach