GNOME Bugzilla – Bug 144670
line wrap at parentheses
Last modified: 2004-12-22 21:47:04 UTC
I want to remove two items from Trash, Nautilus presents this dialog in Hungarian: Biztosan véglegesen törölni akarja a (z) 2 kijelölt elemet a Kukából? The .po file has "... a(z) %d..." In an ideal word this should be either "a" or "az" ("the" in English), depending on the value of the number. Kind of if you did it in C in English: printf("this is a(n) %d", x < 100 ? "mouse" : "elephant"); However, line wrapping at the parenthesis where there's no space in the .po file looks terrible. Line wrap shouldn't be allowed here.
Created attachment 28867 [details] screenshot
Don't know if UTR 29 allows a line break there or not, but we aren't going to consider deviations from UTR 29 until we are compliant with it. Nautilus should be using ngettext() *** This bug has been marked as a duplicate of 97545 ***
UTR #29 isn't about line breaking, that's Unicode Anex 14. (http://www.unicode.org/unicode/reports/tr14/) According to UAX 14, an alphabetic followed by a open parenthesis is an allowed break. One way you can get around this is by inserting a ZWNBSP (U+FEFF) between the two characters.
Owen, thanks for the ngettext() tip, I didn't know what it was, but now I know and asked the maintainers of hu.po to update it accordingly. This solves the problem of that particular dialog I was talking about. However, "a(z)" is much more often used before an unknown string where this %s is going to be replaced by a filename or such... just as in my silly example above with "mouse" and "elefant", where I obviously wanted to write %s, not %d. In these cases gettext doesn't help us as I see. So we'll have to use ZWNBSP which is uncomfortable, hard to maintain and I'm afraid it's hard to teach translators (who are usually neither coders nor unicode experts) to use it. Anyway, I understand that it's a different story not related to pango.