t() calls should be avoided in classes.
Short array syntax must be used to define arrays.
Namespaced classes, interfaces, and traits should not begin with a file doc comment.
All dependencies must be prefixed with the project name, for example "drupal:".
When importing a class with "use", do not include a leading \.
Array closing indentation error expected 4 spaces but found 6.
Line exceeds 80 characters.
Parameter comment must end with a full stop.

.

Comments

mo_farhaz created an issue. See original summary.

mo_farhaz’s picture

Assigned: mo_farhaz » Unassigned
Status: Active » Needs review
StatusFileSize
new6.16 KB

please review.

kapilv’s picture

Issue tags: +warning
berdir’s picture

Status: Needs review » Needs work
Issue tags: -warning
+++ b/tests/src/Functional/GoogleTranslatorTest.php
@@ -17,6 +18,7 @@ use Drupal\Core\Url;
 
+  use StringTranslationTrait;
   /**
    * A tmgmt_translator with a server mock.
    *
@@ -71,7 +73,7 @@ class GoogleTranslatorTest extends TMGMTTestBase {

@@ -71,7 +73,7 @@ class GoogleTranslatorTest extends TMGMTTestBase {
     $this->translator->save();
 
     $languages = $this->translator->getSupportedTargetLanguages('en');
-    $this->assertTrue(empty($languages), t('We can not get the languages using wrong api parameters.'));
+    $this->assertTrue(empty($languages), $this->t('We can not get the languages using wrong api parameters.'));
 

Let's just remove the t() on tests.

This is also going to conflict with #3025137: Convert request method to POST to get past 5000 character limit, maybe just leave out the message that is being removed there otherwise I'll wait with committing this until that is fixed.

pradeepjha’s picture

Assigned: Unassigned » pradeepjha
pradeepjha’s picture

Assigned: pradeepjha » Unassigned
Status: Needs work » Needs review
StatusFileSize
new6.15 KB
new644 bytes

Hi @Berdir
Removed t() function from the same line.
Please review.

Munavijayalakshmi’s picture

Assigned: Unassigned » Munavijayalakshmi
Status: Needs review » Needs work
StatusFileSize
new108.87 KB

The patch not working. Needs re-rolled.

Munavijayalakshmi’s picture

Title: t() calls should be avoided in classes » clean up the code base
Issue summary: View changes
Munavijayalakshmi’s picture

Assigned: Munavijayalakshmi » Unassigned
Status: Needs work » Needs review
StatusFileSize
new15.41 KB

Status: Needs review » Needs work

The last submitted patch, 9: clean_up_the_code_base-3127395-9.patch, failed testing. View results

somesh1999’s picture

Status: Needs work » Needs review
StatusFileSize
new13.7 KB

I've cleaned some part of the code according to drupal standard.

somesh1999’s picture

StatusFileSize
new15.6 KB

I have removed most of the warnings and errors according to drupal standard and corrected the file paths in patch. This will work now.

somesh1999’s picture

StatusFileSize
new15.4 KB

Corrected path for files in patch. Please verify

somesh1999’s picture

StatusFileSize
new18.4 KB

Due to some confusion I was working on wrong version. I have update the code. Please review.

Status: Needs review » Needs work

The last submitted patch, 14: clean_up_the_code_base-3127395-14.patch, failed testing. View results

gersonjl’s picture

I will work on this.

gersonjl’s picture

Assigned: Unassigned » gersonjl
gersonjl’s picture

Assigned: gersonjl » Unassigned
Status: Needs work » Needs review
StatusFileSize
new19.23 KB
jmizarela’s picture

Assigned: Unassigned » jmizarela

I'll review it

jmizarela’s picture

Status: Needs review » Reviewed & tested by the community

Patch on #18 fixes all listed issues, is clean and passing reviews. Nicely done, @GersonJL!
Only partial tests were performed on the module at a live site, as it needs a Google API Key billable for translations. I can at least confirm the module is operational after patch, and this should suffice.

jmizarela’s picture

Assigned: jmizarela » Unassigned