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)); } }