From 763cb4b7a0d50b583957a5943d1d3e51c5cc0d80 Mon Sep 17 00:00:00 2001 From: "e.e d3si9n" Date: Wed, 7 Nov 2012 23:25:50 -0500 Subject: [PATCH] Localized Overview index page --- _includes/localized-overview-index.txt | 34 +++++++++++++++ _layouts/guides-index.html | 43 ++++++++++++++----- es/overviews/core/actors.md | 1 + es/overviews/core/parallel-collections.md | 7 +++ es/overviews/core/string-interpolation.md | 1 + ja/overviews/core/parallel-collections.md | 7 +++ ja/overviews/index.md | 12 ++++++ .../core/_posts/2010-09-07-collections.md | 1 + overviews/core/_posts/2010-11-30-actors.md | 1 + ...12-15-architecture-of-scala-collections.md | 1 + .../_posts/2012-03-27-parallel-collections.md | 1 + overviews/core/_posts/2012-09-20-futures.md | 1 + .../_posts/2012-09-21-string-interpolation.md | 1 + overviews/core/_posts/2012-10-8-macros.md | 1 + .../core/_posts/2012-11-03-value-classes.md | 1 + overviews/index.md | 1 + 16 files changed, 104 insertions(+), 10 deletions(-) create mode 100644 _includes/localized-overview-index.txt create mode 100644 es/overviews/core/parallel-collections.md create mode 100644 ja/overviews/core/parallel-collections.md create mode 100644 ja/overviews/index.md diff --git a/_includes/localized-overview-index.txt b/_includes/localized-overview-index.txt new file mode 100644 index 0000000000..c63454870b --- /dev/null +++ b/_includes/localized-overview-index.txt @@ -0,0 +1,34 @@ +{% for enpost in site.categories.core %} +{% for post in site.pages %} +{% if post.overview and post.overview == enpost.overview and post.language == page.language %} + +{% if post.partof %} +* {{ post.title }} {{ post.label-text }} + {% for pg in site.pages %} + {% if pg.partof == post.partof and pg.outof and pg.language == page.language %} + {% assign totalPages = pg.outof %} + {% endif %} + {% endfor %} + + {% if totalPages %} + + {% else %} **ERROR**. Couldn't find the total number of pages in this set of tutorial articles. Have you declared the `outof` tag in your YAML front matter? + {% endif %} +{% else %} + {% if post.hidden == true %} + {% else %} +* [{{ post.title }}]({{ site.baseurl }}{{ post.url }}) {{ post.label-text }} + {% endif %} +{% endif %} + +{% endif %} +{% endfor %} +{% endfor %} diff --git a/_layouts/guides-index.html b/_layouts/guides-index.html index 3e9d8017c1..d9d3e062f6 100644 --- a/_layouts/guides-index.html +++ b/_layouts/guides-index.html @@ -2,16 +2,39 @@ layout: index --- -
- {{ content }} -
+
+
+ {% for pg in site.pages %} + {% if pg.layout == "guides-index" and pg.languages %} + {% assign languages = pg.languages %} + {% endif %} + {% endfor %} -
- -
+
+ {{ content }} +
+ +
+ + + {% if languages %} + + {% for l in languages %} + + {% endfor %} + {% endif %} +
+
+
diff --git a/es/overviews/core/actors.md b/es/overviews/core/actors.md index 7a18e74e66..b9880b3793 100644 --- a/es/overviews/core/actors.md +++ b/es/overviews/core/actors.md @@ -4,6 +4,7 @@ title: The Scala Actors API label-color: success label-text: Available language: es +overview: actors --- **Philipp Haller and Stephen Tu** diff --git a/es/overviews/core/parallel-collections.md b/es/overviews/core/parallel-collections.md new file mode 100644 index 0000000000..ce092c3159 --- /dev/null +++ b/es/overviews/core/parallel-collections.md @@ -0,0 +1,7 @@ +--- +layout: overview +overview: parallel-collections +partof: parallel-collections +language: es +title: Las Colecciones Paralelizadas +--- diff --git a/es/overviews/core/string-interpolation.md b/es/overviews/core/string-interpolation.md index 6b5cf8c105..30d7c475cb 100644 --- a/es/overviews/core/string-interpolation.md +++ b/es/overviews/core/string-interpolation.md @@ -4,6 +4,7 @@ title: Interpolación de cadenas disqus: true label-color: success label-text: New in 2.10 +overview: string-interpolation --- **Josh Suereth** diff --git a/ja/overviews/core/parallel-collections.md b/ja/overviews/core/parallel-collections.md new file mode 100644 index 0000000000..d89ec1679c --- /dev/null +++ b/ja/overviews/core/parallel-collections.md @@ -0,0 +1,7 @@ +--- +layout: overview +overview: parallel-collections +partof: parallel-collections +language: ja +title: Scala 並列コレクションライブラリ +--- diff --git a/ja/overviews/index.md b/ja/overviews/index.md new file mode 100644 index 0000000000..c537433669 --- /dev/null +++ b/ja/overviews/index.md @@ -0,0 +1,12 @@ +--- +layout: guides-index +language: ja +title: ガイドと概要 +--- + +
+

