Class TranslationPackageDiff
java.lang.Object
com.inductiveautomation.ignition.common.i18n.translation.BasicTranslationPackage
com.inductiveautomation.ignition.common.i18n.translation.TranslationPackageDiff
- All Implemented Interfaces:
MutableTranslationPackage,TranslationPackage,Serializable,Iterable<Translation>
public class TranslationPackageDiff
extends BasicTranslationPackage
implements MutableTranslationPackage, Iterable<Translation>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.common.i18n.translation.BasicTranslationPackage
BasicTranslationPackage.TranslationIterator -
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEnsures that the specified key is in the translation package.voidaddTranslation(String key, Locale locale, String value) Sets a translation for the specified key and locale.voidaddTranslations(String key, TranslationMap translations) Sets all of the translations for a specific key.voidclearChanges(Locale locale) Removes any modified terms for the given locale.voidensureLocaleExists(Locale locale) Verifies that the locale is present, adding it if necessary.Returns an unmodifiable set of the removed keys *booleanbooleanisModified(String key) booleanisModified(String key, Locale locale) booleanbooleaniterator()protected TermKeyregisterIndexKey(String key) booleanRemoves the specific key, and any translations.voidremoveLocale(Locale locale) voidremoveTranslation(String term, Locale locale) Removes a translation for a specified key and locale.Methods inherited from class com.inductiveautomation.ignition.common.i18n.translation.BasicTranslationPackage
applyPackage, createDiff, equals, get, getAllTranslations, getAvailableKeys, getAvailableLocales, getBaseLocale, getBundle, getIndex, getKeyHashRule, getOrCreateBundle, getOrCreateTermKey, getOrNull, getStrict, getTermKey, getTranslationsFor, hashKey, isDefined, isDefined, setBaseLocale, setIndex, setKeyHashRule, updateIndexMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface com.inductiveautomation.ignition.common.i18n.translation.TranslationPackage
createDiff, get, getAllTranslations, getAvailableKeys, getAvailableLocales, getBaseLocale, getKeyHashRule, getStrict, getTranslationsFor, isDefined, isDefined
-
Field Details
-
removedKeys
-
removedLocales
-
removedTranslations
-
-
Constructor Details
-
TranslationPackageDiff
public TranslationPackageDiff() -
TranslationPackageDiff
-
-
Method Details
-
getRemovedKeys
Returns an unmodifiable set of the removed keys * -
getRemovedLocales
-
addTerm
Description copied from interface:MutableTranslationPackageEnsures that the specified key is in the translation package.- Specified by:
addTermin interfaceMutableTranslationPackage- Overrides:
addTermin classBasicTranslationPackage
-
isModified
-
isModified
-
isRemoved
-
isRemoved
-
clearChanges
Removes any modified terms for the given locale. Does not mark the locale as deleted. * -
registerIndexKey
-
addTranslation
Description copied from interface:MutableTranslationPackageSets a translation for the specified key and locale.- Specified by:
addTranslationin interfaceMutableTranslationPackage- Overrides:
addTranslationin classBasicTranslationPackage
-
addTranslations
Description copied from interface:MutableTranslationPackageSets all of the translations for a specific key. Translation map can be null, in which case the key will simply be registered in the index.- Specified by:
addTranslationsin interfaceMutableTranslationPackage- Overrides:
addTranslationsin classBasicTranslationPackage
-
removeTranslation
Description copied from interface:MutableTranslationPackageRemoves a translation for a specified key and locale. Used when someone had a translation and blanks it out.- Specified by:
removeTranslationin interfaceMutableTranslationPackage- Overrides:
removeTranslationin classBasicTranslationPackage
-
removeKey
Description copied from interface:MutableTranslationPackageRemoves the specific key, and any translations.- Specified by:
removeKeyin interfaceMutableTranslationPackage- Overrides:
removeKeyin classBasicTranslationPackage- Returns:
- true if key was present
-
ensureLocaleExists
Description copied from interface:MutableTranslationPackageVerifies that the locale is present, adding it if necessary.- Specified by:
ensureLocaleExistsin interfaceMutableTranslationPackage- Overrides:
ensureLocaleExistsin classBasicTranslationPackage
-
removeLocale
- Specified by:
removeLocalein interfaceMutableTranslationPackage- Overrides:
removeLocalein classBasicTranslationPackage
-
hasChanges
public boolean hasChanges() -
iterator
- Specified by:
iteratorin interfaceIterable<Translation>
-
getRemovedTranslations
-