@molecule/api-locales-user
Translations · i18n · API (Node) · v1.2.2 · Apache-2.0
Translations for the user resource package in 79 languages
npm install @molecule/api-locales-userHow it works
@molecule/api-locales-user carries the translations for the i18n package on the API (Node) side. Install it beside that package and the i18n core picks the strings up by locale.
import { af, am, ar } from '@molecule/api-locales-user'
import type { UserTranslationKey, UserTranslations } from '@molecule/api-locales-user'Works with: @molecule/api-i18n
Reference
Translations for the user resource package in 79 languages
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
Languages
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.
Quick Start
import { af, am, ar } from '@molecule/api-locales-user'
import type { UserTranslationKey, UserTranslations } from '@molecule/api-locales-user'
Registration
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:
import { registerLocaleModule } from '@molecule/api-i18n'
import * as locales from '@molecule/api-locales-user'
registerLocaleModule(locales)
Editing translations
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.
Translation Keys
| Key | English |
|---|---|
user.error.badRequest | Bad request. |
user.error.completeTargetMissing | No account exists with the id supplied as completeId. |
user.error.completeIdentityMismatch | The supplied username or email does not identify the completeId account. |
user.error.completeNotOwned | The completeId account signs in through OAuth; its credentials are not provisioned here. |
user.error.identityRequired | Provisioning needs a username or an email to identify the account. |
user.error.usernameEmailConflict | The username and the email belong to two different existing accounts. |
user.error.notFound | Not found. |
user.error.failedToCreateSession | Failed to create session. |
user.error.usernameRequired | Username is required. |
user.error.passwordRequired | Password is required. |
user.error.emailInvalid | Email is invalid. |
user.error.usernameUnavailable | Username is unavailable. |
user.error.emailAlreadyRegistered | Email is already registered. |
user.error.oauthEmailCollision | An account already exists for this email. Please sign in with your original method, then link this provider from your account settings. |
user.error.failedToHashPassword | Failed to hash password. |
user.error.invalidCredentials | Invalid credentials. |
user.error.invalidTwoFactorToken | Invalid two-factor token. |
user.error.twoFactorVerificationUnavailable | Two-factor verification unavailable. |
user.error.loginFailed | Login failed. |
user.notification.newLogin | New Login |
user.notification.newLoginBody | New login from {{deviceName}}. |
user.error.usernameCannotBeEmpty | Username cannot be empty. |
user.error.usernameInvalid | Username may use only letters, numbers, dots, hyphens and underscores. |
user.error.bodyNestedUnderUser | This body nests its fields under |
user.error.failedToUpdateUser | Failed to update user. |
user.error.failedToDeleteUser | Failed to delete user. |
user.error.failedToReadUser | Failed to read user. |
user.error.emailRequired | Email is required. |
user.email.passwordResetSubject | {{appName}} - Password Reset |
user.email.passwordResetText | Your password reset token is: {{token}} |
user.email.passwordResetLink | Reset your password at: {{url}} |
user.email.passwordResetHtml | <p>Your password reset token is: <strong>{{token}}</strong></p> |
user.email.passwordResetHtmlLink | <p><a href= |
user.error.failedToProcessPasswordReset | Failed to process password reset. |
user.error.passwordResetUnavailable | Password reset is not available. |
user.error.newPasswordRequired | New password is required. |
user.error.currentPasswordRequired | Current password is required. |
user.error.currentPasswordIncorrect | Current password is incorrect. |
user.error.failedToUpdatePassword | Failed to update password. |
user.error.planKeyRequired | planKey is required. |
user.error.invalidPlan | Invalid plan. |
user.error.failedToUpdateSubscription | Failed to update subscription. |
user.error.failedToUpdatePlan | Failed to update plan. |
user.error.twoFactorNotAvailable | Two-factor authentication is not available. |
user.error.twoFactorRequiresPassword | Two-factor authentication is enabled on this account. Sign in with your email and password to continue. |
user.error.tokenRequired | Token is required. |
user.error.noPendingTwoFactorSetup | No pending two-factor setup. Call with action |
user.error.invalidToken | Invalid token. |
user.error.twoFactorRequired | A two-factor code is required. |
user.error.twoFactorNotEnabled | Two-factor is not enabled. |
user.error.invalidAction | Invalid action. Use |
user.error.twoFactorOperationFailed | Two-factor operation failed. |
user.error.oauthServerNotConfigured | OAuth server |
user.error.oauthVerificationFailed | OAuth verification failed. |
user.error.failedToCreateUser | Failed to create user. |
user.error.oauthLoginFailed | OAuth login failed. |
user.error.unauthorized | Unauthorized |
user.error.passwordTooLong | Password must be at most {{max}} characters |
user.error.passwordTooShort | Password must be at least {{min}} characters |
user.error.tooManyRequests | Too many attempts. Please wait and try again. |
user.error.webhookUnauthorized | Unauthorized payment notification |
user.error.credentialsNested | This login endpoint reads credentials at the top level, but this body nests them under {{envelope}}. Set loginEndpoint to the route that unwraps this envelope, or use createRequestHandler with mapRequest to unwrap req.body[{{envelope}}] before handlers.logIn. |
user.error.oauthStateMismatch | OAuth state mismatch — possible CSRF attack |
user.error.avatarTooLarge | Avatar must be {{max}} characters or fewer. |
user.error.bioTooLong | Bio must be {{max}} characters or fewer. |
user.error.noUpdatableFields | No updatable fields were provided. |
user.error.oauthDataInvalid | oauthData must be an object. |
user.error.subscriptionActivationRequiresVerification | Subscription activation must go through receipt verification — use POST /users/:id/verify-payment/:provider. |
user.payment.noBillingAccount | No {{provider}} billing account found for this user. |
user.payment.portalFailed | Could not open the {{provider}} billing portal. |
user.payment.portalNotSupported | {{provider}} does not offer a billing portal. |
user.payment.subscriptionOwnershipMismatch | This subscription does not belong to your account. |
user.payment.transactionAlreadyClaimed | This purchase is already associated with another account. |
Metadata
- Type: locales
- Category: i18n
- Stack: api