tauri-docs icon indicating copy to clipboard operation
tauri-docs copied to clipboard

[bug] System dialogs on macOS always appear in English regardless of system or app language

Open baiyuansjtu opened this issue 5 months ago • 1 comments

Describe the bug

When calling the file picker (e.g., FileDialogBuilder::pick_file() on macOS), the system dialog only partially follows the system language.

The main contents (like file/folder names, sidebar items from the file system) appear in the correct system language (e.g., Chinese).

However, UI controls like the sidebar shortcut labels (e.g., "Applications", "Downloads"), the top buttons (like “Cancel”, “Open”) are always in English.

This results in a mixed-language UI that breaks localization consistency and feels unpolished to end users.

Image

Reproduction

Build a Tauri app that opens a file picker using tauri::dialog::FileDialogBuilder.

Run the app on macOS where system language is not English (e.g., set to Chinese).

Open the file picker or mount a .dmg associated with the app.

Observe that the dialog UI remains in English.

https://github.com/UNIkeEN/SJMCL/issues/530

Expected behavior

System dialogs should follow the system language or app language, consistent with native macOS behavior.

Full tauri info output

[√] Environment
  - OS: Mac OS 15.5.0 arm64 (X64)
  ✔ Xcode Command Line Tools: installed
  ✔ rustc: 1.87.0 (17067e9ac 2025-05-09)
  ✔ cargo: 1.87.0 (99624be96 2025-05-06)
  ✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
  ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
  - node: 24.2.0
  - yarn: 1.22.22
  - npm: 11.3.0

[-] Packages
  - tauri : 2.5.1
  - tauri-build : 2.2.0
  - wry : 0.51.2
  - tao : 0.33.0
  - @tauri-apps/api : 2.5.0
  - @tauri-apps/cli : 2.5.0

[-] Plugins
    - tauri-plugin-clipboard-manager 🦀: 2.2.2, (outdated, latest: 2.2.3)
    - @tauri-apps/plugin-clipboard-manager : 2.2.2 (outdated, latest: 2.2.3)
    - tauri-plugin-process 🦀: 2.2.1, (outdated, latest: 2.2.2)
    - @tauri-apps/plugin-process : 2.2.1 (outdated, latest: 2.2.2)
    - tauri-plugin-dialog 🦀: 2.2.1, (outdated, latest: 2.2.2)
    - @tauri-apps/plugin-dialog : 2.2.2
    - tauri-plugin-deep-link 🦀: 2.2.1, (outdated, latest: 2.3.0)
    - @tauri-apps/plugin-deep-link : 2.3.0
    - tauri-plugin-log 🦀: 2.4.0, (outdated, latest: 2.5.0)
    - @tauri-apps/plugin-log : not installed!
    - tauri-plugin-single-instance 🦀: 2.2.3, (outdated, latest: 2.2.4)
    - @tauri-apps/plugin-single-instance : not installed!
    - tauri-plugin-fs 🦀: 2.2.1, (outdated, latest: 2.3.0)
    - @tauri-apps/plugin-fs : 2.3.0
    - tauri-plugin-http 🦀: 2.4.3, (outdated, latest: 2.4.4)
    - @tauri-apps/plugin-http : 2.4.4
    - tauri-plugin-os 🦀: 2.2.1, (outdated, latest: 2.2.2)
    - @tauri-apps/plugin-os : 2.2.1 (outdated, latest: 2.2.2)
    - tauri-plugin-opener 🦀: 2.2.6, (outdated, latest: 2.3.0)
    - @tauri-apps/plugin-opener : 2.2.7 (outdated, latest: 2.3.0)
    - tauri-plugin-window-state 🦀: 2.2.2, (outdated, latest: 2.2.3)
    - @tauri-apps/plugin-window-state : 2.2.2 (outdated, latest: 2.2.3)

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../out
    - devUrl: http://localhost:3000/
    - framework: React (Next.js)
    - bundler: Webpack

Stack trace


Additional context

No response

baiyuansjtu avatar Jun 22 '25 05:06 baiyuansjtu