summaryrefslogtreecommitdiffstats
path: root/tools/grit
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 00:20:11 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 00:20:11 +0000
commit0ae53c3e3458d5bdd1e84247d1e607a9fc1b5084 (patch)
tree503adcd80cf6f0faa97c076ff556d9bc17aaad1f /tools/grit
parent32324adbf3f25993a4e1fbacf26a1bc49582571f (diff)
downloadchromium_src-0ae53c3e3458d5bdd1e84247d1e607a9fc1b5084.zip
chromium_src-0ae53c3e3458d5bdd1e84247d1e607a9fc1b5084.tar.gz
chromium_src-0ae53c3e3458d5bdd1e84247d1e607a9fc1b5084.tar.bz2
Update
grit to replace \n to actual new lines in data pack files. Windows' MessageBox automatically converts \n to a new line, but GTK+ doesn't. BUG=20943 Review URL: http://codereview.chromium.org/196007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25408 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/grit')
-rw-r--r--tools/grit/grit/node/message.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/grit/grit/node/message.py b/tools/grit/grit/node/message.py
index 4622af6c..9410f93 100644
--- a/tools/grit/grit/node/message.py
+++ b/tools/grit/grit/node/message.py
@@ -191,6 +191,10 @@ class MessageNode(base.ContentNode):
id = id_map[self.GetTextualIds()[0]]
message = self.ws_at_start + self.Translate(lang) + self.ws_at_end
+ if "\\n" in message:
+ # Windows automatically translates \n to a new line, but GTK+ doesn't.
+ # Manually do the conversion here rather than at run time.
+ message = message.replace("\\n", "\n")
# |message| is a python unicode string, so convert to a utf16 byte stream
# because that's the format of datapacks. We skip the first 2 bytes
# because it is the BOM.