Commit Graph

175 Commits

Author SHA1 Message Date
Christian Kaisermann
bb406c1f79 Update package-lock 2020-02-06 14:15:54 -03:00
Christian Kaisermann
75227ba11b
Update Methods.md 2020-02-03 22:55:37 -03:00
Christian Kaisermann
08eb1554f3 docs: ✏️ add TOCs to some docs 2020-02-03 13:47:36 -03:00
Christian Kaisermann
fd97e89782 chore: 🤖 link readme to the getting started 2020-02-03 13:35:42 -03:00
Christian Kaisermann
14e37a9324 chore(release): v3.0.1 🎉 2020-02-03 13:33:33 -03:00
Christian Kaisermann
6b0ba2b902 refactor: 💡 split getClientLocale into multiple utilities 2020-02-03 13:33:03 -03:00
Christian Kaisermann
a574444f60 chore(release): v3.0.0 🎉 2020-02-03 11:24:50 -03:00
Christian Kaisermann
21543a8b7f docs: ✏️ add migration guide from v2 to v3 2020-02-03 11:24:50 -03:00
Christian Kaisermann
2d147ef82d docs: ✏️ fix broken links 2020-02-03 11:24:50 -03:00
Christian Kaisermann
ff088f50e2 chore: 🤖 remove unused file 2020-02-03 11:24:50 -03:00
Christian Kaisermann
25f85c556f chore: 🤖 fix crazy types conflict 2020-02-03 11:24:50 -03:00
Christian Kaisermann
552a6105d9 chore: 🤖 bump package json version 2020-02-03 11:24:50 -03:00
Christian Kaisermann
7bf47d8790 feat: 🎸 add runtime typings
 Closes: Closes #43
2020-02-03 11:24:50 -03:00
Christian Kaisermann
31b556bc3f feat: 🎸 make getClientLocale tree-shakeable
BREAKING CHANGE: It's now needed to explicitly import the `getClientLocale` method to use
its heuristics when setting the initial locale. This makes the method
and its helpers to be tree-shakeable.

```js
import { init, getClientLocale } from 'svelte-i18n'

init({
  initialLocale: getClientLocale({ ... })
})
```
2020-02-03 11:24:50 -03:00
Christian Kaisermann
0822841140 refactor: 💡 split single utils file into multiple files 2020-02-03 11:24:50 -03:00
Christian Kaisermann
0e0a31fc9e chore: 🤖 remove unused methods 2020-02-03 11:24:50 -03:00
Christian Kaisermann
bd3057ba2d docs: ✏️ update docs 2020-02-03 11:24:50 -03:00
Christian Kaisermann
9f352845e1 refactor: 💡 rename getIn to deepGet 2020-02-03 11:24:50 -03:00
Christian Kaisermann
6526245bf9 feat: 🎸 make date,time and number formatters tree-shakeable
BREAKING CHANGE: Changes completely the API. Now, to format a number, date or time, the
developer must explicitly import the formatter store:

`import { time, date, number } from 'svelte-i18n'`
2020-02-03 11:24:50 -03:00
Christian Kaisermann
858c25cc80 chore: 🤖 add lint-staged and husky 2020-01-29 11:49:28 -03:00
Christian Kaisermann
c26658d470 chore(release): v2.3.1 🎉 2020-01-29 11:47:19 -03:00
Christian Kaisermann
e400e62a62 refactor: 💡 add correct typings for formatter getters 2020-01-29 11:46:34 -03:00
Ramiro Rikkert
27871f9775
fix: memoizing of formatters when no locale is given. (#47) 2020-01-29 11:29:32 -03:00
Christian Kaisermann
88f7762e96 fix: 🐛 types from v3 branch leaking to master branch 🤷 2020-01-23 10:41:14 -03:00
Christian Kaisermann
bb6dd01558 chore: 🤖 oops, fix actual build-time types being git ignored 2020-01-23 10:32:56 -03:00
Christian Kaisermann
73c80e9bea chore(release): v2.3.0 🎉 2020-01-23 10:12:06 -03:00
Christian Kaisermann
dadeaa2e7f feat: 🎸 add runtime typings
 Closes: Closes #43
2020-01-23 10:11:04 -03:00
Christian Kaisermann
107eec0e89 chore(release): v2.2.4 🎉 2020-01-21 10:25:31 -03:00
Christian Kaisermann
932847be2d refactor: 💡 remove fast-memoize in favour of simple monadic fn 2020-01-21 10:23:18 -03:00
Christian Kaisermann
69ec477ffd docs: ✏️ move docs out of wiki 2020-01-21 10:00:45 -03:00
Christian Kaisermann
1c059060e2 chore: 🤖 update changelog 2020-01-15 14:01:41 -03:00
Christian Kaisermann
577e097ad7 chore(release): v2.2.3 🎉 2020-01-15 14:00:27 -03:00
Christian Kaisermann
e02427de3b test: 💍 add flatObj and getIn tests 2020-01-15 13:59:31 -03:00
Christian Kaisermann
270aefa199 refactor: 💡 remove deepmerge and dlv dependencies
No need for them anymore. We now flat the dicitonary partials on
`addMessages`
2020-01-15 13:59:31 -03:00
Christian Kaisermann
e889a41e63 Ignore annoying warning 2020-01-13 21:44:08 -03:00
Christian Kaisermann
788a2c67df chore(release): v2.2.2 🎉 2020-01-13 21:21:16 -03:00
Christian Kaisermann
b2dc7828c5 fix: 🐛 mjs causing an elusive bug in webpack module resolution
Changed i18n.mjs to i18n.esm.js to prevent webpack to only accept .mjs
imports inside the library. Webpack was importing the cjs version of
Intl-Formatmessage and messing things up.

Issues: #36
2020-01-13 21:20:04 -03:00
Christian Kaisermann
88a35580c3 chore: 🤖 update lock 2020-01-08 11:33:01 -03:00
Christian Kaisermann
0892e1530a chore(release): v2.2.1 🎉 2020-01-08 11:33:01 -03:00
Christian Kaisermann
bb8c68f2eb fix: 🐛 lookup message not caching correctly
It was only caching lookups of fallback locales. If a message was found
in the passed locale, it wouldn't be cached.
2020-01-08 11:33:01 -03:00
Christian Kaisermann
f8b0fe8bbe chore(release): v2.2.0 🎉 2020-01-06 22:36:55 -03:00
Christian Kaisermann
0c57b9b568 fix: 🐛 make message formatter default to current locale 2020-01-06 22:36:31 -03:00
Miguel Camba
86cca99251 feat: add low level API to get access to the formatters (#31)
* Add test
* Change approach, export functions to access the formatters instead
2020-01-06 22:36:04 -03:00
Christian Kaisermann
490fdd9492 refactor: 💡 readme 2019-12-02 23:41:34 -03:00
Christian Kaisermann
396a360324 chore(release): v2.1.1 🎉 2019-12-02 20:20:24 -03:00
Christian Kaisermann
feb7ab9dea fix: 🐛 fix conflict artifacts 2019-12-02 20:16:48 -03:00
Christian Kaisermann
7ff154cc44
Merge pull request #25 from kaisermann/fix/v2
V2 again
2019-11-29 22:19:29 -03:00
Christian Kaisermann
b545f07c92 Merge branch 'master' into fix/v2 2019-11-29 22:18:53 -03:00
Christian Kaisermann
01f749e846 chore(release): v2.1.0 🎉 2019-11-29 22:11:46 -03:00
Christian Kaisermann
a28cb4270d Update example files 2019-11-29 19:47:05 -03:00