From 60161a4f6a9cb7c8379b3b901e122ddf14e9c082 Mon Sep 17 00:00:00 2001 From: Rui Onodera Date: Sun, 16 Sep 2018 21:28:25 +0900 Subject: [PATCH] Follow the latest --- _po/ja.po | 73 ++++++++++--------- _po/ja/development.po | 21 ++---- _po/ja/development.pot | 6 +- .../mix-otp/docs-tests-and-with.po | 11 ++- .../mix-otp/docs-tests-and-with.pot | 6 +- .../mix-otp/introduction-to-mix.po | 18 +++-- .../mix-otp/introduction-to-mix.pot | 40 +++++----- .../mix-otp/task-and-gen-tcp.po | 7 +- .../mix-otp/task-and-gen-tcp.pot | 6 +- docs/development.html | 2 +- .../mix-otp/docs-tests-and-with.html | 4 +- .../mix-otp/introduction-to-mix.html | 14 ++-- .../mix-otp/task-and-gen-tcp.html | 4 +- ja/development.markdown | 2 +- .../mix-otp/docs-tests-and-with.markdown | 4 +- .../mix-otp/introduction-to-mix.markdown | 14 ++-- .../mix-otp/task-and-gen-tcp.markdown | 4 +- 17 files changed, 122 insertions(+), 114 deletions(-) diff --git a/_po/ja.po b/_po/ja.po index a67aa954b..c04e2905f 100644 --- a/_po/ja.po +++ b/_po/ja.po @@ -10696,11 +10696,6 @@ msgid "" " clients and servers is made more apparent." msgstr "" -msgid "" -"In the next chapter, we will finally make our system distributed by adding a b" -"ucket routing mechanism. We'll also learn about application configuration." -msgstr "" - msgid "" "In the next chapter, we will start parsing the client requests and sending res" "ponses, finishing our server." @@ -10954,8 +10949,8 @@ msgstr "" msgid "" "Insert these changes in your code and now you may start your application using" -" the following command `PORT=4040 mix run --no-halt`, notice how we are passin" -"g the port as a variable." +" the following command `PORT=4321 mix run --no-halt`, notice how we are passin" +"g the port as a variable, but still defaults to 4040 if none is given." msgstr "" msgid "" @@ -11365,6 +11360,12 @@ msgid "" " in previous chapters:" msgstr "" +msgid "" +"Let's move to the last chapter. We will finally make our system distributed by" +" adding a bucket routing mechanism. We'll also learn about application configu" +"ration." +msgstr "" + msgid "Let's now see how we can use the power of recursion to sum a list of numbers:" msgstr "" @@ -11730,6 +11731,12 @@ msgid "" "ix help`:" msgstr "" +msgid "" +"Mix provides the concept of \"environments\". They allow a developer to customiz" +"e compilation and other options for specific scenarios. By default, Mix unders" +"tands three environments:" +msgstr "" + msgid "" "Mix ships with a [`mix profile.fprof`](/docs/v1.1/mix/Mix.Tasks.Profile.Fprof." "html), useful for profiling your application code. The [`mix app.start`](/docs" @@ -11739,12 +11746,6 @@ msgid "" "unning." msgstr "" -msgid "" -"Mix supports the concept of \"environments\". They allow a developer to customiz" -"e compilation and other options for specific scenarios. By default, Mix unders" -"tands three environments:" -msgstr "" - msgid "" "Mix v1.4 can now install escripts and archives from both Git and Hex, providin" "g you with even more options for distributing Elixir code." @@ -12197,7 +12198,7 @@ msgstr "" msgid "" "Notice that by running `mix test`, Mix has compiled the source files and gener" "ated the application manifest once again. This happens because Mix supports mu" -"ltiple environments, which we will explore in the next section." +"ltiple environments, which we will discuss later in this chapter." msgstr "" msgid "" @@ -13302,14 +13303,9 @@ msgid "" msgstr "" msgid "" -"Since v1.0, the language development has become more focused. We believe there" -" is a limited amount of features a language can provide without hindering its " -"learning and without causing fragmentation in the community. Therefore the Eli" -"xir team focuses on language features that:" -msgstr "" -"v1.0 以降、この言語の開発に関心が集まるようになりました。私達は、コミュニティの人々の気持ちが離ればなれになったり、学習の妨げになったりする事なく、ある" -"一つの言語が提供できる機能量というものには限りがあると考えています。それ故に私たち Elixir team は言語機能について以下のことに注意を払っています" -"。" +"Since v1.0, the language development has become focused to provide a compact a" +"nd consistent core. The Elixir team focuses on language features that:" +msgstr "v1.0 以降、この言語の開発は小さく一貫したコアを提供することに集中するようになりました。Elixir チームは以下の言語仕様に焦点をあてています。" msgid "" "Since we have changed the supervisor specification, we need to ask: is our sup" @@ -14298,9 +14294,9 @@ msgid "" msgstr "" msgid "" -"The environment applies only to the current project. As we will see later on, " -"any dependency you add to your project will by default run in the `:prod` envi" -"ronment." +"The environment applies only to the current project. As we will see in future " +"chapters, any dependency you add to your project will by default run in the `:" +"prod` environment." msgstr "" msgid "" @@ -15898,11 +15894,11 @@ msgstr "" msgid "" "To remain focused, Elixir trusts its ecosystem to bring diversity and broaden " -"its use cases to a wider audience. Therefore the language was designed to be e" -"xtensible: the constructs available to build the language are also available f" -"or developers to extend the language and bring it to different domains. Projec" -"ts such as [the Phoenix web framework](http://phoenixframework.org) and [the N" -"erves embedded framework](http://nerves-project.org) are two of such examples." +"its use cases. Therefore the language was designed to be extensible: the const" +"ructs available to build the language are also available for developers to ext" +"end the language and bring it to different domains. Projects such as [the Phoe" +"nix web framework](http://phoenixframework.org) and [the Nerves embedded frame" +"work](http://nerves-project.org) are two of such examples." msgstr "" "Elixir 自らが持つエコシステムを、その多様性の生産や使用事例の拡張を幅広い人々に対して委ねることが、関心を持ち続けてもらう為に必要となります。それ故に" "この言語は拡張性を考慮して設計されており、言語構築に利用できる構成物は、開発者が言語を拡張する為に利用する事も、異分野へ応用する事も可能です。[the Ph" @@ -17367,7 +17363,11 @@ msgstr "" msgid "" "With this simple integration test, we start to see why integration tests may b" "e slow. Not only this test cannot run asynchronously, it also requires the exp" -"ensive setup of stopping and starting the `:kv` application." +"ensive setup of stopping and starting the `:kv` application. In fact, your tes" +"t suite may even fail and run into timeouts. If that's the case, you can tweak" +" the `:gen_tcp.recv(socket, 0)` call to pass a third argument, which is the ti" +"meout in milliseconds. In the next chapter we will learn about application con" +"figuration, which we could use to make the timeout configurable, if desired." msgstr "" msgid "" @@ -19542,9 +19542,11 @@ msgstr "" msgid "" "```elixir\n" "def project do\n" -" [...,\n" -" start_permanent: Mix.env == :prod,\n" -" ...]\n" +" [\n" +" ...,\n" +" start_permanent: Mix.env == :prod,\n" +" ...\n" +" ]\n" "end\n" "```" msgstr "" @@ -20711,8 +20713,7 @@ msgstr "" msgid "" "```elixir\n" -"port = String.to_integer(System.get_env(\"PORT\") || raise \"missing $PORT enviro" -"nment variable\")\n" +"port = String.to_integer(System.get_env(\"PORT\") || \"4040\")\n" "# ...\n" "{Task, fn -> KVServer.accept(port) end}\n" "```" diff --git a/_po/ja/development.po b/_po/ja/development.po index 4e831b7c6..ebe1a79e8 100644 --- a/_po/ja/development.po +++ b/_po/ja/development.po @@ -78,14 +78,9 @@ msgstr "" "ity-and-deprecations.html#content) 。" msgid "" -"Since v1.0, the language development has become more focused. We believe there" -" is a limited amount of features a language can provide without hindering its " -"learning and without causing fragmentation in the community. Therefore the Eli" -"xir team focuses on language features that:" -msgstr "" -"v1.0 以降、この言語の開発に関心が集まるようになりました。私達は、コミュニティの人々の気持ちが離ればなれになったり、学習の妨げになったりする事なく、ある" -"一つの言語が提供できる機能量というものには限りがあると考えています。それ故に私たち Elixir team は言語機能について以下のことに注意を払っています" -"。" +"Since v1.0, the language development has become focused to provide a compact a" +"nd consistent core. The Elixir team focuses on language features that:" +msgstr "v1.0 以降、この言語の開発は小さく一貫したコアを提供することに集中するようになりました。Elixir チームは以下の言語仕様に焦点をあてています。" msgid "" " 1. are necessary for developing the language itself\n" @@ -127,11 +122,11 @@ msgstr "" msgid "" "To remain focused, Elixir trusts its ecosystem to bring diversity and broaden " -"its use cases to a wider audience. Therefore the language was designed to be e" -"xtensible: the constructs available to build the language are also available f" -"or developers to extend the language and bring it to different domains. Projec" -"ts such as [the Phoenix web framework](http://phoenixframework.org) and [the N" -"erves embedded framework](http://nerves-project.org) are two of such examples." +"its use cases. Therefore the language was designed to be extensible: the const" +"ructs available to build the language are also available for developers to ext" +"end the language and bring it to different domains. Projects such as [the Phoe" +"nix web framework](http://phoenixframework.org) and [the Nerves embedded frame" +"work](http://nerves-project.org) are two of such examples." msgstr "" "Elixir 自らが持つエコシステムを、その多様性の生産や使用事例の拡張を幅広い人々に対して委ねることが、関心を持ち続けてもらう為に必要となります。それ故に" "この言語は拡張性を考慮して設計されており、言語構築に利用できる構成物は、開発者が言語を拡張する為に利用する事も、異分野へ応用する事も可能です。[the Ph" diff --git a/_po/ja/development.pot b/_po/ja/development.pot index 2bf4e0373..25d7d6e93 100644 --- a/_po/ja/development.pot +++ b/_po/ja/development.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-09 16:07+0900\n" +"POT-Creation-Date: 2018-09-16 21:14+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -50,7 +50,7 @@ msgid "Elixir v1.0 was released in September 2014 and a new minor version is rel msgstr "" #: ../../development.markdown:19 -msgid "Since v1.0, the language development has become more focused. We believe there is a limited amount of features a language can provide without hindering its learning and without causing fragmentation in the community. Therefore the Elixir team focuses on language features that:" +msgid "Since v1.0, the language development has become focused to provide a compact and consistent core. The Elixir team focuses on language features that:" msgstr "" #: ../../development.markdown:21 @@ -67,7 +67,7 @@ msgid "Community members are welcome to propose new features for Elixir. Before msgstr "" #: ../../development.markdown:28 -msgid "To remain focused, Elixir trusts its ecosystem to bring diversity and broaden its use cases to a wider audience. Therefore the language was designed to be extensible: the constructs available to build the language are also available for developers to extend the language and bring it to different domains. Projects such as [the Phoenix web framework](http://phoenixframework.org) and [the Nerves embedded framework](http://nerves-project.org) are two of such examples." +msgid "To remain focused, Elixir trusts its ecosystem to bring diversity and broaden its use cases. Therefore the language was designed to be extensible: the constructs available to build the language are also available for developers to extend the language and bring it to different domains. Projects such as [the Phoenix web framework](http://phoenixframework.org) and [the Nerves embedded framework](http://nerves-project.org) are two of such examples." msgstr "" #: ../../development.markdown:30 diff --git a/_po/ja/getting-started/mix-otp/docs-tests-and-with.po b/_po/ja/getting-started/mix-otp/docs-tests-and-with.po index f17428aff..ca24214e6 100644 --- a/_po/ja/getting-started/mix-otp/docs-tests-and-with.po +++ b/_po/ja/getting-started/mix-otp/docs-tests-and-with.po @@ -810,7 +810,11 @@ msgstr "" msgid "" "With this simple integration test, we start to see why integration tests may b" "e slow. Not only this test cannot run asynchronously, it also requires the exp" -"ensive setup of stopping and starting the `:kv` application." +"ensive setup of stopping and starting the `:kv` application. In fact, your tes" +"t suite may even fail and run into timeouts. If that's the case, you can tweak" +" the `:gen_tcp.recv(socket, 0)` call to pass a third argument, which is the ti" +"meout in milliseconds. In the next chapter we will learn about application con" +"figuration, which we could use to make the timeout configurable, if desired." msgstr "" msgid "" @@ -824,6 +828,7 @@ msgid "" msgstr "" msgid "" -"In the next chapter, we will finally make our system distributed by adding a b" -"ucket routing mechanism. We'll also learn about application configuration." +"Let's move to the last chapter. We will finally make our system distributed by" +" adding a bucket routing mechanism. We'll also learn about application configu" +"ration." msgstr "" diff --git a/_po/ja/getting-started/mix-otp/docs-tests-and-with.pot b/_po/ja/getting-started/mix-otp/docs-tests-and-with.pot index b369c5e3e..062c4ea7f 100644 --- a/_po/ja/getting-started/mix-otp/docs-tests-and-with.pot +++ b/_po/ja/getting-started/mix-otp/docs-tests-and-with.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-09 15:13+0900\n" +"POT-Creation-Date: 2018-09-16 21:14+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -700,7 +700,7 @@ msgid " 13:44:10.035 [info] Application kv exited: :stopped\n" msgstr "" #: ../../../../getting-started/mix-otp/docs-tests-and-with.markdown:447 -msgid "With this simple integration test, we start to see why integration tests may be slow. Not only this test cannot run asynchronously, it also requires the expensive setup of stopping and starting the `:kv` application." +msgid "With this simple integration test, we start to see why integration tests may be slow. Not only this test cannot run asynchronously, it also requires the expensive setup of stopping and starting the `:kv` application. In fact, your test suite may even fail and run into timeouts. If that's the case, you can tweak the `:gen_tcp.recv(socket, 0)` call to pass a third argument, which is the timeout in milliseconds. In the next chapter we will learn about application configuration, which we could use to make the timeout configurable, if desired." msgstr "" #: ../../../../getting-started/mix-otp/docs-tests-and-with.markdown:449 @@ -708,6 +708,6 @@ msgid "At the end of the day, it is up to you and your team to figure out the be msgstr "" #: ../../../../getting-started/mix-otp/docs-tests-and-with.markdown:451 -msgid "In the next chapter, we will finally make our system distributed by adding a bucket routing mechanism. We'll also learn about application configuration." +msgid "Let's move to the last chapter. We will finally make our system distributed by adding a bucket routing mechanism. We'll also learn about application configuration." msgstr "" diff --git a/_po/ja/getting-started/mix-otp/introduction-to-mix.po b/_po/ja/getting-started/mix-otp/introduction-to-mix.po index 6ac8c4470..3810670b8 100644 --- a/_po/ja/getting-started/mix-otp/introduction-to-mix.po +++ b/_po/ja/getting-started/mix-otp/introduction-to-mix.po @@ -371,7 +371,7 @@ msgstr "" msgid "" "Notice that by running `mix test`, Mix has compiled the source files and gener" "ated the application manifest once again. This happens because Mix supports mu" -"ltiple environments, which we will explore in the next section." +"ltiple environments, which we will discuss later in this chapter." msgstr "" msgid "" @@ -484,7 +484,7 @@ msgid "## Environments" msgstr "" msgid "" -"Mix supports the concept of \"environments\". They allow a developer to customiz" +"Mix provides the concept of \"environments\". They allow a developer to customiz" "e compilation and other options for specific scenarios. By default, Mix unders" "tands three environments:" msgstr "" @@ -496,9 +496,9 @@ msgid "" msgstr "" msgid "" -"The environment applies only to the current project. As we will see later on, " -"any dependency you add to your project will by default run in the `:prod` envi" -"ronment." +"The environment applies only to the current project. As we will see in future " +"chapters, any dependency you add to your project will by default run in the `:" +"prod` environment." msgstr "" msgid "" @@ -511,9 +511,11 @@ msgstr "" msgid "" "```elixir\n" "def project do\n" -" [...,\n" -" start_permanent: Mix.env == :prod,\n" -" ...]\n" +" [\n" +" ...,\n" +" start_permanent: Mix.env == :prod,\n" +" ...\n" +" ]\n" "end\n" "```" msgstr "" diff --git a/_po/ja/getting-started/mix-otp/introduction-to-mix.pot b/_po/ja/getting-started/mix-otp/introduction-to-mix.pot index f0e250d82..c5f7dddde 100644 --- a/_po/ja/getting-started/mix-otp/introduction-to-mix.pot +++ b/_po/ja/getting-started/mix-otp/introduction-to-mix.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-09 15:13+0900\n" +"POT-Creation-Date: 2018-09-16 21:14+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -340,7 +340,7 @@ msgid " Randomized with seed 540224" msgstr "" #: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:203 -msgid "Notice that by running `mix test`, Mix has compiled the source files and generated the application manifest once again. This happens because Mix supports multiple environments, which we will explore in the next section." +msgid "Notice that by running `mix test`, Mix has compiled the source files and generated the application manifest once again. This happens because Mix supports multiple environments, which we will discuss later in this chapter." msgstr "" #: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:205 @@ -434,7 +434,7 @@ msgid "## Environments" msgstr "" #: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:257 -msgid "Mix supports the concept of \"environments\". They allow a developer to customize compilation and other options for specific scenarios. By default, Mix understands three environments:" +msgid "Mix provides the concept of \"environments\". They allow a developer to customize compilation and other options for specific scenarios. By default, Mix understands three environments:" msgstr "" #: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:259 @@ -444,7 +444,7 @@ msgid "* `:dev` - the one in which Mix tasks (like `compile`) run by default\n" msgstr "" #: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:263 -msgid "The environment applies only to the current project. As we will see later on, any dependency you add to your project will by default run in the `:prod` environment." +msgid "The environment applies only to the current project. As we will see in future chapters, any dependency you add to your project will by default run in the `:prod` environment." msgstr "" #: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:265 @@ -454,64 +454,66 @@ msgstr "" #: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:267 msgid "```elixir\n" "def project do\n" -" [...,\n" -" start_permanent: Mix.env == :prod,\n" -" ...]\n" +" [\n" +" ...,\n" +" start_permanent: Mix.env == :prod,\n" +" ...\n" +" ]\n" "end\n" "```" msgstr "" -#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:275 +#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:277 msgid "When true, the `:start_permanent` option starts your application in permanent mode, which means the Erlang VM will crash if your application's supervision tree shuts down. Notice we don't want this behaviour in dev and test because it is useful to keep the VM instance running in those environments for troubleshooting purposes." msgstr "" -#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:277 +#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:279 msgid "Mix will default to the `:dev` environment, except for the `test` task that will default to the `:test` environment. The environment can be changed via the `MIX_ENV` environment variable:" msgstr "" -#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:279 +#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:281 msgid "```console\n" "$ MIX_ENV=prod mix compile\n" "```" msgstr "" -#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:283 +#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:285 msgid "Or on Windows:" msgstr "" -#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:285 +#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:287 msgid "```batch\n" "> set \"MIX_ENV=prod\" && mix compile\n" "```" msgstr "" -#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:289 +#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:291 msgid "> Mix is a build tool and, as such, it is not always expected to be available in production, especially if your team uses explicit build steps. Therefore, it is recommended to access `Mix.env` only in configuration files and inside `mix.exs`, never in your application code (`lib`)." msgstr "" -#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:291 +#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:293 msgid "## Exploring" msgstr "" -#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:293 +#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:295 msgid "There is much more to Mix, and we will continue to explore it as we build our project. A [general overview is available on the Mix documentation](https://hexdocs.pm/mix/). Read [the Mix source code here](https://github.com/elixir-lang/elixir/tree/master/lib/mix)." msgstr "" -#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:295 +#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:297 msgid "Keep in mind that you can always invoke the help task to list all available tasks:" msgstr "" -#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:297 +#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:299 msgid "```console\n" "$ mix help\n" "```" msgstr "" -#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:301 +#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:303 msgid "You can get further information about a particular task by invoking `mix help TASK`." msgstr "" -#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:303 +#: ../../../../getting-started/mix-otp/introduction-to-mix.markdown:305 msgid "Let's write some code!" msgstr "" diff --git a/_po/ja/getting-started/mix-otp/task-and-gen-tcp.po b/_po/ja/getting-started/mix-otp/task-and-gen-tcp.po index 892be4864..130c9cc20 100644 --- a/_po/ja/getting-started/mix-otp/task-and-gen-tcp.po +++ b/_po/ja/getting-started/mix-otp/task-and-gen-tcp.po @@ -279,8 +279,7 @@ msgstr "" msgid "" "```elixir\n" -"port = String.to_integer(System.get_env(\"PORT\") || raise \"missing $PORT enviro" -"nment variable\")\n" +"port = String.to_integer(System.get_env(\"PORT\") || \"4040\")\n" "# ...\n" "{Task, fn -> KVServer.accept(port) end}\n" "```" @@ -288,8 +287,8 @@ msgstr "" msgid "" "Insert these changes in your code and now you may start your application using" -" the following command `PORT=4040 mix run --no-halt`, notice how we are passin" -"g the port as a variable." +" the following command `PORT=4321 mix run --no-halt`, notice how we are passin" +"g the port as a variable, but still defaults to 4040 if none is given." msgstr "" msgid "" diff --git a/_po/ja/getting-started/mix-otp/task-and-gen-tcp.pot b/_po/ja/getting-started/mix-otp/task-and-gen-tcp.pot index 0039ea4fa..7d5f15eae 100644 --- a/_po/ja/getting-started/mix-otp/task-and-gen-tcp.pot +++ b/_po/ja/getting-started/mix-otp/task-and-gen-tcp.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-09-09 16:00+0900\n" +"POT-Creation-Date: 2018-09-16 21:14+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -259,14 +259,14 @@ msgstr "" #: ../../../../getting-started/mix-otp/task-and-gen-tcp.markdown:148 msgid "```elixir\n" -"port = String.to_integer(System.get_env(\"PORT\") || raise \"missing $PORT environment variable\")\n" +"port = String.to_integer(System.get_env(\"PORT\") || \"4040\")\n" "# ...\n" "{Task, fn -> KVServer.accept(port) end}\n" "```" msgstr "" #: ../../../../getting-started/mix-otp/task-and-gen-tcp.markdown:154 -msgid "Insert these changes in your code and now you may start your application using the following command `PORT=4040 mix run --no-halt`, notice how we are passing the port as a variable." +msgid "Insert these changes in your code and now you may start your application using the following command `PORT=4321 mix run --no-halt`, notice how we are passing the port as a variable, but still defaults to 4040 if none is given." msgstr "" #: ../../../../getting-started/mix-otp/task-and-gen-tcp.markdown:156 diff --git a/docs/development.html b/docs/development.html index e56a19d52..24cb0171f 100644 --- a/docs/development.html +++ b/docs/development.html @@ -79,7 +79,7 @@

