@prosopo/locale 3.11.1 → 3.12.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/.turbo/turbo-build$colon$cjs.log +6 -6
- package/.turbo/turbo-build$colon$tsc.log +5 -5
- package/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +70 -0
- package/README.md +11 -9
- package/dist/cjs/errorMessage.cjs +11 -10
- package/dist/cjs/index.cjs +2 -1
- package/dist/cjs/locales/en/widget.cjs +44 -1
- package/dist/cjs/translationKey.cjs +3 -3
- package/dist/errorMessage.d.ts +6 -4
- package/dist/errorMessage.d.ts.map +1 -1
- package/dist/errorMessage.js +10 -10
- package/dist/errorMessage.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/locales/af/widget.json +41 -0
- package/dist/locales/am/widget.json +41 -0
- package/dist/locales/an/widget.json +41 -0
- package/dist/locales/ar/widget.json +41 -0
- package/dist/locales/as/widget.json +41 -0
- package/dist/locales/ast/widget.json +41 -0
- package/dist/locales/az/widget.json +41 -0
- package/dist/locales/be/widget.json +41 -0
- package/dist/locales/bg/widget.json +41 -0
- package/dist/locales/bn/widget.json +41 -0
- package/dist/locales/bs/widget.json +41 -0
- package/dist/locales/ca/widget.json +41 -0
- package/dist/locales/cs/widget.json +41 -0
- package/dist/locales/cy/widget.json +41 -0
- package/dist/locales/da/widget.json +41 -0
- package/dist/locales/de/widget.json +41 -0
- package/dist/locales/el/widget.json +41 -0
- package/dist/locales/en/widget.js +44 -2
- package/dist/locales/en/widget.json +41 -0
- package/dist/locales/eo/widget.json +41 -0
- package/dist/locales/es/widget.json +41 -0
- package/dist/locales/et/widget.json +41 -0
- package/dist/locales/eu/widget.json +41 -0
- package/dist/locales/fa/widget.json +41 -0
- package/dist/locales/fi/widget.json +41 -0
- package/dist/locales/fil/widget.json +41 -0
- package/dist/locales/fr/widget.json +41 -0
- package/dist/locales/fy/widget.json +41 -0
- package/dist/locales/ga/widget.json +41 -0
- package/dist/locales/gd/widget.json +41 -0
- package/dist/locales/gl/widget.json +41 -0
- package/dist/locales/gu/widget.json +41 -0
- package/dist/locales/he/widget.json +41 -0
- package/dist/locales/hi/widget.json +41 -0
- package/dist/locales/hr/widget.json +41 -0
- package/dist/locales/hu/widget.json +41 -0
- package/dist/locales/hy/widget.json +41 -0
- package/dist/locales/ia/widget.json +41 -0
- package/dist/locales/id/widget.json +41 -0
- package/dist/locales/is/widget.json +41 -0
- package/dist/locales/it/widget.json +41 -0
- package/dist/locales/ja/widget.json +41 -0
- package/dist/locales/jv/widget.json +41 -0
- package/dist/locales/ka/widget.json +41 -0
- package/dist/locales/kk/widget.json +41 -0
- package/dist/locales/km/widget.json +41 -0
- package/dist/locales/kn/widget.json +41 -0
- package/dist/locales/ko/widget.json +41 -0
- package/dist/locales/ky/widget.json +41 -0
- package/dist/locales/lo/widget.json +41 -0
- package/dist/locales/lt/widget.json +41 -0
- package/dist/locales/lv/widget.json +41 -0
- package/dist/locales/mk/widget.json +41 -0
- package/dist/locales/ml/widget.json +41 -0
- package/dist/locales/mn/widget.json +41 -0
- package/dist/locales/mr/widget.json +41 -0
- package/dist/locales/ms/widget.json +41 -0
- package/dist/locales/my/widget.json +41 -0
- package/dist/locales/ne/widget.json +41 -0
- package/dist/locales/nl/widget.json +41 -0
- package/dist/locales/nn/widget.json +41 -0
- package/dist/locales/no/widget.json +41 -0
- package/dist/locales/oc/widget.json +41 -0
- package/dist/locales/or/widget.json +41 -0
- package/dist/locales/pa/widget.json +41 -0
- package/dist/locales/pl/widget.json +41 -0
- package/dist/locales/pt/widget.json +41 -0
- package/dist/locales/pt-BR/widget.json +41 -0
- package/dist/locales/rm/widget.json +41 -0
- package/dist/locales/ro/widget.json +41 -0
- package/dist/locales/ru/widget.json +41 -0
- package/dist/locales/sco/widget.json +41 -0
- package/dist/locales/si/widget.json +41 -0
- package/dist/locales/sk/widget.json +41 -0
- package/dist/locales/sl/widget.json +41 -0
- package/dist/locales/sq/widget.json +41 -0
- package/dist/locales/sr/widget.json +41 -0
- package/dist/locales/sv/widget.json +41 -0
- package/dist/locales/sw/widget.json +41 -0
- package/dist/locales/ta/widget.json +41 -0
- package/dist/locales/te/widget.json +41 -0
- package/dist/locales/tg/widget.json +41 -0
- package/dist/locales/th/widget.json +41 -0
- package/dist/locales/tr/widget.json +41 -0
- package/dist/locales/uk/widget.json +41 -0
- package/dist/locales/ur/widget.json +41 -0
- package/dist/locales/uz/widget.json +41 -0
- package/dist/locales/vi/widget.json +41 -0
- package/dist/locales/xh/widget.json +41 -0
- package/dist/locales/zh/widget.json +41 -0
- package/dist/locales/zh-CN/widget.json +41 -0
- package/dist/locales/zh-HK/widget.json +41 -0
- package/dist/locales/zh-TW/widget.json +41 -0
- package/dist/locales/zu/widget.json +41 -0
- package/dist/tests/errorMessage.unit.test.js +41 -31
- package/dist/tests/errorMessage.unit.test.js.map +1 -1
- package/dist/tests/resultReasonKeys.unit.test.d.ts +2 -0
- package/dist/tests/resultReasonKeys.unit.test.d.ts.map +1 -0
- package/dist/tests/resultReasonKeys.unit.test.js +26 -0
- package/dist/tests/resultReasonKeys.unit.test.js.map +1 -0
- package/dist/tests/translationKey.unit.test.js +1 -0
- package/dist/tests/translationKey.unit.test.js.map +1 -1
- package/dist/translationKey.js +3 -3
- package/package.json +8 -8
- package/dist/tests/thrownErrorKeys.unit.test.d.ts +0 -2
- package/dist/tests/thrownErrorKeys.unit.test.d.ts.map +0 -1
- package/dist/tests/thrownErrorKeys.unit.test.js +0 -51
- package/dist/tests/thrownErrorKeys.unit.test.js.map +0 -1
|
@@ -5,7 +5,7 @@ ViteCommonJSConfig: .
|
|
|
5
5
|
}
|
|
6
6
|
{ externals: [ '@prosopo/util' ] }
|
|
7
7
|
[33mThe plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the [1mresolve.tsconfigPaths[22m option. You can remove the plugin and set [1mresolve.tsconfigPaths: true[22m in your Vite config instead.[39m
|
|
8
|
-
[36mvite v8.1.
|
|
8
|
+
[36mvite v8.1.6 [32mbuilding ssr environment for production...[36m[39m
|
|
9
9
|
Bundle build started
|
|
10
10
|
[2K
|
|
11
11
|
✓ 22 modules transformed.
|
|
@@ -15,26 +15,26 @@ dist/cjs/util.cjs 0.28 kB │ gzip: 0.17 kB
|
|
|
15
15
|
dist/cjs/i18SharedOptions.cjs 0.37 kB │ gzip: 0.23 kB
|
|
16
16
|
dist/cjs/i18nMiddleware.cjs 0.51 kB │ gzip: 0.26 kB
|
|
17
17
|
dist/cjs/untranslatedI18n.cjs 0.62 kB │ gzip: 0.38 kB
|
|
18
|
-
dist/cjs/errorMessage.cjs 0.75 kB │ gzip: 0.42 kB
|
|
19
18
|
dist/cjs/process.cjs 0.78 kB │ gzip: 0.46 kB
|
|
19
|
+
dist/cjs/errorMessage.cjs 0.82 kB │ gzip: 0.47 kB
|
|
20
20
|
dist/cjs/translator.cjs 0.92 kB │ gzip: 0.47 kB
|
|
21
21
|
dist/cjs/requestLanguageDetector.cjs 0.98 kB │ gzip: 0.50 kB
|
|
22
22
|
dist/cjs/_virtual/_rolldown/runtime.cjs 1.00 kB │ gzip: 0.50 kB
|
|
23
23
|
dist/cjs/serverTranslationKeys.cjs 1.72 kB │ gzip: 0.72 kB
|
|
24
|
-
dist/cjs/translationKey.cjs 1.80 kB │ gzip: 0.92 kB
|
|
25
24
|
dist/cjs/translations.cjs 1.82 kB │ gzip: 0.84 kB
|
|
25
|
+
dist/cjs/translationKey.cjs 1.84 kB │ gzip: 0.94 kB
|
|
26
26
|
dist/cjs/loadI18next.cjs 2.04 kB │ gzip: 0.85 kB
|
|
27
27
|
dist/cjs/i18nBackend.cjs 2.62 kB │ gzip: 0.88 kB
|
|
28
|
-
dist/cjs/index.cjs 2.
|
|
28
|
+
dist/cjs/index.cjs 2.92 kB │ gzip: 0.66 kB
|
|
29
29
|
dist/cjs/direction.cjs 2.94 kB │ gzip: 1.61 kB
|
|
30
30
|
dist/cjs/locales/en/translation.cjs 3.63 kB │ gzip: 1.39 kB
|
|
31
31
|
dist/cjs/i18nFrontend.cjs 5.08 kB │ gzip: 2.03 kB
|
|
32
32
|
dist/cjs/languagePreference.cjs 6.30 kB │ gzip: 2.44 kB
|
|
33
|
-
dist/cjs/locales/en/widget.cjs 7.35 kB │ gzip: 2.89 kB
|
|
34
33
|
dist/cjs/locales/en/target.cjs 7.69 kB │ gzip: 2.55 kB
|
|
34
|
+
dist/cjs/locales/en/widget.cjs 9.72 kB │ gzip: 3.07 kB
|
|
35
35
|
dist/cjs/browserUiLanguages.cjs 10.85 kB │ gzip: 1.86 kB
|
|
36
36
|
|
|
37
|
-
[32m✓ built in
|
|
37
|
+
[32m✓ built in 80ms[39m
|
|
38
38
|
[copy-plugin] copying /home/runner/work/captcha/captcha/packages/locale/src/locales/af/target.json to /home/runner/work/captcha/captcha/packages/locale/dist/locales/af/target.json
|
|
39
39
|
[copy-plugin] copying /home/runner/work/captcha/captcha/packages/locale/src/locales/af/translation.json to /home/runner/work/captcha/captcha/packages/locale/dist/locales/af/translation.json
|
|
40
40
|
[copy-plugin] copying /home/runner/work/captcha/captcha/packages/locale/src/locales/af/widget.json to /home/runner/work/captcha/captcha/packages/locale/dist/locales/af/widget.json
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
$ tsc --build --verbose
|
|
2
|
-
|
|
2
|
+
7:40:25 PM - Projects in this build:
|
|
3
3
|
* ../../dev/config/tsconfig.json
|
|
4
4
|
* ../util/tsconfig.json
|
|
5
5
|
* tsconfig.json
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
7:40:25 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
7:40:25 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
7:40:25 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
7:40:25 PM - Building project '/home/runner/work/captcha/captcha/packages/locale/tsconfig.json'...
|
|
14
14
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -4,9 +4,9 @@ ViteEsmConfig: .
|
|
|
4
4
|
{
|
|
5
5
|
tsConfigPaths: [ '/home/runner/work/captcha/captcha/packages/util/tsconfig.json' ]
|
|
6
6
|
}
|
|
7
|
-
{ externals: [ '@prosopo/util' ] }
|
|
8
7
|
[33mThe plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the [1mresolve.tsconfigPaths[22m option. You can remove the plugin and set [1mresolve.tsconfigPaths: true[22m in your Vite config instead.[39m
|
|
9
|
-
|
|
8
|
+
{ externals: [ '@prosopo/util' ] }
|
|
9
|
+
[36mvite v8.1.6 [32mbuilding ssr environment for production...[36m[39m
|
|
10
10
|
Bundle build started
|
|
11
11
|
[2K
|
|
12
12
|
✓ 22 modules transformed.
|
|
@@ -17,13 +17,13 @@ dist/util.js 0.25 kB │ gzip: 0.16 kB
|
|
|
17
17
|
dist/i18nMiddleware.js 0.31 kB │ gzip: 0.19 kB
|
|
18
18
|
dist/i18SharedOptions.js 0.33 kB │ gzip: 0.23 kB
|
|
19
19
|
dist/untranslatedI18n.js 0.60 kB │ gzip: 0.37 kB
|
|
20
|
-
dist/errorMessage.js 0.
|
|
20
|
+
dist/errorMessage.js 0.75 kB │ gzip: 0.45 kB
|
|
21
21
|
dist/process.js 0.77 kB │ gzip: 0.46 kB
|
|
22
22
|
dist/translator.js 0.84 kB │ gzip: 0.46 kB
|
|
23
23
|
dist/requestLanguageDetector.js 0.88 kB │ gzip: 0.48 kB
|
|
24
|
-
dist/index.js 1.52 kB │ gzip: 0.48 kB
|
|
25
24
|
dist/serverTranslationKeys.js 1.53 kB │ gzip: 0.71 kB
|
|
26
|
-
dist/
|
|
25
|
+
dist/index.js 1.55 kB │ gzip: 0.49 kB
|
|
26
|
+
dist/translationKey.js 1.74 kB │ gzip: 0.92 kB
|
|
27
27
|
dist/translations.js 1.76 kB │ gzip: 0.83 kB
|
|
28
28
|
dist/i18nBackend.js 1.82 kB │ gzip: 0.77 kB
|
|
29
29
|
dist/loadI18next.js 1.95 kB │ gzip: 0.84 kB
|
|
@@ -31,11 +31,11 @@ dist/direction.js 2.92 kB │ gzip: 1.60 kB
|
|
|
31
31
|
dist/locales/en/translation.js 3.52 kB │ gzip: 1.37 kB
|
|
32
32
|
dist/i18nFrontend.js 4.86 kB │ gzip: 2.01 kB
|
|
33
33
|
dist/languagePreference.js 5.79 kB │ gzip: 2.39 kB
|
|
34
|
-
dist/locales/en/widget.js 7.24 kB │ gzip: 2.87 kB
|
|
35
34
|
dist/locales/en/target.js 7.68 kB │ gzip: 2.55 kB
|
|
35
|
+
dist/locales/en/widget.js 9.60 kB │ gzip: 3.05 kB
|
|
36
36
|
dist/browserUiLanguages.js 10.83 kB │ gzip: 1.86 kB
|
|
37
37
|
|
|
38
|
-
[32m✓ built in
|
|
38
|
+
[32m✓ built in 338ms[39m
|
|
39
39
|
[copy-plugin] copying /home/runner/work/captcha/captcha/packages/locale/src/locales/af/target.json to /home/runner/work/captcha/captcha/packages/locale/dist/locales/af/target.json
|
|
40
40
|
[copy-plugin] copying /home/runner/work/captcha/captcha/packages/locale/src/locales/af/translation.json to /home/runner/work/captcha/captcha/packages/locale/dist/locales/af/translation.json
|
|
41
41
|
[copy-plugin] copying /home/runner/work/captcha/captcha/packages/locale/src/locales/af/widget.json to /home/runner/work/captcha/captcha/packages/locale/dist/locales/af/widget.json
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
1
|
# @prosopo/locale
|
|
2
2
|
|
|
3
|
+
## 3.12.1
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- 49892fc: Hold express at 4 in `@prosopo/locale`, because the i18next middleware it uses
|
|
7
|
+
has no express 5 typings.
|
|
8
|
+
|
|
9
|
+
`i18next-http-middleware@3.9.9` types the handler returned by `handle()` against
|
|
10
|
+
express 4. On express 5 that handler no longer matches the `app.use` it is passed
|
|
11
|
+
to, so locale stops compiling with "Argument of type 'Handler' is not assignable
|
|
12
|
+
to parameter of type 'PathParams'".
|
|
13
|
+
|
|
14
|
+
This repo's own CI never saw it. The middleware's type definitions import
|
|
15
|
+
`express-serve-static-core` by bare name while declaring it only as a
|
|
16
|
+
devDependency, so pnpm gives the middleware no copy of its own and the import
|
|
17
|
+
resolves to whichever version reached the hoisted directory. Here that is
|
|
18
|
+
express 5 and everything passes. In a workspace that embeds this one alongside
|
|
19
|
+
express 4 consumers, the express 4 types win the hoist instead, the handler comes
|
|
20
|
+
back typed for express 4, and the build fails. That is how v3.8.36 shipped green
|
|
21
|
+
and broke its consumer.
|
|
22
|
+
|
|
23
|
+
Dependabot is set to ignore express 5 for now. Lift the pin and the ignore
|
|
24
|
+
together once the middleware ships express 5 typings.
|
|
25
|
+
|
|
26
|
+
## 3.12.0
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- d2148c8: Errors now carry a fixed code and a site instead of a translation key.
|
|
30
|
+
|
|
31
|
+
Every error is a `ProsopoError` with a `code` from one list in
|
|
32
|
+
`@prosopo/common` (`ERROR_CODES`) and an `errorSite` such as `PROV-12`, which
|
|
33
|
+
names the one place it was thrown. Together they make the `errorId`, e.g.
|
|
34
|
+
`SITE_KEY_INVALID:PROV-31`, which the widget shows after the message so a
|
|
35
|
+
screenshot is enough to find the throw.
|
|
36
|
+
|
|
37
|
+
What a client sees:
|
|
38
|
+
|
|
39
|
+
- A public error (bad site key, blocked network, and so on) sends its code,
|
|
40
|
+
English message, data and errorId.
|
|
41
|
+
- Anything else sends only `BACKEND_ERROR:<site>` (or `FRONTEND_ERROR:<site>`
|
|
42
|
+
from the widget) and a status. Internal details never leave the server.
|
|
43
|
+
|
|
44
|
+
The provider no longer translates errors. The widget looks up
|
|
45
|
+
`ERRORS.<CODE>` in its catalogue and falls back to the English message. The
|
|
46
|
+
old error classes (`ProsopoApiError`, `ProsopoEnvError` and the rest), the
|
|
47
|
+
`key`/`messageEn` fields and `localiseErrorMessage` are gone.
|
|
48
|
+
|
|
49
|
+
Other changes in behaviour:
|
|
50
|
+
|
|
51
|
+
- An error with no specific code is a hidden 500.
|
|
52
|
+
- Errors no longer log themselves when they are created. The server logs each
|
|
53
|
+
unhandled one once: 5xx as errors, 4xx at debug.
|
|
54
|
+
- An invalid PoW signature is a 401 instead of a 500.
|
|
55
|
+
- `stringifyBigInts` returns a copy instead of changing its input, so frozen
|
|
56
|
+
error context can be logged.
|
|
57
|
+
- The provider's last hand-written error replies now use the same error body.
|
|
58
|
+
These were the missing-header 401s, the access-policy block, autoBan, the
|
|
59
|
+
metrics 401/403 and the rate limiter. The rate limiter answers with a new
|
|
60
|
+
public `RATE_LIMITED` (429) code.
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- 46b97b7: Roll up the open Dependabot updates: express 5 (with `@types/express` 5), dotenv 18, undici 8, geolib 4, vitest 5, vite 8.1.6 everywhere, 17 minor and patch bumps (Babel, mongoose, i18next, ip-address, turbo and others), `@angular/router` in the Angular demo, and a GitHub Actions bump.
|
|
65
|
+
|
|
66
|
+
The whole vitest family moves to 5.0.4, including `@vitest/coverage-v8`, because `@vitest/browser-playwright` 5 only works with vitest 5. The `@types/express-serve-static-core` override moves to 5.1.3 to match `@types/express` 5.
|
|
67
|
+
|
|
68
|
+
`@prosopo/dotenv` now loads env files with `quiet: true`. Since dotenv 17, every load prints an "injected env" line to stderr unless told not to.
|
|
69
|
+
- Updated dependencies [46b97b7]
|
|
70
|
+
- Updated dependencies [d2148c8]
|
|
71
|
+
- @prosopo/util@3.3.16
|
|
72
|
+
|
|
3
73
|
## 3.11.1
|
|
4
74
|
### Patch Changes
|
|
5
75
|
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Each language has one file per i18next namespace (`NAMESPACES` in
|
|
|
10
10
|
|
|
11
11
|
| File | Sections | Loaded by |
|
|
12
12
|
| --- | --- | --- |
|
|
13
|
-
| `widget.json` | WIDGET, API, CAPTCHA, GENERAL, ACCOUNT, DEVELOPER | widget and provider |
|
|
13
|
+
| `widget.json` | WIDGET, API, CAPTCHA, GENERAL, ACCOUNT, DEVELOPER, ERRORS | widget and provider |
|
|
14
14
|
| `target.json` | TARGET (image labels) | provider |
|
|
15
15
|
| `translation.json` | DATABASE, DATASET, CONTRACT, CONFIG, PORTAL, CLI, FS | provider |
|
|
16
16
|
|
|
@@ -25,17 +25,19 @@ Each language has one file per i18next namespace (`NAMESPACES` in
|
|
|
25
25
|
`target.json`. Each captcha in the image challenge carries the translated
|
|
26
26
|
`target`, its `targetKey` and its English `targetEn`, and the response names
|
|
27
27
|
its `language` (`packages/provider/src/api/captcha/localiseTarget.ts`).
|
|
28
|
-
-
|
|
29
|
-
(`
|
|
30
|
-
|
|
31
|
-
`
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
- Errors are translated by code, never by the provider. A ProsopoError
|
|
29
|
+
(`packages/common/src/error.ts`) reaches the widget as `{code, errorId,
|
|
30
|
+
message?}`; `localiseError` (`src/errorMessage.ts`) shows
|
|
31
|
+
`ERRORS.<code>` in the widget's language, else the English `message`, else
|
|
32
|
+
"Something went wrong", followed by the errorId. A non-public error arrives
|
|
33
|
+
as BACKEND_ERROR or FRONTEND_ERROR, so it has text too. Every `ERRORS` key
|
|
34
|
+
must be an `ErrorCode` (`packages/common/src/tests/error.unit.test.ts`). The
|
|
35
|
+
bundle build copies `widget.json` whole, rather than stripping keys its code
|
|
36
|
+
never names (`packages/procaptcha-bundle/vite.config.ts`).
|
|
34
37
|
- `englishText(key)`, `isTranslationKey` and `isTargetKey`
|
|
35
38
|
(`src/serverTranslationKeys.ts`) import every English catalogue, so only
|
|
36
39
|
server code calls them. They read English whatever language i18next is in.
|
|
37
|
-
Code that also runs in the widget
|
|
38
|
-
translation, asks the i18n instance instead (`canTranslate`, which uses
|
|
40
|
+
Code that also runs in the widget asks the i18n instance instead (`canTranslate`, which uses
|
|
39
41
|
`exists`). That keeps `target.json` and `translation.json` out of the widget
|
|
40
42
|
bundle.
|
|
41
43
|
- A section moves between files by moving it in every language. The tests in
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
const require_translationKey = require("./translationKey.cjs");
|
|
2
2
|
//#region src/errorMessage.ts
|
|
3
|
+
var FALLBACK_ERROR_TEXT = "Something went wrong";
|
|
3
4
|
/**
|
|
4
|
-
* The
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* text for) keep the server's message.
|
|
5
|
+
* The widget translates errors by code (`ERRORS.<CODE>`) in its own language;
|
|
6
|
+
* the provider sends English only. A code the catalogue does not know keeps the
|
|
7
|
+
* provider's English message. The errorId is always shown so a user's report
|
|
8
|
+
* names the exact place that failed.
|
|
9
9
|
*/
|
|
10
|
-
var
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
return i18n.t(key, { defaultValue:
|
|
10
|
+
var localiseError = (i18n, error) => {
|
|
11
|
+
const key = `ERRORS.${error.code}`;
|
|
12
|
+
const fallback = error.message ?? "Something went wrong";
|
|
13
|
+
return `${i18n?.isInitialized && require_translationKey.isWidgetTranslationKey(key) ? i18n.t(key, { defaultValue: fallback }) : fallback} (${error.errorId})`;
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
|
-
exports.
|
|
16
|
+
exports.FALLBACK_ERROR_TEXT = FALLBACK_ERROR_TEXT;
|
|
17
|
+
exports.localiseError = localiseError;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -12,6 +12,7 @@ const require_translator = require("./translator.cjs");
|
|
|
12
12
|
const require_untranslatedI18n = require("./untranslatedI18n.cjs");
|
|
13
13
|
const require_errorMessage = require("./errorMessage.cjs");
|
|
14
14
|
exports.BROWSER_UI_LANGUAGES = require_browserUiLanguages.BROWSER_UI_LANGUAGES;
|
|
15
|
+
exports.FALLBACK_ERROR_TEXT = require_errorMessage.FALLBACK_ERROR_TEXT;
|
|
15
16
|
exports.LANGUAGE_HEADER = require_languagePreference.LANGUAGE_HEADER;
|
|
16
17
|
exports.LANGUAGE_QUERY_PARAM = require_languagePreference.LANGUAGE_QUERY_PARAM;
|
|
17
18
|
exports.LanguageCodes = require_translations.LanguageCodes;
|
|
@@ -31,7 +32,7 @@ exports.isTranslationKey = require_serverTranslationKeys.isTranslationKey;
|
|
|
31
32
|
exports.isWidgetTranslationKey = require_translationKey.isWidgetTranslationKey;
|
|
32
33
|
exports.languageHeaders = require_languagePreference.languageHeaders;
|
|
33
34
|
exports.loadI18next = require_loadI18next.default;
|
|
34
|
-
exports.
|
|
35
|
+
exports.localiseError = require_errorMessage.localiseError;
|
|
35
36
|
exports.matchLanguage = require_languagePreference.matchLanguage;
|
|
36
37
|
exports.matchLanguageTag = require_languagePreference.matchLanguageTag;
|
|
37
38
|
exports.negotiateLanguage = require_languagePreference.negotiateLanguage;
|
|
@@ -144,19 +144,62 @@ var DEVELOPER = {
|
|
|
144
144
|
"GENERAL": "General Dev Error, see context",
|
|
145
145
|
"METHOD_NOT_IMPLEMENTED": "Method not implemented"
|
|
146
146
|
};
|
|
147
|
+
var ERRORS = {
|
|
148
|
+
"BACKEND_ERROR": "Internal server error",
|
|
149
|
+
"FRONTEND_ERROR": "Unknown API error",
|
|
150
|
+
"INVALID_REQUEST": "BadRequest",
|
|
151
|
+
"UNAUTHORIZED": "Unauthorized",
|
|
152
|
+
"FORBIDDEN": "Forbidden",
|
|
153
|
+
"SITE_KEY_INVALID": "Invalid site key",
|
|
154
|
+
"SITE_KEY_NOT_REGISTERED": "Site key not registered",
|
|
155
|
+
"ORIGIN_NOT_ALLOWED": "Unauthorized origin URL",
|
|
156
|
+
"INVALID_IP": "Invalid IP",
|
|
157
|
+
"INVALID_SOLUTION": "Invalid solution",
|
|
158
|
+
"INVALID_SALT": "Invalid salt",
|
|
159
|
+
"INVALID_TIMESTAMP": "Invalid timestamp",
|
|
160
|
+
"TIMESTAMP_TOO_OLD": "Timestamp too old",
|
|
161
|
+
"NO_SESSION_FOUND": "No session found",
|
|
162
|
+
"SOLUTION_NOT_FOUND": "Solution not found",
|
|
163
|
+
"INCORRECT_CAPTCHA_TYPE": "Incorrect CAPTCHA type",
|
|
164
|
+
"CAPTCHA_FAILED": "You answered one or more captchas incorrectly. Please try again",
|
|
165
|
+
"CLIENT_SESSION_MISMATCH": "Session mismatch. The captcha was not completed in this session.",
|
|
166
|
+
"DECISION_MACHINE_DENIED": "Denied by the decision machine",
|
|
167
|
+
"WALLET_NOT_FOUND": "No extension found",
|
|
168
|
+
"SITE_KEY_MISSING": "SITE KEY missing",
|
|
169
|
+
"INSECURE_CONTEXT": "Procaptcha requires a secure (HTTPS) connection",
|
|
170
|
+
"ACCOUNT_NOT_FOUND": "Account not found",
|
|
171
|
+
"FAILED_IP_VALIDATION": "IP validation failed",
|
|
172
|
+
"ACCESS_POLICY_BLOCK": "Access blocked by policy",
|
|
173
|
+
"ABUSER_BLOCKED": "Requests from networks flagged for abuse are not allowed for this site",
|
|
174
|
+
"CRAWLER_BLOCKED": "Requests from known crawlers are not allowed for this site",
|
|
175
|
+
"DATACENTER_BLOCKED": "Requests from datacenter IP addresses are not allowed for this site",
|
|
176
|
+
"DISALLOWED_WEBVIEW": "Requests from in-app browsers (WebViews) are not allowed for this site",
|
|
177
|
+
"MOBILE_BLOCKED": "Requests from mobile network connections are not allowed for this site",
|
|
178
|
+
"PROXY_BLOCKED": "Requests from proxy servers are not allowed for this site",
|
|
179
|
+
"SATELLITE_BLOCKED": "Requests from satellite connections are not allowed for this site",
|
|
180
|
+
"TOR_BLOCKED": "Requests from Tor exit nodes are not allowed for this site",
|
|
181
|
+
"VPN_BLOCKED": "Requests from VPN connections are not allowed for this site",
|
|
182
|
+
"TOO_MANY_LOCALHOST": "Too many CAPTCHA requests from localhost for this site key",
|
|
183
|
+
"SPAM_EMAIL_DOMAIN": "Email domain not allowed",
|
|
184
|
+
"SPAM_EMAIL_RULE": "Email address blocked by spam filter rules",
|
|
185
|
+
"SPAM_EMAIL_COUNT_EXCEEDED": "Too many submissions from this email address",
|
|
186
|
+
"PROVIDER_VERIFY_FAILED": "Provider verification failed"
|
|
187
|
+
};
|
|
147
188
|
var widget_default = {
|
|
148
189
|
ACCOUNT,
|
|
149
190
|
WIDGET,
|
|
150
191
|
GENERAL,
|
|
151
192
|
CAPTCHA,
|
|
152
193
|
API,
|
|
153
|
-
DEVELOPER
|
|
194
|
+
DEVELOPER,
|
|
195
|
+
ERRORS
|
|
154
196
|
};
|
|
155
197
|
//#endregion
|
|
156
198
|
exports.ACCOUNT = ACCOUNT;
|
|
157
199
|
exports.API = API;
|
|
158
200
|
exports.CAPTCHA = CAPTCHA;
|
|
159
201
|
exports.DEVELOPER = DEVELOPER;
|
|
202
|
+
exports.ERRORS = ERRORS;
|
|
160
203
|
exports.GENERAL = GENERAL;
|
|
161
204
|
exports.WIDGET = WIDGET;
|
|
162
205
|
exports.default = widget_default;
|
|
@@ -4,9 +4,9 @@ const require_widget = require("./locales/en/widget.cjs");
|
|
|
4
4
|
* The catalogue is split into i18next namespaces so the browser downloads only
|
|
5
5
|
* what it renders. Keys keep their section prefix (`WIDGET.`, `TARGET.`), so a
|
|
6
6
|
* key reads the same whichever namespace holds it:
|
|
7
|
-
* - `widget`: the widget's own text and the errors it shows (WIDGET,
|
|
8
|
-
* CAPTCHA, GENERAL, ACCOUNT, DEVELOPER). The only namespace the browser
|
|
9
|
-
* fetches.
|
|
7
|
+
* - `widget`: the widget's own text and the errors it shows (WIDGET, ERRORS,
|
|
8
|
+
* API, CAPTCHA, GENERAL, ACCOUNT, DEVELOPER). The only namespace the browser
|
|
9
|
+
* fetches. ERRORS is keyed by error code.
|
|
10
10
|
* - `target`: image labels. The provider translates these into the challenge.
|
|
11
11
|
* - `translation` (i18next's default): server-only text (DATABASE, DATASET,
|
|
12
12
|
* CONTRACT, CONFIG, PORTAL, CLI, FS).
|
package/dist/errorMessage.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Ti18n } from "./types.js";
|
|
2
|
-
export interface
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export interface DisplayedError {
|
|
3
|
+
code: string;
|
|
4
|
+
errorId: string;
|
|
5
|
+
message?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare const
|
|
7
|
+
export declare const FALLBACK_ERROR_TEXT = "Something went wrong";
|
|
8
|
+
export declare const localiseError: (i18n: Ti18n | undefined, error: DisplayedError) => string;
|
|
7
9
|
//# sourceMappingURL=errorMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMessage.d.ts","sourceRoot":"","sources":["../src/errorMessage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errorMessage.d.ts","sourceRoot":"","sources":["../src/errorMessage.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGxC,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAQ1D,eAAO,MAAM,aAAa,SACnB,KAAK,GAAG,SAAS,SAChB,cAAc,KACnB,MAQF,CAAC"}
|
package/dist/errorMessage.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { isWidgetTranslationKey } from "./translationKey.js";
|
|
2
2
|
//#region src/errorMessage.ts
|
|
3
|
+
var FALLBACK_ERROR_TEXT = "Something went wrong";
|
|
3
4
|
/**
|
|
4
|
-
* The
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* text for) keep the server's message.
|
|
5
|
+
* The widget translates errors by code (`ERRORS.<CODE>`) in its own language;
|
|
6
|
+
* the provider sends English only. A code the catalogue does not know keeps the
|
|
7
|
+
* provider's English message. The errorId is always shown so a user's report
|
|
8
|
+
* names the exact place that failed.
|
|
9
9
|
*/
|
|
10
|
-
var
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
return i18n.t(key, { defaultValue:
|
|
10
|
+
var localiseError = (i18n, error) => {
|
|
11
|
+
const key = `ERRORS.${error.code}`;
|
|
12
|
+
const fallback = error.message ?? "Something went wrong";
|
|
13
|
+
return `${i18n?.isInitialized && isWidgetTranslationKey(key) ? i18n.t(key, { defaultValue: fallback }) : fallback} (${error.errorId})`;
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
|
-
export {
|
|
16
|
+
export { FALLBACK_ERROR_TEXT, localiseError };
|
package/dist/errorMessage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorMessage.js","sourceRoot":"","sources":["../src/errorMessage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errorMessage.js","sourceRoot":"","sources":["../src/errorMessage.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAU7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AAQ1D,MAAM,CAAC,MAAM,aAAa,GAAG,CAC5B,IAAuB,EACvB,KAAqB,EACZ,EAAE;IACX,MAAM,GAAG,GAAG,UAAU,KAAK,CAAC,IAAI,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,IAAI,mBAAmB,CAAC;IACtD,MAAM,IAAI,GACT,IAAI,EAAE,aAAa,IAAI,sBAAsB,CAAC,GAAG,CAAC;QACjD,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;QACzC,CAAC,CAAC,QAAQ,CAAC;IACb,OAAO,GAAG,IAAI,KAAK,KAAK,CAAC,OAAO,GAAG,CAAC;AACrC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,6 @@ export { createTranslator } from "./translator.js";
|
|
|
16
16
|
export { createUntranslatedI18n } from "./untranslatedI18n.js";
|
|
17
17
|
export type { Translator } from "./translator.js";
|
|
18
18
|
export type { I18nEvent, I18nLookup, Ti18n, TranslateFn, TranslateOptions, } from "./types.js";
|
|
19
|
-
export {
|
|
20
|
-
export type {
|
|
19
|
+
export { FALLBACK_ERROR_TEXT, localiseError } from "./errorMessage.js";
|
|
20
|
+
export type { DisplayedError } from "./errorMessage.js";
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,GACrB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACN,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,eAAe,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,YAAY,EACZ,sBAAsB,EACtB,UAAU,GACV,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACX,SAAS,EACT,SAAS,EACT,cAAc,EACd,oBAAoB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EACX,SAAS,EACT,UAAU,EACV,KAAK,EACL,WAAW,EACX,gBAAgB,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,GACrB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACN,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,eAAe,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,YAAY,EACZ,sBAAsB,EACtB,UAAU,GACV,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACX,SAAS,EACT,SAAS,EACT,cAAc,EACd,oBAAoB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EACX,SAAS,EACT,UAAU,EACV,KAAK,EACL,WAAW,EACX,gBAAgB,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,5 +10,5 @@ import { NAMESPACES, canTranslate, isWidgetTranslationKey } from "./translationK
|
|
|
10
10
|
import { englishText, isTargetKey, isTranslationKey, targetKeys, translationKeys } from "./serverTranslationKeys.js";
|
|
11
11
|
import { createTranslator } from "./translator.js";
|
|
12
12
|
import { createUntranslatedI18n } from "./untranslatedI18n.js";
|
|
13
|
-
import {
|
|
14
|
-
export { BROWSER_UI_LANGUAGES, LANGUAGE_HEADER, LANGUAGE_QUERY_PARAM, LanguageCodes, Languages, NAMESPACES, browserLanguages, canTranslate, createTranslator, createUntranslatedI18n, englishText, getLanguageDirection, i18nMiddleware, isClientSide, isLanguage, isTargetKey, isTranslationKey, isWidgetTranslationKey, languageHeaders, loadI18next,
|
|
13
|
+
import { FALLBACK_ERROR_TEXT, localiseError } from "./errorMessage.js";
|
|
14
|
+
export { BROWSER_UI_LANGUAGES, FALLBACK_ERROR_TEXT, LANGUAGE_HEADER, LANGUAGE_QUERY_PARAM, LanguageCodes, Languages, NAMESPACES, browserLanguages, canTranslate, createTranslator, createUntranslatedI18n, englishText, getLanguageDirection, i18nMiddleware, isClientSide, isLanguage, isTargetKey, isTranslationKey, isWidgetTranslationKey, languageHeaders, loadI18next, localiseError, matchLanguage, matchLanguageTag, negotiateLanguage, parseLanguageList, requestLanguage, resolveLanguageList, targetKeys, translationKeys, widgetLanguageHeaders };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,GACrB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACN,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,eAAe,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,YAAY,EACZ,sBAAsB,EACtB,UAAU,GACV,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAS/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,GACrB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACN,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,eAAe,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,YAAY,EACZ,sBAAsB,EACtB,UAAU,GACV,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAS/D,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -145,5 +145,46 @@
|
|
|
145
145
|
"MISSING_ENV_VARIABLE": "Omgewingsveranderlike ontbreek",
|
|
146
146
|
"GENERAL": "Algemene ontwikkelingsfout, sien konteks",
|
|
147
147
|
"METHOD_NOT_IMPLEMENTED": "Metode nie geïmplementeer nie"
|
|
148
|
+
},
|
|
149
|
+
"ERRORS": {
|
|
150
|
+
"BACKEND_ERROR": "Interne bedienerfout",
|
|
151
|
+
"FRONTEND_ERROR": "Onbekende API-fout",
|
|
152
|
+
"INVALID_REQUEST": "Slegte versoek",
|
|
153
|
+
"UNAUTHORIZED": "Ongemagtig",
|
|
154
|
+
"FORBIDDEN": "Verbode",
|
|
155
|
+
"SITE_KEY_INVALID": "Ongeldige webwerfsleutel",
|
|
156
|
+
"SITE_KEY_NOT_REGISTERED": "Webwerfsleutel nie geregistreer nie",
|
|
157
|
+
"ORIGIN_NOT_ALLOWED": "Ongemagtigde oorsprong-URL",
|
|
158
|
+
"INVALID_IP": "Ongeldige IP",
|
|
159
|
+
"INVALID_SOLUTION": "Ongeldige oplossing",
|
|
160
|
+
"INVALID_SALT": "Ongeldige sout",
|
|
161
|
+
"INVALID_TIMESTAMP": "Ongeldige tydstempel",
|
|
162
|
+
"TIMESTAMP_TOO_OLD": "Tydstempel te oud",
|
|
163
|
+
"NO_SESSION_FOUND": "Geen sessie gevind nie",
|
|
164
|
+
"SOLUTION_NOT_FOUND": "Oplossing nie gevind nie",
|
|
165
|
+
"INCORRECT_CAPTCHA_TYPE": "Verkeerde CAPTCHA-tipe",
|
|
166
|
+
"CAPTCHA_FAILED": "Jy het een of meer captchas verkeerd beantwoord. Probeer asseblief weer",
|
|
167
|
+
"CLIENT_SESSION_MISMATCH": "Sessie-teenstrydigheid. Die captcha is nie in hierdie sessie voltooi nie.",
|
|
168
|
+
"DECISION_MACHINE_DENIED": "Geweier deur die besluitmasjien",
|
|
169
|
+
"WALLET_NOT_FOUND": "Geen uitbreiding gevind nie",
|
|
170
|
+
"SITE_KEY_MISSING": "WEBWERFSLEUTEL ontbreek",
|
|
171
|
+
"INSECURE_CONTEXT": "Procaptcha vereis 'n veilige (HTTPS) verbinding",
|
|
172
|
+
"ACCOUNT_NOT_FOUND": "Rekening nie gevind nie",
|
|
173
|
+
"FAILED_IP_VALIDATION": "IP-validering het misluk",
|
|
174
|
+
"ACCESS_POLICY_BLOCK": "Toegang deur beleid geblokkeer",
|
|
175
|
+
"ABUSER_BLOCKED": "Versoeke vanaf netwerke wat vir misbruik gemerk is, word nie vir hierdie webwerf toegelaat nie",
|
|
176
|
+
"CRAWLER_BLOCKED": "Versoeke vanaf bekende webkruipers word nie vir hierdie webwerf toegelaat nie",
|
|
177
|
+
"DATACENTER_BLOCKED": "Versoeke vanaf datasentrum-IP-adresse word nie vir hierdie webwerf toegelaat nie",
|
|
178
|
+
"DISALLOWED_WEBVIEW": "Versoeke vanaf ingeboude toepassingblaaiers (WebViews) word nie vir hierdie webwerf toegelaat nie",
|
|
179
|
+
"MOBILE_BLOCKED": "Versoeke vanaf selfoonnetwerkverbindings word nie vir hierdie webwerf toegelaat nie",
|
|
180
|
+
"PROXY_BLOCKED": "Versoeke vanaf instaanbedieners word nie vir hierdie webwerf toegelaat nie",
|
|
181
|
+
"SATELLITE_BLOCKED": "Versoeke vanaf satellietverbindings word nie vir hierdie webwerf toegelaat nie",
|
|
182
|
+
"TOR_BLOCKED": "Versoeke vanaf Tor-uitgangnodusse word nie vir hierdie webwerf toegelaat nie",
|
|
183
|
+
"VPN_BLOCKED": "Versoeke vanaf VPN-verbindings word nie vir hierdie webwerf toegelaat nie",
|
|
184
|
+
"TOO_MANY_LOCALHOST": "Te veel CAPTCHA-versoeke vanaf localhost vir hierdie webwerfsleutel",
|
|
185
|
+
"SPAM_EMAIL_DOMAIN": "E-posdomein nie toegelaat nie",
|
|
186
|
+
"SPAM_EMAIL_RULE": "E-posadres deur strooiposfilterreëls geblokkeer",
|
|
187
|
+
"SPAM_EMAIL_COUNT_EXCEEDED": "Te veel indienings vanaf hierdie e-posadres",
|
|
188
|
+
"PROVIDER_VERIFY_FAILED": "Verskafferverifikasie het misluk"
|
|
148
189
|
}
|
|
149
190
|
}
|
|
@@ -145,5 +145,46 @@
|
|
|
145
145
|
"MISSING_ENV_VARIABLE": "የአካባቢ ተለዋዋጭ ይጎድላል",
|
|
146
146
|
"GENERAL": "አጠቃላይ የገንቢ ስህተት፣ አውዱን ይመልከቱ",
|
|
147
147
|
"METHOD_NOT_IMPLEMENTED": "ዘዴው አልተተገበረም"
|
|
148
|
+
},
|
|
149
|
+
"ERRORS": {
|
|
150
|
+
"BACKEND_ERROR": "የውስጥ አገልጋይ ስህተት",
|
|
151
|
+
"FRONTEND_ERROR": "ያልታወቀ የAPI ስህተት",
|
|
152
|
+
"INVALID_REQUEST": "የተሳሳተ ጥያቄ",
|
|
153
|
+
"UNAUTHORIZED": "ያልተፈቀደ",
|
|
154
|
+
"FORBIDDEN": "የተከለከለ",
|
|
155
|
+
"SITE_KEY_INVALID": "ልክ ያልሆነ የጣቢያ ቁልፍ",
|
|
156
|
+
"SITE_KEY_NOT_REGISTERED": "የጣቢያ ቁልፉ አልተመዘገበም",
|
|
157
|
+
"ORIGIN_NOT_ALLOWED": "ያልተፈቀደ የመነሻ URL",
|
|
158
|
+
"INVALID_IP": "ልክ ያልሆነ IP",
|
|
159
|
+
"INVALID_SOLUTION": "ልክ ያልሆነ መፍትሔ",
|
|
160
|
+
"INVALID_SALT": "ልክ ያልሆነ ጨው",
|
|
161
|
+
"INVALID_TIMESTAMP": "ልክ ያልሆነ የጊዜ ማህተም",
|
|
162
|
+
"TIMESTAMP_TOO_OLD": "የጊዜ ማህተሙ በጣም የቆየ ነው",
|
|
163
|
+
"NO_SESSION_FOUND": "ምንም ክፍለ ጊዜ አልተገኘም",
|
|
164
|
+
"SOLUTION_NOT_FOUND": "መፍትሔ አልተገኘም",
|
|
165
|
+
"INCORRECT_CAPTCHA_TYPE": "የተሳሳተ የCAPTCHA አይነት",
|
|
166
|
+
"CAPTCHA_FAILED": "አንድ ወይም ከዚያ በላይ captchaዎችን በስህተት መልሰዋል። እባክዎ እንደገና ይሞክሩ",
|
|
167
|
+
"CLIENT_SESSION_MISMATCH": "የክፍለ ጊዜ አለመዛመድ። captchaው በዚህ ክፍለ ጊዜ አልተጠናቀቀም።",
|
|
168
|
+
"DECISION_MACHINE_DENIED": "በውሳኔ ማሽኑ ተከልክሏል",
|
|
169
|
+
"WALLET_NOT_FOUND": "ምንም ቅጥያ አልተገኘም",
|
|
170
|
+
"SITE_KEY_MISSING": "የጣቢያ ቁልፍ ይጎድላል",
|
|
171
|
+
"INSECURE_CONTEXT": "Procaptcha ደህንነቱ የተጠበቀ (HTTPS) ግንኙነት ይፈልጋል",
|
|
172
|
+
"ACCOUNT_NOT_FOUND": "መለያ አልተገኘም",
|
|
173
|
+
"FAILED_IP_VALIDATION": "የIP ማረጋገጫ አልተሳካም",
|
|
174
|
+
"ACCESS_POLICY_BLOCK": "መዳረሻ በፖሊሲ ታግዷል",
|
|
175
|
+
"ABUSER_BLOCKED": "አላግባብ ጥቅም ላይ በመዋል ምልክት ከተደረገባቸው አውታረ መረቦች የሚመጡ ጥያቄዎች ለዚህ ጣቢያ አይፈቀዱም",
|
|
176
|
+
"CRAWLER_BLOCKED": "ከታወቁ ክሮውለሮች የሚመጡ ጥያቄዎች ለዚህ ጣቢያ አይፈቀዱም",
|
|
177
|
+
"DATACENTER_BLOCKED": "ከዳታሴንተር IP አድራሻዎች የሚመጡ ጥያቄዎች ለዚህ ጣቢያ አይፈቀዱም",
|
|
178
|
+
"DISALLOWED_WEBVIEW": "ከመተግበሪያ ውስጥ አሳሾች (WebViews) የሚመጡ ጥያቄዎች ለዚህ ጣቢያ አይፈቀዱም",
|
|
179
|
+
"MOBILE_BLOCKED": "ከሞባይል አውታረ መረብ ግንኙነቶች የሚመጡ ጥያቄዎች ለዚህ ጣቢያ አይፈቀዱም",
|
|
180
|
+
"PROXY_BLOCKED": "ከፕሮክሲ አገልጋዮች የሚመጡ ጥያቄዎች ለዚህ ጣቢያ አይፈቀዱም",
|
|
181
|
+
"SATELLITE_BLOCKED": "ከሳተላይት ግንኙነቶች የሚመጡ ጥያቄዎች ለዚህ ጣቢያ አይፈቀዱም",
|
|
182
|
+
"TOR_BLOCKED": "ከTor መውጫ ኖዶች የሚመጡ ጥያቄዎች ለዚህ ጣቢያ አይፈቀዱም",
|
|
183
|
+
"VPN_BLOCKED": "ከVPN ግንኙነቶች የሚመጡ ጥያቄዎች ለዚህ ጣቢያ አይፈቀዱም",
|
|
184
|
+
"TOO_MANY_LOCALHOST": "ለዚህ የጣቢያ ቁልፍ ከlocalhost በጣም ብዙ የCAPTCHA ጥያቄዎች",
|
|
185
|
+
"SPAM_EMAIL_DOMAIN": "የኢሜይል ጎራው አይፈቀድም",
|
|
186
|
+
"SPAM_EMAIL_RULE": "የኢሜይል አድራሻው በአይፈለጌ መልዕክት ማጣሪያ ደንቦች ታግዷል",
|
|
187
|
+
"SPAM_EMAIL_COUNT_EXCEEDED": "ከዚህ ኢሜይል አድራሻ በጣም ብዙ ማስገባቶች",
|
|
188
|
+
"PROVIDER_VERIFY_FAILED": "የአቅራቢ ማረጋገጫ አልተሳካም"
|
|
148
189
|
}
|
|
149
190
|
}
|
|
@@ -145,5 +145,46 @@
|
|
|
145
145
|
"MISSING_ENV_VARIABLE": "Falta a variable d'entorno",
|
|
146
146
|
"GENERAL": "Error cheneral de desembolique, mira o contexto",
|
|
147
147
|
"METHOD_NOT_IMPLEMENTED": "Metodo no implementau"
|
|
148
|
+
},
|
|
149
|
+
"ERRORS": {
|
|
150
|
+
"BACKEND_ERROR": "Error interno d'o servidor",
|
|
151
|
+
"FRONTEND_ERROR": "Error desconoixiu de l'API",
|
|
152
|
+
"INVALID_REQUEST": "Solicitut incorrecta",
|
|
153
|
+
"UNAUTHORIZED": "No autorizau",
|
|
154
|
+
"FORBIDDEN": "Vedau",
|
|
155
|
+
"SITE_KEY_INVALID": "Clau d'o puesto no valida",
|
|
156
|
+
"SITE_KEY_NOT_REGISTERED": "A clau d'o puesto no ye rechistrada",
|
|
157
|
+
"ORIGIN_NOT_ALLOWED": "URL d'orichen no autorizada",
|
|
158
|
+
"INVALID_IP": "IP no valida",
|
|
159
|
+
"INVALID_SOLUTION": "Solución no valida",
|
|
160
|
+
"INVALID_SALT": "Sal no valida",
|
|
161
|
+
"INVALID_TIMESTAMP": "Marca de tiempo no valida",
|
|
162
|
+
"TIMESTAMP_TOO_OLD": "A marca de tiempo ye masiau viella",
|
|
163
|
+
"NO_SESSION_FOUND": "No s'ha trobau garra sesión",
|
|
164
|
+
"SOLUTION_NOT_FOUND": "No s'ha trobau a solución",
|
|
165
|
+
"INCORRECT_CAPTCHA_TYPE": "Tipo de CAPTCHA incorrecto",
|
|
166
|
+
"CAPTCHA_FAILED": "Has respondiu malament a uno u mas captchas. Torna a intentar-lo",
|
|
167
|
+
"CLIENT_SESSION_MISMATCH": "A sesión no coincide. O captcha no s'ha completau en esta sesión.",
|
|
168
|
+
"DECISION_MACHINE_DENIED": "Refusau por o motor de decisions",
|
|
169
|
+
"WALLET_NOT_FOUND": "No s'ha trobau garra extensión",
|
|
170
|
+
"SITE_KEY_MISSING": "Falta a clau d'o puesto",
|
|
171
|
+
"INSECURE_CONTEXT": "Procaptcha amenista una connexión segura (HTTPS)",
|
|
172
|
+
"ACCOUNT_NOT_FOUND": "No s'ha trobau a cuenta",
|
|
173
|
+
"FAILED_IP_VALIDATION": "Ha fallau a validación d'a IP",
|
|
174
|
+
"ACCESS_POLICY_BLOCK": "Acceso blocau por a politica",
|
|
175
|
+
"ABUSER_BLOCKED": "No se permiten solicitutz dende rets marcadas por abuso pa este puesto",
|
|
176
|
+
"CRAWLER_BLOCKED": "No se permiten solicitutz dende rastreyadors conoixius pa este puesto",
|
|
177
|
+
"DATACENTER_BLOCKED": "No se permiten solicitutz dende adrezas IP de centros de datos pa este puesto",
|
|
178
|
+
"DISALLOWED_WEBVIEW": "No se permiten solicitutz dende navegadors integraus en aplicacions (WebView) pa este puesto",
|
|
179
|
+
"MOBILE_BLOCKED": "No se permiten solicitutz dende connexions de ret mobil pa este puesto",
|
|
180
|
+
"PROXY_BLOCKED": "No se permiten solicitutz dende servidors proxy pa este puesto",
|
|
181
|
+
"SATELLITE_BLOCKED": "No se permiten solicitutz dende connexions per satelite pa este puesto",
|
|
182
|
+
"TOR_BLOCKED": "No se permiten solicitutz dende nodos de salida de Tor pa este puesto",
|
|
183
|
+
"VPN_BLOCKED": "No se permiten solicitutz dende connexions VPN pa este puesto",
|
|
184
|
+
"TOO_MANY_LOCALHOST": "Masiadas solicitutz de CAPTCHA dende localhost pa esta clau d'o puesto",
|
|
185
|
+
"SPAM_EMAIL_DOMAIN": "Dominio de correu no permitiu",
|
|
186
|
+
"SPAM_EMAIL_RULE": "Adreza de correu blocada por una regla de filtrau de spam",
|
|
187
|
+
"SPAM_EMAIL_COUNT_EXCEEDED": "Masiaus ninvios dende esta adreza de correu",
|
|
188
|
+
"PROVIDER_VERIFY_FAILED": "Ha fallau a comprebación d'o proveedor"
|
|
148
189
|
}
|
|
149
190
|
}
|