-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from solov9ev/feature/101-add-i18n-support
Add I18N support.
- Loading branch information
Showing
9 changed files
with
253 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
defmodule Torch.Gettext do | ||
@moduledoc """ | ||
A module providing Internationalization with a gettext-based API. | ||
By using [Gettext](https://hexdocs.pm/gettext), | ||
your module gains a set of macros for translations, for example: | ||
import ExchangeWeb.Gettext | ||
# Simple translation | ||
gettext("Here is the string to translate") | ||
# Plural translation | ||
ngettext("Here is the string to translate", | ||
"Here are the strings to translate", | ||
3) | ||
# Domain-based translation | ||
dgettext("errors", "Here is the error message to translate") | ||
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage. | ||
""" | ||
use Gettext, otp_app: :torch | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
## This file is a PO Template file. | ||
## | ||
## `msgid`s here are often extracted from source code. | ||
## Add new translations manually only if they're dynamic | ||
## translations that can't be statically extracted. | ||
## | ||
## Run `mix gettext.extract` to bring this file up to | ||
## date. Leave `msgstr`s empty as changing them here as no | ||
## effect: edit them in PO (`.po`) files instead. | ||
msgid "" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/pagination_view.ex:29 | ||
msgid "< Prev" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/pagination_view.ex:47 | ||
msgid "Next >" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:29 | ||
#: lib/torch/views/filter_view.ex:174 | ||
msgid "Choose one" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:50 | ||
#: lib/torch/views/filter_view.ex:71 | ||
msgid "Equals" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:49 | ||
msgid "Contains" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:72 | ||
msgid "Greater Than" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:73 | ||
msgid "Greater Than Or Equal" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:74 | ||
msgid "Less Than" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:139 | ||
msgid "start" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:146 | ||
msgid "end" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:185 | ||
msgid "Select Start Date" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:196 | ||
msgid "Select End Date" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#, elixir-format | ||
#: lib/torch/views/pagination_view.ex:29 | ||
msgid "< Prev" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/pagination_view.ex:47 | ||
msgid "Next >" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:29 lib/torch/views/filter_view.ex:174 | ||
msgid "Choose one" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:50 lib/torch/views/filter_view.ex:71 | ||
msgid "Equals" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:49 | ||
msgid "Contains" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:72 | ||
msgid "Greater Than" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:73 | ||
msgid "Greater Than Or Equal" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:74 | ||
msgid "Less Than" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:139 | ||
msgid "start" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:146 | ||
msgid "end" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:185 | ||
msgid "Select Start Date" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:196 | ||
msgid "Select End Date" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#, elixir-format | ||
#: lib/torch/views/pagination_view.ex:29 | ||
msgid "< Prev" | ||
msgstr "< Предыдущая" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/pagination_view.ex:47 | ||
msgid "Next >" | ||
msgstr "Следующая >" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:29 lib/torch/views/filter_view.ex:174 | ||
msgid "Choose one" | ||
msgstr "Выберите один элемент" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:50 lib/torch/views/filter_view.ex:71 | ||
msgid "Equals" | ||
msgstr "Равно" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:49 | ||
msgid "Contains" | ||
msgstr "Содержит" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:72 | ||
msgid "Greater Than" | ||
msgstr "Больше" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:73 | ||
msgid "Greater Than Or Equal" | ||
msgstr "Больше или равно" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:74 | ||
msgid "Less Than" | ||
msgstr "Меньше" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:139 | ||
msgid "start" | ||
msgstr "начало" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:146 | ||
msgid "end" | ||
msgstr "конец" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:185 | ||
msgid "Select Start Date" | ||
msgstr "Выберите дату начала" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:196 | ||
msgid "Select End Date" | ||
msgstr "Выберите дату окончания" |
Oops, something went wrong.