@shoelace-style/localize 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +3 -2
- package/package.json +2 -4
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Shoelace: Localize
|
|
2
2
|
|
|
3
|
-
This micro library does not aim to replicate a full-blown localization tool. For that, you should use something like [i18next](https://www.i18next.com/). What this library _does_ do is provide a lightweight, framework-agnostic mechanism for sharing and applying translations across one or more custom elements in a component library.
|
|
3
|
+
This zero-dependency micro library does not aim to replicate a full-blown localization tool. For that, you should use something like [i18next](https://www.i18next.com/). What this library _does_ do is provide a lightweight, framework-agnostic mechanism for sharing and applying translations across one or more custom elements in a component library.
|
|
4
4
|
|
|
5
5
|
Included are methods for translating terms, dates, currencies, and numbers and a [Reactive Controller](https://lit.dev/docs/composition/controllers/) that can be used as a mixin in Lit and other supportive component authoring libraries.
|
|
6
6
|
|
|
@@ -193,7 +193,8 @@ export class MyElement extends LitElement {
|
|
|
193
193
|
## Advantages
|
|
194
194
|
|
|
195
195
|
- Extremely lightweight
|
|
196
|
-
|
|
196
|
+
- Zero dependencies
|
|
197
|
+
- Version 2.1 measures 726 bytes (yes, _bytes_) after minify + gzip
|
|
197
198
|
- Uses existing platform features
|
|
198
199
|
- Supports simple terms, plurals, and complex translations
|
|
199
200
|
- Fun fact: some languages have [six plural forms](https://lingohub.com/blog/2019/02/pluralization) and this will support that
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shoelace-style/localize",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "A micro library for localizing custom elements using Lit's Reactive Controller model.",
|
|
5
5
|
"main": "/dist/index.js",
|
|
6
6
|
"module": "/dist/index.js",
|
|
@@ -34,9 +34,7 @@
|
|
|
34
34
|
"homepage": "https://github.com/shoelace-style/localize#readme",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"del": "^6.0.0",
|
|
37
|
+
"lit": "^2.0.2",
|
|
37
38
|
"typescript": "^4.4.3"
|
|
38
|
-
},
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"lit": "^2.0.2"
|
|
41
39
|
}
|
|
42
40
|
}
|