Inceptum/launcher-gtk/src/main/java/io/gitlab/jfronny/inceptum/gtk/util/I18n.java
JFronny 5dd3c4b0a2
Some checks failed
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline failed
Reformatting, instance ordering, "Inceptum" version name
2022-11-04 17:02:24 +01:00

28 lines
864 B
Java

package io.gitlab.jfronny.inceptum.gtk.util;
import ch.bailu.gtk.type.Str;
import org.jetbrains.annotations.PropertyKey;
import java.util.ResourceBundle;
public class I18n {
private static final String BUNDLE = "inceptum";
private static final ResourceBundle bundle = ResourceBundle.getBundle(BUNDLE);
public static String get(@PropertyKey(resourceBundle = BUNDLE) String key) {
return bundle.getString(key);
}
public static String get(@PropertyKey(resourceBundle = BUNDLE) String key, Object... args) {
return String.format(bundle.getString(key), args);
}
public static Str str(@PropertyKey(resourceBundle = BUNDLE) String key) {
return new Str(get(key));
}
public static Str str(@PropertyKey(resourceBundle = BUNDLE) String key, Object... args) {
return new Str(get(key, args));
}
}