@molecule/api-locales-user 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +98 -0
  2. package/package.json +9 -3
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ <!--
2
+ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
+ Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
+ Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
+ To change this document, edit the module-level JSDoc in src/index.ts.
6
+ Generated: 2026-08-04T00:36:53.146Z
7
+ -->
8
+
9
+ # @molecule/api-locales-user
10
+
11
+ > **Auto-generated, AI-first package reference** for the [molecule.dev](https://molecule.dev) ecosystem.
12
+ > It is written to be read by coding agents as much as by people, and is generated from this
13
+ > package's source — edit `src/index.ts` JSDoc, not this file.
14
+
15
+ Translations for the user resource package in 79 languages
16
+
17
+ ## Languages
18
+
19
+ 79 languages supported: af, am, ar, az, be, bg, bn, bs, ca, cs, cy, da, de, el, en, es, et, eu, fa, fi, fil, fr, ga, gl, gu, ha, he, hi, hr, hu, hy, id, ig, is, it, ja, ka, kk, km, kn, ko, ky, lo, lt, lv, mk, ml, mn, mr, ms, mt, my, nb, ne, nl, pa, pl, pt, ro, ru, si, sk, sl, sq, sr, sv, sw, ta, te, th, tr, uk, ur, uz, vi, yo, zh, zh-TW, zu.
20
+
21
+ ## Quick Start
22
+
23
+ ```typescript
24
+ import { af, am, ar } from '@molecule/api-locales-user'
25
+ import type { UserTranslationKey, UserTranslations } from '@molecule/api-locales-user'
26
+ ```
27
+
28
+ ## Registration
29
+
30
+ In an mlcl-scaffolded app, installed locale bonds are registered automatically by the app's i18n setup at startup — installing this package is normally all you need. To register manually (or in a custom app), pass the whole module to `registerLocaleModule` from `@molecule/api-i18n` at startup:
31
+
32
+ ```typescript
33
+ import { registerLocaleModule } from '@molecule/api-i18n'
34
+ import * as locales from '@molecule/api-locales-user'
35
+
36
+ registerLocaleModule(locales)
37
+ ```
38
+
39
+ ## Editing translations
40
+
41
+ `en.ts` is the canonical key set — every other language file mirrors its keys. To change or add strings, edit the locale files in this package (add new keys to `en.ts` first) or merge overrides at runtime with `addTranslations(locale, map)`. Never hand-write translations inline in feature code: features call `t(key, values, { defaultValue })` and THIS bond supplies the translations — inline strings bypass every other language.
42
+
43
+ ## Translation Keys
44
+
45
+ | Key | English |
46
+ | --------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
47
+ | `user.error.badRequest` | Bad request. |
48
+ | `user.error.notFound` | Not found. |
49
+ | `user.error.failedToCreateSession` | Failed to create session. |
50
+ | `user.error.usernameRequired` | Username is required. |
51
+ | `user.error.passwordRequired` | Password is required. |
52
+ | `user.error.emailInvalid` | Email is invalid. |
53
+ | `user.error.usernameUnavailable` | Username is unavailable. |
54
+ | `user.error.emailAlreadyRegistered` | Email is already registered. |
55
+ | `user.error.failedToHashPassword` | Failed to hash password. |
56
+ | `user.error.invalidCredentials` | Invalid credentials. |
57
+ | `user.error.invalidTwoFactorToken` | Invalid two-factor token. |
58
+ | `user.error.twoFactorVerificationUnavailable` | Two-factor verification unavailable. |
59
+ | `user.error.loginFailed` | Login failed. |
60
+ | `user.notification.newLogin` | New Login |
61
+ | `user.notification.newLoginBody` | New login from {{deviceName}}. |
62
+ | `user.error.usernameCannotBeEmpty` | Username cannot be empty. |
63
+ | `user.error.failedToUpdateUser` | Failed to update user. |
64
+ | `user.error.failedToDeleteUser` | Failed to delete user. |
65
+ | `user.error.failedToReadUser` | Failed to read user. |
66
+ | `user.error.emailRequired` | Email is required. |
67
+ | `user.email.passwordResetSubject` | {{appName}} - Password Reset |
68
+ | `user.email.passwordResetText` | Your password reset token is: {{token}} |
69
+ | `user.email.passwordResetLink` | Reset your password at: {{url}} |
70
+ | `user.email.passwordResetHtml` | <p>Your password reset token is: <strong>{{token}}</strong></p> |
71
+ | `user.email.passwordResetHtmlLink` | <p><a href= |
72
+ | `user.error.failedToProcessPasswordReset` | Failed to process password reset. |
73
+ | `user.error.newPasswordRequired` | New password is required. |
74
+ | `user.error.currentPasswordRequired` | Current password is required. |
75
+ | `user.error.currentPasswordIncorrect` | Current password is incorrect. |
76
+ | `user.error.failedToUpdatePassword` | Failed to update password. |
77
+ | `user.error.planKeyRequired` | planKey is required. |
78
+ | `user.error.invalidPlan` | Invalid plan. |
79
+ | `user.error.failedToUpdateSubscription` | Failed to update subscription. |
80
+ | `user.error.failedToUpdatePlan` | Failed to update plan. |
81
+ | `user.error.twoFactorNotAvailable` | Two-factor authentication is not available. |
82
+ | `user.error.twoFactorRequiresPassword` | Two-factor authentication is enabled on this account. Sign in with your email and password to continue. |
83
+ | `user.error.tokenRequired` | Token is required. |
84
+ | `user.error.noPendingTwoFactorSetup` | No pending two-factor setup. Call with action |
85
+ | `user.error.invalidToken` | Invalid token. |
86
+ | `user.error.twoFactorNotEnabled` | Two-factor is not enabled. |
87
+ | `user.error.invalidAction` | Invalid action. Use |
88
+ | `user.error.twoFactorOperationFailed` | Two-factor operation failed. |
89
+ | `user.error.oauthServerNotConfigured` | OAuth server |
90
+ | `user.error.oauthVerificationFailed` | OAuth verification failed. |
91
+ | `user.error.failedToCreateUser` | Failed to create user. |
92
+ | `user.error.oauthLoginFailed` | OAuth login failed. |
93
+
94
+ ## Metadata
95
+
96
+ - **Type:** locales
97
+ - **Category:** i18n
98
+ - **Stack:** api
package/package.json CHANGED
@@ -1,7 +1,12 @@
1
1
  {
2
2
  "name": "@molecule/api-locales-user",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "license": "Apache-2.0",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/molecule-dev/molecule.git",
8
+ "directory": "packages/api/locales/user"
9
+ },
5
10
  "type": "module",
6
11
  "main": "dist/index.js",
7
12
  "types": "dist/index.d.ts",
@@ -12,14 +17,15 @@
12
17
  }
13
18
  },
14
19
  "files": [
15
- "dist"
20
+ "dist",
21
+ "README.md"
16
22
  ],
17
23
  "scripts": {
18
24
  "build": "tsc",
19
25
  "test": "vitest run"
20
26
  },
21
27
  "peerDependencies": {
22
- "@molecule/api-i18n": "^1.0.0"
28
+ "@molecule/api-i18n": "^1.0.1"
23
29
  },
24
30
  "devDependencies": {
25
31
  "typescript": "6.0.3",