рассылка русскоязычной группы пользователей и разработчиков KDE
 help / color / mirror / Atom feed
From: Alexander Potashev <aspotashev@gmail.com>
To: KDE i18n-doc <kde-i18n-doc@kde.org>,
	 KDE russian translation mailing list <kde-russian@lists.kde.ru>
Subject: [kde-russian] "Magic split" for undo action names available in Calligra
Date: Thu, 23 Jun 2011 22:20:13 +0400
Message-ID: <BANLkTimew767ghRnfB6yhT4R1FVyGprXbw@mail.gmail.com> (raw)

Hi,

Two days ago I patched the whole Calligra to use my library kundo2
instead of Qt Undo Framework for undo actions. This makes the
following two features effectively available (i.e. the patches for
Calligra are different that for Qt, of course) in Calligra without
need to wait for Qt 4.8:
1. https://qt.gitorious.org/qt/qt/merge_requests/1212
2. https://qt.gitorious.org/qt/qt/merge_requests/2610

The second feature ("magic split") makes possible different
translations of undo actions in the context of "Undo %1"/"Redo %1"
menu commands and in the context of Undo History widget. If you are
not interested in this, you can just ignore this new feature and
everying would work exactly like before. Also, you can use "magic
split" for some messages and not use it for other messages.

If you want to use "magic split" for a string, instread of one
translation you should write two different translations separated by a
"\n" in the translation field in Lokalize or other PO editor (or
"msgstr" field). The first part (before "\n") goes to the Undo History
widget, the second part (after "\n") goes to "Edit -> Undo %1" and
"Edit -> Redo %1" menu commands.
Example: (in krita.po)
    msgid "Brush"
    msgstr "Кисть\nрисование кистью"
"Кисть" will be the name of an item in "Undo History" widget, and the
menu commands under "Edit" will be "Отменить рисование кистью" and
"Повторить рисование кистью" (Отменить/Повторить are Russian
translations of Undo/Redo).
If there is no "\n" in the string, the same translation will be used
in both cases.

Before using "magic split" you should ensure that the string is _only_
passed as undo command text to KUndo2Command (or a derived class).
It would be nice to add a "(qtundo-format)" context to all such
strings, but I'm not sure if I can do that soon in the whole Calligra.
But if those would be added, make your "unfuzzy_context_only" Pology
sieves ready ;)


Note that for now you can only use "magic split" in Calligra, do not
try using it in translations of other applications.


Previous discussions about "magic split":
1. http://lists.kde.org/?t=130375522600002&r=1&w=2
2. http://mail.kde.org/pipermail/calligra-devel/2011-May/001455.html


-- 
Alexander Potashev


                 reply	other threads:[~2011-06-23 18:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTimew767ghRnfB6yhT4R1FVyGprXbw@mail.gmail.com \
    --to=aspotashev@gmail.com \
    --cc=kde-i18n-doc@kde.org \
    --cc=kde-russian@lists.kde.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

рассылка русскоязычной группы пользователей и разработчиков KDE

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/kde-russian/0 kde-russian/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kde-russian kde-russian/ http://lore.altlinux.org/kde-russian \
		kde-russian@lists.kde.ru
	public-inbox-index kde-russian

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.kde-russian


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git