Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
Ğ Groups Home
Compiling templates with goog.getMsg
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Andre Tannus  
View profile   Translate to Translated (View Original)
 More options Nov 16 2011, 1:19 pm
From: Andre Tannus <andre.tan...@gmail.com>
Date: Wed, 16 Nov 2011 10:19:58 -0800 (PST)
Local: Wed, Nov 16 2011 1:19 pm
Subject: Compiling templates with goog.getMsg
Hi. Is it still possible to compile closure templates to that they
turn messages into goog.getMsg calls?

The documentation on http://code.google.com/closure/templates/docs/translation.html#insert...
says the flag --should_generate_goog_msg_defs will do that, but the
latest version of SoyToJsSrcCompiler does not support such flag.

Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andre Tannus  
View profile  
 More options Nov 16 2011, 10:52 pm
From: Andre Tannus <andre.tan...@gmail.com>
Date: Wed, 16 Nov 2011 19:52:36 -0800 (PST)
Local: Wed, Nov 16 2011 10:52 pm
Subject: Re: Compiling templates with goog.getMsg

Update

It seems the option was removed, perhaps by accident?

I checked it out and here's the diff to put it back in, compiled and it
works fine so far.
Check option usage message, I think it needs a tweak.

André

Index: java/src/com/google/template/soy/SoyToJsSrcCompiler.java
===================================================================
--- java/src/com/google/template/soy/SoyToJsSrcCompiler.java (revision 23)
+++ java/src/com/google/template/soy/SoyToJsSrcCompiler.java (working copy)
@@ -84,6 +84,13 @@
           handler = MainClassUtils.BooleanOptionHandler.class)
   private boolean shouldGenerateJsdoc = false;

+  @Option(name = "--shouldGenerateGoogMsgDefs",
+          usage = "Set this flag if you want goog.getMsg definitions to be
generated for all msg" +
+  "blocks.",
+
+          handler = MainClassUtils.BooleanOptionHandler.class)
+  private boolean shouldGenerateGoogMsgDefs = true;
+
   @Option(name = "--shouldProvideRequireSoyNamespaces",
           usage = "When this option is used, each generated JS file will
contain (a) one single" +
                   " goog.provide statement for the corresponding Soy
file's namespace and" +
@@ -194,6 +201,7 @@
     jsSrcOptions.setIsUsingIjData(isUsingIjData);
     jsSrcOptions.setCodeStyle(codeStyle);
     jsSrcOptions.setShouldGenerateJsdoc(shouldGenerateJsdoc);
+    jsSrcOptions.setShouldGenerateGoogMsgDefs(shouldGenerateGoogMsgDefs);

 jsSrcOptions.setShouldProvideRequireSoyNamespaces(shouldProvideRequireSoyNa mespaces);

 jsSrcOptions.setShouldDeclareTopLevelNamespaces(shouldDeclareTopLevelNamesp aces);
     jsSrcOptions.setBidiGlobalDir(bidiGlobalDir);


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Samuel  
View profile  
 More options Nov 17 2011, 8:46 am
From: Mike Samuel <mikesam...@gmail.com>
Date: Thu, 17 Nov 2011 08:46:47 -0500
Local: Thurs, Nov 17 2011 8:46 am
Subject: Re: Compiling templates with goog.getMsg
2011/11/16 Andre Tannus <andre.tan...@gmail.com>:

> Update
> It seems the option was removed, perhaps by accident?
> I checked it out and here's the diff to put it back in, compiled and it
> works fine so far.
> Check option usage message, I think it needs a tweak.

Very odd.  I don't know how that happened.  Thanks for the patch.  I
will try and get that fix in soon.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »