Просмотр исходного кода

Merge pull request #20519 from overleaf/mj-write-and-cite-settings

[web] Add a settings menu for Write & Cite

GitOrigin-RevId: 670d8db8fa1363308a6d4d35f3717a886fb24c49
Mathias Jakobsen 1 год назад
Родитель
Сommit
267109aa9a

+ 1 - 0
services/web/config/settings.defaults.js

@@ -903,6 +903,7 @@ module.exports = {
     v1ImportDataScreen: [],
     snapshotUtils: [],
     offlineModeToolbarButtons: [],
+    settingsEntries: [],
   },
 
   moduleImportSequence: [

+ 19 - 0
services/web/frontend/extracted-translations.json

@@ -76,6 +76,7 @@
   "address_line_1": "",
   "address_second_line_optional": "",
   "adjust_column_width": "",
+  "advanced_reference_search_mode": "",
   "aggregate_changed": "",
   "aggregate_to": "",
   "agree_with_the_terms": "",
@@ -94,6 +95,7 @@
   "all_projects": "",
   "all_projects_will_be_transferred_immediately": "",
   "all_these_experiments_are_available_exclusively": "",
+  "allows_to_search_by_author_title_etc_possible_to_pull_results_directly_from_your_reference_manager_if_connected": "",
   "already_subscribed_try_refreshing_the_page": "",
   "also": "",
   "an_email_has_already_been_sent_to": "",
@@ -671,6 +673,8 @@
   "in_order_to_match_institutional_metadata_associated": "",
   "include_caption": "",
   "include_label": "",
+  "include_results_from_your_reference_manager": "",
+  "include_results_from_your_x_account": "",
   "include_the_error_message_and_ai_response": "",
   "increased_compile_timeout": "",
   "inr_discount_modal_info": "",
@@ -818,6 +822,7 @@
   "looking_multiple_licenses": "",
   "looks_like_youre_at": "",
   "lost_connection": "",
+  "main_bibliography_file_for_this_project": "",
   "main_document": "",
   "main_file_not_found": "",
   "main_navigation": "",
@@ -917,6 +922,7 @@
   "no_comments_or_suggestions": "",
   "no_existing_password": "",
   "no_folder": "",
+  "no_groups_selected": "",
   "no_image_files_found": "",
   "no_members": "",
   "no_messages": "",
@@ -1134,9 +1140,14 @@
   "redirect_url": "",
   "reduce_costs_group_licenses": "",
   "reference_error_relink_hint": "",
+  "reference_manager_searched_groups": "",
   "reference_managers": "",
   "reference_search": "",
+  "reference_search_setting": "",
+  "reference_search_settings": "",
+  "reference_search_style": "",
   "reference_sync": "",
+  "references_from_these_libraries_will_be_included_in_your_reference_search_results": "",
   "refresh": "",
   "refresh_page_after_linking_dropbox": "",
   "refresh_page_after_starting_free_trial": "",
@@ -1237,6 +1248,7 @@
   "search_in_your_projects": "",
   "search_match_case": "",
   "search_next": "",
+  "search_only_the_bib_files_in_your_project_only_by_citekeys": "",
   "search_previous": "",
   "search_projects": "",
   "search_references": "",
@@ -1268,6 +1280,7 @@
   "select_all_projects": "",
   "select_an_output_file": "",
   "select_an_output_file_figure_modal": "",
+  "select_bib_file": "",
   "select_cells_in_a_single_row_to_merge": "",
   "select_color": "",
   "select_folder_from_project": "",
@@ -1323,6 +1336,7 @@
   "showing_x_out_of_n_projects": "",
   "showing_x_results": "",
   "showing_x_results_of_total": "",
+  "simple_search_mode": "",
   "single_sign_on_sso": "",
   "skip": "",
   "something_not_right": "",
@@ -1488,6 +1502,7 @@
   "this_field_is_required": "",
   "this_grants_access_to_features_2": "",
   "this_is_a_labs_experiment": "",
+  "this_is_the_file_that_references_pulled_from_your_reference_manager_will_be_added_to": "",
   "this_project_already_has_maximum_editors": "",
   "this_project_exceeded_compile_timeout_limit_on_free_plan": "",
   "this_project_exceeded_editor_limit": "",
@@ -1512,8 +1527,10 @@
   "to_insert_or_move_a_caption_make_sure_tabular_is_directly_within_table": "",
   "to_keep_edit_access": "",
   "to_modify_your_subscription_go_to": "",
+  "to_pull_results_directly_from_your_reference_manager_enable_one_of_the_available_reference_manager_integrations": "",
   "to_use_text_wrapping_in_your_table_make_sure_you_include_the_array_package": "",
   "toggle_compile_options_menu": "",
+  "toggle_group": "",
   "token": "",
   "token_access_failure": "",
   "token_limit_reached": "",
@@ -1742,6 +1759,7 @@
   "writefull_settings_description": "",
   "x_changes_in": "",
   "x_changes_in_plural": "",
+  "x_libraries_accessed_in_this_project": "",
   "x_price_for_first_month": "",
   "x_price_for_first_year": "",
   "x_price_for_y_months": "",
@@ -1762,6 +1780,7 @@
   "you_are_on_x_plan_as_member_of_group_subscription_y_administered_by_z": "",
   "you_can_also_choose_to_view_anonymously_or_leave_the_project": "",
   "you_can_buy_this_plan_but_not_as_a_trial": "",
+  "you_can_manage_your_reference_manager_integrations_from_your_account_settings_page": "",
   "you_can_now_enable_sso": "",
   "you_can_now_log_in_sso": "",
   "you_can_only_add_n_people_to_edit_a_project": "",

+ 10 - 0
services/web/frontend/js/features/editor-left-menu/components/settings-menu.tsx

@@ -18,6 +18,13 @@ import SettingsSpellCheckLanguage from './settings/settings-spell-check-language
 import SettingsSyntaxValidation from './settings/settings-syntax-validation'
 import SettingsMathPreview from './settings/settings-math-preview'
 import { useFeatureFlag } from '@/shared/context/split-test-context'
+import importOverleafModules from '../../../../macros/import-overleaf-module.macro'
+import { ElementType } from 'react'
+
+const moduleSettings: Array<{
+  import: { default: ElementType }
+  path: string
+}> = importOverleafModules('settingsEntries')
 
 export default function SettingsMenu() {
   const { t } = useTranslation()
@@ -37,6 +44,9 @@ export default function SettingsMenu() {
         <SettingsDocument />
         <SettingsSpellCheckLanguage />
         <SettingsDictionary />
+        {moduleSettings.map(({ import: { default: Component }, path }) => (
+          <Component key={path} />
+        ))}
         <SettingsAutoComplete />
         <SettingsAutoCloseBrackets />
         <SettingsSyntaxValidation />

+ 18 - 0
services/web/locales/en.json

@@ -95,6 +95,7 @@
   "admin_user_created_message": "Created admin user, <a href=\"__link__\">Log in here</a> to continue",
   "administration_and_security": "Administration and security",
   "advanced_reference_search": "Advanced <0>reference search</0>",
+  "advanced_reference_search_mode": "Advanced reference search",
   "advanced_search": "Advanced Search",
   "aggregate_changed": "Changed",
   "aggregate_to": "to",
@@ -119,6 +120,7 @@
   "all_templates": "All Templates",
   "all_the_pros_of_our_standard_plan_plus_unlimited_collab": "All the pros of our standard plan, plus unlimited collaborators per project.",
   "all_these_experiments_are_available_exclusively": "All these experiments are available exclusively to members of the Labs program. If you sign up, you can choose which experiments you want to try.",
+  "allows_to_search_by_author_title_etc_possible_to_pull_results_directly_from_your_reference_manager_if_connected": "Allows to search by author, title, etc. Possible to pull results directly from your reference manager (if connected).",
   "already_have_an_account": "Already have an account?",
   "already_have_sl_account": "Already have an __appName__ account?",
   "already_subscribed_try_refreshing_the_page": "Already subscribed? Try refreshing the page.",
@@ -934,6 +936,8 @@
   "in_order_to_match_institutional_metadata_associated": "In order to match your institutional metadata, your account is associated with the email <b>__email__</b>.",
   "include_caption": "Include caption",
   "include_label": "Include label",
+  "include_results_from_your_reference_manager": "Include results from your reference manager",
+  "include_results_from_your_x_account": "Include results from your __provider__ account",
   "include_the_error_message_and_ai_response": "Include the error message and AI response",
   "increased_compile_timeout": "Increased compile timeout",
   "individuals": "Individuals",
@@ -1162,6 +1166,7 @@
   "looks_like_logged_in_with_email": "It looks like you’re already logged in to <b>__appName__</b> with the email <b>__email__</b>.",
   "looks_like_youre_at": "It looks like you’re at <0>__institutionName__</0>.",
   "lost_connection": "Lost Connection",
+  "main_bibliography_file_for_this_project": "Main bibliography file for this project",
   "main_document": "Main document",
   "main_file_not_found": "Unknown main document",
   "main_navigation": "Main navigation",
@@ -1301,6 +1306,7 @@
   "no_existing_password": "Please use the password reset form to set your password",
   "no_featured_templates": "No featured templates",
   "no_folder": "No folder",
+  "no_groups_selected": "No groups selected",
   "no_i_dont_need_these": "No, I don’t need these",
   "no_image_files_found": "No image files found",
   "no_members": "No members",
@@ -1610,11 +1616,16 @@
   "redirecting": "Redirecting",
   "reduce_costs_group_licenses": "You can cut down on paperwork and reduce costs with our discounted group licenses.",
   "reference_error_relink_hint": "If this error persists, try re-linking your account here:",
+  "reference_manager_searched_groups": "__provider__ search groups",
   "reference_managers": "Reference managers",
   "reference_search": "Advanced reference search",
   "reference_search_info_new": "Find your references easily—search by author, title, year, or journal.",
   "reference_search_info_v2": "It’s easy to find your references - you can search by author, title, year or journal. You can still search by citation key too.",
+  "reference_search_setting": "Reference search",
+  "reference_search_settings": "Reference search settings",
+  "reference_search_style": "Reference search style",
   "reference_sync": "Reference manager sync",
+  "references_from_these_libraries_will_be_included_in_your_reference_search_results": "References from these libraries will be included in your reference search results.",
   "refresh": "Refresh",
   "refresh_page_after_linking_dropbox": "Please refresh this page after linking your account to Dropbox.",
   "refresh_page_after_starting_free_trial": "Please refresh this page after starting your free trial.",
@@ -1754,6 +1765,7 @@
   "search_in_your_projects": "Search in your projects",
   "search_match_case": "Match case",
   "search_next": "next",
+  "search_only_the_bib_files_in_your_project_only_by_citekeys": "Search only the .bib files in your project, only by citekeys.",
   "search_previous": "previous",
   "search_projects": "Search projects",
   "search_references": "Search the .bib files in this project",
@@ -1786,6 +1798,7 @@
   "select_all_projects": "Select all projects",
   "select_an_output_file": "Select an Output File",
   "select_an_output_file_figure_modal": "Select an output file",
+  "select_bib_file": "Select .bib file",
   "select_cells_in_a_single_row_to_merge": "Select cells in a single row to merge",
   "select_color": "Select color __name__",
   "select_folder_from_project": "Select folder from project",
@@ -1852,6 +1865,7 @@
   "showing_x_results": "Showing __x__ results",
   "showing_x_results_of_total": "Showing __x__ results of __total__",
   "sign_up": "Sign up",
+  "simple_search_mode": "Simple search",
   "single_sign_on_sso": "Single Sign-On (SSO)",
   "site_description": "An online LaTeX editor that’s easy to use. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more.",
   "site_wide_option_available": "Site-wide option available",
@@ -2075,6 +2089,7 @@
   "this_field_is_required": "This field is required",
   "this_grants_access_to_features_2": "This grants you access to <0>__appName__</0> <0>__featureType__</0> features.",
   "this_is_a_labs_experiment": "This is a Labs experiment",
+  "this_is_the_file_that_references_pulled_from_your_reference_manager_will_be_added_to": "This is the file that references pulled from your reference manager will be added to.",
   "this_is_your_template": "This is your template from your project",
   "this_project_already_has_maximum_editors": "This project already has the maximum number of editors permitted on the owner’s plan. This means you can view but not edit the project.",
   "this_project_exceeded_compile_timeout_limit_on_free_plan": "This project exceeded the compile timeout limit on our free plan.",
@@ -2105,6 +2120,7 @@
   "to_keep_edit_access": "To keep edit access, ask the project owner to upgrade their plan or reduce the number of people with edit access.",
   "to_many_login_requests_2_mins": "This account has had too many login requests. Please wait 2 minutes before trying to log in again",
   "to_modify_your_subscription_go_to": "To modify your subscription go to",
+  "to_pull_results_directly_from_your_reference_manager_enable_one_of_the_available_reference_manager_integrations": "To pull results directly from your reference manager, <0>enable one of the available reference manager integrations</0>.",
   "to_use_text_wrapping_in_your_table_make_sure_you_include_the_array_package": "<0>Please note:</0> To use text wrapping in your table, make sure you include the <1>array</1> package in your document preamble:",
   "toggle_compile_options_menu": "Toggle compile options menu",
   "token": "token",
@@ -2375,6 +2391,7 @@
   "x_changes_in": "__count__ change in",
   "x_changes_in_plural": "__count__ changes in",
   "x_collaborators_per_project": "__collaboratorsCount__ collaborators per project",
+  "x_libraries_accessed_in_this_project": "__provider__ libraries accessed in this project",
   "x_price_for_first_month": "<0>__price__</0> for your first month",
   "x_price_for_first_year": "<0>__price__</0> for your first year",
   "x_price_for_y_months": "<0>__price__</0> for your first __discountMonths__ months",
@@ -2401,6 +2418,7 @@
   "you_are_on_x_plan_as_member_of_group_subscription_y_administered_by_z": "You are on our <0>__planName__</0> plan as a <1>member</1> of the group subscription <1>__groupName__</1> administered by <1>__adminEmail__</1>",
   "you_can_also_choose_to_view_anonymously_or_leave_the_project": "You can also choose to <0>view anonymously</0> (you will lose edit access) or <1>leave the project</1>.",
   "you_can_buy_this_plan_but_not_as_a_trial": "You can buy this plan but not as a trial, as you’ve completed a trial recently.",
+  "you_can_manage_your_reference_manager_integrations_from_your_account_settings_page": "You can manage your reference manager integrations from your <0>account settings page</0>.",
   "you_can_now_enable_sso": "You can now enable SSO on your Group settings page.",
   "you_can_now_log_in_sso": "You can now log in through your institution and if eligible you will receive <0>__appName__ Professional features</0>.",
   "you_can_only_add_n_people_to_edit_a_project": "You can only add __count__ person to edit a project with you on your current plan. Upgrade to add more.",