-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bump v9.2.5 * Fix "*.validate.customMessage" translations (#217) * chore(browserslist): run `npx browserslist@latest --update-db` * fix(i18n): patch Component properties with 'validate.customMessage' getterr * fix(i18n): surface key.errorLabel strings from the API * fix(i18n): rework error message translations rename patch function, move tests from patch.js to translation.js, and translate key.errorLabel in built-in messages * fix(i18n): fall back errorLabel to placeholder, label, key * fix(i18n): add zh "required" translation Co-authored-by: Nicole Lee <nlsfds@users.noreply.github.com> * chore: delete unused translations.json * chore(npm): delete unused "update-translations" npm script * chore(optimize): remove .class-debug styles * chore: delete _debug.scss * chore(tests): add tests for mergeObjects(), Chinese "required" translation * feat(i18n): add "Get started" translations * chore(tests): add more translation smoke tests * chore(tests): fix up some more i18n tests * fix(i18n): refactor translation resolution Co-authored-by: Nicole Lee <nlsfds@users.noreply.github.com> Co-authored-by: shawnbot <shawnbot@users.noreply.github.com> Co-authored-by: Nicole Lee <nlsfds@users.noreply.github.com>
- Loading branch information
1 parent
4bc80fc
commit 91d6208
Showing
13 changed files
with
269 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* eslint-env jest */ | ||
import { mergeObjects } from '../src/utils' | ||
|
||
describe('mergeObjects()', () => { | ||
it('merges deeply', () => { | ||
expect(mergeObjects({ | ||
one: 1, | ||
two: { | ||
three: 3 | ||
} | ||
}, { | ||
four: 4, | ||
two: { | ||
five: 5 | ||
} | ||
})).toEqual({ | ||
one: 1, | ||
two: { | ||
three: 3, | ||
five: 5 | ||
}, | ||
four: 4 | ||
}) | ||
}) | ||
|
||
it('preserves keys in the original object', () => { | ||
expect(mergeObjects({ | ||
i18n: { | ||
zh: { | ||
original: 'original' | ||
} | ||
} | ||
}, { | ||
i18n: { | ||
zh: { | ||
other: 'other' | ||
} | ||
} | ||
})).toEqual({ | ||
i18n: { | ||
zh: { | ||
original: 'original', | ||
other: 'other' | ||
} | ||
} | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.