forked from CaffeineMC/sodium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new: Add translation for Sodium's video settings screen (CaffeineMC#717)
* new: Add translation for Sodium's video settings screen Co-Authored-By: AMereBagatelle <[email protected]> Co-authored-by: Bytzo <[email protected]> * fix: Update "Enable Memory Tracing" option to use translation system Co-authored-by: AMereBagatelle <[email protected]> Co-authored-by: Bytzo <[email protected]> Co-authored-by: JellySquid <[email protected]>
- Loading branch information
1 parent
5d24d24
commit 5306c9c
Showing
16 changed files
with
188 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
140 changes: 60 additions & 80 deletions
140
src/main/java/me/jellysquid/mods/sodium/client/gui/SodiumGameOptionPages.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 12 additions & 11 deletions
23
src/main/java/me/jellysquid/mods/sodium/client/gui/options/OptionImpact.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
package me.jellysquid.mods.sodium.client.gui.options; | ||
|
||
import net.minecraft.text.Text; | ||
import net.minecraft.text.TranslatableText; | ||
import net.minecraft.util.Formatting; | ||
|
||
public enum OptionImpact { | ||
LOW(Formatting.GREEN, "Low"), | ||
MEDIUM(Formatting.YELLOW, "Medium"), | ||
HIGH(Formatting.GOLD, "High"), | ||
VARIES(Formatting.WHITE, "Varies"); | ||
public enum OptionImpact implements TextProvider { | ||
LOW(Formatting.GREEN, "sodium.option_impact.low"), | ||
MEDIUM(Formatting.YELLOW, "sodium.option_impact.medium"), | ||
HIGH(Formatting.GOLD, "sodium.option_impact.high"), | ||
VARIES(Formatting.WHITE, "sodium.option_impact.varies"); | ||
|
||
private final Formatting color; | ||
private final String text; | ||
private final Text text; | ||
|
||
OptionImpact(Formatting color, String text) { | ||
this.color = color; | ||
this.text = text; | ||
this.text = new TranslatableText(text).formatted(color); | ||
} | ||
|
||
public String toDisplayString() { | ||
return this.color + this.text; | ||
@Override | ||
public Text getLocalizedName() { | ||
return this.text; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
src/main/java/me/jellysquid/mods/sodium/client/gui/options/TextProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package me.jellysquid.mods.sodium.client.gui.options; | ||
|
||
import net.minecraft.text.Text; | ||
|
||
public interface TextProvider { | ||
String getLocalizedName(); | ||
Text getLocalizedName(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
...main/java/me/jellysquid/mods/sodium/client/gui/options/control/ControlValueFormatter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.