Updated: Comment #2

Problem/Motivation

The table that lists translatable strings on admin/config/regional/translate gets this CSS rule from the system.theme.css file:

tr.odd .form-item, tr.even .form-item {
  white-space: nowrap;
}

It makes that the first column gets as wide as the sentences in it, and the second column gets very small and often out from the screen. It can be seen here:

translation-white-space.jpg

(Or: admin/config/regional/translate?page=1 and especially on admin/config/regional/translate?page=2)

In the issue #1663130: Clean up css in Locale the white-space has been set as normal to avoid this:

.locale-translate-edit-form .form-item {
   white-space: normal;
 }

It seems that the selector is not specific enough and the rule doesn't apply (anymore).

Proposed resolution

I propose to specify the selector so that it overrides the system.theme.css rule:

.locale-translate-edit-form tr .form-item {
   white-space: normal;
 }

Remaining tasks

Create the patch with the CSS modification.

User interface changes

The width of the first column on the interface translation table is not affected by the length of the text inside it.

API changes

Nothing.

#1663130: Clean up css in Locale

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Outi’s picture

Changes the selector from .locale-translate-edit-form .form-item to .locale-translate-edit-form tr .form-item

Outi’s picture

Status: Active » Needs review
Outi’s picture

Issue summary: View changes

Updated issue summary.

YesCT’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +CSS, +Quick fix, +frontend, +D8MI

I verified that the problem exists without this patch by:
installing in spanish
then going to the configuration section, languages, and user interface translation,
yes, the second page there shows the problem very well.

beforepatch-tonarrow.png

I tried out the patch,
and it fixes it. :)

afterpatchgood.png

------
coding style looks ok.

------

Is there any other page that might have been making use of the selector the way it was before that we should check is still ok?
The selector looks pretty specific to this page to me. So I think this is ok.

YesCT’s picture

oops.

Outi’s picture

Assigned: Outi » Unassigned
YesCT’s picture

Issue tags: +RTBC July 1

This issue was RTBC and passing tests on July 1, the beginning of API freeze.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 0fbf36c and pushed to 8.x. Thanks!

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

Anonymous’s picture

Issue summary: View changes

Removed a help line from the summary template.