Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package filezilla for openSUSE:Factory checked in at 2026-08-28 19:54:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/filezilla (Old) and /work/SRC/openSUSE:Factory/.filezilla.new.1265 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "filezilla" Fri Aug 28 19:54:47 2026 rev:126 rq:1374347 version:3.71.1 Changes: -------- --- /work/SRC/openSUSE:Factory/filezilla/filezilla.changes 2026-08-21 16:59:39.235472397 +0200 +++ /work/SRC/openSUSE:Factory/.filezilla.new.1265/filezilla.changes 2026-08-28 19:57:43.282661094 +0200 @@ -1,0 +2,11 @@ +Fri Aug 28 10:42:47 UTC 2026 - ecsos <[email protected]> - 3.71.1 + +- Update to 3.71.1 + * Bugfixes and minor changes: + - macOS: Work around a bug in macOS 27 where setting the locale + to non-English triggers crashes in AppKit + - SFTP: Improved heuristic when keyboard-interactive requests + are treated as a simple password prompt on servers not + offering the password authentication method + +------------------------------------------------------------------- Old: ---- FileZilla_3.71.0_src.tar.xz New: ---- FileZilla_3.71.1_src.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ filezilla.spec ++++++ --- /var/tmp/diff_new_pack.oPJ2yL/_old 2026-08-28 19:57:45.407735390 +0200 +++ /var/tmp/diff_new_pack.oPJ2yL/_new 2026-08-28 19:57:45.412735565 +0200 @@ -16,12 +16,12 @@ # -%define libversion 3.71.0 +%define libversion 3.71.1 %define libfilezillaversion 0.57.0 %define libfzsshversion 1.4.0 Name: filezilla -Version: 3.71.0 +Version: 3.71.1 Release: 0 Summary: A GUI FTP and SFTP Client License: GPL-2.0-or-later ++++++ FileZilla_3.71.0_src.tar.xz -> FileZilla_3.71.1_src.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/filezilla-3.71.0/NEWS new/filezilla-3.71.1/NEWS --- old/filezilla-3.71.0/NEWS 2026-08-19 15:01:37.000000000 +0200 +++ new/filezilla-3.71.1/NEWS 2026-08-26 15:13:14.000000000 +0200 @@ -10,6 +10,11 @@ *nix: Unix (e.g BSD) and Unix-like systems (e.g. Linux) macOS/OS X: Apple macOS +3.71.1 (2026-08-26) + +- macOS: Work around a bug in macOS 27 where setting the locale to non-English triggers crashes in AppKit +- SFTP: Improved heuristic when keyboard-interactive requests are treated as a simple password prompt on servers not offering the password authentication method + 3.71.0 (2026-08-19) + FTP(S), SFTP: Entering an empty path in the remote path edit field now returns back to the initial home directory diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/filezilla-3.71.0/configure new/filezilla-3.71.1/configure --- old/filezilla-3.71.0/configure 2026-08-19 15:01:49.000000000 +0200 +++ new/filezilla-3.71.1/configure 2026-08-26 15:13:25.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for FileZilla 3.71.0. +# Generated by GNU Autoconf 2.72 for FileZilla 3.71.1. # # Report bugs to <[email protected]>. # @@ -614,8 +614,8 @@ # Identity of this package. PACKAGE_NAME='FileZilla' PACKAGE_TARNAME='filezilla' -PACKAGE_VERSION='3.71.0' -PACKAGE_STRING='FileZilla 3.71.0' +PACKAGE_VERSION='3.71.1' +PACKAGE_STRING='FileZilla 3.71.1' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='https://filezilla-project.org/' @@ -1494,7 +1494,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures FileZilla 3.71.0 to adapt to many kinds of systems. +'configure' configures FileZilla 3.71.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1565,7 +1565,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of FileZilla 3.71.0:";; + short | recursive ) echo "Configuration of FileZilla 3.71.1:";; esac cat <<\_ACEOF @@ -1741,7 +1741,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -FileZilla configure 3.71.0 +FileZilla configure 3.71.1 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -2167,7 +2167,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by FileZilla $as_me 3.71.0, which was +It was created by FileZilla $as_me 3.71.1, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -3865,7 +3865,7 @@ # Define the identity of the package. PACKAGE='filezilla' - VERSION='3.71.0' + VERSION='3.71.1' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -25254,7 +25254,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by FileZilla $as_me 3.71.0, which was +This file was extended by FileZilla $as_me 3.71.1, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25323,7 +25323,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -FileZilla config.status 3.71.0 +FileZilla config.status 3.71.1 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/filezilla-3.71.0/configure.ac new/filezilla-3.71.1/configure.ac --- old/filezilla-3.71.0/configure.ac 2026-08-19 15:01:37.000000000 +0200 +++ new/filezilla-3.71.1/configure.ac 2026-08-26 15:13:14.000000000 +0200 @@ -1,4 +1,4 @@ -AC_INIT([FileZilla],[3.71.0],[[email protected]],[],[https://filezilla-project.org/]) +AC_INIT([FileZilla],[3.71.1],[[email protected]],[],[https://filezilla-project.org/]) ENGINE_VERSION="$PACKAGE_VERSION" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/filezilla-3.71.0/locales/filezilla.pot new/filezilla-3.71.1/locales/filezilla.pot --- old/filezilla-3.71.0/locales/filezilla.pot 2026-08-19 15:02:00.000000000 +0200 +++ new/filezilla-3.71.1/locales/filezilla.pot 2026-08-26 15:13:35.000000000 +0200 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://trac.filezilla-project.org/\n" -"POT-Creation-Date: 2026-08-19 15:02+0200\n" +"POT-Creation-Date: 2026-08-26 15:13+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" @@ -148,7 +148,7 @@ msgstr[0] "" msgstr[1] "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:425 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:559 #, c-format msgid "" "%s could not be found. Without this component of FileZilla, %s will not " @@ -496,10 +496,10 @@ msgid "&Edit filter rules..." msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2506 #: ../../../source/FileZilla3/locales/../src/interface/menu_bar.cpp:71 #: ../../../source/FileZilla3/locales/../src/interface/menu_bar.cpp:110 #: ../../../source/FileZilla3/locales/../src/interface/statusbar.cpp:568 +#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2506 msgid "&Enable" msgstr "" @@ -621,9 +621,9 @@ msgid "&Help" msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2513 #: ../../../source/FileZilla3/locales/../src/interface/menu_bar.cpp:76 #: ../../../source/FileZilla3/locales/../src/interface/search.cpp:699 +#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2513 msgid "&Hide identical files" msgstr "" @@ -1416,7 +1416,7 @@ "A file with that name is still being edited. Please close it and try again." msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:401 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:535 msgid "" "A local filename could not be decoded.\n" "Please make sure the LC_CTYPE (or LC_ALL) environment variable is set " @@ -2158,7 +2158,7 @@ msgid "Change the file permissions." msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:401 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:535 msgid "Character encoding issue" msgstr "" @@ -2296,9 +2296,9 @@ msgid "Close &all other tabs" msgstr "" +#: ../../../source/FileZilla3/locales/../src/interface/menu_bar.cpp:46 #: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:1306 #: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:1327 -#: ../../../source/FileZilla3/locales/../src/interface/menu_bar.cpp:46 msgid "Close FileZilla" msgstr "" @@ -2367,13 +2367,13 @@ msgid "Communication tainted by router or firewall" msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2510 #: ../../../source/FileZilla3/locales/../src/interface/menu_bar.cpp:74 +#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2510 msgid "Compare &modification time" msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2509 #: ../../../source/FileZilla3/locales/../src/interface/menu_bar.cpp:73 +#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2509 msgid "Compare file&size" msgstr "" @@ -2712,7 +2712,7 @@ msgid "Could not establish connection to server" msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:295 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:235 msgid "" "Could not find the resource files for FileZilla, closing FileZilla.\n" "You can specify the data directory of FileZilla by setting the FZ_DATADIR " @@ -3309,13 +3309,13 @@ msgstr "" #: ../../../source/FileZilla3/locales/../src/interface/settings/optionspage_filelists.cpp:64 -#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2457 -#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2477 #: ../../../source/FileZilla3/locales/../src/interface/filelistctrl.cpp:496 #: ../../../source/FileZilla3/locales/../src/interface/sitemanager_controls.cpp:1167 #: ../../../source/FileZilla3/locales/../src/interface/sitemanager_dialog.cpp:284 #: ../../../source/FileZilla3/locales/../src/interface/toolbar.cpp:112 #: ../../../source/FileZilla3/locales/../src/interface/view.cpp:116 +#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2457 +#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2477 msgid "Directory comparison" msgstr "" @@ -3795,7 +3795,7 @@ #: ../../../source/FileZilla3/locales/../src/interface/sitemanager.cpp:601 #: ../../../source/FileZilla3/locales/../src/interface/sitemanager_dialog.cpp:718 #: ../../../source/FileZilla3/locales/../src/interface/sitemanager_dialog.cpp:778 -#: ../../../source/FileZilla3/locales/../src/interface/wrapengine.cpp:946 +#: ../../../source/FileZilla3/locales/../src/interface/wrapengine.cpp:969 msgid "Error loading xml file" msgstr "" @@ -3940,9 +3940,11 @@ msgid "Failed to change directory" msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:100 -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:115 -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:118 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:355 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:358 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:476 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:491 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:494 msgid "Failed to change language" msgstr "" @@ -4028,33 +4030,35 @@ msgid "Failed to send command." msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:115 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:355 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:491 #, c-format msgid "Failed to set language to %s (%s), using default system language" msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:92 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:468 #, c-format msgid "" "Failed to set language to %s (%s), using default system language (%s, %s)." msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:79 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:455 #, c-format msgid "Failed to set language to %s (%s), using default system language." msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:118 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:358 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:494 #, c-format msgid "Failed to set language to %s, using default system language" msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:87 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:463 #, c-format msgid "Failed to set language to %s, using default system language (%s, %s)." msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:75 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:451 #, c-format msgid "Failed to set language to %s, using default system language." msgstr "" @@ -4120,8 +4124,8 @@ msgstr "" #: ../../../source/FileZilla3/locales/../src/interface/settings/optionspage_edit.cpp:194 -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:426 #: ../../../source/FileZilla3/locales/../src/interface/edithandler.cpp:1903 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:560 msgid "File not found" msgstr "" @@ -4166,7 +4170,7 @@ msgid "File transfers still in progress." msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:296 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:236 msgid "FileZilla Error" msgstr "" @@ -5449,7 +5453,7 @@ msgstr "" #: ../../../source/FileZilla3/locales/../src/engine/sftp/connect.cpp:232 -#: ../../../source/FileZilla3/locales/../src/engine/sftp/connect.cpp:417 +#: ../../../source/FileZilla3/locales/../src/engine/sftp/connect.cpp:418 msgid "No more authentication methods available" msgstr "" @@ -6083,7 +6087,7 @@ "make sure you typed the address of the address resolver correctly." msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:99 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:475 msgid "Please make sure the requested locale is installed on your system." msgstr "" @@ -7111,7 +7115,7 @@ msgid "Sending password" msgstr "" -#: ../../../source/FileZilla3/locales/../src/engine/sftp/connect.cpp:423 +#: ../../../source/FileZilla3/locales/../src/engine/sftp/connect.cpp:424 msgid "Sending password as response" msgstr "" @@ -7550,7 +7554,7 @@ msgid "Storj - Decentralized Cloud Storage" msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:413 +#: ../../../source/FileZilla3/locales/../src/interface/FileZilla.cpp:547 msgid "Storj support" msgstr "" @@ -7607,13 +7611,13 @@ msgid "Syntax error" msgstr "" -#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2611 -#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2653 #: ../../../source/FileZilla3/locales/../src/interface/cmdline.cpp:82 #: ../../../source/FileZilla3/locales/../src/interface/cmdline.cpp:87 #: ../../../source/FileZilla3/locales/../src/interface/cmdline.cpp:92 #: ../../../source/FileZilla3/locales/../src/interface/cmdline.cpp:99 #: ../../../source/FileZilla3/locales/../src/interface/cmdline.cpp:104 +#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2611 +#: ../../../source/FileZilla3/locales/../src/interface/Mainfrm.cpp:2653 msgid "Syntax error in command line" msgstr "" @@ -7970,7 +7974,7 @@ msgid "The server could not be added." msgstr "" -#: ../../../source/FileZilla3/locales/../src/engine/sftp/connect.cpp:422 +#: ../../../source/FileZilla3/locales/../src/engine/sftp/connect.cpp:423 #, c-format msgid "" "The server does not support password authentication, but sent a single " @@ -7978,7 +7982,7 @@ "Select interactive login type to force an interactive prompt." msgstr "" -#: ../../../source/FileZilla3/locales/../src/engine/sftp/connect.cpp:416 +#: ../../../source/FileZilla3/locales/../src/engine/sftp/connect.cpp:417 #, c-format msgid "" "The server sent a single keyboard-interactive prompt named \"%s\", but we " diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/filezilla-3.71.0/src/engine/sftp/connect.cpp new/filezilla-3.71.1/src/engine/sftp/connect.cpp --- old/filezilla-3.71.0/src/engine/sftp/connect.cpp 2026-07-20 14:19:24.000000000 +0200 +++ new/filezilla-3.71.1/src/engine/sftp/connect.cpp 2026-08-22 05:30:02.000000000 +0200 @@ -385,8 +385,9 @@ next_auth(); } -bool CSftpConnectOpData::interactive_prompt_asks_for_password(std::string const& prompt) +bool CSftpConnectOpData::interactive_prompt_asks_for_password(std::string_view prompt) { + fz::rtrim(prompt, "\r\n :"sv); if (fz::equal_insensitive_ascii(prompt, "password"sv)) { return true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/filezilla-3.71.0/src/engine/sftp/connect.h new/filezilla-3.71.1/src/engine/sftp/connect.h --- old/filezilla-3.71.0/src/engine/sftp/connect.h 2026-07-20 14:19:24.000000000 +0200 +++ new/filezilla-3.71.1/src/engine/sftp/connect.h 2026-08-22 05:30:02.000000000 +0200 @@ -49,7 +49,7 @@ virtual void operator()(fz::event_base const& ev) override; void on_agent_keys(fz::ssh::agent_connection* conn, std::vector<std::unique_ptr<fz::ssh::private_key>> & keys); - bool interactive_prompt_asks_for_password(std::string const& prompt); + bool interactive_prompt_asks_for_password(std::string_view prompt); std::vector<fz::ssh::private_key_info> keys_; std::unique_ptr<fz::ssh::agent_connection> agent_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/filezilla-3.71.0/src/interface/FileZilla.cpp new/filezilla-3.71.1/src/interface/FileZilla.cpp --- old/filezilla-3.71.0/src/interface/FileZilla.cpp 2026-03-10 05:30:02.000000000 +0100 +++ new/filezilla-3.71.1/src/interface/FileZilla.cpp 2026-08-26 15:13:14.000000000 +0200 @@ -29,6 +29,10 @@ #include <shobjidl.h> #endif +#if USE_UILOCALE +#include <wx/uilocale.h> +#endif + #include "locale_initializer.h" #ifdef USE_MAC_SANDBOX @@ -58,70 +62,6 @@ themeProvider_.reset(); } -void CFileZillaApp::InitLocale() -{ - AddStartupProfileRecord("CFileZillaApp::InitLocale()"sv); - wxString language = options_->get_string(OPTION_LANGUAGE); - const wxLanguageInfo* pInfo = wxLocale::FindLanguageInfo(language); - if (!language.empty()) { -#ifdef __WXGTK__ - if (CInitializer::error) { - wxString error; - - wxLocale *loc = wxGetLocale(); - const wxLanguageInfo* currentInfo = loc ? loc->GetLanguageInfo(loc->GetLanguage()) : 0; - if (!loc || !currentInfo) { - if (!pInfo) { - error.Printf(_("Failed to set language to %s, using default system language."), - language); - } - else { - error.Printf(_("Failed to set language to %s (%s), using default system language."), - pInfo->Description, language); - } - } - else { - wxString currentName = currentInfo->CanonicalName; - - if (!pInfo) { - error.Printf(_("Failed to set language to %s, using default system language (%s, %s)."), - language, loc->GetLocale(), - currentName); - } - else { - error.Printf(_("Failed to set language to %s (%s), using default system language (%s, %s)."), - pInfo->Description, language, loc->GetLocale(), - currentName); - } - } - - error += _T("\n"); - error += _("Please make sure the requested locale is installed on your system."); - wxMessageBoxEx(error, _("Failed to change language"), wxICON_EXCLAMATION); - - options_->set(OPTION_LANGUAGE, _T("")); - } -#else - if (!pInfo || !SetLocale(pInfo->Language)) { - for (language = GetFallbackLocale(language); !language.empty(); language = GetFallbackLocale(language)) { - const wxLanguageInfo* fallbackInfo = wxLocale::FindLanguageInfo(language); - if (fallbackInfo && SetLocale(fallbackInfo->Language)) { - options_->set(OPTION_LANGUAGE, language.ToStdWstring()); - return; - } - } - options_->set(OPTION_LANGUAGE, std::wstring()); - if (pInfo && !pInfo->Description.empty()) { - wxMessageBoxEx(wxString::Format(_("Failed to set language to %s (%s), using default system language"), pInfo->Description, language), _("Failed to change language"), wxICON_EXCLAMATION); - } - else { - wxMessageBoxEx(wxString::Format(_("Failed to set language to %s, using default system language"), language), _("Failed to change language"), wxICON_EXCLAMATION); - } - } -#endif - } -} - namespace { std::wstring translator(char const* const t) { @@ -228,7 +168,7 @@ // Load the text wrapping engine m_pWrapEngine = std::make_unique<CWrapEngine>(); - m_pWrapEngine->LoadCache(); + m_pWrapEngine->LoadCache(*options_); bool welcome_skip = false; #ifdef USE_MAC_SANDBOX @@ -306,7 +246,138 @@ return true; } -bool CFileZillaApp::LoadLocales() +#if USE_UILOCALE +namespace { +std::wstring GetTranslationName(wxLocaleIdent const& lid) +{ + std::wstring ret = lid.GetLanguage().ToStdWstring(); + std::wstring region = lid.GetRegion().ToStdWstring(); + if (!ret.empty() && !region.empty()) { + ret += '_'; + ret += region; + std::wstring modifier = lid.GetModifier().ToStdWstring(); + if (!modifier.empty()) { + ret += '@'; + ret += modifier; + } + } + return ret; +} +} + +void CFileZillaApp::LoadLocales() +{ + setlocale(LC_COLLATE, ""); + wxUILocale::UseDefault(); + + AddStartupProfileRecord("CFileZillaApp::LoadLocales"sv); + m_localesDir = GetFZDataDir({L"locales/de/filezilla.mo"}, std::wstring()); + if (!m_localesDir.empty()) { + m_localesDir.AddSegment(_T("locales")); + } +#ifndef __WXMAC__ + else { + m_localesDir = GetFZDataDir({L"de/filezilla.mo", L"de/LC_MESSAGES/filezilla.mo"}, L"share/locale", false); + } +#endif + if (!m_localesDir.empty()) { + wxFileTranslationsLoader::AddCatalogLookupPathPrefix(m_localesDir.GetPath()); + } + + SetLocale(GetTranslationName(wxUILocale::GetCurrent().GetLocaleId()), nullptr); +} + +bool CFileZillaApp::SetLocale(std::wstring language, wxLanguageInfo const** outInfo) +{ + if (language.empty() || language == L"en"sv || language == L"en_US"sv) { + wxTranslations::Set(nullptr); + lang_ = wxLANGUAGE_ENGLISH; + lang_code_ = L"en_US"sv; + layout_direction_ = wxLayout_LeftToRight; + return true; + } + + wxTranslations* ts = new wxTranslations; + wxArrayString languages = ts->GetAvailableTranslations(L"filezilla"); + + if (languages.Index(language) == wxNOT_FOUND) { + size_t pos = language.find('_'); + if (pos != std::wstring::npos) { + language = language.substr(0, pos); + if (languages.Index(language) == wxNOT_FOUND) { + language.clear(); + } + } + } + + wxLanguageInfo const* info = language.empty() ? nullptr : wxUILocale::FindLanguageInfo(language); + if (outInfo) { + *outInfo = info; + } + if (!language.empty() && info) { + lang_code_ = language; + lang_ = info->Language; + layout_direction_ = info->LayoutDirection; + ts->SetLanguage(language); + ts->AddCatalog(L"filezilla"); + ts->AddCatalog(L"libfilezilla"); + wxTranslations::Set(ts); + return true; + } + else { + lang_ = wxLANGUAGE_ENGLISH; + lang_code_ = L"en_US"sv; + layout_direction_ = wxLayout_LeftToRight; + + delete ts; + wxTranslations::Set(nullptr); + return false; + } +} + +void CFileZillaApp::InitLocale() +{ + AddStartupProfileRecord("CFileZillaApp::InitLocale()"sv); + std::wstring const language = options_->get_string(OPTION_LANGUAGE); + if (!language.empty()) { + wxLanguageInfo const* info{}; + if (SetLocale(language, &info)) { + if (lang_code_ != language) { + options_->set(OPTION_LANGUAGE, lang_code_); + } + } + else { + options_->set(OPTION_LANGUAGE, std::wstring()); + + SetLocale(GetTranslationName(wxUILocale::GetCurrent().GetLocaleId()), nullptr); + + if (info && !info->Description.empty()) { + wxMessageBoxEx(wxString::Format(_("Failed to set language to %s (%s), using default system language"), info->Description, language), _("Failed to change language"), wxICON_EXCLAMATION); + } + else { + wxMessageBoxEx(wxString::Format(_("Failed to set language to %s, using default system language"), language), _("Failed to change language"), wxICON_EXCLAMATION); + } + } + } +} + +int CFileZillaApp::GetCurrentLanguage() const +{ + return lang_; +} + +wxString CFileZillaApp::GetCurrentLanguageCode() const +{ + return lang_code_; +} + +wxLayoutDirection CFileZillaApp::GetLayoutDirection() const +{ + return layout_direction_; +} + +#else +void CFileZillaApp::LoadLocales() { AddStartupProfileRecord("CFileZillaApp::LoadLocales"sv); m_localesDir = GetFZDataDir({L"locales/de/filezilla.mo"}, std::wstring()); @@ -323,8 +394,6 @@ } SetLocale(wxLANGUAGE_DEFAULT); - - return true; } bool CFileZillaApp::SetLocale(int language) @@ -365,6 +434,70 @@ return true; } +void CFileZillaApp::InitLocale() +{ + AddStartupProfileRecord("CFileZillaApp::InitLocale()"sv); + wxString language = options_->get_string(OPTION_LANGUAGE); + const wxLanguageInfo* pInfo = wxLocale::FindLanguageInfo(language); + if (!language.empty()) { +#ifdef __WXGTK__ + if (CInitializer::error) { + wxString error; + + wxLocale *loc = wxGetLocale(); + const wxLanguageInfo* currentInfo = loc ? loc->GetLanguageInfo(loc->GetLanguage()) : 0; + if (!loc || !currentInfo) { + if (!pInfo) { + error.Printf(_("Failed to set language to %s, using default system language."), + language); + } + else { + error.Printf(_("Failed to set language to %s (%s), using default system language."), + pInfo->Description, language); + } + } + else { + wxString currentName = currentInfo->CanonicalName; + + if (!pInfo) { + error.Printf(_("Failed to set language to %s, using default system language (%s, %s)."), + language, loc->GetLocale(), + currentName); + } + else { + error.Printf(_("Failed to set language to %s (%s), using default system language (%s, %s)."), + pInfo->Description, language, loc->GetLocale(), + currentName); + } + } + + error += _T("\n"); + error += _("Please make sure the requested locale is installed on your system."); + wxMessageBoxEx(error, _("Failed to change language"), wxICON_EXCLAMATION); + + options_->set(OPTION_LANGUAGE, _T("")); + } +#else + if (!pInfo || !SetLocale(pInfo->Language)) { + for (language = GetFallbackLocale(language); !language.empty(); language = GetFallbackLocale(language)) { + const wxLanguageInfo* fallbackInfo = wxLocale::FindLanguageInfo(language); + if (fallbackInfo && SetLocale(fallbackInfo->Language)) { + options_->set(OPTION_LANGUAGE, language.ToStdWstring()); + return; + } + } + options_->set(OPTION_LANGUAGE, std::wstring()); + if (pInfo && !pInfo->Description.empty()) { + wxMessageBoxEx(wxString::Format(_("Failed to set language to %s (%s), using default system language"), pInfo->Description, language), _("Failed to change language"), wxICON_EXCLAMATION); + } + else { + wxMessageBoxEx(wxString::Format(_("Failed to set language to %s, using default system language"), language), _("Failed to change language"), wxICON_EXCLAMATION); + } + } +#endif + } +} + int CFileZillaApp::GetCurrentLanguage() const { if (!m_pLocale) { @@ -382,6 +515,7 @@ return m_pLocale->GetCanonicalName(); } +#endif #if wxUSE_DEBUGREPORT && wxUSE_ON_FATAL_EXCEPTION void CFileZillaApp::OnFatalException() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/filezilla-3.71.0/src/interface/Mainfrm.cpp new/filezilla-3.71.1/src/interface/Mainfrm.cpp --- old/filezilla-3.71.0/src/interface/Mainfrm.cpp 2026-04-01 05:30:02.000000000 +0200 +++ new/filezilla-3.71.1/src/interface/Mainfrm.cpp 2026-08-25 05:30:03.000000000 +0200 @@ -765,7 +765,7 @@ } } else if (id == XRCID("ID_CLEARCACHE_LAYOUT")) { - CWrapEngine::ClearCache(); + CWrapEngine::ClearCache(options_); } else if (id == XRCID("ID_CLEAR_UPDATER")) { #if FZ_MANUALUPDATECHECK diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/filezilla-3.71.0/src/interface/filezillaapp.h new/filezilla-3.71.1/src/interface/filezillaapp.h --- old/filezilla-3.71.0/src/interface/filezillaapp.h 2026-03-10 05:30:02.000000000 +0100 +++ new/filezilla-3.71.1/src/interface/filezillaapp.h 2026-08-26 15:13:14.000000000 +0200 @@ -11,6 +11,10 @@ class CThemeProvider; class CWrapEngine; +#if FZ_MAC +#define USE_UILOCALE 1 +#endif + class CFileZillaApp : public wxApp { public: @@ -31,7 +35,6 @@ #endif void InitLocale(); - bool SetLocale(int language); int GetCurrentLanguage() const; wxString GetCurrentLanguageCode() const; @@ -50,10 +53,21 @@ #endif bool LoadResourceFiles(); - bool LoadLocales(); + void LoadLocales(); int ProcessCommandLine(); +#if USE_UILOCALE + bool SetLocale(std::wstring language, wxLanguageInfo const** info); + virtual wxLayoutDirection GetLayoutDirection() const override; + + int lang_{wxLANGUAGE_ENGLISH}; + std::wstring lang_code_; + wxLayoutDirection layout_direction_{wxLayout_LeftToRight}; +#else + bool SetLocale(int language); + std::unique_ptr<wxLocale> m_pLocale; +#endif CLocalPath m_resourceDir; CLocalPath m_localesDir; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/filezilla-3.71.0/src/interface/settings/optionspage_language.cpp new/filezilla-3.71.1/src/interface/settings/optionspage_language.cpp --- old/filezilla-3.71.0/src/interface/settings/optionspage_language.cpp 2020-07-17 05:30:03.000000000 +0200 +++ new/filezilla-3.71.1/src/interface/settings/optionspage_language.cpp 2026-08-26 15:13:14.000000000 +0200 @@ -103,6 +103,9 @@ continue; } } + if (locale == L"en") { + continue; + } wxString name; const wxLanguageInfo* pInfo = wxLocale::FindLanguageInfo(locale); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/filezilla-3.71.0/src/interface/timeformatting.cpp new/filezilla-3.71.1/src/interface/timeformatting.cpp --- old/filezilla-3.71.0/src/interface/timeformatting.cpp 2026-04-01 05:30:02.000000000 +0200 +++ new/filezilla-3.71.1/src/interface/timeformatting.cpp 2026-08-26 15:13:14.000000000 +0200 @@ -4,6 +4,11 @@ #include "option_change_event_handler.h" +#include "filezillaapp.h" +#if USE_UILOCALE +#include <wx/uilocale.h> +#endif + using namespace std::literals; class TimeFormatter::Impl final : public wxEvtHandler, public COptionChangeEventHandler @@ -38,11 +43,11 @@ m_dateFormat = dateFormat; } else { - m_dateFormat = L"%x"sv; + m_dateFormat = GetSystemDefaultDate(); } } else { - m_dateFormat = L"%x"sv; + m_dateFormat = GetSystemDefaultDate(); } m_dateTimeFormat = m_dateFormat; @@ -57,11 +62,11 @@ m_dateTimeFormat += timeFormat; } else { - m_dateTimeFormat += L"%X"sv; + m_dateTimeFormat += GetSystemDefaultTime(); } } else { - m_dateTimeFormat += L"%X"sv; + m_dateTimeFormat += GetSystemDefaultTime(); } } @@ -70,10 +75,33 @@ InitFormat(); } - COptionsBase & options_; - std::wstring m_dateFormat; std::wstring m_dateTimeFormat; + +private: + std::wstring GetSystemDefaultDate() + { + #if USE_UILOCALE + auto fmt = wxUILocale::GetCurrent().GetInfo(wxLOCALE_SHORT_DATE_FMT); + if (!fmt.empty()) { + return fmt.ToStdWstring(); + } + #endif + return L"%x"s; + } + + std::wstring GetSystemDefaultTime() + { + #if USE_UILOCALE + auto fmt = wxUILocale::GetCurrent().GetInfo(wxLOCALE_TIME_FMT); + if (!fmt.empty()) { + return fmt.ToStdWstring(); + } + #endif + return L"%X"s; + } + + COptionsBase & options_; }; TimeFormatter::TimeFormatter(COptionsBase & options) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/filezilla-3.71.0/src/interface/wrapengine.cpp new/filezilla-3.71.1/src/interface/wrapengine.cpp --- old/filezilla-3.71.0/src/interface/wrapengine.cpp 2024-02-06 17:35:09.000000000 +0100 +++ new/filezilla-3.71.1/src/interface/wrapengine.cpp 2026-08-26 15:13:14.000000000 +0200 @@ -724,15 +724,32 @@ return true; } +namespace { +bool IsChinese(int lang) +{ + switch (lang) { + case wxLANGUAGE_CHINESE: + case wxLANGUAGE_CHINESE_CHINA: + case wxLANGUAGE_CHINESE_HONGKONG: + case wxLANGUAGE_CHINESE_MACAO: + case wxLANGUAGE_CHINESE_SIMPLIFIED_EXPLICIT: + case wxLANGUAGE_CHINESE_SIMPLIFIED_HONGKONG: + case wxLANGUAGE_CHINESE_SIMPLIFIED_MACAO: + case wxLANGUAGE_CHINESE_SINGAPORE: + case wxLANGUAGE_CHINESE_TAIWAN: + case wxLANGUAGE_CHINESE_TRADITIONAL_EXPLICIT: + return true; + default: + return false; + } +} +} + wxString CWrapEngine::UnwrapText(const wxString& text) { wxString unwrapped; int lang = wxGetApp().GetCurrentLanguage(); - if (lang == wxLANGUAGE_CHINESE || lang == wxLANGUAGE_CHINESE_SIMPLIFIED || - lang == wxLANGUAGE_CHINESE_TRADITIONAL || lang == wxLANGUAGE_CHINESE_HONGKONG || - lang == wxLANGUAGE_CHINESE_MACAU || lang == wxLANGUAGE_CHINESE_SINGAPORE || - lang == wxLANGUAGE_CHINESE_TAIWAN) - { + if (IsChinese(lang)) { wxChar const* p = text.c_str(); bool wasAscii = false; while (*p) { @@ -932,20 +949,25 @@ return std::wstring(); } -bool CWrapEngine::LoadCache() +void CWrapEngine::LoadCache(COptionsBase & options) { // We have to synchronize access to layout.xml so that multiple processes don't write // to the same file or one is reading while the other one writes. CInterProcessMutex mutex(MUTEX_LAYOUT); - CXmlFile xml(wxGetApp().GetSettingsFile(_T("layout"))); + std::wstring const path = options.get_string(OPTION_DEFAULT_SETTINGSDIR); + if (path.empty()) { + m_use_cache = false; + return; + } + + CXmlFile xml(path + L"layout.xml"); auto document = xml.Load(true); if (!document) { m_use_cache = false; wxMessageBoxEx(xml.GetError(), _("Error loading xml file"), wxICON_ERROR); - - return false; + return; } bool cacheValid = true; @@ -1098,23 +1120,22 @@ } } - if (COptions::Get()->get_int(OPTION_DEFAULT_KIOSKMODE) == 2) { + if (options.get_int(OPTION_DEFAULT_KIOSKMODE) == 2) { m_use_cache = cacheValid; - return true; + return; } if (!xml.Save()) { m_use_cache = false; } - return true; } -void CWrapEngine::ClearCache() +void CWrapEngine::ClearCache(COptionsBase & options) { // We have to synchronize access to layout.xml so that multiple processes don't write // to the same file or one is reading while the other one writes. CInterProcessMutex mutex(MUTEX_LAYOUT); - std::wstring const path = COptions::Get()->get_string(OPTION_DEFAULT_SETTINGSDIR); + std::wstring const path = options.get_string(OPTION_DEFAULT_SETTINGSDIR); if (!path.empty()) { fz::remove_file(fz::to_native(path + L"layout.xml"), false); } @@ -1123,12 +1144,7 @@ void CWrapEngine::CheckLanguage() { int lang = wxGetApp().GetCurrentLanguage(); - if (lang == wxLANGUAGE_CHINESE || lang == wxLANGUAGE_CHINESE_SIMPLIFIED || - lang == wxLANGUAGE_CHINESE_TRADITIONAL || lang == wxLANGUAGE_CHINESE_HONGKONG || - lang == wxLANGUAGE_CHINESE_MACAU || lang == wxLANGUAGE_CHINESE_SINGAPORE || - lang == wxLANGUAGE_CHINESE_TAIWAN || - lang == wxLANGUAGE_JAPANESE) - { + if (IsChinese(lang)) { m_wrapOnEveryChar = true; m_noWrapChars = noWrapChars_Chinese; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/filezilla-3.71.0/src/interface/wrapengine.h new/filezilla-3.71.1/src/interface/wrapengine.h --- old/filezilla-3.71.0/src/interface/wrapengine.h 2026-03-20 05:30:02.000000000 +0100 +++ new/filezilla-3.71.1/src/interface/wrapengine.h 2026-08-25 05:30:03.000000000 +0200 @@ -5,6 +5,7 @@ #include <wx/font.h> #include <wx/window.h> +class COptionsBase; class wxSizer; class CWrapEngine { @@ -12,9 +13,9 @@ CWrapEngine(); virtual ~CWrapEngine() {} - bool LoadCache(); + void LoadCache(COptionsBase & options); - static void ClearCache(); + static void ClearCache(COptionsBase & options); enum wrap_result { wrap_failed = 0x01,
