diff options
| author | rinpatch <rinpatch@sdf.org> | 2021-01-20 14:03:26 +0300 |
|---|---|---|
| committer | rinpatch <rinpatch@sdf.org> | 2021-01-20 14:04:00 +0300 |
| commit | b76a68e622b2db6474acdd206bbdfb2e66fefd8f (patch) | |
| tree | f82072ffb72337aa0e2e96162cc02338e4e3b395 | |
| parent | fe78ed78fdc95bb5dac4d11136673da4e5e57f4b (diff) | |
UserCard: Make user roles translateable
I did not add a translation for my native language in this patch because
I am not sure how weblate would react, but I did add it locally and it
seems to work.
| -rw-r--r-- | src/components/user_card/user_card.vue | 3 | ||||
| -rw-r--r-- | src/i18n/en.json | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 16dd5249..773f764a 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -83,7 +83,7 @@ v-if="!!visibleRole" class="alert user-role" > - {{ visibleRole }} + {{ $t(`user_card.roles.${visibleRole}`) }} </span> <span v-if="user.bot" @@ -507,7 +507,6 @@ .user-role { flex: none; - text-transform: capitalize; color: $fallback--text; color: var(--alertNeutralText, $fallback--text); background-color: $fallback--fg; diff --git a/src/i18n/en.json b/src/i18n/en.json index 26dd6144..16a368b1 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -729,6 +729,10 @@ "quarantine": "Disallow user posts from federating", "delete_user": "Delete user", "delete_user_confirmation": "Are you absolutely sure? This action cannot be undone." + }, + "roles": { + "admin": "Admin", + "moderator": "Moderator" } }, "user_profile": { |
