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

Update "Visual Editor not available" message (#13874)

GitOrigin-RevId: 5516bf74d1fa9046f4ca4b5d6c23d3a3b8e468f5
Alf Eaton 3 лет назад
Родитель
Сommit
05165682ba

+ 1 - 1
services/web/frontend/extracted-translations.json

@@ -868,7 +868,6 @@
   "review_your_peers_work": "",
   "revoke": "",
   "revoke_invite": "",
-  "rich_text_is_only_available_for_tex_files": "",
   "role": "",
   "save": "",
   "save_or_cancel-cancel": "",
@@ -1023,6 +1022,7 @@
   "thanks_for_subscribing_you_help_sl": "",
   "thanks_settings_updated": "",
   "the_following_files_already_exist_in_this_project": "",
+  "the_visual_editor_is_only_available_for_tex_files": "",
   "the_width_you_choose_here_is_based_on_the_width_of_the_text_in_your_document": "",
   "their_projects_will_be_transferred_to_another_user": "",
   "then_x_price_per_month": "",

+ 4 - 3
services/web/frontend/js/features/source-editor/components/editor-switch-legacy.tsx

@@ -10,8 +10,9 @@ import SplitTestBadge from '../../../shared/components/split-test-badge'
 function Badge() {
   const content = (
     <>
-      Overleaf has upgraded the source editor. You can still use the old editor
-      by selecting "Source (legacy)".
+      Overleaf has upgraded the source editor.
+      <br />
+      You can still use the old editor by selecting "Source (legacy)".
       <br />
       <br />
       Click to learn more and give feedback
@@ -168,7 +169,7 @@ const RichTextToggle: FC<{
   if (disabled) {
     return (
       <Tooltip
-        description={t('rich_text_is_only_available_for_tex_files')}
+        description={t('the_visual_editor_is_only_available_for_tex_files')}
         id="rich-text-toggle-tooltip"
         overlayProps={{ placement: 'bottom' }}
         tooltipProps={{ className: 'tooltip-wide' }}

+ 1 - 1
services/web/frontend/js/features/source-editor/components/editor-switch.tsx

@@ -114,7 +114,7 @@ const RichTextToggle: FC<{
   if (disabled) {
     return (
       <Tooltip
-        description={t('rich_text_is_only_available_for_tex_files')}
+        description={t('the_visual_editor_is_only_available_for_tex_files')}
         id="rich-text-toggle-tooltip"
         overlayProps={{ placement: 'bottom' }}
         tooltipProps={{ className: 'tooltip-wide' }}

+ 0 - 4
services/web/frontend/stylesheets/components/beta-badges.less

@@ -65,7 +65,3 @@
 .split-test-badge-tooltip .tooltip-inner {
   white-space: pre-wrap;
 }
-
-.tooltip-wide .tooltip-inner {
-  min-width: 275px;
-}

+ 4 - 0
services/web/frontend/stylesheets/components/tooltip.less

@@ -42,6 +42,10 @@
   text-decoration: none;
   background-color: @tooltip-bg;
   border-radius: @border-radius-base;
+
+  .tooltip-wide & {
+    max-width: unset;
+  }
 }
 
 // Arrows

+ 1 - 1
services/web/locales/en.json

@@ -1414,7 +1414,6 @@
   "review_your_peers_work": "Review your peers’ work",
   "revoke": "Revoke",
   "revoke_invite": "Revoke Invite",
-  "rich_text_is_only_available_for_tex_files": "Rich Text is only available for TeX files",
   "ro": "Romanian",
   "role": "Role",
   "ru": "Russian",
@@ -1648,6 +1647,7 @@
   "the_required_parameters_were_not_supplied": "The link to open this content on Overleaf was missing some required parameters. If this keeps happening for links on a particular site, please report this to them.",
   "the_supplied_parameters_were_invalid": "The link to open this content on Overleaf included some invalid parameters. If this keeps happening for links on a particular site, please report this to them.",
   "the_supplied_uri_is_invalid": "The link to open this content on Overleaf included an invalid URI. If this keeps happening for links on a particular site, please report this to them.",
+  "the_visual_editor_is_only_available_for_tex_files": "The Visual Editor is only available for TeX files",
   "the_width_you_choose_here_is_based_on_the_width_of_the_text_in_your_document": "The width you choose here is based on the width of the text in your document. Alternatively, you can customize the image size directly in the LaTeX code.",
   "their_projects_will_be_transferred_to_another_user": "Their projects will all be transferred to another user of your choice",
   "theme": "Theme",