fix: do not make windows users select .sgc files, enable i18n for the server config dialog

This commit is contained in:
sithlord48 2025-11-10 15:30:32 -05:00 committed by Nick Bolton
parent de63751516
commit 5441464a1d
3 changed files with 22 additions and 7 deletions

View file

@ -463,15 +463,12 @@ void ServerConfigDialog::toggleExternalConfig(bool checked)
bool ServerConfigDialog::browseConfigFile()
{
#if defined(Q_OS_WIN)
static const auto configExt = QStringLiteral("sgc");
#else
static const auto configExt = QStringLiteral("conf");
#endif
static const auto deskflowConfigFilter = QStringLiteral("%1 Configurations (*.%2);;All files (*.*)");
//: %1 is replaced with the application names
//: (*.conf) and (*.*) should not be translated
const auto deskflowConfigFilter = tr("%1 Configurations (*.conf);;All files (*.*)");
QString fileName =
QFileDialog::getOpenFileName(this, "Browse for a config file", "", deskflowConfigFilter.arg(kAppName, configExt));
QFileDialog::getOpenFileName(this, tr("Browse for a config file"), "", deskflowConfigFilter.arg(kAppName));
if (!fileName.isEmpty()) {
ui->lineConfigFile->setText(fileName);

View file

@ -1024,6 +1024,15 @@ Al habilitar esta opción, se deshabilitará la interfaz gráfica de usuario (GU
<source>Config file path</source>
<translation type="unfinished">Ruta del archivo de configuración</translation>
</message>
<message>
<source>%1 Configurations (*.conf);;All files (*.*)</source>
<extracomment>%1 is replaced with the application names (*.conf) and (*.*) should not be translated</extracomment>
<translation type="unfinished">%1 Configuraciones (*.conf);;Todos los archivos (*.*)</translation>
</message>
<message>
<source>Browse for a config file</source>
<translation type="unfinished">Busque un archivo de configuración</translation>
</message>
</context>
<context>
<name>SettingsDialog</name>

View file

@ -1024,6 +1024,15 @@ Enabling this setting will disable the server config GUI.</source>
L&apos;abilitazione di questa impostazione disabiliterà l&apos;interfaccia grafica di configurazione del server.</translation>
</message>
<message>
<source>%1 Configurations (*.conf);;All files (*.*)</source>
<extracomment>%1 is replaced with the application names (*.conf) and (*.*) should not be translated</extracomment>
<translation>%1 Configurazioni (*.conf);;Tutti i file (*.*)</translation>
</message>
<message>
<source>Browse for a config file</source>
<translation>Cerca un file di configurazione</translation>
</message>
</context>
<context>
<name>SettingsDialog</name>