Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 305144

Convert t() to format_string that added class to the description, when search added to test list

$
0
0

Problem/Motivation

t() only has replacement vars.

+++ b/core/modules/simpletest/simpletest.pages.incundefined
@@ -149,11 +171,11 @@ function theme_simpletest_test_table($variables) {
+        'data' => '<div class="description">' . t('@description (@class)', array('@description' => $description, '@class' => $test_name)) . '</div>',

Seems strange because it's not really translatable, aside from change the order of description and class.

Proposed resolution

convert it to format_string.

Remaining tasks

  • Discuss if makes sense to leave as t() because of RTL LTR considerations.
  • (Novice) Implement.

User interface changes

No UI changes.

API changes

No API changes.

Original report by @tim.plunkett and @berdir

Follow up for #1919470-6: Add a search field to the test overview page and #7

+++ b/core/modules/simpletest/simpletest.pages.incundefined
@@ -149,11 +171,11 @@ function theme_simpletest_test_table($variables) {
+        'data' => '<div class="description">' . t('@description (@class)', array('@description' => $description, '@class' => $test_name)) . '</div>',

@tim.plunkett

This should be format_string, I'm pretty sure.

@Berdir

It is a weird thing to translate agreed, but what about rtl languages? What do you think about replacing the name with the classname? then this would no longer be necessary... We should probably discuss that in a separate issue, though.

Viewing all articles
Browse latest Browse all 305144

Latest Images

Trending Articles



Latest Images