Problem/Motivation

In some methods we call translator the user that have assigned a task to translate.
This leads to confusion with the translators of TMGMT.
So we should call the user translator as Assignee to avoid doing mistakes.

Proposed resolution

This means rename methods like getTranslator to getAssignee and also other changes like in the comments.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

edurenye created an issue. See original summary.

miro_dietiker’s picture

Priority: Normal » Major

This is a rename of the API / property inside local translator. Thus major.

edurenye’s picture

Sometimes when this information is shown to the user, we don't want to see it as assignee, there's some cases we will want to see it just as user, for example in the Job Translation Info now we have "Translation job is not assigned to any translator." change to "Translation job is not assigned to any assignee." is not really nice, would be better to have "Translation job is not assigned to any user."

In the code we want to use always assignee, but when we show info to the user we prefer to use "user".

johnchque’s picture

Status: Active » Needs review
StatusFileSize
new32.33 KB

Changed the usage of translator instead of assignee in local translator, used 'user' for the UI. Changes made in tests too. Patch added.

johnchque’s picture

Changed label of a new commit. One line change.

edurenye’s picture

Status: Needs review » Needs work
+++ b/translators/tmgmt_local/src/Tests/LocalTranslatorTest.php
@@ -193,7 +193,7 @@ class LocalTranslatorTest extends TMGMTTestBase {
     $this->assertEqual($xpath->option[0], 'Local translator (auto created) (unsupported)');
-    $this->localTranslator = $this->drupalCreateUser($this->localTranslatorPermissions);
+    $this->Assignee = $this->drupalCreateUser($this->localTranslatorPermissions);
 
     // The same when there is a single role.

The first letter of a property must not be uppercase.

@@ -766,10 +766,10 @@ class LocalTranslatorTest extends TMGMTTestBase {
     $this->drupalPostForm(NULL, $edit, t('Assign tasks'));
-    $this->assertText(t('Assigned 1 to translator @translator.', ['@translator' => $local_translator->getAccountName()]));
+    $this->assertText(t('Assigned 1 to translator @translator.', ['@translator' => $assignee->getAccountName()]));
   }
 

This is not a @translator, maybe @user

johnchque’s picture

Status: Needs work » Needs review
StatusFileSize
new5.64 KB
new33.76 KB

@edurenye you are totally right, changes made. Interdiff added.

  • Berdir committed de42691 on 8.x-1.x authored by yongt9412
    Issue #2648678 by yongt9412: Use Assignee instead of translator in...
berdir’s picture

Status: Needs review » Fixed

Nice, committed. Checked that label/description changes don't need entity updates.

Status: Fixed » Closed (fixed)

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