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

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

Issue 1438403002: Remove contents of grit's git-svn-mirror repository. (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n@master
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
« no previous file with comments | « grit/node/custom/filename_unittest.py ('k') | grit/node/include.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 '''Container nodes that don't have any logic.
7 '''
8
9
10 from grit.node import base
11 from grit.node import include
12 from grit.node import structure
13 from grit.node import message
14 from grit.node import io
15 from grit.node import misc
16
17
18 class GroupingNode(base.Node):
19 '''Base class for all the grouping elements (<structures>, <includes>,
20 <messages> and <identifiers>).'''
21 def DefaultAttributes(self):
22 return {
23 'first_id' : '',
24 'comment' : '',
25 'fallback_to_english' : 'false',
26 'fallback_to_low_resolution' : 'false',
27 }
28
29
30 class IncludesNode(GroupingNode):
31 '''The <includes> element.'''
32 def _IsValidChild(self, child):
33 return isinstance(child, (include.IncludeNode, misc.IfNode, misc.PartNode))
34
35
36 class MessagesNode(GroupingNode):
37 '''The <messages> element.'''
38 def _IsValidChild(self, child):
39 return isinstance(child, (message.MessageNode, misc.IfNode, misc.PartNode))
40
41
42 class StructuresNode(GroupingNode):
43 '''The <structures> element.'''
44 def _IsValidChild(self, child):
45 return isinstance(child, (structure.StructureNode,
46 misc.IfNode, misc.PartNode))
47
48
49 class TranslationsNode(base.Node):
50 '''The <translations> element.'''
51 def _IsValidChild(self, child):
52 return isinstance(child, (io.FileNode, misc.IfNode, misc.PartNode))
53
54
55 class OutputsNode(base.Node):
56 '''The <outputs> element.'''
57 def _IsValidChild(self, child):
58 return isinstance(child, (io.OutputNode, misc.IfNode, misc.PartNode))
59
60
61 class IdentifiersNode(GroupingNode):
62 '''The <identifiers> element.'''
63 def _IsValidChild(self, child):
64 return isinstance(child, misc.IdentifierNode)
OLDNEW
« no previous file with comments | « grit/node/custom/filename_unittest.py ('k') | grit/node/include.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698