Sort localisation strings alphabetically like 4j does

This commit is contained in:
Pyogenics 2026-03-07 16:08:44 +00:00
parent d0de4c695d
commit dc54566cd4
4 changed files with 7 additions and 7 deletions

View file

@ -22,14 +22,13 @@ install_subdir(client_platform_path / 'DurangoMedia/DLC', install_dir : 'Windows
# TODO: Need to make this take inputs # TODO: Need to make this take inputs
localisation = custom_target('Minecraft.Assets_Localisation', localisation = custom_target('Minecraft.Assets_Localisation',
output : [ 'languages.loc', 'localisation_strings.h' ], output : [ 'languages.loc', 'strings.h' ],
command : [ command : [
'python3', meson.project_source_root() / 'scripts/pack_loc.py', 'python3', meson.project_source_root() / 'scripts/pack_loc.py',
client_platform_path / 'Windows64Media/loc', client_platform_path / 'Windows64Media/loc',
'@OUTPUT0@', '@OUTPUT0@',
'@OUTPUT1@' '@OUTPUT1@'
], ]
build_always_stale : true
) )
colour_table = custom_target('Minecraft.Assets_Colour_Table', colour_table = custom_target('Minecraft.Assets_Colour_Table',
@ -427,7 +426,7 @@ assets_archive = custom_target('Minecraft.Assets_Archive',
install : true, install : true,
install_dir : 'Common/Media', install_dir : 'Common/Media',
build_subdir : 'Common/Media', build_subdir : 'Common/Media',
build_by_default : true, build_by_default : true
) )
@ -438,6 +437,7 @@ assets_archive = custom_target('Minecraft.Assets_Archive',
assets_localisation_dep = declare_dependency( assets_localisation_dep = declare_dependency(
sources : localisation[1], sources : localisation[1],
# sources : client_platform_path / 'Windows64Media/strings.h',
include_directories : include_directories('.') include_directories : include_directories('.')
) )

View file

@ -236,7 +236,7 @@ typedef XUID GameSessionUID;
#include "Common/BuildVer.h" #include "Common/BuildVer.h"
// This is generated at build time via scripts/pack_loc.py // This is generated at build time via scripts/pack_loc.py
#include "localisation_strings.h" #include "strings.h"
#ifdef _XBOX #ifdef _XBOX
#include "../Platform/Xbox/Xbox_App.h" #include "../Platform/Xbox/Xbox_App.h"

View file

@ -208,7 +208,7 @@ void MemSect(int sect);
#include "../../Minecraft.Client/Build/Common/BuildVer.h" #include "../../Minecraft.Client/Build/Common/BuildVer.h"
// This is generated at build time via scripts/pack_loc.py // This is generated at build time via scripts/pack_loc.py
#include "localisation_strings.h" #include "strings.h"
#ifdef _XBOX #ifdef _XBOX
#include "../../Minecraft.Client/Platform/Xbox/Xbox_App.h" #include "../../Minecraft.Client/Platform/Xbox/Xbox_App.h"

View file

@ -71,7 +71,7 @@ for lang_file_path in lang_file_paths:
strings[string_name] = string strings[string_name] = string
print(f"Processed {len(strings)} strings from {lang_file_path}") print(f"Processed {len(strings)} strings from {lang_file_path}")
langs[lang_name] = strings langs[lang_name] = dict(sorted(strings.items()))
print(f"Processed {len(langs)} languages") print(f"Processed {len(langs)} languages")
# Write loc file # Write loc file