-
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.
Allow configuring a messages backend
- Loading branch information
1 parent
2651a5d
commit 04f9b65
Showing
9 changed files
with
257 additions
and
56 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
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,24 @@ | ||
defmodule Torch.MessagesBackend do | ||
@moduledoc """ | ||
Provides messages for different parts of the package. Can | ||
also be overridden to include custom translations. | ||
""" | ||
|
||
import Torch.Gettext, only: [dgettext: 2] | ||
|
||
def message("Contains"), do: dgettext("default", "Contains") | ||
def message("Equals"), do: dgettext("default", "Equals") | ||
def message("Choose one"), do: dgettext("default", "Choose one") | ||
def message("Before"), do: dgettext("default", "Before") | ||
def message("After"), do: dgettext("default", "After") | ||
def message("Greater Than"), do: dgettext("default", "Greater Than") | ||
def message("Greater Than Or Equal"), do: dgettext("default", "Greater Than Or Equal") | ||
def message("Less Than"), do: dgettext("default", "Less Than") | ||
def message("start"), do: dgettext("default", "start") | ||
def message("end"), do: dgettext("default", "end") | ||
def message("Select Date"), do: dgettext("default", "Select Date") | ||
def message("Select Start Date"), do: dgettext("default", "Select Start Date") | ||
def message("Select End Date"), do: dgettext("default", "Select End Date") | ||
def message("< Prev"), do: dgettext("default", "< Prev") | ||
def message("Next >"), do: dgettext("default", "Next >") | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,74 @@ | ||
#, elixir-format | ||
#: lib/torch/views/pagination_view.ex:29 | ||
#: lib/torch/messages_backend.ex:17 | ||
msgid "< Prev" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/pagination_view.ex:47 | ||
#: lib/torch/messages_backend.ex:18 | ||
msgid "Next >" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:29 lib/torch/views/filter_view.ex:174 | ||
#: lib/torch/messages_backend.ex:6 | ||
msgid "Choose one" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:50 lib/torch/views/filter_view.ex:71 | ||
#: lib/torch/messages_backend.ex:5 | ||
msgid "Equals" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:49 | ||
#: lib/torch/messages_backend.ex:4 | ||
msgid "Contains" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:72 | ||
#: lib/torch/messages_backend.ex:9 | ||
msgid "Greater Than" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:73 | ||
#: lib/torch/messages_backend.ex:10 | ||
msgid "Greater Than Or Equal" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:74 | ||
#: lib/torch/messages_backend.ex:11 | ||
msgid "Less Than" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:139 | ||
#: lib/torch/messages_backend.ex:12 | ||
msgid "start" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:146 | ||
#: lib/torch/messages_backend.ex:13 | ||
msgid "end" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:185 | ||
#: lib/torch/messages_backend.ex:15 | ||
msgid "Select Start Date" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/views/filter_view.ex:196 | ||
#: lib/torch/messages_backend.ex:16 | ||
msgid "Select End Date" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/messages_backend.ex:8 | ||
msgid "After" | ||
msgstr "" | ||
|
||
#, elixir-format | ||
#: lib/torch/messages_backend.ex:7 | ||
msgid "Before" | ||
msgstr "" | ||
|
||
#, elixir-format, fuzzy | ||
#: lib/torch/messages_backend.ex:14 | ||
msgid "Select Date" | ||
msgstr "" |
Oops, something went wrong.