diff --git a/changelog.md b/changelog.md index daefdb5ae..af11fd013 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ## Unreleased +* `FIX` Typos in locale and config docs, and the misspelled `WINDOW_APPLY_WHIT_SETTING` and `WINDOW_APPLY_WHITOUT_SETTING` locale keys [#3480](https://github.com/LuaLS/lua-language-server/issues/3480) [#3481](https://github.com/LuaLS/lua-language-server/issues/3481) [#3482](https://github.com/LuaLS/lua-language-server/issues/3482) [#3483](https://github.com/LuaLS/lua-language-server/issues/3483) [#3484](https://github.com/LuaLS/lua-language-server/issues/3484) ## 3.19.2 `2026-10-13` diff --git a/doc/en-us/config.md b/doc/en-us/config.md index 8a99f88be..eb225daab 100644 --- a/doc/en-us/config.md +++ b/doc/en-us/config.md @@ -290,7 +290,7 @@ true # diagnostics.disable -Disabled diagnostic (Use code in hover brackets). +Disable diagnostics (Use code in hover brackets). ## type @@ -1446,7 +1446,7 @@ integer # doc.packageName -Treat specific field names as package, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are package, witch can only be accessed in the file where the definition is located. +Treat specific field names as package, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are package, which can only be accessed in the file where the definition is located. ## type @@ -1462,7 +1462,7 @@ Array # doc.privateName -Treat specific field names as private, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are private, witch can only be accessed in the class where the definition is located. +Treat specific field names as private, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are private, which can only be accessed in the class where the definition is located. ## type @@ -1478,7 +1478,7 @@ Array # doc.protectedName -Treat specific field names as protected, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are protected, witch can only be accessed in the class where the definition is located and its subclasses. +Treat specific field names as protected, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are protected, which can only be accessed in the class where the definition is located and its subclasses. ## type diff --git a/locale/en-us/meta.lua b/locale/en-us/meta.lua index a153780bd..cc86fd4ff 100644 --- a/locale/en-us/meta.lua +++ b/locale/en-us/meta.lua @@ -51,7 +51,7 @@ This function is a generic interface to the garbage collector. It performs diffe * `"step"`: performs a garbage-collection step. The step "size" is controlled by arg. With a zero value, the collector will perform one basic (indivisible) step. For non-zero values, the collector will perform as if that amount of memory (in KBytes) had been allocated by Lua. Returns true if the step finished a collection cycle. * `"setpause"`: sets arg as the new value for the pause of the collector (see §2.5). Returns the previous value for pause. * `"setstepmul"`: sets arg as the new value for the step multiplier of the collector (see §2.5). Returns the previous value for step. -* "isrunning"`: returns a boolean that tells whether the collector is running (i.e., not stopped). +* `"isrunning"`: returns a boolean that tells whether the collector is running (i.e., not stopped). ]] collectgarbage54 = @@ -854,7 +854,7 @@ table.new = table.clear = [[This clears all keys and values from a table, but preserves the allocated array/hash sizes. This is useful when a table, which is linked from multiple places, needs to be cleared and/or when recycling a table for use by the same context. This avoids managing backlinks, saves an allocation and the overhead of incremental array/hash part growth. The function needs to be required before use. ```lua - require("table.clear"). + require("table.clear") ``` Please note this function is meant for very specific situations. In most cases it's better to replace the (usually single) link with a new table and let the GC do its work. ]] diff --git a/locale/en-us/script.lua b/locale/en-us/script.lua index f977d66f8..f4a6bd234 100644 --- a/locale/en-us/script.lua +++ b/locale/en-us/script.lua @@ -600,9 +600,9 @@ WINDOW_MANUAL_CONFIG_SET = '`{key}`: set to `{value:q}` ;' WINDOW_MANUAL_CONFIG_PROP = '`{key}`: set the property `{prop}` to `{value:q}`;' -WINDOW_APPLY_WHIT_SETTING = +WINDOW_APPLY_WITH_SETTING = 'Apply and modify settings' -WINDOW_APPLY_WHITOUT_SETTING = +WINDOW_APPLY_WITHOUT_SETTING = 'Apply but do not modify settings' WINDOW_ASK_APPLY_LIBRARY = 'Do you need to configure your work environment as `{}`?' @@ -832,7 +832,7 @@ function setFontStyle(style) end local enums = { READ = 0, WRITE = 1, - CLOSED = 2 + CLOSE = 2 } ---@alias FileStates diff --git a/locale/en-us/setting.lua b/locale/en-us/setting.lua index 3dd917c87..1e326b116 100644 --- a/locale/en-us/setting.lua +++ b/locale/en-us/setting.lua @@ -126,7 +126,7 @@ config.runtime.meta = config.diagnostics.enable = "Enable diagnostics." config.diagnostics.disable = -"Disabled diagnostic (Use code in hover brackets)." +"Disable diagnostics (Use code in hover brackets)." config.diagnostics.globals = "Defined global variables." config.diagnostics.globalsRegex = diff --git a/locale/es-419/meta.lua b/locale/es-419/meta.lua index 29e450ee5..148054842 100644 --- a/locale/es-419/meta.lua +++ b/locale/es-419/meta.lua @@ -51,7 +51,7 @@ Esta función es una interfaz genérica para el recolector de basura. Realiza di * `"step"`: realiza un paso de recolección de basura. El "tamaño" del paso es controlado por arg. Con un valor cero, el recolector realizará un paso básico (indivisible). Para valores distintos de cero, el recolector se comportará como si esa cantidad de memoria (en KBytes) hubiera sido asignada por Lua. Retorna true si el paso terminó un ciclo de recolección. * `"setpause"`: establece arg como el nuevo valor para la pausa del recolector (ver §2.5). Retorna el valor anterior de pausa. * `"setstepmul"`: establece arg como el nuevo valor para el multiplicador de paso del recolector (ver §2.5). Retorna el valor anterior del multiplicador de paso. -* "isrunning"`: retorna un booleano que indica si el recolector está en ejecución (es decir, no detenido). +* `"isrunning"`: retorna un booleano que indica si el recolector está en ejecución (es decir, no detenido). ]] collectgarbage54 = @@ -853,7 +853,7 @@ table.new = table.clear = [[Esta función barre con todas las claves y valores de una tabla, pero preserva los tamaños de arreglo/diccionario reservados en memoria. Esta función es útil cuando una tabla que ha sido enlazada desde múltiples otras partes requiere ser vaciada y/o cuando se recicla una tabla para ser usada en el mismo contexto. Esto previene manejar enlaces de vuelta, previene tener que asignar memoria y el costo operativo del crecimiento incremental de la parte arreglo/diccionario. ```lua - require("table.clear"). + require("table.clear") ``` Nótese que esta función está hecha para situaciones muy específicas. En la mayoría de los casos es mejor reemplazar el enlace (el cual suele ser simple) con una tabla nueva y permitir que el recolector de basura haga su trabajo. ]] diff --git a/locale/es-419/script.lua b/locale/es-419/script.lua index 340a5232c..d6ea1a937 100644 --- a/locale/es-419/script.lua +++ b/locale/es-419/script.lua @@ -600,9 +600,9 @@ WINDOW_MANUAL_CONFIG_SET = '`{key}`: asignado a `{value:q}` ;' WINDOW_MANUAL_CONFIG_PROP = '`{key}`: la propiedad `{prop}` asignada a `{value:q}`;' -WINDOW_APPLY_WHIT_SETTING = +WINDOW_APPLY_WITH_SETTING = 'Aplica y modifica la configuración' -WINDOW_APPLY_WHITOUT_SETTING = +WINDOW_APPLY_WITHOUT_SETTING = 'Aplica pero sin modificar la configuración' WINDOW_ASK_APPLY_LIBRARY = '¿Necesita configurar su ambiente de trabajo como `{}`?' diff --git a/locale/ja-jp/meta.lua b/locale/ja-jp/meta.lua index 114f1f270..27e271b06 100644 --- a/locale/ja-jp/meta.lua +++ b/locale/ja-jp/meta.lua @@ -51,7 +51,7 @@ collectgarbage53 = * `"step"`:ガベージコレクションステップを実行します。ステップの「サイズ」は arg によって制御されます。値がゼロの場合、コレクタは 1 つの基本(不可分な)ステップを実行します。ゼロ以外の値の場合、コレクタはその量のメモリ(キロバイト単位)が Lua によって割り当てられたかのように動作します。ステップが収集サイクルを完了した場合、true を返します。 * `"setpause"`:arg をコレクタの一時停止の新しい値として設定します(§2.5 参照)。一時停止の以前の値を返します。 * `"setstepmul"`:arg をコレクタのステップ乗数の新しい値として設定します(§2.5 参照)。ステップ乗数の以前の値を返します。 -* "isrunning"`:コレクタが実行中かどうか(つまり、停止されていないか)を示すブール値を返します。 +* `"isrunning"`:コレクタが実行中かどうか(つまり、停止されていないか)を示すブール値を返します。 ]] collectgarbage54 = @@ -850,7 +850,7 @@ table.new = table.clear = [[テーブルの全キーと値を消去しますが、割り当て済みの配列/ハッシュ領域は保持します。複数箇所から参照されるテーブルをクリアする場合や、同じコンテキストで再利用する場合に有用で、バックリンク管理や再割り当て・漸増拡張のオーバーヘッドを避けられます。使用前に require が必要です。 ```lua - require("table.clear"). + require("table.clear") ``` この関数はごく限られたケース向けです。多くの場合はリンク先を新しいテーブルに置き換え、GC に任せる方が適切です。 ]] diff --git a/locale/ja-jp/script.lua b/locale/ja-jp/script.lua index 10c6745ef..4254a81ed 100644 --- a/locale/ja-jp/script.lua +++ b/locale/ja-jp/script.lua @@ -600,9 +600,9 @@ WINDOW_MANUAL_CONFIG_SET = '`{key}` の値を `{value:q}` に設定します;' WINDOW_MANUAL_CONFIG_PROP = '`{key}` のプロパティ `{prop}` を `{value:q}` に設定します;' -WINDOW_APPLY_WHIT_SETTING = +WINDOW_APPLY_WITH_SETTING = '設定を変更して適用します' -WINDOW_APPLY_WHITOUT_SETTING = +WINDOW_APPLY_WITHOUT_SETTING = '設定を変更せずに適用します' WINDOW_ASK_APPLY_LIBRARY = '作業環境を `{}` に設定しますか?' @@ -833,7 +833,7 @@ function setFontStyle(style) end local enums = { READ = 0, WRITE = 1, - CLOSED = 2 + CLOSE = 2 } ---@alias FileStates diff --git a/locale/pt-br/meta.lua b/locale/pt-br/meta.lua index e30b3ce2c..2972f77db 100644 --- a/locale/pt-br/meta.lua +++ b/locale/pt-br/meta.lua @@ -51,7 +51,7 @@ Esta função é uma interface genérica para o coletor de lixo. Ela executa dif * `"step"`: executa uma etapa de coleta de lixo. O "tamanho" da etapa é controlado por arg. Com um valor zero, o coletor executará uma etapa básica (indivisível). Para valores diferentes de zero, o coletor se comportará como se essa quantidade de memória (em KBytes) tivesse sido alocada pelo Lua. Retorna true se a etapa terminou um ciclo de coleta. * `"setpause"`: define arg como o novo valor para a pausa do coletor (ver §2.5). Retorna o valor anterior da pausa. * `"setstepmul"`: define arg como o novo valor para o multiplicador de etapa do coletor (ver §2.5). Retorna o valor anterior do multiplicador de etapa. -* "isrunning"`: retorna um booleano que indica se o coletor está em execução (ou seja, não parado). +* `"isrunning"`: retorna um booleano que indica se o coletor está em execução (ou seja, não parado). ]] collectgarbage54 = @@ -854,7 +854,7 @@ table.new = table.clear = [[Limpa todas as chaves e valores de uma tabela, mas preserva os tamanhos alocados das partes array/hash. É útil quando uma tabela, que está vinculada de vários lugares, precisa ser limpa e/ou quando se recicla uma tabela para uso pelo mesmo contexto. Evita gerenciar backlinks, economiza uma alocação e o custo de crescimento incremental das partes array/hash. A função precisa ser requerida antes do uso. ```lua - require("table.clear"). + require("table.clear") ``` Observe que esta função é destinada a situações muito específicas. Na maioria dos casos, é melhor substituir o link (único geralmente) por uma nova tabela e deixar o GC fazer seu trabalho. ]] diff --git a/locale/pt-br/script.lua b/locale/pt-br/script.lua index 6f7148fdd..fa634abdd 100644 --- a/locale/pt-br/script.lua +++ b/locale/pt-br/script.lua @@ -600,9 +600,9 @@ WINDOW_MANUAL_CONFIG_SET = '`{key}`: defini como `{value:q}` ;' WINDOW_MANUAL_CONFIG_PROP = '`{key}`: define a propriedade `{prop}` para `{value:q}`;' -WINDOW_APPLY_WHIT_SETTING = +WINDOW_APPLY_WITH_SETTING = 'Aplicar e modificar configurações' -WINDOW_APPLY_WHITOUT_SETTING = +WINDOW_APPLY_WITHOUT_SETTING = 'Aplicar mas não modificar configurações' WINDOW_ASK_APPLY_LIBRARY = 'Você precisa configurar seu ambiente de trabalho como `{}`?' @@ -832,7 +832,7 @@ function setFontStyle(style) end local enums = { READ = 0, WRITE = 1, - CLOSED = 2 + CLOSE = 2 } ---@alias FileStates diff --git a/locale/zh-cn/meta.lua b/locale/zh-cn/meta.lua index b709fcdd5..c923e2bb9 100644 --- a/locale/zh-cn/meta.lua +++ b/locale/zh-cn/meta.lua @@ -51,7 +51,7 @@ collectgarbage53 = * `"step"`:执行一次垃圾收集步骤。步骤的"大小"由 arg 控制。值为零时,收集器将执行一个基本(不可分割的)步骤。对于非零值,收集器的行为就像 Lua 分配了相应数量的内存(以 K 字节为单位)。如果步骤完成了一个收集周期则返回 true。 * `"setpause"`:将 arg 设置为收集器间歇率的新值(参见 §2.5)。返回间歇率的先前值。 * `"setstepmul"`:将 arg 设置为收集器步进倍率的新值(参见 §2.5)。返回步进倍率的先前值。 -* "isrunning"`:返回一个布尔值,指示收集器是否正在运行(即未停止)。 +* `"isrunning"`:返回一个布尔值,指示收集器是否正在运行(即未停止)。 ]] collectgarbage54 = @@ -833,7 +833,7 @@ table.new = table.clear = [[清除表中所有的键值对,但是保留已经分配的数组或哈希的大小。当需要清除从多个位置链接的表和/或回收表供同一上下文使用时,这将十分有用。这避免了管理反向链接,节省了分配和增量数组或哈希部分增长的开销。在使用前需要先引入。 ```lua - require("table.clear"). + require("table.clear") ``` 请注意,此功能用于非常特殊的情况。在大多数情况下,最好用新表替换(通常是单个)链接,GC 完成回收工作。 ]] diff --git a/locale/zh-cn/script.lua b/locale/zh-cn/script.lua index f5d45ec09..c1afa8b08 100644 --- a/locale/zh-cn/script.lua +++ b/locale/zh-cn/script.lua @@ -600,9 +600,9 @@ WINDOW_MANUAL_CONFIG_SET = '将 `{key}` 的值设置为 `{value:q}`;' WINDOW_MANUAL_CONFIG_PROP = '将 `{key}` 的属性 `{prop}` 设置为 `{value:q}`;' -WINDOW_APPLY_WHIT_SETTING = +WINDOW_APPLY_WITH_SETTING = '应用并修改设置' -WINDOW_APPLY_WHITOUT_SETTING = +WINDOW_APPLY_WITHOUT_SETTING = '应用但不修改设置' WINDOW_ASK_APPLY_LIBRARY = '是否需要将你的工作环境配置为 `{}` ?' @@ -832,7 +832,7 @@ function setFontStyle(style) end local enums = { READ = 0, WRITE = 1, - CLOSED = 2 + CLOSE = 2 } ---@alias FileStates diff --git a/locale/zh-tw/meta.lua b/locale/zh-tw/meta.lua index e0c385187..92d42e67c 100644 --- a/locale/zh-tw/meta.lua +++ b/locale/zh-tw/meta.lua @@ -51,7 +51,7 @@ collectgarbage53 = * `"step"`:執行一次垃圾回收步驟。步驟的「大小」由 arg 控制。值為零時,回收器將執行一個基本(不可分割的)步驟。對於非零值,回收器的行為就像 Lua 分配了相應數量的記憶體(以 K 位元組為單位)。如果步驟完成了一個回收週期則回傳 true。 * `"setpause"`:將 arg 設定為回收器間歇率的新值(參見 §2.5)。回傳間歇率的先前值。 * `"setstepmul"`:將 arg 設定為回收器步進倍率的新值(參見 §2.5)。回傳步進倍率的先前值。 -* "isrunning"`:回傳一個布林值,指示回收器是否正在執行(即未停止)。 +* `"isrunning"`:回傳一個布林值,指示回收器是否正在執行(即未停止)。 ]] collectgarbage54 = diff --git a/locale/zh-tw/script.lua b/locale/zh-tw/script.lua index 48c1c0af0..ddfc8b6a9 100644 --- a/locale/zh-tw/script.lua +++ b/locale/zh-tw/script.lua @@ -600,9 +600,9 @@ WINDOW_MANUAL_CONFIG_SET = '將 `{key}` 的值設定為 `{value:q}`;' WINDOW_MANUAL_CONFIG_PROP = '將 `{key}` 的屬性 `{prop}` 設定為 `{value:q}`;' -WINDOW_APPLY_WHIT_SETTING = +WINDOW_APPLY_WITH_SETTING = '套用並修改設定' -WINDOW_APPLY_WHITOUT_SETTING = +WINDOW_APPLY_WITHOUT_SETTING = '套用但不修改設定' WINDOW_ASK_APPLY_LIBRARY = '是否需要將你的工作環境配置為 `{}` ?' @@ -832,7 +832,7 @@ function setFontStyle(style) end local enums = { READ = 0, WRITE = 1, - CLOSED = 2 + CLOSE = 2 } ---@alias FileStates diff --git a/script/library.lua b/script/library.lua index 6a38c573c..683236691 100644 --- a/script/library.lua +++ b/script/library.lua @@ -487,8 +487,8 @@ local function askFor3rd(uri, cfg, checkThirdParty) return nil elseif checkThirdParty == 'Ask' then hasAsked[cfg.name] = true - local applyAndSetConfig = lang.script.WINDOW_APPLY_WHIT_SETTING - local applyInMemory = lang.script.WINDOW_APPLY_WHITOUT_SETTING + local applyAndSetConfig = lang.script.WINDOW_APPLY_WITH_SETTING + local applyInMemory = lang.script.WINDOW_APPLY_WITHOUT_SETTING local dontShowAgain = lang.script.WINDOW_DONT_SHOW_AGAIN local result = client.awaitRequestMessage('Info' , lang.script('WINDOW_ASK_APPLY_LIBRARY', cfg.name)