Some checks failed
CI / Lint (bash) (push) Has been cancelled
CI / Lint (markdown) (push) Has been cancelled
CI / Lint (nickel) (push) Has been cancelled
CI / Lint (nushell) (push) Has been cancelled
CI / Lint (rust) (push) Has been cancelled
CI / Benchmark (push) Has been cancelled
CI / Security Audit (push) Has been cancelled
CI / License Compliance (push) Has been cancelled
CI / Code Coverage (push) Has been cancelled
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Build (macos-latest) (push) Has been cancelled
CI / Build (ubuntu-latest) (push) Has been cancelled
CI / Build (windows-latest) (push) Has been cancelled
Replace all TOML form definitions in examples/ and config/ with type-checked Nickel equivalents. Update cli_loader to prefer .ncl (via nickel export) over .toml in config search order. TOML support retained as fallback — no breaking change. - El loader usa nickel export --format json + serde_json como puente — evita reimplementar un parser Nickel en Rust y aprovecha el binario ya existente. - El orden de búsqueda .ncl > .toml permite migración incremental: cualquier config vieja sigue funcionando sin tocarla. - Los contratos Nickel (| default, | String) en los configs sustituyen la validación que antes era implícita en el parsing TOML — el error llega antes (en nickel export) con mensajes más descriptivos.
145 lines
3.8 KiB
Plaintext
145 lines
3.8 KiB
Plaintext
{
|
|
locales = {
|
|
default = "en-US",
|
|
fallback = "en-US",
|
|
en-US = {
|
|
name = "English (United States)",
|
|
direction = "ltr",
|
|
plurals = 2,
|
|
decimal_separator = ".",
|
|
thousands_separator = ",",
|
|
date_format = "MM/DD/YYYY",
|
|
currency_symbol = "$",
|
|
currency_position = "prefix",
|
|
},
|
|
en-GB = {
|
|
name = "English (United Kingdom)",
|
|
direction = "ltr",
|
|
plurals = 2,
|
|
decimal_separator = ".",
|
|
thousands_separator = ",",
|
|
date_format = "DD/MM/YYYY",
|
|
currency_symbol = "£",
|
|
currency_position = "prefix",
|
|
},
|
|
es-ES = {
|
|
name = "Spanish (Spain)",
|
|
direction = "ltr",
|
|
plurals = 2,
|
|
decimal_separator = ",",
|
|
thousands_separator = ".",
|
|
date_format = "DD/MM/YYYY",
|
|
currency_symbol = "€",
|
|
currency_position = "suffix",
|
|
gender_aware = true,
|
|
},
|
|
es-MX = {
|
|
name = "Spanish (Mexico)",
|
|
direction = "ltr",
|
|
plurals = 2,
|
|
decimal_separator = ".",
|
|
thousands_separator = ",",
|
|
date_format = "DD/MM/YYYY",
|
|
currency_symbol = "$",
|
|
currency_position = "prefix",
|
|
gender_aware = true,
|
|
},
|
|
pt-BR = {
|
|
name = "Portuguese (Brazil)",
|
|
direction = "ltr",
|
|
plurals = 2,
|
|
decimal_separator = ",",
|
|
thousands_separator = ".",
|
|
date_format = "DD/MM/YYYY",
|
|
currency_symbol = "R$",
|
|
currency_position = "prefix",
|
|
},
|
|
pt-PT = {
|
|
name = "Portuguese (Portugal)",
|
|
direction = "ltr",
|
|
plurals = 2,
|
|
decimal_separator = ",",
|
|
thousands_separator = ".",
|
|
date_format = "DD/MM/YYYY",
|
|
currency_symbol = "€",
|
|
currency_position = "suffix",
|
|
},
|
|
fr-FR = {
|
|
name = "French (France)",
|
|
direction = "ltr",
|
|
plurals = 3,
|
|
special_plural_rules = true,
|
|
decimal_separator = ",",
|
|
thousands_separator = ".",
|
|
date_format = "DD/MM/YYYY",
|
|
currency_symbol = "€",
|
|
currency_position = "suffix",
|
|
gender_aware = true,
|
|
},
|
|
ja-JP = {
|
|
name = "Japanese (Japan)",
|
|
direction = "ltr",
|
|
plurals = 1,
|
|
decimal_separator = ".",
|
|
thousands_separator = ",",
|
|
date_format = "YYYY年M月D日",
|
|
currency_symbol = "¥",
|
|
currency_position = "prefix",
|
|
decimal_places = 0,
|
|
},
|
|
ar-SA = {
|
|
name = "Arabic (Saudi Arabia)",
|
|
direction = "rtl",
|
|
plurals = 6,
|
|
decimal_separator = ".",
|
|
thousands_separator = ",",
|
|
date_format = "DD MMMM YYYY",
|
|
currency_symbol = "﷼",
|
|
currency_position = "prefix",
|
|
use_arabic_numerals = true,
|
|
},
|
|
},
|
|
fallback_chains = {
|
|
pt-BR = ["pt-PT", "es-ES", "en-US"],
|
|
pt-PT = ["es-ES", "en-US"],
|
|
es-MX = ["es-ES", "en-US"],
|
|
es-ES = ["en-US"],
|
|
en-GB = ["en-US"],
|
|
fr-FR = ["en-US"],
|
|
ja-JP = ["en-US"],
|
|
ar-SA = ["en-US"],
|
|
},
|
|
features = {
|
|
pluralization = true,
|
|
gender_agreement = true,
|
|
number_formatting = true,
|
|
date_formatting = true,
|
|
rtl_support = true,
|
|
fallback_chains = true,
|
|
context_variables = true,
|
|
},
|
|
validation = {
|
|
require_all_keys_in_default = false,
|
|
require_all_keys_in_fallback = false,
|
|
warn_missing_keys = true,
|
|
warn_incomplete_translations = true,
|
|
validate_plural_forms = true,
|
|
},
|
|
coverage = {
|
|
critical_locales = ["en-US", "es-ES", "fr-FR", "ja-JP", "ar-SA"],
|
|
required_coverage_percent = 90,
|
|
warning_coverage_percent = 75,
|
|
},
|
|
testing = {
|
|
test_plurals = true,
|
|
test_count_values = [0, 1, 2, 3, 5, 10, 11, 21, 100, 1000],
|
|
test_dates = true,
|
|
test_amounts = true,
|
|
test_amount_values = [1.99, 10.00, 100.50, 1234.56, 9999.99],
|
|
test_rtl = true,
|
|
rtl_test_locales = ["ar-SA"],
|
|
test_gender = true,
|
|
gender_test_locales = ["es-ES", "es-MX", "pt-BR", "pt-PT", "fr-FR", "ar-SA"],
|
|
},
|
|
}
|