codegen library
The parts of airglot_l10n that airglot_l10n_gen uses. No Flutter imports.
Classes
- IcuArgument
- IcuCase
- IcuDateArgument
- IcuLiteral
- IcuNode
- IcuParser
-
Parses the ICU subset that
flutter gen-l10naccepts, with the same lexing rules as flutter_tools'message_parser.dart. - IcuPlural
- IcuSelect
Enums
Constants
-
airglotDateFormats
→ const Set<
String> -
The
intl.DateFormatnamed constructors gen-l10n accepts as a placeholderformator an inline{d, date, ::skeleton}. -
airglotNumberFormats
→ const Set<
String> -
The
intl.NumberFormatnamed constructors gen-l10n accepts as a placeholderformat. -
airglotNumberFormatsWithNamedParameters
→ const Set<
String> -
The number formats gen-l10n calls with named parameters, so
optionalParametersapplies to them.
Functions
-
airglotLocaleKey(
String tag) → String -
The library's one spelling of a locale:
pt_BR,zh_Hant_TW. The pointer writespt-BRand gen-l10n's ARB files writept_BR; both map here. -
airglotLocaleParents(
String key) → Iterable< String> -
keyand its parents by truncation, nearest first:zh_Hant_TW,zh_Hant,zh. -
airglotSourceDigest(
List< String> getterTexts) → String - A short hash of the template-locale getter texts, in message order. The generator embeds it; debug builds recompute it from the compiled getters.
-
airglotSourceHash(
String message, Object? declaredPlaceholders) → String -
The spec §9.4 source hash of a template message, equal to the service's
sourceHashfor the same message and@key.placeholders. -
canonicalJson(
Object? value) → String -
Port of the service's canonical-json.ts: keys sorted by UTF-16 code unit,
scalars as JavaScript's
JSON.stringifywrites them. -
icuArguments(
List< IcuNode> nodes) → Iterable<(String, IcuArgumentUse)> -
Every argument reference in
nodes, depth first, in source order.