From b66eed230cf3cd2e765b935e25acb2daa298cc8e Mon Sep 17 00:00:00 2001 From: "Shane F. Carr" Date: Wed, 18 Dec 2024 17:42:55 -0800 Subject: [PATCH] Improve docs --- components/datetime/src/neo.rs | 10 ++++++++-- components/decimal/src/lib.rs | 4 +++- .../experimental/src/compactdecimal/formatter.rs | 4 +++- .../src/dimension/currency/compact_formatter.rs | 3 +++ .../experimental/src/dimension/currency/formatter.rs | 3 +++ .../experimental/src/dimension/percent/formatter.rs | 3 +++ .../experimental/src/dimension/units/formatter.rs | 3 +++ .../experimental/src/displaynames/displaynames.rs | 2 +- components/experimental/src/duration/formatter.rs | 3 +++ 9 files changed, 30 insertions(+), 5 deletions(-) diff --git a/components/datetime/src/neo.rs b/components/datetime/src/neo.rs index 9a1c1599658..869beeeed72 100644 --- a/components/datetime/src/neo.rs +++ b/components/datetime/src/neo.rs @@ -56,11 +56,17 @@ define_preferences!( [Copy] DateTimeFormatterPreferences, { - /// The user's preferred numbering system + /// The user's preferred numbering system. + /// + /// Corresponds to the `-u-nu` in Unicode Locale Identifier. numbering_system: NumberingSystem, - /// The user's preferred hour cycle + /// The user's preferred hour cycle. + /// + /// Corresponds to the `-u-hc` in Unicode Locale Identifier. hour_cycle: HourCycle, /// The user's preferred calendar system + /// + /// Corresponds to the `-u-ca` in Unicode Locale Identifier. calendar_algorithm: CalendarAlgorithm } ); diff --git a/components/decimal/src/lib.rs b/components/decimal/src/lib.rs index ddf961fc100..5f09c98018c 100644 --- a/components/decimal/src/lib.rs +++ b/components/decimal/src/lib.rs @@ -121,7 +121,9 @@ define_preferences!( [Copy] FixedDecimalFormatterPreferences, { - /// Numbering System. Corresponds to the `-u-nu` in Unicode Locale Identifier. + /// The user's preferred numbering system. + /// + /// Corresponds to the `-u-nu` in Unicode Locale Identifier. numbering_system: NumberingSystem } ); diff --git a/components/experimental/src/compactdecimal/formatter.rs b/components/experimental/src/compactdecimal/formatter.rs index 08c980a130f..e9565cad2ca 100644 --- a/components/experimental/src/compactdecimal/formatter.rs +++ b/components/experimental/src/compactdecimal/formatter.rs @@ -28,7 +28,9 @@ define_preferences!( [Copy] CompactDecimalFormatterPreferences, { - /// The numbering system used for formatting. + /// The user's preferred numbering system. + /// + /// Corresponds to the `-u-nu` in Unicode Locale Identifier. numbering_system: NumberingSystem } ); diff --git a/components/experimental/src/dimension/currency/compact_formatter.rs b/components/experimental/src/dimension/currency/compact_formatter.rs index 01a9e1de532..a7d4d6247f5 100644 --- a/components/experimental/src/dimension/currency/compact_formatter.rs +++ b/components/experimental/src/dimension/currency/compact_formatter.rs @@ -29,6 +29,9 @@ define_preferences!( [Copy] CompactCurrencyFormatterPreferences, { + /// The user's preferred numbering system. + /// + /// Corresponds to the `-u-nu` in Unicode Locale Identifier. numbering_system: NumberingSystem } ); diff --git a/components/experimental/src/dimension/currency/formatter.rs b/components/experimental/src/dimension/currency/formatter.rs index ec08f236a3b..22522e93f93 100644 --- a/components/experimental/src/dimension/currency/formatter.rs +++ b/components/experimental/src/dimension/currency/formatter.rs @@ -26,6 +26,9 @@ define_preferences!( [Copy] CurrencyFormatterPreferences, { + /// The user's preferred numbering system. + /// + /// Corresponds to the `-u-nu` in Unicode Locale Identifier. numbering_system: NumberingSystem } ); diff --git a/components/experimental/src/dimension/percent/formatter.rs b/components/experimental/src/dimension/percent/formatter.rs index 4012c8179ea..97ea0a69aa1 100644 --- a/components/experimental/src/dimension/percent/formatter.rs +++ b/components/experimental/src/dimension/percent/formatter.rs @@ -25,6 +25,9 @@ define_preferences!( [Copy] PercentFormatterPreferences, { + /// The user's preferred numbering system. + /// + /// Corresponds to the `-u-nu` in Unicode Locale Identifier. numbering_system: NumberingSystem } ); diff --git a/components/experimental/src/dimension/units/formatter.rs b/components/experimental/src/dimension/units/formatter.rs index 7754189dbdb..6d63b85fe25 100644 --- a/components/experimental/src/dimension/units/formatter.rs +++ b/components/experimental/src/dimension/units/formatter.rs @@ -26,6 +26,9 @@ define_preferences!( [Copy] UnitsFormatterPreferences, { + /// The user's preferred numbering system. + /// + /// Corresponds to the `-u-nu` in Unicode Locale Identifier. numbering_system: NumberingSystem } ); diff --git a/components/experimental/src/displaynames/displaynames.rs b/components/experimental/src/displaynames/displaynames.rs index c7567e5410c..2472af1809a 100644 --- a/components/experimental/src/displaynames/displaynames.rs +++ b/components/experimental/src/displaynames/displaynames.rs @@ -17,7 +17,7 @@ use icu_provider::prelude::*; use potential_utf::PotentialUtf8; define_preferences!( - /// The preferences for list formatting. + /// The preferences for display names. [Copy] DisplayNamesPreferences, {} diff --git a/components/experimental/src/duration/formatter.rs b/components/experimental/src/duration/formatter.rs index 0db5cd327c0..f6b1b26783c 100644 --- a/components/experimental/src/duration/formatter.rs +++ b/components/experimental/src/duration/formatter.rs @@ -26,6 +26,9 @@ define_preferences!( [Copy] DurationFormatterPreferences, { + /// The user's preferred numbering system. + /// + /// Corresponds to the `-u-nu` in Unicode Locale Identifier. numbering_system: NumberingSystem } );