summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/grit/grit/node/message.py11
-rw-r--r--tools/grit/grit/tclib.py12
2 files changed, 4 insertions, 19 deletions
diff --git a/tools/grit/grit/node/message.py b/tools/grit/grit/node/message.py
index 7086538..449238b 100644
--- a/tools/grit/grit/node/message.py
+++ b/tools/grit/grit/node/message.py
@@ -54,7 +54,7 @@ class MessageNode(base.ContentNode):
def _IsValidAttribute(self, name, value):
if name not in ['name', 'offset', 'translateable', 'desc', 'meaning',
'internal_comment', 'shortcut_groups', 'custom_type',
- 'validation_expr', 'use_name_for_id']:
+ 'validation_expr']:
return False
if name == 'translateable' and value not in ['true', 'false']:
return False
@@ -72,7 +72,6 @@ class MessageNode(base.ContentNode):
'shortcut_groups' : '',
'custom_type' : '',
'validation_expr' : '',
- 'use_name_for_id' : 'false',
}
def GetTextualIds(self):
@@ -140,14 +139,10 @@ class MessageNode(base.ContentNode):
description_or_id = self.attrs['desc']
if description_or_id == '' and 'name' in self.attrs:
description_or_id = 'ID: %s' % self.attrs['name']
-
- assigned_id = None
- if self.attrs['use_name_for_id'] == 'true':
- assigned_id = self.attrs['name']
+
message = tclib.Message(text=text, placeholders=placeholders,
description=description_or_id,
- meaning=self.attrs['meaning'],
- assigned_id=assigned_id)
+ meaning=self.attrs['meaning'])
self.clique = self.UberClique().MakeClique(message, self.IsTranslateable())
for group in self.shortcut_groups_:
self.clique.AddToShortcutGroup(group)
diff --git a/tools/grit/grit/tclib.py b/tools/grit/grit/tclib.py
index d97d675..846ce15 100644
--- a/tools/grit/grit/tclib.py
+++ b/tools/grit/grit/tclib.py
@@ -144,24 +144,14 @@ class BaseMessage(object):
class Message(BaseMessage):
'''A message.'''
- def __init__(self, text='', placeholders=[], description='', meaning='',
- assigned_id=None):
+ def __init__(self, text='', placeholders=[], description='', meaning=''):
BaseMessage.__init__(self, text, placeholders, description, meaning)
- self.assigned_id = assigned_id
def ToTclibMessage(self):
msg = grit.extern.tclib.Message('utf-8', meaning=self.meaning)
self.FillTclibBaseMessage(msg)
return msg
- def GetId(self):
- '''Use the assigned id if we have one.'''
- if self.assigned_id:
- return self.assigned_id
-
- return BaseMessage.GetId(self)
-
-
class Translation(BaseMessage):
'''A translation.'''