Asking the user for a text template

Ingo Klöcker kloecker at
Thu May 6 20:25:33 BST 2010

On Thursday 06 May 2010, Rolf Eike Beer wrote:
> Hi,
> I'm just trying to get the last feature bits of KGpg for 4.5
> polished. One thing I did not pay any attention to is a text
> template the user should enter if he sends an automated mail. The
> idea is that KGpg will sign a bunch of ids at once and will send a
> mail out with the signed id using the text. Within the text there
> should be some placeholders to make the text less static.
> A very simple example could be:
> == snip ==
> I'm sending you your key %KEYID.
> Have fun with it.
> == snap ==
> And then I would so some simple search and replace on those variables
> and replace them with the texts for that particular id. This would
> basically be what you can see with in the mail templates of KMail
> for example.
> My questions are:
> -is it a good idea to make the placeholder names itself translatable?
> So this would be %MEINNAME instead of %MYNAME in German. In KMail
> those names are not translated. I don't mind but for non-English
> people that looks a bit strange and they may not even know what
> %QUOTE is.

I don't think it's a good idea to translate the placeholders. If you 
really want to translate them then you should still store the template 
with the untranslated placeholders. Otherwise, the templates will stop 
working as soon as the user switches to another language. Also 
exchanging templates with other users will be problematic.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list