From 408b40cc8ca28e6da69509375a3bfbf42e605223 Mon Sep 17 00:00:00 2001 From: Christian Kaisermann Date: Tue, 19 Nov 2019 17:13:29 -0300 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20TODO=20list=20to?= =?UTF-8?q?=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 660fe19..ae54b9a 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ +- [TODO - WIP](#todo-wip) - [Usage](#usage) - [Locale](#locale) - [The dictionary](#the-dictionary) @@ -19,6 +20,12 @@ +## TODO - WIP + +- [ ] Maybe locale can be a promise so we can await for it on the template; +- [ ] Wiki on github; +- [ ] Find a more flexible way to preload dictionaries so it's possible to preload partial dictionaries. + ## Usage `svelte-i18n` uses `stores` to keep track of the current locale, dictionary of messages and the main format function. This way, we keep everything neat, in sync and easy to use on your svelte files. @@ -75,8 +82,7 @@ dictionary.set({ ask: 'Por favor, digite seu nome', message: 'Olá {name}, como vai?', }, - photos: - 'Você {n, plural, =0 {não tem fotos.} =1 {tem uma foto.} other {tem # fotos.}}', + photos: 'Você {n, plural, =0 {não tem fotos.} =1 {tem uma foto.} other {tem # fotos.}}', cats: 'Tenho {n, number} {n,plural,=0{gatos}one{gato}other{gatos}}', }, en: { @@ -86,8 +92,7 @@ dictionary.set({ ask: 'Please type your name', message: 'Hello {name}, how are you?', }, - photos: - 'You have {n, plural, =0 {no photos.} =1 {one photo.} other {# photos.}}', + photos: 'You have {n, plural, =0 {no photos.} =1 {one photo.} other {# photos.}}', cats: 'I have {n, number} {n,plural,one{cat}other{cats}}', }, })