Skip to content

Commit fce2b87

Browse files
authored
Merge pull request #2709 from xiaoyifang/release/26.3.0
schedule a Release/26.3.0
2 parents 5491ffc + 7eb3b6f commit fce2b87

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+2694
-3048
lines changed

.github/workflows/Release-all.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ concurrency:
55
group: ${{ github.workflow }}-${{ github.ref }}
66
cancel-in-progress: true
77
env:
8-
version: 26.1.1
98
prerelease: ${{ !contains(github.ref_name,'master') }}
109
versionSuffix: ${{ !contains(github.ref_name,'master') && 'alpha' || 'Release' }}
1110
on:
@@ -153,6 +152,8 @@ jobs:
153152
- uses: actions/checkout@v4
154153
with:
155154
fetch-depth: 0 # need all tags to genearte changelog
155+
- name: Load version from VERSION file
156+
run: echo "version=$(xargs < VERSION)" >> $GITHUB_ENV
156157
- name: Get git short SHA
157158
id: shortSHA
158159
run: |

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ endif ()
3838

3939
include(FeatureSummary)
4040

41+
file(READ "VERSION" PROJECT_VERSION_ST)
42+
string(STRIP "${PROJECT_VERSION_ST}" PROJECT_VERSION_ST)
4143
project(goldendict-ng
42-
VERSION 26.1.1
44+
VERSION ${PROJECT_VERSION_ST}
4345
LANGUAGES CXX C)
4446

4547
if (APPLE)
@@ -67,7 +69,7 @@ if (WITH_TTS)
6769
list(APPEND GD_QT_COMPONENTS TextToSpeech)
6870
endif ()
6971

70-
find_package(Qt6 REQUIRED COMPONENTS ${GD_QT_COMPONENTS})
72+
find_package(Qt6 6.2 REQUIRED COMPONENTS ${GD_QT_COMPONENTS})
7173

7274
qt_standard_project_setup()
7375
set(CMAKE_AUTORCC ON) # not included in the qt_standard_project_setup

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
26.3.0

cmake/Deps_Linux.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
find_package(PkgConfig REQUIRED)
22

