[pitivi] docs/HACKING: Explain the proper use of multiline strings
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] docs/HACKING: Explain the proper use of multiline strings
- Date: Sun, 2 Sep 2012 04:06:23 +0000 (UTC)
commit b323bb6468aa9d69f07717bd503a50744166a12e
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Thu Aug 30 23:45:49 2012 -0700
docs/HACKING: Explain the proper use of multiline strings
docs/HACKING | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/docs/HACKING b/docs/HACKING
index d80d47d..5534415 100644
--- a/docs/HACKING
+++ b/docs/HACKING
@@ -24,6 +24,15 @@ Hacking on PiTiVi
and what you think makes the most easily readable code.
+ For translatable multiline strings, use Python's implicit line continuation
+ instead of manually concatenating with the plus (+) sign. For example, this
+ is incorrect, gettext will consider it as two separate strings:
+ _("<b>First line</b>\n" +
+ "Some second line that is too long to fit on the first line anyway"
+
+ Instead, this is the translator-friendly version:
+ _("<b>First line</b>\n"
+ "Some second line that is too long to fit on the first line anyway"
- for method names we use the mixedCase style
Ex :
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]