neoforged / FancyModLoader

The fancy mod loader for NeoForged
Other
62 stars 30 forks source link

Refactor ModLoadingIssue Warning/Error Translations #167

Closed shartte closed 3 months ago

shartte commented 3 months ago

Change the translation logic for mod loading issues warnings/errors to:

Note that this is easier to review in the commit view. The updates to translation keys were done with a Python script, only the first contains manual code changes.

neoforged-pr-publishing[bot] commented 3 months ago

Last commit published: de953f1d8bf1036836258dfcfd88360c14b735bf.

PR Publishing ### The artifacts published by this PR: - :package: [`net.neoforged.fancymodloader:loader:4.0.15-pr-167-translation`](https://github.com/neoforged/FancyModLoader/packages/2185644) - :package: [`net.neoforged.fancymodloader:earlydisplay:4.0.15-pr-167-translation`](https://github.com/neoforged/FancyModLoader/packages/2185641) - :package: [`net.neoforged.fancymodloader:junit-fml:4.0.15-pr-167-translation`](https://github.com/neoforged/FancyModLoader/packages/2185643) ### Repository Declaration In order to use the artifacts published by the PR, add the following repository to your buildscript: ```gradle repositories { maven { name 'Maven for PR #167' // https://github.com/neoforged/FancyModLoader/pull/167 url 'https://prmaven.neoforged.net/FancyModLoader/pr167' content { includeModule('net.neoforged.fancymodloader', 'loader') includeModule('net.neoforged.fancymodloader', 'earlydisplay') includeModule('net.neoforged.fancymodloader', 'junit-fml') } } } ```
Matyrobbrt commented 3 months ago

What's the motivation behind the modloading -> modloadingissue change?

shartte commented 3 months ago

What's the motivation behind the modloading -> modloadingissue change?

The motivation is that we can - when looking at the translation file - know, if a given translation key has access to the implicit arguments starting at 100 or not. Currently, you'd have to go back into the code and check if the translation key is exclusively used for modloading issues or not.

HenryLoenwind commented 3 months ago

Wouldn't fml.modloading.issue be a better fit for the naming scheme?

shartte commented 3 months ago

Wouldn't fml.modloading.issue be a better fit for the naming scheme?

Eh, I don't think it matters. The class they're used in is called ModLoadingIssue, and there are other keys beneath fml. being used, so it fits well enough.