Commit graph

10 commits

Author SHA1 Message Date
mcilwain
b5fb62c984 Change all foreach loops in Soy templates to use the for loop syntax
This also updates to a newer version of Closure Rules and fixes a protobuf dep
compile issue.

Full description of the change:

Soy supports 2 kinds of loops:
* foreach- for iterating over items in a collection, e.g.
  {foreach $item in $list}...{/foreach}
* for - for indexed iteration, e.g. {for $i in range(0, 10)}...{/for}

The reason Soy has two different loops is an accident of history; Soy didn’t use
to have a proper grammar for expressions and so the alternate ‘for...range’
syntax was added to make it possible to write indexed loops.  As the grammar has
improved having the two syntaxes is no longer necessary and so we are
eliminating one of them.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182843207
2018-01-23 16:16:53 -05:00
mcilwain
ffcfa283f6 Roll back changelist 180942763
*** Reason for rollback ***

Breaks the FOSS build.

We'll reincorporate this change once Closure Rules is properly updated to accommodate it.

*** Original change description ***

Change all foreach loops in Soy templates to use the for loop syntax

Soy supports 2 kinds of loops:
foreach- for iterating over items in a collection  e.g. {foreach $item in $list}...{/foreach}
for - for indexed iteration  e.g. {for $i in range(0, 10)}...{/for}

The reason Soy has 2 different loops is an accident of history, Soy didn’t use to have a proper grammar for expressions and so the alternate ‘for...range’ syntax was added to make it possible to write indexed loops.  As the gramma...

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180961695
2018-01-19 14:17:58 -05:00
lukes
7aa070b0a5 Change all foreach loops in Soy templates to use the for loop syntax
Soy supports 2 kinds of loops:
foreach- for iterating over items in a collection  e.g. {foreach $item in $list}...{/foreach}
for - for indexed iteration  e.g. {for $i in range(0, 10)}...{/for}

The reason Soy has 2 different loops is an accident of history, Soy didn’t use to have a proper grammar for expressions and so the alternate ‘for...range’ syntax was added to make it possible to write indexed loops.  As the grammar has improved having the two syntaxes is no longer necessary and so we are eliminating one of them.

As of 4a7373333f or mvn release "2018-01-03" the two forms are actually aliases for one another, so the only difference is the keyword (‘for’ vs ‘foreach’), and while the foreach loop is more popular the ‘for’ terminology is more standard so we are switching everything to that.

LSC: []
Tested:
    TAP sample presubmit queue
    []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180942763
2018-01-19 14:14:31 -05:00
jakubvrana
939c18bbce Remove autoescape="strict" attributes from Soy templates.
Strict autoescaping is the default so they serve no purpose.

Design doc: []

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170905337
2017-10-04 16:16:45 -04:00
jakubvrana
04a61794e0 Fix closing and self-closing tags in templates
Void tags (e.g. <img>) couldn't have a closing tag (e.g. </img> is invalid). Non-void tags (e.g. <div>) couldn't be self closing (e.g. <div/> is invalid) and must be closed explicitly (e.g. with </div>). This CL fixes the tags which also prepares the templates for stricthtml which enforces it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168829028
2017-09-20 10:27:17 -04:00
mmuller
b70f57b7c7 Update copyright year on all license headers
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146111211
2017-02-02 16:27:22 -05:00
shikhman
f76bc70f91 Preserve test logs and test summary output for Kokoro CI runs
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135494972
2016-10-14 16:57:43 -04:00
nickfelt
730cca257d Remove GtechCommand and other vestiges of gtech_tool
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=134836647
2016-10-03 16:36:23 -04:00
Chris Tingue
9c28534b64 Add --set_current_tld_state to UpdateTldCommand
This feature would have been useful earlier when I was changing the TLD
state on a sandbox TLD on-the-fly for testing purposes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128088578
2016-08-02 19:02:19 -04:00
Justine Tunney
5012893c1d mv com/google/domain/registry google/registry
This change renames directories in preparation for the great package
rename. The repository is now in a broken state because the code
itself hasn't been updated. However this should ensure that git
correctly preserves history for each file.
2016-05-13 18:55:08 -04:00
Renamed from java/com/google/domain/registry/tools/soy/UpdateServerLocks.soy (Browse further)