Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-banana-checker

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-banana-checker

A grunt checker for the "banana" JSON i18n system provided by MediaWiki and jquery.i18n

  • 0.2.0
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

NPM version Build Status grunt-banana-checker

Task for checking JSON files for the "Banana" i18n system provided by MediaWiki and jquery.i18n.

Getting started

If this is the first time you've used grunt, the getting started guide will show you how to get up and running.

Once you have that installed, with a Gruntfile set for your code, you can install the plugin with:

npm install grunt-banana-checker --save-dev

In your Gruntfile, add the line:

grunt.loadNpmTasks( 'grunt-banana-checker' );

Running and configuring

Run this task with the grunt banana command.

This is designed to be very simple and not need configuring for the most common case.

You can specify the targets and options for the task using the normal grunt configuration – see grunt's guide on how to configure tasks in general

Options

For edge cases you can set some path options:

sourceFile

Type: string Default value: "en.json"

The JSON file providing the primary messages.

documentationFile

Type: string Default value: "qqq.json"

The JSON file providing the documentation messages.

Example uses

OOjs UI uses this on a single directory of messages:

banana: {
    all: 'i18n/'
}

VisualEditor's MediaWiki extension uses this on two directories as a single test:

banana: {
    all: 'modules/ve-{mw,wmf}/i18n/'
}

MediaWiki uses this on two directories as different tests – one for the main software and another for the installer:

banana: {
    core: 'languages/i18n/',
    installer: 'includes/installer/i18n/'
}

Checks run

  • The source and documentation files both exist, and are both valid JSON.
  • Both source and documentation include an "@metadata" object.
    • (Note that no parsing is done of the metadata objects.)
  • Each defined source message has a matching defined documentation message.
    • (Note that no parsing is done of the message definitions or their documentation, including if they are simply the blank string "".)
  • Each defined documentation message has a matching defined source message.

Keywords

FAQs

Package last updated on 31 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc