Compose, dialogue logic and translatable strings

Kai Willadsen kai.willadsen at gmail.com
Tue Mar 13 17:55:06 EDT 2007


The attached patch only touches TagWindow.C, and does several things:

* It marks some strings as translatable (everything I could find in
TagWindow.C).
* It moves some stuff around to avoid including markup in translatable
messages, like:
    <b>All</b>
  is now
    String::ucompose ("<b>%1</b>", _("All"))
* Where possible, it changes GtkMessageDialogs to use the automatic
markup scheme by removing markup on the primary message and using
set_secondary_text().
* It cleans up some of the dialogue logic for single/multiple cases.
As best as I can tell, the logic is identical, except for a
"docselectionignore_ = false;" statement, which to my reading has no
effect. However, these parts would benefit from someone else reading
them over.

It *doesn't* fix other things:
* I haven't ucompose-d or marked anything not in TagWindow.C. I know
that Transfer.C, Library.C and DocumentProperties.C contain 1 or 2
translatable strings each, but nothing big.
* The functions Utility::exceptionDialog and TagWindow::ensureSaved
will need to change significantly in order to not break translation.
At the moment, they assume English-like grammar. Therefore, I haven't
ucompose-ified them, and haven't marked any of their strings (or
strings passed to them) for translation.
* There are several situations where ngettext should probably be used,
but by i18n-foo isn't really good enough to understand that properly.

I realise that the patch does several only-slightly-related things, so
if you want it broken up, let me know.

Kai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compose-and-marking-translations.patch
Type: text/x-patch
Size: 16686 bytes
Desc: not available
URL: <http://icculus.org/pipermail/referencer/attachments/20070314/2f7d14b3/attachment.bin>


More information about the referencer mailing list