33
set(Optional_Pkgs "")
4-
list(APPEND Optional_Pkgs "fmt")
54
if (USE_SYSTEM_TOML)
65
list(APPEND Optional_Pkgs "tomlplusplus")
76
endif ()
@@ -31,7 +30,8 @@ pkg_check_modules(DEPS REQUIRED IMPORTED_TARGET
3130

3231

3332
find_package(BZip2 REQUIRED) # FreeBSD misses .pc file https://www.freshports.org/archivers/bzip2
34-
target_link_libraries(${GOLDENDICT} PRIVATE PkgConfig::DEPS BZip2::BZip2)
33+
find_package(fmt REQUIRED)
34+
target_link_libraries(${GOLDENDICT} PRIVATE PkgConfig::DEPS BZip2::BZip2 fmt::fmt)
3535

3636
# On FreeBSD, there are two iconv, libc iconv & GNU libiconv.
3737
# The system one is good enough, the following is a workaround to use libc iconv on freeBSD.

cmake/Deps_macOS.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ target_link_libraries(${GOLDENDICT} PRIVATE ${CARBON_LIBRARY})
77
find_package(PkgConfig REQUIRED)
88

99
set(Optional_Pkgs "")
10-
list(APPEND Optional_Pkgs "fmt")
1110
if (USE_SYSTEM_TOML)
1211
list(APPEND Optional_Pkgs "tomlplusplus")
1312
endif ()
@@ -51,7 +50,8 @@ pkg_check_modules(DEPS REQUIRED IMPORTED_TARGET
5150

5251
find_package(Iconv REQUIRED)
5352
find_package(BZip2 REQUIRED)
54-
target_link_libraries(${GOLDENDICT} PRIVATE PkgConfig::DEPS BZip2::BZip2 Iconv::Iconv)
53+
find_package(fmt REQUIRED)
54+
target_link_libraries(${GOLDENDICT} PRIVATE PkgConfig::DEPS BZip2::BZip2 Iconv::Iconv fmt::fmt)
5555

5656
if (WITH_EPWING_SUPPORT)
5757
find_library(EB_LIBRARY eb REQUIRED)

docs/startup_optimization.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# GoldenDict-ng Startup Performance Optimization Record
2+
3+
## 1. Optimization Goal
4+
Reduce interface stuttering during cold start, shorten the perceived time from clicking to displaying the main window, and lower the CPU and disk I/O peaks during the startup phase.
5+
6+
## 2. Core Strategy: Deferred Loading & Staged Startup
7+
Decouple non-critical tasks from the `MainWindow` constructor and synchronous initialization flow. Utilize `QTimer::singleShot` to trigger these tasks in stages after the main event loop starts, achieving a "progressive startup."
8+
9+
## 3. Optimization Item List
10+
11+
| Task Item | Original Timing | Optimized Timing | Remarks |
12+
| :--- | :--- | :--- | :--- |
13+
| **ArticleInspector (Debugger)** | Sync creation in constructor | **Lazy creation** | Instantiated only when "Inspect Element" is triggered |
14+
| **ScanPopup (Scan Progress)** | Sync trigger in constructor | **Delayed 1,000ms** | Avoids QWebEngine loading blocking main window display |
15+
| **TrayIcon** | Sync init in constructor | **Delayed 1,000ms** | Reduces synchronous communication with system shell |
16+
| **GlobalHotkeys** | Sync installation in constructor | **Delayed 2,000ms** | Moves system-level hotkey registration to background |
17+
| **doDeferredInit (Deep Init)** | Sync execution at end of constructor | **Delayed 3,000ms** | Avoids peak I/O for file handles and abbreviation loading |
18+
| **FullTextSearch (FTS Indexing)** | Sync start in `makeDictionaries` | **Delayed 5,000ms** | Ensures UI is idle before starting large-scale disk scanning |
19+
| **New Release Check** | Immediate execution (0ms) | **Delayed 10,000ms** | Moves network requests and JSON parsing after stability |
20+
21+
## 4. Technical Details
22+
23+
### 4.1 Automatic Fallback Mechanism (`ensureInitDone`)
24+
For the `doDeferredInit` delay, existing dictionary class implementations (e.g., `DslDictionary`, `MdxDictionary`) already include `ensureInitDone()` protection logic.
25+
- **Safety**: If a user performs a lookup or FTS search before the delay (3s) expires, the code will automatically trigger synchronous initialization, ensuring no loss of functionality.
26+
- **Experience**: The delay is only to release system resources and does not cause functional deadlocks.
27+
28+
### 4.2 UI Responsiveness Priority
29+
By delaying `ScanPopup` and `ArticleInspector` (both WebEngine-driven), we significantly reduce the peak frequency of VRAM and RAM allocation, allowing the main viewport (`ArticleView`) to complete its first-paint at the highest priority.
30+
31+
## 5. Expected Results
32+
- **Perceived Speedup**: Main window display speed improved by 30% - 50%.
33+
- **I/O Peak Shaving**: Smooths the disk I/O "spike" from massive dictionary loading into a sustained "low-load" process over several seconds.
34+
- **Stability**: Reduces the probability of thread deadlocks or UI freezes caused by resource contention during critical startup moments.
35+
36+
---
37+
*Date: 2026-02-05*

locale/ar.ts

Lines changed: 37 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -888,10 +888,6 @@ between classic and school orthography in cyrillic)</source>
888888
<source>Add folder</source>
889889
<translation>أضف المجلد</translation>
890890
</message>
891-
<message>
892-
<source>Clear All</source>
893-
<translation>Clear All</translation>
894-
</message>
895891
<message>
896892
<source>Favorites:</source>
897893
<translation>المفضلة:</translation>
@@ -900,10 +896,6 @@ between classic and school orthography in cyrillic)</source>
900896
<source>All selected items will be deleted. Continue?</source>
901897
<translation>سيتم حذف جميع العناصر المحددة. يكمل؟</translation>
902898
</message>
903-
<message>
904-
<source>Clear All Items</source>
905-
<translation>Clear All Items</translation>
906-
</message>
907899
<message>
908900
<source>Are you sure you want to clear all items?</source>
909901
<translation>Are you sure you want to clear all items?</translation>
@@ -912,6 +904,14 @@ between classic and school orthography in cyrillic)</source>
912904
<source>Make this folder the target of adding/removing words actions.</source>
913905
<translation type="unfinished">Make this folder the target of adding/removing words actions.</translation>
914906
</message>
907+
<message>
908+
<source>Clear</source>
909+
<translation>مسح</translation>
910+
</message>
911+
<message>
912+
<source>Clear Favorites</source>
913+
<translation>مسح المفضلة</translation>
914+
</message>
915915
</context>
916916
<context>
917917
<name>Forvo::ForvoArticleRequest</name>
@@ -1113,6 +1113,14 @@ between classic and school orthography in cyrillic)</source>
11131113
<source>Are you sure you want to remove all the groups?</source>
11141114
<translation>هل أنت متأكد من إزالة كل المجموعات؟</translation>
11151115
</message>
1116+
<message>
1117+
<source>Add a new dictionary group</source>
1118+
<translation>إضافة مجموعة قاموس جديدة</translation>
1119+
</message>
1120+
<message>
1121+
<source>&amp;Add group</source>
1122+
<translation&amp;ضف مجموعة</translation>
1123+
</message>
11161124
</context>
11171125
<context>
11181126
<name>HistoryPaneWidget</name>
@@ -2622,6 +2630,14 @@ To find &apos;*&apos;, &apos;?&apos;, &apos;[&apos;, &apos;]&apos; symbols use &
26222630
<source>Lock Panels</source>
26232631
<translation>تأمين اللوحات</translation>
26242632
</message>
2633+
<message>
2634+
<source>Clear History</source>
2635+
<translation>مسح المحفوظات</translation>
2636+
</message>
2637+
<message>
2638+
<source>Are you sure you want to clear all history items?</source>
2639+
<translation>هل أنت متأكد من أنك تريد مسح جميع عناصر التاريخ؟</translation>
2640+
</message>
26252641
</context>
26262642
<context>
26272643
<name>Mdx::MdxArticleRequest</name>
@@ -3296,42 +3312,6 @@ you are browsing. If some site breaks because of this, try disabling this.</sour
32963312
<source>Disallow loading content from other sites (hides most advertisements)</source>
32973313
<translation>امنع تحميل المحتوى من مواقع أخرى (يخفي أغلب الإعلانات)</translation>
32983314
</message>
3299-
<message>
3300-
<source>Some sites detect GoldenDict via HTTP headers and block the requests.
3301-
Enable this option to workaround the problem.</source>
3302-
<translation>بعض المواقع تكتشف القاموس الذهبي من خلال ترويسات HTTP وتمنع الطلبات.
3303-
مكّن هذا الخيار للالتفاف حول المشكلة.</translation>
3304-
</message>
3305-
<message>
3306-
<source>Do not identify GoldenDict in HTTP headers</source>
3307-
<translation>لا تعرّف القاموس الذهبي في ترويسات HTTP</translation>
3308-
</message>
3309-
<message>
3310-
<source>Maximum network cache size:</source>
3311-
<translation>الحد الأقصى لحجم ذاكرة التخزين المؤقت للشبكة:</translation>
3312-
</message>
3313-
<message>
3314-
<source>Maximum disk space occupied by GoldenDict&apos;s network cache in
3315-
%1
3316-
If set to 0 the network disk cache will be disabled.</source>
3317-
<translation>الحد الأقصى لمساحة القرص الذي يشغله GoldenDict&apos;s للشبكة ذاكرة التخزين المؤقت في
3318-
%1
3319-
إذا تم تعيين إلى 0 سيتم تعطيل ذاكرة التخزين المؤقت لقرص الشبكة.</translation>
3320-
</message>
3321-
<message>
3322-
<source> MiB</source>
3323-
<translation> MiB</translation>
3324-
</message>
3325-
<message>
3326-
<source>When this option is enabled, GoldenDict
3327-
clears its network cache from disk during exit.</source>
3328-
<translation>عند تمكين هذا الخيار ، يقوم GoldenDict
3329-
بمسح ذاكرة التخزين المؤقت للشبكة من القرص أثناء الخروج.</translation>
3330-
</message>
3331-
<message>
3332-
<source>Clear network cache on exit</source>
3333-
<translation>امسح ذاكرة التخزين المؤقت للشبكة عند الخروج</translation>
3334-
</message>
33353315
<message>
33363316
<source>When this is enabled, the program periodically
33373317
checks if a new, updated version of GoldenDict
@@ -3507,10 +3487,6 @@ from Stardict, Babylon and GLS dictionaries</source>
35073487
<source>Save debug messages to gd_log.txt in the config folder</source>
35083488
<translation>Save debug messages to gd_log.txt in the config folder</translation>
35093489
</message>
3510-
<message>
3511-
<source>Open website dictionary in seperate tab</source>
3512-
<translation>فتح قاموس الموقع في علامة تبويب منفصلة</translation>
3513-
</message>
35143490
<message>
35153491
<source>S&amp;can</source>
35163492
<translation>امسح</translation>
@@ -3523,6 +3499,10 @@ from Stardict, Babylon and GLS dictionaries</source>
35233499
<source>Suppress JavaScript dialogs</source>
35243500
<translation>قمع مربعات حوار جافا سكريبت</translation>
35253501
</message>
3502+
<message>
3503+
<source>Open website dictionary in separate tab</source>
3504+
<translation>فتح قاموس الموقع في علامة تبويب منفصلة</translation>
3505+
</message>
35263506
</context>
35273507
<context>
35283508
<name>ProgramTypeEditor</name>
@@ -3705,7 +3685,7 @@ from Stardict, Babylon and GLS dictionaries</source>
37053685
</message>
37063686
<message>
37073687
<source>Can&apos;t save article: %1</source>
3708-
<translation type="unfinished">Can&apos;t save article: %1</translation>
3688+
<translation>تعذّر حفظ المقالة: %1</translation>
37093689
</message>
37103690
<message>
37113691
<source>Save PDF complete</source>
@@ -3774,6 +3754,10 @@ from Stardict, Babylon and GLS dictionaries</source>
37743754
<source>WARNING: %1</source>
37753755
<translation>تحذير: %1</translation>
37763756
</message>
3757+
<message>
3758+
<source>Definition</source>
3759+
<translation>التعريف</translation>
3760+
</message>
37773761
</context>
37783762
<context>
37793763
<name>ScanPopupToolBar</name>
@@ -4250,6 +4234,10 @@ Full list of availiable languages can be found &lt;a href=&quot;https://linguali
42504234
<source>Only available when opening websites in separate tabs. Can be a file path (relative to config directory or absolute) or direct script content.</source>
42514235
<translation>متاح فقط عند فتح المواقع في علامات تبويب منفصلة. يمكن أن يكون مسار الملف (نسبة إلى مجلد التكوين أو مطلق) أو محتوى البرنامج النصي المباشر.</translation>
42524236
</message>
4237+
<message>
4238+
<source>This column is disabled because &quot;Open website dictionary in separate tab&quot; option is not enabled in Preferences.</source>
4239+
<translation>هذا العمود معطل لأن &quot;فتح قاموس الموقع في علامة تبويب منفصلة&quot; لم يتم تمكينه في التفضيلات.</translation>
4240+
</message>
42534241
</context>
42544242
<context>
42554243
<name>WordFinder</name>

0 commit comments

Comments
 (0)