[chrome-gnome-shell/feature/gettext] gettext: add placeholders information to string comments
- From: Yuri Konotopov <ykonotopov src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chrome-gnome-shell/feature/gettext] gettext: add placeholders information to string comments
- Date: Thu, 5 May 2016 16:08:56 +0000 (UTC)
commit 9a837d9d15f84fcfea59f75e7c1a0d3cc619d22f
Author: Yuri Konotopov <ykonotopov gmail com>
Date: Thu May 5 18:36:03 2016 +0300
gettext: add placeholders information to string comments
contrib/chrome-messages2po.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/contrib/chrome-messages2po.py b/contrib/chrome-messages2po.py
index efc6425..b06c698 100755
--- a/contrib/chrome-messages2po.py
+++ b/contrib/chrome-messages2po.py
@@ -109,6 +109,16 @@ def run():
if 'description' in chromeMessages[messageKey]:
entryData['comment'] = chromeMessages[messageKey]['description']
+ if 'placeholders' in chromeMessages[messageKey]:
+ if 'comment' in entryData:
+ entryData['comment'] += '\n\n'
+ else:
+ entryData['comment'] = ''
+
+ entryData['comment'] += 'String placeholders:\n'
+ for placeholder in chromeMessages[messageKey]['placeholders']:
+ entryData['comment'] += placeholder + '\n'
+
po.append(polib.POEntry(**entryData))
po.append(polib.POEntry(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]