This project outputs HTML in which user interface elements are localized to suite the user's preference.

Language-specific content is organized in **messages** that can be retrieved using their **keys**.

To avoid redundant record keeping with [messages already existing inside mediawiki/wikibase](https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Wikibase/+/master/repo/i18n/), this project explicitly only deals with the keys, importing the message values from there.

## Available messages

Not all messages existing in mediawiki/wikibase are automatically known to this project. To be able to use a message, make sure to add its key to [`MessageKey`](src/common/MessageKey.ts).

In terms of integration with wikibase this leads to a special case: Wikibase reads from this repository's `resource.json` in order to load the required message keys from Wikibase/MediaWiki's i18n service.

## Messages in components

Messages can be used inside component templates by using the [Messages mixin](../src/components/mixins/Messages.ts).

Components can use messages in their templates by using the `message` method, and the `MESSAGE_KEYS` property provided by the mixin, e.g. `message( MESSAGE_KEYS.ALIAS_SEPARATOR )`.
