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

Side by Side Diff: grit/node/variant.py

Issue 1442863002: Remove contents of grit's SVN repository. (Closed) Base URL: http://grit-i18n.googlecode.com/svn/trunk/
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « grit/node/structure_unittest.py ('k') | grit/pseudo.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 '''The <skeleton> element.
7 '''
8
9
10 from grit.node import base
11
12
13 class SkeletonNode(base.Node):
14 '''A <skeleton> element.'''
15
16 # TODO(joi) Support inline skeleton variants as CDATA instead of requiring
17 # a 'file' attribute.
18
19 def MandatoryAttributes(self):
20 return ['expr', 'variant_of_revision', 'file']
21
22 def DefaultAttributes(self):
23 '''If not specified, 'encoding' will actually default to the parent node's
24 encoding.
25 '''
26 return {'encoding' : ''}
27
28 def _ContentType(self):
29 if self.attrs.has_key('file'):
30 return self._CONTENT_TYPE_NONE
31 else:
32 return self._CONTENT_TYPE_CDATA
33
34 def GetEncodingToUse(self):
35 if self.attrs['encoding'] == '':
36 return self.parent.attrs['encoding']
37 else:
38 return self.attrs['encoding']
39
40 def GetInputPath(self):
41 return self.attrs['file']
42
OLDNEW
« no previous file with comments | « grit/node/structure_unittest.py ('k') | grit/pseudo.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698