Convert LinkExpirationFormatterMethod to Java's ChoiceFormat pattern

Closes #21887
This commit is contained in:
Alexander Schwartz 2023-07-22 16:20:44 +02:00 committed by Hynek Mlnařík
parent 5bd4d8202f
commit 1ec8d3a9a4
19 changed files with 156 additions and 227 deletions

View file

@ -5,6 +5,7 @@
*/ */
package org.keycloak.theme.beans; package org.keycloak.theme.beans;
import java.text.MessageFormat;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Properties; import java.util.Properties;
@ -13,7 +14,7 @@ import freemarker.template.TemplateMethodModelEx;
import freemarker.template.TemplateModelException; import freemarker.template.TemplateModelException;
/** /**
* Method used to format link expiration time period in emails. * Method used to format the link expiration time period in emails.
* *
* @author Vlastimil Elias (velias at redhat dot com) * @author Vlastimil Elias (velias at redhat dot com)
*/ */
@ -62,14 +63,6 @@ public class LinkExpirationFormatterMethod implements TemplateMethodModelEx {
} }
} }
return value + " " + getUnitTextFromMessages(unitKey, value); return value + " " + MessageFormat.format(messages.getProperty("linkExpirationFormatter.timePeriodUnit." + unitKey), value);
} }
protected String getUnitTextFromMessages(String unitKey, long value) {
String msg = messages.getProperty("linkExpirationFormatter.timePeriodUnit." + unitKey + "." + value);
if (msg != null)
return msg;
return messages.getProperty("linkExpirationFormatter.timePeriodUnit." + unitKey);
}
} }

View file

