瀏覽代碼

Fix hashtag link to directory in AdminUI (#12005)

* Fixed not to generate link if no user used hashtag in directory

* Added missing translation for AdminUI custom emojis

* run yarn manage:translations en
master^2
mayaeh 4 年之前
committed by Eugen Rochko
父節點
當前提交
b258583d2b
共有 4 個檔案被更改,包括 43 行新增78 行删除
  1. +32
    -72
      app/javascript/mastodon/locales/defaultMessages.json
  2. +2
    -3
      app/javascript/mastodon/locales/en.json
  3. +8
    -3
      app/views/admin/tags/show.html.haml
  4. +1
    -0
      config/locales/en.yml

+ 32
- 72
app/javascript/mastodon/locales/defaultMessages.json 查看文件

@@ -239,16 +239,20 @@
"id": "poll.voted" "id": "poll.voted"
}, },
{ {
"defaultMessage": "{count, plural, one {# person} other {# people}}",
"id": "poll.total_people"
},
{
"defaultMessage": "{count, plural, one {# vote} other {# votes}}",
"id": "poll.total_votes"
},
{
"defaultMessage": "Vote", "defaultMessage": "Vote",
"id": "poll.vote" "id": "poll.vote"
}, },
{ {
"defaultMessage": "Refresh", "defaultMessage": "Refresh",
"id": "poll.refresh" "id": "poll.refresh"
},
{
"defaultMessage": "{count, plural, one {# vote} other {# votes}}",
"id": "poll.total_votes"
} }
], ],
"path": "app/javascript/mastodon/components/poll.json" "path": "app/javascript/mastodon/components/poll.json"
@@ -499,24 +503,12 @@
"id": "confirmations.redraft.message" "id": "confirmations.redraft.message"
}, },
{ {
"defaultMessage": "Block",
"id": "confirmations.block.confirm"
},
{
"defaultMessage": "Reply", "defaultMessage": "Reply",
"id": "confirmations.reply.confirm" "id": "confirmations.reply.confirm"
}, },
{ {
"defaultMessage": "Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?", "defaultMessage": "Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?",
"id": "confirmations.reply.message" "id": "confirmations.reply.message"
},
{
"defaultMessage": "Block & Report",
"id": "confirmations.block.block_and_report"
},
{
"defaultMessage": "Are you sure you want to block {name}?",
"id": "confirmations.block.message"
} }
], ],
"path": "app/javascript/mastodon/containers/status_container.json" "path": "app/javascript/mastodon/containers/status_container.json"
@@ -554,26 +546,14 @@
"id": "confirmations.unfollow.confirm" "id": "confirmations.unfollow.confirm"
}, },
{ {
"defaultMessage": "Block",
"id": "confirmations.block.confirm"
},
{
"defaultMessage": "Hide entire domain", "defaultMessage": "Hide entire domain",
"id": "confirmations.domain_block.confirm" "id": "confirmations.domain_block.confirm"
}, },
{ {
"defaultMessage": "Block & Report",
"id": "confirmations.block.block_and_report"
},
{
"defaultMessage": "Are you sure you want to unfollow {name}?", "defaultMessage": "Are you sure you want to unfollow {name}?",
"id": "confirmations.unfollow.message" "id": "confirmations.unfollow.message"
}, },
{ {
"defaultMessage": "Are you sure you want to block {name}?",
"id": "confirmations.block.message"
},
{
"defaultMessage": "Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.", "defaultMessage": "Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain in any public timelines or your notifications. Your followers from that domain will be removed.",
"id": "confirmations.domain_block.message" "id": "confirmations.domain_block.message"
} }
@@ -1137,15 +1117,6 @@
{ {
"descriptors": [ "descriptors": [
{ {
"defaultMessage": "Uploading...",
"id": "upload_progress.label"
}
],
"path": "app/javascript/mastodon/features/compose/components/upload_progress.json"
},
{
"descriptors": [
{
"defaultMessage": "Delete", "defaultMessage": "Delete",
"id": "upload_form.undo" "id": "upload_form.undo"
}, },
@@ -1636,6 +1607,10 @@
{ {
"descriptors": [ "descriptors": [
{ {
"defaultMessage": "Basic",
"id": "home.column_settings.basic"
},
{
"defaultMessage": "Show boosts", "defaultMessage": "Show boosts",
"id": "home.column_settings.show_reblogs" "id": "home.column_settings.show_reblogs"
}, },
@@ -2017,14 +1992,6 @@
"id": "notifications.column_settings.push" "id": "notifications.column_settings.push"
}, },
{ {
"defaultMessage": "Basic",
"id": "home.column_settings.basic"
},
{
"defaultMessage": "Update in real-time",
"id": "home.column_settings.update_live"
},
{
"defaultMessage": "Quick filter bar", "defaultMessage": "Quick filter bar",
"id": "notifications.column_settings.filter_bar.category" "id": "notifications.column_settings.filter_bar.category"
}, },
@@ -2083,10 +2050,6 @@
{ {
"descriptors": [ "descriptors": [
{ {
"defaultMessage": "and {count, plural, one {# other} other {# others}}",
"id": "notification.and_n_others"
},
{
"defaultMessage": "{name} followed you", "defaultMessage": "{name} followed you",
"id": "notification.follow" "id": "notification.follow"
}, },
@@ -2274,24 +2237,12 @@
"id": "confirmations.redraft.message" "id": "confirmations.redraft.message"
}, },
{ {
"defaultMessage": "Block",
"id": "confirmations.block.confirm"
},
{
"defaultMessage": "Reply", "defaultMessage": "Reply",
"id": "confirmations.reply.confirm" "id": "confirmations.reply.confirm"
}, },
{ {
"defaultMessage": "Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?", "defaultMessage": "Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?",
"id": "confirmations.reply.message" "id": "confirmations.reply.message"
},
{
"defaultMessage": "Block & Report",
"id": "confirmations.block.block_and_report"
},
{
"defaultMessage": "Are you sure you want to block {name}?",
"id": "confirmations.block.message"
} }
], ],
"path": "app/javascript/mastodon/features/status/containers/detailed_status_container.json" "path": "app/javascript/mastodon/features/status/containers/detailed_status_container.json"
@@ -2315,10 +2266,6 @@
"id": "confirmations.redraft.message" "id": "confirmations.redraft.message"
}, },
{ {
"defaultMessage": "Block",
"id": "confirmations.block.confirm"
},
{
"defaultMessage": "Show more for all", "defaultMessage": "Show more for all",
"id": "status.show_more_all" "id": "status.show_more_all"
}, },
@@ -2337,21 +2284,30 @@
{ {
"defaultMessage": "Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?", "defaultMessage": "Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?",
"id": "confirmations.reply.message" "id": "confirmations.reply.message"
}
],
"path": "app/javascript/mastodon/features/status/index.json"
},
{
"descriptors": [
{
"defaultMessage": "Are you sure you want to block {name}?",
"id": "confirmations.block.message"
}, },
{ {
"defaultMessage": "Block & Report",
"id": "confirmations.block.block_and_report"
"defaultMessage": "Cancel",
"id": "confirmation_modal.cancel"
}, },
{ {
"defaultMessage": "Toot",
"id": "column.status"
"defaultMessage": "Block & Report",
"id": "confirmations.block.block_and_report"
}, },
{ {
"defaultMessage": "Are you sure you want to block {name}?",
"id": "confirmations.block.message"
"defaultMessage": "Block",
"id": "confirmations.block.confirm"
} }
], ],
"path": "app/javascript/mastodon/features/status/index.json"
"path": "app/javascript/mastodon/features/ui/components/block_modal.json"
}, },
{ {
"descriptors": [ "descriptors": [
@@ -2570,6 +2526,10 @@
"id": "confirmations.mute.message" "id": "confirmations.mute.message"
}, },
{ {
"defaultMessage": "This will hide posts from them and posts mentioning them, but it will still allow them to see your posts follow you.",
"id": "confirmations.mute.explanation"
},
{
"defaultMessage": "Hide notifications from this user?", "defaultMessage": "Hide notifications from this user?",
"id": "mute_modal.hide_notifications" "id": "mute_modal.hide_notifications"
}, },


+ 2
- 3
app/javascript/mastodon/locales/en.json 查看文件

@@ -63,7 +63,6 @@
"column.notifications": "Notifications", "column.notifications": "Notifications",
"column.pins": "Pinned toots", "column.pins": "Pinned toots",
"column.public": "Federated timeline", "column.public": "Federated timeline",
"column.status": "Toot",
"column_back_button.label": "Back", "column_back_button.label": "Back",
"column_header.hide_settings": "Hide settings", "column_header.hide_settings": "Hide settings",
"column_header.moveLeft_settings": "Move column to the left", "column_header.moveLeft_settings": "Move column to the left",
@@ -104,6 +103,7 @@
"confirmations.logout.confirm": "Log out", "confirmations.logout.confirm": "Log out",
"confirmations.logout.message": "Are you sure you want to log out?", "confirmations.logout.message": "Are you sure you want to log out?",
"confirmations.mute.confirm": "Mute", "confirmations.mute.confirm": "Mute",
"confirmations.mute.explanation": "This will hide posts from them and posts mentioning them, but it will still allow them to see your posts follow you.",
"confirmations.mute.message": "Are you sure you want to mute {name}?", "confirmations.mute.message": "Are you sure you want to mute {name}?",
"confirmations.redraft.confirm": "Delete & redraft", "confirmations.redraft.confirm": "Delete & redraft",
"confirmations.redraft.message": "Are you sure you want to delete this status and re-draft it? Favourites and boosts will be lost, and replies to the original post will be orphaned.", "confirmations.redraft.message": "Are you sure you want to delete this status and re-draft it? Favourites and boosts will be lost, and replies to the original post will be orphaned.",
@@ -174,7 +174,6 @@
"home.column_settings.basic": "Basic", "home.column_settings.basic": "Basic",
"home.column_settings.show_reblogs": "Show boosts", "home.column_settings.show_reblogs": "Show boosts",
"home.column_settings.show_replies": "Show replies", "home.column_settings.show_replies": "Show replies",
"home.column_settings.update_live": "Update in real-time",
"intervals.full.days": "{number, plural, one {# day} other {# days}}", "intervals.full.days": "{number, plural, one {# day} other {# days}}",
"intervals.full.hours": "{number, plural, one {# hour} other {# hours}}", "intervals.full.hours": "{number, plural, one {# hour} other {# hours}}",
"intervals.full.minutes": "{number, plural, one {# minute} other {# minutes}}", "intervals.full.minutes": "{number, plural, one {# minute} other {# minutes}}",
@@ -268,7 +267,6 @@
"navigation_bar.preferences": "Preferences", "navigation_bar.preferences": "Preferences",
"navigation_bar.public_timeline": "Federated timeline", "navigation_bar.public_timeline": "Federated timeline",
"navigation_bar.security": "Security", "navigation_bar.security": "Security",
"notification.and_n_others": "and {count, plural, one {# other} other {# others}}",
"notification.favourite": "{name} favourited your status", "notification.favourite": "{name} favourited your status",
"notification.follow": "{name} followed you", "notification.follow": "{name} followed you",
"notification.mention": "{name} mentioned you", "notification.mention": "{name} mentioned you",
@@ -297,6 +295,7 @@
"notifications.group": "{count} notifications", "notifications.group": "{count} notifications",
"poll.closed": "Closed", "poll.closed": "Closed",
"poll.refresh": "Refresh", "poll.refresh": "Refresh",
"poll.total_people": "{count, plural, one {# person} other {# people}}",
"poll.total_votes": "{count, plural, one {# vote} other {# votes}}", "poll.total_votes": "{count, plural, one {# vote} other {# votes}}",
"poll.vote": "Vote", "poll.vote": "Vote",
"poll.voted": "You voted for this answer", "poll.voted": "You voted for this answer",


+ 8
- 3
app/views/admin/tags/show.html.haml 查看文件

@@ -11,9 +11,14 @@
.dashboard__counters__num= number_with_delimiter @accounts_week .dashboard__counters__num= number_with_delimiter @accounts_week
.dashboard__counters__label= t 'admin.tags.accounts_week' .dashboard__counters__label= t 'admin.tags.accounts_week'
%div %div
= link_to explore_hashtag_path(@tag) do
.dashboard__counters__num= number_with_delimiter @tag.accounts_count
.dashboard__counters__label= t 'admin.tags.directory'
- if @tag.accounts_count > 0
= link_to explore_hashtag_path(@tag) do
.dashboard__counters__num= number_with_delimiter @tag.accounts_count
.dashboard__counters__label= t 'admin.tags.directory'
- else
%div
.dashboard__counters__num= number_with_delimiter @tag.accounts_count
.dashboard__counters__label= t 'admin.tags.directory'


%hr.spacer/ %hr.spacer/




+ 1
- 0
config/locales/en.yml 查看文件

@@ -240,6 +240,7 @@ en:
delete: Delete delete: Delete
destroyed_msg: Emojo successfully destroyed! destroyed_msg: Emojo successfully destroyed!
disable: Disable disable: Disable
disabled: Disabled
disabled_msg: Successfully disabled that emoji disabled_msg: Successfully disabled that emoji
emoji: Emoji emoji: Emoji
enable: Enable enable: Enable


Loading…
取消
儲存