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

@wealthbar/i18n

v1.1.9

Published

WealthBar's i18n toolkit

Readme

WealthBar i18n Tools

These tools have been designed specifically for the WealthBar team to translate VueJS apps using gettext and the Transifex service. If you feel they are useful to you or your project feel free to use them.

i18n Translating an App

0. Add the i18nMixin to your component

You must explictly add i18n directives and functions using a mixin. This is done globally by adding;

import { i18nMixin } from '@wealthbar/i18n'

Vue.mixin(i18nMixin)

But it can also be loaded locally in any directive if global behaviour is not desired.

1. Mark text strings for translation

In Vue component templates you can use the v-translate or v-t directive.

<p v-translate>Translate this content.</p>
<p v-t="['this', 'message']">Translate %1 %2</p>
<p v-t context="imperative">Translate</p>

You can supply arguments to replace ordered labels in the string to the directive as a binding value. Adding a context attribute will set a context for a particular string so that it can be translated multiple ways depending on the context of usage.

It is also important to escape reserved HTML entities like <, > and & as &lt;, &gt; and &amp; to avoid a mismatch when translating.

<span v-t>5 &gt; 3 &amp; 6 &lt; 7</span>

It is ok to include HTML elements in translated strings, but they must not include VueJS components, directives or bindings. Otherwise the translated content will change and the translation will not longer match.

<p v-t>
  <span>This is a description of</span>
  <a href="https://somewhere.example">a link</a>
  <span>to some content.</span>
</p>

In Vue component code use the this.$t to translate strings in code within Vue components.

computed: {
  message() { this.$t('translate this message'); }
}

It is possible to substitute arguments by supplying them as a second argument.

computed: {
  message() { this.$t('translate %1 %2', ['this', 'message']); }
}

Finally you can supply a context as the third argument.

computed: {
  message() { this.$t('translate %1 %2', ['this', 'message'], 'imperative'); }
}

Anywhere else it is possible to just import the translate function from the package.

import { translate as $t } from '@wealthbar/i18n`;

It is important to name the function $t if you want to use the i18nextract script to automtically find and extract translatable strings.

2. Extract strings for translation

yarn i18nextract src/

This will scan .vue and .js files and extract strings for translation to i18n/messages.pot

3. Submit string to Transifex for translations

Install Transifex Client

https://docs.transifex.com/client/installing-the-client

After installing you will want to initialize using tx init which will require you to provide an API key for your transifex account.

Push translations to Transifiex

tx push --source

Translate new and changed strings

These can be submitted to a translation service via the Transifex UI.

Pull translated strings

tx pull -f

Check in translation

Finally check in the translations and deploy.