File tree 2 files changed +12
-0
lines changed
src/main/java/net/fabricmc/mappingio/i18n
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -31,4 +31,11 @@ static Translatable of(String translationKey) {
31
31
* Translates this translatable to the specified locale, with a fallback to en_US.
32
32
*/
33
33
String translate (Locale locale );
34
+
35
+ /**
36
+ * Returns the translation key of this translatable, allowing consumers provide a custom translation.
37
+ *
38
+ * <p>No guarantees about the stability of this value across major library versions are made.
39
+ */
40
+ String translationKey ();
34
41
}
Original file line number Diff line number Diff line change @@ -28,5 +28,10 @@ public String translate(Locale locale) {
28
28
return I18n .translate (translationKey , locale );
29
29
}
30
30
31
+ @ Override
32
+ public String translationKey () {
33
+ return translationKey ;
34
+ }
35
+
31
36
private final String translationKey ;
32
37
}
You can’t perform that action at this time.
0 commit comments