[gnome-games] File missed from commit 484d28995afff4f46ec7d8aecb2333ea27f94ae0
- From: Robert Ancell <rancell src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games] File missed from commit 484d28995afff4f46ec7d8aecb2333ea27f94ae0
- Date: Sat, 11 Jul 2009 10:46:39 +0000 (UTC)
commit c344a97da9a2ea59268c09fc422d2fc0b90d2794
Author: Robert Ancell <robert ancell gmail com>
Date: Sat Jul 11 18:44:43 2009 +0800
File missed from commit 484d28995afff4f46ec7d8aecb2333ea27f94ae0
glchess/src/lib/i18n.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/glchess/src/lib/i18n.py b/glchess/src/lib/i18n.py
new file mode 100644
index 0000000..b5fbbb1
--- /dev/null
+++ b/glchess/src/lib/i18n.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+import gettext
+
+def C_(ctx, s):
+ """Provide qualified translatable strings via context."""
+ translated = gettext.gettext('%s\x04%s' % (ctx, s))
+ if '\x04' in translated:
+ # no translation found, return input string
+ return s
+ return translated
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]