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

@xivdyetools/bot-i18n

v1.0.1

Published

Platform-agnostic translation engine for bot UI strings — error messages, help text, command descriptions, and status messages

Readme

@xivdyetools/bot-i18n

Platform-agnostic translation engine for XIV Dye Tools bot UI strings — error messages, help text, command descriptions, and status messages in 6 languages.

npm version License: MIT

Overview

@xivdyetools/bot-i18n provides a lightweight translation engine for bot-facing UI strings (not dye names — those come from @xivdyetools/core). Locale data is bundled as static JSON imports, making it compatible with Cloudflare Workers, Node.js, and browsers.

Supported locales: English (en), Japanese (ja), German (de), French (fr), Korean (ko), Chinese (zh)

Installation

npm install @xivdyetools/bot-i18n

Usage

Translator Class

import { createTranslator } from '@xivdyetools/bot-i18n';

const t = createTranslator('ja');

// Simple key lookup (dot notation)
t.t('common.footer');
// → "XIV Dye Tools"

// With variable interpolation
t.t('errors.dyeNotFound', { name: 'Snow White' });
// → 'Could not find a dye named "Snow White".'

// Falls back to English for missing keys
t.t('some.key.only.in.english');
// → English value (with a warning if logger is provided)

Stateless Translation

import { translate } from '@xivdyetools/bot-i18n';

// One-off translation without creating an instance
const text = translate('en', 'dye.info.detailedInfo', { category: 'Red' });

Locale Utilities

import { getAvailableLocales, isLocaleSupported } from '@xivdyetools/bot-i18n';

getAvailableLocales();
// → ['en', 'ja', 'de', 'fr', 'ko', 'zh']

isLocaleSupported('ja');  // → true
isLocaleSupported('es');  // → false

API

| Export | Kind | Description | |--------|------|-------------| | Translator | class | Locale-bound translator with fallback to English | | createTranslator(locale) | function | Factory for Translator instances | | translate(locale, key, vars?) | function | Stateless one-off translation | | getAvailableLocales() | function | Returns array of supported locale codes | | isLocaleSupported(code) | function | Type guard for locale validation |

Types

| Export | Description | |--------|-------------| | LocaleCode | 'en' \| 'ja' \| 'de' \| 'fr' \| 'ko' \| 'zh' | | LocaleData | Shape of a locale's translation JSON | | TranslatorLogger | Optional logger interface for missing-key warnings |

Translation Keys

Translation keys use dot notation to navigate the JSON structure:

common.footer            → Footer text
errors.dyeNotFound       → Dye not found message
dye.info.detailedInfo    → Dye info card description
harmony.title            → Harmony wheel title
gradient.title           → Gradient bar title

Adding Translations

Locale files are in src/locales/*.json. Each file mirrors the English (en.json) structure. Missing keys automatically fall back to English at runtime.

Connect With Me

Flash Galatine | Midgardsormr (Aether)

🎮 FFXIV: Lodestone Character 📝 Blog: Project Galatine 💻 GitHub: @FlashGalatine 📺 Twitch: flashgalatine 🌐 BlueSky: projectgalatine.com ❤️ Patreon: ProjectGalatineKo-Fi: flashgalatine 💬 Discord: Join Server

License

MIT © 2025-2026 Flash Galatine