Skip to content

SeaDrive top-level folder language follows Region instead of Language on macOS #3057

Description

@snowshow

SeaDrive for macOS uses system region instead of preferred language for top-level folder names

Summary

SeaDrive for macOS displays its virtual top-level folders in French when the macOS interface language is English but the system region is set to France.

The folder names appear to be selected according to Locale.current.region instead of the preferred UI language.

With:

  • macOS language: English
  • macOS region: France
  • SeaDrive UI: English
  • Seafile web UI: English

SeaDrive displays:

  • Mes bibliothèques
  • Partagé avec moi
  • other category names in French

When the macOS region is temporarily changed to United States, the same folders immediately appear in English:

  • My Libraries
  • Shared with me

Changing the region back to France changes the folder names back to French.

This confirms that the names are determined dynamically from the system region rather than from the preferred language.

Environment

  • SeaDrive version: 3.0.23
  • SeaDrive File Provider extension version: 3.0.23
  • SeaDrive main bundle identifier: com.seafile.seadrive
  • SeaDrive preferences domain: com.seafile.Seafile Drive Client
  • File Provider extension bundle identifier: com.seafile.seadrive.fprovider
  • macOS language: English
  • macOS region: France
  • Seafile server UI language: English
  • SeaDrive application UI language: English
  • Seafile server accessed over local network

SeaDrive File Provider extension path:

/Applications/SeaDrive.app/Contents/PlugIns/SeaDrive File Provider.appex

Registered extension:

com.seafile.seadrive.fprovider(3.0.23)

Steps to reproduce

  1. Set macOS language to English.

  2. Set macOS region to France:

    System Settings
    → General
    → Language & Region
    → Language: English
    → Region: France
    
  3. Start SeaDrive 3.0.23.

  4. Connect an account to a Seafile server.

  5. Open the SeaDrive location in Finder.

  6. Observe the top-level virtual folders.

Actual result

SeaDrive shows French folder names:

Mes bibliothèques
Partagé avec moi

Other SeaDrive-generated category names are also shown in French.

Expected result

Because the preferred macOS language is English, SeaDrive should show:

My Libraries
Shared with me

The folder language should follow the preferred application/system language, not the geographic region.

Reproducibility

The issue is reproducible every time.

Changing only the macOS region produces the following behavior:

Language: English
Region: France
→ French SeaDrive category names
Language: English
Region: United States
→ English SeaDrive category names

Changing the region back to France immediately restores the French names.

The names are therefore not merely cached during initial account creation. They are recalculated dynamically.

macOS locale diagnostics

The following Swift test was used:

import Foundation

print("preferredLanguages:", Locale.preferredLanguages)
print("current identifier:", Locale.current.identifier)
print("language:", Locale.current.language.languageCode?.identifier ?? "nil")
print("region:", Locale.current.region?.identifier ?? "nil")

Output with macOS language set to English and region set to France:

preferredLanguages: ["en", "ru", "en-US", "fr", "de", "zh-Hans", "zh-Hant", "ja", "es", "it", "nl", "ko", "pt-BR", "pt-PT", "da", "fi", "nb", "sv", "pl", "tr", "ar", "th", "cs", "hu", "ca", "hr", "el", "he", "ro", "sk", "uk", "id", "ms", "vi", "es-419"]
current identifier: en_001@rg=frzzzz
language: en
region: FR

The preferred language and current language code are both English:

preferredLanguages[0] = en
language = en

Only the region is French:

region = FR

Application localization diagnostics

No standard .lproj or Qt .qm localization resources were found in the main application resources:

ls "/Applications/SeaDrive.app/Contents/Resources" | grep ".lproj"

No output.

find "/Applications/SeaDrive.app/Contents/Resources" \
  \( -name '*.lproj' -o -name '*.qm' \) \
  -maxdepth 3 -print

No output.

The French and English top-level category strings were found inside the File Provider executable:

BIN="/Applications/SeaDrive.app/Contents/PlugIns/SeaDrive File Provider.appex/Contents/MacOS/SeaDrive File Provider"

