Comments

giancarlosotelo’s picture

Status: Active » Needs review
StatusFileSize
new1.51 KB

Here is the patch, I also added a success message when the order of translators are saved.

Status: Needs review » Needs work

The last submitted patch, 1: succes_messages_translator-2540636-1.patch, failed testing.

giancarlosotelo’s picture

Status: Needs work » Needs review
StatusFileSize
new1.52 KB

Now is working.

Status: Needs review » Needs work

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

giancarlosotelo’s picture

Status: Needs work » Needs review
StatusFileSize
new2.13 KB
new1.09 KB

Fixed the test also.

giancarlosotelo’s picture

StatusFileSize
new2.12 KB
new579 bytes

Small fix in the test, don't know why was not added.

juanse254’s picture

Status: Needs review » Needs work
  1. +++ b/src/Entity/ListBuilder/TranslatorListBuilder.php
    @@ -94,4 +95,12 @@ class TranslatorListBuilder extends DraggableListBuilder implements EntityListBu
    +      drupal_set_message(t('The order of translators have been saved.'));
    

    the message should be "The order of the translators has been saved."

  2. +++ b/src/Tests/TranslatorTest.php
    @@ -63,7 +63,7 @@ class TranslatorTest extends TMGMTTestBase {
    +    $this->assertText($translator->label() . ' has been deleted.');
    

    t() this.

giancarlosotelo’s picture

Status: Needs work » Needs review
StatusFileSize
new2.13 KB
new1.09 KB

Done.

sasanikolic’s picture

+++ b/src/Entity/ListBuilder/TranslatorListBuilder.php
@@ -94,4 +95,12 @@ class TranslatorListBuilder extends DraggableListBuilder implements EntityListBu
+  public function submitForm(array &$form, FormStateInterface $form_state) {
+      parent::submitForm($form, $form_state);
+      drupal_set_message(t('The order of the translators has been saved.'));
+   }

Check the indentation (of the closing bracket) please.

mbovan’s picture

Status: Needs review » Needs work
+++ b/src/Tests/TranslatorTest.php
@@ -63,7 +63,7 @@ class TranslatorTest extends TMGMTTestBase {
+    $this->assertText(t($translator->label() . ' has been deleted.'));

Then, the label should be passed as a parameter to t() function.

giancarlosotelo’s picture

StatusFileSize
new2.15 KB
new988 bytes

Patch with fixes.

giancarlosotelo’s picture

Status: Needs work » Needs review
mbovan’s picture

Status: Needs review » Needs work

I'm sorry, but:

  1. +++ b/src/Entity/ListBuilder/TranslatorListBuilder.php
    @@ -94,4 +95,12 @@ class TranslatorListBuilder extends DraggableListBuilder implements EntityListBu
    +      parent::submitForm($form, $form_state);
    +      drupal_set_message(t('The order of the translators has been saved.'));
    

    You have 2 extra spaces on these 2 lines.

  2. +++ b/src/Tests/TranslatorTest.php
    @@ -63,7 +63,7 @@ class TranslatorTest extends TMGMTTestBase {
    +    $this->assertText(t('@label has been deleted.', array('@label' =>$translator->label())));
    

    One space after '@label' => is missing.

giancarlosotelo’s picture

Status: Needs work » Needs review
StatusFileSize
new2.35 KB
new1.32 KB

I think that now is fine.

berdir’s picture

Status: Needs review » Fixed

Committed. Lets use the default delete from for this however in a follow-up, less custom code..

  • Berdir committed 799eb1c on 8.x-1.x authored by giancarlosotelo
    Issue #2540636 by giancarlosotelo: Success message missing when deleting...

Status: Fixed » Closed (fixed)

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