atrium-impl-robstoll / ch.tutteli.atrium.reporting.translating

Package ch.tutteli.atrium.reporting.translating

Types

ArgumentsSupportingTranslator

abstract class ArgumentsSupportingTranslator : ITranslator

Represents an ITranslator which supports ITranslatableWithArgs.

ILocaleOrderDecider

interface ILocaleOrderDecider

Responsible to decide in which order Locales should be processed.

ISimpleTranslatable

interface ISimpleTranslatable : ITranslatable

Something which is ITranslatable and provides a default representation by value.

ITranslatable

interface ITranslatable

Something which is translatable, identified by id with a default representation given by getDefault.

ITranslatableWithArgs

interface ITranslatableWithArgs : ITranslatable

Represents a ITranslatable with arguments.

ITranslationSupplier

interface ITranslationSupplier

A supplier of translations for ITranslatables for particular Locales.

ITranslator

interface ITranslator

Represents a translator of ITranslatables.

PropertiesBasedTranslationSupplier

abstract class PropertiesBasedTranslationSupplier<in T> : ITranslationSupplier

A base class for properties based ITranslationSuppliers which provides a loading and caching mechanism of properties files.

PropertiesPerEntityAndLocaleTranslationSupplier

class PropertiesPerEntityAndLocaleTranslationSupplier : PropertiesBasedTranslationSupplier<String>

Represents an ITranslationSupplier which is based on properties-files which are structured per entity (enum, object or class) and Locale.

PropertiesPerLocaleTranslationSupplier

class PropertiesPerLocaleTranslationSupplier : PropertiesBasedTranslationSupplier<Locale>

Represents an ITranslationSupplier which is based on properties-files which are structured per Locale.

ResourceBundleBasedTranslator

class ResourceBundleBasedTranslator : ArgumentsSupportingTranslator

Represents an ITranslator which reuses ResourceBundle properties based capabilities but uses an enhanced fallback mechanism. Instead of falling back to Locale.getDefault one is able to specify fallback Locale oneself. Whether this includes Locale.getDefault or not is up to the user.

TranslatableRawString

data class TranslatableRawString : IRawString

Use this class to represent an ITranslatable which shall be translated and then be treated as raw String in reporting.

TranslatableWithArgs

class TranslatableWithArgs : ITranslatableWithArgs

An ITranslatable which contains placeholders for arguments.

Translator

class Translator : ArgumentsSupportingTranslator

Represents an ITranslator which uses an ITranslationSupplier to retrieve translations and LocaleOrderDecider to determine in which order it should try to find translations for a given ITranslatable.

UsingDefaultTranslator

class UsingDefaultTranslator : ArgumentsSupportingTranslator

This translator does not translate but uses ITranslatable.getDefault instead and uses Locale.getDefault as primaryLocale if not defined differently via constructor parameter.