Skip to content

Commit

Permalink
Correct pattern matching (#16)
Browse files Browse the repository at this point in the history
* Correct pattern matching

* Add missing gettext message
  • Loading branch information
doomspork authored Jan 21, 2019
1 parent 5cbf0cb commit 83dcbf1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/admissions/registrar.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule Admissions.Registrar do
end

defp contributor?(client, nickname, org, repo) do
with {_status_code, contributors, _http_response} <- Contributors.list(client, org, repo)
with contributors when is_list(contributors) <- Contributors.list(client, org, repo)
do
Enum.any?(contributors, &(Map.get(&1, "login") == nickname))
else
Expand Down
4 changes: 2 additions & 2 deletions priv/gettext/default.pot
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ msgstr ""

#, elixir-format
#: lib/admissions_web/templates/registrar/eligible.html.eex:2
msgid "eligible_title"
msgid "eligible_title %{nickname}"
msgstr ""

#, elixir-format
#: lib/admissions_web/templates/registrar/ineligible.html.eex:2
msgid "eligible_title %{nickname}"
msgid "ineligible_title"
msgstr ""
5 changes: 5 additions & 0 deletions priv/gettext/en/LC_MESSAGES/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@ msgstr "Thank you for your contributions, this wouldn’t be the same without yo
#: lib/admissions_web/templates/registrar/ineligible.html.eex:2
msgid "eligible_title %{nickname}"
msgstr "🎉 You're eligible, %{nickname}!"

#, elixir-format
#: lib/admissions_web/templates/registrar/ineligible.html.eex:2
msgid "ineligible_title"
msgstr "Currently ineligible"

0 comments on commit 83dcbf1

Please sign in to comment.