diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/grit/build/grit_localized_resources.rules | 10 | ||||
-rw-r--r-- | tools/grit/grit/node/message.py | 9 |
2 files changed, 14 insertions, 5 deletions
diff --git a/tools/grit/build/grit_localized_resources.rules b/tools/grit/build/grit_localized_resources.rules index 9c3a53b..ca48791 100644 --- a/tools/grit/build/grit_localized_resources.rules +++ b/tools/grit/build/grit_localized_resources.rules @@ -7,7 +7,7 @@ <CustomBuildRule Name="GRIT Generated Localized Resources" DisplayName="GRIT Generated Localized Resources" - CommandLine="$(SolutionDir)..\tools\grit\build\grit_resource_file.bat [inputs] "$(SolutionDir)" "$(OutDir)\grit_derived_sources"" + CommandLine="$(SolutionDir)..\tools\grit\build\grit_resource_file.bat [inputs] "$(SolutionDir)" "$(OutDir)\grit_derived_sources" [AllOptions]" Outputs="$(OutDir)\grit_derived_sources\$(InputName).h; $(OutDir)\grit_derived_sources\$(InputName)_ar.rc; $(OutDir)\grit_derived_sources\$(InputName)_bg.rc; @@ -113,6 +113,14 @@ ExecutionDescription="Generating resources..." > <Properties> + <StringProperty + Name="PreprocessorDefinitions" + DisplayName="Preprocessor Definitions" + Description="Defines a text macro with the given name." + Switch=""[value]"" + Delimited="true" + Inheritable="true" + /> </Properties> </CustomBuildRule> </Rules> diff --git a/tools/grit/grit/node/message.py b/tools/grit/grit/node/message.py index 5ae1162..449238b 100644 --- a/tools/grit/grit/node/message.py +++ b/tools/grit/grit/node/message.py @@ -163,10 +163,11 @@ class MessageNode(base.ContentNode): '''Returns a translated version of this message. ''' assert self.clique - return self.clique.MessageForLanguage(lang, - self.PseudoIsAllowed(), - self.ShouldFallbackToEnglish() - ).GetRealContent() + msg = self.clique.MessageForLanguage(lang, + self.PseudoIsAllowed(), + self.ShouldFallbackToEnglish() + ).GetRealContent() + return msg.replace('[GRITLANGCODE]', lang) def NameOrOffset(self): if 'name' in self.attrs: |