@globalfishingwatch/i18n-labels
v1.3.22
Published
i18n label translations for Global Fishing Watch applications
Keywords
Readme
@globalfishingwatch/i18n-labels
A library for managing i18n labels in Global Fishing Watch applications.
Overview
This library contains JSON files with translations and labels for:
- Datasets metadata and schema definitions
- Country flags/names
- Timebar interface elements
It uses Crowdin for managing the translations files
As a developer the only file you need to care about is the source/ file, the rest is managed by the Crowdin project.
Structure
The library is organized into language-specific directories:
i18n-labels/
├── en/ # English translations
├── es/ # Spanish translations
├── fr/ # French translations
├── id/ # Indonesian translations
├── pt/ # Portuguese translations
├── source/ # Source JSON files
└── val/ # Used for the crowdin live translationInstallation
yarn|pnpm add @globalfishingwatch/i18n-labelsAvailable Resources
1. Flags (flags.json)
Contains country names mapped to their ISO-3 codes.
Example usage:
import { flags } from '@globalfishingwatch/i18n-labels'
console.log(flags.USA) // "United States of America"2. Timebar (timebar.json)
Contains translations for the time navigation interface elements:
Example usage:
import { timebar } from '@globalfishingwatch/i18n-labels'
console.log(timebar.playback.playAnimation) // "Play animation"Build and publish to npm (latest)
nx version i18n-labels
nx publish i18n-labelsPublish to production (stable)
nx publish:stable i18n-labels
nx purge:stable i18n-labelsLicense
MIT
