Updated: Comment #0
Problem/Motivation
#1862202: Objectify the language system moved most of the language negotiation code to classes. Configuration code for language negotiation plugins, which is rarely used, was held back to limit the size of the patch.
Proposed resolution
- Remove
language_negotiation_url_*
functions and just inject the config-factory into the settings form. - Remove
language_[g|s]et_browser_drupal_langcode_mappings()
functions - Move language_get_browser_drupal_langcode_mappings() to a utility method on LanguageNegotiator service, ensuring the plugins can be still made stateless
Remaining tasks
Decide whether keeping BC procedural wrappers.Write a patchSort out language_[g|s]et_browser_drupal_langcode_mappings()Fix failing tests- Reviews
User interface changes
None
API changes
TBD
Comment | File | Size | Author |
---|---|---|---|
#25 | language-prefixes-url-2166919-25.patch | 7.38 KB | dimaro |
#14 | language-prefixes-url-2166919.5.patch | 21.05 KB | larowlan |
#14 | interdiff.txt | 842 bytes | larowlan |
#12 | interdiff.txt | 1.12 KB | larowlan |
#8 | interdiff.txt | 1.12 KB | larowlan |
Comments
Comment #1
plachComment #2
plachComment #3
plachThe parent issue has been committed.
Comment #4
larowlantaking a crack at this
Comment #5
larowlanComment #7
plachSince plugins will require configuration, I am afraid this might conflict with #2174619: Make language negotiation plugins stateless. It might be good to ask sun's feedback.
Comment #8
larowlanOverloaded the $language variable
Re 'keeping them stateless' this doesn't actually touch the plugins, just the form - update summary
Comment #9
larowlanTook care of the language_{g,s}et_browser_drupal_langcode_mappings functions too.
Comment #12
larowlanckeditor change broke installation
nfi why ckeditor plugins are loaded during install process, but regardless.
Comment #14
larowlanneeded a new ckeditor instance after enabling language in the test
Comment #15
larowlanComment #16
jibranWhy are we removing the functions and not adding @deprecated to existing functions?
Comment #17
larowlanThey have only been in core since #1862202: Objectify the language system see comment 294
Ie they were added in this cycle (last week) and are no longer needed.
Comment #18
jibranOhk then it is all good but I'll let @plach or @sun RTBC the issue.
Comment #19
plach14: language-prefixes-url-2166919.5.patch queued for re-testing.
Comment #21
plachIt would really be better to have this sorted out before beta. I will try to review this ASAP.
Comment #22
plachThis needs a reroll
Comment #23
Gábor Hojtsy#2404407: language_set_browser_drupal_langcode_mappings() is a useless wrapper, so remove it implemented part of this.
Comment #24
Gábor HojtsyComment #25
dimaro CreditAttribution: dimaro commentedRerolled #14
Hope it works.
Comment #27
xjmThis issue was marked as a beta target for the 8.0.x beta, but is not applicable as an 8.1.x beta target, so untagging.
I've moved the issue to 8.2.x since it could be possible to implement this with BC in a minor.