Skip to content

Commit ab59097

Browse files
committed
feat(ui/ci): add unofficial languages masking, OS lang detection, and optimize CI with uv
- Support Italian, Vietnamese, and Norwegian target languages with a UI warning and a masking language selector dropdown - Implement automatic OS language detection on startup - Fix JobConfig keyword argument mismatch in review retranslation - Reformat all UI locales to avoid spacing/line-wrapping issues - Integrate uv (setup-uv@v5) in build/release workflows and upgrade actions versions (checkout@v6, download-artifact@v8, upload-artifact@v7) - Add uv auto-detection with fallback in build.py for local dependencies setup
1 parent 35886a2 commit ab59097

27 files changed

Lines changed: 2638 additions & 1765 deletions

.github/workflows/build.yml

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
steps:
4343
- name: Checkout
44-
uses: actions/checkout@v4
44+
uses: actions/checkout@v6
4545
with:
4646
fetch-depth: 0
4747

@@ -50,13 +50,10 @@ jobs:
5050
with:
5151
python-version: ${{ matrix.python-version }}
5252

53-
- name: Cache pip
54-
uses: actions/cache@v4
53+
- name: Set up uv
54+
uses: astral-sh/setup-uv@v5
5555
with:
56-
path: ~/.cache/pip
57-
key: ${{ runner.os }}-${{ matrix.arch }}-pip-${{ hashFiles('**/requirements.txt') }}
58-
restore-keys: |
59-
${{ runner.os }}-${{ matrix.arch }}-pip-
56+
enable-cache: true
6057

6158
- name: Setup ccache
6259
if: runner.os != 'Windows'
@@ -115,8 +112,7 @@ jobs:
115112

116113
- name: Install Python deps
117114
run: |
118-
python -m pip install -U pip wheel setuptools
119-
pip install -r requirements.txt
115+
uv pip install --system -r requirements.txt
120116
121117
- name: Run tests
122118
run: pytest -q
@@ -156,7 +152,7 @@ jobs:
156152
test -f "dist/TranslatorHoi4.app/Contents/MacOS/TranslatorHoi4"
157153
158154
- name: Upload artifact
159-
uses: actions/upload-artifact@v4
155+
uses: actions/upload-artifact@v7
160156
with:
161157
name: TranslatorHoi4-${{ runner.os }}-${{ matrix.arch }}
162158
path: ${{ runner.os == 'macOS' && 'dist/TranslatorHoi4.app/' || 'dist/TranslatorHoi4/' }}
@@ -167,16 +163,16 @@ jobs:
167163
runs-on: windows-latest
168164
steps:
169165
- name: Checkout
170-
uses: actions/checkout@v4
166+
uses: actions/checkout@v6
171167

172168
- name: Download Windows x64 artifact
173-
uses: actions/download-artifact@v4
169+
uses: actions/download-artifact@v8
174170
with:
175171
name: TranslatorHoi4-Windows-x64
176172
path: ./dist/TranslatorHoi4
177173

178174
- name: Upload Windows x64 package
179-
uses: actions/upload-artifact@v4
175+
uses: actions/upload-artifact@v7
180176
with:
181177
name: pkg-windows-x64
182178
path: ./dist/TranslatorHoi4
@@ -186,21 +182,21 @@ jobs:
186182
run: ./packaging/build-setup.ps1 -Version "${{ env.PACKAGE_VERSION }}" -Architecture "x64" -SourceDir "..\dist\TranslatorHoi4"
187183

188184
- name: Upload Inno Setup installer
189-
uses: actions/upload-artifact@v4
185+
uses: actions/upload-artifact@v7
190186
with:
191187
name: pkg-windows-setup-x64
192188
path: dist/TranslatorHoi4_Setup_*.exe
193189

194190
- name: Download Windows arm64 artifact
195191
if: always()
196-
uses: actions/download-artifact@v4
192+
uses: actions/download-artifact@v8
197193
with:
198194
name: TranslatorHoi4-Windows-arm64
199195
path: ./dist/TranslatorHoi4-arm64
200196

