Skip to content

Commit

Permalink
Create redirect pages for old location of English lessons
Browse files Browse the repository at this point in the history
It creates a .md file with the "redirect_to" directive for every lesson,
in order to avoid translators to copy the "redirect_from" directive

Closes #1397

Script for creating the new redirect files

for d in $( ls -1 en/lessons/ ); do
  mkdir -p lessons/${d}
  for f in $( ls -1 en/lessons/${d}/ | sed -e 's/\..*$//' ); do
    echo -e "---\nredirect_to:\n  - /en/lessons/${d}/${f}/\n---" > lessons/${d}/${f}.md;
  done
done
  • Loading branch information
eksperimental authored and doomspork committed May 31, 2018
1 parent fdbe865 commit 10c24cf
Show file tree
Hide file tree
Showing 78 changed files with 160 additions and 76 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ Check [here](https://www.loc.gov/standards/iso639-2/php/English_list.php) for th

1. Translated lessons must include the page metadata.
* `title` should be a translation of the original lesson's `title`.
* `version` should be set to the original English `version`
* `version` should consist of three digits: `major.minor.patch`, so:
* if this is a initial lesson translation, the version should be set to `1.0.0`;
* if you apply the original lesson updates to the translation, the version should be copied from the corresponding state of the original lesson;
* else bump one of the version numbers depending on how important is your change.

For example `/ja/lessons/basics/basics.md`:

Expand Down
1 change: 0 additions & 1 deletion en/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Elixir School
redirect_from: /
layout: home
version: 2.0.0
---
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/advanced/behaviours.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.1
title: Behaviours
redirect_from:
- /lessons/advanced/behaviours/
---

We learned about Typespecs in the previous lesson, here we'll learn how to require a module to implement those specifications. In Elixir, this functionality is referred to as behaviours.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/advanced/concurrency.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.1.0
title: Concurrency
redirect_from:
- /lessons/advanced/concurrency/
---

One of the selling points of Elixir is its support for concurrency. Thanks to the Erlang VM (BEAM), concurrency in Elixir is easier than expected. The concurrency model relies on Actors, a contained process that communicates with other processes through message passing.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/advanced/erlang.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.1
title: Erlang Interoperability
redirect_from:
- /lessons/advanced/erlang/
---

One of the added benefits to building on top of the Erlang VM (BEAM) is the plethora of existing libraries available to us. Interoperability allows us to leverage those libraries and the Erlang standard lib from our Elixir code. In this lesson we'll look at how to access functionality in the standard lib along with third-party Erlang packages.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/advanced/error-handling.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.1
title: Error Handling
redirect_from:
- /lessons/advanced/error-handling/
---

Although more common to return the `{:error, reason}` tuple, Elixir supports exceptions and in this lesson we'll look at how to handle errors and the different mechanisms available to us.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/advanced/escripts.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.1
title: Executables
redirect_from:
- /lessons/advanced/escripts/
---

To build executables in Elixir we will be using escript. Escript produces an executable that can be run on any system with Erlang installed.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/advanced/gen-stage.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.2
title: GenStage
redirect_from:
- /lessons/advanced/gen-stage/
---

In this lesson we're going to take a closer look at the GenStage, what role it serves, and how we can leverage it in our applications.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/advanced/metaprogramming.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.2
title: Metaprogramming
redirect_from:
- /lessons/advanced/metaprogramming/
---

Metaprogramming is the process of using code to write code. In Elixir this gives us the ability to extend the language to fit our needs and dynamically change the code. We'll start by looking at how Elixir is represented under the hood, then how to modify it, and finally we can use this knowledge to extend it.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/advanced/otp-concurrency.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.3
title: OTP Concurrency
redirect_from:
- /lessons/advanced/otp-concurrency/
---

We've looked at the Elixir abstractions for concurrency but sometimes we need greater control and for that we turn to the OTP behaviors that Elixir is built on.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/advanced/otp-supervisors.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.1.1
title: OTP Supervisors
redirect_from:
- /lessons/advanced/otp-supervisors/
---

Supervisors are specialized processes with one purpose: monitoring other processes. These supervisors enable us to create fault-tolerant applications by automatically restarting child processes when they fail.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/advanced/protocols.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.1
title: Protocols
redirect_from:
- /lessons/advanced/protocols/
---

In this lesson we are going to look at Protocols, what they are, and how we use them in Elixir.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/advanced/typespec.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.2
title: Specifications and types
redirect_from:
- /lessons/advanced/typespec/
---

In this lesson we will learn about `@spec` and `@type` syntax. `@spec` is more of a syntax complement for writing documentation that could be analyzed by tools. `@type` helps us write more readable and easier to understand code.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/advanced/umbrella-projects.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.1
title: Umbrella Projects
redirect_from:
- /lessons/advanced/umbrella-projects/
---

Sometimes a project can get big, really big in fact. The Mix build tool allows us to split our code into multiple apps and make our Elixir projects more manageable as they grow.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/basics.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.1.2
title: Basics
redirect_from:
- /lessons/basics/basics/
---

Getting started, basic data types, and basic operations.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/collections.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.2.2
title: Collections
redirect_from:
- /lessons/basics/collections/
---

Lists, tuples, keyword lists, and maps.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/comprehensions.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.1.0
title: Comprehensions
redirect_from:
- /lessons/basics/comprehensions/
---

List comprehensions are syntactic sugar for looping through enumerables in Elixir. In this lesson we'll look at how we can use comprehensions for iteration and generation.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/control-structures.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.1.1
title: Control Structures
redirect_from:
- /lessons/basics/control-structures/
---

In this lesson we will look at the control structures available to us in Elixir.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/documentation.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.2
title: Documentation
redirect_from:
- /lessons/basics/documentation/
---

Documenting Elixir code.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/enum.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.4.0
title: Enum
redirect_from:
- /lessons/basics/enum/
---

A set of algorithms for enumerating over enumerables.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/functions.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.1.0
title: Functions
redirect_from:
- /lessons/basics/functions/
---

In Elixir and many functional languages, functions are first class citizens. We will learn about the types of functions in Elixir, what makes them different, and how to use them.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/iex-helpers.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.1
title: IEx Helpers
redirect_from:
- /lessons/basics/iex-helpers/
---

{% include toc.html %}
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/mix-tasks.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.2
title: Custom Mix Tasks
redirect_from:
- /lessons/basics/mix-tasks/
---

Creating custom Mix tasks for your Elixir projects.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/mix.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.1
title: Mix
redirect_from:
- /lessons/basics/mix/
---

Before we can dive into the deeper waters of Elixir we first need to learn about Mix. If you're familiar with Ruby, Mix is Bundler, RubyGems, and Rake combined. It's a crucial part of any Elixir project and in this lesson we're going to explore just a few of its great features. To see all that Mix has to offer run `mix help`.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/modules.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.2.0
title: Modules
redirect_from:
- /lessons/basics/modules/
---

We know from experience it's unruly to have all of our functions in the same file and scope. In this lesson we're going to cover how to group functions and define a specialized map known as a struct in order to organize our code more efficiently.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/pattern-matching.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.2
title: Pattern Matching
redirect_from:
- /lessons/basics/pattern-matching/
---

Pattern matching is a powerful part of Elixir. It allows us to match simple values, data structures, and even functions. In this lesson we will begin to see how pattern matching is used.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/pipe-operator.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.1
title: Pipe Operator
redirect_from:
- /lessons/basics/pipe-operator/
---

The pipe operator `|>` passes the result of an expression as the first parameter of another expression.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/sigils.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.1
title: Sigils
redirect_from:
- /lessons/basics/sigils/
---

Working with and creating sigils.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/strings.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.1.1
title: Strings
redirect_from:
- /lessons/basics/strings/
---

Strings, Char Lists, Graphemes and Codepoints.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/basics/testing.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.1.1
title: Testing
redirect_from:
- /lessons/basics/testing/
---

Testing is an important part of developing software. In this lesson we'll look at how to test our Elixir code with ExUnit and some best practices for doing so.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/libraries/benchee.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.1
title: Benchee
redirect_from:
- /lessons/libraries/benchee/
---

We can't just guess about which functions are fast and which are slow - we need actual measurements when we're curious. That's where benchmarking comes in. In this lesson, we'll learn about how easy it is to measure the speed of our code.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/libraries/guardian.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.1
title: Guardian (Basics)
redirect_from:
- /lessons/libraries/guardian/
---

[Guardian](https://github.com/ueberauth/guardian) is a widely used authentication library based on [JWT](https://jwt.io/) (JSON Web Tokens).
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/libraries/poolboy.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.1.1
title: Poolboy
redirect_from:
- /lessons/libraries/poolboy/
---

You can easily exhaust your system resources if you do not limit the maximum number of concurrent processes that your program can spawn. [Poolboy](https://github.com/devinus/poolboy) is a widely used lightweight, generic pooling library for Erlang that addresses this issue.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/specifics/debugging.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.1
title: Debugging
redirect_from:
- /lessons/specifics/debugging/
---

Bugs are an inherent part of any project, that's why we need debugging. In this lesson we'll learn about debugging Elixir code as well as static analysis tools to help find potential bugs.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/specifics/ecto.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.2.0
title: Ecto
redirect_from:
- /lessons/specifics/ecto/
---

Ecto is an official Elixir project providing a database wrapper and integrated query language. With Ecto we're able to create migrations, define schemas, insert and update records, and query them.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/specifics/eex.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.2
title: Embedded Elixir (EEx)
redirect_from:
- /lessons/specifics/eex/
---

Much like Ruby has ERB and Java has JSPs, Elixir has EEx, or Embedded Elixir. With EEx we can embed and evaluate Elixir inside strings.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/specifics/ets.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.1.0
title: Erlang Term Storage (ETS)
redirect_from:
- /lessons/specifics/ets/
---

Erlang Term Storage, commonly referred to as ETS, is a powerful storage engine built into OTP and available to use in Elixir. In this lesson we'll look at how to interface with ETS and how it can be employed in our applications.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/specifics/mnesia.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.0.0
title: Mnesia
redirect_from:
- /lessons/specifics/mnesia/
---

Mnesia is a heavy duty real-time distributed database management system.
Expand Down
2 changes: 0 additions & 2 deletions en/lessons/specifics/plug.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
version: 1.1.2
title: Plug
redirect_from:
- /lessons/specifics/plug/
---

If you're familiar with Ruby you can think of Plug as Rack with a splash of Sinatra.
Expand Down
4 changes: 4 additions & 0 deletions lessons/advanced/behaviours.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
redirect_to:
- /en/lessons/advanced/behaviours/
---
4 changes: 4 additions & 0 deletions lessons/advanced/concurrency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
redirect_to:
- /en/lessons/advanced/concurrency/
---
4 changes: 4 additions & 0 deletions lessons/advanced/erlang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
redirect_to:
- /en/lessons/advanced/erlang/
---
4 changes: 4 additions & 0 deletions lessons/advanced/error-handling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
redirect_to:
- /en/lessons/advanced/error-handling/
---
4 changes: 4 additions & 0 deletions lessons/advanced/escripts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
redirect_to:
- /en/lessons/advanced/escripts/
---
4 changes: 4 additions & 0 deletions lessons/advanced/gen-stage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
redirect_to:
- /en/lessons/advanced/gen-stage/
---
4 changes: 4 additions & 0 deletions lessons/advanced/metaprogramming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
redirect_to:
- /en/lessons/advanced/metaprogramming/
---
4 changes: 4 additions & 0 deletions lessons/advanced/otp-concurrency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
redirect_to:
- /en/lessons/advanced/otp-concurrency/
---
4 changes: 4 additions & 0 deletions lessons/advanced/otp-supervisors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
redirect_to:
- /en/lessons/advanced/otp-supervisors/
---

0 comments on commit 10c24cf

Please sign in to comment.