@ -5,13 +5,22 @@
*/ */
package org.keycloak.theme.beans; package org.keycloak.theme.beans;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Objects;
import java.util.Properties; import java.util.Properties;
import java.util.stream.Collectors;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import freemarker.template.TemplateModelException; import freemarker.template.TemplateModelException;
@ -24,15 +33,10 @@ public class LinkExpirationFormatterMethodTest {
protected static final Locale locale = Locale.ENGLISH; protected static final Locale locale = Locale.ENGLISH;
protected static final Properties messages = new Properties(); protected static final Properties messages = new Properties();
static { static {
messages.put("linkExpirationFormatter.timePeriodUnit.seconds.1", "second"); messages.put("linkExpirationFormatter.timePeriodUnit.seconds", "{0,choice,0#seconds|1#second|1<seconds}");
messages.put("linkExpirationFormatter.timePeriodUnit.seconds", "seconds"); messages.put("linkExpirationFormatter.timePeriodUnit.minutes", "{0,choice,0#minutes|1#minute|2#minutes|3#minutes-3|3<minutes}");
messages.put("linkExpirationFormatter.timePeriodUnit.minutes.1", "minute"); messages.put("linkExpirationFormatter.timePeriodUnit.hours", "{0,choice,0#hours|1#hour|1<hours}");
messages.put("linkExpirationFormatter.timePeriodUnit.minutes.3", "minutes-3"); messages.put("linkExpirationFormatter.timePeriodUnit.days", "{0,choice,0#days|1#day|1<days}");
messages.put("linkExpirationFormatter.timePeriodUnit.minutes", "minutes");
messages.put("linkExpirationFormatter.timePeriodUnit.hours.1", "hour");
messages.put("linkExpirationFormatter.timePeriodUnit.hours", "hours");
messages.put("linkExpirationFormatter.timePeriodUnit.days.1", "day");
messages.put("linkExpirationFormatter.timePeriodUnit.days", "days");
} }
protected List<Object> toList(Object... objects) { protected List<Object> toList(Object... objects) {
@ -68,8 +72,10 @@ public class LinkExpirationFormatterMethodTest {
@Test @Test
public void inputtypes_number() throws TemplateModelException{ public void inputtypes_number() throws TemplateModelException{
LinkExpirationFormatterMethod tested = new LinkExpirationFormatterMethod(messages, locale); LinkExpirationFormatterMethod tested = new LinkExpirationFormatterMethod(messages, locale);
Assert.assertEquals("5 minutes", tested.exec(toList(new Integer(5)))); //noinspection UnnecessaryBoxing
Assert.assertEquals("5 minutes", tested.exec(toList(new Long(5)))); Assert.assertEquals("5 minutes", tested.exec(toList(Integer.valueOf(5))));
//noinspection UnnecessaryBoxing
Assert.assertEquals("5 minutes", tested.exec(toList(Long.valueOf(5))));
} }
@Test @Test
@ -124,5 +130,73 @@ public class LinkExpirationFormatterMethodTest {
Assert.assertEquals("5 days", tested.exec(toList(5 * 24 * 60))); Assert.assertEquals("5 days", tested.exec(toList(5 * 24 * 60)));
} }
/**
* There are some languages where the choice format is not needed. Test that this still works.
*/
@Test
public void format_simple_no_choice() throws TemplateModelException {
Properties simpleMessages = new Properties();
simpleMessages.put("linkExpirationFormatter.timePeriodUnit.seconds", "seconds-simple");
simpleMessages.put("linkExpirationFormatter.timePeriodUnit.minutes", "minutes-simple");
simpleMessages.put("linkExpirationFormatter.timePeriodUnit.hours", "hours-simple");
simpleMessages.put("linkExpirationFormatter.timePeriodUnit.days", "days-simple");
LinkExpirationFormatterMethod tested = new LinkExpirationFormatterMethod(simpleMessages, locale);
Assert.assertEquals("2 days-simple", tested.exec(toList(2 * 24 * 60)));
Assert.assertEquals("5 days-simple", tested.exec(toList(5 * 24 * 60)));
}
/**
* This ignored test conserves the code to translate the properties from Keycloak 22 and before to the new
* {@link java.text.ChoiceFormat}.
* The code appends the translated properties to the end of the file, and the user can then review the new properties and remove the old.
*/
@Ignore
@Test
public void convert() throws IOException {
String[] units = { "seconds", "minutes", "hours", "days"};
for (Path path : Files.list(Paths.get("../themes/src/main/resources-community/theme/base/email/messages" )).collect(Collectors.toList())) {
Properties p = new Properties();
p.load(Files.newBufferedReader(path, StandardCharsets.UTF_8));
FileWriter fw = new FileWriter(path.toFile(), true);
boolean firstEntry = true;
for (String unit : units) {
StringBuilder choicePattern = new StringBuilder();
String base = "linkExpirationFormatter.timePeriodUnit." + unit;
String defaultValue = p.getProperty(base);
if (defaultValue == null) {
continue;
}
choicePattern.append("{0,choice,0#").append(defaultValue).append("|");
int last = 0;
int entry = 0;
String previous = defaultValue;
for (int i = 0; i < 10; ++i) {
String value = p.getProperty(base + "." + i);
if (value != null) {
last = i;
if (!Objects.equals(value, previous)) {
entry = i;
previous = value;
choicePattern.append(i).append("#").append(value).append("|");
}
}
}
choicePattern.append(last).append("<").append(defaultValue).append("}");
if (entry == 0) {
choicePattern.setLength(0);
choicePattern.append(defaultValue);
}
choicePattern.insert(0, base + "=");
choicePattern.append("\n");
if (firstEntry) {
fw.write("\n");
firstEntry = false;
}
fw.write(choicePattern.toString());
}
fw.close();
}
}
} }

View file

@ -39,50 +39,10 @@ requiredAction.VERIFY_EMAIL=التحقق من البريد الإلكتروني
requiredAction.CONFIGURE_RECOVERY_AUTHN_CODES=توليد رموز مصادقة الاسترداد requiredAction.CONFIGURE_RECOVERY_AUTHN_CODES=توليد رموز مصادقة الاسترداد
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=ثانية linkExpirationFormatter.timePeriodUnit.seconds={0,choice,0#ثانية|3#ثواني|9<ثانية}
linkExpirationFormatter.timePeriodUnit.seconds.1=ثانية linkExpirationFormatter.timePeriodUnit.minutes={0,choice,0#دقيقة|3#دقائق|9<دقيقة}
linkExpirationFormatter.timePeriodUnit.seconds.2=ثانية linkExpirationFormatter.timePeriodUnit.hours={0,choice,0#ساعة|3#ساعات|9<ساعة}
linkExpirationFormatter.timePeriodUnit.seconds.3=ثواني linkExpirationFormatter.timePeriodUnit.days={0,choice,0#يوم|3#أيام|9<يوم}
linkExpirationFormatter.timePeriodUnit.seconds.4=ثواني
linkExpirationFormatter.timePeriodUnit.seconds.5=ثواني
linkExpirationFormatter.timePeriodUnit.seconds.6=ثواني
linkExpirationFormatter.timePeriodUnit.seconds.7=ثواني
linkExpirationFormatter.timePeriodUnit.seconds.8=ثواني
linkExpirationFormatter.timePeriodUnit.seconds.9=ثواني
linkExpirationFormatter.timePeriodUnit.seconds.10=ثواني
linkExpirationFormatter.timePeriodUnit.minutes=دقيقة
linkExpirationFormatter.timePeriodUnit.minutes.1=دقيقة
linkExpirationFormatter.timePeriodUnit.minutes.2=دقيقة
linkExpirationFormatter.timePeriodUnit.minutes.3=دقائق
linkExpirationFormatter.timePeriodUnit.minutes.4=دقائق
linkExpirationFormatter.timePeriodUnit.minutes.5=دقائق
linkExpirationFormatter.timePeriodUnit.minutes.6=دقائق
linkExpirationFormatter.timePeriodUnit.minutes.7=دقائق
linkExpirationFormatter.timePeriodUnit.minutes.8=دقائق
linkExpirationFormatter.timePeriodUnit.minutes.9=دقائق
linkExpirationFormatter.timePeriodUnit.minutes.10=دقائق
linkExpirationFormatter.timePeriodUnit.hours=ساعة
linkExpirationFormatter.timePeriodUnit.hours.1=ساعة
linkExpirationFormatter.timePeriodUnit.hours.2=ساعة
linkExpirationFormatter.timePeriodUnit.hours.3=ساعات
linkExpirationFormatter.timePeriodUnit.hours.4=ساعات
linkExpirationFormatter.timePeriodUnit.hours.5=ساعات
linkExpirationFormatter.timePeriodUnit.hours.6=ساعات
linkExpirationFormatter.timePeriodUnit.hours.7=ساعات
linkExpirationFormatter.timePeriodUnit.hours.8=ساعات
linkExpirationFormatter.timePeriodUnit.hours.9=ساعات
linkExpirationFormatter.timePeriodUnit.hours.10=ساعات
linkExpirationFormatter.timePeriodUnit.days=يوم
linkExpirationFormatter.timePeriodUnit.days.1=يوم
linkExpirationFormatter.timePeriodUnit.days.2=يوم
linkExpirationFormatter.timePeriodUnit.days.3=أيام
linkExpirationFormatter.timePeriodUnit.days.4=أيام
linkExpirationFormatter.timePeriodUnit.days.5=أيام
linkExpirationFormatter.timePeriodUnit.days.6=أيام
linkExpirationFormatter.timePeriodUnit.days.7=أيام
linkExpirationFormatter.timePeriodUnit.days.8=أيام
linkExpirationFormatter.timePeriodUnit.days.9=أيام
linkExpirationFormatter.timePeriodUnit.days.10=أيام
emailVerificationBodyCode=يرجى التحقق من عنوان بريدك الإلكتروني عن طريق إدخال الرمز التالي.\n\n{0}\n\n. emailVerificationBodyCode=يرجى التحقق من عنوان بريدك الإلكتروني عن طريق إدخال الرمز التالي.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p style="direction: rtl;">يرجى التحقق من عنوان بريدك الإلكتروني عن طريق إدخال الرمز التالي.</p><p style="direction: rtl;"><b>{0}</b></p> emailVerificationBodyCodeHtml=<p style="direction: rtl;">يرجى التحقق من عنوان بريدك الإلكتروني عن طريق إدخال الرمز التالي.</p><p style="direction: rtl;"><b>{0}</b></p>

View file

@ -35,26 +35,10 @@ requiredAction.UPDATE_PROFILE=Aktualizace profilu
requiredAction.VERIFY_EMAIL=Ověření e-mailu requiredAction.VERIFY_EMAIL=Ověření e-mailu
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=sekund linkExpirationFormatter.timePeriodUnit.seconds={0,choice,0#sekund|1#sekunda|2#sekundy|4<sekund}
linkExpirationFormatter.timePeriodUnit.seconds.1=sekunda linkExpirationFormatter.timePeriodUnit.minutes={0,choice,0#minut|1#minuta|2#minuty|4<minut}
linkExpirationFormatter.timePeriodUnit.seconds.2=sekundy linkExpirationFormatter.timePeriodUnit.hours={0,choice,0#hodin|1#hodina|2#hodiny|4<hodin}
linkExpirationFormatter.timePeriodUnit.seconds.3=sekundy linkExpirationFormatter.timePeriodUnit.days={0,choice,0#dní|1#den|2#dny|4<dní}
linkExpirationFormatter.timePeriodUnit.seconds.4=sekundy
linkExpirationFormatter.timePeriodUnit.minutes=minut
linkExpirationFormatter.timePeriodUnit.minutes.1=minuta
linkExpirationFormatter.timePeriodUnit.minutes.2=minuty
linkExpirationFormatter.timePeriodUnit.minutes.3=minuty
linkExpirationFormatter.timePeriodUnit.minutes.4=minuty
linkExpirationFormatter.timePeriodUnit.hours=hodin
linkExpirationFormatter.timePeriodUnit.hours.1=hodina
linkExpirationFormatter.timePeriodUnit.hours.2=hodiny
linkExpirationFormatter.timePeriodUnit.hours.3=hodiny
linkExpirationFormatter.timePeriodUnit.hours.4=hodiny
linkExpirationFormatter.timePeriodUnit.days=dní
linkExpirationFormatter.timePeriodUnit.days.1=den
linkExpirationFormatter.timePeriodUnit.days.2=dny
linkExpirationFormatter.timePeriodUnit.days.3=dny
linkExpirationFormatter.timePeriodUnit.days.4=dny
emailVerificationBodyCode=Ověřte prosím svou e-mailovou adresu zadáním následujícího kódu.\n\n{0}\n\n. emailVerificationBodyCode=Ověřte prosím svou e-mailovou adresu zadáním následujícího kódu.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>Ověřte prosím svou e-mailovou adresu zadáním následujícího kódu.</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>Ověřte prosím svou e-mailovou adresu zadáním následujícího kódu.</p><p><b>{0}</b></p>

View file

@ -35,14 +35,10 @@ requiredAction.UPDATE_PROFILE=Opdater Profil
requiredAction.VERIFY_EMAIL=Verificer Email requiredAction.VERIFY_EMAIL=Verificer Email
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=sekunder linkExpirationFormatter.timePeriodUnit.seconds={0,choice,0#sekunder|1#sekund|1<sekunder}
linkExpirationFormatter.timePeriodUnit.seconds.1=sekund linkExpirationFormatter.timePeriodUnit.minutes={0,choice,0#minutter|1#minut|1<minutter}
linkExpirationFormatter.timePeriodUnit.minutes=minutter linkExpirationFormatter.timePeriodUnit.hours={0,choice,0#timer|1#time|1<timer}
linkExpirationFormatter.timePeriodUnit.minutes.1=minut linkExpirationFormatter.timePeriodUnit.days={0,choice,0#dage|1#dag|1<dage}
linkExpirationFormatter.timePeriodUnit.hours=timer
linkExpirationFormatter.timePeriodUnit.hours.1=time
linkExpirationFormatter.timePeriodUnit.days=dage
linkExpirationFormatter.timePeriodUnit.days.1=dag
emailVerificationBodyCode=Verificer din email adresse ved at indtaste følgende kode.\n\n{0}\n\n. emailVerificationBodyCode=Verificer din email adresse ved at indtaste følgende kode.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>Verificer din email adresse ved at indtaste følgende kode.</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>Verificer din email adresse ved at indtaste følgende kode.</p><p><b>{0}</b></p>

View file

@ -35,14 +35,10 @@ requiredAction.UPDATE_PROFILE=Profil aktualisieren
requiredAction.VERIFY_EMAIL=E-Mail-Adresse verifizieren requiredAction.VERIFY_EMAIL=E-Mail-Adresse verifizieren
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=Sekunden linkExpirationFormatter.timePeriodUnit.seconds={0,choice,0#Sekunden|1#Sekunde|1<Sekunden}
linkExpirationFormatter.timePeriodUnit.seconds.1=Sekunde linkExpirationFormatter.timePeriodUnit.minutes={0,choice,0#Minuten|1#Minute|1<Minuten}
linkExpirationFormatter.timePeriodUnit.minutes=Minuten linkExpirationFormatter.timePeriodUnit.hours={0,choice,0#Stunden|1#Stunde|1<Stunden}
linkExpirationFormatter.timePeriodUnit.minutes.1=Minute linkExpirationFormatter.timePeriodUnit.days={0,choice,0#Tage|1#Tag|1<Tage}
linkExpirationFormatter.timePeriodUnit.hours=Stunden
linkExpirationFormatter.timePeriodUnit.hours.1=Stunde
linkExpirationFormatter.timePeriodUnit.days=Tage
linkExpirationFormatter.timePeriodUnit.days.1=Tag
emailVerificationBodyCode=Bitte verifizieren Sie Ihre E-Mail-Adresse, indem Sie den folgenden Code eingeben.\n\n{0}\n\n. emailVerificationBodyCode=Bitte verifizieren Sie Ihre E-Mail-Adresse, indem Sie den folgenden Code eingeben.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>Bitte verifizieren Sie Ihre E-Mail-Adresse, indem Sie den folgenden Code eingeben.</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>Bitte verifizieren Sie Ihre E-Mail-Adresse, indem Sie den folgenden Code eingeben.</p><p><b>{0}</b></p>

View file

@ -16,20 +16,13 @@ emailUpdateConfirmationBodyHtml=<p>Για να ενημερώσετε το λο
emailUpdateConfirmationBody=Για να ενημερώσετε το λογαριασμό σας {2} με διεύθυνση email {1}, πατήστε το σύνδεσμο παρακάτω\n\n{0}\n\nΟ σύνδεσμος θα λήξει σε {3}.\n\nΑν δεν θέλετε να προχωρήσετε με αυτή την αλλαγή, τότε αγνοήστε αυτό το μήνυμα. emailUpdateConfirmationBody=Για να ενημερώσετε το λογαριασμό σας {2} με διεύθυνση email {1}, πατήστε το σύνδεσμο παρακάτω\n\n{0}\n\nΟ σύνδεσμος θα λήξει σε {3}.\n\nΑν δεν θέλετε να προχωρήσετε με αυτή την αλλαγή, τότε αγνοήστε αυτό το μήνυμα.
emailVerificationBodyCode=Παρακαλώ επιβεβαιώστε τη διεύθυνση email σας, εισάγοντας το παρακάτω κωδικό.\n\n{0}\n\n. emailVerificationBodyCode=Παρακαλώ επιβεβαιώστε τη διεύθυνση email σας, εισάγοντας το παρακάτω κωδικό.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>Παρακαλώ επιβεβαιώστε τη διεύθυνση email σας, εισάγοντας το παρακάτω κωδικό.</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>Παρακαλώ επιβεβαιώστε τη διεύθυνση email σας, εισάγοντας το παρακάτω κωδικό.</p><p><b>{0}</b></p>
linkExpirationFormatter.timePeriodUnit.days.1=μέρα
linkExpirationFormatter.timePeriodUnit.days=μέρες
linkExpirationFormatter.timePeriodUnit.hours.1=ώρα
#for language which have more unit plural forms depending on the value (eg. Czech and other Slavic langs) you can override unit text for some other values like this:
#linkExpirationFormatter.timePeriodUnit.minutes.2=minuty
#linkExpirationFormatter.timePeriodUnit.minutes.3=minuty
#linkExpirationFormatter.timePeriodUnit.minutes.4=minuty
linkExpirationFormatter.timePeriodUnit.hours=ώρες
linkExpirationFormatter.timePeriodUnit.minutes.1=λεπτό
linkExpirationFormatter.timePeriodUnit.minutes=λεπτά
linkExpirationFormatter.timePeriodUnit.seconds.1=δευτερόλεπτο
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=δευτερόλεπτα linkExpirationFormatter.timePeriodUnit.seconds={0,choice,0#δευτερόλεπτα|1#δευτερόλεπτο|1<δευτερόλεπτα}
linkExpirationFormatter.timePeriodUnit.minutes={0,choice,0#λεπτά|1#λεπτό|1<λεπτά}
linkExpirationFormatter.timePeriodUnit.hours={0,choice,0#ώρες|1#ώρα|1<ώρες}
linkExpirationFormatter.timePeriodUnit.days={0,choice,0#μέρες|1#μέρα|1<μέρες}
eventUpdateTotpBodyHtml=<p>Η πρόσβαση μέσω OTP ενημερώθηκε στο λογαριασμό σας στις {0} από το {1}. Αν δεν είσαστε εσείς, τότε παρακαλώ επικοινωνήστε με ένα διαχειριστή.</p> eventUpdateTotpBodyHtml=<p>Η πρόσβαση μέσω OTP ενημερώθηκε στο λογαριασμό σας στις {0} από το {1}. Αν δεν είσαστε εσείς, τότε παρακαλώ επικοινωνήστε με ένα διαχειριστή.</p>
eventUpdateTotpBody=Η πρόσβαση μέσω OTP ενημερώθηκε στο λογαριασμό σας στις {0} από το {1}. Αν δεν είσαστε εσείς, τότε παρακαλώ επικοινωνήστε με ένα διαχειριστή. eventUpdateTotpBody=Η πρόσβαση μέσω OTP ενημερώθηκε στο λογαριασμό σας στις {0} από το {1}. Αν δεν είσαστε εσείς, τότε παρακαλώ επικοινωνήστε με ένα διαχειριστή.
eventUpdateTotpSubject=Ενημέρωση OTP eventUpdateTotpSubject=Ενημέρωση OTP

View file

@ -51,3 +51,8 @@ linkExpirationFormatter.timePeriodUnit.days.1=روز
emailVerificationBodyCode=لطفاً آدرس ایمیل خود را با وارد کردن کد زیر تأیید کنید.\n\n{0}\n\n. emailVerificationBodyCode=لطفاً آدرس ایمیل خود را با وارد کردن کد زیر تأیید کنید.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>لطفاً آدرس ایمیل خود را با وارد کردن کد زیر تأیید کنید.</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>لطفاً آدرس ایمیل خود را با وارد کردن کد زیر تأیید کنید.</p><p><b>{0}</b></p>
linkExpirationFormatter.timePeriodUnit.seconds=ثانیه
linkExpirationFormatter.timePeriodUnit.minutes=دقیقه
linkExpirationFormatter.timePeriodUnit.hours=ساعت
linkExpirationFormatter.timePeriodUnit.days=روز

View file

@ -34,14 +34,10 @@ requiredAction.UPDATE_PROFILE=Päivitä profiili
requiredAction.VERIFY_EMAIL=Vahvista sähköposti requiredAction.VERIFY_EMAIL=Vahvista sähköposti
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=sekuntia linkExpirationFormatter.timePeriodUnit.seconds={0,choice,0#sekuntia|1#sekunti|1<sekuntia}
linkExpirationFormatter.timePeriodUnit.seconds.1=sekunti linkExpirationFormatter.timePeriodUnit.minutes={0,choice,0#minuuttia|1#minuutti|1<minuuttia}
linkExpirationFormatter.timePeriodUnit.minutes=minuuttia linkExpirationFormatter.timePeriodUnit.hours={0,choice,0#tuntia|1#tunti|1<tuntia}
linkExpirationFormatter.timePeriodUnit.minutes.1=minuutti linkExpirationFormatter.timePeriodUnit.days={0,choice,0#päivää|1#päivä|1<päivää}
linkExpirationFormatter.timePeriodUnit.hours=tuntia
linkExpirationFormatter.timePeriodUnit.hours.1=tunti
linkExpirationFormatter.timePeriodUnit.days=päivää
linkExpirationFormatter.timePeriodUnit.days.1=päivä
emailVerificationBodyCode=Ole hyvä ja vahvista sähköpostiosoitteesi alla olevalla koodilla.\n\n{0}\n\n. emailVerificationBodyCode=Ole hyvä ja vahvista sähköpostiosoitteesi alla olevalla koodilla.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>Ole hyvä ja vahvista sähköpostiosoitteesi alla olevalla koodilla.</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>Ole hyvä ja vahvista sähköpostiosoitteesi alla olevalla koodilla.</p><p><b>{0}</b></p>

View file

@ -35,14 +35,11 @@ requiredAction.UPDATE_PROFILE=Mise à jour du profile
requiredAction.VERIFY_EMAIL=Vérification de l''adresse courriel requiredAction.VERIFY_EMAIL=Vérification de l''adresse courriel
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=secondes linkExpirationFormatter.timePeriodUnit.seconds={0,choice,0#secondes|1#seconde|1<secondes}
linkExpirationFormatter.timePeriodUnit.seconds.1=seconde linkExpirationFormatter.timePeriodUnit.minutes={0,choice,0#minutes|1#minute|1<minutes}
linkExpirationFormatter.timePeriodUnit.minutes=minutes linkExpirationFormatter.timePeriodUnit.hours={0,choice,0#heures|1#heure|1<heures}
linkExpirationFormatter.timePeriodUnit.minutes.1=minute linkExpirationFormatter.timePeriodUnit.days={0,choice,0#jours|1#jour|1<jours}
linkExpirationFormatter.timePeriodUnit.hours=heures
linkExpirationFormatter.timePeriodUnit.hours.1=heure
linkExpirationFormatter.timePeriodUnit.days=jours
linkExpirationFormatter.timePeriodUnit.days.1=jour
emailVerificationBodyCode=Veuillez vérifier votre adresse de courriel en saisissant le code suivant.\n\n{0}\n\n. emailVerificationBodyCode=Veuillez vérifier votre adresse de courriel en saisissant le code suivant.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>Veuillez vérifier votre adresse de courriel en saisissant le code suivant.</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>Veuillez vérifier votre adresse de courriel en saisissant le code suivant.</p><p><b>{0}</b></p>

View file

@ -46,3 +46,8 @@ linkExpirationFormatter.timePeriodUnit.days.1=nap
emailVerificationBodyCode=Kérem erősítse meg az email címét a következő kód megadásával.\n\n{0}\n\n. emailVerificationBodyCode=Kérem erősítse meg az email címét a következő kód megadásával.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>Kérem erősítse meg az email címét a következő kód megadásával.</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>Kérem erősítse meg az email címét a következő kód megadásával.</p><p><b>{0}</b></p>
linkExpirationFormatter.timePeriodUnit.seconds=másodperc
linkExpirationFormatter.timePeriodUnit.minutes=perc
linkExpirationFormatter.timePeriodUnit.hours=óra
linkExpirationFormatter.timePeriodUnit.days=nap

View file

@ -35,18 +35,11 @@ requiredAction.UPDATE_PROFILE=Aggiornamento profilo
requiredAction.VERIFY_EMAIL=Verifica dell''indirizzo email requiredAction.VERIFY_EMAIL=Verifica dell''indirizzo email
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=secondi linkExpirationFormatter.timePeriodUnit.seconds={0,choice,0#secondi|1#secondo|1<secondi}
linkExpirationFormatter.timePeriodUnit.seconds.1=secondo linkExpirationFormatter.timePeriodUnit.minutes={0,choice,0#minuti|1#minuto|1<minuti}
linkExpirationFormatter.timePeriodUnit.minutes=minuti linkExpirationFormatter.timePeriodUnit.hours={0,choice,0#ore|1#ora|1<ore}
linkExpirationFormatter.timePeriodUnit.minutes.1=minuto linkExpirationFormatter.timePeriodUnit.days={0,choice,0#giorni|1#giorno|1<giorni}
#for language which have more unit plural forms depending on the value (eg. Czech and other Slavic langs) you can override unit text for some other values like this:
#linkExpirationFormatter.timePeriodUnit.minutes.2=minuty
#linkExpirationFormatter.timePeriodUnit.minutes.3=minuty
#linkExpirationFormatter.timePeriodUnit.minutes.4=minuty
linkExpirationFormatter.timePeriodUnit.hours=ore
linkExpirationFormatter.timePeriodUnit.hours.1=ora
linkExpirationFormatter.timePeriodUnit.days=giorni
linkExpirationFormatter.timePeriodUnit.days.1=giorno
emailVerificationBodyCode=Per favore verifica il tuo indirizzo email inserendo il codice seguente.\n\n{0}\n\n. emailVerificationBodyCode=Per favore verifica il tuo indirizzo email inserendo il codice seguente.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>Per favore verifica il tuo indirizzo email inserendo il codice seguente.</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>Per favore verifica il tuo indirizzo email inserendo il codice seguente.</p><p><b>{0}</b></p>

View file

@ -36,17 +36,9 @@ requiredAction.VERIFY_EMAIL=Eメールの確認
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds= linkExpirationFormatter.timePeriodUnit.seconds=
linkExpirationFormatter.timePeriodUnit.seconds.1=
linkExpirationFormatter.timePeriodUnit.minutes= linkExpirationFormatter.timePeriodUnit.minutes=
linkExpirationFormatter.timePeriodUnit.minutes.1=
#for language which have more unit plural forms depending on the value (eg. Czech and other Slavic langs) you can override unit text for some other values like this:
#linkExpirationFormatter.timePeriodUnit.minutes.2=minuty
#linkExpirationFormatter.timePeriodUnit.minutes.3=minuty
#linkExpirationFormatter.timePeriodUnit.minutes.4=minuty
linkExpirationFormatter.timePeriodUnit.hours=時間 linkExpirationFormatter.timePeriodUnit.hours=時間
linkExpirationFormatter.timePeriodUnit.hours.1=時間
linkExpirationFormatter.timePeriodUnit.days= linkExpirationFormatter.timePeriodUnit.days=
linkExpirationFormatter.timePeriodUnit.days.1=
emailVerificationBodyCode=次のコードを入力してメールアドレスを確認してください。\n\n{0}\n\n. emailVerificationBodyCode=次のコードを入力してメールアドレスを確認してください。\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>次のコードを入力してメールアドレスを確認してください。</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>次のコードを入力してメールアドレスを確認してください。</p><p><b>{0}</b></p>

View file

@ -30,11 +30,7 @@ eventUpdateTotpBodyHtml=<p>OTP is gewijzigd voor uw account om {0} door {1}. Als
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=seconden linkExpirationFormatter.timePeriodUnit.seconds={0,choice,0#seconden|1#seconde|1<seconden}
linkExpirationFormatter.timePeriodUnit.seconds.1=seconde linkExpirationFormatter.timePeriodUnit.minutes={0,choice,0#minuten|1#minuut|1<minuten}
linkExpirationFormatter.timePeriodUnit.minutes=minuten
linkExpirationFormatter.timePeriodUnit.minutes.1=minuut
linkExpirationFormatter.timePeriodUnit.hours=uur linkExpirationFormatter.timePeriodUnit.hours=uur
linkExpirationFormatter.timePeriodUnit.hours.1=uur linkExpirationFormatter.timePeriodUnit.days={0,choice,0#dagen|1#dag|1<dagen}
linkExpirationFormatter.timePeriodUnit.days=dagen
linkExpirationFormatter.timePeriodUnit.days.1=dag

View file

@ -35,23 +35,11 @@ requiredAction.UPDATE_PROFILE=Aktualizacja profilu
requiredAction.VERIFY_EMAIL=Weryfikacja adresu e-mail requiredAction.VERIFY_EMAIL=Weryfikacja adresu e-mail
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=sekund linkExpirationFormatter.timePeriodUnit.seconds={0,choice,0#sekund|1#sekunda|2#sekundy|4<sekund}
linkExpirationFormatter.timePeriodUnit.seconds.1=sekunda linkExpirationFormatter.timePeriodUnit.minutes={0,choice,0#minut|1#minuta|2#minuty|4<minut}
linkExpirationFormatter.timePeriodUnit.seconds.2=sekundy linkExpirationFormatter.timePeriodUnit.hours={0,choice,0#godzin|1#godzina|2#godziny|4<godzin}
linkExpirationFormatter.timePeriodUnit.seconds.3=sekundy linkExpirationFormatter.timePeriodUnit.days={0,choice,0#dni|1#dzień|1<dni}
linkExpirationFormatter.timePeriodUnit.seconds.4=sekundy
linkExpirationFormatter.timePeriodUnit.minutes=minut
linkExpirationFormatter.timePeriodUnit.minutes.1=minuta
linkExpirationFormatter.timePeriodUnit.minutes.2=minuty
linkExpirationFormatter.timePeriodUnit.minutes.3=minuty
linkExpirationFormatter.timePeriodUnit.minutes.4=minuty
linkExpirationFormatter.timePeriodUnit.hours=godzin
linkExpirationFormatter.timePeriodUnit.hours.1=godzina
linkExpirationFormatter.timePeriodUnit.hours.2=godziny
linkExpirationFormatter.timePeriodUnit.hours.3=godziny
linkExpirationFormatter.timePeriodUnit.hours.4=godziny
linkExpirationFormatter.timePeriodUnit.days=dni
linkExpirationFormatter.timePeriodUnit.days.1=dzień
emailVerificationBodyCode=Potwierdź proszę swój adres e-mail wprowadzając następujący kod.\n\n{0}\n\n. emailVerificationBodyCode=Potwierdź proszę swój adres e-mail wprowadzając następujący kod.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>Potwierdź proszę swój adres e-mail, wprowadzając następujący kod.</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>Potwierdź proszę swój adres e-mail, wprowadzając następujący kod.</p><p><b>{0}</b></p>

View file

@ -35,18 +35,10 @@ requiredAction.UPDATE_PROFILE=Atualizar Perfil
requiredAction.VERIFY_EMAIL=Verificar Endereço de E-mail requiredAction.VERIFY_EMAIL=Verificar Endereço de E-mail
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=segundos linkExpirationFormatter.timePeriodUnit.seconds={0,choice,0#segundos|1#segundo|1<segundos}
linkExpirationFormatter.timePeriodUnit.seconds.1=segundo linkExpirationFormatter.timePeriodUnit.minutes={0,choice,0#minutos|1#minuto|1<minutos}
linkExpirationFormatter.timePeriodUnit.minutes=minutos linkExpirationFormatter.timePeriodUnit.hours={0,choice,0#horas|1#hora|1<horas}
linkExpirationFormatter.timePeriodUnit.minutes.1=minuto linkExpirationFormatter.timePeriodUnit.days={0,choice,0#dias|1#dia|1<dias}
#for language which have more unit plural forms depending on the value (eg. Czech and other Slavic langs) you can override unit text for some other values like this:
#linkExpirationFormatter.timePeriodUnit.minutes.2=minuty
#linkExpirationFormatter.timePeriodUnit.minutes.3=minuty
#linkExpirationFormatter.timePeriodUnit.minutes.4=minuty
linkExpirationFormatter.timePeriodUnit.hours=horas
linkExpirationFormatter.timePeriodUnit.hours.1=hora
linkExpirationFormatter.timePeriodUnit.days=dias
linkExpirationFormatter.timePeriodUnit.days.1=dia
emailVerificationBodyCode=Verifique o seu endereço de e-mail inserindo o seguinte código.\n\n{0}\n\n. emailVerificationBodyCode=Verifique o seu endereço de e-mail inserindo o seguinte código.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>Verifique o seu endereço de e-mail inserindo o seguinte código.</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>Verifique o seu endereço de e-mail inserindo o seguinte código.</p><p><b>{0}</b></p>

View file

@ -35,26 +35,8 @@ requiredAction.UPDATE_PROFILE=Aktualizovať profil
requiredAction.VERIFY_EMAIL=Overiť e-mail requiredAction.VERIFY_EMAIL=Overiť e-mail
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=sekúnd linkExpirationFormatter.timePeriodUnit.seconds={0,choice,0#sekúnd|1#sekunda|2#sekundy|4<sekúnd}
linkExpirationFormatter.timePeriodUnit.seconds.1=sekunda linkExpirationFormatter.timePeriodUnit.minutes={0,choice,0#minút|1#minúta|2#minúty|4<minút}
linkExpirationFormatter.timePeriodUnit.seconds.2=sekundy linkExpirationFormatter.timePeriodUnit.hours={0,choice,0#hodín|1#hodina|2#hodiny|4<hodín}
linkExpirationFormatter.timePeriodUnit.seconds.3=sekundy linkExpirationFormatter.timePeriodUnit.days={0,choice,0#dní|1#deň|2#dni|4<dní}
linkExpirationFormatter.timePeriodUnit.seconds.4=sekundy
linkExpirationFormatter.timePeriodUnit.minutes=minút
linkExpirationFormatter.timePeriodUnit.minutes.1=minúta
linkExpirationFormatter.timePeriodUnit.minutes.2=minúty
linkExpirationFormatter.timePeriodUnit.minutes.3=minúty
linkExpirationFormatter.timePeriodUnit.minutes.4=minúty
linkExpirationFormatter.timePeriodUnit.hours=hodín
linkExpirationFormatter.timePeriodUnit.hours.1=hodina
linkExpirationFormatter.timePeriodUnit.hours.2=hodiny
linkExpirationFormatter.timePeriodUnit.hours.3=hodiny
linkExpirationFormatter.timePeriodUnit.hours.4=hodiny
linkExpirationFormatter.timePeriodUnit.days=dní
linkExpirationFormatter.timePeriodUnit.days.1=deň
linkExpirationFormatter.timePeriodUnit.days.2=dni
linkExpirationFormatter.timePeriodUnit.days.3=dni
linkExpirationFormatter.timePeriodUnit.days.4=dni

View file

@ -36,17 +36,9 @@ requiredAction.VERIFY_EMAIL=E-mail doğrula
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=saniye linkExpirationFormatter.timePeriodUnit.seconds=saniye
linkExpirationFormatter.timePeriodUnit.seconds.1=saniye
linkExpirationFormatter.timePeriodUnit.minutes=dakika linkExpirationFormatter.timePeriodUnit.minutes=dakika
linkExpirationFormatter.timePeriodUnit.minutes.1=dakika
#for language which have more unit plural forms depending on the value (eg. Czech and other Slavic langs) you can override unit text for some other values like this:
#linkExpirationFormatter.timePeriodUnit.minutes.2=minuty
#linkExpirationFormatter.timePeriodUnit.minutes.3=minuty
#linkExpirationFormatter.timePeriodUnit.minutes.4=minuty
linkExpirationFormatter.timePeriodUnit.hours=saat linkExpirationFormatter.timePeriodUnit.hours=saat
linkExpirationFormatter.timePeriodUnit.hours.1=saat
linkExpirationFormatter.timePeriodUnit.days=gün linkExpirationFormatter.timePeriodUnit.days=gün
linkExpirationFormatter.timePeriodUnit.days.1=gün
emailVerificationBodyCode=Lütfen aşağıdaki kodu girerek e-posta adresinizi doğrulayın.\n\n{0}\n\n. emailVerificationBodyCode=Lütfen aşağıdaki kodu girerek e-posta adresinizi doğrulayın.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>Lütfen aşağıdaki kodu girerek e-posta adresinizi doğrulayın.</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>Lütfen aşağıdaki kodu girerek e-posta adresinizi doğrulayın.</p><p><b>{0}</b></p>

View file

@ -39,18 +39,13 @@ requiredAction.VERIFY_EMAIL=Verify Email
requiredAction.CONFIGURE_RECOVERY_AUTHN_CODES=Generate Recovery Codes requiredAction.CONFIGURE_RECOVERY_AUTHN_CODES=Generate Recovery Codes
# units for link expiration timeout formatting # units for link expiration timeout formatting
linkExpirationFormatter.timePeriodUnit.seconds=seconds # for languages which have more unit plural forms depending on the value (eg. Czech and other Slavic langs) you can override unit text for some other values like described in the Java choice format which is documented here. For Czech, it would be '{0,choice,0#minut|1#minuta|2#minuty|2<minut}'
linkExpirationFormatter.timePeriodUnit.seconds.1=second # https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/text/MessageFormat.html
linkExpirationFormatter.timePeriodUnit.minutes=minutes # https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/text/ChoiceFormat.html
linkExpirationFormatter.timePeriodUnit.minutes.1=minute linkExpirationFormatter.timePeriodUnit.seconds={0,choice,0#seconds|1#second|1<seconds}
#for language which have more unit plural forms depending on the value (eg. Czech and other Slavic langs) you can override unit text for some other values like this: linkExpirationFormatter.timePeriodUnit.minutes={0,choice,0#minutes|1#minute|1<minutes}
#linkExpirationFormatter.timePeriodUnit.minutes.2=minuty linkExpirationFormatter.timePeriodUnit.hours={0,choice,0#hours|1#hour|1<hours}
#linkExpirationFormatter.timePeriodUnit.minutes.3=minuty linkExpirationFormatter.timePeriodUnit.days={0,choice,0#days|1#day|1<days}
#linkExpirationFormatter.timePeriodUnit.minutes.4=minuty
linkExpirationFormatter.timePeriodUnit.hours=hours
linkExpirationFormatter.timePeriodUnit.hours.1=hour
linkExpirationFormatter.timePeriodUnit.days=days
linkExpirationFormatter.timePeriodUnit.days.1=day
emailVerificationBodyCode=Please verify your email address by entering in the following code.\n\n{0}\n\n. emailVerificationBodyCode=Please verify your email address by entering in the following code.\n\n{0}\n\n.
emailVerificationBodyCodeHtml=<p>Please verify your email address by entering in the following code.</p><p><b>{0}</b></p> emailVerificationBodyCodeHtml=<p>Please verify your email address by entering in the following code.</p><p><b>{0}</b></p>