7.7 KiB
Skyfeed Language and Localisation Support
Version v0.1.0-dev1
Skyfeed is a Canadian-focused weather engine and must provide native support for Canadian languages. This includes fully localised weather conditions, warnings, UI labels, and community/province names. The localisation system is shared with Telefact, so both systems display information consistently.
This document describes the localisation model, supported language bundles, file structure, selection rules, and long-term objectives.
- Supported Locales
Skyfeed currently supports the following Canadian languages:
en-CA Canadian English Default system language
fr-CA Canadian French Required for federal bilingual standards Matches terminology used by Environment Canada and Radio-Canada
iu-CA Inuktitut Written in syllabics Primary language for Nunavut and northern communities Provides localised place names and weather vocabulary
Additional languages may be added in future releases.
- Locale Selection Rules
Skyfeed selects a language using the following priority:
- If the user has configured a language in config/default.json, use it.
- If the user specifies a language using a CLI flag, use it for that run.
- On the first run, Skyfeed will prompt the user to choose a language.
- If a translation key is missing for the chosen language, fall back to en-CA.
Telefact inherits the same localisation engine and will display pages using the configured language.
- Localisation File Structure
All localisation bundles and place-name dictionaries are stored in:
internal/i18n/
Skyfeed uses the following files:
internal/i18n/en_CA.json internal/i18n/fr_CA.json internal/i18n/iu_CA.json
These contain: locale code language name weather condition translations weather alert translations UI text formatting rules
Place name dictionaries are separate:
internal/i18n/places_provinces.json internal/i18n/places_nunavut.json internal/i18n/places_cities.json (future)
Example of a translation structure:
{ "locale": "en-CA", "language_name": "English", "conditions": { "clear": "Clear", "snow": "Snow", "freezing_rain": "Freezing Rain" }, "alerts": { "tornado_warning": "Tornado Warning", "fog_advisory": "Fog Advisory" }, "ui": { "loading": "Loading...", "fetching_weather": "Fetching latest weather..." } }
- Inuktitut (iu-CA) Support
Inuktitut support includes:
- Full syllabic script (ᐃᓄᒃᑎᑐᑦ)
- Basic Roman orthography (future toggle)
- Translation of all Nunavut community names
- Translation of major northern place names in NWT (future)
- Weather condition vocabulary
- Weather alert vocabulary
The goal is to provide a natural-feeling experience for northern users based on public Inuktitut terminology resources.
Inuktitut keys that do not have translations will fall back to en-CA.
- Region-Based Default Language Logic
Skyfeed may automatically choose a default language based on detected location:
Nunavut Default: iu-CA Secondary: en-CA
Quebec Default: fr-CA Secondary: en-CA
Rest of Canada Default: en-CA
Users may override these defaults.
- First-Run Language Prompt
On first run, the CLI or TUI will display:
Please select your language
- English (en-CA)
- Français (fr-CA)
- ᐃᓄᒃᑎᑐᑦ (iu-CA)
The selected language will be saved in:
~/.local/share/skyfeed/config.json or config/default.json
- Localised Weather Alerts
All alert types defined in TAXONOMY.md must provide translations for:
en-CA fr-CA iu-CA
Example:
tornado_warning en-CA: Tornado Warning fr-CA: Alerte Tornade iu-CA: ᐊᓂᖅᑕᖅᑐᖅ ᐅᓪᓗᖓ
If a translation is unavailable in iu-CA or fr-CA, Skyfeed will use the English version automatically.
- Localised Weather Conditions
Normalised condition keys (see WEATHER_TAXONOMY.md) must be translated.
Examples:
clear en-CA: Clear fr-CA: Dégagé iu-CA: ᐅᖃᓕᒫᓂᖅ
snow en-CA: Snow fr-CA: Neige iu-CA: ᐊᐳᑦ
freezing_rain en-CA: Freezing Rain fr-CA: Pluie Verglaçante iu-CA: ᓯᕗᓂᖅ ᐱᒋᐊᓂ
- Localised UI Terminology
Examples:
Fetching latest weather... en-CA: Fetching weather data... fr-CA: Récupération des données météo... iu-CA: ᐊᐅᓪᓚᓂᖅ ᐅᑎᖃᑦᑕᖅ
Current conditions en-CA: Current Conditions fr-CA: Conditions Actuelles iu-CA: ᐅᓂᒃᑳᖅᑐᖅ
Feels like en-CA: Feels Like fr-CA: Ressenti iu-CA: ᐋᖅᑭᖅ ᐊᐅᓪᓚᓂᖅ
- Localised CLI Output
Skyfeed will translate all textual output, including:
City names Province names Weather descriptions Wind and visibility data Warnings and colour-coded alerts Error and status messages
Example French output:
Cornwall, Ontario 14:05 EST Ciel dégagé Ressenti 22°C Vent O 10 km/h Avertissement de pluie
- UI and Telefact Integration
Skyfeed GUI Uses the same translation bundles Respects user language preference
Telefact All pages, headings, alerts, and conditions will use the correct language bundle Inuktitut news feeds will be supported as they become available
- Testing Localisation
Tests must ensure:
All missing keys fall back to en-CA Invalid locale codes default to en-CA iu-CA renders properly even with partial translations Weather numerical formatting follows Canadian standards Wind directions convert correctly per language
Additionally, a debug command will allow testing all languages:
skyfeed debug-languages --location "Iqaluit, NU"
- Future Language Expansion
Future Canadian languages may include:
Cree (cr-CA) Ojibwe (oj-CA) Innu (innu-CA) Dene (den-CA) Dakelh Mohawk
These will be added gradually as vocabulary sets become available.
- Limitations
Some weather concepts may lack simple Inuktitut or Cree translations Non-standard alerts may require English fallback Some community names outside Nunavut may not have official Indigenous forms Translation refinement from native speakers may be required
Skyfeed must always remain functional even if translations are incomplete.
End of LANGUAGE_SUPPORT.md