Good Typography and the Translation of Drupal 6

Damien Tournoud's picture
public
Damien Tournoud - Sun, 2008-01-06 17:45

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


I don't think any of these

kkaefer@drupal.org's picture
kkaefer@drupal.org - Sun, 2008-01-06 18:39

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
Damien Tournoud - Sun, 2008-01-06 18:53

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.


Further note

Damien Tournoud's picture
Damien Tournoud - Sun, 2008-01-06 18:49

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


Feature request for your editor

Freso's picture
Freso - Sat, 2008-03-08 19:04

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