Edgewall Software
Modify

Ticket #9436 (closed enhancement: fixed)

Opened 20 months ago

Last modified 12 months ago

add nowrap in some css

Reported by: wideweide@… Owned by: rblank
Priority: low Milestone: 0.12.2
Component: i18n Version:
Severity: trivial Keywords:
Cc: al.prudnikov@…
Release Notes:
API Changes:

Description

I upgrade the trac to 0.12,now I can use my language -- chinese,but a little trouble for css problem:

In report the word "edit" translate to "编辑",it display as

编
辑

I change the trac\htdocs\css\report.css

line 90 add -- white-space: nowrap;

.tickets tbody td, .reports tbody td { padding: .1em .5em !important; white-space: nowrap;}

It will be ok.So please modify the source code to work fine

Attachments

wrong_wrap.png (7.2 KB) - added by aprudnikov 17 months ago.
wrapped-action-words.png (23.0 KB) - added by jomae 12 months ago.
Action words are wrapped in report page for Japanese (r10505)

Download all attachments as: .zip

Change History

comment:1 Changed 20 months ago by anonymous

all the table th perhaps need nowrap too,otherwise the "报表" displayed as

报
表

comment:2 Changed 20 months ago by anonymous

trac.css : line 459

table.listing th { text-align: left; padding: 0 1em .1em 0; font-size: 12px ; white-space: nowrap;}

comment:3 follow-up: Changed 20 months ago by mrelbe

  • Owner set to mrelbe
  • Priority changed from normal to low
  • Severity changed from normal to trivial
  • Status changed from new to assigned
  • Type changed from defect to enhancement

I've seen the same problem for the swedish locale as well. I'll get back with a patch fixing this, in august, after a looong vacation :)

However, please add your findings here until then.

comment:4 in reply to: ↑ 3 ; follow-up: Changed 17 months ago by rblank

Replying to mrelbe:

However, please add your findings here until then.

Hey Mikael, holidays are over! Where's that patch? :)

More seriously, we would need a patch pretty soon if this should be fixed in 0.12.1, otherwise please re-target to next-minor-0.12.x

comment:5 in reply to: ↑ 4 Changed 17 months ago by mrelbe

Replying to rblank:

Hey Mikael, holidays are over! Where's that patch? :)

No please, not yet :)

More seriously, we would need a patch pretty soon if this should be fixed in 0.12.1, otherwise please re-target to next-minor-0.12.x

Thanks for reminding me -- I have been away for a very long time and feel totally out of the loop. Can you give me a couple of days/nights to recap?

comment:6 Changed 17 months ago by rblank

  • Resolution set to fixed
  • Status changed from assigned to closed

As this issue was my fault, I took the liberty to apply a fix in [10059] so that people would not get too annoyed about this still being in 0.12.1. I hope you don't mind.

comment:7 Changed 17 months ago by rblank

  • Owner changed from mrelbe to rblank

comment:8 Changed 17 months ago by mrelbe

No worries, I'm sorry I didn't pay attention to this in due time...

Changed 17 months ago by aprudnikov

comment:9 Changed 17 months ago by aprudnikov

  • Cc al.prudnikov@… added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Please, add white-space: nowrap; also for table.listing thead th in trac.css for tables at all Admin\Ticket system\* pages.

In russian l10n unwanted line wrap appears:


comment:10 Changed 17 months ago by rblank

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in [10112], thanks for the heads-up.

comment:11 follow-up: Changed 16 months ago by cboos

  • Resolution fixed deleted
  • Status changed from closed to reopened
+.tickets tbody td, .reports tbody td { padding: .1em .5em !important; white-space: nowrap; }

The above white-space: nowrap added in r10059 breaks the listing if View Description is turned on, as long paragraph lines in ticket descriptions will be forced to single line and will overflow (at least in Chrome and Firefox).

That particular change on td doesn't seem necessary to fix the present issue, ok to revert this line?

comment:12 in reply to: ↑ 11 Changed 16 months ago by rblank

Replying to cboos:

That particular change on td doesn't seem necessary to fix the present issue, ok to revert this line?

This looks indeed like a mistake, as I only remember working on the table headings. Yes, please revert.

comment:13 Changed 16 months ago by rblank

  • Resolution set to fixed
  • Status changed from reopened to closed

Reverted the line from comment:11 in [10229]. I'll leave the milestone at 0.12.1, as the original issue was fixed there.

Changed 12 months ago by jomae

Action words are wrapped in report page for Japanese (r10505)

comment:14 Changed 12 months ago by jomae

  • Resolution fixed deleted
  • Status changed from closed to reopened

In Japanese, the action words are wrapped in report page. The original issue maybe happens in Chinese, also.

Action words are wrapped in report page for Japanese (r10505)

  • trac/ticket/templates/report_list.html

     
    2929          <tr py:when="reports" py:for="id, title, can_edit, can_delete in reports"> 
    3030            <td class="report"><a title="View report" href="${href.report(id)}">{$id}</a></td> 
    3131            <td class="title"><a title="View report" href="${href.report(id)}">$title</a></td> 
    32             <td py:if="any_edit"><a py:if="can_edit" href="${href.report(id, action='edit')}" 
     32            <td class="action" py:if="any_edit"><a py:if="can_edit" href="${href.report(id, action='edit')}" 
    3333                                    title="Edit report">Edit</a></td> 
    34             <td py:if="any_delete"><a py:if="can_delete" href="${href.report(id, action='delete')}" 
     34            <td class="action" py:if="any_delete"><a py:if="can_delete" href="${href.report(id, action='delete')}" 
    3535                                      title="Delete report">Delete</a></td> 
    3636          </tr> 
    3737          <tr py:otherwise=""> 
  • trac/htdocs/css/report.css

     
    8484/* Styles for the report list and the report results table 
    8585   (extends the styles for "table.listing") */ 
    8686.reports td.title { width: 100%; white-space: normal; } 
     87.reports td.action { white-space: nowrap; } 
    8788.tickets tbody:first-child tr.trac-group h2 { margin-top: 0; } 
    8889.tickets tr.trac-group { border: none; } 
    8990.tickets tr.trac-group:hover { background: none !important; } 

comment:15 Changed 12 months ago by rblank

Heh, now at least I remember why I set the "nowrap" in the first place :)

Looks good to me. I suggest we still apply this for 0.12.2.

comment:16 Changed 12 months ago by cboos

Ok, with .reports in front, seems isolated enough to not risk breaking anything else.

comment:17 Changed 12 months ago by jomae

  • Milestone changed from 0.12.1 to 0.12.2
  • Resolution set to fixed
  • Status changed from reopened to closed

Applied in r10506. Thanks!

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from rblank. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.