Implements database, adds profiles

This commit is contained in:
2025-10-01 22:23:00 +02:00
parent b2571c191f
commit d2da811868
86 changed files with 17323 additions and 483 deletions

View File

@@ -0,0 +1,38 @@
package ch.gtache.fro;
import java.util.Locale;
import java.util.Map;
/**
* Represents a translated object
*/
@FunctionalInterface
public interface Translated {
/**
* Returns the translations
*
* @return The translations
*/
Map<Locale, String> translations();
/**
* Translates the object using the given locale
*
* @param locale The locale
* @return The translated string
*/
default String translate(final Locale locale) {
return translations().get(locale);
}
/**
* Translates the object using the default locale
*
* @return The translated string
*/
default String translate() {
return translate(Locale.getDefault());
}
}