Interface MutableTranslationPackage
- All Superinterfaces:
TranslationPackage
- All Known Implementing Classes:
BasicTranslationPackage, ComponentTranslationPanel.DelegateTranslationPackage, DesignerLocalizationManager, TranslationPackageDiff
-
Field Summary
Fields inherited from interface TranslationPackage
BASE_LOCALE, NOTES_IDENTIFIER -
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, @Nullable TranslationMap translations) Sets all of the translations for a specific key.voidensureLocaleExists(Locale locale) Verifies that the locale is present, adding it if necessary.booleanRemoves the specific key, and any translations.voidremoveLocale(Locale locale) voidremoveTranslation(String key, Locale locale) Removes a translation for a specified key and locale.voidSets or clears the editorial note for the given key.Methods inherited from interface TranslationPackage
createDiff, get, getAllTranslations, getAvailableKeys, getAvailableLocales, getKeyHashRule, getNote, getNotes, getResolvedTranslations, getStrict, getTranslationsFor, isDefined, isDefined
-
Method Details
-
addKey
Ensures that the specified key is in the translation package. This registers a key without necessarily providing a translation immediately.- Parameters:
key- The key to add.
-
addTranslation
-
removeTranslation
Removes a translation for a specified key and locale. Used when someone had a translation and blanks it out. This removes the specific translation but keeps the key in the package.- Parameters:
key- The key to modify.locale- The locale for which to remove the translation.
-
addTranslations
Sets 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. -
removeKey
Removes the specific key, and any translations.- Returns:
- true if key was present
-
setNote
-
ensureLocaleExists
Verifies that the locale is present, adding it if necessary. -
removeLocale
-