Skip to content

Commit

Permalink
Merge pull request #2078 from CSCfi/missing-translation
Browse files Browse the repository at this point in the history
fix: localization of already-member error
  • Loading branch information
Macroz committed Mar 24, 2020
2 parents c25aee2 + 6af437d commit 6ea90b6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion resources/translations/en.edn
Expand Up @@ -16,7 +16,8 @@
:close-intro [:div.intro [:p "Note that if the application is closed, it cannot be opened again."]]
:comment "Comment"
:decide "Decide"
:errors {:disabled-catalogue-item "Resource no longer available."
:errors {:already-member "User is already a member of this application"
:disabled-catalogue-item "Resource no longer available."
:invalid-token [:div [:p "Joining the application failed."] [:p "Check the invitation token " [:code "%1"]]]
:licenses-not-accepted "Terms of use not accepted."
:submission-failed "Submission failed. Check the following errors:"}
Expand Down
3 changes: 2 additions & 1 deletion resources/translations/fi.edn
Expand Up @@ -16,7 +16,8 @@
:close-intro [:div.intro [:p "Huomaa, että jos hakemus suljetaan, sitä ei voida avata uudelleen."]]
:comment "Kommentti"
:decide "Päätä"
:errors {:disabled-catalogue-item "Resurssit eivät ole enää saatavilla."
:errors {:already-member "Käyttäjä on jo tämän hakemuksen jäsen"
:disabled-catalogue-item "Resurssit eivät ole enää saatavilla."
:invalid-token [:div [:p "Hakemukseen liittyminen epäonnistui."] [:p "Tarkista kutsukoodi " [:code "%1"]]]
:licenses-not-accepted "Käyttöehtoja ei ole hyväksytty."
:submission-failed "Lähettäminen epäonnistui. Tarkasta seuraavat virheet:"}
Expand Down
2 changes: 1 addition & 1 deletion src/clj/rems/application/commands.clj
Expand Up @@ -254,7 +254,7 @@

(defn already-member-error [application userid]
(when (member? userid application)
{:errors [{:type :already-member :application-id (:application/id application)}]}))
{:errors [{:type :t.actions.errors/already-member :userid userid :application-id (:application/id application)}]}))

(defn- ok-with-data [data events]
(assoc data :events events))
Expand Down
2 changes: 1 addition & 1 deletion test/clj/rems/application/test_commands.clj
Expand Up @@ -1050,7 +1050,7 @@
:event/actor applicant-user-id
:application/id app-id
:application/member {:userid "somebody"}}])]
(is (= {:errors [{:type :already-member :application-id app-id}]}
(is (= {:errors [{:type :t.actions.errors/already-member :userid "somebody" :application-id app-id}]}
(fail-command application
{:type :application.command/accept-invitation
:actor "somebody"
Expand Down

0 comments on commit 6ea90b6

Please sign in to comment.