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

messageformat-validator

v3.0.0

Published

Validates that ICU MessageFormat messages are well-formed, and that translated target messages are compatible with their source.

Readme

messageformat-validator

Validates messageformat messages against various errors and warnings.

Install

npm i messageformat-validator

Usage

mfv [options] [subcommand]

Examples

Check for issues in all files within lang/

mfv -s en -p lang/

Add messages that exist in en to all files within lang/, if they are missing

mfv -s en -p lang/ add-missing

Output the myMessage message from the es-es file with all messageformat structure highlighted

mfv -l es-es -p lang/ highlight myMessage

Re-write messages to a standard format, using newlines and tabs for complex arguments, and removing any plural categories that are invalid for each locale (e.g. zero for English, one for Korean)

mfv -s en -p lang/ format -nr

Options:

-V, --version - output the version number

--no-issues - Don't output issues

-i, --ignore <items> - Ignore these comma-separated issue types

-l, --locales <items> - Process only these comma-separated locales

-p, --path <path> - Path to a directory containing locale files

-t, --translator-output - Output JSON of all source messages that are missing or untranslated in the target

-s, --source-locale <locale> - The locale to use as the source

--json-obj - Indicate that the files to be parsed are JSON files with keys that have objects for values with their own keys: translation and context

-h, --help - Display help for command

Subommands:

remove-extraneous - Remove messages that do not exist in the source locale

add-missing - Add messages that do not exist in the target locale

sort - Sort messages alphabetically by key, maintaining any blocks

rename <old-key> <new-key> - Rename a message

highlight <key> - Output a message with all non-translatable ICU MessageFormat structure highlighted

format - Rewrite messages to a standard format

Config File

Some options can be configured with default values in mfv.config.json

{
  "source": "en"
  "path": "lang/",
  "locales": ["ar", "de", "en", "es", "es-es", "hi", "tr"],
  "jsonObj": true
}

Errors

argument - Unrecognized argument

brace - Mismatched braces

category - Unsupported category

duplicate - Multiple messages with the same name

extraneous - Message does not exist in the source locale

missing - Message missing from the target locale

nbsp - Message structure contains non-breaking space

nest - The nesting order of the target message does not match the source message

option - Unrecognized option

option-missing - Missing option used in the source

other - Missing "other" option

parse - Failed to parse message

source - Failed to parse source message

Warnings

category-missing - Missing categories used by the target locale

nest-ideal - A select is nested inside a plural or selectordinal

nest-order - Nesting order does not match source

split - Split by a complex argument

untranslated - Message has not been translated