diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 8ad436802cf..7880daace7b 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -2811,9 +2811,847 @@ en: invalid_search_ranking_weights: "Value is invalid for search_ranking_weights site setting. Example: '{0.1,0.2,0.3,1.0}'. Note that maximum value for each weight is 1.0." keywords: + # Run `RAILS_ENV=development bundle exec rake site_settings:add_keyword_translation_keys` to update this section. + # BEGIN KEYWORDS + about_page_hidden_groups: "" + active_user_rate_limit_secs: "" + add_rel_nofollow_to_user_content: "" + admin_sidebar_enabled_groups: "" + adobe_analytics_tags_url: "" + alert_admins_if_errors_per_hour: "" + alert_admins_if_errors_per_minute: "" + allow_all_attachments_for_group_messages: "" + allow_anonymous_likes: "" + allow_anonymous_posting: "" + allow_bulk_invite: "" + allow_changing_staged_user_tracking: "" + allow_duplicate_topic_titles: "" + allow_duplicate_topic_titles_category: "" + allow_featured_topic_on_user_profiles: "" + allow_flagging_staff: "" + allow_index_in_robots_txt: "" + allow_new_registrations: "" + allow_profile_backgrounds: "" + allow_restore: "" + allow_staff_to_upload_any_file_in_pm: "" + allow_uncategorized_topics: "" + allow_uploaded_avatars: "" + allow_uppercase_posts: "" + allow_user_api_key_scopes: "" + allow_user_locale: "" + allow_username_in_share_links: "" + allow_users_to_hide_profile: "" + allowed_crawler_user_agents: "" + allowed_email_domains: "" + allowed_embed_selectors: "" + allowed_href_schemes: "" + allowed_iframes: "" + allowed_inline_onebox_domains: "" + allowed_internal_hosts: "" + allowed_link_domains: "" + allowed_onebox_iframes: "" + allowed_spam_host_domains: "" + allowed_unicode_username_characters: "" + allowed_user_api_auth_redirects: "" + allowed_user_api_push_urls: "" + allowed_user_website_domains: "" + alternative_reply_by_email_addresses: "" + always_show_trimmed_content: "" + anon_polling_interval: "" + anonymous_account_duration_minutes: "" + anonymous_posting_allowed_groups: "" + anonymous_posting_min_trust_level: "" + app_association_android: "" + app_association_ios: "" + apple_touch_icon: "" + apply_custom_styles_to_digest: "" + approve_new_topics_unless_allowed_groups: "" + approve_new_topics_unless_trust_level: "" + approve_post_count: "" + approve_suspect_users: "" + approve_unless_allowed_groups: "" + approve_unless_staged: "" + approve_unless_trust_level: "" + auth_immediately: "" + auth_overrides_email: "" + auth_overrides_name: "" + auth_overrides_username: "" + auth_skip_create_confirm: "" + authorized_extensions: "" + authorized_extensions_for_staff: "" + auto_approve_email_domains: "" + auto_close_messages_post_count: "" + auto_close_topic_sensitivity: "" + auto_close_topics_create_linked_topic: "" + auto_close_topics_post_count: "" + auto_generated_allowlist: "" + auto_handle_queued_age: "" + auto_respond_to_flag_actions: "" + auto_silence_fast_typers_max_trust_level: "" + auto_silence_fast_typers_on_first_post: "" + auto_silence_first_post_regex: "" + autohighlight_all_code: "" + automatic_backups_enabled: "" + automatic_topic_heat_values: "" + automatically_clean_unused_tags: "" + automatically_download_gravatars: "" + automatically_unpin_topics: "" + avatar_sizes: "" + background_polling_interval: "" + backup_frequency: "" + backup_gzip_compression_level_for_uploads: "" + backup_location: "" + backup_time_of_day: "" + backup_with_uploads: "" + base_font: "" + block_auto_generated_emails: "" + block_common_passwords: "" + block_hotlinked_media: "" + block_hotlinked_media_exceptions: "" + block_onebox_on_redirect: "" + blocked_attachment_content_types: "" + blocked_attachment_filenames: "" + blocked_crawler_user_agents: "" + blocked_email_domains: "" + blocked_ip_blocks: "" + blocked_onebox_domains: "" + blur_tl0_flagged_posts_media: "" + body_min_entropy: "" + bootstrap_mode_min_users: "" + bounce_score_threshold: "" + categories_topics: "" + category_colors: "" + category_search_priority_high_weight: "" + category_search_priority_low_weight: "" + censored_words: "" + city_for_disputes: "" + clean_orphan_uploads_grace_period_hours: "" clean_up_inactive_users_after_days: "deactivated|inactive|unactivated" - purge_unactivated_users_grace_period_days: "deactivated|inactive|unactivated" + clean_up_unused_staged_users_after_days: "" + clean_up_uploads: "" + code_formatting_style: "" + cold_age_days_high: "" + cold_age_days_low: "" + cold_age_days_medium: "" + company_name: "" + composer_media_optimization_image_bytes_optimization_threshold: "" + composer_media_optimization_image_enabled: "" + composer_media_optimization_image_encode_quality: "" + composer_media_optimization_image_resize_dimensions_threshold: "" + composer_media_optimization_image_resize_width_target: "" + contact_email: "" + contact_url: "" + content_security_policy: "" + content_security_policy_collect_reports: "" + content_security_policy_frame_ancestors: "" + content_security_policy_report_only: "" + content_security_policy_script_src: "" + cooldown_hours_until_reflag: "" + cooldown_minutes_after_hiding_posts: "" + cors_origins: "" + crawl_images: "" + create_post_for_category_and_tag_changes: "" + create_revision_on_bulk_topic_moves: "" + create_tag_allowed_groups: "" + create_thumbnails: "" + create_topic_allowed_groups: "" + dark_mode_none: "" + dashboard_general_tab_activity_metrics: "" + dashboard_hidden_reports: "" + dashboard_visible_tabs: "" + default_avatars: "" + default_categories_muted: "" + default_categories_normal: "" + default_categories_tracking: "" + default_categories_watching: "" + default_categories_watching_first_post: "" + default_code_lang: "" + default_composer_category: "" + default_dark_mode_color_scheme_id: "" + default_email_digest_frequency: "" + default_email_in_reply_to: "" + default_email_level: "" + default_email_mailing_list_mode: "" + default_email_mailing_list_mode_frequency: "" + default_email_messages_level: "" + default_email_previous_replies: "" + default_hide_presence: "" + default_hide_profile: "" + default_include_tl0_in_digests: "" + default_invitee_trust_level: "" + default_locale: "" + default_navigation_menu_categories: "" + default_navigation_menu_tags: "" + default_other_auto_track_topics_after_msecs: "" + default_other_dynamic_favicon: "" + default_other_enable_defer: "" + default_other_enable_quoting: "" + default_other_enable_smart_lists: "" + default_other_external_links_in_new_tab: "" + default_other_like_notification_frequency: "" + default_other_new_topic_duration_minutes: "" + default_other_notification_level_when_replying: "" + default_other_skip_new_user_tips: "" + default_sidebar_link_to_filtered_list: "" + default_sidebar_show_count_of_new_items: "" + default_sidebar_switch_panel_position: "" + default_subcategory_on_read_only_category: "" + default_tags_muted: "" + default_tags_tracking: "" + default_tags_watching: "" + default_tags_watching_first_post: "" + default_text_size: "" + default_title_count_mode: "" + default_topics_automatic_unpin: "" + default_trust_level: "" + delete_all_posts_and_topics_allowed_groups: "" + delete_all_posts_max: "" + delete_associated_accounts_on_password_reset: "" + delete_drafts_older_than_n_days: "" + delete_email_logs_after_days: "" + delete_merged_stub_topics_after_days: "" + delete_old_hidden_posts: "" + delete_rejected_email_after_days: "" + delete_removed_posts_after: "" + delete_user_max_post_age: "" + delete_user_self_max_post_count: "" + desktop_category_page_style: "" + detailed_404: "" + detect_custom_avatars: "" + digest_logo: "" + digest_min_excerpt_length: "" + digest_other_topics: "" + digest_posts: "" + digest_suppress_categories: "" + digest_suppress_tags: "" + digest_topics: "" + disable_avatar_education_message: "" + disable_category_edit_notifications: "" + disable_digest_emails: "" + disable_emails: "" + disable_mailing_list_mode: "" + disable_system_edit_notifications: "" + disable_tags_edit_notifications: "" + disable_watched_word_checking_in_user_fields: "" + disabled: "" + disabled_image_download_domains: "" + disallow_reply_by_email_after_days: "" + discord_client_id: "" + discord_secret: "" + discord_trusted_guilds: "" + discourse_connect_allowed_redirect_domains: "" + discourse_connect_not_approved_url: "" + discourse_connect_overrides_avatar: "" + discourse_connect_overrides_bio: "" + discourse_connect_overrides_card_background: "" + discourse_connect_overrides_groups: "" + discourse_connect_overrides_location: "" + discourse_connect_overrides_profile_background: "" + discourse_connect_overrides_website: "" + discourse_connect_provider_secrets: "" + discourse_connect_secret: "" + discourse_connect_url: "" + display_eu_visitor_stats: "" + display_local_time_in_user_card: "" + display_name_on_email_from: "" + display_name_on_posts: "" + display_personal_messages_tag_counts: "" + dominating_topic_minimum_percent: "" + dont_feed_the_trolls_threshold: "" + download_remote_images_threshold: "" + download_remote_images_to_local: "" + edit_all_post_groups: "" + edit_all_topic_groups: "" + edit_history_visible_to_public: "" + edit_post_allowed_groups: "" + edit_wiki_post_allowed_groups: "" + editing_grace_period: "" + editing_grace_period_max_diff: "" + editing_grace_period_max_diff_high_trust: "" + educate_until_posts: "" + email_accent_bg_color: "" + email_accent_fg_color: "" + email_custom_headers: "" + email_editable: "" + email_in: "" + email_in_allowed_groups: "" + email_in_authserv_id: "" + email_in_min_trust: "" + email_in_spam_header: "" + email_link_color: "" + email_posts_context: "" + email_prefix: "" + email_site_title: "" + email_subject: "" + email_time_window_mins: "" + email_token_valid_hours: "" + email_total_attachment_size_limit_kb: "" + embed_any_origin: "" + embed_post_limit: "" + embed_set_canonical_url: "" + embed_support_markdown: "" + embed_topics_list: "" + embed_truncate: "" + embed_unlisted: "" + embed_username_required: "" + embedded_media_post_allowed_groups: "" + emoji_autocomplete_min_chars: "" + emoji_deny_list: "" + emoji_set: "" + enable_backups: "" + enable_badges: "" + enable_category_group_moderation: "" + enable_chunked_encoding: "" + enable_desktop_push_notifications: "" + enable_diffhtml_preview: "" + enable_direct_s3_uploads: "" + enable_discord_logins: "" + enable_discourse_connect: "" + enable_discourse_connect_provider: "" + enable_emoji: "" + enable_emoji_shortcuts: "" + enable_escaped_fragments: "" + enable_experimental_lightbox: "" + enable_facebook_logins: "" + enable_fast_edit: "" + enable_filtered_replies_view: "" + enable_github_logins: "" + enable_google_oauth2_logins: "" + enable_group_directory: "" + enable_imap: "" + enable_imap_idle: "" + enable_imap_write: "" + enable_inline_emoji_translation: "" + enable_inline_onebox_on_all_domains: "" + enable_linkedin_oidc_logins: "" + enable_listing_suspended_users_on_search: "" + enable_local_logins: "" + enable_local_logins_via_email: "" + enable_markdown_linkify: "" + enable_markdown_typographer: "" + enable_max_tags_per_email_subject: "" + enable_mentions: "" + enable_mobile_theme: "" + enable_names: "" + enable_offline_indicator: "" + enable_page_publishing: "" + enable_personal_messages: "" + enable_powered_by_discourse: "" + enable_quote_copy: "" + enable_rich_text_paste: "" + enable_s3_uploads: "" + enable_safe_mode: "" + enable_signup_cta: "" + enable_sitemap: "" + enable_smtp: "" + enable_staged_users: "" + enable_system_message_replies: "" + enable_twitter_logins: "" + enable_user_directory: "" + enable_user_status: "" + enable_user_tips: "" + enforce_second_factor: "" + enforce_second_factor_on_external_auth: "" + exclude_rel_nofollow_domains: "" + experimental_form_templates: "" + experimental_new_new_view_groups: "" + external_emoji_url: "" + external_system_avatars_enabled: "" + external_system_avatars_url: "" + facebook_app_access_token: "" + facebook_app_id: "" + facebook_app_secret: "" + faq_url: "" + favicon: "" + find_related_post_with_key: "" + fixed_category_positions: "" + fixed_category_positions_on_create: "" + flag_post_allowed_groups: "" + flag_sockpuppets: "" + flush_timings_secs: "" + force_custom_user_agent_hosts: "" + force_https: "" + force_lowercase_tags: "" + forwarded_emails_behaviour: "" + full_name_required: "" + full_page_login: "" + ga_universal_auto_link_domains: "" + ga_universal_domain_name: "" + ga_universal_tracking_code: "" + ga_version: "" + get_a_room_threshold: "" + github_client_id: "" + github_client_secret: "" + github_onebox_access_tokens: "" + glimmer_post_menu_groups: "" + glimmer_post_menu_mode: "" + glimmer_topic_list_mode: "" + global_notice: "" + google_oauth2_client_id: "" + google_oauth2_client_secret: "" + google_oauth2_hd: "" + google_oauth2_hd_groups: "" + google_oauth2_hd_groups_service_account_admin_email: "" + google_oauth2_hd_groups_service_account_json: "" + google_oauth2_prompt: "" + google_oauth2_verbose_logging: "" + governing_law: "" + gravatar_base_url: "" + gravatar_login_url: "" + gravatar_name: "" + group_in_subject: "" + gtm_container_id: "" + hard_bounce_score: "" + header_dropdown_category_count: "" + heading_font: "" + here_mention: "" + here_mention_allowed_groups: "" + hidden_post_visible_groups: "" + hide_email_address_taken: "" + hide_post_sensitivity: "" + hide_suspension_reasons: "" + hide_user_activity_tab: "" + hide_user_profiles_from_public: "" + high_trust_flaggers_auto_hide_posts: "" + highlighted_languages: "" + history_hours_high: "" + history_hours_low: "" + history_hours_medium: "" + ignore_allowed_groups: "" + ignore_by_title: "" + ignored_users_count_message_threshold: "" + ignored_users_message_gap_days: "" + image_preview_jpg_quality: "" + imap_batch_import_email: "" + imap_polling_new_emails: "" + imap_polling_old_emails: "" + imap_polling_period_mins: "" + import_embed_unlisted: "" + include_in_discourse_discover: "" + include_secure_categories_in_tag_counts: "" + include_thumbnails_in_backups: "" + incoming_email_prefer_html: "" + invalidate_inactive_admin_email_after_days: "" + invite_allowed_groups: "" + invite_code: "" + invite_expiry_days: "" + invite_link_max_redemptions_limit: "" + invite_link_max_redemptions_limit_users: "" + invite_only: "" + large_icon: "" + lazy_load_categories_groups: "" + levenshtein_distance_spammer_emails: "" + likes_notification_consolidation_window_mins: "" + limit_suggested_to_category: "" + linked_notification_consolidation_window_mins: "" + linkedin_oidc_client_id: "" + linkedin_oidc_client_secret: "" + log_anonymizer_details: "" + log_mail_processing_failures: "" + log_out_strict: "" + log_personal_messages_views: "" + log_search_queries: "" + login_required: "" + logo: "" + logo_dark: "" + logo_small: "" + logo_small_dark: "" + logout_redirect: "" + long_polling_base_url: "" + mailgun_api_key: "" + mailjet_webhook_token: "" + mandrill_authentication_key: "" + manifest_icon: "" + manifest_screenshots: "" + manual_polling_enabled: "" + markdown_linkify_tlds: "" + markdown_typographer_quotation_marks: "" + max_age_unmatched_emails: "" + max_age_unmatched_ips: "" + max_allowed_message_recipients: "" + max_attachment_size_kb: "" + max_bookmarks_per_day: "" + max_consecutive_replies: "" + max_daily_gravatar_crawls: "" + max_edits_per_day: "" + max_emails_per_day_per_user: "" + max_emojis_in_title: "" + max_favorite_badges: "" + max_flags_per_day: "" + max_form_template_content_length: "" + max_form_template_title_length: "" + max_here_mentioned: "" + max_image_height: "" + max_image_megapixels: "" + max_image_size_kb: "" + max_image_width: "" + max_invites_per_day: "" + max_likes_per_day: "" + max_logins_per_ip_per_hour: "" + max_logins_per_ip_per_minute: "" + max_mentions_per_post: "" + max_new_accounts_per_registration_ip: "" + max_notifications_per_user: "" + max_oneboxes_per_post: "" + max_personal_messages_per_day: "" + max_post_deletions_per_day: "" + max_post_deletions_per_minute: "" + max_post_length: "" + max_prints_per_hour_per_user: "" + max_replies_in_first_day: "" + max_reply_history: "" + max_similar_results: "" + max_tag_length: "" + max_tag_search_results: "" + max_tags_in_filter_list: "" + max_tags_per_email_subject: "" + max_tags_per_topic: "" + max_topic_invitations_per_day: "" + max_topic_invitations_per_minute: "" + max_topic_title_length: "" + max_topics_in_first_day: "" + max_topics_per_day: "" + max_username_length: "" + max_users_notified_per_group_mention: "" + maximum_backups: "" + maximum_recipients_per_new_group_email: "" + maximum_session_age: "" + maximum_staged_users_per_email: "" + min_admin_password_length: "" + min_ban_entries_for_roll_up: "" + min_first_post_length: "" + min_first_post_typing_time: "" + min_password_length: "" + min_personal_message_post_length: "" + min_personal_message_title_length: "" + min_post_length: "" + min_ratio_to_crop: "" + min_search_term_length: "" + min_title_similar_length: "" + min_topic_title_length: "" + min_topic_views_for_delete_confirm: "" + min_trust_level_for_here_mention: "" + min_trust_level_for_user_api_key: "" + min_trust_level_to_allow_ignore: "" + min_trust_level_to_allow_invite: "" + min_trust_level_to_allow_profile_background: "" + min_trust_level_to_allow_user_card_background: "" + min_trust_level_to_tag_topics: "" + min_trust_to_allow_self_wiki: "" + min_trust_to_create_tag: "" + min_trust_to_create_topic: "" + min_trust_to_edit_post: "" + min_trust_to_edit_wiki_post: "" + min_trust_to_flag_posts: "" + min_trust_to_post_embedded_media: "" + min_trust_to_post_links: "" + min_trust_to_send_email_messages: "" + min_trust_to_send_messages: "" + min_username_length: "" + minimum_topics_similar: "" + mobile_logo: "" + mobile_logo_dark: "" + moderators_change_post_ownership: "" + moderators_manage_categories_and_groups: "" + moderators_view_emails: "" + must_approve_users: "" + mute_all_categories_by_default: "" + native_app_install_banner_android: "" + native_app_install_banner_ios: "" navigation_menu: "sidebar|header dropdown" + new_user_notice_tl: "" + new_version_emails: "" + newuser_max_attachments: "" + newuser_max_embedded_media: "" + newuser_max_links: "" + newuser_max_mentions_per_post: "" + newuser_max_replies_per_topic: "" + newuser_spam_host_threshold: "" + normalize_emails: "" + notification_consolidation_threshold: "" + notification_email: "" + notify_about_queued_posts_after: "" + notify_about_reviewable_item_after: "" + notify_mods_when_user_silenced: "" + notify_users_after_responses_deleted_on_flagged_post: "" + num_flaggers_to_close_topic: "" + num_hours_to_close_topic: "" + num_tl3_flags_to_silence_new_user: "" + num_tl3_users_to_silence_new_user: "" + num_users_to_silence_new_user: "" + old_post_notice_days: "" + opengraph_image: "" + page_loading_indicator: "" + password_unique_characters: "" + penalty_include_post_message: "" + penalty_step_hours: "" + pending_users_reminder_delay_minutes: "" + permalink_normalizations: "" + persistent_sessions: "" + personal_email_time_window_seconds: "" + personal_message_enabled_groups: "" + pm_tags_allowed_for_groups: "" + pm_warn_user_last_seen_months_ago: "" + png_to_jpg_quality: "" + polling_interval: "" + pop3_polling_delete_from_server: "" + pop3_polling_enabled: "" + pop3_polling_host: "" + pop3_polling_openssl_verify: "" + pop3_polling_password: "" + pop3_polling_period_mins: "" + pop3_polling_port: "" + pop3_polling_ssl: "" + pop3_polling_username: "" + post_edit_time_limit: "" + post_excerpt_maxlength: "" + post_excerpts_in_emails: "" + post_links_allowed_groups: "" + post_menu: "" + post_menu_hidden_items: "" + post_onebox_maxlength: "" + post_undo_action_window_mins: "" + postmark_webhook_token: "" + prevent_anons_from_downloading_files: "" + previous_visit_timeout_hours: "" + prioritize_username_in_ux: "" + privacy_policy_url: "" + private_email: "" + profile_background_allowed_groups: "" + public_user_custom_fields: "" + purge_deleted_uploads_grace_period_days: "" + purge_unactivated_users_grace_period_days: "deactivated|inactive|unactivated" + push_notification_time_window_mins: "" + push_notifications_icon: "" + push_notifications_prompt: "" + rate_limit_create_post: "" + rate_limit_create_topic: "" + rate_limit_new_user_create_post: "" + raw_email_max_length: "" + raw_rejected_email_max_length: "" + read_time_word_count: "" + recompress_original_jpg_quality: "" + redirect_users_to_top_page: "" + relative_date_duration: "" + remove_full_quote: "" + remove_muted_tags_from_latest: "" + remove_older_backups: "" + reply_by_email_address: "" + reply_by_email_enabled: "" + require_change_email_confirmation: "" + reserved_usernames: "" + reset_bounce_score_after_days: "" + responsive_post_image_sizes: "" + restrict_letter_avatar_colors: "" + retain_web_hook_events_aggregate_days: "" + retain_web_hook_events_period_days: "" + retry_web_hook_events: "" + returning_user_notice_tl: "" + returning_users_days: "" + review_every_post: "" + review_media_unless_trust_level: "" + reviewable_claiming: "" + reviewable_default_topics: "" + reviewable_default_visibility: "" + reviewable_low_priority_threshold: "" + reviewable_revision_reasons: "" + revoke_api_keys_maxlife_days: "" + revoke_api_keys_unused_days: "" + revoke_user_api_keys_maxlife_days: "" + revoke_user_api_keys_unused_days: "" + s3_access_key_id: "" + s3_backup_bucket: "" + s3_cdn_url: "" + s3_configure_tombstone_policy: "" + s3_disable_cleanup: "" + s3_endpoint: "" + s3_region: "" + s3_secret_access_key: "" + s3_upload_bucket: "" + s3_use_acls: "" + s3_use_cdn_url_for_all_uploads: "" + s3_use_iam_profile: "" + search_default_sort_order: "" + search_ignore_accents: "" + search_prefer_recent_posts: "" + search_query_log_max_retention_days: "" + search_query_log_max_size: "" + search_recent_posts_size: "" + search_tokenize_chinese: "" + search_tokenize_japanese: "" + secure_uploads: "" + secure_uploads_allow_embed_images_in_emails: "" + secure_uploads_max_email_embed_image_size_kb: "" + selectable_avatars: "" + selectable_avatars_mode: "" + self_wiki_allowed_groups: "" + send_email_messages_allowed_groups: "" + send_old_credential_reminder_days: "" + send_tl1_welcome_message: "" + send_tl2_promotion_message: "" + send_welcome_message: "" + sendgrid_verification_key: "" + sequential_replies_threshold: "" + set_locale_from_accept_language_header: "" + share_anonymized_statistics: "" + share_links: "" + share_quote_buttons: "" + share_quote_visibility: "" + shared_drafts_allowed_groups: "" + shared_drafts_category: "" + shared_drafts_min_trust_level: "" + short_email_length: "" + short_progress_text_threshold: "" + short_site_description: "" + short_title: "" + show_badges_in_post_header: "" + show_bottom_topic_map: "" + show_copy_button_on_codeblocks: "" + show_inactive_accounts: "" + show_pinned_excerpt_desktop: "" + show_pinned_excerpt_mobile: "" + show_published_pages_login_required: "" + show_signup_form_email_instructions: "" + show_signup_form_full_name_instructions: "" + show_signup_form_password_instructions: "" + show_signup_form_username_instructions: "" + show_time_gap_days: "" + show_topic_featured_link_in_digest: "" + show_topic_map_in_topics_without_replies: "" + show_user_menu_avatars: "" + silence_new_user_sensitivity: "" + simultaneous_uploads: "" + site_contact_group_name: "" + site_contact_username: "" + site_description: "" + sitemap_page_size: "" + skip_auto_delete_reply_likes: "" + skip_review_media_groups: "" + slow_down_crawler_rate: "" + slow_down_crawler_user_agents: "" + slow_mode_prevents_editing: "" + slug_generation_method: "" + soft_bounce_score: "" + sparkpost_webhook_token: "" + splash_screen: "" + staff_edit_locks_post: "" + staff_like_weight: "" + staff_user_custom_fields: "" + strip_image_metadata: "" + strip_images_from_short_emails: "" + strip_incoming_email_lines: "" + suggest_weekends_in_date_pickers: "" + suggested_topics: "" + suggested_topics_max_days_old: "" + suggested_topics_unread_max_days_old: "" + summary_likes_required: "" + summary_max_results: "" + summary_percent_filter: "" + summary_posts_required: "" + summary_score_threshold: "" + summary_timeline_button: "" + support_mixed_text_direction: "" + suppress_digest_email_after_days: "" + suppress_overlapping_tags_in_list: "" + suppress_reply_directly_above: "" + suppress_reply_directly_below: "" + suppress_reply_when_quoting: "" + suppress_secured_categories_from_admin: "" + suppress_uncategorized_badge: "" + svg_icon_subset: "" + tag_style: "" + tag_topic_allowed_groups: "" + tagging_enabled: "" + tags_listed_by_group: "" + tags_sort_alphabetically: "" + theme_authorized_extensions: "" + title: "" + title_fancy_entities: "" + title_max_word_length: "" + title_min_entropy: "" + title_prettify: "" + title_remove_extraneous_space: "" + tl1_requires_read_posts: "" + tl1_requires_time_spent_mins: "" + tl1_requires_topics_entered: "" + tl2_additional_edits_per_day_multiplier: "" + tl2_additional_flags_per_day_multiplier: "" + tl2_additional_likes_per_day_multiplier: "" + tl2_post_edit_time_limit: "" + tl2_requires_days_visited: "" + tl2_requires_likes_given: "" + tl2_requires_likes_received: "" + tl2_requires_read_posts: "" + tl2_requires_time_spent_mins: "" + tl2_requires_topic_reply_count: "" + tl2_requires_topics_entered: "" + tl3_additional_edits_per_day_multiplier: "" + tl3_additional_flags_per_day_multiplier: "" + tl3_additional_likes_per_day_multiplier: "" + tl3_links_no_follow: "" + tl3_promotion_min_duration: "" + tl3_requires_days_visited: "" + tl3_requires_likes_given: "" + tl3_requires_likes_received: "" + tl3_requires_max_flagged: "" + tl3_requires_posts_read: "" + tl3_requires_posts_read_all_time: "" + tl3_requires_posts_read_cap: "" + tl3_requires_topics_replied_to: "" + tl3_requires_topics_viewed: "" + tl3_requires_topics_viewed_all_time: "" + tl3_requires_topics_viewed_cap: "" + tl3_time_period: "" + tl4_additional_edits_per_day_multiplier: "" + tl4_additional_flags_per_day_multiplier: "" + tl4_additional_likes_per_day_multiplier: "" + tl4_delete_posts_and_topics: "" + top_menu: "" + top_page_default_timeframe: "" + top_topics_formula_first_post_likes_multiplier: "" + top_topics_formula_least_likes_per_post_multiplier: "" + top_topics_formula_log_views_multiplier: "" + topic_excerpt_maxlength: "" + topic_featured_link_enabled: "" + topic_page_title_includes_category: "" + topic_post_like_heat_high: "" + topic_post_like_heat_low: "" + topic_post_like_heat_medium: "" + topic_view_duration_hours: "" + topic_views_heat_high: "" + topic_views_heat_low: "" + topic_views_heat_medium: "" + topics_per_period_in_top_page: "" + topics_per_period_in_top_summary: "" + tos_url: "" + traditional_markdown_linebreaks: "" + trim_incoming_emails: "" + twitter_consumer_key: "" + twitter_consumer_secret: "" + twitter_summary_large_image: "" + unicode_usernames: "" + unique_posts_mins: "" + unsubscribe_via_email: "" + unsubscribe_via_email_footer: "" + uploaded_avatars_allowed_groups: "" + use_admin_ip_allowlist: "" + use_email_for_username_and_name_suggestions: "" + use_name_for_username_suggestions: "" + use_site_small_logo_as_system_avatar: "" + user_api_key_allowed_groups: "" + user_card_background_allowed_groups: "" + user_profile_view_duration_hours: "" + user_selected_primary_groups: "" + username_change_period: "" + verbose_discourse_connect_logging: "" + verbose_localization: "" + version_checks: "" + view_raw_email_allowed_groups: "" + warn_reviving_old_topic_age: "" + watched_precedence_over_muted: "" + watched_words_regular_expressions: "" + whispers_allowed_groups: "" + # END KEYWORDS placeholder: discourse_connect_provider_secrets: diff --git a/lefthook.yml b/lefthook.yml index c4870acdaca..7a0a7b87a0c 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -52,6 +52,9 @@ fix-staged: syntax_tree: glob: "*.{rb,rake}" run: bundle exec stree write Gemfile {staged_files} + keyword-translations: + glob: "**/server.en.yml" + run: bundle exec rake site_settings:add_keyword_translation_keys lints: parallel: true diff --git a/lib/tasks/site_settings.rake b/lib/tasks/site_settings.rake index f3547948bee..fd2f64c304a 100644 --- a/lib/tasks/site_settings.rake +++ b/lib/tasks/site_settings.rake @@ -90,3 +90,39 @@ task "site_settings:find_dead" => :environment do puts "No dead settings found." end end + +desc "Add missing keyword translation keys" +task "site_settings:add_keyword_translation_keys" => :environment do + # Manually load the YAML file, since we need to manually dump it at the end + filename = "#{Rails.root}/config/locales/server.en.yml" + + text = File.read(filename) + yml = YAML.load_file(filename, aliases: true) + + new_keywords = {} + + added = 0 + + yml["en"]["site_settings"].each do |key, value| + next if !value.is_a?(String) + + if yml["en"]["site_settings"]["keywords"].key?(key) + new_keywords[key] = yml["en"]["site_settings"]["keywords"][key] + else + new_keywords[key] = "" + added += 1 + end + end + + removed = yml["en"]["site_settings"]["keywords"].length - new_keywords.length - added + + new_text = "" + new_keywords.keys.sort.each { |key| new_text += " #{key}: \"#{new_keywords[key]}\"\n" } + + text.gsub!(/(# BEGIN KEYWORDS\n)(.*)( # END KEYWORDS)/m, "\\1#{new_text}\\3") + + File.write(filename, text) + + puts "Keyword entries added: #{added}" + puts "Keyword entries removed: #{removed}" +end diff --git a/spec/lib/site_setting_extension_spec.rb b/spec/lib/site_setting_extension_spec.rb index 15648f95f26..f621a9671a7 100644 --- a/spec/lib/site_setting_extension_spec.rb +++ b/spec/lib/site_setting_extension_spec.rb @@ -1046,6 +1046,14 @@ RSpec.describe SiteSettingExtension do ) end + it "has a keyword entry for all settings" do + SiteSetting.all_settings.each do |s| + next if s[:plugin] == SiteSetting::SAMPLE_TEST_PLUGIN.name + expect(I18n.exists?("site_settings.keywords.#{s[:setting]}")).to eq(true), + "Missing keyword entry for #{s[:setting]}" + end + end + context "when a setting also has an alias after renaming" do before { SiteSetting.stubs(:deprecated_setting_alias).returns("some_old_setting") }