Skip to content

Commit

Permalink
Merge branch 'staged' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Oct 12, 2024
2 parents 4499276 + 9010262 commit 66ec040
Show file tree
Hide file tree
Showing 157 changed files with 5,022 additions and 2,744 deletions.
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Checks: >
-modernize-deprecated-headers,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
-readability-braces-around-statements,
-readability-function-cognitive-complexity,
-readability-identifier-length,
-readability-magic-numbers,
Expand Down
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ b5349478cfb0dc2dd0de8c8e8aeebdd24cf7ac6b
# replace QVector & QPair
3273f39dd73f4dba07fa95be2be74061f2690b2c
44853544f850e1de90b341780168c04d089c37a1

# mass apply clang-tidy's readability-braces-around-statements
a11c9e3aeca4329e1982d8fe26bacbb21ab50ddf
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ include(FeatureSummary)
project(goldendict-ng
VERSION 24.11.0
LANGUAGES CXX C)

if (APPLE)
enable_language(OBJCXX)
set(CMAKE_OBJCXX_STANDARD 17)
endif ()

set(CMAKE_C_STANDARD 17)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(GOLDENDICT "goldendict") # binary/executable name
if (USE_ALTERNATIVE_NAME )
Expand All @@ -58,8 +67,6 @@ if (APPLE)
set(GOLDENDICT "GoldenDict-ng")
endif()

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

#### Qt

Expand Down
5 changes: 3 additions & 2 deletions cmake/Deps_Unix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ if (APPLE)

# libzim depends on ICU, but the ICU from homebrew is "key-only", we need to manually prioritize it
# See `brew info icu4c` if this no longer works
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/icu4c/lib/pkgconfig")
# Note: Remove icu4c@75 if it fails again
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/icu4c@75/lib/pkgconfig:/opt/homebrew/opt/icu4c@75/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/icu4c/lib/pkgconfig")
endif ()