コアライブラリ

+
+ +{% include localized-overview-index.txt %} + diff --git a/overviews/core/_posts/2010-09-07-collections.md b/overviews/core/_posts/2010-09-07-collections.md index 9cea9086b3..33c12bbaa5 100644 --- a/overviews/core/_posts/2010-09-07-collections.md +++ b/overviews/core/_posts/2010-09-07-collections.md @@ -3,4 +3,5 @@ layout: overview title: Scala's Collections Library disqus: true partof: collections +overview: collections --- diff --git a/overviews/core/_posts/2010-11-30-actors.md b/overviews/core/_posts/2010-11-30-actors.md index 2a4bb0beb6..2af633ab89 100644 --- a/overviews/core/_posts/2010-11-30-actors.md +++ b/overviews/core/_posts/2010-11-30-actors.md @@ -1,6 +1,7 @@ --- layout: overview title: The Scala Actors API +overview: actors --- **Philipp Haller and Stephen Tu** diff --git a/overviews/core/_posts/2010-12-15-architecture-of-scala-collections.md b/overviews/core/_posts/2010-12-15-architecture-of-scala-collections.md index 91abaf3a6d..65a3328540 100644 --- a/overviews/core/_posts/2010-12-15-architecture-of-scala-collections.md +++ b/overviews/core/_posts/2010-12-15-architecture-of-scala-collections.md @@ -1,6 +1,7 @@ --- layout: overview title: The Architecture of Scala Collections +overview: architecture-of-scala-collections --- **Martin Odersky and Lex Spoon** diff --git a/overviews/core/_posts/2012-03-27-parallel-collections.md b/overviews/core/_posts/2012-03-27-parallel-collections.md index b13d052a53..89a08da077 100644 --- a/overviews/core/_posts/2012-03-27-parallel-collections.md +++ b/overviews/core/_posts/2012-03-27-parallel-collections.md @@ -3,4 +3,5 @@ layout: overview title: Scala's Parallel Collections Library disqus: true partof: parallel-collections +overview: parallel-collections --- diff --git a/overviews/core/_posts/2012-09-20-futures.md b/overviews/core/_posts/2012-09-20-futures.md index 0b000dab79..4791360f98 100644 --- a/overviews/core/_posts/2012-09-20-futures.md +++ b/overviews/core/_posts/2012-09-20-futures.md @@ -3,6 +3,7 @@ layout: overview title: Futures and Promises label-color: success label-text: New in 2.10 +overview: futures --- **By: Philipp Haller, Aleksandar Prokopec, Heather Miller, Viktor Klang, Roland Kuhn, and Vojin Jovanovic** diff --git a/overviews/core/_posts/2012-09-21-string-interpolation.md b/overviews/core/_posts/2012-09-21-string-interpolation.md index 9762146b35..30d1b9ab6d 100644 --- a/overviews/core/_posts/2012-09-21-string-interpolation.md +++ b/overviews/core/_posts/2012-09-21-string-interpolation.md @@ -4,6 +4,7 @@ title: String Interpolation disqus: true label-color: success label-text: New in 2.10 +overview: string-interpolation --- **Josh Suereth** diff --git a/overviews/core/_posts/2012-10-8-macros.md b/overviews/core/_posts/2012-10-8-macros.md index edb7cae056..e66ecaa2a3 100644 --- a/overviews/core/_posts/2012-10-8-macros.md +++ b/overviews/core/_posts/2012-10-8-macros.md @@ -4,6 +4,7 @@ title: Macros label-color: success label-text: New in 2.10 hidden: true +overview: macro --- This document is in progress and will be ready in a few days. diff --git a/overviews/core/_posts/2012-11-03-value-classes.md b/overviews/core/_posts/2012-11-03-value-classes.md index d16480f927..3e18f62fda 100644 --- a/overviews/core/_posts/2012-11-03-value-classes.md +++ b/overviews/core/_posts/2012-11-03-value-classes.md @@ -3,6 +3,7 @@ layout: overview title: Value Classes and Universal Traits label-color: success label-text: New in 2.10 +overview: value-classes --- **Mark Harrah** diff --git a/overviews/index.md b/overviews/index.md index ea7446dbf5..7f663669bd 100644 --- a/overviews/index.md +++ b/overviews/index.md @@ -1,6 +1,7 @@ --- layout: guides-index title: Guides and Overviews +languages: ja ---