Crash Assistant

Crash Assistant

1M Downloads

[Enhancement] Support localization?

QianFuv opened this issue · 7 comments

commented

I really like this mod, especially for modpack developers. If it supports localization, I would be happy to provide Chinese language files.

commented

Currently, I plan to allow changing some buttons and message text via a config file. Localization for this mod can be an ambiguous thing because Minecraft can crash before the assets (where language files are located) are loaded. Additionally, lang can be modified by resource packs, mods, etc., at various stages. The Crash Assistant app runs on an independent JVM, so there will be issues accessing the current updated lang.

As a result, we can't implement localization using Vanilla methods.
I do have an idea for how to implement localization, but it will require a lot of work, so I'll do it a little later.
For now, I want to finish the planned features, like the mod list and config. I also want to ensure the mod works on every version after 1.19.2. Once that's done, I'll implement localization.

#General settings of Crash Assistant mod.
[general]
	#Link which will be opened in browser on request_help_button pressed.
	help_link = "https://discord.gg/moddedmc"
	#Show gui on minecraft crashed on modloading and FML error screen displayed.
	show_on_fml_error_screen = true

#Here you can configure debug options for easier configuration of the mod.
[debug]
	#Setting this value to one of listed here, will crash the game in order to show/debug gui.
	#NONE - default value, no crash. You can always crash game by holding vanilla F3+C keybind.
	#MIXIN_SETUP - will crash game on Mixin setup. Crash report not generated.
	#MOD_LOADING - will crash game on load of this mod. Can be used to show FML error screen. Crash report generated.
	#GAME_STARTED - will crash game on first tick of TitleScreen. Crash report generated.
	crash_game_on_event = "NONE"

#Here you can change text of buttons, generated msg, etc
[text]
	#Text of request_help_button
	request_help_button = "request help in Modded Minecraft Discord"
	#Initial text of generated msg with links to all files.
	msg = "Minecraft crashed!"
	#Title label text, then crash report or hs_err exists.
	title_crashed_with_report = "Oops, Minecraft crashed!"
	#Title label text, then no crash report exists.
	title_crashed_without_report = "Oops, Minecraft crashed without crash report!"

#Settings of modlist feature.
#Adds in generated msg block about which mods modpack user added/removed/updated.
[modpack_modlist]
	#Enable feature.
	enabled = true
	#UUID's of players, who considered as modpack creator.
	#Only this players can overwrite modlist.json
	modpack_creators = []
	#If enabled, modlist.json will be overwritten on every launch,
	#then player is modpack creator. So you won't forget to save it before publishing.
	auto_update = true
commented

Thank you for your reply! Please let me know if there are any developments in this matter!

commented

@QianFuv
Added localization and uploaded alpha version: https://modrinth.com/mod/crash-assistant/versions
Pls make a PR with zh_cn.json.
https://github.com/KostromDan/Crash-Assistant/tree/1.19.2%2B/common_config/src/main/resources/lang
There is a README file, so you can debug it.

I tried to ask GPT to make a CN translation for debugging, and maybe we have a problem.
The CN text is too short, so after upload, one button becomes two buttons, and there is not enough space for it.
Maybe try to add some spaces to the borders, or maybe it's an incorrect translation, and yours will be longer.
zh_cn.json

commented

Yes, for example if we add 3 spaces to borders, problem fixes.

  "gui.upload_and_copy_link_button": "   上传并复制链接   ",
commented

@KostromDan
PR here: #3
Width modifications may be required

commented

Thanks for lang files.

commented

The latest Chinese language file will be available today.🥰