Good Typography and the Translation of Drupal 6

Events happening in the community are now at Drupal community events on www.drupal.org.
damien tournoud's picture

In several languages, we need several special characters in order to make a typographically correct translation. One of them is, in French, the "unbreakable space" (and for some, its little brother, the "thin unbreakable space"). But there is no easy way to get them to work reliably with Drupal. What is the way forward?

In traditional (X)HTML, we use   to render an "unbreakable space" and   to render a "thin unbreakable space". But that's not a solution in Drupal, because in several context, the string is passed to check_plain(). These strings are rendered to the user as-is, with an ugly  .

The solution would be to use Unicode equivalent characters (U+00A0 for the NO-BREAK SPACE and U+202F for the NARROW NO-BREAK SPACE). But, there is no PO-Editor (nor the I18N server) that manage those special spaces. There is no easy way to input them, and no visual way to distinguish them from normal spaces.

I see three ways forward:

  1. Change check_plain(), in order to allow some entities to go thru. I think most of them could, except perhaps > and <.
  2. Change the translation packaging scripts of d.o, in order to replace at packaging time most entities to their Unicode equivalent; or
  3. Change the locale import function, in order to replace these entities at loading time.

I think this is a very important issue, which could be solved before the release of Drupal 6 in order to make it truly an international release.

What do you think?

Damien

Comments

I don't think any of these

kkaefer's picture

I don't think any of these solution is particularly good. I think using the Unicode character(s) is the way to go. We use special typographically correct curly quotes for the german translation („Wort“), which can’t be found on the keyboard either. A simple workaround (on Windows) is to type Alt+0160 for the  .

Yes, but

damien tournoud's picture

Of course. The problem with unbreakable spaces is that they don't look particularly different from a normal space. So the editor have to show them with a special character. The most commonly used po editor (poEdit), does not.

Damien Tournoud

Further note

damien tournoud's picture

I verified that French translators for the GNOME project use direct Unicode characters.

There are methods for showing them more clearly under vim and xemacs. But that's not a solution from an usability point of view: we can't require that translators uses one of these tools =)

Damien

Damien Tournoud

Feature request for your editor

Freso-gdo's picture

To me, this issue sounds like a feature request to-be in your favourite text/po editor's feature request tracker. In the case of poEdit, you should have a look here.

--
Frederik 'Freso' S. Olesen

Translations

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: