Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Mod Menu Localization #112

Merged
merged 4 commits into from
Dec 17, 2023
Merged

Add Mod Menu Localization #112

merged 4 commits into from
Dec 17, 2023

Conversation

drojf
Copy link
Contributor

@drojf drojf commented Dec 11, 2023

Previously, translators were not able to modify text in the mod menu, as all mod menu text were hardcoded strings in the DLL.

This PR loads the strings from a localization.json file which should be placed at HigurashiEp0X_Data/localization.json (next to the tips.json file).

An example localization.json is provided at tools/localization.json, which should be updated as a reference for translators.

If the localization.json file is missing, it uses defaults specified in the MOD.Scripts.Core/MODLocalizationData.cs file. This means we don't need to provide a localization.json file in each of our repositories at this point in time.

For more details, see #109


There is one change which isn't directly related to mod menu localization in this file - "Fix exception if toast displayed before gamesystem started" - I think this was because I added a popup if the localization.json file is invalid, but since it was raised so early in the game startup, it would cause an exception (now fixed).

drojf added 3 commits December 9, 2023 12:22
- begin making script to find strings in csharp files
- Make some strings easier to localize
- Fix matching only first string
- Modify functions to suit generated code
- Trial trial adding generated code
- Add localization for the resolution menu
- Fix bad formatting on resolution override button text
- Ensure localization entries have default values always
- Add generated localization file
- Minor updates to code
- Add datetime culture option in localization.json
- Fix localization.json format, ignore commented lines
- Update code to better suit localization script
- Process remaining menu files
    - "MOD.Scripts.UI/MODMenuAudioOptions.cs"
    - "MOD.Scripts.UI/MODMenuAudioSetup.cs"
    - "MOD.Scripts.UI/MODMenuSupport.cs"
    - "MOD.Scripts.UI/MODMenu.cs"
- Fix missing long strings
- Fix wrong newline sequence in localization.json
- Fix exception if text is set to null
- Allow setting datetime display format for save file time
- Note: quick save time format was previously differen (missing the day of week), but I've changed it so it is the same as the other formats
- Update voice matching level 5 description

Update extraction script
- Use better replacement ID,
- extract important information into class,
- output code fragments usable by the engine,
- add info comment
- Acommodate switching to jp at runtime by using Properties
@drojf drojf linked an issue Dec 11, 2023 that may be closed by this pull request
@drojf drojf merged commit 1ec9491 into mod Dec 17, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DLL changes for translators
1 participant