npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aioha/i18n-keys

v1.0.1

Published

Canonical message IDs, English defaults, and Messages adapter interface for the Aioha UI packages.

Readme

@aioha/i18n-keys

Canonical message IDs, English defaults, ICU-ready catalog, and a framework-neutral Messages adapter interface shared by @aioha/react-ui and @aioha/lit-ui.

Install

pnpm add @aioha/i18n-keys

Quick start

import { createDefaultMessages } from '@aioha/i18n-keys'

const messages = createDefaultMessages({ initialLocale: 'en' })
messages.t('wallet.connect') // "Connect Wallet"
messages.t('auth.oneClick.failed', { error: 'timeout' }) // "Failed to login with one click: timeout"

Pass the messages instance as a prop (React) or context (Lit) to an Aioha modal to override any strings via your preferred i18n stack (react-intl, lingui, etc.) — implement the Messages interface and hand it in.

The Messages interface

interface Messages {
  t(id: MessageId, vars?: Record<string, string | number>): string
  getLocale(): string
  setLocale(locale: string): void | Promise<void>
  getDir(): 'ltr' | 'rtl'
  subscribe(listener: () => void): () => void
}

The default implementation uses intl-messageformat (FormatJS) for ICU, so plurals and selects work out of the box:

{count, plural, one {# account} other {# accounts}}

Loading locales on demand

Only en (and the pseudo-locale en-XA) is bundled into the default Messages instance. The package ships JSON catalogs for additional locales that consumers load on demand:

| Locale | | |---|---| | ar | Arabic (RTL) | | de | German | | en | English (bundled) | | es | Spanish | | fr | French | | hi | Hindi | | hr | Croatian | | it | Italian | | ja | Japanese | | ko | Korean | | ms | Malay | | pl | Polish | | pt | Portuguese | | ru | Russian | | zh-CN | Chinese (Simplified) | | zh-TW | Chinese (Traditional) |

await messages.loadLocale('fr', (lng) =>
  import(`@aioha/i18n-keys/build/locales/${lng}.json`).then((m) => m.default)
)
messages.setLocale('fr')

Pseudo-locale

en-XA is generated at init time by wrapping every English value in [!! ... !!] with accented characters. Use it to catch hardcoded strings, truncation, and concatenation bugs without needing translators:

messages.setLocale('en-XA')
messages.t('wallet.connect') // "[!! Çóññéçt Wállét !!]"

ICU placeholders ({error}, {count, plural, ...}) are preserved.

RTL detection

messages.getDir() returns 'rtl' for Arabic, Hebrew, Persian, Urdu, and similar — either from the runtime's Intl.Locale.textInfo.direction or a built-in language list fallback.

Message IDs

| ID | English default | Variables | |---|---|---| | action.back | Back | | | action.cancel | Cancel | | | action.done | Done | | | action.edit | Edit | | | action.proceed | Proceed | | | action.stop | Stop | | | auth.device.approval | Please approve login request on the device. | | | auth.hiveauth.instruction | Scan the QR code using a HiveAuth-compatible mobile app. | | | auth.hiveauth.openLink | Open HiveAuth payload link | | | auth.oneClick.failed | Failed to login with one click: {error} | error | | auth.oneClick.logging | Logging you in with one click... | | | auth.oneClick.redirecting | Redirecting back to Aioha app... | | | auth.username.label | Hive Username | | | auth.username.placeholder | Enter Hive Username | | | modal.close | Close modal | | | modal.loading | Loading... | | | user.addAccount | Add Account | | | user.addAccountBtn | Add account | | | user.avatarAlt | {user}'s avatar | user | | user.loginAs | Login as {username} | username | | user.logout | Logout | | | user.removeAccount | Remove account | | | user.removeConfirm | Remove {user} | user | | user.switch | Switch User | | | user.switchTo | Switch to {user} | user | | user.viewExplorer | View In Explorer | | | wallet.badge.popular | Popular | | | wallet.badge.snap | Hive Snap | | | wallet.connect | Connect Wallet | | | wallet.connectEthereum | Connect Ethereum Wallet | | | wallet.connectInstruction | Connect with one of our available Hive wallet providers. | | | wallet.ethInstruction | Complete the connection in the wallet popup. | | | wallet.helpLink | Need help connecting a wallet? | | | wallet.provider.other | Other Wallet | | | wallet.provider.viewOnly | View Only | | | wallet.sectionEthereum | Ethereum | | | wallet.sectionHive | Hive | | | wallet.selectType | Select a wallet type to connect. | |

Catalog version

The catalog is versioned. Bump CATALOG_VERSION on any key add / remove / rename. Translators use it to detect required re-reviews.

import { CATALOG_VERSION } from '@aioha/i18n-keys'
console.log(CATALOG_VERSION) // 1