From kde-i18n-doc Thu May 12 13:44:01 2011 From: Chusslove Illich Date: Thu, 12 May 2011 13:44:01 +0000 To: kde-i18n-doc Subject: Re: KUIT "@action:undo" for QUndoCommand Message-Id: <201105121544.04227.caslav.ilic () gmx ! net> X-MARC-Message: https://marc.info/?l=kde-i18n-doc&m=130520794123988 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart3542684.h2IpfrM47i" --nextPart3542684.h2IpfrM47i Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable > [: Alexander Potashev :] > What do you think about using KUIT "@action:undo" in context for strings > passed to QUndoCommand? There are three problems with this. The first problem is that KUIT markers are supposed to tell the translator where in the user interface the string appears, so that the translator can apply those translation guidelines which refer to user interface context ("use imperative verbs for button texts", "use noun syntagmas in window titles", etc.) The definition "strings passed to QUndoCommand" is non- conformant in that sense, as it does not describe where the string is shown in the UI. The second problem is that it is insufficient on its own, because texts in undoing context are sometimes not explicitly set. You mentioned Krita, take for example the "Fill with Foreground Color" message: in the UI, it appears in the Edit menu, therefore its context should be "@action:inmenu Edit"; in the code, it is passed to KAction constructor. But, this string will also appear in "Undo " menu item after the action is performed. Or, take the "Lens Blur" message, which in the code is simply the name of a filter (not directly passed to any object in particular) but still appears in "Undo " after the filter is applied. This example also shows that the string in undoing context doesn't have to be originally an action at all. The third problem is that you would like this context marker also to tell you that you can use the new double-form functionality of QUndoCommand, which it cannot as such. What if some other kind of undo stack is used? It doesn't matter how probable this it, what matters is that context markers must not be linked to underlying functionality of particular classes. In other words, when I see @action:undo, I would not be free to assume that I can use the double-form translation. We could ignore the second problem, i.e. whether a formal context for explicit QUndoCommand texts is worthwile given the variety of strings that implicitly find their way into undoing contexts. The first and the third problem cannot be ignored. I would instead propose the following context for QUndoCommand texts: "... (qtundo-format) ..." It is only important to put the (qtundo-format) keyword anywhere in the context, and there is no formal connection with KUIT. We already did this once, look for (qtdt-format) keyword in contexts in plasma-something. The *-format part is there because this is essentially that, a special string format. (I think these keywords should become proper Gettext flags in perspective, recognized and extracted by xgettext from a comment preceding the message, as is currently the case with no-*-format flags.) =2D-=20 Chusslove Illich (=D0=A7=D0=B0=D1=81=D0=BB=D0=B0=D0=B2 =D0=98=D0=BB=D0=B8= =D1=9B) --nextPart3542684.h2IpfrM47i Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBNy+QkMSGXgigGr3ERApiuAJsG0D6TYkJKnY4QV9q353ColMbQ+wCfdA1T wED+plD5mnaMz0rmBNWbhro= =oty9 -----END PGP SIGNATURE----- --nextPart3542684.h2IpfrM47i--