Enable remaining client-side dictionaries (#21192)

GitOrigin-RevId: da45ae4a93e99a0bb720e09a37c8e291c057cab9
This commit is contained in:
Alf Eaton 2024-10-17 14:28:26 +01:00 committed by Copybot
parent 4f9a056bea
commit 978ef6bd92
4 changed files with 5 additions and 6 deletions

View file

@ -462,11 +462,7 @@ module.exports = {
{ code: 'ca', dic: 'ca', name: 'Catalan' }, { code: 'ca', dic: 'ca', name: 'Catalan' },
{ code: 'hr', dic: 'hr_HR', name: 'Croatian' }, { code: 'hr', dic: 'hr_HR', name: 'Croatian' },
{ code: 'cs', dic: 'cs_CZ', name: 'Czech' }, { code: 'cs', dic: 'cs_CZ', name: 'Czech' },
{ { code: 'da', dic: 'da_DK', name: 'Danish' },
code: 'da',
// dic: 'da_DK', TODO: re-enable client spell check
name: 'Danish',
},
{ code: 'nl', dic: 'nl', name: 'Dutch' }, { code: 'nl', dic: 'nl', name: 'Dutch' },
{ code: 'dz', dic: 'dz', name: 'Dzongkha', server: false }, { code: 'dz', dic: 'dz', name: 'Dzongkha', server: false },
{ code: 'eo', dic: 'eo', name: 'Esperanto' }, { code: 'eo', dic: 'eo', name: 'Esperanto' },
@ -536,7 +532,7 @@ module.exports = {
{ code: 'ts', name: 'Tsonga' }, { code: 'ts', name: 'Tsonga' },
{ code: 'tn', name: 'Tswana' }, { code: 'tn', name: 'Tswana' },
{ code: 'tr_TR', dic: 'tr_TR', name: 'Turkish', server: false }, { 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: 'hsb', name: 'Upper Sorbian' },
{ code: 'uz_UZ', dic: 'uz_UZ', name: 'Uzbek', server: false }, { code: 'uz_UZ', dic: 'uz_UZ', name: 'Uzbek', server: false },
{ code: 'vi_VN', dic: 'vi_VN', name: 'Vietnamese', server: false }, { code: 'vi_VN', dic: 'vi_VN', name: 'Vietnamese', server: false },

View file

@ -14,6 +14,7 @@ em++ \
-s EXPORTED_FUNCTIONS="['_Hunspell_create', '_Hunspell_destroy', '_Hunspell_spell', '_Hunspell_suggest', '_Hunspell_free_list', '_Hunspell_add_dic', '_Hunspell_add', '_Hunspell_remove', '_free', '_malloc', 'FS']" \ -s EXPORTED_FUNCTIONS="['_Hunspell_create', '_Hunspell_destroy', '_Hunspell_spell', '_Hunspell_suggest', '_Hunspell_free_list', '_Hunspell_add_dic', '_Hunspell_add', '_Hunspell_remove', '_free', '_malloc', 'FS']" \
-s EXPORTED_RUNTIME_METHODS="['ccall', 'cwrap', 'getValue', 'stringToNewUTF8', 'UTF8ToString', 'WORKERFS']" \ -s EXPORTED_RUNTIME_METHODS="['ccall', 'cwrap', 'getValue', 'stringToNewUTF8', 'UTF8ToString', 'WORKERFS']" \
-s ENVIRONMENT=worker \ -s ENVIRONMENT=worker \
-s STACK_SIZE=5MB \
-s ALLOW_MEMORY_GROWTH \ -s ALLOW_MEMORY_GROWTH \
-lworkerfs.js \ -lworkerfs.js \
-O2 \ -O2 \

View file

@ -5,3 +5,5 @@ The files in this directory are:
* `hunspell.wasm`: [Hunspell](https://github.com/hunspell/hunspell) compiled to WebAssembly using Emscripten, via the [build.sh](../build.sh) script. * `hunspell.wasm`: [Hunspell](https://github.com/hunspell/hunspell) compiled to WebAssembly using Emscripten, via the [build.sh](../build.sh) script.
* `hunspell.mjs`: a JavaScript wrapper for the WebAssembly module, generated by Emscripten. * `hunspell.mjs`: a JavaScript wrapper for the WebAssembly module, generated by Emscripten.
* `hunspell.d.ts`: manually-created types for the exports from the JavaScript module. * `hunspell.d.ts`: manually-created types for the exports from the JavaScript module.
Note: To speed up compilation on ARM architecture (e.g. Apple M1), add `-arm64` to the Docker image tag in `Dockerfile`.