Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Unified Diff: tools/grit/grit/node/message.py

Issue 2176663003: Revert of grit: Automatically replace ... with … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/download/download_item_model_unittest.cc ('k') | tools/grit/grit/node/message_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/grit/node/message.py
diff --git a/tools/grit/grit/node/message.py b/tools/grit/grit/node/message.py
index e3024fb9530bc2d0e6dee8777c68d812fec53009..48cd1c79519bfe87a294eef03074b10526341ac5 100755
--- a/tools/grit/grit/node/message.py
+++ b/tools/grit/grit/node/message.py
@@ -10,6 +10,9 @@
import types
from grit.node import base
+
+import grit.format.rc_header
+import grit.format.rc
from grit import clique
from grit import exception
@@ -17,10 +20,6 @@
from grit import tclib
from grit import util
-
-# Matches exactly three dots ending a line or followed by whitespace.
-_ELLIPSIS_PATTERN = lazy_re.compile(r'(?<!\.)\.\.\.(?=$|\s)')
-_ELLIPSIS_SYMBOL = u'\u2026' # Ellipsis
# Finds whitespace at the start and end of a string which can be multiline.
_WHITESPACE = lazy_re.compile('(?P<start>\s*)(?P<body>.+?)(?P<end>\s*)\Z',
re.DOTALL | re.MULTILINE)
@@ -54,9 +53,6 @@
# definitions. Names without values are given the empty string value.
# Example: "foo=5 bar baz=100"
self.formatter_data = {}
-
- # Whether or not to convert ... -> U+2026 within Translate().
- self._replace_ellipsis = False
def _IsValidChild(self, child):
return isinstance(child, (PhNode))
@@ -71,11 +67,6 @@
value not in ['true', 'false']):
return False
return True
-
- def SetReplaceEllipsis(self, value):
- '''Sets whether to replace ... with \u2026.
- '''
- self._replace_ellipsis = value
def MandatoryAttributes(self):
return ['name|offset']
@@ -209,8 +200,6 @@
self.PseudoIsAllowed(),
self.ShouldFallbackToEnglish()
).GetRealContent()
- if self._replace_ellipsis:
- msg = _ELLIPSIS_PATTERN.sub(_ELLIPSIS_SYMBOL, msg)
return msg.replace('[GRITLANGCODE]', lang)
def NameOrOffset(self):
« no previous file with comments | « chrome/browser/download/download_item_model_unittest.cc ('k') | tools/grit/grit/node/message_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698