Skip to content

Commit

Permalink
fix Japanese translation of max-items, lt-items and lte-items error
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomoki108 committed Apr 14, 2024
1 parent a0f74b0 commit dd22b67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions translations/ja/ja.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func RegisterDefaultTranslations(v *validator.Validate, trans ut.Translator) (er
return
}

if err = ut.Add("max-items", "{0}は最大でも{1}を含まなければなりません", false); err != nil {
if err = ut.Add("max-items", "{0}は最大でも{1}でなければなりません", false); err != nil {
return
}
// if err = ut.AddCardinal("max-items-item", "{0}つの項目", locales.PluralRuleOne, false); err != nil {
Expand Down Expand Up @@ -405,7 +405,7 @@ func RegisterDefaultTranslations(v *validator.Validate, trans ut.Translator) (er
return
}

if err = ut.Add("lt-items", "{0}は{1}よりも少ない項目を含まなければなりません", false); err != nil {
if err = ut.Add("lt-items", "{0}は{1}よりも少ない項目でなければなりません", false); err != nil {
return
}

Expand Down Expand Up @@ -525,7 +525,7 @@ func RegisterDefaultTranslations(v *validator.Validate, trans ut.Translator) (er
return
}

if err = ut.Add("lte-items", "{0}は最大でも{1}を含まなければなりません", false); err != nil {
if err = ut.Add("lte-items", "{0}は最大でも{1}でなければなりません", false); err != nil {
return
}

Expand Down
6 changes: 3 additions & 3 deletions translations/ja/ja_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ func TestTranslations(t *testing.T) {
},
{
ns: "Test.LteMultiple",
expected: "LteMultipleは最大でも2つの項目を含まなければなりません",
expected: "LteMultipleは最大でも2つの項目でなければなりません",
},
{
ns: "Test.LteTime",
Expand All @@ -534,7 +534,7 @@ func TestTranslations(t *testing.T) {
},
{
ns: "Test.LtMultiple",
expected: "LtMultipleは2つの項目よりも少ない項目を含まなければなりません",
expected: "LtMultipleは2つの項目よりも少ない項目でなければなりません",
},
{
ns: "Test.LtTime",
Expand Down Expand Up @@ -574,7 +574,7 @@ func TestTranslations(t *testing.T) {
},
{
ns: "Test.MaxMultiple",
expected: "MaxMultipleは最大でも7つの項目を含まなければなりません",
expected: "MaxMultipleは最大でも7つの項目でなければなりません",
},
{
ns: "Test.MinString",
Expand Down

0 comments on commit dd22b67

Please sign in to comment.