Problem/Motivation

In ConfigTranslateForm.php we support only the first config name for now ($id = $mapper->getConfigNames()[0]). This should be extended for more config names.

Proposed resolution

Remaining tasks

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sasanikolic’s picture

Status: Active » Needs review
FileSize
7.64 KB

Added the source and unit tests.

Status: Needs review » Needs work

The last submitted patch, 1: support_more_than_one-2449505-1.patch, failed testing.

Status: Needs work » Needs review
Berdir’s picture

Status: Needs review » Needs work
  1. +++ b/sources/tmgmt_config/src/Tests/ConfigEntitySourceUiTest.php
    @@ -171,6 +171,131 @@ class ConfigEntitySourceUiTest extends EntityTestBase {
    +  /**
    +   * Test more config names translation for a multiple checkout.
    +   */
    +  function testMoreConfigNamesTranslateTabMultipeCheckout() {
    

    Hm, I'd say a single test is enough, we don't need to repeat single/multiple languages.

  2. +++ b/sources/tmgmt_config/src/Tests/ConfigEntitySourceUnitTest.php
    @@ -188,4 +188,45 @@ class ConfigEntitySourceUnitTest extends EntityUnitTestBase {
    +    // $this->config('system.site')->set('slogan', 'Test slogan')->save();
    

    you can remove this.

  3. +++ b/sources/tmgmt_config/src/Tests/ConfigEntitySourceUnitTest.php
    @@ -188,4 +188,45 @@ class ConfigEntitySourceUnitTest extends EntityUnitTestBase {
    +    $this->assertEqual(\Drupal::config('user.mail')->get('status_canceled')['body'], $data['user.mail']['status_canceled']['body']['#translation']['#text']);
    +    $this->assertEqual(\Drupal::config('user.mail')->get('password_reset')['body'], $data['user.mail']['password_reset']['body']['#translation']['#text']);
    

    You can use . to simplify this, get('status_canceled.body').

Tests look good, though.

The last submitted patch, 1: support_more_than_one-2449505-1.patch, failed testing.

sasanikolic’s picture

Status: Needs work » Needs review
FileSize
5.54 KB
3.98 KB

Removed the test "testMoreConfigNamesTranslateTabMultipeCheckout" and the other stuff.

Status: Needs review » Needs work

The last submitted patch, 6: support_more_than_one-2449505-6.patch, failed testing.

miro_dietiker’s picture

I only see tests here, how does it change supporting more than one config name?