-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
26 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
### 0.0.2 | ||
|
||
- support accessing attributes on fluent segment using keys like `login.placeholder` | ||
|
||
### 0.0.1 | ||
|
||
- initial version |
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
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,13 +35,16 @@ describe('fluent format', () => { | |
|
||
it('should parse', () => { | ||
const res = fluent.getResource('en', 'translations', 'logout') | ||
expect(fluent.parse(res, {}, 'en', 'translations')).to.eql('Logout'); | ||
expect(fluent.parse(res, {}, 'en', 'translations', 'logout')).to.eql('Logout'); | ||
|
||
const res2 = fluent.getResource('en', 'translations', 'hello') | ||
expect(fluent.parse(res2, { name: 'Jan' }, 'en', 'translations')).to.eql('Hello Jan.'); | ||
expect(fluent.parse(res2, { name: 'Jan' }, 'en', 'translations', 'hello')).to.eql('Hello Jan.'); | ||
|
||
const res3 = fluent.getResource('en', 'translations', 'restart-app') | ||
expect(fluent.parse(res3, {}, 'en', 'translations')).to.eql('Zrestartuj Firefoxa.'); | ||
expect(fluent.parse(res3, {}, 'en', 'translations', 'restart-app')).to.eql('Zrestartuj Firefoxa.'); | ||
|
||
const res4 = fluent.getResource('en', 'translations', 'login.placeholder') | ||
expect(fluent.parse(res4, {}, 'en', 'translations', 'login.placeholder')).to.eql('[email protected]'); | ||
}); | ||
|
||
}); | ||
|
@@ -67,6 +70,7 @@ describe('fluent format', () => { | |
expect(i18next.t('logout')).to.eql('Logout'); | ||
expect(i18next.t('hello', { name: 'Jan' })).to.eql('Hello Jan.'); | ||
expect(i18next.t('restart-app')).to.eql('Zrestartuj Firefoxa.'); | ||
expect(i18next.t('login.placeholder')).to.eql('[email protected]'); | ||
}); | ||
|
||
}); | ||
|