Skip to content

Commit

Permalink
fix for lv
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed May 25, 2024
1 parent 54ada29 commit ff8477a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion licence
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022 i18next
Copyright (c) 2024 i18next

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ const sets = [
},
{
lngs: ['lv'],
toCldr: { _2: 0, _0: 1, _1: 0 },
fromCldr: { 0: '_1', 1: '_0', 5: '_1' }
toCldr: { _2: 0, _0: 1, _1: 5 },
fromCldr: { 0: '_2', 1: '_0', 5: '_1' }
},
{
lngs: ['mk'],
Expand Down
13 changes: 13 additions & 0 deletions test/converter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,18 @@ describe('converter - transformNamespace', () => {
}
const new4 = transformNamespace('ja', old4)
should(new4).eql(expectedNew4)

const old5 = {
myKey_0: 'one key',
myKey_1: 'other {{count}} keys',
myKey_2: 'no keys'
}
const expectedNew5 = {
myKey_one: 'one key',
myKey_other: 'other {{count}} keys',
myKey_zero: 'no keys'
}
const new5 = transformNamespace('lv', old5)
should(new5).eql(expectedNew5)
})
})

0 comments on commit ff8477a

Please sign in to comment.