/** * Saves or updates the translation for the specified locale. * If the key was outdated, checks if the key is still outdated. * * @param locale specified the translation locale * @param value translation value * @param isApproximate true if the translation is not exact. * @return the new translation * @throws java.lang.IllegalArgumentException if the locale is null or empty * or contains other characters than letters and "-". */ public Translation addTranslation(String locale, String value, boolean isApproximate) { LocaleCodeSpecification.assertCode(locale); if (isBlank(value)) { throw new IllegalArgumentException("The translation can't be blank"); } Translation translation = createOrUpdateTranslation(locale, value, isApproximate); checkOutdatedStatus(); return translation; }