201197
- name: Upload Windows arm64 package
202198
if: always()
203-
uses: actions/upload-artifact@v4
199+
uses: actions/upload-artifact@v7
204200
with:
205201
name: pkg-windows-arm64
206202
path: ./dist/TranslatorHoi4-arm64
@@ -212,7 +208,7 @@ jobs:
212208

213209
- name: Upload Inno Setup installer (arm64)
214210
if: always()
215-
uses: actions/upload-artifact@v4
211+
uses: actions/upload-artifact@v7
216212
with:
217213
name: pkg-windows-setup-arm64
218214
path: dist/TranslatorHoi4_Setup_arm64_*.exe
@@ -244,7 +240,7 @@ jobs:
244240
expected_binary_regex: "ARM aarch64|aarch64"
245241
steps:
246242
- name: Checkout
247-
uses: actions/checkout@v4
243+
uses: actions/checkout@v6
248244

249245
- name: Install packaging deps
250246
run: |
@@ -256,7 +252,7 @@ jobs:
256252
shell: bash
257253

258254
- name: Download Linux artifact
259-
uses: actions/download-artifact@v4
255+
uses: actions/download-artifact@v8
260256
with:
261257
name: ${{ matrix.artifact_name }}
262258
path: ./dist/TranslatorHoi4
@@ -268,7 +264,7 @@ jobs:
268264
shell: bash
269265

270266
- name: Upload Linux package
271-
uses: actions/upload-artifact@v4
267+
uses: actions/upload-artifact@v7
272268
with:
273269
name: pkg-linux-${{ matrix.arch }}
274270
path: ./dist/TranslatorHoi4
@@ -278,7 +274,7 @@ jobs:
278274
shell: bash
279275

280276
- name: Upload .deb package
281-
uses: actions/upload-artifact@v4
277+
uses: actions/upload-artifact@v7
282278
with:
283279
name: pkg-linux-${{ matrix.arch }}-deb
284280
path: ${{ matrix.deb_glob }}
@@ -288,7 +284,7 @@ jobs:
288284
shell: bash
289285

290286
- name: Upload .rpm package
291-
uses: actions/upload-artifact@v4
287+
uses: actions/upload-artifact@v7
292288
with:
293289
name: pkg-linux-${{ matrix.arch }}-rpm
294290
path: ${{ matrix.rpm_glob }}
@@ -305,7 +301,7 @@ jobs:
305301
shell: bash
306302

307303
- name: Upload AppImage
308-
uses: actions/upload-artifact@v4
304+
uses: actions/upload-artifact@v7
309305
with:
310306
name: pkg-linux-${{ matrix.arch }}-appimage
311307
path: ${{ matrix.appimage_glob }}
@@ -315,30 +311,30 @@ jobs:
315311
runs-on: macos-latest
316312
steps:
317313
- name: Checkout
318-
uses: actions/checkout@v4
314+
uses: actions/checkout@v6
319315

320316
- name: Download macOS x64 artifact
321-
uses: actions/download-artifact@v4
317+
uses: actions/download-artifact@v8
322318
with:
323319
name: TranslatorHoi4-macOS-x64
324320
path: ./dist/TranslatorHoi4
325321

326322
- name: Upload macOS x64 package
327-
uses: actions/upload-artifact@v4
323+
uses: actions/upload-artifact@v7
328324
with:
329325
name: pkg-macos-x64
330326
path: ./dist/TranslatorHoi4
331327

332328
- name: Download macOS arm64 artifact
333329
if: always()
334-
uses: actions/download-artifact@v4
330+
uses: actions/download-artifact@v8
335331
with:
336332
name: TranslatorHoi4-macOS-arm64
337333
path: ./dist/TranslatorHoi4-arm64
338334

339335
- name: Upload macOS arm64 package
340336
if: always()
341-
uses: actions/upload-artifact@v4
337+
uses: actions/upload-artifact@v7
342338
with:
343339
name: pkg-macos-arm64
344340
path: ./dist/TranslatorHoi4-arm64

0 commit comments

Comments
 (0)