From 082cf51426c7e8dc5fe61b7b67b8e065f5c05bc3 Mon Sep 17 00:00:00 2001 From: Roberto Simonetti Date: Sun, 29 Nov 2020 17:41:31 +0100 Subject: [PATCH] Update README --- README.md | 10 ++++++---- tslint.json | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 999fe572..97a08869 100644 --- a/README.md +++ b/README.md @@ -57,11 +57,13 @@ export function initL10n(l10nLoader: L10nLoader): () => Promise { const i18nAsset = { 'en-US': { greeting: 'Hello world!', - whoIAm: 'I am {{name}}' + whoIAm: 'I am {{name}}', + one: 'software developer' }, 'it-IT': { greeting: 'Ciao mondo!', - whoIAm: 'Sono {{name}}' + whoIAm: 'Sono {{name}}', + one: 'sviluppatore software' } }; ``` @@ -98,7 +100,7 @@ export class AppModule { }

{{ value | l10nNumber:locale.language:{ digits: '1.2-2', style: 'currency' } }}

-

1 {{ 1 | l10nPlural:locale.language:'home':{ type: 'cardinal' } }}

+

1 {{ 1 | l10nPlural:locale.language }}

@@ -145,7 +147,7 @@ export class AppComponent implements OnInit { this.formattedToday = this.intl.formatDate(this.today, { dateStyle: 'full', timeStyle: 'short' }); this.formattedTimeAgo = this.intl.formatRelativeTime(this.timeAgo, 'second', { numeric: 'always', style: 'long' }); this.formattedValue = this.intl.formatNumber(this.value, { digits: '1.2-2', style: 'currency' }); - this.formattedOnePlural = this.intl.plural(1, 'home', { type: 'cardinal' }); + this.formattedOnePlural = this.intl.plural(1); } }); } diff --git a/tslint.json b/tslint.json index b0cb1951..8dd99232 100644 --- a/tslint.json +++ b/tslint.json @@ -128,8 +128,8 @@ ] }, "use-lifecycle-interface": true, - "use-pipe-transform-interface": true - , "variable-name": { + "use-pipe-transform-interface": true, + "variable-name": { "options": [ "ban-keywords", "check-format", @@ -146,5 +146,5 @@ "check-typecast" ] } -} + } } \ No newline at end of file