Development

Elixir v1.0 は 2014 年 9 月にリリースされました。それ以降、マイナーバージョンアップを半年に一度の頻度でリリースしており、毎年度の 1月と 7 月あたりになります。新しいリリースは購読専用の アナウンスメーリングリスト にて完全なCHANGELOGと一緒にアナウンスされます。すべてのセキュリティリリースは “[security]”タグが付けられています。 セキュリティ脆弱性については elixir-security@googlegroups.com に報告するべきです。互換性や廃止された施策についてはこちらに纏めてありますので参考にしてください Compatibility and Deprecation Policies

-

v1.0 以降、この言語の開発に関心が集まるようになりました。私達は、コミュニティの人々の気持ちが離ればなれになったり、学習の妨げになったりする事なく、ある一つの言語が提供できる機能量というものには限りがあると考えています。それ故に私たち Elixir team は言語機能について以下のことに注意を払っています。

+

v1.0 以降、この言語の開発は小さく一貫したコアを提供することに集中するようになりました。Elixir チームは以下の言語仕様に焦点をあてています。

  1. 言語それ自体の開発の為に必要不可欠であること
  2. diff --git a/docs/getting-started/mix-otp/docs-tests-and-with.html b/docs/getting-started/mix-otp/docs-tests-and-with.html index 0cc08c837..47bd58a89 100644 --- a/docs/getting-started/mix-otp/docs-tests-and-with.html +++ b/docs/getting-started/mix-otp/docs-tests-and-with.html @@ -664,11 +664,11 @@

    Running commands

    -

    With this simple integration test, we start to see why integration tests may be slow. Not only this test cannot run asynchronously, it also requires the expensive setup of stopping and starting the :kv application.

    +

    With this simple integration test, we start to see why integration tests may be slow. Not only this test cannot run asynchronously, it also requires the expensive setup of stopping and starting the :kv application. In fact, your test suite may even fail and run into timeouts. If that’s the case, you can tweak the :gen_tcp.recv(socket, 0) call to pass a third argument, which is the timeout in milliseconds. In the next chapter we will learn about application configuration, which we could use to make the timeout configurable, if desired.

    At the end of the day, it is up to you and your team to figure out the best testing strategy for your applications. You need to balance code quality, confidence, and test suite runtime. For example, we may start with testing the server only with integration tests, but if the server continues to grow in future releases, or it becomes a part of the application with frequent bugs, it is important to consider breaking it apart and writing more intensive unit tests that don’t have the weight of an integration test.

    -

    In the next chapter, we will finally make our system distributed by adding a bucket routing mechanism. We’ll also learn about application configuration.

    +

    Let’s move to the last chapter. We will finally make our system distributed by adding a bucket routing mechanism. We’ll also learn about application configuration.

    diff --git a/docs/getting-started/mix-otp/introduction-to-mix.html b/docs/getting-started/mix-otp/introduction-to-mix.html index b353b48c8..303ceb1b5 100644 --- a/docs/getting-started/mix-otp/introduction-to-mix.html +++ b/docs/getting-started/mix-otp/introduction-to-mix.html @@ -445,7 +445,7 @@

    Running tests

    -

    Notice that by running mix test, Mix has compiled the source files and generated the application manifest once again. This happens because Mix supports multiple environments, which we will explore in the next section.

    +

    Notice that by running mix test, Mix has compiled the source files and generated the application manifest once again. This happens because Mix supports multiple environments, which we will discuss later in this chapter.

    Furthermore, you can see that ExUnit prints a dot for each successful test and automatically randomizes tests too. Let’s make the test fail on purpose and see what happens.

    @@ -499,7 +499,7 @@

    Automatic code formatting

    Environments

    -

    Mix supports the concept of “environments”. They allow a developer to customize compilation and other options for specific scenarios. By default, Mix understands three environments:

    +

    Mix provides the concept of “environments”. They allow a developer to customize compilation and other options for specific scenarios. By default, Mix understands three environments:

    • :dev - the one in which Mix tasks (like compile) run by default
    • @@ -507,14 +507,16 @@

      Environments

    • :prod - the one you will use to run your project in production
    -

    The environment applies only to the current project. As we will see later on, any dependency you add to your project will by default run in the :prod environment.

    +

    The environment applies only to the current project. As we will see in future chapters, any dependency you add to your project will by default run in the :prod environment.

    Customization per environment can be done by accessing the Mix.env function in your mix.exs file, which returns the current environment as an atom. That’s what we have used in the :start_permanent options:

    def project do
    -  [...,
    -   start_permanent: Mix.env == :prod,
    -   ...]
    +  [
    +    ...,
    +    start_permanent: Mix.env == :prod,
    +    ...
    +  ]
     end
     
    diff --git a/docs/getting-started/mix-otp/task-and-gen-tcp.html b/docs/getting-started/mix-otp/task-and-gen-tcp.html index e6c2a8c4e..7f44e6c87 100644 --- a/docs/getting-started/mix-otp/task-and-gen-tcp.html +++ b/docs/getting-started/mix-otp/task-and-gen-tcp.html @@ -371,13 +371,13 @@

    Tasks

    With this change, we are saying that we want to run KVServer.accept(4040) as a task. We are hardcoding the port for now but this could be changed in a few ways, for example, by reading the port out of the system environment when starting the application:

    -
    port = String.to_integer(System.get_env("PORT") || raise "missing $PORT environment variable")
    +
    port = String.to_integer(System.get_env("PORT") || "4040")
     # ...
     {Task, fn -> KVServer.accept(port) end}
     
    -

    Insert these changes in your code and now you may start your application using the following command PORT=4040 mix run --no-halt, notice how we are passing the port as a variable.

    +

    Insert these changes in your code and now you may start your application using the following command PORT=4321 mix run --no-halt, notice how we are passing the port as a variable, but still defaults to 4040 if none is given.

    Now that the server is part of the supervision tree, it should start automatically when we run the application. Start your server, now passing the port, and once again use the telnet client to make sure that everything still works:

    diff --git a/ja/development.markdown b/ja/development.markdown index b2b2e2ac6..5ac032836 100644 --- a/ja/development.markdown +++ b/ja/development.markdown @@ -16,7 +16,7 @@ Elixir のソースコードは[Apache 2 ライセンス](https://github.com/eli Elixir v1.0 は 2014 年 9 月にリリースされました。それ以降、マイナーバージョンアップを半年に一度の頻度でリリースしており、毎年度の 1月と 7 月あたりになります。新しいリリースは購読専用の [アナウンスメーリングリスト](https://groups.google.com/group/elixir-lang-ann) にて完全なCHANGELOGと一緒にアナウンスされます。すべてのセキュリティリリースは ["[security]"タグが付けられています](https://groups.google.com/forum/#!searchin/elixir-lang-ann/%5Bsecurity%5D%7Csort:date)。 セキュリティ脆弱性については [elixir-security@googlegroups.com](mailto:elixir-security@googlegroups.com) に報告するべきです。互換性や廃止された施策についてはこちらに纏めてありますので参考にしてください [Compatibility and Deprecation Policies](https://hexdocs.pm/elixir/compatibility-and-deprecations.html#content) 。 -v1.0 以降、この言語の開発に関心が集まるようになりました。私達は、コミュニティの人々の気持ちが離ればなれになったり、学習の妨げになったりする事なく、ある一つの言語が提供できる機能量というものには限りがあると考えています。それ故に私たち Elixir team は言語機能について以下のことに注意を払っています。 +v1.0 以降、この言語の開発は小さく一貫したコアを提供することに集中するようになりました。Elixir チームは以下の言語仕様に焦点をあてています。 1. 言語それ自体の開発の為に必要不可欠であること 2. その言語が持ってこそ最大に活かせる機能において、コミュニティに重要な特徴的概念をもたらすこと diff --git a/ja/getting-started/mix-otp/docs-tests-and-with.markdown b/ja/getting-started/mix-otp/docs-tests-and-with.markdown index 3bf3d73fc..bc43bed9a 100644 --- a/ja/getting-started/mix-otp/docs-tests-and-with.markdown +++ b/ja/getting-started/mix-otp/docs-tests-and-with.markdown @@ -444,8 +444,8 @@ In case the test crashes, you will see a report as follows: 13:44:10.035 [info] Application kv exited: :stopped ``` -With this simple integration test, we start to see why integration tests may be slow. Not only this test cannot run asynchronously, it also requires the expensive setup of stopping and starting the `:kv` application. +With this simple integration test, we start to see why integration tests may be slow. Not only this test cannot run asynchronously, it also requires the expensive setup of stopping and starting the `:kv` application. In fact, your test suite may even fail and run into timeouts. If that's the case, you can tweak the `:gen_tcp.recv(socket, 0)` call to pass a third argument, which is the timeout in milliseconds. In the next chapter we will learn about application configuration, which we could use to make the timeout configurable, if desired. At the end of the day, it is up to you and your team to figure out the best testing strategy for your applications. You need to balance code quality, confidence, and test suite runtime. For example, we may start with testing the server only with integration tests, but if the server continues to grow in future releases, or it becomes a part of the application with frequent bugs, it is important to consider breaking it apart and writing more intensive unit tests that don't have the weight of an integration test. -In the next chapter, we will finally make our system distributed by adding a bucket routing mechanism. We'll also learn about application configuration. +Let's move to the last chapter. We will finally make our system distributed by adding a bucket routing mechanism. We'll also learn about application configuration. diff --git a/ja/getting-started/mix-otp/introduction-to-mix.markdown b/ja/getting-started/mix-otp/introduction-to-mix.markdown index a223d73a5..04020d822 100644 --- a/ja/getting-started/mix-otp/introduction-to-mix.markdown +++ b/ja/getting-started/mix-otp/introduction-to-mix.markdown @@ -200,7 +200,7 @@ This file will be required by Mix every time before we run our tests. We can run Randomized with seed 540224 -Notice that by running `mix test`, Mix has compiled the source files and generated the application manifest once again. This happens because Mix supports multiple environments, which we will explore in the next section. +Notice that by running `mix test`, Mix has compiled the source files and generated the application manifest once again. This happens because Mix supports multiple environments, which we will discuss later in this chapter. Furthermore, you can see that ExUnit prints a dot for each successful test and automatically randomizes tests too. Let's make the test fail on purpose and see what happens. @@ -254,21 +254,23 @@ You can learn more about the code formatter by checking [the format task documen ## Environments -Mix supports the concept of "environments". They allow a developer to customize compilation and other options for specific scenarios. By default, Mix understands three environments: +Mix provides the concept of "environments". They allow a developer to customize compilation and other options for specific scenarios. By default, Mix understands three environments: * `:dev` - the one in which Mix tasks (like `compile`) run by default * `:test` - used by `mix test` * `:prod` - the one you will use to run your project in production -The environment applies only to the current project. As we will see later on, any dependency you add to your project will by default run in the `:prod` environment. +The environment applies only to the current project. As we will see in future chapters, any dependency you add to your project will by default run in the `:prod` environment. Customization per environment can be done by accessing [the `Mix.env` function](https://hexdocs.pm/mix/Mix.html#env/0) in your `mix.exs` file, which returns the current environment as an atom. That's what we have used in the `:start_permanent` options: ```elixir def project do - [..., - start_permanent: Mix.env == :prod, - ...] + [ + ..., + start_permanent: Mix.env == :prod, + ... + ] end ``` diff --git a/ja/getting-started/mix-otp/task-and-gen-tcp.markdown b/ja/getting-started/mix-otp/task-and-gen-tcp.markdown index bc3d5b821..13869dd53 100644 --- a/ja/getting-started/mix-otp/task-and-gen-tcp.markdown +++ b/ja/getting-started/mix-otp/task-and-gen-tcp.markdown @@ -146,12 +146,12 @@ As usual, we've passed a two-element tuple as a child specification, which in tu With this change, we are saying that we want to run `KVServer.accept(4040)` as a task. We are hardcoding the port for now but this could be changed in a few ways, for example, by reading the port out of the system environment when starting the application: ```elixir -port = String.to_integer(System.get_env("PORT") || raise "missing $PORT environment variable") +port = String.to_integer(System.get_env("PORT") || "4040") # ... {Task, fn -> KVServer.accept(port) end} ``` -Insert these changes in your code and now you may start your application using the following command `PORT=4040 mix run --no-halt`, notice how we are passing the port as a variable. +Insert these changes in your code and now you may start your application using the following command `PORT=4321 mix run --no-halt`, notice how we are passing the port as a variable, but still defaults to 4040 if none is given. Now that the server is part of the supervision tree, it should start automatically when we run the application. Start your server, now passing the port, and once again use the `telnet` client to make sure that everything still works: