-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cs] #651 - Improves the notification messages shown when the occupan…
…t affiliation and role has been changed
- Loading branch information
Showing
3 changed files
with
35 additions
and
35 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 | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -36,7 +36,7 @@ func displayAffiliationUpdateMessage(d affiliationUpdateDisplayer, beforeReasonM | |||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
if reason := d.updateReason(); reason != "" { | ||||||||||||||||||||||||||
message = i18n.Localf("%s because: %s", message, reason) | ||||||||||||||||||||||||||
message = i18n.Localf("%s The reason given was: %s.", message, reason) | ||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
return message | ||||||||||||||||||||||||||
|
@@ -86,10 +86,10 @@ func (d *affiliationUpdateDisplayData) updateReason() string { | |||||||||||||||||||||||||
|
||||||||||||||||||||||||||
func (d *affiliationUpdateDisplayData) displayForAffiliationRemoved() string { | ||||||||||||||||||||||||||
if d.actor == "" { | ||||||||||||||||||||||||||
return i18n.Localf("The %s position of %s was removed", | ||||||||||||||||||||||||||
return i18n.Localf("The %s position of %s was removed.", | ||||||||||||||||||||||||||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
azlancpool
Contributor
|
func getAffiliationRemovedSuccessMessage(nickname string, previousAffiliation data.Affiliation) string { | |
switch { | |
case previousAffiliation.IsOwner(): | |
return i18n.Localf("%[1]s is not an owner anymore.", nickname) | |
case previousAffiliation.IsAdmin(): | |
return i18n.Localf("%[1]s is not an administrator anymore.", nickname) | |
case previousAffiliation.IsMember(): | |
return i18n.Localf("%[1]s is not a member anymore.", nickname) | |
default: | |
return i18n.Localf("%[1]s is not banned anymore.", nickname) | |
} | |
} |
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
2 comments
on commit 09d2b4b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is part of #644
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments fixed
Didn't we say that in our user testing that positions can't be removed, it doesn't make sense!