From 5ec1d5a88256f60d01c6370e089549f697e16d0c Mon Sep 17 00:00:00 2001 From: Tony <68118705+Legend-Master@users.noreply.github.com> Date: Mon, 20 Apr 2026 00:32:54 +0800 Subject: [PATCH] docs: nsis default languages (#15260) * docs: nsis default languages * Fix links and add `.` --- crates/tauri-bundler/src/bundle/settings.rs | 7 ++++--- crates/tauri-cli/config.schema.json | 4 ++-- crates/tauri-runtime-wry/src/lib.rs | 2 +- crates/tauri-schema-generator/schemas/config.schema.json | 4 ++-- crates/tauri-utils/src/config.rs | 5 +++-- crates/tauri/src/scope/fs.rs | 2 +- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/crates/tauri-bundler/src/bundle/settings.rs b/crates/tauri-bundler/src/bundle/settings.rs index 815f342cd592..7580a0adbc95 100644 --- a/crates/tauri-bundler/src/bundle/settings.rs +++ b/crates/tauri-bundler/src/bundle/settings.rs @@ -479,9 +479,10 @@ pub struct NsisSettings { pub uninstaller_header_image: Option, /// Whether the installation will be for all users or just the current user. pub install_mode: NSISInstallerMode, - /// A list of installer languages. + /// A list of installer languages. Default to `["English"]` if not set. + /// /// By default the OS language is used. If the OS language is not in the list of languages, the first language will be used. - /// To allow the user to select the language, set `display_language_selector` to `true`. + /// To allow the user to select the language, set [`Self::display_language_selector`] to `true`. /// /// See for the complete list of languages. pub languages: Option>, @@ -490,7 +491,7 @@ pub struct NsisSettings { /// /// See for an example `.nsi` file. /// - /// **Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`]languages array, + /// **Note**: the key must be a valid NSIS language and it must be added to the [`Self::languages`] array, pub custom_language_files: Option>, /// Whether to display a language selector dialog before the installer and uninstaller windows are rendered or not. /// By default the OS language is selected, with a fallback to the first language in the `languages` array. diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index c759643a9ad8..2fefb6a64b2f 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -3056,7 +3056,7 @@ ] }, "languages": { - "description": "A list of installer languages.\n By default the OS language is used. If the OS language is not in the list of languages, the first language will be used.\n To allow the user to select the language, set `display_language_selector` to `true`.\n\n See for the complete list of languages.", + "description": "A list of installer languages. Default to `[\"English\"]` if not set.\n\n By default the OS language is used. If the OS language is not in the list of languages, the first language will be used.\n To allow the user to select the language, set `display_language_selector` to `true`.\n\n See for the complete list of languages.", "type": [ "array", "null" @@ -3066,7 +3066,7 @@ } }, "customLanguageFiles": { - "description": "A key-value pair where the key is the language and the\n value is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.\n\n See for an example `.nsh` file.\n\n **Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`] languages array,", + "description": "A key-value pair where the key is the language and the\n value is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.\n\n See for an example `.nsh` file.\n\n **Note**: the key must be a valid NSIS language and it must be added to the [`Self::languages`] array,", "type": [ "object", "null" diff --git a/crates/tauri-runtime-wry/src/lib.rs b/crates/tauri-runtime-wry/src/lib.rs index 6c537de6cf43..cbb59a30b736 100644 --- a/crates/tauri-runtime-wry/src/lib.rs +++ b/crates/tauri-runtime-wry/src/lib.rs @@ -818,7 +818,7 @@ impl WindowBuilder for WindowBuilderWrapper { #[cfg(target_os = "macos")] { // TODO: find a proper way to prevent webview being pushed out of the window. - // Workround for issue: https://github.com/tauri-apps/tauri/issues/10225 + // Workaround for issue: https://github.com/tauri-apps/tauri/issues/10225 // The window requires `NSFullSizeContentViewWindowMask` flag to prevent devtools // pushing the content view out of the window. // By setting the default style to `TitleBarStyle::Visible` should fix the issue for most of the users. diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index c759643a9ad8..2fefb6a64b2f 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -3056,7 +3056,7 @@ ] }, "languages": { - "description": "A list of installer languages.\n By default the OS language is used. If the OS language is not in the list of languages, the first language will be used.\n To allow the user to select the language, set `display_language_selector` to `true`.\n\n See for the complete list of languages.", + "description": "A list of installer languages. Default to `[\"English\"]` if not set.\n\n By default the OS language is used. If the OS language is not in the list of languages, the first language will be used.\n To allow the user to select the language, set `display_language_selector` to `true`.\n\n See for the complete list of languages.", "type": [ "array", "null" @@ -3066,7 +3066,7 @@ } }, "customLanguageFiles": { - "description": "A key-value pair where the key is the language and the\n value is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.\n\n See for an example `.nsh` file.\n\n **Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`] languages array,", + "description": "A key-value pair where the key is the language and the\n value is the path to a custom `.nsh` file that holds the translated text for tauri's custom messages.\n\n See for an example `.nsh` file.\n\n **Note**: the key must be a valid NSIS language and it must be added to the [`Self::languages`] array,", "type": [ "object", "null" diff --git a/crates/tauri-utils/src/config.rs b/crates/tauri-utils/src/config.rs index 78df2f4fa56b..e74c93ed93b2 100644 --- a/crates/tauri-utils/src/config.rs +++ b/crates/tauri-utils/src/config.rs @@ -873,7 +873,8 @@ pub struct NsisConfig { /// Whether the installation will be for all users or just the current user. #[serde(default, alias = "install-mode")] pub install_mode: NSISInstallerMode, - /// A list of installer languages. + /// A list of installer languages. Default to `["English"]` if not set. + /// /// By default the OS language is used. If the OS language is not in the list of languages, the first language will be used. /// To allow the user to select the language, set `display_language_selector` to `true`. /// @@ -884,7 +885,7 @@ pub struct NsisConfig { /// /// See for an example `.nsh` file. /// - /// **Note**: the key must be a valid NSIS language and it must be added to [`NsisConfig`] languages array, + /// **Note**: the key must be a valid NSIS language and it must be added to the [`Self::languages`] array, pub custom_language_files: Option>, /// Whether to display a language selector dialog before the installer and uninstaller windows are rendered or not. /// By default the OS language is selected, with a fallback to the first language in the `languages` array. diff --git a/crates/tauri/src/scope/fs.rs b/crates/tauri/src/scope/fs.rs index 36a9a1ebc53f..2e978f3a95ff 100644 --- a/crates/tauri/src/scope/fs.rs +++ b/crates/tauri/src/scope/fs.rs @@ -77,7 +77,7 @@ fn push_pattern, F: Fn(&str) -> Result crate::Result<()> { - // Reconstruct pattern path components with appropraite separator + // Reconstruct pattern path components with appropriate separator // so `some\path/to/dir/**\*` would be `some/path/to/dir/**/*` on Unix // and `some\path\to\dir\**\*` on Windows. let path: PathBuf = pattern.as_ref().components().collect();