Problem/Motivation

install_begin_request() checks for the existance of $GLOBALS['config']['locale.settings']['translation.path'] to set up the correct string translation service.

This, however, is not the correct way to specify a global configuration override. I.e. even if you set that global, \Drupal::config('locale.settings')->get('translation.path') will return the default value.

Proposed resolution

Check for $GLOBALS['config']['locale.settings']['translation']['path'] instead.

Remaining tasks

User interface changes

API changes

CommentFileSizeAuthor
#5 2360841-5.patch730 byteststoeckler
#3 2360841-1.patch727 byteststoeckler
#1 2360841-1.patch722 byteststoeckler
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tstoeckler’s picture

Status: Active » Needs review
FileSize
722 bytes

In theory something this weird would certainly require tests but I'm not sure we can test that to be honest. Here's a patch for starters.

Status: Needs review » Needs work

The last submitted patch, 1: 2360841-1.patch, failed testing.

tstoeckler’s picture

Status: Needs work » Needs review
FileSize
727 bytes

Rolling patches is hard... :-/

Status: Needs review » Needs work

The last submitted patch, 3: 2360841-1.patch, failed testing.

tstoeckler’s picture

Status: Needs work » Needs review
FileSize
730 bytes

Is there a Guiness Book of World Records entry for failing hardest at life? I would like to put my name in...

tstoeckler’s picture

So in theory, since the container was set up before this, this should be able to use \Drupal::config() properly, but I couldn't be bothered to investigate that. Let's just fix the bug first.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Testing that here is just damn hard, if not impossible.

Let's get this fixed so people can use it.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Yep testing this is damn hard.

Committed f866905 and pushed to 8.0.x. Thanks!

  • alexpott committed f866905 on 8.0.x
    Issue #2360841 by tstoeckler: Fixed Overriding the translation path in...
Gábor Hojtsy’s picture

Issue tags: -sprint +language-ui

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.