target_include_directories(${GOLDENDICT} PRIVATE
Expand Down Expand Up @@ -99,4 +100,4 @@ endif ()
if (USE_SYSTEM_TOML)
find_package(tomlplusplus)
target_link_libraries(${GOLDENDICT} PRIVATE tomlplusplus::tomlplusplus)
endif ()
endif ()
199 changes: 175 additions & 24 deletions icons/add-anki-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,6 @@ Apache License Version 2.0
1downarrow.svg
system-search.svg
Modified from https://github.com/google/material-design-icons

add-anki-icon.svg MIT license
https://www.svgrepo.com/svg/435992/add-card
12 changes: 6 additions & 6 deletions locale/ar_SA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3051,17 +3051,17 @@ the application.</source>
<translation>الخط الأحادي الفضاء</translation>
</message>
<message>
<source>&amp;Scan Popup</source>
<source>&amp;Popup</source>
<translation>منبثقة الا&amp;ستكشاف</translation>
</message>
<message>
<source>Chooses whether the scan popup mode is on by default or not. If checked,
the program would always start with the scan popup active.</source>
<source>Chooses whether the popup mode is on by default or not. If checked,
the program would always start with the popup active.</source>
<translation>يحدّد إن كان وضع منبثقة الاستكشاف ممكّن افتراضيًّا أو لا. إن عُلِّم،
سيبدأ البرنامج دائمًا ومنبثقة الاستكشاف نشطة.</translation>
</message>
<message>
<source>Start with scan popup turned on</source>
<source>Start with popup turned on</source>
<translation>ابدأ و منبثقة الاستكشاف تعمل</translation>
</message>
<message>
Expand Down Expand Up @@ -3179,7 +3179,7 @@ in the pressed state when the word selection changes.</source>
<translation>انطق تلقائيًّا الكلمات في النافذة الرئيسية</translation>
</message>
<message>
<source>Auto-pronounce words in scan popup</source>
<source>Auto-pronounce words in popup</source>
<translation>انطق تلقائيًّا الكلمات في منبثقة الاستكشاف</translation>
</message>
<message>
Expand Down Expand Up @@ -3708,7 +3708,7 @@ from Stardict, Babylon and GLS dictionaries</source>
<translation>فرض ترجمة الكلمة في النافذة الرئيسية</translation>
</message>
<message>
<source>Toggle scan popup.</source>
<source>Toggle popup.</source>
<translation>قم بتبديل قائمة الفحص المنبثقة.</translation>
</message>
<message>
Expand Down
12 changes: 6 additions & 6 deletions locale/ay_BO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3136,19 +3136,19 @@ Aka jakhu mayjacham jach&apos;a menus jithiqañataki.</translation>
<translation>Monoespacio ukax Fuente ukawa</translation>
</message>
<message>
<source>&amp;Scan Popup</source>
<source>&amp;Popup</source>
<translation>&amp;Uñstir wintanampi ullaña</translation>
</message>
<message>
<source>Chooses whether the scan popup mode is on by default or not. If checked,
the program would always start with the scan popup active.</source>
<source>Chooses whether the popup mode is on by default or not. If checked,
the program would always start with the popup active.</source>
<translation>Habilitar escaneo en una ventana emergente cuando inicia.

Jisa uskum thaqhañataki jan walikitaki janiwa.
Akasti marcado, thaqhawi ist&apos;araskaniwa.</translation>
</message>
<message>
<source>Start with scan popup turned on</source>
<source>Start with popup turned on</source>
<translation>Mä uñstiri wintananxa escaneo uk naktayaña, qalltkis ukja</translation>
</message>
<message>
Expand Down Expand Up @@ -3274,7 +3274,7 @@ Uñstir wintana uñachañatakixa salta ukan mä klik luram. </translation>
<translation>Nayrir wintanan justupak arunak arst&apos;awi</translation>
</message>
<message>
<source>Auto-pronounce words in scan popup</source>
<source>Auto-pronounce words in popup</source>
<translation>Uñstiri wintanan justupak arunak arst&apos;awi</translation>
</message>
<message>
Expand Down Expand Up @@ -3833,7 +3833,7 @@ Activar esta opción para realizar búsquedas adicionales con listas de sinónim
<translation>Jaqukipaña aru jach’a ventanana ch’amañchaña</translation>
</message>
<message>
<source>Toggle scan popup.</source>
<source>Toggle popup.</source>
<translation>Toggle escaneo ukax mä popup uñt’ayatawa.</translation>
</message>
<message>
Expand Down
12 changes: 6 additions & 6 deletions locale/be_BY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3045,17 +3045,17 @@ the application.</source>
<translation>Монашырынны шрыфт</translation>
</message>
<message>
<source>&amp;Scan Popup</source>
<source>&amp;Popup</source>
<translation>&amp;Апрацоўванне ў выплыўных вокнах</translation>
</message>
<message>
<source>Chooses whether the scan popup mode is on by default or not. If checked,
the program would always start with the scan popup active.</source>
<source>Chooses whether the popup mode is on by default or not. If checked,
the program would always start with the popup active.</source>
<translation>Вызначае, ці будзе прадвызначана ўключаная функцыя апрацоўвання ў выплыўных вокнах. Калі адзначана,
праграма заўсёды будзе запускацца з актываванай функцыяй.</translation>
</message>
<message>
<source>Start with scan popup turned on</source>
<source>Start with popup turned on</source>
<translation>Запускаць з уключанай функцыяй апрацоўвання ў выплыўных вокнах</translation>
</message>
<message>
Expand Down Expand Up @@ -3172,7 +3172,7 @@ in the pressed state when the word selection changes.</source>
<translation>Аўтаматычна вымаўляць словы ў галоўным акне</translation>
</message>
<message>
<source>Auto-pronounce words in scan popup</source>
<source>Auto-pronounce words in popup</source>
<translation>Аўтаматычна вымаўляць словы ў выплыўных вокнах</translation>
</message>
<message>
Expand Down Expand Up @@ -3698,7 +3698,7 @@ from Stardict, Babylon and GLS dictionaries</source>
<translation>Прымусова перакласці слова ў галоўным акне</translation>
</message>
<message>
<source>Toggle scan popup.</source>
<source>Toggle popup.</source>
<translation>Уключыць або адключыць апрацоўванне ў выплыўных вокнах.</translation>
</message>
<message>
Expand Down
12 changes: 6 additions & 6 deletions locale/bg_BG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3053,17 +3053,17 @@ the application.</source>
<translation>Монопространствен шрифт</translation>
</message>
<message>
<source>&amp;Scan Popup</source>
<source>&amp;Popup</source>
<translation>&amp;Изскачащ прозорец</translation>
</message>
<message>
<source>Chooses whether the scan popup mode is on by default or not. If checked,
the program would always start with the scan popup active.</source>
<source>Chooses whether the popup mode is on by default or not. If checked,
the program would always start with the popup active.</source>
<translation>Избран ли е, Изкачащ прозорец по подразб. или не. Ако е проверено,
програмата винаги ще стартира с активен Изкачащ прозорец.</translation>
</message>
<message>
<source>Start with scan popup turned on</source>
<source>Start with popup turned on</source>
<translation>Пускане с включен изскачащ прозорец</translation>
</message>
<message>
Expand Down Expand Up @@ -3181,7 +3181,7 @@ in the pressed state when the word selection changes.</source>
<translation>Автоматично произнасяне на думите в главния прозорец</translation>
</message>
<message>
<source>Auto-pronounce words in scan popup</source>
<source>Auto-pronounce words in popup</source>
<translation>Автоматично произнасяне на думите в изскачащия прозорец</translation>
</message>
<message>
Expand Down Expand Up @@ -3710,7 +3710,7 @@ from Stardict, Babylon and GLS dictionaries</source>
<translation>Принудете думата да бъде преведена в главния прозорец</translation>
</message>
<message>
<source>Toggle scan popup.</source>
<source>Toggle popup.</source>
<translation>Превключване на изскачащия прозорец за сканиране.</translation>
</message>
<message>
Expand Down
12 changes: 6 additions & 6 deletions locale/crowdin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3037,16 +3037,16 @@ the application.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Scan Popup</source>
<source>&amp;Popup</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Chooses whether the scan popup mode is on by default or not. If checked,
the program would always start with the scan popup active.</source>
<source>Chooses whether the popup mode is on by default or not. If checked,
the program would always start with the popup active.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Start with scan popup turned on</source>
<source>Start with popup turned on</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down Expand Up @@ -3163,7 +3163,7 @@ in the pressed state when the word selection changes.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Auto-pronounce words in scan popup</source>
<source>Auto-pronounce words in popup</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down Expand Up @@ -3680,7 +3680,7 @@ from Stardict, Babylon and GLS dictionaries</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Toggle scan popup.</source>
<source>Toggle popup.</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down
12 changes: 6 additions & 6 deletions locale/cs_CZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3051,17 +3051,17 @@ ukončení aplikace.</translation>
<translation>Jednoprostorové písmo</translation>
</message>
<message>
<source>&amp;Scan Popup</source>
<source>&amp;Popup</source>
<translation>Vy&amp;skakovací okno</translation>
</message>
<message>
<source>Chooses whether the scan popup mode is on by default or not. If checked,
the program would always start with the scan popup active.</source>
<source>Chooses whether the popup mode is on by default or not. If checked,
the program would always start with the popup active.</source>
<translation>Určuje, zda je vyskakovací okno automaticky povoleno nebo zakázáno. Pokud
zaškrtnuto, program bude automaticky startovat s aktivovaným vyskakovacím oknem.</translation>
</message>
<message>
<source>Start with scan popup turned on</source>
<source>Start with popup turned on</source>
<translation>Spouštět s povoleným vyskakovacím oknem</translation>
</message>
<message>
Expand Down Expand Up @@ -3179,7 +3179,7 @@ zvolené klávesy stisknuty při změně výběru.</translation>
<translation>Automaticky vyslovovat slova v hlavním okně</translation>
</message>
<message>
<source>Auto-pronounce words in scan popup</source>
<source>Auto-pronounce words in popup</source>
<translation>Automaticky vyslovovat slova ve vyskakovacím okně</translation>
</message>
<message>
Expand Down Expand Up @@ -3708,7 +3708,7 @@ ze Stardict, Babylon a GLS slovníků</translation>
<translation>Vynutit překlad slova v hlavním okně</translation>
</message>
<message>
<source>Toggle scan popup.</source>
<source>Toggle popup.</source>
<translation>Přepnout vyskakovací okno.</translation>
</message>
<message>
Expand Down
20 changes: 10 additions & 10 deletions locale/de_CH.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3045,18 +3045,18 @@ the application.</source>
<translation>Monospace-Schriftart</translation>
</message>
<message>
<source>&amp;Scan Popup</source>
<source>&amp;Popup</source>
<translation>Popup &amp;scannen</translation>
</message>
<message>
<source>Chooses whether the scan popup mode is on by default or not. If checked,
the program would always start with the scan popup active.</source>
<translation>Gibt an, ob der Scan Popup Modus standardmässig aktiviert ist oder nicht.
<source>Chooses whether the popup mode is on by default or not. If checked,
the program would always start with the popup active.</source>
<translation>Gibt an, ob der Popup Modus standardmässig aktiviert ist oder nicht.
Falls aktiviert, wird das Programm immer mit aktiviertem Modus gestartet.</translation>
</message>
<message>
<source>Start with scan popup turned on</source>
<translation>Mit aktiviertem Scan Popup starten</translation>
<source>Start with popup turned on</source>
<translation>Mit aktiviertem Popup starten</translation>
</message>
<message>
<source>Send translated word to main window instead of to show it in popup window</source>
Expand All @@ -3081,7 +3081,7 @@ Falls aktiviert, wird das Programm immer mit aktiviertem Modus gestartet.</trans
<message>
<source>With this enabled, the popup would only show up if all chosen keys are
in the pressed state when the word selection changes.</source>
<translation>Fallt aktiviert, wird das Scan Popup bei Änderung der Wortauswahl nur angezeigt, wenn alle ausgewählten Tasten gedrückt sind.</translation>
<translation>Fallt aktiviert, wird das Popup bei Änderung der Wortauswahl nur angezeigt, wenn alle ausgewählten Tasten gedrückt sind.</translation>
</message>
<message>
<source>Only tack selection when all selected keys are kept pressed:</source>
Expand Down Expand Up @@ -3172,8 +3172,8 @@ in the pressed state when the word selection changes.</source>
<translation>Wörter im Hauptfenster automatisch aussprechen</translation>
</message>
<message>
<source>Auto-pronounce words in scan popup</source>
<translation>Wörter im Scan Popup automatisch aussprechen</translation>
<source>Auto-pronounce words in popup</source>
<translation>Wörter im Popup automatisch aussprechen</translation>
</message>
<message>
<source>Playback</source>
Expand Down Expand Up @@ -3697,7 +3697,7 @@ Stardict, Babylon und GLS Wörterbüchern wünschen.</translation>
<translation>Erzwinge das Wort im Hauptfenster zu übersetzen</translation>
</message>
<message>
<source>Toggle scan popup.</source>
<source>Toggle popup.</source>
<translation>Wechsle ScanPopUp.</translation>
</message>
<message>
Expand Down
Loading

0 comments on commit 66ec040

Please sign in to comment.