/** * Removes the translation corresponding to the given locale code. * * @param locale locale code * @throws java.lang.IllegalArgumentException if the locale is null or empty * or contains other characters than letters and "-". */ public void removeTranslation(String locale) { LocaleCodeSpecification.assertCode(locale); Translation translation = getTranslation(locale); if (translation != null) { this.translations.remove(translation.getId()); } }
@Override public void mergeAggregateIntoDto(Key sourceAggregate, KeyDTO targetDto) { targetDto.setName(sourceAggregate.getId()); targetDto.setComment(sourceAggregate.getComment()); targetDto.setOutdated(sourceAggregate.isOutdated()); for (Translation tln : sourceAggregate.getTranslations().values()) { targetDto.addTranslationDTO(tln.getId().getLocale(), tln.getValue(), tln.isOutdated(), tln.isApproximate()); } }