strings -a "$BIN" |
grep -iE 'Mes biblioth|Partagé avec|My Libraries|Shared with me'

The relevant binary is:

/Applications/SeaDrive.app/Contents/PlugIns/SeaDrive File Provider.appex/Contents/MacOS/SeaDrive File Provider

This indicates that the category localization is implemented by the SeaDrive File Provider extension.

File Provider Info.plist details

Relevant fields from:

/Applications/SeaDrive.app/Contents/PlugIns/SeaDrive File Provider.appex/Contents/Info.plist

are:

CFBundleIdentifier = com.seafile.seadrive.fprovider
CFBundleDevelopmentRegion = en
CFBundleAllowMixedLocalizations = 1
CFBundleShortVersionString = 3.0.23
CFBundleVersion = 3.0.23
NSExtensionPointIdentifier = com.apple.fileprovider-nonui
NSExtensionPrincipalClass = FileProviderExtension

The development language is explicitly English:

CFBundleDevelopmentRegion = en

SeaDrive preferences

The SeaDrive preferences contain no explicit language setting:

defaults read "com.seafile.Seafile Drive Client"

Output:

{
    "Settings.cacheCleanInterval" = 10;
    "Settings.cacheSizeLimit" = 10;
    "Settings.computerName" = "XXX.local";
    "Settings.deleteConfirmThreshold" = 500;
    "Settings.disableVerifyCert" = 0;
    "Settings.hide_windows_incompatible_path_notification" = 0;
    "Settings.maxDownloadRatio" = 0;
    "Settings.maxUploadRatio" = 0;
    "Settings.notifySync" = 1;
    "Settings.syncExtraTempFile" = 0;
    "UsedServerAddresses.main" = (
        "http://192.168.1.215:30447"
    );
}

There is no saved French language setting.

The following domain did not exist:

defaults read com.seafile.seadrive

Output:

Domain com.seafile.seadrive does not exist

Server-side checks

The Seafile web UI language is set to English.

The SeaDrive application UI is also English.

The affected names are SeaDrive virtual category names rather than actual Seafile library names.

Changing the Seafile server language does not appear relevant. The folder names change solely when the macOS region changes.

Suspected cause

The File Provider localization code appears to use the system region, directly or indirectly, to select the language.

The current behavior is consistent with logic similar to:

if Locale.current.region?.identifier == "FR" {
    useFrenchNames()
}

or equivalent region-based locale matching.

The language should instead be selected from the preferred language list, for example:

Locale.preferredLanguages.first

or:

Locale.current.language.languageCode

For this configuration:

Locale.preferredLanguages.first = en
Locale.current.language.languageCode = en
Locale.current.region = FR

the correct language is English.

Suggested fix

Select the localization using the preferred language or the application language rather than the region.

Possible Foundation-based logic:

let preferredLanguage =
    Locale.Language(identifier: Locale.preferredLanguages.first ?? "en")
        .languageCode?
        .identifier ?? "en"

Alternatively, use the standard localized-string APIs and .lproj resources so macOS performs the language fallback automatically.

The region should only affect formatting such as:

  • date format;
  • currency;
  • decimal separators;
  • measurement units;
  • address format.

It should not determine the user-interface language.

Workaround

The only confirmed workaround is to change the macOS region from France to United States or another non-French region.

This is not a practical permanent workaround because it changes system-wide regional formatting.

Creating the SeaDrive account while the region is United States and then switching back to France does not help. The category names change back to French as soon as the region is set to France.

Impact

This affects users who intentionally use:

  • an English macOS interface;
  • a French regional configuration.

This is a common and valid configuration for English-speaking users living in France.

The bug causes inconsistent localization:

  • macOS UI: English
  • SeaDrive UI: English
  • Seafile web UI: English
  • SeaDrive Finder categories: French

Additional note

The issue appears to be entirely client-side in the SeaDrive File Provider extension and not related to the Seafile server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions