[Spice-devel] [PATCH 12/22] Add exception handling classes

Christophe Fergeau cfergeau at redhat.com
Wed Mar 28 11:12:59 UTC 2018


> Do you have something against requiring string constants in English for our error messages?
> 
> Is it so difficult to understand that if I have:
> 
> 	WriteError(“can’t write”, “header”, filename)
> 	WriteError(“can’t write”, “boson”, filename)
> 
> I can localize all the combinations “can’t write header”, “can’t write boson” and ignore the filename in the localization process, whereas as soon as I have:

You apparently suggest translating "can't write",
"boson" and "header" separately, and to concatenate these translated
bits together to get a translated "can't write boson" or "can't write
header" translated string. I'm afraid this does not work like this, you
need the full string to do the translation "can't write boson", "can't
write header", and translate each separately.

> 	WriteError(“can’t write header” + filename)
> 
> it suddenly becomes impossible to do localization?

so WriteError("can't write header" + filename) is actually *better* from
a translation point of view, as you'd mark "can't write header" for
translation and be done with it.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180328/cc6bcabe/attachment-0001.sig>


More information about the Spice-devel mailing list