@totersapp/toterslokalise-sdk 1.2.0 → 1.2.1
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/README.md +11 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Lingo Rider JavaScript SDK
|
|
2
2
|
|
|
3
|
-
Official JavaScript/TypeScript SDK for
|
|
3
|
+
Official JavaScript/TypeScript SDK for Lingo Rider.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> Lingo Rider keeps its technical name `toterslokalise` in packages, modules, classes and settings.
|
|
6
|
+
|
|
7
|
+
Lingo Rider lets applications fetch versioned translations over the air (OTA), switch locales at runtime, and continue working from cached or bundled translations when the network is unavailable.
|
|
6
8
|
|
|
7
9
|
## Features
|
|
8
10
|
|
|
@@ -30,8 +32,8 @@ Bump the version without npm's `v` tag prefix, then push the tag; the Release
|
|
|
30
32
|
workflow tests and publishes it to npmjs.com:
|
|
31
33
|
|
|
32
34
|
```bash
|
|
33
|
-
npm version 1.
|
|
34
|
-
git push origin main 1.
|
|
35
|
+
npm version 1.2.2 --tag-version-prefix=""
|
|
36
|
+
git push origin main 1.2.2
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
## Quick Start
|
|
@@ -63,7 +65,7 @@ const title = client.t('welcome', { namespace: 'common', fallback: 'Welcome' });
|
|
|
63
65
|
|
|
64
66
|
## OTA and Offline Behavior
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
Lingo Rider validates OTA manifests and translation artifacts before replacing cached translations.
|
|
67
69
|
|
|
68
70
|
The SDK verifies project and environment scope, protocol version, artifact origin, artifact size, and SHA-256 checksum.
|
|
69
71
|
|
|
@@ -71,7 +73,7 @@ If an update fails, the existing last-known-good translations remain available.
|
|
|
71
73
|
|
|
72
74
|
## Build-only namespaces
|
|
73
75
|
|
|
74
|
-
Namespaces marked **Build only** in
|
|
76
|
+
Namespaces marked **Build only** in Lingo Rider are left out of OTA releases.
|
|
75
77
|
Download them in your CI/CD pipeline (one `<namespace>.json` per namespace, from
|
|
76
78
|
`GET /api/v1/projects/{projectId}/translations?environment=production&namespace=<name>&format=json`;
|
|
77
79
|
ready-made Bitbucket and GitHub Actions steps are on the Developer Hub) and bundle them
|
|
@@ -92,7 +94,7 @@ const client = new TotersLokaliseClient({ /* … */ bundled: bundledFromExports(
|
|
|
92
94
|
|
|
93
95
|
## Security
|
|
94
96
|
|
|
95
|
-
Use a
|
|
97
|
+
Use a Lingo Rider public SDK credential beginning with `gl_sdk_`.
|
|
96
98
|
|
|
97
99
|
Public SDK credentials are designed for client applications. Never embed administrative or private server credentials in browser or mobile applications.
|
|
98
100
|
|
|
@@ -102,4 +104,4 @@ Visit https://arcade.stage.toters-api.com/toters-lokalise/ for more information.
|
|
|
102
104
|
|
|
103
105
|
## Status
|
|
104
106
|
|
|
105
|
-
This SDK implements
|
|
107
|
+
This SDK implements Lingo Rider OTA protocol v1.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@totersapp/toterslokalise-sdk",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.2.1",
|
|
4
|
+
"description": "Lingo Rider JavaScript SDK: over-the-air translations for Toters web apps, with offline cache and safe fallbacks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|