diff --git a/app/assets/javascripts/discourse/app/controllers/keyboard-shortcuts-help.js b/app/assets/javascripts/discourse/app/controllers/keyboard-shortcuts-help.js index eaf65105b3f..9d4425ebd43 100644 --- a/app/assets/javascripts/discourse/app/controllers/keyboard-shortcuts-help.js +++ b/app/assets/javascripts/discourse/app/controllers/keyboard-shortcuts-help.js @@ -114,7 +114,7 @@ export default Controller.extend(ModalFunctionality, { keysDelimiter: PLUS, }), help: buildShortcut("application.help", { keys1: ["?"] }), - dismiss_new_posts: buildShortcut("application.dismiss_new_posts", { + dismiss_new: buildShortcut("application.dismiss_new", { keys1: ["x", "r"], }), dismiss_topics: buildShortcut("application.dismiss_topics", { diff --git a/app/assets/javascripts/discourse/app/templates/discovery/topics.hbs b/app/assets/javascripts/discourse/app/templates/discovery/topics.hbs index 3e9e8d38757..df483cd3f0c 100644 --- a/app/assets/javascripts/discourse/app/templates/discovery/topics.hbs +++ b/app/assets/javascripts/discourse/app/templates/discovery/topics.hbs @@ -77,8 +77,7 @@ model=model showResetNew=showResetNew showDismissRead=showDismissRead resetNew=( {{#footer-message education=footerEducation message=footerMessage}} {{#if latest}} {{#if canCreateTopicOnCategory}} - {{i18n "topics.none.ready_to_create"}} - {{i18n "topic.suggest_create_topic"}} + {{discourse-linked-text action=(route-action "createTopic") text="topic.suggest_create_topic"}} {{/if}} {{else if top}} {{#link-to "discovery.categories"}}{{i18n "topic.browse_all_categories"}}{{/link-to}}, {{#link-to "discovery.latest"}}{{i18n "topic.view_latest_topics"}}{{/link-to}} {{i18n "or"}} {{i18n "filters.top.other_periods"}} diff --git a/app/assets/javascripts/discourse/app/templates/mobile/discovery/topics.hbs b/app/assets/javascripts/discourse/app/templates/mobile/discovery/topics.hbs index a7511399949..932a7dffdb3 100644 --- a/app/assets/javascripts/discourse/app/templates/mobile/discovery/topics.hbs +++ b/app/assets/javascripts/discourse/app/templates/mobile/discovery/topics.hbs @@ -38,7 +38,9 @@ model=model showResetNew=showResetNew showDismissRead=showDismissRead resetNew=( {{#footer-message education=footerEducation message=footerMessage}} {{#if latest}} - {{#if canCreateTopicOnCategory}}{{i18n "topic.suggest_create_topic"}}{{/if}} + {{#if canCreateTopicOnCategory}} + {{discourse-linked-text action=(route-action "createTopic") text="topic.suggest_create_topic"}} + {{/if}} {{else if top}} {{#link-to "discovery.categories"}}{{i18n "topic.browse_all_categories"}}{{/link-to}}, {{#link-to "discovery.latest"}}{{i18n "topic.view_latest_topics"}}{{/link-to}} {{i18n "or"}} {{i18n "filters.top.other_periods"}} {{top-period-buttons period=period action=(action "changePeriod")}} diff --git a/app/assets/javascripts/discourse/app/templates/modal/keyboard-shortcuts-help.hbs b/app/assets/javascripts/discourse/app/templates/modal/keyboard-shortcuts-help.hbs index 9d3b182ebc5..60edf99f9f9 100644 --- a/app/assets/javascripts/discourse/app/templates/modal/keyboard-shortcuts-help.hbs +++ b/app/assets/javascripts/discourse/app/templates/modal/keyboard-shortcuts-help.hbs @@ -40,7 +40,7 @@
  • {{html-safe shortcuts.application.show_incoming_updated_topics}}
  • {{html-safe shortcuts.application.search}}
  • {{html-safe shortcuts.application.help}}
  • -
  • {{html-safe shortcuts.application.dismiss_new_posts}}
  • +
  • {{html-safe shortcuts.application.dismiss_new}}
  • {{html-safe shortcuts.application.dismiss_topics}}
  • {{html-safe shortcuts.application.log_out}}
  • diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 15c70a1a583..e25d4d903bd 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -420,7 +420,7 @@ class Admin::UsersController < Admin::AdminController rescue UserDestroyer::PostsExistError render json: { deleted: false, - message: I18n.t("user.cannot_delete_has_posts", username: user.username, post_count: user.posts.joins(:topic).count), + message: I18n.t("user.cannot_delete_has_posts", username: user.username, count: user.posts.joins(:topic).count), }, status: 403 end end diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 8b3f560b3c9..a8953102cb0 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -2364,13 +2364,19 @@ en: delete: "Delete Topics" dismiss: "Dismiss" dismiss_read: "Dismiss all unread" - dismiss_read_with_selected: "Dismiss %{count} unread" + dismiss_read_with_selected: + one: "Dismiss %{count} unread" + other: "Dismiss %{count} unread" dismiss_button: "Dismiss…" - dismiss_button_with_selected: "Dismiss (%{count})…" + dismiss_button_with_selected: + one: "Dismiss (%{count})…" + other: "Dismiss (%{count})…" dismiss_tooltip: "Dismiss just new posts or stop tracking topics" also_dismiss_topics: "Stop tracking these topics so they never show up as unread for me again" dismiss_new: "Dismiss New" - dismiss_new_with_selected: "Dismiss New (%{count})" + dismiss_new_with_selected: + one: "Dismiss New (%{count})" + other: "Dismiss New (%{count})" toggle: "toggle bulk selection of topics" actions: "Bulk Actions" change_category: "Set Category" @@ -2401,7 +2407,6 @@ en: new: "You have no new topics." read: "You haven't read any topics yet." posted: "You haven't posted in any topics yet." - ready_to_create: "Ready to " latest: "You're all caught up!" bookmarks: "You have no bookmarked topics yet." category: "There are no %{category} topics." @@ -2511,7 +2516,7 @@ en: browse_all_tags: Browse all tags view_latest_topics: view latest topics - suggest_create_topic: start a new conversation? + suggest_create_topic: Ready to start a new conversation? jump_reply_up: jump to earlier reply jump_reply_down: jump to later reply deleted: "The topic has been deleted" @@ -3550,7 +3555,7 @@ en: show_incoming_updated_topics: "%{shortcut} Show updated topics" search: "%{shortcut} Search" help: "%{shortcut} Open keyboard help" - dismiss_new_posts: "%{shortcut} Dismiss New/Posts" + dismiss_new: "%{shortcut} Dismiss New" dismiss_topics: "%{shortcut} Dismiss Topics" log_out: "%{shortcut} Log Out" composing: @@ -4790,7 +4795,7 @@ en: upload_successful: "Upload successful. Words have been added." test: button_label: "Test" - modal_title: "Test %{action} Watched Words" + modal_title: "%{action}: Test Watched Words" description: "Enter text below to check for matches with watched words" found_matches: "Found matches:" no_matches: "No matches found" diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 4213fa98393..f04a8011396 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -111,7 +111,7 @@ en: maximum_staged_user_per_email_reached: "Reached maximum number of staged users created per email." no_subject: "(no subject)" no_body: "(no body)" - missing_attachment: "(Attachment %{filename} is missing) ago." + missing_attachment: "(Attachment %{filename} is missing)" continuing_old_discussion: one: "Continuing the discussion from [%{title}](%{url}), because it was created more than %{count} day ago." other: "Continuing the discussion from [%{title}](%{url}), because it was created more than %{count} days ago." @@ -279,9 +279,6 @@ en: not_enough_space_on_disk: "There is not enough space on disk to upload this backup." invalid_filename: "The backup filename contains invalid characters. Valid characters are a-z 0-9 . - _." file_exists: "The file you are trying to upload already exists." - location: - local: "Local" - s3: "Amazon S3" invalid_params: "You supplied invalid parameters to the request: %{message}" not_logged_in: "You need to be logged in to do that." @@ -1973,7 +1970,7 @@ en: reviewable_claiming: "Does reviewable content need to be claimed before it can be acted upon?" reviewable_default_topics: "Show reviewable content grouped by topic by default" reviewable_default_visibility: "Don't show reviewable items unless they meet this priority" - reviewable_low_priority_threshold: "The priority filter hides reviewable that doesn't meet this score unless the '(any)' filter is used." + reviewable_low_priority_threshold: "The priority filter hides reviewable items that don't meet this score unless the '(any)' filter is used." high_trust_flaggers_auto_hide_posts: "New user posts are automatically hidden after being flagged as spam by a TL3+ user" cooldown_hours_until_reflag: "How much time users will have to wait until they are able to reflag a post" @@ -2597,7 +2594,9 @@ en: email_in_spam_header: "User's first email was flagged as spam" already_silenced: "User was already silenced by %{staff} %{time_ago}." already_suspended: "User was already suspended by %{staff} %{time_ago}." - cannot_delete_has_posts: "User %{username} has %{post_count} posts(s), either public posts or personal messages, so they can't be deleted." + cannot_delete_has_posts: + one: "User %{username} has %{count} post in a public topic or personal message, so they can't be deleted." + other: "User %{username} has %{count} posts in public topics or personal messages, so they can't be deleted." reviewables_reminder: submitted: diff --git a/spec/requests/admin/users_controller_spec.rb b/spec/requests/admin/users_controller_spec.rb index 8aa49241965..6d7a7b97201 100644 --- a/spec/requests/admin/users_controller_spec.rb +++ b/spec/requests/admin/users_controller_spec.rb @@ -635,7 +635,7 @@ RSpec.describe Admin::UsersController do expect(response.status).to eq(403) json = response.parsed_body expect(json['deleted']).to eq(false) - expect(json['message']).to eq(I18n.t("user.cannot_delete_has_posts", username: delete_me.username, post_count: post_count)) + expect(json['message']).to eq(I18n.t("user.cannot_delete_has_posts", username: delete_me.username, count: post_count)) end it "doesn't return an error if delete_posts == true" do