mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 01:25:51 +00:00
Qt: Add es-es locale
This commit is contained in:
parent
748a75e533
commit
1d9075fa1c
|
@ -120,6 +120,7 @@ set(TS_FILES
|
|||
translations/duckstation-qt_de.ts
|
||||
translations/duckstation-qt_en.ts
|
||||
translations/duckstation-qt_es.ts
|
||||
translations/duckstation-qt_es-es.ts
|
||||
translations/duckstation-qt_fr.ts
|
||||
translations/duckstation-qt_he.ts
|
||||
translations/duckstation-qt_it.ts
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\..\dep\msvc\vsprops\Configurations.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<ClCompile Include="aboutdialog.cpp" />
|
||||
<ClCompile Include="achievementsettingswidget.cpp" />
|
||||
|
@ -255,6 +254,7 @@
|
|||
</QtTs>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="translations\duckstation-qt_es-es.ts" />
|
||||
<None Include="translations\duckstation-qt_tr.ts" />
|
||||
<QtUi Include="achievementsettingswidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
|
@ -264,7 +264,6 @@
|
|||
</QtUi>
|
||||
<None Include="debuggerwindow.ui" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<CommonDataFiles Include="$(SolutionDir)data\**\*.*">
|
||||
<InProject>false</InProject>
|
||||
|
@ -274,23 +273,17 @@
|
|||
<Message Text="Copying common data files" Importance="High" />
|
||||
<Copy SourceFiles="@(CommonDataFiles)" DestinationFolder="$(BinaryOutputDir)\%(RecursiveDir)" SkipUnchangedFiles="true" />
|
||||
</Target>
|
||||
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{28F14272-0EC4-41BB-849F-182ADB81AF70}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\..\dep\msvc\vsprops\Win32Application.props" />
|
||||
<Import Project="..\..\dep\msvc\vsprops\QtCompile.props" />
|
||||
|
||||
<Import Project="..\frontend-common\frontend-common.props" />
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(RootBuildDir)frontend-common\frontend-common.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
<Import Project="..\..\dep\msvc\vsprops\Targets.props" />
|
||||
|
||||
<Import Project="..\..\dep\msvc\vsprops\QtCompile.targets" />
|
||||
</Project>
|
|
@ -182,6 +182,9 @@
|
|||
<None Include="translations\duckstation-qt_tr.ts">
|
||||
<Filter>translations</Filter>
|
||||
</None>
|
||||
<None Include="translations\duckstation-qt_es-es.ts">
|
||||
<Filter>translations</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtTs Include="translations\duckstation-qt_de.ts">
|
||||
|
|
|
@ -964,7 +964,17 @@ void MainWindow::setupAdditionalUi()
|
|||
QAction* action = language_group->addAction(it.first);
|
||||
action->setCheckable(true);
|
||||
action->setChecked(current_language == it.second);
|
||||
action->setIcon(QIcon(QStringLiteral(":/icons/flags/%1.png").arg(it.second)));
|
||||
|
||||
QString icon_filename(QStringLiteral(":/icons/flags/%1.png").arg(it.second));
|
||||
if (!QFile::exists(icon_filename))
|
||||
{
|
||||
// try without the suffix (e.g. es-es -> es)
|
||||
const int pos = it.second.lastIndexOf('-');
|
||||
if (pos >= 0)
|
||||
icon_filename = QStringLiteral(":/icons/flags/%1.png").arg(it.second.left(pos));
|
||||
}
|
||||
action->setIcon(QIcon(icon_filename));
|
||||
|
||||
m_ui.menuSettingsLanguage->addAction(action);
|
||||
action->setData(it.second);
|
||||
connect(action, &QAction::triggered, [this, action]() {
|
||||
|
|
|
@ -72,7 +72,8 @@ std::vector<std::pair<QString, QString>> QtHostInterface::getAvailableLanguageLi
|
|||
{
|
||||
return {{QStringLiteral("English"), QStringLiteral("en")},
|
||||
{QStringLiteral("Deutsch"), QStringLiteral("de")},
|
||||
{QStringLiteral("Español"), QStringLiteral("es")},
|
||||
{QStringLiteral("Español de Hispanoamérica"), QStringLiteral("es")},
|
||||
{QStringLiteral("Español de España"), QStringLiteral("es-es")},
|
||||
{QStringLiteral("Français"), QStringLiteral("fr")},
|
||||
{QStringLiteral("עברית"), QStringLiteral("he")},
|
||||
{QStringLiteral("日本語"), QStringLiteral("ja")},
|
||||
|
|
Loading…
Reference in a new issue