From b76a68e622b2db6474acdd206bbdfb2e66fefd8f Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 20 Jan 2021 14:03:26 +0300 Subject: 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. --- src/components/user_card/user_card.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/components/user_card/user_card.vue') 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}`) }} Date: Fri, 12 Feb 2021 12:01:16 +0300 Subject: Make bot label localizable --- src/components/user_card/user_card.vue | 2 +- src/i18n/en.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/components/user_card/user_card.vue') diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 773f764a..c6c4dfee 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -89,7 +89,7 @@ v-if="user.bot" class="alert user-role" > - bot + {{ $t('user_card.bot') }} diff --git a/src/i18n/en.json b/src/i18n/en.json index 1025a8e1..3946f3cd 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -716,6 +716,7 @@ "mute_progress": "Muting…", "hide_repeats": "Hide repeats", "show_repeats": "Show repeats", + "bot": "Bot", "admin_menu": { "moderation": "Moderation", "grant_admin": "Grant Admin", -- cgit v1.2.3-70-g09d2 From 6acf812101f79b450dc4efd2da051c634dd18621 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 13 Feb 2021 16:34:43 +0300 Subject: User card: use general.role instead of card-specific roles Also removes admin_menu.roles from some localizations since it is not used anywhere --- src/components/user_card/user_card.vue | 2 +- src/i18n/en.json | 4 ---- src/i18n/it.json | 12 ++++++------ src/i18n/pt.json | 13 +++++++------ src/i18n/ru.json | 12 ++++++------ src/i18n/uk.json | 12 ++++++------ 6 files changed, 26 insertions(+), 29 deletions(-) (limited to 'src/components/user_card/user_card.vue') diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index c6c4dfee..572943b5 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" > - {{ $t(`user_card.roles.${visibleRole}`) }} + {{ $t(`general.role.${visibleRole}`) }} Date: Fri, 26 Feb 2021 16:23:11 +0200 Subject: separate screen_name and screen_name_ui with decoded punycode --- CHANGELOG.md | 1 + src/components/basic_user_card/basic_user_card.vue | 2 +- src/components/chat/chat.js | 2 +- src/components/chat_title/chat_title.js | 2 +- src/components/emoji_input/suggestor.js | 4 ++-- src/components/notification/notification.vue | 10 +++++----- src/components/status/status.js | 4 ++-- src/components/status/status.vue | 6 +++--- src/components/user_avatar/user_avatar.vue | 4 ++-- src/components/user_card/user_card.vue | 4 ++-- src/components/user_list_popover/user_list_popover.vue | 2 +- src/components/user_reporting_modal/user_reporting_modal.vue | 2 +- src/services/entity_normalizer/entity_normalizer.service.js | 5 +++-- .../specs/services/entity_normalizer/entity_normalizer.spec.js | 2 +- 14 files changed, 26 insertions(+), 24 deletions(-) (limited to 'src/components/user_card/user_card.vue') diff --git a/CHANGELOG.md b/CHANGELOG.md index 2685fd32..20d96f98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Fixed missing highlighted border in expanded conversations again - Fixed some UI jumpiness when opening images particularly in chat view - Fixed chat unread badge looking weird +- Fixed punycode names not working properly ### Changed - Display 'people voted' instead of 'votes' for multi-choice polls diff --git a/src/components/basic_user_card/basic_user_card.vue b/src/components/basic_user_card/basic_user_card.vue index 9e410610..c53f6a9c 100644 --- a/src/components/basic_user_card/basic_user_card.vue +++ b/src/components/basic_user_card/basic_user_card.vue @@ -42,7 +42,7 @@ class="basic-user-card-screen-name" :to="userProfileLink(user)" > - @{{ user.screen_name }} + @{{ user.screen_name_ui }} diff --git a/src/components/chat/chat.js b/src/components/chat/chat.js index 2780be75..b54f5fb2 100644 --- a/src/components/chat/chat.js +++ b/src/components/chat/chat.js @@ -73,7 +73,7 @@ const Chat = { }, formPlaceholder () { if (this.recipient) { - return this.$t('chats.message_user', { nickname: this.recipient.screen_name }) + return this.$t('chats.message_user', { nickname: this.recipient.screen_name_ui }) } else { return '' } diff --git a/src/components/chat_title/chat_title.js b/src/components/chat_title/chat_title.js index e424bb1f..edfbe7a4 100644 --- a/src/components/chat_title/chat_title.js +++ b/src/components/chat_title/chat_title.js @@ -12,7 +12,7 @@ export default Vue.component('chat-title', { ], computed: { title () { - return this.user ? this.user.screen_name : '' + return this.user ? this.user.screen_name_ui : '' }, htmlTitle () { return this.user ? this.user.name_html : '' diff --git a/src/components/emoji_input/suggestor.js b/src/components/emoji_input/suggestor.js index 14a2b41e..e8efbd1e 100644 --- a/src/components/emoji_input/suggestor.js +++ b/src/components/emoji_input/suggestor.js @@ -116,8 +116,8 @@ export const suggestUsers = ({ dispatch, state }) => { return diff + nameAlphabetically + screenNameAlphabetically /* eslint-disable camelcase */ - }).map(({ screen_name, name, profile_image_url_original }) => ({ - displayText: screen_name, + }).map(({ screen_name, screen_name_ui, name, profile_image_url_original }) => ({ + displayText: screen_name_ui, detailText: name, imageUrl: profile_image_url_original, replacement: '@' + screen_name + ' ' diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index f56aa977..0081dee4 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -11,7 +11,7 @@ > - {{ notification.from_profile.screen_name }} + {{ notification.from_profile.screen_name_ui }}