Skip to content
This repository was archived by the owner on Jan 1, 2024. It is now read-only.

Commit 4ec4d78

Browse files
committedDec 20, 2023
Added small reminder note about how to bundle translations for release
1 parent e5a0512 commit 4ec4d78

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
 

‎doc/dev/bundle_translations.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Bundle Translations
2+
3+
### Edit Project File Post-Build
4+
5+
Open the DS4WindowsWPF.csproj file. Navigate to the Post-Build section.
6+
Add two `:` characters before the `GOTO END` statement to comment the line out.
7+
Build the program in Visual Studio or directly with MSBuild. The dedicated Lang folder
8+
will be created with the compiled translation assemblies
9+
10+
#### Add new Translations in project file
11+
12+
Edit the `langs` variable in the Post-Build step with the .NET culture code for a
13+
locale.
14+
15+
### Add Lang folder loading
16+
17+
.NET normally expects translation assemblies to be bundled in folders
18+
for each locale directly next to the running executable. Since DS4Windows
19+
uses a Lang subfolder, an extra step must be performed to make sure .NET will
20+
find the compiled assemblies.
21+
22+
A Python 3 (3.10) script is included in the solution `utils` folder (`inject_deps_path.py`).
23+
It accepts the path to the relevant `DS4Windows.deps.json` file as a cmd argument. The script
24+
will add necessary path variable for the project entry to include an extra include path
25+
for the .NET Runtime.

0 commit comments

Comments
 (0)
This repository has been archived.