Use ICU number/plural formatting
This commit is contained in:
@@ -38,13 +38,11 @@ describe('setupI18n', () => {
|
||||
);
|
||||
});
|
||||
it('returns a modern icu message formatted', () => {
|
||||
const actual = i18n('icu:ProfileEditor--info', {
|
||||
learnMore: 'LEARN MORE',
|
||||
});
|
||||
assert.equal(
|
||||
actual,
|
||||
'Your profile is encrypted. Your profile and changes to it will be visible to your contacts and when you start or accept new chats. LEARN MORE'
|
||||
const actual = i18n(
|
||||
'icu:AddUserToAnotherGroupModal__toast--adding-user-to-group',
|
||||
{ contact: 'CONTACT' }
|
||||
);
|
||||
assert.equal(actual, 'Adding CONTACT...');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -72,7 +70,11 @@ describe('setupI18n', () => {
|
||||
|
||||
describe('isLegacyFormat', () => {
|
||||
it('returns false for new format', () => {
|
||||
assert.isFalse(i18n.isLegacyFormat('icu:ProfileEditor--info'));
|
||||
assert.isFalse(
|
||||
i18n.isLegacyFormat(
|
||||
'icu:AddUserToAnotherGroupModal__toast--adding-user-to-group'
|
||||
)
|
||||
);
|
||||
assert.isTrue(i18n.isLegacyFormat('softwareAcknowledgments'));
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user