286 lines
7.7 KiB
Markdown
286 lines
7.7 KiB
Markdown
# 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.
|
|
|
|
------------------------------------------------------------
|
|
1. 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.
|
|
|
|
------------------------------------------------------------
|
|
2. Locale Selection Rules
|
|
------------------------------------------------------------
|
|
|
|
Skyfeed selects a language using the following priority:
|
|
|
|
1. If the user has configured a language in config/default.json, use it.
|
|
2. If the user specifies a language using a CLI flag, use it for that run.
|
|
3. On the first run, Skyfeed will prompt the user to choose a language.
|
|
4. 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.
|
|
|
|
------------------------------------------------------------
|
|
3. 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..."
|
|
}
|
|
}
|
|
|
|
------------------------------------------------------------
|
|
4. Inuktitut (iu-CA) Support
|
|
------------------------------------------------------------
|
|
|
|
Inuktitut support includes:
|
|
|
|
1. Full syllabic script (ᐃᓄᒃᑎᑐᑦ)
|
|
2. Basic Roman orthography (future toggle)
|
|
3. Translation of all Nunavut community names
|
|
4. Translation of major northern place names in NWT (future)
|
|
5. Weather condition vocabulary
|
|
6. 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.
|
|
|
|
------------------------------------------------------------
|
|
5. 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.
|
|
|
|
------------------------------------------------------------
|
|
6. First-Run Language Prompt
|
|
------------------------------------------------------------
|
|
|
|
On first run, the CLI or TUI will display:
|
|
|
|
Please select your language
|
|
1. English (en-CA)
|
|
2. Français (fr-CA)
|
|
3. ᐃᓄᒃᑎᑐᑦ (iu-CA)
|
|
|
|
The selected language will be saved in:
|
|
|
|
~/.local/share/skyfeed/config.json
|
|
or
|
|
config/default.json
|
|
|
|
------------------------------------------------------------
|
|
7. 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.
|
|
|
|
------------------------------------------------------------
|
|
8. 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: ᓯᕗᓂᖅ ᐱᒋᐊᓂ
|
|
|
|
------------------------------------------------------------
|
|
9. 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: ᐋᖅᑭᖅ ᐊᐅᓪᓚᓂᖅ
|
|
|
|
------------------------------------------------------------
|
|
10. 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
|
|
|
|
------------------------------------------------------------
|
|
11. 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
|
|
|
|
------------------------------------------------------------
|
|
12. 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"
|
|
|
|
------------------------------------------------------------
|
|
13. 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.
|
|
|
|
------------------------------------------------------------
|
|
14. 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
|