From e7a9e6d87a81b0e66caf739e800de764a61e3fbb Mon Sep 17 00:00:00 2001 From: Ryu481 <142620516+Ryu481@users.noreply.github.com> Date: Thu, 3 Jul 2025 02:49:12 +0200 Subject: [PATCH 1/7] autodetect system language on MacOS --- dist/mac/lproj/ar.lproj/.gitkeep | 0 dist/mac/lproj/az-Latn.lproj/.gitkeep | 0 dist/mac/lproj/be.lproj/.gitkeep | 0 dist/mac/lproj/bg.lproj/.gitkeep | 0 dist/mac/lproj/ca.lproj/.gitkeep | 0 dist/mac/lproj/cs.lproj/.gitkeep | 0 dist/mac/lproj/da.lproj/.gitkeep | 0 dist/mac/lproj/de.lproj/.gitkeep | 0 dist/mac/lproj/el.lproj/.gitkeep | 0 dist/mac/lproj/en.lproj/.gitkeep | 0 dist/mac/lproj/en_AU.lproj/.gitkeep | 0 dist/mac/lproj/en_GB.lproj/.gitkeep | 0 dist/mac/lproj/eo.lproj/.gitkeep | 0 dist/mac/lproj/es.lproj/.gitkeep | 0 dist/mac/lproj/et.lproj/.gitkeep | 0 dist/mac/lproj/eu.lproj/.gitkeep | 0 dist/mac/lproj/fa.lproj/.gitkeep | 0 dist/mac/lproj/fi.lproj/.gitkeep | 0 dist/mac/lproj/fr.lproj/.gitkeep | 0 dist/mac/lproj/gl.lproj/.gitkeep | 0 dist/mac/lproj/he.lproj/.gitkeep | 0 dist/mac/lproj/hi_IN.lproj/.gitkeep | 0 dist/mac/lproj/hr.lproj/.gitkeep | 0 dist/mac/lproj/hu.lproj/.gitkeep | 0 dist/mac/lproj/hy.lproj/.gitkeep | 0 dist/mac/lproj/id.lproj/.gitkeep | 0 dist/mac/lproj/is.lproj/.gitkeep | 0 dist/mac/lproj/it.lproj/.gitkeep | 0 dist/mac/lproj/ja.lproj/.gitkeep | 0 dist/mac/lproj/ka.lproj/.gitkeep | 0 dist/mac/lproj/ko.lproj/.gitkeep | 0 dist/mac/lproj/lt.lproj/.gitkeep | 0 dist/mac/lproj/ltg.lproj/.gitkeep | 0 dist/mac/lproj/lv_LV.lproj/.gitkeep | 0 dist/mac/lproj/mn_MN.lproj/.gitkeep | 0 dist/mac/lproj/ms_MY.lproj/.gitkeep | 0 dist/mac/lproj/nb.lproj/.gitkeep | 0 dist/mac/lproj/nl.lproj/.gitkeep | 0 dist/mac/lproj/oc.lproj/.gitkeep | 0 dist/mac/lproj/pl.lproj/.gitkeep | 0 dist/mac/lproj/pt_BR.lproj/.gitkeep | 0 dist/mac/lproj/pt_PT.lproj/.gitkeep | 0 dist/mac/lproj/ro.lproj/.gitkeep | 0 dist/mac/lproj/ru.lproj/.gitkeep | 0 dist/mac/lproj/sk.lproj/.gitkeep | 0 dist/mac/lproj/sl.lproj/.gitkeep | 0 dist/mac/lproj/sr.lproj/.gitkeep | 0 dist/mac/lproj/sv.lproj/.gitkeep | 0 dist/mac/lproj/th.lproj/.gitkeep | 0 dist/mac/lproj/tr.lproj/.gitkeep | 0 dist/mac/lproj/uk.lproj/.gitkeep | 0 dist/mac/lproj/uz-Latn.lproj/.gitkeep | 0 dist/mac/lproj/vi.lproj/.gitkeep | 0 dist/mac/lproj/zh_CN.lproj/.gitkeep | 0 dist/mac/lproj/zh_HK.lproj/.gitkeep | 0 dist/mac/lproj/zh_TW.lproj/.gitkeep | 0 src/app/CMakeLists.txt | 112 ++++++++++++++++++++++++++ 57 files changed, 112 insertions(+) create mode 100644 dist/mac/lproj/ar.lproj/.gitkeep create mode 100644 dist/mac/lproj/az-Latn.lproj/.gitkeep create mode 100644 dist/mac/lproj/be.lproj/.gitkeep create mode 100644 dist/mac/lproj/bg.lproj/.gitkeep create mode 100644 dist/mac/lproj/ca.lproj/.gitkeep create mode 100644 dist/mac/lproj/cs.lproj/.gitkeep create mode 100644 dist/mac/lproj/da.lproj/.gitkeep create mode 100644 dist/mac/lproj/de.lproj/.gitkeep create mode 100644 dist/mac/lproj/el.lproj/.gitkeep create mode 100644 dist/mac/lproj/en.lproj/.gitkeep create mode 100644 dist/mac/lproj/en_AU.lproj/.gitkeep create mode 100644 dist/mac/lproj/en_GB.lproj/.gitkeep create mode 100644 dist/mac/lproj/eo.lproj/.gitkeep create mode 100644 dist/mac/lproj/es.lproj/.gitkeep create mode 100644 dist/mac/lproj/et.lproj/.gitkeep create mode 100644 dist/mac/lproj/eu.lproj/.gitkeep create mode 100644 dist/mac/lproj/fa.lproj/.gitkeep create mode 100644 dist/mac/lproj/fi.lproj/.gitkeep create mode 100644 dist/mac/lproj/fr.lproj/.gitkeep create mode 100644 dist/mac/lproj/gl.lproj/.gitkeep create mode 100644 dist/mac/lproj/he.lproj/.gitkeep create mode 100644 dist/mac/lproj/hi_IN.lproj/.gitkeep create mode 100644 dist/mac/lproj/hr.lproj/.gitkeep create mode 100644 dist/mac/lproj/hu.lproj/.gitkeep create mode 100644 dist/mac/lproj/hy.lproj/.gitkeep create mode 100644 dist/mac/lproj/id.lproj/.gitkeep create mode 100644 dist/mac/lproj/is.lproj/.gitkeep create mode 100644 dist/mac/lproj/it.lproj/.gitkeep create mode 100644 dist/mac/lproj/ja.lproj/.gitkeep create mode 100644 dist/mac/lproj/ka.lproj/.gitkeep create mode 100644 dist/mac/lproj/ko.lproj/.gitkeep create mode 100644 dist/mac/lproj/lt.lproj/.gitkeep create mode 100644 dist/mac/lproj/ltg.lproj/.gitkeep create mode 100644 dist/mac/lproj/lv_LV.lproj/.gitkeep create mode 100644 dist/mac/lproj/mn_MN.lproj/.gitkeep create mode 100644 dist/mac/lproj/ms_MY.lproj/.gitkeep create mode 100644 dist/mac/lproj/nb.lproj/.gitkeep create mode 100644 dist/mac/lproj/nl.lproj/.gitkeep create mode 100644 dist/mac/lproj/oc.lproj/.gitkeep create mode 100644 dist/mac/lproj/pl.lproj/.gitkeep create mode 100644 dist/mac/lproj/pt_BR.lproj/.gitkeep create mode 100644 dist/mac/lproj/pt_PT.lproj/.gitkeep create mode 100644 dist/mac/lproj/ro.lproj/.gitkeep create mode 100644 dist/mac/lproj/ru.lproj/.gitkeep create mode 100644 dist/mac/lproj/sk.lproj/.gitkeep create mode 100644 dist/mac/lproj/sl.lproj/.gitkeep create mode 100644 dist/mac/lproj/sr.lproj/.gitkeep create mode 100644 dist/mac/lproj/sv.lproj/.gitkeep create mode 100644 dist/mac/lproj/th.lproj/.gitkeep create mode 100644 dist/mac/lproj/tr.lproj/.gitkeep create mode 100644 dist/mac/lproj/uk.lproj/.gitkeep create mode 100644 dist/mac/lproj/uz-Latn.lproj/.gitkeep create mode 100644 dist/mac/lproj/vi.lproj/.gitkeep create mode 100644 dist/mac/lproj/zh_CN.lproj/.gitkeep create mode 100644 dist/mac/lproj/zh_HK.lproj/.gitkeep create mode 100644 dist/mac/lproj/zh_TW.lproj/.gitkeep diff --git a/dist/mac/lproj/ar.lproj/.gitkeep b/dist/mac/lproj/ar.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/az-Latn.lproj/.gitkeep b/dist/mac/lproj/az-Latn.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/be.lproj/.gitkeep b/dist/mac/lproj/be.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/bg.lproj/.gitkeep b/dist/mac/lproj/bg.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/ca.lproj/.gitkeep b/dist/mac/lproj/ca.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/cs.lproj/.gitkeep b/dist/mac/lproj/cs.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/da.lproj/.gitkeep b/dist/mac/lproj/da.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/de.lproj/.gitkeep b/dist/mac/lproj/de.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/el.lproj/.gitkeep b/dist/mac/lproj/el.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/en.lproj/.gitkeep b/dist/mac/lproj/en.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/en_AU.lproj/.gitkeep b/dist/mac/lproj/en_AU.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/en_GB.lproj/.gitkeep b/dist/mac/lproj/en_GB.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/eo.lproj/.gitkeep b/dist/mac/lproj/eo.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/es.lproj/.gitkeep b/dist/mac/lproj/es.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/et.lproj/.gitkeep b/dist/mac/lproj/et.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/eu.lproj/.gitkeep b/dist/mac/lproj/eu.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/fa.lproj/.gitkeep b/dist/mac/lproj/fa.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/fi.lproj/.gitkeep b/dist/mac/lproj/fi.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/fr.lproj/.gitkeep b/dist/mac/lproj/fr.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/gl.lproj/.gitkeep b/dist/mac/lproj/gl.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/he.lproj/.gitkeep b/dist/mac/lproj/he.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/hi_IN.lproj/.gitkeep b/dist/mac/lproj/hi_IN.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/hr.lproj/.gitkeep b/dist/mac/lproj/hr.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/hu.lproj/.gitkeep b/dist/mac/lproj/hu.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/hy.lproj/.gitkeep b/dist/mac/lproj/hy.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/id.lproj/.gitkeep b/dist/mac/lproj/id.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/is.lproj/.gitkeep b/dist/mac/lproj/is.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/it.lproj/.gitkeep b/dist/mac/lproj/it.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/ja.lproj/.gitkeep b/dist/mac/lproj/ja.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/ka.lproj/.gitkeep b/dist/mac/lproj/ka.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/ko.lproj/.gitkeep b/dist/mac/lproj/ko.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/lt.lproj/.gitkeep b/dist/mac/lproj/lt.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/ltg.lproj/.gitkeep b/dist/mac/lproj/ltg.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/lv_LV.lproj/.gitkeep b/dist/mac/lproj/lv_LV.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/mn_MN.lproj/.gitkeep b/dist/mac/lproj/mn_MN.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/ms_MY.lproj/.gitkeep b/dist/mac/lproj/ms_MY.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/nb.lproj/.gitkeep b/dist/mac/lproj/nb.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/nl.lproj/.gitkeep b/dist/mac/lproj/nl.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/oc.lproj/.gitkeep b/dist/mac/lproj/oc.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/pl.lproj/.gitkeep b/dist/mac/lproj/pl.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/pt_BR.lproj/.gitkeep b/dist/mac/lproj/pt_BR.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/pt_PT.lproj/.gitkeep b/dist/mac/lproj/pt_PT.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/ro.lproj/.gitkeep b/dist/mac/lproj/ro.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/ru.lproj/.gitkeep b/dist/mac/lproj/ru.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/sk.lproj/.gitkeep b/dist/mac/lproj/sk.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/sl.lproj/.gitkeep b/dist/mac/lproj/sl.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/sr.lproj/.gitkeep b/dist/mac/lproj/sr.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/sv.lproj/.gitkeep b/dist/mac/lproj/sv.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/th.lproj/.gitkeep b/dist/mac/lproj/th.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/tr.lproj/.gitkeep b/dist/mac/lproj/tr.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/uk.lproj/.gitkeep b/dist/mac/lproj/uk.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/uz-Latn.lproj/.gitkeep b/dist/mac/lproj/uz-Latn.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/vi.lproj/.gitkeep b/dist/mac/lproj/vi.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/zh_CN.lproj/.gitkeep b/dist/mac/lproj/zh_CN.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/zh_HK.lproj/.gitkeep b/dist/mac/lproj/zh_HK.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/dist/mac/lproj/zh_TW.lproj/.gitkeep b/dist/mac/lproj/zh_TW.lproj/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index b5174aa45..cc07bbee4 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -83,6 +83,62 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") "${qBittorrent_SOURCE_DIR}/dist/mac/qt.conf" "${qBittorrent_SOURCE_DIR}/dist/mac/qBitTorrentDocument.icns" "${qBittorrent_SOURCE_DIR}/dist/mac/qbittorrent_mac.icns" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ar.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/az-Latn.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/be.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/bg.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ca.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/cs.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/da.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/de.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/el.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/en_AU.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/en_GB.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/en.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/eo.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/es.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/et.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/eu.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/fa.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/fi.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/fr.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/gl.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/he.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hi_IN.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hr.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hu.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hy.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/id.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/is.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/it.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ja.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ka.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ko.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/lt.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ltg.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/lv_LV.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/mn_MN.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ms_MY.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/nb.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/nl.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/oc.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/pl.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/pt_BR.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/pt_PT.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ro.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ru.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sk.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sl.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sr.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sv.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/th.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/tr.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/uk.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/uz-Latn.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/vi.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/zh_CN.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/zh_HK.lproj" + "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/zh_TW.lproj" PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) @@ -100,6 +156,62 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") ${qBittorrent_SOURCE_DIR}/dist/mac/qt.conf ${qBittorrent_SOURCE_DIR}/dist/mac/qBitTorrentDocument.icns ${qBittorrent_SOURCE_DIR}/dist/mac/qbittorrent_mac.icns + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ar.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/az-Latn.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/be.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/bg.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ca.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/cs.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/da.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/de.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/el.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/en_AU.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/en_GB.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/en.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/eo.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/es.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/et.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/eu.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/fa.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/fi.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/fr.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/gl.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/he.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hi_IN.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hr.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hu.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hy.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/id.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/is.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/it.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ja.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ka.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ko.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/lt.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ltg.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/lv_LV.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/mn_MN.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ms_MY.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/nb.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/nl.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/oc.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/pl.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/pt_BR.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/pt_PT.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ro.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ru.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sk.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sl.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sr.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sv.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/th.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/tr.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/uk.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/uz-Latn.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/vi.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/zh_CN.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/zh_HK.lproj + ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/zh_TW.lproj ) elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") set_target_properties(qbt_app PROPERTIES WIN32_EXECUTABLE ON) From 4183ae38dc911cdd99ef8b9e2e1283a1c7f21cf0 Mon Sep 17 00:00:00 2001 From: Ryu481 <142620516+Ryu481@users.noreply.github.com> Date: Thu, 3 Jul 2025 08:59:53 +0200 Subject: [PATCH 2/7] autodetect system language on MacOS --- .../{lproj => Resources}/ar.lproj/.gitkeep | 0 .../az-Latn.lproj/.gitkeep | 0 .../{lproj => Resources}/be.lproj/.gitkeep | 0 .../{lproj => Resources}/bg.lproj/.gitkeep | 0 .../{lproj => Resources}/ca.lproj/.gitkeep | 0 .../{lproj => Resources}/cs.lproj/.gitkeep | 0 .../{lproj => Resources}/da.lproj/.gitkeep | 0 .../{lproj => Resources}/de.lproj/.gitkeep | 0 .../{lproj => Resources}/el.lproj/.gitkeep | 0 .../{lproj => Resources}/en.lproj/.gitkeep | 0 .../{lproj => Resources}/en_AU.lproj/.gitkeep | 0 .../{lproj => Resources}/en_GB.lproj/.gitkeep | 0 .../{lproj => Resources}/eo.lproj/.gitkeep | 0 .../{lproj => Resources}/es.lproj/.gitkeep | 0 .../{lproj => Resources}/et.lproj/.gitkeep | 0 .../{lproj => Resources}/eu.lproj/.gitkeep | 0 .../{lproj => Resources}/fa.lproj/.gitkeep | 0 .../{lproj => Resources}/fi.lproj/.gitkeep | 0 .../{lproj => Resources}/fr.lproj/.gitkeep | 0 .../{lproj => Resources}/gl.lproj/.gitkeep | 0 .../{lproj => Resources}/he.lproj/.gitkeep | 0 .../{lproj => Resources}/hi_IN.lproj/.gitkeep | 0 .../{lproj => Resources}/hr.lproj/.gitkeep | 0 .../{lproj => Resources}/hu.lproj/.gitkeep | 0 .../{lproj => Resources}/hy.lproj/.gitkeep | 0 .../{lproj => Resources}/id.lproj/.gitkeep | 0 .../{lproj => Resources}/is.lproj/.gitkeep | 0 .../{lproj => Resources}/it.lproj/.gitkeep | 0 .../{lproj => Resources}/ja.lproj/.gitkeep | 0 .../{lproj => Resources}/ka.lproj/.gitkeep | 0 .../{lproj => Resources}/ko.lproj/.gitkeep | 0 .../{lproj => Resources}/lt.lproj/.gitkeep | 0 .../{lproj => Resources}/ltg.lproj/.gitkeep | 0 .../{lproj => Resources}/lv_LV.lproj/.gitkeep | 0 .../{lproj => Resources}/mn_MN.lproj/.gitkeep | 0 .../{lproj => Resources}/ms_MY.lproj/.gitkeep | 0 .../{lproj => Resources}/nb.lproj/.gitkeep | 0 .../{lproj => Resources}/nl.lproj/.gitkeep | 0 .../{lproj => Resources}/oc.lproj/.gitkeep | 0 .../{lproj => Resources}/pl.lproj/.gitkeep | 0 .../{lproj => Resources}/pt_BR.lproj/.gitkeep | 0 .../{lproj => Resources}/pt_PT.lproj/.gitkeep | 0 .../{ => Resources}/qBitTorrentDocument.icns | Bin dist/mac/{ => Resources}/qbittorrent_mac.icns | Bin dist/mac/{ => Resources}/qt.conf | 0 .../{lproj => Resources}/ro.lproj/.gitkeep | 0 .../{lproj => Resources}/ru.lproj/.gitkeep | 0 .../{lproj => Resources}/sk.lproj/.gitkeep | 0 .../{lproj => Resources}/sl.lproj/.gitkeep | 0 .../{lproj => Resources}/sr.lproj/.gitkeep | 0 .../{lproj => Resources}/sv.lproj/.gitkeep | 0 .../{lproj => Resources}/th.lproj/.gitkeep | 0 .../{lproj => Resources}/tr.lproj/.gitkeep | 0 .../{lproj => Resources}/uk.lproj/.gitkeep | 0 .../uz-Latn.lproj/.gitkeep | 0 .../{lproj => Resources}/vi.lproj/.gitkeep | 0 .../{lproj => Resources}/zh_CN.lproj/.gitkeep | 0 .../{lproj => Resources}/zh_HK.lproj/.gitkeep | 0 .../{lproj => Resources}/zh_TW.lproj/.gitkeep | 0 src/app/CMakeLists.txt | 130 +----------------- 60 files changed, 6 insertions(+), 124 deletions(-) rename dist/mac/{lproj => Resources}/ar.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/az-Latn.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/be.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/bg.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/ca.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/cs.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/da.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/de.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/el.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/en.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/en_AU.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/en_GB.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/eo.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/es.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/et.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/eu.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/fa.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/fi.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/fr.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/gl.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/he.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/hi_IN.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/hr.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/hu.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/hy.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/id.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/is.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/it.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/ja.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/ka.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/ko.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/lt.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/ltg.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/lv_LV.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/mn_MN.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/ms_MY.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/nb.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/nl.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/oc.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/pl.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/pt_BR.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/pt_PT.lproj/.gitkeep (100%) rename dist/mac/{ => Resources}/qBitTorrentDocument.icns (100%) rename dist/mac/{ => Resources}/qbittorrent_mac.icns (100%) rename dist/mac/{ => Resources}/qt.conf (100%) rename dist/mac/{lproj => Resources}/ro.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/ru.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/sk.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/sl.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/sr.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/sv.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/th.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/tr.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/uk.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/uz-Latn.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/vi.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/zh_CN.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/zh_HK.lproj/.gitkeep (100%) rename dist/mac/{lproj => Resources}/zh_TW.lproj/.gitkeep (100%) diff --git a/dist/mac/lproj/ar.lproj/.gitkeep b/dist/mac/Resources/ar.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/ar.lproj/.gitkeep rename to dist/mac/Resources/ar.lproj/.gitkeep diff --git a/dist/mac/lproj/az-Latn.lproj/.gitkeep b/dist/mac/Resources/az-Latn.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/az-Latn.lproj/.gitkeep rename to dist/mac/Resources/az-Latn.lproj/.gitkeep diff --git a/dist/mac/lproj/be.lproj/.gitkeep b/dist/mac/Resources/be.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/be.lproj/.gitkeep rename to dist/mac/Resources/be.lproj/.gitkeep diff --git a/dist/mac/lproj/bg.lproj/.gitkeep b/dist/mac/Resources/bg.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/bg.lproj/.gitkeep rename to dist/mac/Resources/bg.lproj/.gitkeep diff --git a/dist/mac/lproj/ca.lproj/.gitkeep b/dist/mac/Resources/ca.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/ca.lproj/.gitkeep rename to dist/mac/Resources/ca.lproj/.gitkeep diff --git a/dist/mac/lproj/cs.lproj/.gitkeep b/dist/mac/Resources/cs.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/cs.lproj/.gitkeep rename to dist/mac/Resources/cs.lproj/.gitkeep diff --git a/dist/mac/lproj/da.lproj/.gitkeep b/dist/mac/Resources/da.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/da.lproj/.gitkeep rename to dist/mac/Resources/da.lproj/.gitkeep diff --git a/dist/mac/lproj/de.lproj/.gitkeep b/dist/mac/Resources/de.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/de.lproj/.gitkeep rename to dist/mac/Resources/de.lproj/.gitkeep diff --git a/dist/mac/lproj/el.lproj/.gitkeep b/dist/mac/Resources/el.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/el.lproj/.gitkeep rename to dist/mac/Resources/el.lproj/.gitkeep diff --git a/dist/mac/lproj/en.lproj/.gitkeep b/dist/mac/Resources/en.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/en.lproj/.gitkeep rename to dist/mac/Resources/en.lproj/.gitkeep diff --git a/dist/mac/lproj/en_AU.lproj/.gitkeep b/dist/mac/Resources/en_AU.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/en_AU.lproj/.gitkeep rename to dist/mac/Resources/en_AU.lproj/.gitkeep diff --git a/dist/mac/lproj/en_GB.lproj/.gitkeep b/dist/mac/Resources/en_GB.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/en_GB.lproj/.gitkeep rename to dist/mac/Resources/en_GB.lproj/.gitkeep diff --git a/dist/mac/lproj/eo.lproj/.gitkeep b/dist/mac/Resources/eo.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/eo.lproj/.gitkeep rename to dist/mac/Resources/eo.lproj/.gitkeep diff --git a/dist/mac/lproj/es.lproj/.gitkeep b/dist/mac/Resources/es.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/es.lproj/.gitkeep rename to dist/mac/Resources/es.lproj/.gitkeep diff --git a/dist/mac/lproj/et.lproj/.gitkeep b/dist/mac/Resources/et.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/et.lproj/.gitkeep rename to dist/mac/Resources/et.lproj/.gitkeep diff --git a/dist/mac/lproj/eu.lproj/.gitkeep b/dist/mac/Resources/eu.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/eu.lproj/.gitkeep rename to dist/mac/Resources/eu.lproj/.gitkeep diff --git a/dist/mac/lproj/fa.lproj/.gitkeep b/dist/mac/Resources/fa.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/fa.lproj/.gitkeep rename to dist/mac/Resources/fa.lproj/.gitkeep diff --git a/dist/mac/lproj/fi.lproj/.gitkeep b/dist/mac/Resources/fi.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/fi.lproj/.gitkeep rename to dist/mac/Resources/fi.lproj/.gitkeep diff --git a/dist/mac/lproj/fr.lproj/.gitkeep b/dist/mac/Resources/fr.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/fr.lproj/.gitkeep rename to dist/mac/Resources/fr.lproj/.gitkeep diff --git a/dist/mac/lproj/gl.lproj/.gitkeep b/dist/mac/Resources/gl.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/gl.lproj/.gitkeep rename to dist/mac/Resources/gl.lproj/.gitkeep diff --git a/dist/mac/lproj/he.lproj/.gitkeep b/dist/mac/Resources/he.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/he.lproj/.gitkeep rename to dist/mac/Resources/he.lproj/.gitkeep diff --git a/dist/mac/lproj/hi_IN.lproj/.gitkeep b/dist/mac/Resources/hi_IN.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/hi_IN.lproj/.gitkeep rename to dist/mac/Resources/hi_IN.lproj/.gitkeep diff --git a/dist/mac/lproj/hr.lproj/.gitkeep b/dist/mac/Resources/hr.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/hr.lproj/.gitkeep rename to dist/mac/Resources/hr.lproj/.gitkeep diff --git a/dist/mac/lproj/hu.lproj/.gitkeep b/dist/mac/Resources/hu.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/hu.lproj/.gitkeep rename to dist/mac/Resources/hu.lproj/.gitkeep diff --git a/dist/mac/lproj/hy.lproj/.gitkeep b/dist/mac/Resources/hy.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/hy.lproj/.gitkeep rename to dist/mac/Resources/hy.lproj/.gitkeep diff --git a/dist/mac/lproj/id.lproj/.gitkeep b/dist/mac/Resources/id.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/id.lproj/.gitkeep rename to dist/mac/Resources/id.lproj/.gitkeep diff --git a/dist/mac/lproj/is.lproj/.gitkeep b/dist/mac/Resources/is.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/is.lproj/.gitkeep rename to dist/mac/Resources/is.lproj/.gitkeep diff --git a/dist/mac/lproj/it.lproj/.gitkeep b/dist/mac/Resources/it.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/it.lproj/.gitkeep rename to dist/mac/Resources/it.lproj/.gitkeep diff --git a/dist/mac/lproj/ja.lproj/.gitkeep b/dist/mac/Resources/ja.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/ja.lproj/.gitkeep rename to dist/mac/Resources/ja.lproj/.gitkeep diff --git a/dist/mac/lproj/ka.lproj/.gitkeep b/dist/mac/Resources/ka.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/ka.lproj/.gitkeep rename to dist/mac/Resources/ka.lproj/.gitkeep diff --git a/dist/mac/lproj/ko.lproj/.gitkeep b/dist/mac/Resources/ko.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/ko.lproj/.gitkeep rename to dist/mac/Resources/ko.lproj/.gitkeep diff --git a/dist/mac/lproj/lt.lproj/.gitkeep b/dist/mac/Resources/lt.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/lt.lproj/.gitkeep rename to dist/mac/Resources/lt.lproj/.gitkeep diff --git a/dist/mac/lproj/ltg.lproj/.gitkeep b/dist/mac/Resources/ltg.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/ltg.lproj/.gitkeep rename to dist/mac/Resources/ltg.lproj/.gitkeep diff --git a/dist/mac/lproj/lv_LV.lproj/.gitkeep b/dist/mac/Resources/lv_LV.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/lv_LV.lproj/.gitkeep rename to dist/mac/Resources/lv_LV.lproj/.gitkeep diff --git a/dist/mac/lproj/mn_MN.lproj/.gitkeep b/dist/mac/Resources/mn_MN.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/mn_MN.lproj/.gitkeep rename to dist/mac/Resources/mn_MN.lproj/.gitkeep diff --git a/dist/mac/lproj/ms_MY.lproj/.gitkeep b/dist/mac/Resources/ms_MY.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/ms_MY.lproj/.gitkeep rename to dist/mac/Resources/ms_MY.lproj/.gitkeep diff --git a/dist/mac/lproj/nb.lproj/.gitkeep b/dist/mac/Resources/nb.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/nb.lproj/.gitkeep rename to dist/mac/Resources/nb.lproj/.gitkeep diff --git a/dist/mac/lproj/nl.lproj/.gitkeep b/dist/mac/Resources/nl.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/nl.lproj/.gitkeep rename to dist/mac/Resources/nl.lproj/.gitkeep diff --git a/dist/mac/lproj/oc.lproj/.gitkeep b/dist/mac/Resources/oc.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/oc.lproj/.gitkeep rename to dist/mac/Resources/oc.lproj/.gitkeep diff --git a/dist/mac/lproj/pl.lproj/.gitkeep b/dist/mac/Resources/pl.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/pl.lproj/.gitkeep rename to dist/mac/Resources/pl.lproj/.gitkeep diff --git a/dist/mac/lproj/pt_BR.lproj/.gitkeep b/dist/mac/Resources/pt_BR.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/pt_BR.lproj/.gitkeep rename to dist/mac/Resources/pt_BR.lproj/.gitkeep diff --git a/dist/mac/lproj/pt_PT.lproj/.gitkeep b/dist/mac/Resources/pt_PT.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/pt_PT.lproj/.gitkeep rename to dist/mac/Resources/pt_PT.lproj/.gitkeep diff --git a/dist/mac/qBitTorrentDocument.icns b/dist/mac/Resources/qBitTorrentDocument.icns similarity index 100% rename from dist/mac/qBitTorrentDocument.icns rename to dist/mac/Resources/qBitTorrentDocument.icns diff --git a/dist/mac/qbittorrent_mac.icns b/dist/mac/Resources/qbittorrent_mac.icns similarity index 100% rename from dist/mac/qbittorrent_mac.icns rename to dist/mac/Resources/qbittorrent_mac.icns diff --git a/dist/mac/qt.conf b/dist/mac/Resources/qt.conf similarity index 100% rename from dist/mac/qt.conf rename to dist/mac/Resources/qt.conf diff --git a/dist/mac/lproj/ro.lproj/.gitkeep b/dist/mac/Resources/ro.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/ro.lproj/.gitkeep rename to dist/mac/Resources/ro.lproj/.gitkeep diff --git a/dist/mac/lproj/ru.lproj/.gitkeep b/dist/mac/Resources/ru.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/ru.lproj/.gitkeep rename to dist/mac/Resources/ru.lproj/.gitkeep diff --git a/dist/mac/lproj/sk.lproj/.gitkeep b/dist/mac/Resources/sk.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/sk.lproj/.gitkeep rename to dist/mac/Resources/sk.lproj/.gitkeep diff --git a/dist/mac/lproj/sl.lproj/.gitkeep b/dist/mac/Resources/sl.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/sl.lproj/.gitkeep rename to dist/mac/Resources/sl.lproj/.gitkeep diff --git a/dist/mac/lproj/sr.lproj/.gitkeep b/dist/mac/Resources/sr.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/sr.lproj/.gitkeep rename to dist/mac/Resources/sr.lproj/.gitkeep diff --git a/dist/mac/lproj/sv.lproj/.gitkeep b/dist/mac/Resources/sv.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/sv.lproj/.gitkeep rename to dist/mac/Resources/sv.lproj/.gitkeep diff --git a/dist/mac/lproj/th.lproj/.gitkeep b/dist/mac/Resources/th.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/th.lproj/.gitkeep rename to dist/mac/Resources/th.lproj/.gitkeep diff --git a/dist/mac/lproj/tr.lproj/.gitkeep b/dist/mac/Resources/tr.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/tr.lproj/.gitkeep rename to dist/mac/Resources/tr.lproj/.gitkeep diff --git a/dist/mac/lproj/uk.lproj/.gitkeep b/dist/mac/Resources/uk.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/uk.lproj/.gitkeep rename to dist/mac/Resources/uk.lproj/.gitkeep diff --git a/dist/mac/lproj/uz-Latn.lproj/.gitkeep b/dist/mac/Resources/uz-Latn.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/uz-Latn.lproj/.gitkeep rename to dist/mac/Resources/uz-Latn.lproj/.gitkeep diff --git a/dist/mac/lproj/vi.lproj/.gitkeep b/dist/mac/Resources/vi.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/vi.lproj/.gitkeep rename to dist/mac/Resources/vi.lproj/.gitkeep diff --git a/dist/mac/lproj/zh_CN.lproj/.gitkeep b/dist/mac/Resources/zh_CN.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/zh_CN.lproj/.gitkeep rename to dist/mac/Resources/zh_CN.lproj/.gitkeep diff --git a/dist/mac/lproj/zh_HK.lproj/.gitkeep b/dist/mac/Resources/zh_HK.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/zh_HK.lproj/.gitkeep rename to dist/mac/Resources/zh_HK.lproj/.gitkeep diff --git a/dist/mac/lproj/zh_TW.lproj/.gitkeep b/dist/mac/Resources/zh_TW.lproj/.gitkeep similarity index 100% rename from dist/mac/lproj/zh_TW.lproj/.gitkeep rename to dist/mac/Resources/zh_TW.lproj/.gitkeep diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index cc07bbee4..1b4f9ea65 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -79,69 +79,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") include(FindQtTranslations) qbt_get_qt_translations(QT_TRANSLATIONS) set_source_files_properties(${QT_TRANSLATIONS} PROPERTIES MACOSX_PACKAGE_LOCATION translations) - set_source_files_properties( - "${qBittorrent_SOURCE_DIR}/dist/mac/qt.conf" - "${qBittorrent_SOURCE_DIR}/dist/mac/qBitTorrentDocument.icns" - "${qBittorrent_SOURCE_DIR}/dist/mac/qbittorrent_mac.icns" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ar.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/az-Latn.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/be.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/bg.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ca.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/cs.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/da.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/de.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/el.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/en_AU.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/en_GB.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/en.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/eo.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/es.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/et.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/eu.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/fa.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/fi.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/fr.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/gl.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/he.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hi_IN.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hr.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hu.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hy.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/id.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/is.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/it.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ja.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ka.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ko.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/lt.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ltg.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/lv_LV.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/mn_MN.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ms_MY.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/nb.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/nl.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/oc.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/pl.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/pt_BR.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/pt_PT.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ro.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ru.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sk.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sl.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sr.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sv.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/th.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/tr.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/uk.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/uz-Latn.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/vi.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/zh_CN.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/zh_HK.lproj" - "${qBittorrent_SOURCE_DIR}/dist/mac/lproj/zh_TW.lproj" - PROPERTIES - MACOSX_PACKAGE_LOCATION Resources - ) # provide variables for substitution in dist/mac/Info.plist get_target_property(EXECUTABLE_NAME qbt_app OUTPUT_NAME) # This variable name should be changed once qmake is no longer used. Refer to the discussion in PR #14813 @@ -151,67 +88,12 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") MACOSX_BUNDLE_BUNDLE_NAME "qBittorrent" MACOSX_BUNDLE_INFO_PLIST ${qBittorrent_SOURCE_DIR}/dist/mac/Info.plist ) - target_sources(qbt_app PRIVATE - ${QT_TRANSLATIONS} - ${qBittorrent_SOURCE_DIR}/dist/mac/qt.conf - ${qBittorrent_SOURCE_DIR}/dist/mac/qBitTorrentDocument.icns - ${qBittorrent_SOURCE_DIR}/dist/mac/qbittorrent_mac.icns - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ar.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/az-Latn.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/be.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/bg.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ca.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/cs.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/da.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/de.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/el.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/en_AU.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/en_GB.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/en.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/eo.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/es.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/et.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/eu.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/fa.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/fi.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/fr.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/gl.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/he.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hi_IN.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hr.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hu.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/hy.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/id.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/is.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/it.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ja.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ka.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ko.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/lt.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ltg.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/lv_LV.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/mn_MN.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ms_MY.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/nb.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/nl.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/oc.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/pl.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/pt_BR.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/pt_PT.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ro.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/ru.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sk.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sl.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sr.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/sv.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/th.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/tr.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/uk.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/uz-Latn.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/vi.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/zh_CN.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/zh_HK.lproj - ${qBittorrent_SOURCE_DIR}/dist/mac/lproj/zh_TW.lproj + add_custom_command( + TARGET qbt_app + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory + "${qBittorrent_SOURCE_DIR}/dist/mac/Resources" + "$/../Resources" ) elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") set_target_properties(qbt_app PROPERTIES WIN32_EXECUTABLE ON) From 183938ca28bcc031c381753138754f3bd3a2feb4 Mon Sep 17 00:00:00 2001 From: Ryu481 <142620516+Ryu481@users.noreply.github.com> Date: Thu, 3 Jul 2025 12:09:08 +0200 Subject: [PATCH 3/7] autodetect system language on MacOS --- dist/mac/Resources/ar.lproj/.gitkeep | 0 dist/mac/Resources/az-Latn.lproj/.gitkeep | 0 dist/mac/Resources/be.lproj/.gitkeep | 0 dist/mac/Resources/bg.lproj/.gitkeep | 0 dist/mac/Resources/ca.lproj/.gitkeep | 0 dist/mac/Resources/cs.lproj/.gitkeep | 0 dist/mac/Resources/da.lproj/.gitkeep | 0 dist/mac/Resources/de.lproj/.gitkeep | 0 dist/mac/Resources/el.lproj/.gitkeep | 0 dist/mac/Resources/en.lproj/.gitkeep | 0 dist/mac/Resources/en_AU.lproj/.gitkeep | 0 dist/mac/Resources/en_GB.lproj/.gitkeep | 0 dist/mac/Resources/eo.lproj/.gitkeep | 0 dist/mac/Resources/es.lproj/.gitkeep | 0 dist/mac/Resources/et.lproj/.gitkeep | 0 dist/mac/Resources/eu.lproj/.gitkeep | 0 dist/mac/Resources/fa.lproj/.gitkeep | 0 dist/mac/Resources/fi.lproj/.gitkeep | 0 dist/mac/Resources/fr.lproj/.gitkeep | 0 dist/mac/Resources/gl.lproj/.gitkeep | 0 dist/mac/Resources/he.lproj/.gitkeep | 0 dist/mac/Resources/hi_IN.lproj/.gitkeep | 0 dist/mac/Resources/hr.lproj/.gitkeep | 0 dist/mac/Resources/hu.lproj/.gitkeep | 0 dist/mac/Resources/hy.lproj/.gitkeep | 0 dist/mac/Resources/id.lproj/.gitkeep | 0 dist/mac/Resources/is.lproj/.gitkeep | 0 dist/mac/Resources/it.lproj/.gitkeep | 0 dist/mac/Resources/ja.lproj/.gitkeep | 0 dist/mac/Resources/ka.lproj/.gitkeep | 0 dist/mac/Resources/ko.lproj/.gitkeep | 0 dist/mac/Resources/lt.lproj/.gitkeep | 0 dist/mac/Resources/ltg.lproj/.gitkeep | 0 dist/mac/Resources/lv_LV.lproj/.gitkeep | 0 dist/mac/Resources/mn_MN.lproj/.gitkeep | 0 dist/mac/Resources/ms_MY.lproj/.gitkeep | 0 dist/mac/Resources/nb.lproj/.gitkeep | 0 dist/mac/Resources/nl.lproj/.gitkeep | 0 dist/mac/Resources/oc.lproj/.gitkeep | 0 dist/mac/Resources/pl.lproj/.gitkeep | 0 dist/mac/Resources/pt_BR.lproj/.gitkeep | 0 dist/mac/Resources/pt_PT.lproj/.gitkeep | 0 dist/mac/Resources/ro.lproj/.gitkeep | 0 dist/mac/Resources/ru.lproj/.gitkeep | 0 dist/mac/Resources/sk.lproj/.gitkeep | 0 dist/mac/Resources/sl.lproj/.gitkeep | 0 dist/mac/Resources/sr.lproj/.gitkeep | 0 dist/mac/Resources/sv.lproj/.gitkeep | 0 dist/mac/Resources/th.lproj/.gitkeep | 0 dist/mac/Resources/tr.lproj/.gitkeep | 0 dist/mac/Resources/uk.lproj/.gitkeep | 0 dist/mac/Resources/uz-Latn.lproj/.gitkeep | 0 dist/mac/Resources/vi.lproj/.gitkeep | 0 dist/mac/Resources/zh_CN.lproj/.gitkeep | 0 dist/mac/Resources/zh_HK.lproj/.gitkeep | 0 dist/mac/Resources/zh_TW.lproj/.gitkeep | 0 .../{Resources => }/qBitTorrentDocument.icns | Bin dist/mac/{Resources => }/qbittorrent_mac.icns | Bin dist/mac/{Resources => }/qt.conf | 0 src/app/CMakeLists.txt | 37 +++++++++++++++--- 60 files changed, 31 insertions(+), 6 deletions(-) delete mode 100644 dist/mac/Resources/ar.lproj/.gitkeep delete mode 100644 dist/mac/Resources/az-Latn.lproj/.gitkeep delete mode 100644 dist/mac/Resources/be.lproj/.gitkeep delete mode 100644 dist/mac/Resources/bg.lproj/.gitkeep delete mode 100644 dist/mac/Resources/ca.lproj/.gitkeep delete mode 100644 dist/mac/Resources/cs.lproj/.gitkeep delete mode 100644 dist/mac/Resources/da.lproj/.gitkeep delete mode 100644 dist/mac/Resources/de.lproj/.gitkeep delete mode 100644 dist/mac/Resources/el.lproj/.gitkeep delete mode 100644 dist/mac/Resources/en.lproj/.gitkeep delete mode 100644 dist/mac/Resources/en_AU.lproj/.gitkeep delete mode 100644 dist/mac/Resources/en_GB.lproj/.gitkeep delete mode 100644 dist/mac/Resources/eo.lproj/.gitkeep delete mode 100644 dist/mac/Resources/es.lproj/.gitkeep delete mode 100644 dist/mac/Resources/et.lproj/.gitkeep delete mode 100644 dist/mac/Resources/eu.lproj/.gitkeep delete mode 100644 dist/mac/Resources/fa.lproj/.gitkeep delete mode 100644 dist/mac/Resources/fi.lproj/.gitkeep delete mode 100644 dist/mac/Resources/fr.lproj/.gitkeep delete mode 100644 dist/mac/Resources/gl.lproj/.gitkeep delete mode 100644 dist/mac/Resources/he.lproj/.gitkeep delete mode 100644 dist/mac/Resources/hi_IN.lproj/.gitkeep delete mode 100644 dist/mac/Resources/hr.lproj/.gitkeep delete mode 100644 dist/mac/Resources/hu.lproj/.gitkeep delete mode 100644 dist/mac/Resources/hy.lproj/.gitkeep delete mode 100644 dist/mac/Resources/id.lproj/.gitkeep delete mode 100644 dist/mac/Resources/is.lproj/.gitkeep delete mode 100644 dist/mac/Resources/it.lproj/.gitkeep delete mode 100644 dist/mac/Resources/ja.lproj/.gitkeep delete mode 100644 dist/mac/Resources/ka.lproj/.gitkeep delete mode 100644 dist/mac/Resources/ko.lproj/.gitkeep delete mode 100644 dist/mac/Resources/lt.lproj/.gitkeep delete mode 100644 dist/mac/Resources/ltg.lproj/.gitkeep delete mode 100644 dist/mac/Resources/lv_LV.lproj/.gitkeep delete mode 100644 dist/mac/Resources/mn_MN.lproj/.gitkeep delete mode 100644 dist/mac/Resources/ms_MY.lproj/.gitkeep delete mode 100644 dist/mac/Resources/nb.lproj/.gitkeep delete mode 100644 dist/mac/Resources/nl.lproj/.gitkeep delete mode 100644 dist/mac/Resources/oc.lproj/.gitkeep delete mode 100644 dist/mac/Resources/pl.lproj/.gitkeep delete mode 100644 dist/mac/Resources/pt_BR.lproj/.gitkeep delete mode 100644 dist/mac/Resources/pt_PT.lproj/.gitkeep delete mode 100644 dist/mac/Resources/ro.lproj/.gitkeep delete mode 100644 dist/mac/Resources/ru.lproj/.gitkeep delete mode 100644 dist/mac/Resources/sk.lproj/.gitkeep delete mode 100644 dist/mac/Resources/sl.lproj/.gitkeep delete mode 100644 dist/mac/Resources/sr.lproj/.gitkeep delete mode 100644 dist/mac/Resources/sv.lproj/.gitkeep delete mode 100644 dist/mac/Resources/th.lproj/.gitkeep delete mode 100644 dist/mac/Resources/tr.lproj/.gitkeep delete mode 100644 dist/mac/Resources/uk.lproj/.gitkeep delete mode 100644 dist/mac/Resources/uz-Latn.lproj/.gitkeep delete mode 100644 dist/mac/Resources/vi.lproj/.gitkeep delete mode 100644 dist/mac/Resources/zh_CN.lproj/.gitkeep delete mode 100644 dist/mac/Resources/zh_HK.lproj/.gitkeep delete mode 100644 dist/mac/Resources/zh_TW.lproj/.gitkeep rename dist/mac/{Resources => }/qBitTorrentDocument.icns (100%) rename dist/mac/{Resources => }/qbittorrent_mac.icns (100%) rename dist/mac/{Resources => }/qt.conf (100%) diff --git a/dist/mac/Resources/ar.lproj/.gitkeep b/dist/mac/Resources/ar.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/az-Latn.lproj/.gitkeep b/dist/mac/Resources/az-Latn.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/be.lproj/.gitkeep b/dist/mac/Resources/be.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/bg.lproj/.gitkeep b/dist/mac/Resources/bg.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/ca.lproj/.gitkeep b/dist/mac/Resources/ca.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/cs.lproj/.gitkeep b/dist/mac/Resources/cs.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/da.lproj/.gitkeep b/dist/mac/Resources/da.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/de.lproj/.gitkeep b/dist/mac/Resources/de.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/el.lproj/.gitkeep b/dist/mac/Resources/el.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/en.lproj/.gitkeep b/dist/mac/Resources/en.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/en_AU.lproj/.gitkeep b/dist/mac/Resources/en_AU.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/en_GB.lproj/.gitkeep b/dist/mac/Resources/en_GB.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/eo.lproj/.gitkeep b/dist/mac/Resources/eo.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/es.lproj/.gitkeep b/dist/mac/Resources/es.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/et.lproj/.gitkeep b/dist/mac/Resources/et.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/eu.lproj/.gitkeep b/dist/mac/Resources/eu.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/fa.lproj/.gitkeep b/dist/mac/Resources/fa.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/fi.lproj/.gitkeep b/dist/mac/Resources/fi.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/fr.lproj/.gitkeep b/dist/mac/Resources/fr.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/gl.lproj/.gitkeep b/dist/mac/Resources/gl.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/he.lproj/.gitkeep b/dist/mac/Resources/he.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/hi_IN.lproj/.gitkeep b/dist/mac/Resources/hi_IN.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/hr.lproj/.gitkeep b/dist/mac/Resources/hr.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/hu.lproj/.gitkeep b/dist/mac/Resources/hu.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/hy.lproj/.gitkeep b/dist/mac/Resources/hy.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/id.lproj/.gitkeep b/dist/mac/Resources/id.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/is.lproj/.gitkeep b/dist/mac/Resources/is.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/it.lproj/.gitkeep b/dist/mac/Resources/it.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/ja.lproj/.gitkeep b/dist/mac/Resources/ja.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/ka.lproj/.gitkeep b/dist/mac/Resources/ka.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/ko.lproj/.gitkeep b/dist/mac/Resources/ko.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/lt.lproj/.gitkeep b/dist/mac/Resources/lt.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/ltg.lproj/.gitkeep b/dist/mac/Resources/ltg.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/lv_LV.lproj/.gitkeep b/dist/mac/Resources/lv_LV.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/mn_MN.lproj/.gitkeep b/dist/mac/Resources/mn_MN.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/ms_MY.lproj/.gitkeep b/dist/mac/Resources/ms_MY.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/nb.lproj/.gitkeep b/dist/mac/Resources/nb.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/nl.lproj/.gitkeep b/dist/mac/Resources/nl.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/oc.lproj/.gitkeep b/dist/mac/Resources/oc.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/pl.lproj/.gitkeep b/dist/mac/Resources/pl.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/pt_BR.lproj/.gitkeep b/dist/mac/Resources/pt_BR.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/pt_PT.lproj/.gitkeep b/dist/mac/Resources/pt_PT.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/ro.lproj/.gitkeep b/dist/mac/Resources/ro.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/ru.lproj/.gitkeep b/dist/mac/Resources/ru.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/sk.lproj/.gitkeep b/dist/mac/Resources/sk.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/sl.lproj/.gitkeep b/dist/mac/Resources/sl.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/sr.lproj/.gitkeep b/dist/mac/Resources/sr.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/sv.lproj/.gitkeep b/dist/mac/Resources/sv.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/th.lproj/.gitkeep b/dist/mac/Resources/th.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/tr.lproj/.gitkeep b/dist/mac/Resources/tr.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/uk.lproj/.gitkeep b/dist/mac/Resources/uk.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/uz-Latn.lproj/.gitkeep b/dist/mac/Resources/uz-Latn.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/vi.lproj/.gitkeep b/dist/mac/Resources/vi.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/zh_CN.lproj/.gitkeep b/dist/mac/Resources/zh_CN.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/zh_HK.lproj/.gitkeep b/dist/mac/Resources/zh_HK.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/zh_TW.lproj/.gitkeep b/dist/mac/Resources/zh_TW.lproj/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/dist/mac/Resources/qBitTorrentDocument.icns b/dist/mac/qBitTorrentDocument.icns similarity index 100% rename from dist/mac/Resources/qBitTorrentDocument.icns rename to dist/mac/qBitTorrentDocument.icns diff --git a/dist/mac/Resources/qbittorrent_mac.icns b/dist/mac/qbittorrent_mac.icns similarity index 100% rename from dist/mac/Resources/qbittorrent_mac.icns rename to dist/mac/qbittorrent_mac.icns diff --git a/dist/mac/Resources/qt.conf b/dist/mac/qt.conf similarity index 100% rename from dist/mac/Resources/qt.conf rename to dist/mac/qt.conf diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 1b4f9ea65..23ef3650c 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -79,6 +79,13 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") include(FindQtTranslations) qbt_get_qt_translations(QT_TRANSLATIONS) set_source_files_properties(${QT_TRANSLATIONS} PROPERTIES MACOSX_PACKAGE_LOCATION translations) + set_source_files_properties( + "${qBittorrent_SOURCE_DIR}/dist/mac/qt.conf" + "${qBittorrent_SOURCE_DIR}/dist/mac/qBitTorrentDocument.icns" + "${qBittorrent_SOURCE_DIR}/dist/mac/qbittorrent_mac.icns" + PROPERTIES + MACOSX_PACKAGE_LOCATION Resources + ) # provide variables for substitution in dist/mac/Info.plist get_target_property(EXECUTABLE_NAME qbt_app OUTPUT_NAME) # This variable name should be changed once qmake is no longer used. Refer to the discussion in PR #14813 @@ -88,13 +95,31 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") MACOSX_BUNDLE_BUNDLE_NAME "qBittorrent" MACOSX_BUNDLE_INFO_PLIST ${qBittorrent_SOURCE_DIR}/dist/mac/Info.plist ) - add_custom_command( - TARGET qbt_app - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_directory - "${qBittorrent_SOURCE_DIR}/dist/mac/Resources" - "$/../Resources" + target_sources(qbt_app PRIVATE + ${QT_TRANSLATIONS} + ${qBittorrent_SOURCE_DIR}/dist/mac/qt.conf + ${qBittorrent_SOURCE_DIR}/dist/mac/qBitTorrentDocument.icns + ${qBittorrent_SOURCE_DIR}/dist/mac/qbittorrent_mac.icns ) + file(GLOB TS_FILES "${qBittorrent_SOURCE_DIR}/src/lang/*.ts") + set(LPROJ_FOLDERS "") + foreach(TS_FILE IN LISTS TS_FILES) + string(FIND "${TS_FILE}" "_" POS) + math(EXPR START "${POS} + 1") + string(SUBSTRING "${TS_FILE}" ${START} -1 LPROJ_FOLDER) + string(REPLACE "ts" "lproj" LPROJ_FOLDER "${LPROJ_FOLDER}") + # @ is not valid as a language code for a lproj folder on MacOS + string(REPLACE "@" "-" LPROJ_FOLDER "${LPROJ_FOLDER}") + list(APPEND LPROJ_FOLDERS "${LPROJ_FOLDER}") + endforeach() + foreach(LPROJ_FOLDER IN LISTS LPROJ_FOLDERS) + add_custom_command( + TARGET qbt_app + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory + "$/../Resources/${LPROJ_FOLDER}" + ) + endforeach() elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") set_target_properties(qbt_app PROPERTIES WIN32_EXECUTABLE ON) if (MINGW) From 045c7bd93a86a5f94958817da480561560c905a9 Mon Sep 17 00:00:00 2001 From: Ryu481 <142620516+Ryu481@users.noreply.github.com> Date: Thu, 3 Jul 2025 12:26:36 +0200 Subject: [PATCH 4/7] autodetect system language on MacOS --- src/app/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 23ef3650c..e9c4afe24 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -107,7 +107,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") string(FIND "${TS_FILE}" "_" POS) math(EXPR START "${POS} + 1") string(SUBSTRING "${TS_FILE}" ${START} -1 LPROJ_FOLDER) - string(REPLACE "ts" "lproj" LPROJ_FOLDER "${LPROJ_FOLDER}") + string(REPLACE ".ts" ".lproj" LPROJ_FOLDER "${LPROJ_FOLDER}") # @ is not valid as a language code for a lproj folder on MacOS string(REPLACE "@" "-" LPROJ_FOLDER "${LPROJ_FOLDER}") list(APPEND LPROJ_FOLDERS "${LPROJ_FOLDER}") From b6b745f8faa7839aeb4c640530690479a1034ad4 Mon Sep 17 00:00:00 2001 From: Ryu481 <142620516+Ryu481@users.noreply.github.com> Date: Thu, 3 Jul 2025 20:16:49 +0200 Subject: [PATCH 5/7] autodetect system language on MacOS --- src/app/CMakeLists.txt | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index e9c4afe24..2088f9056 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -32,6 +32,26 @@ endif() # ----------------------------------------------------------------------------- add_executable(qbt_app) +# Generate lproj folders for the translations +set(LPROJ_FOLDERS "") +foreach(TS_FILE IN LISTS QBT_TS_FILES) + string(FIND "${TS_FILE}" "_" POS) + math(EXPR START "${POS} + 1") + string(SUBSTRING "${TS_FILE}" ${START} -1 LPROJ_FOLDER) + string(REPLACE ".ts" ".lproj" LPROJ_FOLDER "${LPROJ_FOLDER}") + # @ is not valid as a language code for a lproj folder on MacOS + string(REPLACE "@" "-" LPROJ_FOLDER "${LPROJ_FOLDER}") + list(APPEND LPROJ_FOLDERS "${LPROJ_FOLDER}") +endforeach() +foreach(LPROJ_FOLDER IN LISTS LPROJ_FOLDERS) + add_custom_command( + TARGET qbt_app + POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory + "$/../Resources/${LPROJ_FOLDER}" + ) +endforeach() + target_sources(qbt_app PRIVATE # headers application.h @@ -101,25 +121,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") ${qBittorrent_SOURCE_DIR}/dist/mac/qBitTorrentDocument.icns ${qBittorrent_SOURCE_DIR}/dist/mac/qbittorrent_mac.icns ) - file(GLOB TS_FILES "${qBittorrent_SOURCE_DIR}/src/lang/*.ts") - set(LPROJ_FOLDERS "") - foreach(TS_FILE IN LISTS TS_FILES) - string(FIND "${TS_FILE}" "_" POS) - math(EXPR START "${POS} + 1") - string(SUBSTRING "${TS_FILE}" ${START} -1 LPROJ_FOLDER) - string(REPLACE ".ts" ".lproj" LPROJ_FOLDER "${LPROJ_FOLDER}") - # @ is not valid as a language code for a lproj folder on MacOS - string(REPLACE "@" "-" LPROJ_FOLDER "${LPROJ_FOLDER}") - list(APPEND LPROJ_FOLDERS "${LPROJ_FOLDER}") - endforeach() - foreach(LPROJ_FOLDER IN LISTS LPROJ_FOLDERS) - add_custom_command( - TARGET qbt_app - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E make_directory - "$/../Resources/${LPROJ_FOLDER}" - ) - endforeach() elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") set_target_properties(qbt_app PROPERTIES WIN32_EXECUTABLE ON) if (MINGW) From 31a9f91961ea0389ae08daabb8b309e551cffb64 Mon Sep 17 00:00:00 2001 From: Ryu481 <142620516+Ryu481@users.noreply.github.com> Date: Thu, 3 Jul 2025 20:42:45 +0200 Subject: [PATCH 6/7] autodetect system language on MacOS --- src/app/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 2088f9056..183d93105 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -33,7 +33,6 @@ endif() add_executable(qbt_app) # Generate lproj folders for the translations -set(LPROJ_FOLDERS "") foreach(TS_FILE IN LISTS QBT_TS_FILES) string(FIND "${TS_FILE}" "_" POS) math(EXPR START "${POS} + 1") @@ -41,9 +40,6 @@ foreach(TS_FILE IN LISTS QBT_TS_FILES) string(REPLACE ".ts" ".lproj" LPROJ_FOLDER "${LPROJ_FOLDER}") # @ is not valid as a language code for a lproj folder on MacOS string(REPLACE "@" "-" LPROJ_FOLDER "${LPROJ_FOLDER}") - list(APPEND LPROJ_FOLDERS "${LPROJ_FOLDER}") -endforeach() -foreach(LPROJ_FOLDER IN LISTS LPROJ_FOLDERS) add_custom_command( TARGET qbt_app POST_BUILD From 2da87deead70d3b0a9d5d06d3a6eb7ec70b7cf13 Mon Sep 17 00:00:00 2001 From: Ryu481 <142620516+Ryu481@users.noreply.github.com> Date: Fri, 4 Jul 2025 13:39:42 +0200 Subject: [PATCH 7/7] autodetect system language on MacOS --- src/app/CMakeLists.txt | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 183d93105..84bf70a63 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -32,22 +32,6 @@ endif() # ----------------------------------------------------------------------------- add_executable(qbt_app) -# Generate lproj folders for the translations -foreach(TS_FILE IN LISTS QBT_TS_FILES) - string(FIND "${TS_FILE}" "_" POS) - math(EXPR START "${POS} + 1") - string(SUBSTRING "${TS_FILE}" ${START} -1 LPROJ_FOLDER) - string(REPLACE ".ts" ".lproj" LPROJ_FOLDER "${LPROJ_FOLDER}") - # @ is not valid as a language code for a lproj folder on MacOS - string(REPLACE "@" "-" LPROJ_FOLDER "${LPROJ_FOLDER}") - add_custom_command( - TARGET qbt_app - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E make_directory - "$/../Resources/${LPROJ_FOLDER}" - ) -endforeach() - target_sources(qbt_app PRIVATE # headers application.h @@ -102,6 +86,19 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) + # Generate lproj folders for the translations + foreach(TS_FILE IN LISTS QBT_TS_FILES) + string(FIND "${TS_FILE}" "_" POS) + math(EXPR START "${POS} + 1") + string(SUBSTRING "${TS_FILE}" ${START} -1 LPROJ_FOLDER) + string(REPLACE ".ts" ".lproj" LPROJ_FOLDER "${LPROJ_FOLDER}") + # @ is not valid as a language code for a lproj folder on MacOS + string(REPLACE "@" "-" LPROJ_FOLDER "${LPROJ_FOLDER}") + add_custom_command( TARGET qbt_app POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory + "$/../Resources/${LPROJ_FOLDER}" + ) + endforeach() # provide variables for substitution in dist/mac/Info.plist get_target_property(EXECUTABLE_NAME qbt_app OUTPUT_NAME) # This variable name should be changed once qmake is no longer used. Refer to the discussion in PR #14813