Workbench access: should be replaced with the variable of the label.

Comments

agentrickard’s picture

Status: Active » Reviewed & tested by the community

Fair enough.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, workbench_access_naming_consistency.patch, failed testing.

agentrickard’s picture

The patch needs to be formatted from module root, not site root.

alexverb’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new944 bytes

Sorry about that, still trying to get the hang of it. Should I patch on 7.x-1.x-dev or 7.x-1.0? This patch is on dev version... Thank you for helping out a git noob.

dave reid’s picture

Status: Needs review » Needs work

Patches should always be rolled against the current branch in Git, so 7.x-1.x.

Based on this it looks like we don't even need to use t() anymore? We've lost all translatability and context of "@message_label: %section" which isn't a bad thing, but it wouldn't it be a pointless string to translate on localize.drupal.org?

agentrickard’s picture

It would.

alexverb’s picture

Status: Needs work » Needs review
StatusFileSize
new2.05 KB

So I'm guessing only the last string has lost it's context for translation and the other two can stay? I also put the variable_get in a variable. Something in the lines of this patch would be correct?

agentrickard’s picture

I believe so.

agentrickard’s picture

agentrickard’s picture

Issue summary: View changes

I think this lost the data sanitization provided by t() in the last output.

-        return array(t('Workbench Access: %section', array('%section' => implode(', ', $names))));
+        // No need for translation here
+        return $workbench_access_label . ': ' . implode(', ', $names);