Last modified: 2010-11-29 00:29:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T5770, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 3770 - long words should be broken in image gallery descriptions
long words should be broken in image gallery descriptions
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 3276
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-21 16:18 UTC by Chris McKenna
Modified: 2010-11-29 00:29 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Chris McKenna 2005-10-21 16:18:02 UTC
Single words that are longer than the width of the image thumbnail in image
galleries should be automatically hyphenated and split onto more than one line.
At present the word displays ontop of the caption of the image(s) to the right.
For an example see
http://commons.wikimedia.org/wiki/Train_station#Station_buildings_United_Kingdom
where the word Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch means
you cannot see the first line of the caption for the image to the right (in this
case "Llangollen station, north"
Comment 1 Antoine "hashar" Musso (WMF) 2007-04-26 19:36:50 UTC
From
http://petesbloggerama.blogspot.com/2007/02/firefox-ie-word-wrap-word-break-tables.html
it looks like the following css can do the job:


white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */

With css3 we could probably use something like:

word-break: normal;
Comment 2 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-04-26 20:30:52 UTC
Those attributes control breaking between words, not within them.  They do not
cover hyphenation, which to my knowledge is supported by no major browser today
without hint characters like ­ (and that not by Firefox at least, last I
heard, probably not IE either).  We would have to guess at a pixel width for
letters and manually add hyphens and line breaks on the server side where
appropriate.  Rather a large ordeal, but I'm sure there's a FLOSS hyphenation
program somewhere that could be integrated into MW if someone wants to do it.
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-04-26 20:32:15 UTC
(In reply to comment #2)
> Those attributes control breaking between words, not within them.  They do not
> cover hyphenation, which to my knowledge is supported by no major browser today
> without hint characters like ­ (and that not by Firefox at least, last I
> heard, probably not IE either).  We would have to guess at a pixel width for
> letters and manually add hyphens and line breaks on the server side where
> appropriate.  Rather a large ordeal, but I'm sure there's a FLOSS hyphenation
> program somewhere that could be integrated into MW if someone wants to do it.

But note that this would break copy-pasting.  The hyphen would be copied.  I
would be inclined, actually, to say that this should either be done
transparently by the browser (preserving copy-paste, search, ...) or manually by
editors where strictly needed.  We just aren't in a position to do this
intelligently.  WONTFIX?
Comment 4 Antoine "hashar" Musso (WMF) 2007-04-26 20:35:45 UTC
made a confusion between word-wrap and hyphenate. There is nothing on
going at the moment :
  http://www.w3.org/TR/css3-text/#hyphenate
Comment 5 Brion Vibber 2007-05-18 15:53:18 UTC
Something involving 'word-wrap: break-word' may improve the behavior on IE and Safari; currently it's still a little weird for table behavior. Something similar to the recent diff changes might be required, or otherwise different layout for the gallery as with other requests...
Comment 6 DieBuche 2010-11-08 22:44:25 UTC
Marking as depending on Bug 3276 , since word-wrap: break-word doesn't always work in <td> and 3267 get's rid of the tables
Comment 7 DieBuche 2010-11-29 00:29:01 UTC
fixed with r77411

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links