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

Allow selection of spell-check languages that are only supported in the client-side spell checker (#21053)

GitOrigin-RevId: 3bff6c14ee4c3cbf322c00ac29d23b60d89737bc
Alf Eaton 1 год назад
Родитель
Сommit
d8ce066898

+ 11 - 11
package-lock.json

@@ -8268,11 +8268,6 @@
       "resolved": "services/contacts",
       "link": true
     },
-    "node_modules/@overleaf/dictionaries": {
-      "version": "0.0.2",
-      "resolved": "https://github.com/overleaf/dictionaries/archive/refs/tags/v0.0.2.tar.gz",
-      "integrity": "sha512-p8QJhmQcZ33PEPe0Lqi7NfFkA9IbZNOvlPk3URKFTeb3qAHW+s5+U9qEnHp1s3xr7ZOgu6D5YPK0fRNOE9+zmg=="
-    },
     "node_modules/@overleaf/docstore": {
       "resolved": "services/docstore",
       "link": true
@@ -40344,7 +40339,7 @@
         "@node-oauth/oauth2-server": "^5.1.0",
         "@node-saml/passport-saml": "^4.0.4",
         "@overleaf/access-token-encryptor": "*",
-        "@overleaf/dictionaries": "https://github.com/overleaf/dictionaries/archive/refs/tags/v0.0.2.tar.gz",
+        "@overleaf/dictionaries": "https://github.com/overleaf/dictionaries/archive/refs/tags/v0.0.3.tar.gz",
         "@overleaf/fetch-utils": "*",
         "@overleaf/logger": "*",
         "@overleaf/metrics": "*",
@@ -40810,6 +40805,11 @@
         "zone.js": "0.11.4"
       }
     },
+    "services/web/node_modules/@overleaf/dictionaries": {
+      "version": "0.0.3",
+      "resolved": "https://github.com/overleaf/dictionaries/archive/refs/tags/v0.0.3.tar.gz",
+      "integrity": "sha512-/VJRrwY62Va2M4K5BE5UMruJHgKPGp0SGQkY/nrrQpBbHhMuTVoRtXkR+hcOfi1Iu6SO0vcwiK+L7xzs+fZmXQ=="
+    },
     "services/web/node_modules/@sentry/browser": {
       "version": "7.46.0",
       "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.46.0.tgz",
@@ -49073,10 +49073,6 @@
         }
       }
     },
-    "@overleaf/dictionaries": {
-      "version": "https://github.com/overleaf/dictionaries/archive/refs/tags/v0.0.2.tar.gz",
-      "integrity": "sha512-p8QJhmQcZ33PEPe0Lqi7NfFkA9IbZNOvlPk3URKFTeb3qAHW+s5+U9qEnHp1s3xr7ZOgu6D5YPK0fRNOE9+zmg=="
-    },
     "@overleaf/docstore": {
       "version": "file:services/docstore",
       "requires": {
@@ -50087,7 +50083,7 @@
         "@opentelemetry/semantic-conventions": "^1.15.2",
         "@overleaf/access-token-encryptor": "*",
         "@overleaf/codemirror-tree-view": "^0.1.3",
-        "@overleaf/dictionaries": "https://github.com/overleaf/dictionaries/archive/refs/tags/v0.0.2.tar.gz",
+        "@overleaf/dictionaries": "https://github.com/overleaf/dictionaries/archive/refs/tags/v0.0.3.tar.gz",
         "@overleaf/fetch-utils": "*",
         "@overleaf/logger": "*",
         "@overleaf/metrics": "*",
@@ -50475,6 +50471,10 @@
             "@opentelemetry/sdk-trace-web": "^1.8.0"
           }
         },
+        "@overleaf/dictionaries": {
+          "version": "https://github.com/overleaf/dictionaries/archive/refs/tags/v0.0.3.tar.gz",
+          "integrity": "sha512-/VJRrwY62Va2M4K5BE5UMruJHgKPGp0SGQkY/nrrQpBbHhMuTVoRtXkR+hcOfi1Iu6SO0vcwiK+L7xzs+fZmXQ=="
+        },
         "@sentry/browser": {
           "version": "7.46.0",
           "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.46.0.tgz",

+ 1 - 1
services/web/app/src/infrastructure/PackageVersions.js

@@ -1,6 +1,6 @@
 const version = {
   mathjax: '3.2.2',
-  dictionaries: '0.0.2',
+  dictionaries: '0.0.3',
 }
 
 module.exports = {

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

@@ -505,6 +505,8 @@ module.exports = {
     { code: 'ne_NP', dic: 'ne_NP', name: 'Nepali', server: false },
     { code: 'ns', name: 'Northern Sotho' },
     { code: 'no', name: 'Norwegian' },
+    { code: 'nb_NO', dic: 'nb_NO', name: 'Norwegian (Bokmål)', server: false },
+    { code: 'nn_NO', dic: 'nn_NO', name: 'Norwegian (Nynorsk)', server: false },
     { code: 'oc_FR', dic: 'oc_FR', name: 'Occitan', server: false },
     { code: 'fa', dic: 'fa_IR', name: 'Persian' },
     { code: 'pl', dic: 'pl_PL', name: 'Polish' },
@@ -534,7 +536,7 @@ module.exports = {
     { code: 'ts', name: 'Tsonga' },
     { code: 'tn', name: 'Tswana' },
     { code: 'tr_TR', dic: 'tr_TR', name: 'Turkish', server: false },
-    { code: 'uk_UA', dic: 'uk_UA', name: 'Ukrainian', server: false },
+    // { code: 'uk_UA', dic: 'uk_UA', name: 'Ukrainian', server: false },
     { code: 'hsb', name: 'Upper Sorbian' },
     { code: 'uz_UZ', dic: 'uz_UZ', name: 'Uzbek', server: false },
     { code: 'vi_VN', dic: 'vi_VN', name: 'Vietnamese', server: false },

+ 2 - 2
services/web/frontend/js/features/editor-left-menu/components/settings/settings-spell-check-language.tsx

@@ -6,8 +6,8 @@ import SettingsMenuSelect from './settings-menu-select'
 import type { Optgroup } from './settings-menu-select'
 import { useFeatureFlag } from '@/shared/context/split-test-context'
 
-// TODO: set to true when ready to show new languages that are only available in the client
-const showClientOnlyLanguages = false
+// allow selection of spell-check languages that are only supported in the client-side spell checker
+const showClientOnlyLanguages = true
 
 export default function SettingsSpellCheckLanguage() {
   const { t } = useTranslation()

+ 1 - 1
services/web/package.json

@@ -76,7 +76,7 @@
     "@node-oauth/oauth2-server": "^5.1.0",
     "@node-saml/passport-saml": "^4.0.4",
     "@overleaf/access-token-encryptor": "*",
-    "@overleaf/dictionaries": "https://github.com/overleaf/dictionaries/archive/refs/tags/v0.0.2.tar.gz",
+    "@overleaf/dictionaries": "https://github.com/overleaf/dictionaries/archive/refs/tags/v0.0.3.tar.gz",
     "@overleaf/fetch-utils": "*",
     "@overleaf/logger": "*",
     "@overleaf/metrics": "*",