Support from Acquia helps fund testing for Drupal Acquia logo

Comments

c-c-m created an issue. See original summary.

c-c-m’s picture

Status: Active » Needs review
FileSize
1.06 KB

Patch provided.

Status: Needs review » Needs work

The last submitted patch, 2: drupal_core-missing-t-function_2659914.patch, failed testing.

c-c-m’s picture

Version: 8.0.1 » 8.1.x-dev
Status: Needs work » Needs review
FileSize
1.06 KB

Providing new patch, as the previous one had an error.

c-c-m’s picture

Providing new patch, as the previous one had an error.

c-c-m’s picture

Title: Missing t() strings on Configuration Syncronization » Untranslatable strings on Configuration Syncronization
Version: 8.1.x-dev » 8.0.x-dev
c-c-m’s picture

Assigned: c-c-m » Unassigned
rodrigoaguilera’s picture

Status: Needs review » Needs work

Is better to use the t function that is injected in the object $this->t() the same way is used in the line 191.

I'm not sure if this change can be in 8.0.x since the strings are frozen.

c-c-m’s picture

Title: Untranslatable strings on Configuration Syncronization » Untranslatable strings on Configuration Synchronization
Issue summary: View changes
swentel’s picture

Ha, nice find. Should indeed use $this->t().
Since it's not a string change, it's probably fine for 8.0.x as well.

c-c-m’s picture

Thank you very much for your review @rodrigoaguilera. Could you please elaborate more on why should I do what you say? Apparently I did the same as line 189, but you know way more than me, so I am open to learn ;)

As per the other part of your answer: do you mean I should work with 8.1.x branch instead?

rodrigoaguilera’s picture

You can search about hlthe benefits of dependency injection.

Here is an intro.
http://blog.openlucius.com/en/blog/dependency-injection-drupal-8-introdu...

By calling t you are assuming there is a t function somewhere and might not be case in a test environment.

c-c-m’s picture

Provided patch with $this->t() as requested by @rodrigoaguilera and @swentel

Hope to have understood fine.

If so, I am assuming I should also patch aforementioned line 189 in another issue.

c-c-m’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 13: drupal_core-missing-t-function_2659914_8.patch, failed testing.

c-c-m’s picture

Version: 8.0.x-dev » 8.1.x-dev
Status: Needs work » Needs review
FileSize
615 bytes

Submitting right patch

Status: Needs review » Needs work

The last submitted patch, 16: drupal_core-missing-t-function_2659914_8.patch, failed testing.

swentel’s picture

+++ b/core/modules/config/src/Form/ConfigSync.php
@@ -272,7 +272,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
+          '#header' => $this->t(array('Name', 'Operations')),

You have todo something like this: array($this->t('Name'), $this->t('Operations')),

c-c-m’s picture

Status: Needs work » Needs review
FileSize
1.09 KB

Provided patch with swentel's instructions. Thank you very much!

rodrigoaguilera’s picture

Status: Needs review » Reviewed & tested by the community

Now it looks OK

  • catch committed 1ab109f on 8.1.x
    Issue #2659914 by c-c-m, rodrigoaguilera: Untranslatable strings on...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.1.x, thanks!

Status: Fixed » Closed (fixed)

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