FIX: Pluralisation for short password count (#27342)

Followup 0434112aa7,
when I introduced the pluralisation for the
password.too_short message I didn't change the
key name to `count`, which is necessary.
This commit is contained in:
Martin Brennan 2024-06-05 16:20:48 +10:00 committed by GitHub
parent 0434112aa7
commit 748240ce3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -82,7 +82,7 @@ export default Mixin.create({
return EmberObject.create( return EmberObject.create(
Object.assign(failedAttrs, { Object.assign(failedAttrs, {
reason: I18n.t("user.password.too_short", { reason: I18n.t("user.password.too_short", {
password_min_length: passwordMinLength, count: passwordMinLength,
}), }),
}) })
); );

View File

@ -79,7 +79,7 @@ acceptance("Password Reset", function (needs) {
assert.ok( assert.ok(
query(".password-reset .tip.bad").innerHTML.includes( query(".password-reset .tip.bad").innerHTML.includes(
I18n.t("user.password.too_short", { I18n.t("user.password.too_short", {
password_min_length: this.siteSettings.min_password_length, count: this.siteSettings.min_password_length,
}) })
), ),
"password too short" "password too short"

View File

@ -81,7 +81,7 @@ module("Unit | Component | create-account", function (hooks) {
testInvalidPassword( testInvalidPassword(
"x", "x",
I18n.t("user.password.too_short", { I18n.t("user.password.too_short", {
password_min_length: siteSettings.min_password_length, count: siteSettings.min_password_length,
}) })
); );
testInvalidPassword( testInvalidPassword(

View File

@ -1936,8 +1936,8 @@ en:
password: password:
title: "Password" title: "Password"
too_short: too_short:
one: "Your password is too short (minimum is %{password_min_length} character)." one: "Your password is too short (minimum is %{count} character)."
other: "Your password is too short (minimum is %{password_min_length} characters)." other: "Your password is too short (minimum is %{count} characters)."
common: "That password is too common." common: "That password is too common."
same_as_username: "Your password is the same as your username." same_as_username: "Your password is the same as your username."
same_as_email: "Your password is the same as your email." same_as_email: "Your password is the same as your email."