Skip to content

Commit

Permalink
update crowdin lang files, some minor code tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sakura-ryoko committed Nov 22, 2024
1 parent b4049c7 commit db70937
Show file tree
Hide file tree
Showing 52 changed files with 19,963 additions and 2,429 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ author = masa
mod_file_name = tweakeroo-fabric

# Current mod version
mod_version = 0.21.53-sakura.2
mod_version = 0.21.53

# Required malilib version
malilib_version = 0.21.2-sakura.2
malilib_id = 21481c3732
malilib_version = 0.21.2
malilib_id = 51dd186f89

# Minecraft, Fabric Loader and API and mappings versions
minecraft_version_out = 1.21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@

public class ConfigBooleanClient extends ConfigBooleanHotkeyed
{
public ConfigBooleanClient(String name, boolean defaultValue, String defaultHotkey)
{
this(name, defaultValue, defaultHotkey, name+" Comment!", StringUtils.splitCamelCase(name), name);
}

public ConfigBooleanClient(String name, boolean defaultValue, String defaultHotkey, String comment)
{
this(name, defaultValue, defaultHotkey, comment, name);
this(name, defaultValue, defaultHotkey, comment, StringUtils.splitCamelCase(name), name);
}

public ConfigBooleanClient(String name, boolean defaultValue, String defaultHotkey, String comment, String prettyName)
public ConfigBooleanClient(String name, boolean defaultValue, String defaultHotkey, String comment, String prettyName, String translatedName)
{
super(name, defaultValue, defaultHotkey, comment, prettyName);
super(name, defaultValue, defaultHotkey, comment, prettyName, translatedName);
}

@Override
Expand Down
348 changes: 177 additions & 171 deletions src/main/java/fi/dy/masa/tweakeroo/config/Configs.java

Large diffs are not rendered by default.

67 changes: 37 additions & 30 deletions src/main/java/fi/dy/masa/tweakeroo/config/FeatureToggle.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ public enum FeatureToggle implements IHotkeyTogglable, IConfigNotifiable<IConfig

public static final ImmutableList<FeatureToggle> VALUES = ImmutableList.copyOf(values());

private final static String FEATURE_KEY = Reference.MOD_ID+ ".config.feature_toggle";

private final String name;
private final String comment;
private final String prettyName;
Expand All @@ -120,25 +122,25 @@ public enum FeatureToggle implements IHotkeyTogglable, IConfigNotifiable<IConfig
FeatureToggle(String name, boolean defaultValue, String defaultHotkey)
{
this(name, defaultValue, false, defaultHotkey, KeybindSettings.DEFAULT,
Reference.MOD_ID+".config.feature_toggle.comment."+name,
Reference.MOD_ID+".config.feature_toggle.prettyName."+name,
Reference.MOD_ID+".config.feature_toggle.name."+name);
buildTranslateName(name, "comment"),
buildTranslateName(name, "prettyName"),
buildTranslateName(name, "name"));
}

FeatureToggle(String name, boolean defaultValue, String defaultHotkey, KeybindSettings settings)
{
this(name, defaultValue, false, defaultHotkey, settings,
Reference.MOD_ID+".config.feature_toggle.comment."+name,
Reference.MOD_ID+".config.feature_toggle.prettyName."+name,
Reference.MOD_ID+".config.feature_toggle.name."+name);
buildTranslateName(name, "comment"),
buildTranslateName(name, "prettyName"),
buildTranslateName(name, "name"));
}

FeatureToggle(String name, boolean defaultValue, boolean singlePlayer, String defaultHotkey)
{
this(name, defaultValue, singlePlayer, defaultHotkey, KeybindSettings.DEFAULT,
Reference.MOD_ID+".config.feature_toggle.comment."+name,
Reference.MOD_ID+".config.feature_toggle.prettyName."+name,
Reference.MOD_ID+".config.feature_toggle.name."+name);
buildTranslateName(name, "comment"),
buildTranslateName(name, "prettyName"),
buildTranslateName(name, "name"));
}

FeatureToggle(String name, boolean defaultValue, String defaultHotkey, String comment, String prettyName, String translatedName)
Expand All @@ -161,57 +163,57 @@ public enum FeatureToggle implements IHotkeyTogglable, IConfigNotifiable<IConfig
FeatureToggle(String name, boolean defaultValue, String defaultHotkey, String comment)
{
this(name, defaultValue, false, defaultHotkey, KeybindSettings.DEFAULT,
comment,
Reference.MOD_ID+".config.feature_toggle.prettyName."+name,
Reference.MOD_ID+".config.feature_toggle.name."+name);
comment,
buildTranslateName(name, "prettyName"),
buildTranslateName(name, "name"));
}

FeatureToggle(String name, boolean defaultValue, boolean singlePlayer, String defaultHotkey, String comment)
{
this(name, defaultValue, singlePlayer, defaultHotkey, KeybindSettings.DEFAULT,
comment,
Reference.MOD_ID+".config.feature_toggle.prettyName."+name,
Reference.MOD_ID+".config.feature_toggle.name."+name);
comment,
buildTranslateName(name, "prettyName"),
buildTranslateName(name, "name"));
}

FeatureToggle(String name, boolean defaultValue, String defaultHotkey, KeybindSettings settings, String comment)
{
this(name, defaultValue, false, defaultHotkey, settings,
comment,
Reference.MOD_ID+".config.feature_toggle.prettyName."+name,
Reference.MOD_ID+".config.feature_toggle.name."+name);
comment,
buildTranslateName(name, "prettyName"),
buildTranslateName(name, "name"));
}

FeatureToggle(String name, boolean defaultValue, boolean singlePlayer, String defaultHotkey, KeybindSettings settings, String comment)
{
this(name, defaultValue, singlePlayer, defaultHotkey, settings,
comment,
Reference.MOD_ID+".config.feature_toggle.prettyName."+name,
Reference.MOD_ID+".config.feature_toggle.name."+name);
comment,
buildTranslateName(name, "prettyName"),
buildTranslateName(name, "name"));
}

FeatureToggle(String name, boolean defaultValue, String defaultHotkey, String comment, String prettyName)
{
this(name, defaultValue, false, defaultHotkey,
comment,
prettyName,
Reference.MOD_ID+".config.feature_toggle.name."+name);
comment,
prettyName,
buildTranslateName(name, "name"));
}

FeatureToggle(String name, boolean defaultValue, boolean singlePlayer, String defaultHotkey, String comment, String prettyName)
{
this(name, defaultValue, singlePlayer, defaultHotkey, KeybindSettings.DEFAULT,
comment,
prettyName,
Reference.MOD_ID+".config.feature_toggle.name."+name);
comment,
prettyName,
buildTranslateName(name, "name"));
}

FeatureToggle(String name, boolean defaultValue, boolean singlePlayer, String defaultHotkey, KeybindSettings settings, String comment, String prettyName)
{
this(name, defaultValue, singlePlayer, defaultHotkey, settings,
comment,
prettyName,
Reference.MOD_ID+".config.feature_toggle.name."+name);
comment,
prettyName,
buildTranslateName(name, "name"));
}
// Backwards Compatible constructors - END

Expand Down Expand Up @@ -317,6 +319,11 @@ public String getTranslatedName()
return this.translatedName;
}

private static String buildTranslateName(String name, String type)
{
return FEATURE_KEY + "." + type + "." + name;
}

@Override
public IKeybind getKeybind()
{
Expand Down
Loading

0 comments on commit db70937

Please sign in to comment.