mirror of https://github.com/PCSX2/pcsx2.git
Qt:Mac: Enable translations
This commit is contained in:
parent
c82f800794
commit
1d63779b7d
|
@ -204,8 +204,11 @@ if(WIN32)
|
|||
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION "${CMAKE_SOURCE_DIR}/bin/translations")
|
||||
qt_add_lrelease(pcsx2-qt TS_FILES ${TS_FILES})
|
||||
elseif(APPLE)
|
||||
# Hopefully macdeployqt will pick these up.
|
||||
qt_add_lrelease(pcsx2-qt TS_FILES ${TS_FILES})
|
||||
qt_add_lrelease(pcsx2-qt TS_FILES ${TS_FILES} QM_FILES_OUTPUT_VARIABLE QM_FILES)
|
||||
foreach (QM_FILE IN LISTS QM_FILES)
|
||||
target_sources(pcsx2-qt PRIVATE ${QM_FILE})
|
||||
set_source_files_properties(${QM_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources/translations/)
|
||||
endforeach()
|
||||
else()
|
||||
# TODO: Copy base translations.
|
||||
qt_add_lrelease(pcsx2-qt TS_FILES ${TS_FILES} QM_FILES_OUTPUT_VARIABLE QM_FILES)
|
||||
|
|
|
@ -72,7 +72,11 @@ void QtHost::InstallTranslator()
|
|||
QString::fromStdString(Host::GetBaseStringSettingValue("UI", "Language", GetDefaultLanguage()));
|
||||
|
||||
// Install the base qt translation first.
|
||||
#ifdef __APPLE__
|
||||
const QString base_dir = QStringLiteral("%1/../Resources/translations").arg(qApp->applicationDirPath());
|
||||
#else
|
||||
const QString base_dir = QStringLiteral("%1/translations").arg(qApp->applicationDirPath());
|
||||
#endif
|
||||
QString base_path = QStringLiteral("%1/qt_%2.qm").arg(base_dir).arg(language);
|
||||
bool has_base_ts = QFile::exists(base_path);
|
||||
if (!has_base_ts)
|
||||
|
|
Loading…
Reference in New Issue