From 663a8430bfe03f7c76418b106cc204785791bfc9 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 6 Feb 2023 17:08:49 +0100 Subject: [PATCH 01/29] replace intl numberformat --- dart/lib/src/sentry_tracer.dart | 6 +-- dart/lib/src/utils/sample_rate_format.dart | 9 +++++ dart/pubspec.yaml | 1 - dart/test/utils/sample_rate_format_test.dart | 39 ++++++++++++++++++++ 4 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 dart/lib/src/utils/sample_rate_format.dart create mode 100644 dart/test/utils/sample_rate_format_test.dart diff --git a/dart/lib/src/sentry_tracer.dart b/dart/lib/src/sentry_tracer.dart index d78aee7041..473bea16fc 100644 --- a/dart/lib/src/sentry_tracer.dart +++ b/dart/lib/src/sentry_tracer.dart @@ -1,10 +1,10 @@ import 'dart:async'; -import 'package:intl/intl.dart'; import 'package:meta/meta.dart'; import '../sentry.dart'; import 'sentry_tracer_finish_status.dart'; +import 'utils/sample_rate_format.dart'; @internal class SentryTracer extends ISentrySpan { @@ -345,9 +345,7 @@ class SentryTracer extends ISentrySpan { if (!isValidSampleRate(sampleRate)) { return null; } - // requires intl package - final formatter = NumberFormat('#.################'); - return formatter.format(sampleRate); + return sampleRate != null ? SampleRateFormat.format(sampleRate) : null; } bool _isHighQualityTransactionName(SentryTransactionNameSource source) { diff --git a/dart/lib/src/utils/sample_rate_format.dart b/dart/lib/src/utils/sample_rate_format.dart new file mode 100644 index 0000000000..a1182f671d --- /dev/null +++ b/dart/lib/src/utils/sample_rate_format.dart @@ -0,0 +1,9 @@ +import 'package:meta/meta.dart'; + +@internal +class SampleRateFormat { + static String format(double sampleRate) { + final fixed = sampleRate.toStringAsFixed(16); + return fixed.replaceAll(RegExp(r"([.]*0+)(?!.*\d)"), ""); + } +} diff --git a/dart/pubspec.yaml b/dart/pubspec.yaml index 7f823b0770..281926dd4c 100644 --- a/dart/pubspec.yaml +++ b/dart/pubspec.yaml @@ -15,7 +15,6 @@ dependencies: meta: ^1.3.0 stack_trace: ^1.10.0 uuid: ^3.0.0 - intl: '>=0.17.0 <1.0.0' dev_dependencies: mockito: ^5.1.0 diff --git a/dart/test/utils/sample_rate_format_test.dart b/dart/test/utils/sample_rate_format_test.dart new file mode 100644 index 0000000000..fccff4d005 --- /dev/null +++ b/dart/test/utils/sample_rate_format_test.dart @@ -0,0 +1,39 @@ +import 'package:sentry/src/utils/sample_rate_format.dart'; +import 'package:test/test.dart'; + +void main() { + test('format', () { + final inputsAndOutputs = [ + Tuple(0.0, '0'), + Tuple(1.0, '1'), + Tuple(0.1, '0.1'), + Tuple(0.11, '0.11'), + Tuple(0.19, '0.19'), + Tuple(0.191, '0.191'), + Tuple(0.1919, '0.1919'), + Tuple(0.19191, '0.19191'), + Tuple(0.191919, '0.191919'), + Tuple(0.1919191, '0.1919191'), + Tuple(0.19191919, '0.19191919'), + Tuple(0.191919191, '0.191919191'), + Tuple(0.1919191919, '0.1919191919'), + Tuple(0.19191919191, '0.19191919191'), + Tuple(0.191919191919, '0.191919191919'), + Tuple(0.1919191919191, '0.1919191919191'), + Tuple(0.19191919191919, '0.19191919191919'), + Tuple(0.191919191919191, '0.191919191919191'), + Tuple(0.1919191919191919, '0.1919191919191919'), + Tuple(0.19191919191919199, '0.191919191919192'), + ]; + + for (var inputAndOutput in inputsAndOutputs) { + expect(SampleRateFormat.format(inputAndOutput.i), inputAndOutput.o); + } + }); +} + +class Tuple { + Tuple(this.i, this.o); + final double i; + final String o; +} From 2bab34207e36fd20ce0f206ad2b9fc9ce143ffc7 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 6 Feb 2023 17:12:03 +0100 Subject: [PATCH 02/29] add changelog entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a93758ff0d..b5b7c1b690 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - View hierarchy reads size from RenderBox only ([#1258](https://github.com/getsentry/sentry-dart/pull/1258)) +### Chores + +- Replace intl NumberFormat ([#1269](https://github.com/getsentry/sentry-dart/pull/1269)) + ## 7.0.0-beta.1 ### Fixes From aa1fcc6a960a1c0eef57d7b1e9c88272334b77e2 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 7 Feb 2023 09:02:05 +0100 Subject: [PATCH 03/29] remove changelog entry --- CHANGELOG.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5b7c1b690..a93758ff0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,6 @@ - View hierarchy reads size from RenderBox only ([#1258](https://github.com/getsentry/sentry-dart/pull/1258)) -### Chores - -- Replace intl NumberFormat ([#1269](https://github.com/getsentry/sentry-dart/pull/1269)) - ## 7.0.0-beta.1 ### Fixes From 02b12e09207dbf06bb4037ccd87474509e44ca8e Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 7 Feb 2023 09:30:29 +0100 Subject: [PATCH 04/29] update formatting of > 16 digits --- dart/lib/src/utils/sample_rate_format.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dart/lib/src/utils/sample_rate_format.dart b/dart/lib/src/utils/sample_rate_format.dart index a1182f671d..1b2ca48a12 100644 --- a/dart/lib/src/utils/sample_rate_format.dart +++ b/dart/lib/src/utils/sample_rate_format.dart @@ -1,9 +1,17 @@ +import 'dart:math'; + import 'package:meta/meta.dart'; @internal class SampleRateFormat { static String format(double sampleRate) { - final fixed = sampleRate.toStringAsFixed(16); + final rounded = dp(sampleRate, 16); + final fixed = rounded.toStringAsFixed(16); return fixed.replaceAll(RegExp(r"([.]*0+)(?!.*\d)"), ""); } + + static double dp(double val, int places){ + num mod = pow(10.0, places); + return ((val * mod).round().toDouble() / mod); + } } From ab4b869ca349a89fa7c3ac04f32a8323f1a66ed3 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 14 Feb 2023 15:21:59 +0100 Subject: [PATCH 05/29] vendor intl files --- dart/lib/src/sentry_tracer.dart | 4 +- dart/lib/src/utils/sample_rate_format.dart | 17 - .../vendor/intl/compact_number_format.dart | 596 ++ dart/lib/src/vendor/intl/constants.dart | 164 + dart/lib/src/vendor/intl/global_state.dart | 19 + dart/lib/src/vendor/intl/intl_helpers.dart | 226 + dart/lib/src/vendor/intl/number_format.dart | 934 +++ .../src/vendor/intl/number_format_parser.dart | 366 ++ dart/lib/src/vendor/intl/number_parser.dart | 241 + dart/lib/src/vendor/intl/number_symbols.dart | 65 + .../src/vendor/intl/number_symbols_data.dart | 5348 +++++++++++++++++ dart/lib/src/vendor/intl/plural_rules.dart | 602 ++ dart/lib/src/vendor/intl/string_stack.dart | 49 + .../intl/number_format_test.dart} | 4 +- 14 files changed, 8614 insertions(+), 21 deletions(-) delete mode 100644 dart/lib/src/utils/sample_rate_format.dart create mode 100644 dart/lib/src/vendor/intl/compact_number_format.dart create mode 100644 dart/lib/src/vendor/intl/constants.dart create mode 100644 dart/lib/src/vendor/intl/global_state.dart create mode 100644 dart/lib/src/vendor/intl/intl_helpers.dart create mode 100644 dart/lib/src/vendor/intl/number_format.dart create mode 100644 dart/lib/src/vendor/intl/number_format_parser.dart create mode 100644 dart/lib/src/vendor/intl/number_parser.dart create mode 100644 dart/lib/src/vendor/intl/number_symbols.dart create mode 100644 dart/lib/src/vendor/intl/number_symbols_data.dart create mode 100644 dart/lib/src/vendor/intl/plural_rules.dart create mode 100644 dart/lib/src/vendor/intl/string_stack.dart rename dart/test/{utils/sample_rate_format_test.dart => vendor/intl/number_format_test.dart} (86%) diff --git a/dart/lib/src/sentry_tracer.dart b/dart/lib/src/sentry_tracer.dart index a2aace5986..3d896ae8d3 100644 --- a/dart/lib/src/sentry_tracer.dart +++ b/dart/lib/src/sentry_tracer.dart @@ -4,7 +4,7 @@ import 'package:meta/meta.dart'; import '../sentry.dart'; import 'sentry_tracer_finish_status.dart'; -import 'utils/sample_rate_format.dart'; +import 'vendor/intl/number_format.dart'; @internal class SentryTracer extends ISentrySpan { @@ -346,7 +346,7 @@ class SentryTracer extends ISentrySpan { if (!isValidSampleRate(sampleRate)) { return null; } - return sampleRate != null ? SampleRateFormat.format(sampleRate) : null; + return sampleRate != null ? NumberFormat("#.################").format(sampleRate) : null; } bool _isHighQualityTransactionName(SentryTransactionNameSource source) { diff --git a/dart/lib/src/utils/sample_rate_format.dart b/dart/lib/src/utils/sample_rate_format.dart deleted file mode 100644 index 1b2ca48a12..0000000000 --- a/dart/lib/src/utils/sample_rate_format.dart +++ /dev/null @@ -1,17 +0,0 @@ -import 'dart:math'; - -import 'package:meta/meta.dart'; - -@internal -class SampleRateFormat { - static String format(double sampleRate) { - final rounded = dp(sampleRate, 16); - final fixed = rounded.toStringAsFixed(16); - return fixed.replaceAll(RegExp(r"([.]*0+)(?!.*\d)"), ""); - } - - static double dp(double val, int places){ - num mod = pow(10.0, places); - return ((val * mod).round().toDouble() / mod); - } -} diff --git a/dart/lib/src/vendor/intl/compact_number_format.dart b/dart/lib/src/vendor/intl/compact_number_format.dart new file mode 100644 index 0000000000..af2012ccc3 --- /dev/null +++ b/dart/lib/src/vendor/intl/compact_number_format.dart @@ -0,0 +1,596 @@ +// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +part of 'number_format.dart'; + +// Suppress naming issues as changes would be breaking. +// ignore_for_file: constant_identifier_names + +/// An abstract class for compact number styles. +abstract class _CompactStyleBase { + /// The _CompactStyle for the [number]. + _CompactStyle styleForNumber(dynamic number, _CompactNumberFormat format); + + /// What should we divide the number by in order to print. Normally it is + /// either `10^normalizedExponent` or 1 if we shouldn't divide at all. + int get divisor; + + /// The iterable of all possible styles which we represent. + /// + /// Normally this will be either a list with just ourself, or of two elements + /// for our positive and negative styles. + Iterable<_CompactStyle> get allStyles; +} + +/// A compact format with separate styles for plural forms. +class _CompactStyleWithPlurals extends _CompactStyleBase { + int exponent; + Map styles; + plural_rules.PluralCase Function()? _plural; + late _CompactStyleBase _defaultStyle; + + _CompactStyleWithPlurals(this.styles, this.exponent, String? locale) { + _plural = plural_rules.pluralRules[locale]; + _defaultStyle = styles['other']!; + } + + @override + Iterable<_CompactStyle> get allStyles => + styles.values.expand((x) => x.allStyles); + + @override + int get divisor => _defaultStyle.divisor; + + @override + _CompactStyle styleForNumber(dynamic number, _CompactNumberFormat format) { + var value = number.abs(); + if (_plural == null) { + return _defaultStyle.styleForNumber(number, format); + } + + var displayed = value; + var precision = format._minimumFractionDigits; + + if (format.significantDigitsInUse) { + // Note: this is not 100% correct, but good enough for most cases. + var integerPart = format._floor(value); + var integerLength = NumberFormat.numberOfIntegerDigits(integerPart); + if (format.minimumSignificantDigits != null) { + precision = max(0, format.minimumSignificantDigits! - integerLength); + } + } + + // Round to the right precision. + var factor = pow(10, precision); + displayed = (displayed * factor).round() / factor; + + if (format.significantDigitsInUse && + !format.minimumSignificantDigitsStrict) { + // Check for trailing 0. + var fractionStr = format._floor(displayed * factor).toString(); + while (precision > 0 && fractionStr.endsWith('0')) { + precision--; + fractionStr = fractionStr.substring(0, fractionStr.length - 1); + } + } + + // Direct value? (French 1000 => "mille" has key "1".) + if (number >= 0 && precision == 0) { + var indexed = styles[format._floor(displayed).toString()]; + if (indexed != null) { + return indexed.styleForNumber(number, format); + } + } + + plural_rules.startRuleEvaluation(displayed, precision); + var pluralCase = _plural!(); + var style = _defaultStyle; + switch (pluralCase) { + case plural_rules.PluralCase.ZERO: + style = styles['zero'] ?? _defaultStyle; + break; + case plural_rules.PluralCase.ONE: + style = styles['one'] ?? _defaultStyle; + break; + case plural_rules.PluralCase.TWO: + style = styles['two'] ?? styles['few'] ?? _defaultStyle; + break; + case plural_rules.PluralCase.FEW: + style = styles['few'] ?? _defaultStyle; + break; + case plural_rules.PluralCase.MANY: + style = styles['many'] ?? _defaultStyle; + break; + default: + // Keep _defaultStyle; + } + return style.styleForNumber(number, format); + } +} + +/// A compact format with separate styles for positive and negative numbers. +class _CompactStyleWithNegative extends _CompactStyleBase { + _CompactStyleWithNegative(this.positiveStyle, this.negativeStyle); + final _CompactStyle positiveStyle; + final _CompactStyle negativeStyle; + + @override + _CompactStyle styleForNumber(dynamic number, _CompactNumberFormat format) => + number < 0 ? negativeStyle : positiveStyle; + + @override + int get divisor => positiveStyle.divisor; + + @override + List<_CompactStyle> get allStyles => [positiveStyle, negativeStyle]; +} + +/// Represents a compact format for a particular base +/// +/// For example, 10K can be used to represent 10,000. Corresponds to one of the +/// patterns in COMPACT_DECIMAL_SHORT_FORMAT. So, for example, in en_US we have +/// the pattern +/// +/// 4: '00K' +/// which matches +/// +/// _CompactStyle(pattern: '00K', divisor: 1000, +/// prefix: '', suffix: 'K'); +class _CompactStyle extends _CompactStyleBase { + _CompactStyle( + {this.pattern, + this.divisor = 1, + this.positivePrefix = '', + this.negativePrefix = '', + this.positiveSuffix = '', + this.negativeSuffix = '', + this.isDirectValue = false}); + + /// The pattern on which this is based. + /// + /// We don't actually need this, but it makes debugging easier. + String? pattern; + + /// What should we divide the number by in order to print. Normally is either + /// 10^normalizedExponent or 1 if we shouldn't divide at all. + @override + int divisor; + + // Prefixes / suffixes. + String positivePrefix; + String negativePrefix; + String positiveSuffix; + String negativeSuffix; + + /// Whether this pattern omits numbers. Ex: "mille" for 1000 in fr. + bool isDirectValue; + + /// Return true if this is the fallback compact pattern, printing the number + /// un-compacted. e.g. 1200 might print as '1.2K', but 12 just prints as '12'. + /// + /// For currencies, with the fallback pattern we use the super implementation + /// so that we will respect things like the default number of decimal digits + /// for a particular currency (e.g. two for USD, zero for JPY) + bool get isFallback => pattern == null || pattern == '0'; + + @override + _CompactStyle styleForNumber(dynamic number, _CompactNumberFormat format) => + this; + + @override + List<_CompactStyle> get allStyles => [this]; + + static final _regex = RegExp('([^0]*)(0+)(.*)'); + + static final _justZeros = RegExp(r'^0*$'); + + /// Does pattern have any additional characters or is it just zeros. + static bool _hasNonZeroContent(String pattern) => + !_justZeros.hasMatch(pattern); + + /// Creates a [_CompactStyle] instance for pattern with [normalizedExponent]. + static _CompactStyle createStyle( + NumberSymbols symbols, String pattern, int normalizedExponent, + {bool isSigned = false, bool explicitSign = false}) { + var prefix = ''; + var suffix = ''; + var divisor = 1; + var isDirectValue = false; + var match = _regex.firstMatch(pattern); + if (match != null) { + prefix = match.group(1)!; + suffix = match.group(3)!; + // If the pattern is just zeros, with no suffix, then we shouldn't divide + // by the number of digits. e.g. for 'af', the pattern for 3 is '0', but + // it doesn't mean that 4321 should print as 4. But if the pattern was + // '0K', then it should print as '4K'. So we have to check if the pattern + // has a suffix. This seems extremely hacky, but I don't know how else to + // encode that. Check what other things are doing. + if (_hasNonZeroContent(pattern)) { + var integerDigits = match.group(2)!.length; + divisor = pow(10, normalizedExponent - integerDigits + 1) as int; + } + } else { + if (pattern.isNotEmpty && !pattern.contains('0')) { + // "Direct" pattern: no numbers. + divisor = pow(10, normalizedExponent) as int; + isDirectValue = true; + } + } + + final positivePrefix = + (explicitSign && !isSigned) ? '${symbols.PLUS_SIGN}$prefix' : prefix; + final negativePrefix = + (!isSigned) ? '${symbols.MINUS_SIGN}$prefix' : prefix; + final positiveSuffix = suffix; + final negativeSuffix = suffix; + + return _CompactStyle( + pattern: pattern, + positivePrefix: positivePrefix, + negativePrefix: negativePrefix, + positiveSuffix: positiveSuffix, + negativeSuffix: negativeSuffix, + divisor: divisor, + isDirectValue: isDirectValue); + } +} + +/// Enumerates the different formats supported. +enum _CompactFormatType { + COMPACT_DECIMAL_SHORT_PATTERN, + COMPACT_DECIMAL_LONG_PATTERN, + COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN +} + +class _CompactNumberFormat extends NumberFormat { + /// A default, using the decimal pattern, for the `getPattern` constructor parameter. + static String _forDecimal(NumberSymbols symbols) => symbols.DECIMAL_PATTERN; + + // Map exponent => style. + final Map _styles; + + // Whether positive sign should be explicitly printed. + final bool _explicitSign; + + factory _CompactNumberFormat( + {String? locale, + _CompactFormatType? formatType, + String? name, + String? currencySymbol, + String? Function(NumberSymbols) getPattern = _forDecimal, + int? decimalDigits, + bool explicitSign = false, + bool lookupSimpleCurrencySymbol = false, + bool isForCurrency = false}) { + // Initialization copied from `NumberFormat` constructor. + // TODO(davidmorgan): deduplicate. + locale = helpers.verifiedLocale(locale, NumberFormat.localeExists, null)!; + var symbols = numberFormatSymbols[locale] as NumberSymbols; + var localeZero = symbols.ZERO_DIGIT.codeUnitAt(0); + var zeroOffset = localeZero - constants.asciiZeroCodeUnit; + name ??= symbols.DEF_CURRENCY_CODE; + if (currencySymbol == null && lookupSimpleCurrencySymbol) { + currencySymbol = constants.simpleCurrencySymbols[name]; + } + currencySymbol ??= name; + var pattern = getPattern(symbols); + + // CompactNumberFormat initialization. + + /// Map from magnitude to formatting pattern for that magnitude. + /// + /// The magnitude is the exponent when using the normalized scientific + /// notation (so numbers from 1000 to 9999 correspond to magnitude 3). + /// + /// These patterns are taken from the appropriate CompactNumberSymbols + /// instance's COMPACT_DECIMAL_SHORT_PATTERN, COMPACT_DECIMAL_LONG_PATTERN, + /// or COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN members. + Map> patterns; + + var compactSymbols = compactNumberSymbols[locale]!; + + var styles = {}; + switch (formatType) { + case _CompactFormatType.COMPACT_DECIMAL_SHORT_PATTERN: + patterns = compactSymbols.COMPACT_DECIMAL_SHORT_PATTERN; + break; + case _CompactFormatType.COMPACT_DECIMAL_LONG_PATTERN: + patterns = compactSymbols.COMPACT_DECIMAL_LONG_PATTERN ?? + compactSymbols.COMPACT_DECIMAL_SHORT_PATTERN; + break; + case _CompactFormatType.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: + patterns = compactSymbols.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN; + break; + default: + throw ArgumentError.notNull('formatType'); + } + + patterns.forEach((int exponent, Map patterns) { + _CompactStyleBase style; + if (patterns.keys.length == 1 && patterns.keys.single == 'other') { + // No plural. + var pattern = patterns.values.single; + style = _styleFromPattern(pattern, exponent, explicitSign, symbols); + } else { + style = _CompactStyleWithPlurals( + patterns.map((key, value) => MapEntry(key, + _styleFromPattern(value, exponent, explicitSign, symbols))), + exponent, + locale); + } + styles[exponent] = style; + }); + + return _CompactNumberFormat._( + name, + currencySymbol, + isForCurrency, + locale, + localeZero, + pattern, + symbols, + zeroOffset, + NumberFormatParser.parse(symbols, pattern, isForCurrency, + currencySymbol, name, decimalDigits), + styles, + explicitSign); + } + + static _CompactStyleBase _styleFromPattern( + String pattern, int exponent, bool explicitSign, NumberSymbols symbols) { + if (pattern.contains(';')) { + var patterns = pattern.split(';'); + var positivePattern = patterns.first; + var negativePattern = patterns.last; + if (explicitSign && + !positivePattern.contains(symbols.PLUS_SIGN) && + negativePattern.contains(symbols.MINUS_SIGN) && + positivePattern == + negativePattern.replaceAll(symbols.MINUS_SIGN, '')) { + // Re-use the negative pattern, with plus sign. + positivePattern = + negativePattern.replaceAll(symbols.MINUS_SIGN, symbols.PLUS_SIGN); + } + return _CompactStyleWithNegative( + _CompactStyle.createStyle(symbols, positivePattern, exponent, + isSigned: positivePattern.contains(symbols.PLUS_SIGN)), + _CompactStyle.createStyle(symbols, negativePattern, exponent, + isSigned: true)); + } else { + return _CompactStyle.createStyle(symbols, pattern, exponent, + explicitSign: explicitSign); + } + } + + _CompactNumberFormat._( + String currencyName, + String currencySymbol, + bool isForCurrency, + String locale, + int localeZero, + String? pattern, + NumberSymbols symbols, + int zeroOffset, + NumberFormatParseResult result, + // Fields introduced in this class. + this._styles, + this._explicitSign) + : super._(currencyName, currencySymbol, isForCurrency, locale, localeZero, + pattern, symbols, zeroOffset, result) { + significantDigits = 3; + turnOffGrouping(); + } + + @override + set significantDigits(int? x) { + // Replicate ICU behavior: set only the minimumSignificantDigits and + // do not force trailing 0 in fractional part. + _explicitMinimumFractionDigits = false; + minimumSignificantDigits = x; + maximumSignificantDigits = null; + minimumSignificantDigitsStrict = false; + } + + @override + int get minimumFractionDigits => + _style != null && !_style!.isFallback && !_explicitMinimumFractionDigits + ? 0 + : super.minimumFractionDigits; + + /// The style in which we will format a particular number. + /// + /// This is a temporary variable that is only valid within a call to format + /// and parse. + _CompactStyle? _style; + + // We delegate prefixes to current _style. + @override + String get positivePrefix => + _style!.isFallback ? super.positivePrefix : _style!.positivePrefix; + @override + String get negativePrefix => + _style!.isFallback ? super.negativePrefix : _style!.negativePrefix; + @override + String get positiveSuffix => + _style!.isFallback ? super.positiveSuffix : _style!.positiveSuffix; + @override + String get negativeSuffix => + _style!.isFallback ? super.negativeSuffix : _style!.negativeSuffix; + + @override + String format(dynamic number) { + var style = _styleFor(number); + _style = style; + final divisor = style.isFallback ? 1 : style.divisor; + final numberToFormat = _divide(number, divisor); + var formatted = style.isDirectValue + ? '${_signPrefix(number)}${style.pattern}${_signSuffix(number)}' + : super.format(numberToFormat); + if (_explicitSign && + style.isFallback && + number >= 0 && + !formatted.contains(symbols.PLUS_SIGN)) { + formatted = '${symbols.PLUS_SIGN}$formatted'; + } + if (_isForCurrency && !style.isFallback) { + formatted = formatted.replaceFirst('\u00a4', currencySymbol); + } + _style = null; + return formatted; + } + + @override + bool _useDefaultSignificantDigits() { + // For non-currencies, or for currencies if the numbers are large enough to + // compact, always use the number of significant digits and ignore + // decimalDigits. + return !_isForCurrency || !_style!.isFallback; + } + + /// Divide numbers that may not have a division operator (e.g. Int64). + /// + /// Only used for powers of 10, so we require an integer denominator. + static num _divide(numerator, int denominator) { + if (numerator is num) { + return numerator / denominator; + } + // If it doesn't fit in a JS int after division, we're not going to be able + // to meaningfully print a compact representation for it. + var divided = numerator ~/ denominator; + var integerPart = divided.toInt(); + if (divided != integerPart) { + throw FormatException( + 'Number too big to use with compact format', numerator); + } + var remainder = numerator.remainder(denominator).toInt(); + var originalFraction = numerator - (numerator ~/ 1); + var fraction = originalFraction == 0 ? 0 : originalFraction / denominator; + return integerPart + (remainder / denominator) + fraction; + } + + _CompactStyle _styleFor(number) { + if (number.abs() < 10) { + // Cannot be compacted. + return _defaultCompactStyle; + } + var rounded = number.toDouble(); // No rounding yet... + var digitLength = NumberFormat.numberOfIntegerDigits(number); + var divisor = 1; // Default. + + void updateRounding() { + var fractionDigits = maximumFractionDigits; + if (significantDigitsInUse) { + var divisorLength = NumberFormat.numberOfIntegerDigits(divisor); + // We have to round the number based on the number of significant + // digits so that we pick the right style based on the rounded form + // and format 999999 as 1M rather than 1000K. + fractionDigits = + (maximumSignificantDigits ?? minimumSignificantDigits ?? 0) - + digitLength + + divisorLength - + 1; + if (maximumSignificantDigits == null) { + // Keep all digits of the integer part. + fractionDigits = max(0, fractionDigits); + } + } + var fractionMultiplier = pow(10, fractionDigits); + rounded = (rounded * fractionMultiplier / divisor).round() * + divisor / + fractionMultiplier; + digitLength = NumberFormat.numberOfIntegerDigits(rounded); + } + + updateRounding(); + + _CompactStyleBase? style; + for (var entry in _styles.entries) { + var exponent = entry.key + 1; + if (exponent > digitLength) { + break; + } + style = entry.value; + // Recompute digits length based on new exponent. + divisor = style.divisor; + updateRounding(); + } + return style?.styleForNumber(_divide(number, divisor), this) ?? + _defaultCompactStyle; + } + + Iterable<_CompactStyle> get _stylesForSearching => + _styles.values.expand((x) => x.allStyles); + + String _normalize(String input) { + return input + .replaceAll('\u200e', '') // LEFT-TO-RIGHT MARK. + .replaceAll('\u200f', '') // RIGHT-TO-LEFT MARK. + .replaceAll('\u0020', '') // SPACE. + .replaceAll('\u00a0', '') // NO-BREAK SPACE. + .replaceAll('\u202f', '') // NARROW NO-BREAK SPACE. + .replaceAll('\u2212', '-'); // MINUS SIGN. + } + + @override + num parse(final String inputText) { + for (var style in [_defaultCompactStyle, ..._stylesForSearching]) { + _style = style; + var text = _normalize(inputText); + var negative = false; + var negativePrefix = _normalize(style.negativePrefix); + var negativeSuffix = _normalize(style.negativeSuffix); + var positivePrefix = _normalize(style.positivePrefix); + var positiveSuffix = _normalize(style.positiveSuffix); + if (!style.isFallback) { + if (text.startsWith(negativePrefix) && text.endsWith(negativeSuffix)) { + text = text.substring( + negativePrefix.length, text.length - negativeSuffix.length); + negative = true; + } else if (text.startsWith(positivePrefix) && + text.endsWith(positiveSuffix)) { + text = text.substring( + positivePrefix.length, text.length - positiveSuffix.length); + } else { + continue; + } + } + if (style.isDirectValue) { + // "Direct formatting" pattern (1000 => "mille"). + if (text == style.pattern!) { + _style = null; + return style.divisor * (negative ? -1 : 1); + } else { + // Do not attempt parsing: no number. + continue; + } + } + var number = _tryParsing(text); + if (number == null && _zeroOffset != 0) { + // Locale has non-roman numerals. + // Try simple number parse, in case input contains roman numerals. + number = num.tryParse(text); + } + if (number != null) { + _style = null; + return number * style.divisor * (negative ? -1 : 1); + } + } + _style = null; + + throw FormatException( + "Cannot parse compact number in locale '$locale'", inputText); + } + + /// Returns text parsed into a number if possible, else returns null. + num? _tryParsing(String text) { + try { + return super.parse(text); + } on FormatException { + return null; + } + } +} + +final _defaultCompactStyle = _CompactStyle(); diff --git a/dart/lib/src/vendor/intl/constants.dart b/dart/lib/src/vendor/intl/constants.dart new file mode 100644 index 0000000000..5db4ebfd92 --- /dev/null +++ b/dart/lib/src/vendor/intl/constants.dart @@ -0,0 +1,164 @@ +final int asciiZeroCodeUnit = '0'.codeUnitAt(0); + +final Map simpleCurrencySymbols = { + 'AFN': 'Af.', + 'TOP': r'T$', + 'MGA': 'Ar', + 'THB': '\u0e3f', + 'PAB': 'B/.', + 'ETB': 'Birr', + 'VEF': 'Bs', + 'BOB': 'Bs', + 'GHS': 'GHS', + 'CRC': '\u20a1', + 'NIO': r'C$', + 'GMD': 'GMD', + 'MKD': 'din', + 'BHD': 'din', + 'DZD': 'din', + 'IQD': 'din', + 'JOD': 'din', + 'KWD': 'din', + 'LYD': 'din', + 'RSD': 'din', + 'TND': 'din', + 'AED': 'dh', + 'MAD': 'dh', + 'STD': 'Db', + 'BSD': r'$', + 'FJD': r'$', + 'GYD': r'$', + 'KYD': r'$', + 'LRD': r'$', + 'SBD': r'$', + 'SRD': r'$', + 'AUD': r'$', + 'BBD': r'$', + 'BMD': r'$', + 'BND': r'$', + 'BZD': r'$', + 'CAD': r'$', + 'HKD': r'$', + 'JMD': r'$', + 'NAD': r'$', + 'NZD': r'$', + 'SGD': r'$', + 'TTD': r'$', + 'TWD': r'NT$', + 'USD': r'$', + 'XCD': r'$', + 'VND': '\u20ab', + 'AMD': 'Dram', + 'CVE': 'CVE', + 'EUR': '\u20ac', + 'AWG': 'Afl.', + 'HUF': 'Ft', + 'BIF': 'FBu', + 'CDF': 'FrCD', + 'CHF': 'CHF', + 'DJF': 'Fdj', + 'GNF': 'FG', + 'RWF': 'RF', + 'XOF': 'CFA', + 'XPF': 'FCFP', + 'KMF': 'CF', + 'XAF': 'FCFA', + 'HTG': 'HTG', + 'PYG': 'Gs', + 'UAH': '\u20b4', + 'PGK': 'PGK', + 'LAK': '\u20ad', + 'CZK': 'K\u010d', + 'SEK': 'kr', + 'ISK': 'kr', + 'DKK': 'kr', + 'NOK': 'kr', + 'HRK': 'kn', + 'MWK': 'MWK', + 'ZMK': 'ZWK', + 'AOA': 'Kz', + 'MMK': 'K', + 'GEL': 'GEL', + 'LVL': 'Ls', + 'ALL': 'Lek', + 'HNL': 'L', + 'SLL': 'SLL', + 'MDL': 'MDL', + 'RON': 'RON', + 'BGN': 'lev', + 'SZL': 'SZL', + 'TRY': 'TL', + 'LTL': 'Lt', + 'LSL': 'LSL', + 'AZN': 'man.', + 'BAM': 'KM', + 'MZN': 'MTn', + 'NGN': '\u20a6', + 'ERN': 'Nfk', + 'BTN': 'Nu.', + 'MRO': 'MRO', + 'MOP': 'MOP', + 'CUP': r'$', + 'CUC': r'$', + 'ARS': r'$', + 'CLF': 'UF', + 'CLP': r'$', + 'COP': r'$', + 'DOP': r'$', + 'MXN': r'$', + 'PHP': '\u20b1', + 'UYU': r'$', + 'FKP': '£', + 'GIP': '£', + 'SHP': '£', + 'EGP': 'E£', + 'LBP': 'L£', + 'SDG': 'SDG', + 'SSP': 'SSP', + 'GBP': '£', + 'SYP': '£', + 'BWP': 'P', + 'GTQ': 'Q', + 'ZAR': 'R', + 'BRL': r'R$', + 'OMR': 'Rial', + 'QAR': 'Rial', + 'YER': 'Rial', + 'IRR': 'Rial', + 'KHR': 'Riel', + 'MYR': 'RM', + 'SAR': 'Riyal', + 'BYR': 'BYR', + 'RUB': '\u20BD', + 'MUR': 'Rs', + 'SCR': 'SCR', + 'LKR': 'Rs', + 'NPR': 'Rs', + 'INR': '\u20b9', + 'PKR': 'Rs', + 'IDR': 'Rp', + 'ILS': '\u20aa', + 'KES': 'Ksh', + 'SOS': 'SOS', + 'TZS': 'TSh', + 'UGX': 'UGX', + 'PEN': 'S/', + 'KGS': 'KGS', + 'UZS': 'so\u02bcm', + 'TJS': 'Som', + 'BDT': '\u09f3', + 'WST': 'WST', + 'KZT': '\u20b8', + 'MNT': '\u20ae', + 'VUV': 'VUV', + 'KPW': '\u20a9', + 'KRW': '\u20a9', + 'JPY': '¥', + 'CNY': '¥', + 'PLN': 'z\u0142', + 'MVR': 'Rf', + 'NLG': 'NAf', + 'ZMW': 'ZK', + 'ANG': 'ƒ', + 'TMT': 'TMT', +}; diff --git a/dart/lib/src/vendor/intl/global_state.dart b/dart/lib/src/vendor/intl/global_state.dart new file mode 100644 index 0000000000..9060196e6a --- /dev/null +++ b/dart/lib/src/vendor/intl/global_state.dart @@ -0,0 +1,19 @@ +import 'dart:async'; + +String systemLocale = 'en_US'; + +String? _defaultLocale; + +set defaultLocale(String? newLocale) { + _defaultLocale = newLocale; +} + +String? get defaultLocale { + var zoneLocale = Zone.current[#Intl.locale] as String?; + return zoneLocale ?? _defaultLocale; +} + +String getCurrentLocale() { + defaultLocale ??= systemLocale; + return defaultLocale!; +} diff --git a/dart/lib/src/vendor/intl/intl_helpers.dart b/dart/lib/src/vendor/intl/intl_helpers.dart new file mode 100644 index 0000000000..f58e1b2bba --- /dev/null +++ b/dart/lib/src/vendor/intl/intl_helpers.dart @@ -0,0 +1,226 @@ +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// A library for general helper code associated with the intl library +/// rather than confined to specific parts of it. +library intl_helpers; + +import 'global_state.dart' as global_state; +import 'intl_helpers.dart' as helpers; + +/// Type for the callback action when a message translation is not found. +typedef MessageIfAbsent = String? Function( + String? messageText, List? args); + +/// This is used as a marker for a locale data map that hasn't been initialized, +/// and will throw an exception on any usage that isn't the fallback +/// patterns/symbols provided. +class UninitializedLocaleData implements MessageLookup { + final String message; + final F fallbackData; + UninitializedLocaleData(this.message, this.fallbackData); + + bool _isFallback(String key) => canonicalizedLocale(key) == 'en_US'; + + F operator [](String key) => + _isFallback(key) ? fallbackData : _throwException(); + + /// If a message is looked up before any locale initialization, record it, + /// and throw an exception with that information once the locale is + /// initialized. + /// + /// Set this during development to find issues with race conditions between + /// message caching and locale initialization. If the results of Intl.message + /// calls aren't being cached, then this won't help. + /// + /// There's nothing that actually sets this, so checking this requires + /// patching the code here. + static final bool throwOnFallback = false; + + /// The messages that were called before the locale was initialized. + final List _badMessages = []; + + void _reportErrors() { + if (throwOnFallback && _badMessages.isNotEmpty) { + throw StateError( + 'The following messages were called before locale initialization:' + ' $_uninitializedMessages'); + } + } + + String get _uninitializedMessages => + (_badMessages.toSet().toList()..sort()).join('\n '); + + @override + String? lookupMessage(String? messageText, String? locale, String? name, + List? args, String? meaning, + {MessageIfAbsent? ifAbsent}) { + if (throwOnFallback) { + _badMessages.add((name ?? messageText)!); + } + return messageText; + } + + /// Given an initial locale or null, returns the locale that will be used + /// for messages. + String findLocale(String? locale) => + locale ?? global_state.getCurrentLocale(); + + List get keys => _throwException() as List; + + bool containsKey(String key) { + if (!_isFallback(key)) { + _throwException(); + } + return true; + } + + F _throwException() { + throw LocaleDataException('Locale data has not been initialized' + ', call $message.'); + } + + @override + void addLocale(String localeName, Function findLocale) => _throwException(); +} + +abstract class MessageLookup { + String? lookupMessage(String? messageText, String? locale, String? name, + List? args, String? meaning, + {MessageIfAbsent? ifAbsent}); + void addLocale(String localeName, Function findLocale); +} + +class LocaleDataException implements Exception { + final String message; + LocaleDataException(this.message); + @override + String toString() => 'LocaleDataException: $message'; +} + +/// An abstract superclass for data readers to keep the type system happy. +abstract class LocaleDataReader { + Future read(String locale); +} + +/// The internal mechanism for looking up messages. We expect this to be set +/// by the implementing package so that we're not dependent on its +/// implementation. +MessageLookup messageLookup = +UninitializedLocaleData('initializeMessages()', null); + +/// Initialize the message lookup mechanism. This is for internal use only. +/// User applications should import `message_lookup_by_library.dart` and call +/// `initializeMessages` +void initializeInternalMessageLookup(Function lookupFunction) { + if (messageLookup is UninitializedLocaleData) { + // This line has to be precisely this way to work around an analyzer crash. + (messageLookup as UninitializedLocaleData)._reportErrors(); + messageLookup = lookupFunction(); + } +} + +/// If a message is a string literal without interpolation, compute +/// a name based on that and the meaning, if present. +// NOTE: THIS LOGIC IS DUPLICATED IN intl_translation AND THE TWO MUST MATCH. +String? computeMessageName(String? name, String? text, String? meaning) { + if (name != null && name != '') return name; + return meaning == null ? text : '${text}_$meaning'; +} + +/// Returns an index of a separator between language and region. +/// +/// Assumes that language length can be only 2 or 3. +int _separatorIndex(String locale) { + if (locale.length < 3) { + return -1; + } + if (locale[2] == '-' || locale[2] == '_') { + return 2; + } + if (locale.length < 4) { + return -1; + } + if (locale[3] == '-' || locale[3] == '_') { + return 3; + } + return -1; +} + +String canonicalizedLocale(String? aLocale) { +// Locales of length < 5 are presumably two-letter forms, or else malformed. +// We return them unmodified and if correct they will be found. +// Locales longer than 6 might be malformed, but also do occur. Do as +// little as possible to them, but make the '-' be an '_' if it's there. +// We treat C as a special case, and assume it wants en_ISO for formatting. +// TODO(alanknight): en_ISO is probably not quite right for the C/Posix +// locale for formatting. Consider adding C to the formats database. + if (aLocale == null) return global_state.getCurrentLocale(); + if (aLocale == 'C') return 'en_ISO'; + if (aLocale.length < 5) return aLocale; + + var separatorIndex = _separatorIndex(aLocale); + if (separatorIndex == -1) { + return aLocale; + } + var language = aLocale.substring(0, separatorIndex); + var region = aLocale.substring(separatorIndex + 1); + // If it's longer than three it's something odd, so don't touch it. + if (region.length <= 3) region = region.toUpperCase(); + return '${language}_$region'; +} + +String? verifiedLocale(String? newLocale, bool Function(String) localeExists, + String? Function(String)? onFailure) { +// TODO(alanknight): Previously we kept a single verified locale on the Intl +// object, but with different verification for different uses, that's more +// difficult. As a result, we call this more often. Consider keeping +// verified locales for each purpose if it turns out to be a performance +// issue. + if (newLocale == null) { + return verifiedLocale( + global_state.getCurrentLocale(), localeExists, onFailure); + } + if (localeExists(newLocale)) { + return newLocale; + } + for (var each in [ + helpers.canonicalizedLocale(newLocale), + helpers.shortLocale(newLocale), + 'fallback' + ]) { + if (localeExists(each)) { + return each; + } + } + return (onFailure ?? _throwLocaleError)(newLocale); +} + +/// The default action if a locale isn't found in verifiedLocale. Throw +/// an exception indicating the locale isn't correct. +String _throwLocaleError(String localeName) { + throw ArgumentError('Invalid locale "$localeName"'); +} + +/// Return the short version of a locale name, e.g. 'en_US' => 'en' +String shortLocale(String aLocale) { + // TODO(b/241094372): Remove this check. + if (aLocale == 'invalid') { + return 'in'; + } + if (aLocale.length < 2) { + return aLocale; + } + var separatorIndex = _separatorIndex(aLocale); + if (separatorIndex == -1) { + if (aLocale.length < 4) { + // aLocale is already only a language code. + return aLocale.toLowerCase(); + } else { + // Something weird, returning as is. + return aLocale; + } + } + return aLocale.substring(0, separatorIndex).toLowerCase(); +} diff --git a/dart/lib/src/vendor/intl/number_format.dart b/dart/lib/src/vendor/intl/number_format.dart new file mode 100644 index 0000000000..2987bb10db --- /dev/null +++ b/dart/lib/src/vendor/intl/number_format.dart @@ -0,0 +1,934 @@ +import 'dart:math'; + +import 'number_symbols.dart'; +import 'number_symbols_data.dart'; +import 'intl_helpers.dart' as helpers; +import 'plural_rules.dart' as plural_rules; + +import 'constants.dart' as constants; +import 'number_format_parser.dart'; +import 'number_parser.dart'; + +part 'compact_number_format.dart'; + +// ignore_for_file: constant_identifier_names + +/// The function that we pass internally to NumberFormat to get +/// the appropriate pattern (e.g. currency) +typedef _PatternGetter = String? Function(NumberSymbols); + +/// Provides the ability to format a number in a locale-specific way. +/// +/// The format is specified as a pattern using a subset of the ICU formatting +/// patterns. +/// +/// - `0` A single digit +/// - `#` A single digit, omitted if the value is zero +/// - `.` Decimal separator +/// - `-` Minus sign +/// - `,` Grouping separator +/// - `E` Separates mantissa and expontent +/// - `+` - Before an exponent, to say it should be prefixed with a plus sign. +/// - `%` - In prefix or suffix, multiply by 100 and show as percentage +/// - `‰ (\u2030)` In prefix or suffix, multiply by 1000 and show as per mille +/// - `¤ (\u00A4)` Currency sign, replaced by currency name +/// - `'` Used to quote special characters +/// - `;` Used to separate the positive and negative patterns (if both present) +/// +/// For example, +/// +/// var f = NumberFormat("###.0#", "en_US"); +/// print(f.format(12.345)); +/// ==> 12.34 +/// +/// If the locale is not specified, it will default to the current locale. If +/// the format is not specified it will print in a basic format with at least +/// one integer digit and three fraction digits. +/// +/// There are also standard patterns available via the special constructors. +/// e.g. +/// +/// var percent = NumberFormat.percentPattern("ar"); +/// var eurosInUSFormat = NumberFormat.currency(locale: "en_US", +/// symbol: "€"); +/// +/// There are several such constructors available, though some of them are +/// limited. For example, at the moment, scientificPattern prints only as +/// equivalent to "#E0" and does not take into account significant digits. +class NumberFormat { + /// Variables to determine how number printing behaves. + final String negativePrefix; + final String positivePrefix; + final String negativeSuffix; + final String positiveSuffix; + + /// How many numbers in a group when using punctuation to group digits in + /// large numbers. e.g. in en_US: "1,000,000" has a grouping size of 3 digits + /// between commas. + int _groupingSize; + + /// In some formats the last grouping size may be different than previous + /// ones, e.g. Hindi. + int _finalGroupingSize; + + /// Set to true if the format has explicitly set the grouping size. + final bool _decimalSeparatorAlwaysShown; + final bool _useSignForPositiveExponent; + final bool _useExponentialNotation; + + /// Explicitly store if we are a currency format, and so should use the + /// appropriate number of decimal digits for a currency. + // TODO(alanknight): Handle currency formats which are specified in a raw + /// pattern, not using one of the currency constructors. + final bool _isForCurrency; + + int maximumIntegerDigits; + int minimumIntegerDigits; + + bool _explicitMaximumFractionDigits = false; + int _maximumFractionDigits; + int get maximumFractionDigits => _maximumFractionDigits; + set maximumFractionDigits(int x) { + significantDigitsInUse = false; + _explicitMaximumFractionDigits = true; + _maximumFractionDigits = x; + _minimumFractionDigits = min(_minimumFractionDigits, x); + } + + bool _explicitMinimumFractionDigits = false; + int _minimumFractionDigits; + int get minimumFractionDigits => _minimumFractionDigits; + set minimumFractionDigits(int x) { + significantDigitsInUse = false; + _explicitMinimumFractionDigits = true; + _minimumFractionDigits = x; + _maximumFractionDigits = max(_maximumFractionDigits, x); + } + + int minimumExponentDigits; + + int? _maximumSignificantDigits; + int? get maximumSignificantDigits => _maximumSignificantDigits; + set maximumSignificantDigits(int? x) { + _maximumSignificantDigits = x; + if (x != null && _minimumSignificantDigits != null) { + _minimumSignificantDigits = min(_minimumSignificantDigits!, x); + } + significantDigitsInUse = true; + } + + /// Whether minimumSignificantDigits should cause trailing 0 in fraction part. + /// + /// Ex: with 2 significant digits: + /// 0.999 => "1.0" (strict) or "1" (non-strict). + bool minimumSignificantDigitsStrict = false; + + int? _minimumSignificantDigits; + int? get minimumSignificantDigits => _minimumSignificantDigits; + set minimumSignificantDigits(int? x) { + _minimumSignificantDigits = x; + if (x != null && _maximumSignificantDigits != null) { + _maximumSignificantDigits = max(_maximumSignificantDigits!, x); + } + significantDigitsInUse = true; + minimumSignificantDigitsStrict = x != null; + } + + /// How many significant digits should we print. + /// + /// Note that if significantDigitsInUse is the default false, this + /// will be ignored. + @Deprecated('Use maximumSignificantDigits / minimumSignificantDigits') + int? get significantDigits => _minimumSignificantDigits; + + set significantDigits(int? x) { + minimumSignificantDigits = x; + maximumSignificantDigits = x; + } + + bool significantDigitsInUse = false; + + /// For percent and permille, what are we multiplying by in order to + /// get the printed value, e.g. 100 for percent. + final int multiplier; + + /// How many digits are there in the [multiplier]. + final int _multiplierDigits; + + /// Stores the pattern used to create this format. This isn't used, but + /// is helpful in debugging. + final String? _pattern; + + /// The locale in which we print numbers. + final String _locale; + + /// Caches the symbols used for our locale. + final NumberSymbols _symbols; + + /// The name of the currency to print, in ISO 4217 form. + String? currencyName; + + /// The symbol to be used when formatting this as currency. + /// + /// For example, "$", "US$", or "€". + final String currencySymbol; + + /// The number of decimal places to use when formatting. + /// + /// If this is not explicitly specified in the constructor, then for + /// currencies we use the default value for the currency if the name is given, + /// otherwise we use the value from the pattern for the locale. + /// + /// So, for example, + /// NumberFormat.currency(name: 'USD', decimalDigits: 7) + /// will format with 7 decimal digits, because that's what we asked for. But + /// NumberFormat.currency(locale: 'en_US', name: 'JPY') + /// will format with zero, because that's the default for JPY, and the + /// currency's default takes priority over the locale's default. + /// NumberFormat.currency(locale: 'en_US') + /// will format with two, which is the default for that locale. + /// + final int? decimalDigits; + + /// Transient internal state in which to build up the result of the format + /// operation. We can have this be just an instance variable because Dart is + /// single-threaded and unless we do an asynchronous operation in the process + /// of formatting then there will only ever be one number being formatted + /// at a time. In languages with threads we'd need to pass this on the stack. + final StringBuffer _buffer = StringBuffer(); + + /// Create a number format that prints using [newPattern] as it applies in + /// [locale]. + factory NumberFormat([String? newPattern, String? locale]) => + NumberFormat._forPattern(locale, (x) => newPattern); + + /// Create a number format that prints as DECIMAL_PATTERN. + factory NumberFormat.decimalPattern([String? locale]) => + NumberFormat._forPattern(locale, (x) => x.DECIMAL_PATTERN); + + /// Create a number format that prints as DECIMAL_PATTERN. + factory NumberFormat.decimalPatternDigits( + {String? locale, int? decimalDigits}) => + NumberFormat._forPattern(locale, (x) => x.DECIMAL_PATTERN, + decimalDigits: decimalDigits); + + /// Create a number format that prints as PERCENT_PATTERN. + factory NumberFormat.percentPattern([String? locale]) => + NumberFormat._forPattern(locale, (x) => x.PERCENT_PATTERN); + + /// Create a number format that prints as PERCENT_PATTERN. + factory NumberFormat.decimalPercentPattern( + {String? locale, int? decimalDigits}) => + NumberFormat._forPattern(locale, (x) => x.PERCENT_PATTERN, + decimalDigits: decimalDigits); + + /// Create a number format that prints as SCIENTIFIC_PATTERN. + factory NumberFormat.scientificPattern([String? locale]) => + NumberFormat._forPattern(locale, (x) => x.SCIENTIFIC_PATTERN); + + /// A regular expression to validate currency names are exactly three + /// alphabetic characters. + static final _checkCurrencyName = RegExp(r'^[a-zA-Z]{3}$'); + + /// Create a number format that prints as CURRENCY_PATTERN. (Deprecated: + /// prefer NumberFormat.currency) + /// + /// If provided, + /// use [currencyNameOrSymbol] in place of the default currency name. e.g. + /// var eurosInCurrentLocale = NumberFormat + /// .currencyPattern(Intl.defaultLocale, "€"); + @Deprecated('Use NumberFormat.currency') + factory NumberFormat.currencyPattern( + [String? locale, String? currencyNameOrSymbol]) { + // If it looks like an iso4217 name, pass as name, otherwise as symbol. + if (currencyNameOrSymbol != null && + _checkCurrencyName.hasMatch(currencyNameOrSymbol)) { + return NumberFormat.currency(locale: locale, name: currencyNameOrSymbol); + } else { + return NumberFormat.currency( + locale: locale, symbol: currencyNameOrSymbol); + } + } + + /// Create a [NumberFormat] that formats using the locale's CURRENCY_PATTERN. + /// + /// If [locale] is not specified, it will use the current default locale. + /// + /// If [name] is specified, the currency with that ISO 4217 name will be used. + /// Otherwise we will use the default currency name for the current locale. If + /// no [symbol] is specified, we will use the currency name in the formatted + /// result. e.g. + /// var f = NumberFormat.currency(locale: 'en_US', name: 'EUR') + /// will format currency like "EUR1.23". If we did not specify the name, it + /// would format like "USD1.23". + /// + /// If [symbol] is used, then that symbol will be used in formatting instead + /// of the name. e.g. + /// var eurosInCurrentLocale = NumberFormat.currency(symbol: "€"); + /// will format like "€1.23". Otherwise it will use the currency name. + /// If this is not explicitly specified in the constructor, then for + /// currencies we use the default value for the currency if the name is given, + /// otherwise we use the value from the pattern for the locale. + /// + /// If [decimalDigits] is specified, numbers will format with that many digits + /// after the decimal place. If it's not, they will use the default for the + /// currency in [name], and the default currency for [locale] if the currency + /// name is not specified. e.g. + /// NumberFormat.currency(name: 'USD', decimalDigits: 7) + /// will format with 7 decimal digits, because that's what we asked for. But + /// NumberFormat.currency(locale: 'en_US', name: 'JPY') + /// will format with zero, because that's the default for JPY, and the + /// currency's default takes priority over the locale's default. + /// NumberFormat.currency(locale: 'en_US') + /// will format with two, which is the default for that locale. + /// + /// The [customPattern] parameter can be used to specify a particular + /// format. This is useful if you have your own locale data which includes + /// unsupported formats (e.g. accounting format for currencies.) + // TODO(alanknight): Should we allow decimalDigits on other numbers. + factory NumberFormat.currency( + {String? locale, + String? name, + String? symbol, + int? decimalDigits, + String? customPattern}) => + NumberFormat._forPattern( + locale, (x) => customPattern ?? x.CURRENCY_PATTERN, + name: name, + currencySymbol: symbol, + decimalDigits: decimalDigits, + isForCurrency: true); + + /// Creates a [NumberFormat] for currencies, using the simple symbol for the + /// currency if one is available (e.g. $, €), so it should only be used if the + /// short currency symbol will be unambiguous. + /// + /// If [locale] is not specified, it will use the current default locale. + /// + /// If [name] is specified, the currency with that ISO 4217 name will be used. + /// Otherwise we will use the default currency name for the current locale. We + /// will assume that the symbol for this is well known in the locale and + /// unambiguous. If you format CAD in an en_US locale using this format it + /// will display as "$", which may be confusing to the user. + /// + /// If [decimalDigits] is specified, numbers will format with that many digits + /// after the decimal place. If it's not, they will use the default for the + /// currency in [name], and the default currency for [locale] if the currency + /// name is not specified. e.g. + /// NumberFormat.simpleCurrency(name: 'USD', decimalDigits: 7) + /// will format with 7 decimal digits, because that's what we asked for. But + /// NumberFormat.simpleCurrency(locale: 'en_US', name: 'JPY') + /// will format with zero, because that's the default for JPY, and the + /// currency's default takes priority over the locale's default. + /// NumberFormat.simpleCurrency(locale: 'en_US') + /// will format with two, which is the default for that locale. + factory NumberFormat.simpleCurrency( + {String? locale, String? name, int? decimalDigits}) { + return NumberFormat._forPattern(locale, (x) => x.CURRENCY_PATTERN, + name: name, + decimalDigits: decimalDigits, + lookupSimpleCurrencySymbol: true, + isForCurrency: true); + } + + /// Returns the simple currency symbol for given currency code, or + /// [currencyCode] if no simple symbol is listed. + /// + /// The simple currency symbol is generally short, and the same or related to + /// what is used in countries having the currency as an official symbol. It + /// may be a symbol character, or may have letters, or both. It may be + /// different according to the locale: for example, for an Arabic locale it + /// may consist of Arabic letters, but for a French locale consist of Latin + /// letters. It will not be unique: for example, "$" can appear for both USD + /// and CAD. + /// + /// (The current implementation is the same for all locales, but this is + /// temporary and callers shouldn't rely on it.) + String simpleCurrencySymbol(String currencyCode) => + constants.simpleCurrencySymbols[currencyCode] ?? currencyCode; + + /// Create a number format that prints in a pattern we get from + /// the [getPattern] function using the locale [locale]. + /// + /// The [currencySymbol] can either be specified directly, or we can pass a + /// function [computeCurrencySymbol] that will compute it later, given other + /// information, typically the verified locale. + factory NumberFormat._forPattern(String? locale, _PatternGetter getPattern, + {String? name, + String? currencySymbol, + int? decimalDigits, + bool lookupSimpleCurrencySymbol = false, + bool isForCurrency = false}) { + locale = helpers.verifiedLocale(locale, localeExists, null)!; + var symbols = numberFormatSymbols[locale] as NumberSymbols; + var localeZero = symbols.ZERO_DIGIT.codeUnitAt(0); + var zeroOffset = localeZero - constants.asciiZeroCodeUnit; + name ??= symbols.DEF_CURRENCY_CODE; + if (currencySymbol == null && lookupSimpleCurrencySymbol) { + currencySymbol = constants.simpleCurrencySymbols[name]; + } + currencySymbol ??= name; + + var pattern = getPattern(symbols); + + return NumberFormat._( + name, + currencySymbol, + isForCurrency, + locale, + localeZero, + pattern, + symbols, + zeroOffset, + NumberFormatParser.parse(symbols, pattern, isForCurrency, + currencySymbol, name, decimalDigits)); + } + + NumberFormat._( + this.currencyName, + this.currencySymbol, + this._isForCurrency, + this._locale, + this.localeZero, + this._pattern, + this._symbols, + this._zeroOffset, + NumberFormatParseResult result) + : positivePrefix = result.positivePrefix, + negativePrefix = result.negativePrefix, + positiveSuffix = result.positiveSuffix, + negativeSuffix = result.negativeSuffix, + multiplier = result.multiplier, + _multiplierDigits = result.multiplierDigits, + _useExponentialNotation = result.useExponentialNotation, + minimumExponentDigits = result.minimumExponentDigits, + maximumIntegerDigits = result.maximumIntegerDigits, + minimumIntegerDigits = result.minimumIntegerDigits, + _maximumFractionDigits = result.maximumFractionDigits, + _minimumFractionDigits = result.minimumFractionDigits, + _groupingSize = result.groupingSize, + _finalGroupingSize = result.finalGroupingSize, + _useSignForPositiveExponent = result.useSignForPositiveExponent, + _decimalSeparatorAlwaysShown = result.decimalSeparatorAlwaysShown, + decimalDigits = result.decimalDigits; + + /// A number format for compact representations, e.g. "1.2M" instead + /// of "1,200,000". + factory NumberFormat.compact({String? locale, bool explicitSign = false}) { + return _CompactNumberFormat( + locale: locale, + formatType: _CompactFormatType.COMPACT_DECIMAL_SHORT_PATTERN, + explicitSign: explicitSign); + } + + /// A number format for "long" compact representations, e.g. "1.2 million" + /// instead of "1,200,000". + factory NumberFormat.compactLong( + {String? locale, bool explicitSign = false}) { + return _CompactNumberFormat( + locale: locale, + formatType: _CompactFormatType.COMPACT_DECIMAL_LONG_PATTERN, + explicitSign: explicitSign); + } + + /// A number format for compact currency representations, e.g. "$1.2M" instead + /// of "$1,200,000", and which will automatically determine a currency symbol + /// based on the currency name or the locale. See + /// [NumberFormat.simpleCurrency]. + factory NumberFormat.compactSimpleCurrency( + {String? locale, String? name, int? decimalDigits}) { + return _CompactNumberFormat( + locale: locale, + formatType: _CompactFormatType.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN, + name: name, + getPattern: (symbols) => symbols.CURRENCY_PATTERN, + decimalDigits: decimalDigits, + lookupSimpleCurrencySymbol: true, + isForCurrency: true); + } + + /// A number format for compact currency representations, e.g. "$1.2M" instead + /// of "$1,200,000". + factory NumberFormat.compactCurrency( + {String? locale, String? name, String? symbol, int? decimalDigits}) { + return _CompactNumberFormat( + locale: locale, + formatType: _CompactFormatType.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN, + name: name, + getPattern: (symbols) => symbols.CURRENCY_PATTERN, + currencySymbol: symbol, + decimalDigits: decimalDigits, + isForCurrency: true); + } + + /// Return the locale code in which we operate, e.g. 'en_US' or 'pt'. + String get locale => _locale; + + /// Return true if the locale exists, or if it is null. The null case + /// is interpreted to mean that we use the default locale. + static bool localeExists(String? localeName) { + if (localeName == null) return false; + return numberFormatSymbols.containsKey(localeName); + } + + /// Return the symbols which are used in our locale. Cache them to avoid + /// repeated lookup. + NumberSymbols get symbols => _symbols; + + /// Format [number] according to our pattern and return the formatted string. + String format(dynamic number) { + if (_isNaN(number)) return symbols.NAN; + if (_isInfinite(number)) return '${_signPrefix(number)}${symbols.INFINITY}'; + + _add(_signPrefix(number)); + _formatNumber(number.abs()); + _add(_signSuffix(number)); + + var result = _buffer.toString(); + _buffer.clear(); + return result; + } + + /// Parse the number represented by the string. If it's not + /// parseable, throws a [FormatException]. + num parse(String text) => NumberParser(this, text).value!; + + /// Format the main part of the number in the form dictated by the pattern. + void _formatNumber(number) { + if (_useExponentialNotation) { + _formatExponential(number); + } else { + _formatFixed(number); + } + } + + /// Format the number in exponential notation. + void _formatExponential(num number) { + if (number == 0.0) { + _formatFixed(number); + _formatExponent(0); + return; + } + + var exponent = (log(number) / _ln10).floor(); + var mantissa = number / pow(10.0, exponent); + + if (maximumIntegerDigits > 1 && + maximumIntegerDigits > minimumIntegerDigits) { + // A repeating range is defined; adjust to it as follows. + // If repeat == 3, we have 6,5,4=>3; 3,2,1=>0; 0,-1,-2=>-3; + // -3,-4,-5=>-6, etc. This takes into account that the + // exponent we have here is off by one from what we expect; + // it is for the format 0.MMMMMx10^n. + while ((exponent % maximumIntegerDigits) != 0) { + mantissa *= 10; + exponent--; + } + } else { + // No repeating range is defined, use minimum integer digits. + if (minimumIntegerDigits < 1) { + exponent++; + mantissa /= 10; + } else { + exponent -= minimumIntegerDigits - 1; + mantissa *= pow(10, minimumIntegerDigits - 1); + } + } + _formatFixed(mantissa); + _formatExponent(exponent); + } + + /// Format the exponent portion, e.g. in "1.3e-5" the "e-5". + void _formatExponent(num exponent) { + _add(symbols.EXP_SYMBOL); + if (exponent < 0) { + exponent = -exponent; + _add(symbols.MINUS_SIGN); + } else if (_useSignForPositiveExponent) { + _add(symbols.PLUS_SIGN); + } + _pad(minimumExponentDigits, exponent.toString()); + } + + /// Used to test if we have exceeded integer limits. + // TODO(alanknight): Do we have a MaxInt constant we could use instead? + static final _maxInt = 1 is double ? pow(2, 52) : 1.0e300.floor(); + static final _maxDigits = (log(_maxInt) / log(10)).ceil(); + + /// Helpers to check numbers that don't conform to the [num] interface, + /// e.g. Int64 + bool _isInfinite(number) => number is num ? number.isInfinite : false; + bool _isNaN(number) => number is num ? number.isNaN : false; + + /// Helper to get the floor of a number which might not be num. This should + /// only ever be called with an argument which is positive, or whose abs() + /// is negative. The second case is the maximum negative value on a + /// fixed-length integer. Since they are integers, they are also their own + /// floor. + dynamic _floor(dynamic number) { + if (number.isNegative && !number.abs().isNegative) { + throw ArgumentError( + 'Internal error: expected positive number, got $number'); + } + return (number is num) ? number.floor() : number ~/ 1; + } + + /// Helper to round a number which might not be num. + dynamic _round(dynamic number) { + if (number is num) { + if (number.isInfinite) { + return _maxInt; + } else { + return number.round(); + } + } else if (number.remainder(1) == 0) { + // Not a normal number, but int-like, e.g. Int64 + return number; + } else { + // TODO(alanknight): Do this more efficiently. If IntX had floor and + // round we could avoid this. + var basic = _floor(number); + var fraction = (number - basic).toDouble().round(); + return fraction == 0 ? number : number + fraction; + } + } + + // Return the number of digits left of the decimal place in [number]. + static int numberOfIntegerDigits(dynamic number) { + var simpleNumber = (number.toDouble() as double).abs(); + // It's unfortunate that we have to do this, but we get precision errors + // that affect the result if we use logs, e.g. 1000000 + if (simpleNumber < 10) return 1; + if (simpleNumber < 100) return 2; + if (simpleNumber < 1000) return 3; + if (simpleNumber < 10000) return 4; + if (simpleNumber < 100000) return 5; + if (simpleNumber < 1000000) return 6; + if (simpleNumber < 10000000) return 7; + if (simpleNumber < 100000000) return 8; + if (simpleNumber < 1000000000) return 9; + if (simpleNumber < 10000000000) return 10; + if (simpleNumber < 100000000000) return 11; + if (simpleNumber < 1000000000000) return 12; + if (simpleNumber < 10000000000000) return 13; + if (simpleNumber < 100000000000000) return 14; + if (simpleNumber < 1000000000000000) return 15; + if (simpleNumber < 10000000000000000) return 16; + if (simpleNumber < 100000000000000000) return 17; + if (simpleNumber < 1000000000000000000) return 18; + return 19; + } + + /// Whether to use SignificantDigits unconditionally for fraction digits. + bool _useDefaultSignificantDigits() => !_isForCurrency; + + /// How many digits after the decimal place should we display, given that + /// by default, [fractionDigits] should be used, and there are up to + /// [expectedSignificantDigits] left to display in the fractional part.. + int _adjustFractionDigits(int fractionDigits, expectedSignificantDigits) { + if (_useDefaultSignificantDigits()) return fractionDigits; + // If we are printing a currency significant digits would have us only print + // some of the decimal digits, use all of them. So $12.30, not $12.3 + if (expectedSignificantDigits > 0) { + return decimalDigits!; + } else { + return min(fractionDigits, decimalDigits!); + } + } + + /// Format the basic number portion, including the fractional digits. + void _formatFixed(dynamic number) { + dynamic integerPart; + int fractionPart; + int extraIntegerDigits; + var fractionDigits = maximumFractionDigits; + var minFractionDigits = minimumFractionDigits; + + var power = 0; + int digitMultiplier; + + if (_isInfinite(number)) { + integerPart = number.toInt(); + extraIntegerDigits = 0; + fractionPart = 0; + } else { + // We have three possible pieces. First, the basic integer part. If this + // is a percent or permille, the additional 2 or 3 digits. Finally the + // fractional part. + // We avoid multiplying the number because it might overflow if we have + // a fixed-size integer type, so we extract each of the three as an + // integer pieces. + integerPart = _floor(number); + var fraction = number - integerPart; + if (fraction.toInt() != 0) { + // If the fractional part leftover is > 1, presumbly the number + // was too big for a fixed-size integer, so leave it as whatever + // it was - the obvious thing is a double. + integerPart = number; + fraction = 0; + } + + /// If we have significant digits, compute the number of fraction + /// digits based on that. + void computeFractionDigits() { + if (significantDigitsInUse) { + var integerLength = number == 0 + ? 1 + : integerPart != 0 + ? numberOfIntegerDigits(integerPart) + // We might need to add digits after decimal point. + : (log(fraction) / ln10).ceil(); + + if (minimumSignificantDigits != null) { + var remainingSignificantDigits = + minimumSignificantDigits! - _multiplierDigits - integerLength; + + fractionDigits = max(0, remainingSignificantDigits); + if (minimumSignificantDigitsStrict) { + minFractionDigits = fractionDigits; + } + fractionDigits = _adjustFractionDigits( + fractionDigits, remainingSignificantDigits); + } + + if (maximumSignificantDigits != null) { + if (maximumSignificantDigits! == 0) { + // Stupid case: only '0' has no significant digits. + integerPart = 0; + fractionDigits = 0; + } else if (maximumSignificantDigits! < + integerLength + _multiplierDigits) { + // We may have to round. + var divideBy = pow(10, integerLength - maximumSignificantDigits!); + if (maximumSignificantDigits! < integerLength) { + integerPart = (integerPart / divideBy).round() * divideBy; + } + fraction = (fraction / divideBy).round() * divideBy; + fractionDigits = 0; + } else { + fractionDigits = + maximumSignificantDigits! - integerLength - _multiplierDigits; + fractionDigits = + _adjustFractionDigits(fractionDigits, fractionDigits); + } + } + if (fractionDigits > maximumFractionDigits && + _explicitMaximumFractionDigits) { + fractionDigits = min(fractionDigits, maximumFractionDigits); + } + if (fractionDigits < minimumFractionDigits && + _explicitMinimumFractionDigits) { + fractionDigits = _minimumFractionDigits; + } + } + } + + computeFractionDigits(); + + power = pow(10, fractionDigits) as int; + digitMultiplier = power * multiplier; + + // Multiply out to the number of decimal places and the percent, then + // round. For fixed-size integer types this should always be zero, so + // multiplying is OK. + var remainingDigits = _round(fraction * digitMultiplier).toInt(); + + var hasRounding = false; + if (remainingDigits >= digitMultiplier) { + // Overflow into the main digits: 0.99 => 1.00 + integerPart++; + remainingDigits -= digitMultiplier; + hasRounding = true; + } else if (numberOfIntegerDigits(remainingDigits) > + numberOfIntegerDigits(_floor(fraction * digitMultiplier).toInt())) { + // Fraction has been rounded (0.0996 -> 0.1). + fraction = remainingDigits / digitMultiplier; + hasRounding = true; + } + if (hasRounding && significantDigitsInUse) { + // We might have to recompute significant digits after fraction. + // With 3 significant digits, "9.999" should be "10.0", not "10.00". + computeFractionDigits(); + } + + // Separate out the extra integer parts from the fraction part. + extraIntegerDigits = remainingDigits ~/ power; + fractionPart = remainingDigits % power; + } + + var integerDigits = _integerDigits(integerPart, extraIntegerDigits); + var digitLength = integerDigits.length; + var fractionPresent = + fractionDigits > 0 && (minFractionDigits > 0 || fractionPart > 0); + + if (_hasIntegerDigits(integerDigits)) { + // Add the padding digits to the regular digits so that we get grouping. + var padding = '0' * (minimumIntegerDigits - digitLength); + integerDigits = '$padding$integerDigits'; + digitLength = integerDigits.length; + for (var i = 0; i < digitLength; i++) { + _addDigit(integerDigits.codeUnitAt(i)); + _group(digitLength, i); + } + } else if (!fractionPresent) { + // If neither fraction nor integer part exists, just print zero. + _addZero(); + } + + _decimalSeparator(fractionPresent); + if (fractionPresent) { + _formatFractionPart((fractionPart + power).toString(), minFractionDigits); + } + } + + /// Compute the raw integer digits which will then be printed with + /// grouping and translated to localized digits. + String _integerDigits(integerPart, extraIntegerDigits) { + // If the integer part is larger than the maximum integer size + // (2^52 on Javascript, 2^63 on the VM) it will lose precision, + // so pad out the rest of it with zeros. + var paddingDigits = ''; + if (integerPart is num && integerPart > _maxInt) { + var howManyDigitsTooBig = (log(integerPart) / _ln10).ceil() - _maxDigits; + num divisor = pow(10, howManyDigitsTooBig).round(); + // pow() produces 0 if the result is too large for a 64-bit int. + // If that happens, use a floating point divisor instead. + if (divisor == 0) divisor = pow(10.0, howManyDigitsTooBig); + paddingDigits = '0' * howManyDigitsTooBig.toInt(); + integerPart = (integerPart / divisor).truncate(); + } + + var extra = extraIntegerDigits == 0 ? '' : extraIntegerDigits.toString(); + var intDigits = _mainIntegerDigits(integerPart); + var paddedExtra = + intDigits.isEmpty ? extra : extra.padLeft(_multiplierDigits, '0'); + return '$intDigits$paddedExtra$paddingDigits'; + } + + /// The digit string of the integer part. This is the empty string if the + /// integer part is zero and otherwise is the toString() of the integer + /// part, stripping off any minus sign. + String _mainIntegerDigits(integer) { + if (integer == 0) return ''; + var digits = integer.toString(); + if (significantDigitsInUse && + maximumSignificantDigits != null && + digits.length > maximumSignificantDigits!) { + digits = digits.substring(0, maximumSignificantDigits!) + + ''.padLeft(digits.length - maximumSignificantDigits!, '0'); + } + // If we have a fixed-length int representation, it can have a negative + // number whose negation is also negative, e.g. 2^-63 in 64-bit. + // Remove the minus sign. + return digits.startsWith('-') ? digits.substring(1) : digits; + } + + /// Format the part after the decimal place in a fixed point number. + void _formatFractionPart(String fractionPart, int minDigits) { + var fractionLength = fractionPart.length; + while (fractionPart.codeUnitAt(fractionLength - 1) == + constants.asciiZeroCodeUnit && + fractionLength > minDigits + 1) { + fractionLength--; + } + for (var i = 1; i < fractionLength; i++) { + _addDigit(fractionPart.codeUnitAt(i)); + } + } + + /// Print the decimal separator if appropriate. + void _decimalSeparator(bool fractionPresent) { + if (_decimalSeparatorAlwaysShown || fractionPresent) { + _add(symbols.DECIMAL_SEP); + } + } + + /// Return true if we have a main integer part which is printable, either + /// because we have digits left of the decimal point (this may include digits + /// which have been moved left because of percent or permille formatting), + /// or because the minimum number of printable digits is greater than 1. + bool _hasIntegerDigits(String digits) => + digits.isNotEmpty || minimumIntegerDigits > 0; + + /// A group of methods that provide support for writing digits and other + /// required characters into [_buffer] easily. + void _add(String x) { + _buffer.write(x); + } + + void _addZero() { + _buffer.write(symbols.ZERO_DIGIT); + } + + void _addDigit(int x) { + _buffer.writeCharCode(x + _zeroOffset); + } + + void _pad(int numberOfDigits, String basic) { + if (_zeroOffset == 0) { + _buffer.write(basic.padLeft(numberOfDigits, '0')); + } else { + _slowPad(numberOfDigits, basic); + } + } + + /// Print padding up to [numberOfDigits] above what's included in [basic]. + void _slowPad(int numberOfDigits, String basic) { + for (var i = 0; i < numberOfDigits - basic.length; i++) { + _add(symbols.ZERO_DIGIT); + } + for (var i = 0; i < basic.length; i++) { + _addDigit(basic.codeUnitAt(i)); + } + } + + /// We are printing the digits of the number from left to right. We may need + /// to print a thousands separator or other grouping character as appropriate + /// to the locale. So we find how many places we are from the end of the number + /// by subtracting our current [position] from the [totalLength] and printing + /// the separator character every [_groupingSize] digits, with the final + /// grouping possibly being of a different size, [_finalGroupingSize]. + void _group(int totalLength, int position) { + var distanceFromEnd = totalLength - position; + if (distanceFromEnd <= 1 || _groupingSize <= 0) return; + if (distanceFromEnd == _finalGroupingSize + 1) { + _add(symbols.GROUP_SEP); + } else if ((distanceFromEnd > _finalGroupingSize) && + (distanceFromEnd - _finalGroupingSize) % _groupingSize == 1) { + _add(symbols.GROUP_SEP); + } + } + + /// The code point for the locale's zero digit. + /// + /// Initialized when the locale is set. + final int localeZero; + + /// The difference between our zero and '0'. + /// + /// In other words, a constant _localeZero - _zero. Initialized when + /// the locale is set. + final int _zeroOffset; + + /// Returns the prefix for [x] based on whether it's positive or negative. + /// In en_US this would be '' and '-' respectively. + String _signPrefix(x) => x.isNegative ? negativePrefix : positivePrefix; + + /// Returns the suffix for [x] based on wether it's positive or negative. + /// In en_US there are no suffixes for positive or negative. + String _signSuffix(x) => x.isNegative ? negativeSuffix : positiveSuffix; + + /// Explicitly turn off any grouping (e.g. by thousands) in this format. + /// + /// This is used in compact number formatting, where we + /// omit the normal grouping. Best to know what you're doing if you call it. + void turnOffGrouping() { + _groupingSize = 0; + _finalGroupingSize = 0; + } + + @override + String toString() => 'NumberFormat($_locale, $_pattern)'; +} + +final _ln10 = log(10); diff --git a/dart/lib/src/vendor/intl/number_format_parser.dart b/dart/lib/src/vendor/intl/number_format_parser.dart new file mode 100644 index 0000000000..8e1d232885 --- /dev/null +++ b/dart/lib/src/vendor/intl/number_format_parser.dart @@ -0,0 +1,366 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. +import 'dart:math'; + +import 'number_symbols.dart'; +import 'number_symbols_data.dart'; +import 'string_stack.dart'; + +// ignore_for_file: constant_identifier_names + +/// Output of [_NumberFormatParser.parse]. +/// +/// Everything needed to initialize a [NumberFormat]. +class NumberFormatParseResult { + String negativePrefix; + String positivePrefix = ''; + String negativeSuffix = ''; + String positiveSuffix = ''; + + int multiplier = 1; + int get multiplierDigits => (log(multiplier) / _ln10).round(); + + int minimumExponentDigits = 0; + + int maximumIntegerDigits = 40; + int minimumIntegerDigits = 1; + int maximumFractionDigits = 3; + int minimumFractionDigits = 0; + + int groupingSize = 3; + int finalGroupingSize = 3; + + bool decimalSeparatorAlwaysShown = false; + bool useSignForPositiveExponent = false; + bool useExponentialNotation = false; + + int? decimalDigits; + + // [decimalDigits] is both input and output of parsing. + NumberFormatParseResult(NumberSymbols symbols, this.decimalDigits) + : negativePrefix = symbols.MINUS_SIGN; +} + +/// Private class that parses the numeric formatting pattern and sets the +/// variables in [format] to appropriate values. Instances of this are +/// transient and store parsing state in instance variables, so can only be used +/// to parse a single pattern. +class NumberFormatParser { + /// The special characters in the pattern language. All others are treated + /// as literals. + static const PATTERN_SEPARATOR = ';'; + static const QUOTE = "'"; + static const PATTERN_DIGIT = '#'; + static const PATTERN_ZERO_DIGIT = '0'; + static const PATTERN_GROUPING_SEPARATOR = ','; + static const PATTERN_DECIMAL_SEPARATOR = '.'; + static const PATTERN_CURRENCY_SIGN = '\u00A4'; + static const PATTERN_PER_MILLE = '\u2030'; + static const PER_MILLE_SCALE = 1000; + static const PATTERN_PERCENT = '%'; + static const PERCENT_SCALE = 100; + static const PATTERN_EXPONENT = 'E'; + static const PATTERN_PLUS = '+'; + + /// The format whose state we are setting. + final NumberSymbols symbols; + + /// The pattern we are parsing. + final StringStack pattern; + + /// Whether this is a currency. + final bool isForCurrency; + + /// We can be passed a specific currency symbol, regardless of the locale. + final String currencySymbol; + + final String currencyName; + + // The result being constructed. + final NumberFormatParseResult result; + + bool groupingSizeSetExplicitly = false; + + /// Create a new [_NumberFormatParser] for a particular [NumberFormat] and + /// [input] pattern. + /// + /// [decimalDigits] is optional, if specified it overrides the default. + NumberFormatParser(this.symbols, String input, this.isForCurrency, + this.currencySymbol, this.currencyName, int? decimalDigits) + : result = NumberFormatParseResult(symbols, decimalDigits), + pattern = StringStack(input); + + static NumberFormatParseResult parse( + NumberSymbols symbols, + String? input, + bool isForCurrency, + String currencySymbol, + String currencyName, + int? decimalDigits) => + input == null + ? NumberFormatParseResult(symbols, decimalDigits) + : (NumberFormatParser(symbols, input, isForCurrency, currencySymbol, + currencyName, decimalDigits) + .._parse()) + .result; + + /// For currencies, the default number of decimal places to use in + /// formatting. Defaults to two for non-currencies or currencies where it's + /// not specified. + int get _defaultDecimalDigits => + currencyFractionDigits[currencyName.toUpperCase()] ?? + currencyFractionDigits['DEFAULT']!; + + /// Parse the input pattern and update [result]. + void _parse() { + result.positivePrefix = _parseAffix(); + var trunk = _parseTrunk(); + result.positiveSuffix = _parseAffix(); + // If we have separate positive and negative patterns, now parse the + // the negative version. + if (pattern.peek() == NumberFormatParser.PATTERN_SEPARATOR) { + pattern.pop(); + result.negativePrefix = _parseAffix(); + // Skip over the negative trunk, verifying that it's identical to the + // positive trunk. + var trunkStack = StringStack(trunk); + while (!trunkStack.atEnd) { + var each = trunkStack.read(); + if (pattern.peek() != each && !pattern.atEnd) { + throw FormatException( + 'Positive and negative trunks must be the same', trunk); + } + pattern.pop(); + } + result.negativeSuffix = _parseAffix(); + } else { + // If no negative affix is specified, they share the same positive affix. + result.negativePrefix = result.negativePrefix + result.positivePrefix; + result.negativeSuffix = result.positiveSuffix + result.negativeSuffix; + } + + if (isForCurrency) { + result.decimalDigits ??= _defaultDecimalDigits; + } + if (result.decimalDigits != null) { + result.minimumFractionDigits = result.decimalDigits!; + result.maximumFractionDigits = result.decimalDigits!; + } + } + + /// Variable used in parsing prefixes and suffixes to keep track of + /// whether or not we are in a quoted region. + bool inQuote = false; + + /// Parse a prefix or suffix and return the prefix/suffix string. Note that + /// this also may modify the state of [format]. + String _parseAffix() { + var affix = StringBuffer(); + inQuote = false; + while (parseCharacterAffix(affix) && pattern.read().isNotEmpty) {} + return affix.toString(); + } + + /// Parse an individual character as part of a prefix or suffix. Return true + /// if we should continue to look for more affix characters, and false if + /// we have reached the end. + bool parseCharacterAffix(StringBuffer affix) { + if (pattern.atEnd) return false; + var ch = pattern.peek(); + if (ch == QUOTE) { + var peek = pattern.peek(2); + if (peek.length == 2 && peek[1] == QUOTE) { + pattern.pop(); + affix.write(QUOTE); // 'don''t' + } else { + inQuote = !inQuote; + } + return true; + } + + if (inQuote) { + affix.write(ch); + } else { + switch (ch) { + case PATTERN_DIGIT: + case PATTERN_ZERO_DIGIT: + case PATTERN_GROUPING_SEPARATOR: + case PATTERN_DECIMAL_SEPARATOR: + case PATTERN_SEPARATOR: + return false; + case PATTERN_CURRENCY_SIGN: + // TODO(alanknight): Handle the local/global/portable currency signs + affix.write(currencySymbol); + break; + case PATTERN_PERCENT: + if (result.multiplier != 1 && result.multiplier != PERCENT_SCALE) { + throw const FormatException('Too many percent/permill'); + } + result.multiplier = PERCENT_SCALE; + affix.write(symbols.PERCENT); + break; + case PATTERN_PER_MILLE: + if (result.multiplier != 1 && result.multiplier != PER_MILLE_SCALE) { + throw const FormatException('Too many percent/permill'); + } + result.multiplier = PER_MILLE_SCALE; + affix.write(symbols.PERMILL); + break; + default: + affix.write(ch); + } + } + return true; + } + + /// Variables used in [_parseTrunk] and [parseTrunkCharacter]. + int decimalPos = -1; + int digitLeftCount = 0; + int zeroDigitCount = 0; + int digitRightCount = 0; + int groupingCount = -1; + + /// Parse the "trunk" portion of the pattern, the piece that doesn't include + /// positive or negative prefixes or suffixes. + String _parseTrunk() { + var loop = true; + var trunk = StringBuffer(); + while (pattern.peek().isNotEmpty && loop) { + loop = parseTrunkCharacter(trunk); + } + + if (zeroDigitCount == 0 && digitLeftCount > 0 && decimalPos >= 0) { + // Handle '###.###' and '###.' and '.###' + // Handle '.###' + var n = decimalPos == 0 ? 1 : decimalPos; + digitRightCount = digitLeftCount - n; + digitLeftCount = n - 1; + zeroDigitCount = 1; + } + + // Do syntax checking on the digits. + if (decimalPos < 0 && digitRightCount > 0 || + decimalPos >= 0 && + (decimalPos < digitLeftCount || + decimalPos > digitLeftCount + zeroDigitCount) || + groupingCount == 0) { + throw FormatException('Malformed pattern "${pattern.contents}"'); + } + var totalDigits = digitLeftCount + zeroDigitCount + digitRightCount; + + result.maximumFractionDigits = + decimalPos >= 0 ? totalDigits - decimalPos : 0; + if (decimalPos >= 0) { + result.minimumFractionDigits = + digitLeftCount + zeroDigitCount - decimalPos; + if (result.minimumFractionDigits < 0) { + result.minimumFractionDigits = 0; + } + } + + // The effectiveDecimalPos is the position the decimal is at or would be at + // if there is no decimal. Note that if decimalPos<0, then digitTotalCount + // == digitLeftCount + zeroDigitCount. + var effectiveDecimalPos = decimalPos >= 0 ? decimalPos : totalDigits; + result.minimumIntegerDigits = effectiveDecimalPos - digitLeftCount; + if (result.useExponentialNotation) { + result.maximumIntegerDigits = + digitLeftCount + result.minimumIntegerDigits; + + // In exponential display, we need to at least show something. + if (result.maximumFractionDigits == 0 && + result.minimumIntegerDigits == 0) { + result.minimumIntegerDigits = 1; + } + } + + result.finalGroupingSize = max(0, groupingCount); + if (!groupingSizeSetExplicitly) { + result.groupingSize = result.finalGroupingSize; + } + result.decimalSeparatorAlwaysShown = + decimalPos == 0 || decimalPos == totalDigits; + + return trunk.toString(); + } + + /// Parse an individual character of the trunk. Return true if we should + /// continue to look for additional trunk characters or false if we have + /// reached the end. + bool parseTrunkCharacter(StringBuffer trunk) { + var ch = pattern.peek(); + switch (ch) { + case PATTERN_DIGIT: + if (zeroDigitCount > 0) { + digitRightCount++; + } else { + digitLeftCount++; + } + if (groupingCount >= 0 && decimalPos < 0) { + groupingCount++; + } + break; + case PATTERN_ZERO_DIGIT: + if (digitRightCount > 0) { + throw FormatException( + 'Unexpected "0" in pattern "${pattern.contents}'); + } + zeroDigitCount++; + if (groupingCount >= 0 && decimalPos < 0) { + groupingCount++; + } + break; + case PATTERN_GROUPING_SEPARATOR: + if (groupingCount > 0) { + groupingSizeSetExplicitly = true; + result.groupingSize = groupingCount; + } + groupingCount = 0; + break; + case PATTERN_DECIMAL_SEPARATOR: + if (decimalPos >= 0) { + throw FormatException( + 'Multiple decimal separators in pattern "$pattern"'); + } + decimalPos = digitLeftCount + zeroDigitCount + digitRightCount; + break; + case PATTERN_EXPONENT: + trunk.write(ch); + if (result.useExponentialNotation) { + throw FormatException( + 'Multiple exponential symbols in pattern "$pattern"'); + } + result.useExponentialNotation = true; + result.minimumExponentDigits = 0; + + // exponent pattern can have a optional '+'. + pattern.pop(); + var nextChar = pattern.peek(); + if (nextChar == PATTERN_PLUS) { + trunk.write(pattern.read()); + result.useSignForPositiveExponent = true; + } + + // Use lookahead to parse out the exponential part + // of the pattern, then jump into phase 2. + while (pattern.peek() == PATTERN_ZERO_DIGIT) { + trunk.write(pattern.read()); + result.minimumExponentDigits++; + } + + if ((digitLeftCount + zeroDigitCount) < 1 || + result.minimumExponentDigits < 1) { + throw FormatException('Malformed exponential pattern "$pattern"'); + } + return false; + default: + return false; + } + trunk.write(ch); + pattern.pop(); + return true; + } +} + +final _ln10 = log(10); diff --git a/dart/lib/src/vendor/intl/number_parser.dart b/dart/lib/src/vendor/intl/number_parser.dart new file mode 100644 index 0000000000..d5e1ecb669 --- /dev/null +++ b/dart/lib/src/vendor/intl/number_parser.dart @@ -0,0 +1,241 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'number_symbols.dart'; + +import 'constants.dart' as constants; +import 'number_format.dart'; +import 'number_format_parser.dart'; +import 'string_stack.dart'; + +/// A one-time object for parsing a particular numeric string. One-time here +/// means an instance can only parse one string. This is implemented by +/// transforming from a locale-specific format to one that the system can parse, +/// then calls the system parsing methods on it. +class NumberParser { + /// The format for which we are parsing. + final NumberFormat format; + + /// The text we are parsing. + final String text; + + /// What we use to iterate over the input text. + final StringStack input; + + /// The result of parsing [text] according to [format]. Automatically + /// populated in the constructor. + num? value; + + /// The symbols used by our format. + NumberSymbols get symbols => format.symbols; + + /// Where we accumulate the normalized representation of the number. + final StringBuffer _normalized = StringBuffer(); + + /// Did we see something that indicates this is, or at least might be, + /// a positive number. + bool gotPositive = false; + + /// Did we see something that indicates this is, or at least might be, + /// a negative number. + bool gotNegative = false; + + /// Did we see the required positive suffix at the end. Should + /// match [gotPositive]. + bool gotPositiveSuffix = false; + + /// Did we see the required negative suffix at the end. Should + /// match [gotNegative]. + bool gotNegativeSuffix = false; + + /// Should we stop parsing before hitting the end of the string. + bool done = false; + + /// Have we already skipped over any required prefixes. + bool prefixesSkipped = false; + + /// If the number is percent or permill, what do we divide by at the end. + int scale = 1; + + String get _positivePrefix => format.positivePrefix; + String get _negativePrefix => format.negativePrefix; + String get _positiveSuffix => format.positiveSuffix; + String get _negativeSuffix => format.negativeSuffix; + int get _localeZero => format.localeZero; + + /// Create a new [_NumberParser] on which we can call parse(). + NumberParser(this.format, this.text) : input = StringStack(text) { + scale = format.multiplier; + value = parse(); + } + + /// The strings we might replace with functions that return the replacement + /// values. They are functions because we might need to check something + /// in the context. Note that the ordering is important here. For example, + /// `symbols.PERCENT` might be " %", and we must handle that before we + /// look at an individual space. + Map get replacements => + _replacements ??= _initializeReplacements(); + + Map? _replacements; + + Map _initializeReplacements() => { + symbols.DECIMAL_SEP: () => '.', + symbols.EXP_SYMBOL: () => 'E', + symbols.GROUP_SEP: handleSpace, + symbols.PERCENT: () { + scale = NumberFormatParser.PERCENT_SCALE; + return ''; + }, + symbols.PERMILL: () { + scale = NumberFormatParser.PER_MILLE_SCALE; + return ''; + }, + ' ': handleSpace, + '\u00a0': handleSpace, + '+': () => '+', + '-': () => '-', + }; + + void invalidFormat() => + throw FormatException('Invalid number: ${input.contents}'); + + /// Replace a space in the number with the normalized form. If space is not + /// a significant character (normally grouping) then it's just invalid. If it + /// is the grouping character, then it's only valid if it's followed by a + /// digit. e.g. '$12 345.00' + void handleSpace() => + groupingIsNotASpaceOrElseItIsSpaceFollowedByADigit ? '' : invalidFormat(); + + /// Determine if a space is a valid character in the number. See + /// [handleSpace]. + bool get groupingIsNotASpaceOrElseItIsSpaceFollowedByADigit { + if (symbols.GROUP_SEP != '\u00a0' || symbols.GROUP_SEP != ' ') return true; + var peeked = input.peek(symbols.GROUP_SEP.length + 1); + return asDigit(peeked[peeked.length - 1]) != null; + } + + /// Turn [char] into a number representing a digit, or null if it doesn't + /// represent a digit in this locale. + int? asDigit(String char) { + var charCode = char.codeUnitAt(0); + var digitValue = charCode - _localeZero; + if (digitValue >= 0 && digitValue < 10) { + return digitValue; + } else { + return null; + } + } + + /// Check to see if the input begins with either the positive or negative + /// prefixes. Set the [gotPositive] and [gotNegative] variables accordingly. + void checkPrefixes({bool skip = false}) { + bool checkPrefix(String prefix) => + prefix.isNotEmpty && input.startsWith(prefix); + + // TODO(alanknight): There's a faint possibility of a bug here where + // a positive prefix is followed by a negative prefix that's also a valid + // part of the number, but that seems very unlikely. + if (checkPrefix(_positivePrefix)) gotPositive = true; + if (checkPrefix(_negativePrefix)) gotNegative = true; + + // The positive prefix might be a substring of the negative, in + // which case both would match. + if (gotPositive && gotNegative) { + if (_positivePrefix.length > _negativePrefix.length) { + gotNegative = false; + } else if (_negativePrefix.length > _positivePrefix.length) { + gotPositive = false; + } + } + if (skip) { + if (gotPositive) input.pop(_positivePrefix.length); + if (gotNegative) input.pop(_negativePrefix.length); + } + } + + /// If the rest of our input is either the positive or negative suffix, + /// set [gotPositiveSuffix] or [gotNegativeSuffix] accordingly. + void checkSuffixes() { + var remainder = input.peekAll(); + if (remainder == _positiveSuffix) gotPositiveSuffix = true; + if (remainder == _negativeSuffix) gotNegativeSuffix = true; + } + + /// We've encountered a character that's not a digit. Go through our + /// replacement rules looking for how to handle it. If we see something + /// that's not a digit and doesn't have a replacement, then we're done + /// and the number is probably invalid. + void processNonDigit() { + // It might just be a prefix that we haven't skipped. We don't want to + // skip them initially because they might also be semantically meaningful, + // e.g. leading %. So we allow them through the loop, but only once. + var foundAnInterpretation = false; + if (input.atStart && !prefixesSkipped) { + prefixesSkipped = true; + checkPrefixes(skip: true); + foundAnInterpretation = true; + } + + for (var key in replacements.keys) { + if (input.startsWith(key)) { + _normalized.write(replacements[key]!()); + input.pop(key.length); + return; + } + } + // We haven't found either of these things, this seems invalid. + if (!foundAnInterpretation) { + done = true; + } + } + + /// Parse [text] and return the resulting number. Throws [FormatException] + /// if we can't parse it. + num parse() { + if (text == symbols.NAN) return 0.0 / 0.0; + if (text == '$_positivePrefix${symbols.INFINITY}$_positiveSuffix') { + return 1.0 / 0.0; + } + if (text == '$_negativePrefix${symbols.INFINITY}$_negativeSuffix') { + return -1.0 / 0.0; + } + + checkPrefixes(); + var parsed = parseNumber(input); + + if (gotPositive && !gotPositiveSuffix) invalidNumber(); + if (gotNegative && !gotNegativeSuffix) invalidNumber(); + if (!input.atEnd) invalidNumber(); + + return parsed; + } + + /// The number is invalid, throw a [FormatException]. + void invalidNumber() => + throw FormatException('Invalid Number: ${input.contents}'); + + /// Parse the number portion of the input, i.e. not any prefixes or suffixes, + /// and assuming NaN and Infinity are already handled. + num parseNumber(StringStack input) { + if (gotNegative) { + _normalized.write('-'); + } + while (!done && !input.atEnd) { + var digit = asDigit(input.peek()); + if (digit != null) { + _normalized.writeCharCode(constants.asciiZeroCodeUnit + digit); + input.next(); + } else { + processNonDigit(); + } + checkSuffixes(); + } + + var normalizedText = _normalized.toString(); + num? parsed = int.tryParse(normalizedText); + parsed ??= double.parse(normalizedText); + return parsed / scale; + } +} diff --git a/dart/lib/src/vendor/intl/number_symbols.dart b/dart/lib/src/vendor/intl/number_symbols.dart new file mode 100644 index 0000000000..bce154bb7a --- /dev/null +++ b/dart/lib/src/vendor/intl/number_symbols.dart @@ -0,0 +1,65 @@ +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. +library number_symbols; + +// Suppress naming issues as changes would be breaking. +// ignore_for_file: non_constant_identifier_names + +/// This holds onto information about how a particular locale formats +/// numbers. It contains strings for things like the decimal separator, digit to +/// use for "0" and infinity. We expect the data for instances to be generated +/// out of ICU or a similar reference source. +class NumberSymbols { + final String NAME; + final String DECIMAL_SEP, + GROUP_SEP, + PERCENT, + ZERO_DIGIT, + PLUS_SIGN, + MINUS_SIGN, + EXP_SYMBOL, + PERMILL, + INFINITY, + NAN, + DECIMAL_PATTERN, + SCIENTIFIC_PATTERN, + PERCENT_PATTERN, + CURRENCY_PATTERN, + DEF_CURRENCY_CODE; + + const NumberSymbols( + {required this.NAME, + required this.DECIMAL_SEP, + required this.GROUP_SEP, + required this.PERCENT, + required this.ZERO_DIGIT, + required this.PLUS_SIGN, + required this.MINUS_SIGN, + required this.EXP_SYMBOL, + required this.PERMILL, + required this.INFINITY, + required this.NAN, + required this.DECIMAL_PATTERN, + required this.SCIENTIFIC_PATTERN, + required this.PERCENT_PATTERN, + required this.CURRENCY_PATTERN, + required this.DEF_CURRENCY_CODE}); + + @override + String toString() => NAME; +} + +/// A container class for SHORT, LONG, and SHORT CURRENCY patterns. +/// +/// (This class' members contain more than just symbols: they contain the full +/// number formatting pattern.) +class CompactNumberSymbols { + final Map> COMPACT_DECIMAL_SHORT_PATTERN; + final Map>? COMPACT_DECIMAL_LONG_PATTERN; + final Map> COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN; + CompactNumberSymbols( + {required this.COMPACT_DECIMAL_SHORT_PATTERN, + this.COMPACT_DECIMAL_LONG_PATTERN, + required this.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN}); +} diff --git a/dart/lib/src/vendor/intl/number_symbols_data.dart b/dart/lib/src/vendor/intl/number_symbols_data.dart new file mode 100644 index 0000000000..9b0ea379d3 --- /dev/null +++ b/dart/lib/src/vendor/intl/number_symbols_data.dart @@ -0,0 +1,5348 @@ +// Copyright (c) 2014, the Dart project authors. +// Please see the AUTHORS file +// for details. All rights reserved. Use of this source +// code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// Date/time formatting symbols for all locales. +/// +/// DO NOT EDIT. This file is autogenerated by script. See +/// http://go/generate_number_constants.py using the --for_dart flag. +/// File generated from CLDR ver. 41 +/// +/// Before checkin, this file could have been manually edited. This is +/// to incorporate changes before we could correct CLDR. All manual +/// modification must be documented in this section, and should be +/// removed after those changes land to CLDR. +// MANUAL EDIT TO SUPPRESS WARNINGS IN GENERATED CODE +// ignore_for_file: unnecessary_new, prefer_single_quotes, prefer_const_constructors +library number_symbol_data; + +import 'number_symbols.dart'; + +/// Map from locale to [NumberSymbols] used for that locale. +// TODO(#482): "final Map" +final Map numberFormatSymbols = { + // Number formatting symbols for locale af. + "af": new NumberSymbols( + NAME: "af", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'ZAR'), + // Number formatting symbols for locale am. + "am": new NumberSymbols( + NAME: "am", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'ETB'), + // Number formatting symbols for locale ar. + "ar": new NumberSymbols( + NAME: "ar", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '\u200E%\u200E', + ZERO_DIGIT: '0', + PLUS_SIGN: '\u200E+', + MINUS_SIGN: '\u200E-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: '\u0644\u064A\u0633\u00A0\u0631\u0642\u0645\u064B\u0627', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', + DEF_CURRENCY_CODE: 'EGP'), + // Number formatting symbols for locale ar_DZ. + "ar_DZ": new NumberSymbols( + NAME: "ar_DZ", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '\u200E%\u200E', + ZERO_DIGIT: '0', + PLUS_SIGN: '\u200E+', + MINUS_SIGN: '\u200E-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: '\u0644\u064A\u0633\u00A0\u0631\u0642\u0645\u064B\u0627', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', + DEF_CURRENCY_CODE: 'DZD'), + // Number formatting symbols for locale ar_EG. + "ar_EG": new NumberSymbols( + NAME: "ar_EG", + DECIMAL_SEP: '\u066B', + GROUP_SEP: '\u066C', + PERCENT: '\u066A\u061C', + ZERO_DIGIT: '\u0660', + PLUS_SIGN: '\u061C+', + MINUS_SIGN: '\u061C-', + EXP_SYMBOL: '\u0627\u0633', + PERMILL: '\u0609', + INFINITY: '\u221E', + NAN: '\u0644\u064A\u0633\u00A0\u0631\u0642\u0645', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EGP'), + // Number formatting symbols for locale as. + "as": new NumberSymbols( + NAME: "as", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '\u09E6', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##,##0.00', + DEF_CURRENCY_CODE: 'INR'), + // Number formatting symbols for locale az. + "az": new NumberSymbols( + NAME: "az", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'AZN'), + // Number formatting symbols for locale be. + "be": new NumberSymbols( + NAME: "be", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'BYN'), + // Number formatting symbols for locale bg. + "bg": new NumberSymbols( + NAME: "bg", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'BGN'), + // Number formatting symbols for locale bm. + "bm": new NumberSymbols( + NAME: "bm", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'XOF'), + // Number formatting symbols for locale bn. + "bn": new NumberSymbols( + NAME: "bn", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '\u09E6', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##,##0.00\u00A4', + DEF_CURRENCY_CODE: 'BDT'), + // Number formatting symbols for locale br. + "br": new NumberSymbols( + NAME: "br", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale bs. + "bs": new NumberSymbols( + NAME: "bs", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'BAM'), + // Number formatting symbols for locale ca. + "ca": new NumberSymbols( + NAME: "ca", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale chr. + "chr": new NumberSymbols( + NAME: "chr", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'USD'), + // Number formatting symbols for locale cs. + "cs": new NumberSymbols( + NAME: "cs", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'CZK'), + // Number formatting symbols for locale cy. + "cy": new NumberSymbols( + NAME: "cy", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'GBP'), + // Number formatting symbols for locale da. + "da": new NumberSymbols( + NAME: "da", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'DKK'), + // Number formatting symbols for locale de. + "de": new NumberSymbols( + NAME: "de", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale de_AT. + "de_AT": new NumberSymbols( + NAME: "de_AT", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale de_CH. + "de_CH": new NumberSymbols( + NAME: "de_CH", + DECIMAL_SEP: '.', + GROUP_SEP: '\u2019', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00;\u00A4-#,##0.00', + DEF_CURRENCY_CODE: 'CHF'), + // Number formatting symbols for locale el. + "el": new NumberSymbols( + NAME: "el", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'e', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale en. + "en": new NumberSymbols( + NAME: "en", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'USD'), + // Number formatting symbols for locale en_AU. + "en_AU": new NumberSymbols( + NAME: "en_AU", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'e', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'AUD'), + // Number formatting symbols for locale en_CA. + "en_CA": new NumberSymbols( + NAME: "en_CA", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'CAD'), + // Number formatting symbols for locale en_GB. + "en_GB": new NumberSymbols( + NAME: "en_GB", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'GBP'), + // Number formatting symbols for locale en_IE. + "en_IE": new NumberSymbols( + NAME: "en_IE", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale en_IN. + "en_IN": new NumberSymbols( + NAME: "en_IN", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##,##0%', + CURRENCY_PATTERN: '\u00A4#,##,##0.00', + DEF_CURRENCY_CODE: 'INR'), + // Number formatting symbols for locale en_MY. + "en_MY": new NumberSymbols( + NAME: "en_MY", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'MYR'), + // Number formatting symbols for locale en_NZ. + "en_NZ": new NumberSymbols( + NAME: "en_NZ", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'NZD'), + // Number formatting symbols for locale en_SG. + "en_SG": new NumberSymbols( + NAME: "en_SG", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'SGD'), + // Number formatting symbols for locale en_US. + "en_US": new NumberSymbols( + NAME: "en_US", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'USD'), + // Number formatting symbols for locale en_ZA. + "en_ZA": new NumberSymbols( + NAME: "en_ZA", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'ZAR'), + // Number formatting symbols for locale es. + "es": new NumberSymbols( + NAME: "es", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale es_419. + "es_419": new NumberSymbols( + NAME: "es_419", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'MXN'), + // Number formatting symbols for locale es_ES. + "es_ES": new NumberSymbols( + NAME: "es_ES", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale es_MX. + "es_MX": new NumberSymbols( + NAME: "es_MX", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'MXN'), + // Number formatting symbols for locale es_US. + "es_US": new NumberSymbols( + NAME: "es_US", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'USD'), + // Number formatting symbols for locale et. + "et": new NumberSymbols( + NAME: "et", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '\u2212', + EXP_SYMBOL: '\u00D710^', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale eu. + "eu": new NumberSymbols( + NAME: "eu", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '\u2212', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '%\u00A0#,##0', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale fa. + "fa": new NumberSymbols( + NAME: "fa", + DECIMAL_SEP: '\u066B', + GROUP_SEP: '\u066C', + PERCENT: '\u066A', + ZERO_DIGIT: '\u06F0', + PLUS_SIGN: '\u200E+', + MINUS_SIGN: '\u200E\u2212', + EXP_SYMBOL: '\u00D7\u06F1\u06F0^', + PERMILL: '\u0609', + INFINITY: '\u221E', + NAN: '\u0646\u0627\u0639\u062F\u062F', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u200E\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'IRR'), + // Number formatting symbols for locale fi. + "fi": new NumberSymbols( + NAME: "fi", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '\u2212', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'ep\u00E4luku', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale fil. + "fil": new NumberSymbols( + NAME: "fil", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'PHP'), + // Number formatting symbols for locale fr. + "fr": new NumberSymbols( + NAME: "fr", + DECIMAL_SEP: ',', + GROUP_SEP: '\u202F', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale fr_CA. + "fr_CA": new NumberSymbols( + NAME: "fr_CA", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'CAD'), + // Number formatting symbols for locale fr_CH. + "fr_CH": new NumberSymbols( + NAME: "fr_CH", + DECIMAL_SEP: ',', + GROUP_SEP: '\u202F', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'CHF'), + // Number formatting symbols for locale fur. + "fur": new NumberSymbols( + NAME: "fur", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale ga. + "ga": new NumberSymbols( + NAME: "ga", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'Nuimh', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale gl. + "gl": new NumberSymbols( + NAME: "gl", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale gsw. + "gsw": new NumberSymbols( + NAME: "gsw", + DECIMAL_SEP: '.', + GROUP_SEP: '\u2019', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '\u2212', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'CHF'), + // Number formatting symbols for locale gu. + "gu": new NumberSymbols( + NAME: "gu", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##,##0.###', + SCIENTIFIC_PATTERN: '[#E0]', + PERCENT_PATTERN: '#,##,##0%', + CURRENCY_PATTERN: '\u00A4#,##,##0.00', + DEF_CURRENCY_CODE: 'INR'), + // Number formatting symbols for locale haw. + "haw": new NumberSymbols( + NAME: "haw", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'USD'), + // Number formatting symbols for locale he. + "he": new NumberSymbols( + NAME: "he", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '\u200E+', + MINUS_SIGN: '\u200E-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: + '\u200F#,##0.00\u00A0\u00A4;\u200F-#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'ILS'), + // Number formatting symbols for locale hi. + "hi": new NumberSymbols( + NAME: "hi", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##,##0.###', + SCIENTIFIC_PATTERN: '[#E0]', + PERCENT_PATTERN: '#,##,##0%', + CURRENCY_PATTERN: '\u00A4#,##,##0.00', + DEF_CURRENCY_CODE: 'INR'), + // Number formatting symbols for locale hr. + "hr": new NumberSymbols( + NAME: "hr", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '\u2212', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'HRK'), + // Number formatting symbols for locale hu. + "hu": new NumberSymbols( + NAME: "hu", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'HUF'), + // Number formatting symbols for locale hy. + "hy": new NumberSymbols( + NAME: "hy", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: '\u0548\u0579\u0539', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'AMD'), + // Number formatting symbols for locale id. + "id": new NumberSymbols( + NAME: "id", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'IDR'), + // Number formatting symbols for locale in. + "in": new NumberSymbols( + NAME: "in", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'IDR'), + // Number formatting symbols for locale is. + "is": new NumberSymbols( + NAME: "is", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'ISK'), + // Number formatting symbols for locale it. + "it": new NumberSymbols( + NAME: "it", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale it_CH. + "it_CH": new NumberSymbols( + NAME: "it_CH", + DECIMAL_SEP: '.', + GROUP_SEP: '\u2019', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00;\u00A4-#,##0.00', + DEF_CURRENCY_CODE: 'CHF'), + // Number formatting symbols for locale iw. + "iw": new NumberSymbols( + NAME: "iw", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '\u200E+', + MINUS_SIGN: '\u200E-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: + '\u200F#,##0.00\u00A0\u00A4;\u200F-#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'ILS'), + // Number formatting symbols for locale ja. + "ja": new NumberSymbols( + NAME: "ja", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'JPY'), + // Number formatting symbols for locale ka. + "ka": new NumberSymbols( + NAME: "ka", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: + '\u10D0\u10E0\u00A0\u10D0\u10E0\u10D8\u10E1\u00A0\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'GEL'), + // Number formatting symbols for locale kk. + "kk": new NumberSymbols( + NAME: "kk", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: '\u0441\u0430\u043D\u00A0\u0435\u043C\u0435\u0441', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'KZT'), + // Number formatting symbols for locale km. + "km": new NumberSymbols( + NAME: "km", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A4', + DEF_CURRENCY_CODE: 'KHR'), + // Number formatting symbols for locale kn. + "kn": new NumberSymbols( + NAME: "kn", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'INR'), + // Number formatting symbols for locale ko. + "ko": new NumberSymbols( + NAME: "ko", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'KRW'), + // Number formatting symbols for locale ky. + "ky": new NumberSymbols( + NAME: "ky", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: '\u0441\u0430\u043D\u00A0\u044D\u043C\u0435\u0441', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'KGS'), + // Number formatting symbols for locale ln. + "ln": new NumberSymbols( + NAME: "ln", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'CDF'), + // Number formatting symbols for locale lo. + "lo": new NumberSymbols( + NAME: "lo", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: + '\u0E9A\u0ECD\u0EC8\u200B\u0EC1\u0EA1\u0EC8\u0E99\u200B\u0EC2\u0E95\u200B\u0EC0\u0EA5\u0E81', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00;\u00A4-#,##0.00', + DEF_CURRENCY_CODE: 'LAK'), + // Number formatting symbols for locale lt. + "lt": new NumberSymbols( + NAME: "lt", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '\u2212', + EXP_SYMBOL: '\u00D710^', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale lv. + "lv": new NumberSymbols( + NAME: "lv", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NS', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale mg. + "mg": new NumberSymbols( + NAME: "mg", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', + DEF_CURRENCY_CODE: 'MGA'), + // Number formatting symbols for locale mk. + "mk": new NumberSymbols( + NAME: "mk", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'MKD'), + // Number formatting symbols for locale ml. + "ml": new NumberSymbols( + NAME: "ml", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'INR'), + // Number formatting symbols for locale mn. + "mn": new NumberSymbols( + NAME: "mn", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', + DEF_CURRENCY_CODE: 'MNT'), + // Number formatting symbols for locale mr. + "mr": new NumberSymbols( + NAME: "mr", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '\u0966', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##,##0.###', + SCIENTIFIC_PATTERN: '[#E0]', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'INR'), + // Number formatting symbols for locale ms. + "ms": new NumberSymbols( + NAME: "ms", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'MYR'), + // Number formatting symbols for locale mt. + "mt": new NumberSymbols( + NAME: "mt", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale my. + "my": new NumberSymbols( + NAME: "my", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '\u1040', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: + '\u1002\u100F\u1014\u103A\u1038\u1019\u101F\u102F\u1010\u103A\u101E\u1031\u102C', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'MMK'), + // Number formatting symbols for locale nb. + "nb": new NumberSymbols( + NAME: "nb", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '\u2212', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00;\u00A4\u00A0-#,##0.00', + DEF_CURRENCY_CODE: 'NOK'), + // Number formatting symbols for locale ne. + "ne": new NumberSymbols( + NAME: "ne", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '\u0966', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##,##0.00', + DEF_CURRENCY_CODE: 'NPR'), + // Number formatting symbols for locale nl. + "nl": new NumberSymbols( + NAME: "nl", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00;\u00A4\u00A0-#,##0.00', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale no. + "no": new NumberSymbols( + NAME: "no", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '\u2212', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00;\u00A4\u00A0-#,##0.00', + DEF_CURRENCY_CODE: 'NOK'), + // Number formatting symbols for locale no_NO. + "no_NO": new NumberSymbols( + NAME: "no_NO", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '\u2212', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00;\u00A4\u00A0-#,##0.00', + DEF_CURRENCY_CODE: 'NOK'), + // Number formatting symbols for locale nyn. + "nyn": new NumberSymbols( + NAME: "nyn", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'UGX'), + // Number formatting symbols for locale or. + "or": new NumberSymbols( + NAME: "or", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'INR'), + // Number formatting symbols for locale pa. + "pa": new NumberSymbols( + NAME: "pa", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##,##0.###', + SCIENTIFIC_PATTERN: '[#E0]', + PERCENT_PATTERN: '#,##,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##,##0.00', + DEF_CURRENCY_CODE: 'INR'), + // Number formatting symbols for locale pl. + "pl": new NumberSymbols( + NAME: "pl", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'PLN'), + // Number formatting symbols for locale ps. + "ps": new NumberSymbols( + NAME: "ps", + DECIMAL_SEP: '\u066B', + GROUP_SEP: '\u066C', + PERCENT: '\u066A', + ZERO_DIGIT: '\u06F0', + PLUS_SIGN: '\u200E+\u200E', + MINUS_SIGN: '\u200E-\u200E', + EXP_SYMBOL: '\u00D7\u06F1\u06F0^', + PERMILL: '\u0609', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'AFN'), + // Number formatting symbols for locale pt. + "pt": new NumberSymbols( + NAME: "pt", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', + DEF_CURRENCY_CODE: 'BRL'), + // Number formatting symbols for locale pt_BR. + "pt_BR": new NumberSymbols( + NAME: "pt_BR", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', + DEF_CURRENCY_CODE: 'BRL'), + // Number formatting symbols for locale pt_PT. + "pt_PT": new NumberSymbols( + NAME: "pt_PT", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale ro. + "ro": new NumberSymbols( + NAME: "ro", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'RON'), + // Number formatting symbols for locale ru. + "ru": new NumberSymbols( + NAME: "ru", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: '\u043D\u0435\u00A0\u0447\u0438\u0441\u043B\u043E', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'RUB'), + // Number formatting symbols for locale si. + "si": new NumberSymbols( + NAME: "si", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'LKR'), + // Number formatting symbols for locale sk. + "sk": new NumberSymbols( + NAME: "sk", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'e', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale sl. + "sl": new NumberSymbols( + NAME: "sl", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '\u2212', + EXP_SYMBOL: 'e', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'EUR'), + // Number formatting symbols for locale sq. + "sq": new NumberSymbols( + NAME: "sq", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'ALL'), + // Number formatting symbols for locale sr. + "sr": new NumberSymbols( + NAME: "sr", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'RSD'), + // Number formatting symbols for locale sr_Latn. + "sr_Latn": new NumberSymbols( + NAME: "sr_Latn", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'RSD'), + // Number formatting symbols for locale sv. + "sv": new NumberSymbols( + NAME: "sv", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '\u2212', + EXP_SYMBOL: '\u00D710^', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0\u00A0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'SEK'), + // Number formatting symbols for locale sw. + "sw": new NumberSymbols( + NAME: "sw", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', + DEF_CURRENCY_CODE: 'TZS'), + // Number formatting symbols for locale ta. + "ta": new NumberSymbols( + NAME: "ta", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##,##0.00', + DEF_CURRENCY_CODE: 'INR'), + // Number formatting symbols for locale te. + "te": new NumberSymbols( + NAME: "te", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##,##0.00', + DEF_CURRENCY_CODE: 'INR'), + // Number formatting symbols for locale th. + "th": new NumberSymbols( + NAME: "th", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'THB'), + // Number formatting symbols for locale tl. + "tl": new NumberSymbols( + NAME: "tl", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'PHP'), + // Number formatting symbols for locale tr. + "tr": new NumberSymbols( + NAME: "tr", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '%#,##0', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'TRY'), + // Number formatting symbols for locale uk. + "uk": new NumberSymbols( + NAME: "uk", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: '\u0415', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'UAH'), + // Number formatting symbols for locale ur. + "ur": new NumberSymbols( + NAME: "ur", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '\u200E+', + MINUS_SIGN: '\u200E-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', + DEF_CURRENCY_CODE: 'PKR'), + // Number formatting symbols for locale uz. + "uz": new NumberSymbols( + NAME: "uz", + DECIMAL_SEP: ',', + GROUP_SEP: '\u00A0', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'son\u00A0emas', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'UZS'), + // Number formatting symbols for locale vi. + "vi": new NumberSymbols( + NAME: "vi", + DECIMAL_SEP: ',', + GROUP_SEP: '.', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', + DEF_CURRENCY_CODE: 'VND'), + // Number formatting symbols for locale zh. + "zh": new NumberSymbols( + NAME: "zh", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'CNY'), + // Number formatting symbols for locale zh_CN. + "zh_CN": new NumberSymbols( + NAME: "zh_CN", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'CNY'), + // Number formatting symbols for locale zh_HK. + "zh_HK": new NumberSymbols( + NAME: "zh_HK", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: '\u975E\u6578\u503C', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'HKD'), + // Number formatting symbols for locale zh_TW. + "zh_TW": new NumberSymbols( + NAME: "zh_TW", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: '\u975E\u6578\u503C', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'TWD'), + // Number formatting symbols for locale zu. + "zu": new NumberSymbols( + NAME: "zu", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'ZAR') +}; + +Map compactNumberSymbols = { + // Compact number symbols for locale af. + "af": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0k'}, + 6: {'other': '0\u00A0m'}, + 9: {'other': '0\u00A0mjd'}, + 12: {'other': '0\u00A0bn'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 duisend'}, + 6: {'other': '0 miljoen'}, + 9: {'other': '0 miljard'}, + 12: {'other': '0 biljoen'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u00A0k'}, + 6: {'other': '\u00A40\u00A0m'}, + 9: {'other': '\u00A40\u00A0mjd'}, + 12: {'other': '\u00A40\u00A0bn'}, + }), + // Compact number symbols for locale am. + "am": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u123A'}, + 6: {'other': '0\u00A0\u121A'}, + 9: {'other': '0\u00A0\u1262'}, + 12: {'other': '0\u00A0\u1275'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u123A'}, + 6: {'other': '0 \u121A\u120A\u12EE\u1295'}, + 9: {'other': '0 \u1262\u120A\u12EE\u1295'}, + 12: {'other': '0 \u1275\u122A\u120A\u12EE\u1295'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u00A0\u123A'}, + 6: {'other': '\u00A40\u00A0\u121A'}, + 9: {'other': '\u00A40\u00A0\u1262'}, + 12: {'other': '\u00A40\u00A0\u1275'}, + }), + // Compact number symbols for locale ar. + "ar": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: { + 'few': '0\u00A0\u0622\u0644\u0627\u0641', + 'many': '0\u00A0\u0623\u0644\u0641', + 'one': '0\u00A0\u0623\u0644\u0641', + 'other': '0\u00A0\u0623\u0644\u0641', + 'two': '0\u00A0\u0623\u0644\u0641', + 'zero': '0\u00A0\u0623\u0644\u0641', + }, + 4: {'other': '00\u00A0\u0623\u0644\u0641'}, + 6: {'other': '0\u00A0\u0645\u0644\u064A\u0648\u0646'}, + 9: {'other': '0\u00A0\u0645\u0644\u064A\u0627\u0631'}, + 12: {'other': '0\u00A0\u062A\u0631\u0644\u064A\u0648\u0646'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 \u0622\u0644\u0627\u0641', + 'many': '0 \u0623\u0644\u0641', + 'one': '0 \u0623\u0644\u0641', + 'other': '0 \u0623\u0644\u0641', + 'two': '0 \u0623\u0644\u0641', + 'zero': '0 \u0623\u0644\u0641', + }, + 4: {'other': '00 \u0623\u0644\u0641'}, + 6: { + 'few': '0 \u0645\u0644\u0627\u064A\u064A\u0646', + 'many': '0 \u0645\u0644\u064A\u0648\u0646', + 'one': '0 \u0645\u0644\u064A\u0648\u0646', + 'other': '0 \u0645\u0644\u064A\u0648\u0646', + 'two': '0 \u0645\u0644\u064A\u0648\u0646', + 'zero': '0 \u0645\u0644\u064A\u0648\u0646', + }, + 8: {'other': '000 \u0645\u0644\u064A\u0648\u0646'}, + 9: {'other': '0 \u0645\u0644\u064A\u0627\u0631'}, + 12: {'other': '0 \u062A\u0631\u0644\u064A\u0648\u0646'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u0623\u0644\u0641\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u0645\u0644\u064A\u0648\u0646\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u0645\u0644\u064A\u0627\u0631\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u062A\u0631\u0644\u064A\u0648\u0646\u00A0\u00A4'}, + }), + // Compact number symbols for locale ar_DZ. + "ar_DZ": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: { + 'few': '0\u00A0\u0622\u0644\u0627\u0641', + 'many': '0\u00A0\u0623\u0644\u0641', + 'one': '0\u00A0\u0623\u0644\u0641', + 'other': '0\u00A0\u0623\u0644\u0641', + 'two': '0\u00A0\u0623\u0644\u0641', + 'zero': '0\u00A0\u0623\u0644\u0641', + }, + 4: {'other': '00\u00A0\u0623\u0644\u0641'}, + 6: {'other': '0\u00A0\u0645\u0644\u064A\u0648\u0646'}, + 9: {'other': '0\u00A0\u0645\u0644\u064A\u0627\u0631'}, + 12: {'other': '0\u00A0\u062A\u0631\u0644\u064A\u0648\u0646'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 \u0622\u0644\u0627\u0641', + 'many': '0 \u0623\u0644\u0641', + 'one': '0 \u0623\u0644\u0641', + 'other': '0 \u0623\u0644\u0641', + 'two': '0 \u0623\u0644\u0641', + 'zero': '0 \u0623\u0644\u0641', + }, + 4: {'other': '00 \u0623\u0644\u0641'}, + 6: { + 'few': '0 \u0645\u0644\u0627\u064A\u064A\u0646', + 'many': '0 \u0645\u0644\u064A\u0648\u0646', + 'one': '0 \u0645\u0644\u064A\u0648\u0646', + 'other': '0 \u0645\u0644\u064A\u0648\u0646', + 'two': '0 \u0645\u0644\u064A\u0648\u0646', + 'zero': '0 \u0645\u0644\u064A\u0648\u0646', + }, + 8: {'other': '000 \u0645\u0644\u064A\u0648\u0646'}, + 9: {'other': '0 \u0645\u0644\u064A\u0627\u0631'}, + 12: {'other': '0 \u062A\u0631\u0644\u064A\u0648\u0646'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u0623\u0644\u0641\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u0645\u0644\u064A\u0648\u0646\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u0645\u0644\u064A\u0627\u0631\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u062A\u0631\u0644\u064A\u0648\u0646\u00A0\u00A4'}, + }), + // Compact number symbols for locale ar_EG. + "ar_EG": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: { + 'few': '0\u00A0\u0622\u0644\u0627\u0641', + 'many': '0\u00A0\u0623\u0644\u0641', + 'one': '0\u00A0\u0623\u0644\u0641', + 'other': '0\u00A0\u0623\u0644\u0641', + 'two': '0\u00A0\u0623\u0644\u0641', + 'zero': '0\u00A0\u0623\u0644\u0641', + }, + 4: {'other': '00\u00A0\u0623\u0644\u0641'}, + 6: {'other': '0\u00A0\u0645\u0644\u064A\u0648\u0646'}, + 9: {'other': '0\u00A0\u0645\u0644\u064A\u0627\u0631'}, + 12: {'other': '0\u00A0\u062A\u0631\u0644\u064A\u0648\u0646'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 \u0622\u0644\u0627\u0641', + 'many': '0 \u0623\u0644\u0641', + 'one': '0 \u0623\u0644\u0641', + 'other': '0 \u0623\u0644\u0641', + 'two': '0 \u0623\u0644\u0641', + 'zero': '0 \u0623\u0644\u0641', + }, + 4: {'other': '00 \u0623\u0644\u0641'}, + 6: { + 'few': '0 \u0645\u0644\u0627\u064A\u064A\u0646', + 'many': '0 \u0645\u0644\u064A\u0648\u0646', + 'one': '0 \u0645\u0644\u064A\u0648\u0646', + 'other': '0 \u0645\u0644\u064A\u0648\u0646', + 'two': '0 \u0645\u0644\u064A\u0648\u0646', + 'zero': '0 \u0645\u0644\u064A\u0648\u0646', + }, + 8: {'other': '000 \u0645\u0644\u064A\u0648\u0646'}, + 9: {'other': '0 \u0645\u0644\u064A\u0627\u0631'}, + 12: {'other': '0 \u062A\u0631\u0644\u064A\u0648\u0646'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u0623\u0644\u0641\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u0645\u0644\u064A\u0648\u0646\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u0645\u0644\u064A\u0627\u0631\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u062A\u0631\u0644\u064A\u0648\u0646\u00A0\u00A4'}, + }), + // Compact number symbols for locale as. + "as": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u09B9\u09BE\u099C\u09BE\u09F0'}, + 5: {'other': '0\u00A0\u09B2\u09BE\u0996'}, + 6: {'other': '0\u00A0\u09A8\u09BF\u09AF\u09C1\u09A4'}, + 8: {'other': '000\u00A0\u09A8\u09BF\u0983'}, + 9: {'other': '0\u00A0\u09B6\u0983\u00A0\u0995\u09CB\u0983'}, + 11: {'other': '000\u00A0\u09B6\u0983\u00A0\u0995\u0983'}, + 12: {'other': '0\u00A0\u09B6\u0983\u00A0\u09AA\u0983'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u09B9\u09BE\u099C\u09BE\u09F0'}, + 5: {'other': '0 \u09B2\u09BE\u0996'}, + 6: {'other': '0 \u09A8\u09BF\u09AF\u09C1\u09A4'}, + 9: {'other': '0 \u09B6\u09A4 \u0995\u09CB\u099F\u09BF'}, + 12: { + 'other': '0 \u09B6\u09A4 \u09AA\u09F0\u09BE\u09F0\u09CD\u09A6\u09CD\u09A7' + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00\u00A0\u09B9\u09BE\u099C\u09BE\u09F0'}, + 5: {'other': '\u00A4\u00A0000\u00A0\u09B2\u09BE\u0996'}, + 6: {'other': '\u00A4\u00A00\u00A0\u09A8\u09BF\u09AF\u09C1\u09A4'}, + 9: { + 'other': '\u00A4\u00A00\u00A0\u09B6\u09A4\u00A0\u0995\u09CB\u099F\u09BF' + }, + 12: { + 'other': + '\u00A4\u00A00\u00A0\u09B6\u09A4\u00A0\u09AA\u09F0\u09BE\u09F0\u09CD\u09A6\u09CD\u09A7' + }, + }), + // Compact number symbols for locale az. + "az": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0\u00A0mln'}, + 9: {'other': '0\u00A0mlrd'}, + 12: {'other': '0\u00A0trln'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 min'}, + 6: {'other': '0 milyon'}, + 9: {'other': '0 milyard'}, + 12: {'other': '0 trilyon'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0K\u00A0\u00A4'}, + 6: {'other': '0M\u00A0\u00A4'}, + 9: {'other': '0G\u00A0\u00A4'}, + 12: {'other': '0T\u00A0\u00A4'}, + }), + // Compact number symbols for locale be. + "be": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0442\u044B\u0441.'}, + 6: {'other': '0\u00A0\u043C\u043B\u043D'}, + 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434'}, + 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 \u0442\u044B\u0441\u044F\u0447\u044B', + 'many': '0 \u0442\u044B\u0441\u044F\u0447', + 'one': '0 \u0442\u044B\u0441\u044F\u0447\u0430', + 'other': '0 \u0442\u044B\u0441\u044F\u0447\u044B', + }, + 6: { + 'few': '0 \u043C\u0456\u043B\u044C\u0451\u043D\u044B', + 'many': '0 \u043C\u0456\u043B\u044C\u0451\u043D\u0430\u045E', + 'one': '0 \u043C\u0456\u043B\u044C\u0451\u043D', + 'other': '0 \u043C\u0456\u043B\u044C\u0451\u043D\u0430', + }, + 9: { + 'few': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434\u044B', + 'many': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434\u0430\u045E', + 'one': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434', + 'other': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434\u0430', + }, + 12: { + 'few': '0 \u0442\u0440\u044B\u043B\u044C\u0451\u043D\u044B', + 'many': '0 \u0442\u0440\u044B\u043B\u044C\u0451\u043D\u0430\u045E', + 'one': '0 \u0442\u0440\u044B\u043B\u044C\u0451\u043D', + 'other': '0 \u0442\u0440\u044B\u043B\u044C\u0451\u043D\u0430', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u0442\u044B\u0441.\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u043C\u043B\u043D\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D\u00A0\u00A4'}, + }), + // Compact number symbols for locale bg. + "bg": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0445\u0438\u043B.'}, + 6: {'other': '0\u00A0\u043C\u043B\u043D.'}, + 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434.'}, + 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'one': '0 \u0445\u0438\u043B.', + 'other': '0 \u0445\u0438\u043B\u044F\u0434\u0438', + }, + 4: {'other': '00 \u0445\u0438\u043B\u044F\u0434\u0438'}, + 6: { + 'one': '0 \u043C\u0438\u043B\u0438\u043E\u043D', + 'other': '0 \u043C\u0438\u043B\u0438\u043E\u043D\u0430', + }, + 7: {'other': '00 \u043C\u0438\u043B\u0438\u043E\u043D\u0430'}, + 9: { + 'one': '0 \u043C\u0438\u043B\u0438\u0430\u0440\u0434', + 'other': '0 \u043C\u0438\u043B\u0438\u0430\u0440\u0434\u0430', + }, + 10: {'other': '00 \u043C\u0438\u043B\u0438\u0430\u0440\u0434\u0430'}, + 12: { + 'one': '0 \u0442\u0440\u0438\u043B\u0438\u043E\u043D', + 'other': '0 \u0442\u0440\u0438\u043B\u0438\u043E\u043D\u0430', + }, + 13: {'other': '00 \u0442\u0440\u0438\u043B\u0438\u043E\u043D\u0430'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u0445\u0438\u043B.\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u043C\u043B\u043D.\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434.\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D.\u00A0\u00A4'}, + }), + // Compact number symbols for locale bm. + "bm": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0G'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40G'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale bn. + "bn": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u09B9\u09BE'}, + 5: {'other': '0\u00A0\u09B2\u09BE'}, + 7: {'other': '0\u00A0\u0995\u09CB'}, + 10: { + 'one': '00\u00A0\u09B6\u09A4\u00A0\u0995\u09CB', + 'other': '00\u09B6\u09A4\u00A0\u0995\u09CB', + }, + 11: {'other': '000\u0995\u09CB'}, + 12: {'other': '0\u00A0\u09B2\u09BE.\u0995\u09CB.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u09B9\u09BE\u099C\u09BE\u09B0'}, + 5: {'other': '0 \u09B2\u09BE\u0996'}, + 7: {'other': '0 \u0995\u09CB\u099F\u09BF'}, + 12: {'other': '0 \u09B2\u09BE\u0996 \u0995\u09CB\u099F\u09BF'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u09B9\u09BE\u00A4'}, + 5: {'other': '0\u00A0\u09B2\u09BE\u00A4'}, + 7: {'other': '0\u00A0\u0995\u09CB\u00A4'}, + 12: {'other': '0\u00A0\u09B2\u09BE.\u0995\u09CB.\u00A4'}, + }), + // Compact number symbols for locale br. + "br": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0k'}, + 6: {'other': '0M'}, + 9: {'other': '0G'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 miliad', + 'many': '0 a viliado\u00F9', + 'one': '0 miliad', + 'other': '0 miliad', + 'two': '0 viliad', + }, + 6: { + 'few': '0 milion', + 'many': '0 a v/miliono\u00F9', + 'one': '0 milion', + 'other': '0 milion', + 'two': '0 v/milion', + }, + 9: { + 'few': '0 miliard', + 'many': '0 a viliardo\u00F9', + 'one': '0 miliard', + 'other': '0 miliard', + 'two': '0 viliard', + }, + 12: { + 'few': '0 bilion', + 'many': '0 a v/biliono\u00F9', + 'one': '0 bilion', + 'other': '0 bilion', + 'two': '0 v/bilion', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0k\u00A4'}, + 6: {'other': '0\u00A0M\u00A4'}, + 9: {'other': '0\u00A0G\u00A4'}, + 12: {'other': '0\u00A0T\u00A4'}, + }), + // Compact number symbols for locale bs. + "bs": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0hilj.'}, + 6: {'other': '0\u00A0mil.'}, + 9: {'other': '0\u00A0mlr.'}, + 12: {'other': '0\u00A0bil.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 hiljade', + 'one': '0 hiljada', + 'other': '0 hiljada', + }, + 6: { + 'few': '0 miliona', + 'one': '0 milion', + 'other': '0 miliona', + }, + 9: { + 'few': '0 milijarde', + 'one': '0 milijarda', + 'other': '0 milijardi', + }, + 12: { + 'few': '0 biliona', + 'one': '0 bilion', + 'other': '0 biliona', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0hilj.\u00A0\u00A4'}, + 6: {'other': '0\u00A0mil.\u00A0\u00A4'}, + 9: {'other': '0\u00A0mlr.\u00A0\u00A4'}, + 12: {'other': '0\u00A0bil.\u00A0\u00A4'}, + }), + // Compact number symbols for locale ca. + "ca": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0m'}, + 6: {'other': '0\u00A0M'}, + 10: {'other': '00mM'}, + 12: {'other': '0\u00A0B'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'one': '0 miler', + 'other': '0 milers', + }, + 4: {'other': '00 milers'}, + 6: { + 'one': '0 mili\u00F3', + 'other': '0 milions', + }, + 7: {'other': '00 milions'}, + 9: { + 'one': '0 miler de milions', + 'other': '0 milers de milions', + }, + 10: {'other': '00 milers de milions'}, + 12: { + 'one': '0 bili\u00F3', + 'other': '0 bilions', + }, + 13: {'other': '00 bilions'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0m\u00A0\u00A4'}, + 6: {'other': '0\u00A0M\u00A0\u00A4'}, + 10: {'other': '00mM\u00A0\u00A4'}, + 12: {'other': '0\u00A0B\u00A0\u00A4'}, + }), + // Compact number symbols for locale chr. + "chr": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u13A2\u13EF\u13A6\u13F4\u13B5'}, + 6: {'other': '0 \u13A2\u13F3\u13C6\u13D7\u13C5\u13DB'}, + 9: {'other': '0 \u13A2\u13EF\u13D4\u13B3\u13D7\u13C5\u13DB'}, + 12: {'other': '0 \u13A2\u13EF\u13E6\u13A0\u13D7\u13C5\u13DB'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale cs. + "cs": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0tis.'}, + 6: {'other': '0\u00A0mil.'}, + 9: {'other': '0\u00A0mld.'}, + 12: {'other': '0\u00A0bil.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 tis\u00EDce', + 'many': '0 tis\u00EDce', + 'one': '0 tis\u00EDc', + 'other': '0 tis\u00EDc', + }, + 4: { + 'few': '00 tis\u00EDc', + 'many': '00 tis\u00EDce', + 'one': '00 tis\u00EDc', + 'other': '00 tis\u00EDc', + }, + 6: { + 'few': '0 miliony', + 'many': '0 milionu', + 'one': '0 milion', + 'other': '0 milion\u016F', + }, + 7: { + 'few': '00 milion\u016F', + 'many': '00 milionu', + 'one': '00 milion\u016F', + 'other': '00 milion\u016F', + }, + 9: { + 'few': '0 miliardy', + 'many': '0 miliardy', + 'one': '0 miliarda', + 'other': '0 miliard', + }, + 10: { + 'few': '00 miliard', + 'many': '00 miliardy', + 'one': '00 miliard', + 'other': '00 miliard', + }, + 12: { + 'few': '0 biliony', + 'many': '0 bilionu', + 'one': '0 bilion', + 'other': '0 bilion\u016F', + }, + 13: { + 'few': '00 bilion\u016F', + 'many': '00 bilionu', + 'one': '00 bilion\u016F', + 'other': '00 bilion\u016F', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0tis.\u00A0\u00A4'}, + 6: {'other': '0\u00A0mil.\u00A0\u00A4'}, + 9: {'other': '0\u00A0mld.\u00A0\u00A4'}, + 12: {'other': '0\u00A0bil.\u00A0\u00A4'}, + }), + // Compact number symbols for locale cy. + "cy": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0K', + 'many': '0K', + 'one': '0 mil', + 'other': '0 mil', + 'two': '0K', + 'zero': '0 mil', + }, + 4: { + 'few': '00K', + 'many': '00K', + 'one': '00 mil', + 'other': '00 mil', + 'two': '00K', + 'zero': '00K', + }, + 6: { + 'few': '0M', + 'many': '0M', + 'one': '0 miliwn', + 'other': '0 miliwn', + 'two': '0M', + 'zero': '0M', + }, + 9: { + 'few': '0B', + 'many': '0B', + 'one': '0 biliwn', + 'other': '0 biliwn', + 'two': '0B', + 'zero': '0B', + }, + 12: { + 'few': '0T', + 'many': '0T', + 'one': '0 triliwn', + 'other': '0 triliwn', + 'two': '0T', + 'zero': '0T', + }, + 14: { + 'few': '000T', + 'many': '000T', + 'one': '000T', + 'other': '000 triliwn', + 'two': '000T', + 'zero': '000T', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale da. + "da": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0t'}, + 6: {'other': '0\u00A0mio.'}, + 9: {'other': '0\u00A0mia.'}, + 12: {'other': '0\u00A0bio.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 tusind'}, + 6: { + 'one': '0 million', + 'other': '0 millioner', + }, + 7: {'other': '00 millioner'}, + 9: { + 'one': '0 milliard', + 'other': '0 milliarder', + }, + 10: {'other': '00 milliarder'}, + 12: { + 'one': '0 billion', + 'other': '0 billioner', + }, + 13: {'other': '00 billioner'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0t\u00A0\u00A4'}, + 6: {'other': '0\u00A0mio.\u00A0\u00A4'}, + 9: {'other': '0\u00A0mia.\u00A0\u00A4'}, + 12: {'other': '0\u00A0bio.\u00A0\u00A4'}, + }), + // Compact number symbols for locale de. + "de": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0Mio.'}, + 9: {'other': '0\u00A0Mrd.'}, + 12: {'other': '0\u00A0Bio.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 Tausend'}, + 6: { + 'one': '0 Million', + 'other': '0 Millionen', + }, + 7: {'other': '00 Millionen'}, + 9: { + 'one': '0 Milliarde', + 'other': '0 Milliarden', + }, + 10: {'other': '00 Milliarden'}, + 12: { + 'one': '0 Billion', + 'other': '0 Billionen', + }, + 13: {'other': '00 Billionen'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0Mio.\u00A0\u00A4'}, + 9: {'other': '0\u00A0Mrd.\u00A0\u00A4'}, + 12: {'other': '0\u00A0Bio.\u00A0\u00A4'}, + }), + // Compact number symbols for locale de_AT. + "de_AT": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0Mio.'}, + 9: {'other': '0\u00A0Mrd.'}, + 12: {'other': '0\u00A0Bio.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 Tausend'}, + 6: { + 'one': '0 Million', + 'other': '0 Millionen', + }, + 7: {'other': '00 Millionen'}, + 9: { + 'one': '0 Milliarde', + 'other': '0 Milliarden', + }, + 10: {'other': '00 Milliarden'}, + 12: { + 'one': '0 Billion', + 'other': '0 Billionen', + }, + 13: {'other': '00 Billionen'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0Mio.\u00A0\u00A4'}, + 9: {'other': '0\u00A0Mrd.\u00A0\u00A4'}, + 12: {'other': '0\u00A0Bio.\u00A0\u00A4'}, + }), + // Compact number symbols for locale de_CH. + "de_CH": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0Mio.'}, + 9: {'other': '0\u00A0Mrd.'}, + 12: {'other': '0\u00A0Bio.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 Tausend'}, + 6: { + 'one': '0 Million', + 'other': '0 Millionen', + }, + 7: {'other': '00 Millionen'}, + 9: { + 'one': '0 Milliarde', + 'other': '0 Milliarden', + }, + 10: {'other': '00 Milliarden'}, + 12: { + 'one': '0 Billion', + 'other': '0 Billionen', + }, + 13: {'other': '00 Billionen'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0Mio.\u00A0\u00A4'}, + 9: {'other': '0\u00A0Mrd.\u00A0\u00A4'}, + 12: {'other': '0\u00A0Bio.\u00A0\u00A4'}, + }), + // Compact number symbols for locale el. + "el": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u03C7\u03B9\u03BB.'}, + 6: {'other': '0\u00A0\u03B5\u03BA.'}, + 9: {'other': '0\u00A0\u03B4\u03B9\u03C3.'}, + 12: {'other': '0\u00A0\u03C4\u03C1\u03B9\u03C3.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'one': '0 \u03C7\u03B9\u03BB\u03B9\u03AC\u03B4\u03B1', + 'other': '0 \u03C7\u03B9\u03BB\u03B9\u03AC\u03B4\u03B5\u03C2', + }, + 4: {'other': '00 \u03C7\u03B9\u03BB\u03B9\u03AC\u03B4\u03B5\u03C2'}, + 6: { + 'one': + '0 \u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03BF', + 'other': + '0 \u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1', + }, + 7: { + 'other': + '00 \u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1' + }, + 9: { + 'one': + '0 \u03B4\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03BF', + 'other': + '0 \u03B4\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1', + }, + 10: { + 'other': + '00 \u03B4\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1' + }, + 12: { + 'one': + '0 \u03C4\u03C1\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03BF', + 'other': + '0 \u03C4\u03C1\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1', + }, + 13: { + 'other': + '00 \u03C4\u03C1\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1' + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u03C7\u03B9\u03BB.\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u03B5\u03BA.\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u03B4\u03B9\u03C3.\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u03C4\u03C1\u03B9\u03C3.\u00A0\u00A4'}, + }), + // Compact number symbols for locale en. + "en": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 thousand'}, + 6: {'other': '0 million'}, + 9: {'other': '0 billion'}, + 12: {'other': '0 trillion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale en_AU. + "en_AU": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 thousand'}, + 6: {'other': '0 million'}, + 9: {'other': '0 billion'}, + 12: {'other': '0 trillion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale en_CA. + "en_CA": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 thousand'}, + 6: {'other': '0 million'}, + 9: {'other': '0 billion'}, + 12: {'other': '0 trillion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale en_GB. + "en_GB": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 thousand'}, + 6: {'other': '0 million'}, + 9: {'other': '0 billion'}, + 12: {'other': '0 trillion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale en_IE. + "en_IE": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 thousand'}, + 6: {'other': '0 million'}, + 9: {'other': '0 billion'}, + 12: {'other': '0 trillion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale en_IN. + "en_IN": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0T'}, + 5: {'other': '0L'}, + 7: {'other': '0Cr'}, + 10: {'other': '0TCr'}, + 12: {'other': '0LCr'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 thousand'}, + 6: {'other': '0 million'}, + 9: {'other': '0 billion'}, + 12: {'other': '0 trillion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40T'}, + 5: {'other': '\u00A40L'}, + 7: {'other': '\u00A40Cr'}, + 10: {'other': '\u00A40TCr'}, + 12: {'other': '\u00A40LCr'}, + }), + // Compact number symbols for locale en_MY. + "en_MY": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 thousand'}, + 6: {'other': '0 million'}, + 9: {'other': '0 billion'}, + 12: {'other': '0 trillion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale en_NZ. + "en_NZ": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 thousand'}, + 6: {'other': '0 million'}, + 9: {'other': '0 billion'}, + 12: {'other': '0 trillion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale en_SG. + "en_SG": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 thousand'}, + 6: {'other': '0 million'}, + 9: {'other': '0 billion'}, + 12: {'other': '0 trillion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale en_US. + "en_US": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 thousand'}, + 6: {'other': '0 million'}, + 9: {'other': '0 billion'}, + 12: {'other': '0 trillion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale en_ZA. + "en_ZA": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 thousand'}, + 6: {'other': '0 million'}, + 9: {'other': '0 billion'}, + 12: {'other': '0 trillion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale es. + "es": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0mil'}, + 6: {'other': '0\u00A0M'}, + 10: {'other': '00\u00A0mil\u00A0M'}, + 12: {'other': '0\u00A0B'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 mil'}, + 6: { + 'one': '0 mill\u00F3n', + 'other': '0 millones', + }, + 7: {'other': '00 millones'}, + 9: {'other': '0 mil millones'}, + 12: { + 'one': '0 bill\u00F3n', + 'other': '0 billones', + }, + 13: {'other': '00 billones'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0mil\u00A0\u00A4'}, + 6: {'other': '0\u00A0M\u00A4'}, + 10: {'other': '00\u00A0mil\u00A0M\u00A4'}, + 12: {'other': '0\u00A0B\u00A4'}, + }), + // Compact number symbols for locale es_419. + "es_419": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0K'}, + 4: {'other': '00\u00A0k'}, + 6: {'other': '0\u00A0M'}, + 10: {'other': '00\u00A0mil\u00A0M'}, + 12: {'other': '0\u00A0B'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 mil'}, + 6: { + 'one': '0 mill\u00F3n', + 'other': '0 millones', + }, + 7: {'other': '00 millones'}, + 9: {'other': '0 mil millones'}, + 12: {'other': '0 bill\u00F3n'}, + 13: {'other': '00 billones'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u00A0K'}, + 6: {'other': '\u00A40\u00A0M'}, + 10: {'other': '\u00A400\u00A0MRD'}, + 12: {'other': '\u00A40\u00A0B'}, + }), + // Compact number symbols for locale es_ES. + "es_ES": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0mil'}, + 6: {'other': '0\u00A0M'}, + 10: {'other': '00\u00A0mil\u00A0M'}, + 12: {'other': '0\u00A0B'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 mil'}, + 6: { + 'one': '0 mill\u00F3n', + 'other': '0 millones', + }, + 7: {'other': '00 millones'}, + 9: {'other': '0 mil millones'}, + 12: { + 'one': '0 bill\u00F3n', + 'other': '0 billones', + }, + 13: {'other': '00 billones'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0mil\u00A0\u00A4'}, + 6: {'other': '0\u00A0M\u00A4'}, + 10: {'other': '00\u00A0mil\u00A0M\u00A4'}, + 12: {'other': '0\u00A0B\u00A4'}, + }), + // Compact number symbols for locale es_MX. + "es_MX": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0k'}, + 6: {'other': '0\u00A0M'}, + 10: {'other': '00\u00A0mil\u00A0M'}, + 12: {'other': '0\u00A0B'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 mil'}, + 6: { + 'one': '0 mill\u00F3n', + 'other': '0 millones', + }, + 7: {'other': '00 millones'}, + 9: {'other': '0 mil millones'}, + 12: { + 'one': '0 bill\u00F3n', + 'other': '0 billones', + }, + 13: {'other': '00 billones'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0k\u00A4'}, + 6: {'other': '0\u00A0M\u00A4'}, + 10: {'other': '00\u00A0MRD\u00A0\u00A4'}, + 12: {'other': '0\u00A0B\u00A4'}, + }), + // Compact number symbols for locale es_US. + "es_US": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0K'}, + 6: {'other': '0\u00A0M'}, + 10: {'other': '00\u00A0mil\u00A0M'}, + 12: {'other': '0\u00A0B'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 mil'}, + 6: { + 'one': '0 mill\u00F3n', + 'other': '0 millones', + }, + 7: {'other': '00 millones'}, + 9: {'other': '0 mil millones'}, + 12: {'other': '0 bill\u00F3n'}, + 13: {'other': '00 billones'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u00A0K'}, + 6: {'other': '\u00A40\u00A0M'}, + 10: {'other': '\u00A400\u00A0B'}, + 12: {'other': '\u00A40\u00A0T'}, + }), + // Compact number symbols for locale et. + "et": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0tuh'}, + 6: {'other': '0\u00A0mln'}, + 9: {'other': '0\u00A0mld'}, + 12: {'other': '0\u00A0trln'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 tuhat'}, + 6: { + 'one': '0 miljon', + 'other': '0 miljonit', + }, + 7: {'other': '00 miljonit'}, + 9: { + 'one': '0 miljard', + 'other': '0 miljardit', + }, + 10: {'other': '00 miljardit'}, + 12: { + 'one': '0 triljon', + 'other': '0 triljonit', + }, + 13: {'other': '00 triljonit'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0tuh\u00A0\u00A4'}, + 6: {'other': '0\u00A0mln\u00A0\u00A4'}, + 9: {'other': '0\u00A0mld\u00A0\u00A4'}, + 12: {'other': '0\u00A0trln\u00A0\u00A4'}, + }), + // Compact number symbols for locale eu. + "eu": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0M'}, + 12: {'other': '0\u00A0B'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0 milioi'}, + 12: {'other': '0 bilioi'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0M\u00A0\u00A4'}, + 12: {'other': '0\u00A0B\u00A0\u00A4'}, + }), + // Compact number symbols for locale fa. + "fa": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0647\u0632\u0627\u0631'}, + 6: {'other': '0\u00A0\u0645\u06CC\u0644\u06CC\u0648\u0646'}, + 9: {'other': '0\u00A0\u0645\u06CC\u0644\u06CC\u0627\u0631\u062F'}, + 12: {'other': '0\u00A0\u062A\u0631\u06CC\u0644\u06CC\u0648\u0646'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u0647\u0632\u0627\u0631'}, + 6: {'other': '0 \u0645\u06CC\u0644\u06CC\u0648\u0646'}, + 9: {'other': '0 \u0645\u06CC\u0644\u06CC\u0627\u0631\u062F'}, + 12: { + 'other': + '0 \u0647\u0632\u0627\u0631\u0645\u06CC\u0644\u06CC\u0627\u0631\u062F' + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u0647\u0632\u0627\u0631\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u0645\u06CC\u0644\u06CC\u0648\u0646\u00A0\u00A4'}, + 9: { + 'other': '0\u00A0\u0645\u06CC\u0644\u06CC\u0627\u0631\u062F\u00A0\u00A4' + }, + 12: { + 'other': + '0\u00A0\u0647\u0632\u0627\u0631\u0645\u06CC\u0644\u06CC\u0627\u0631\u062F\u00A0\u00A4' + }, + }), + // Compact number symbols for locale fi. + "fi": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0t.'}, + 6: {'other': '0\u00A0milj.'}, + 9: {'other': '0\u00A0mrd.'}, + 12: {'other': '0\u00A0bilj.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'one': '0 tuhat', + 'other': '0 tuhatta', + }, + 4: {'other': '00 tuhatta'}, + 6: { + 'one': '0 miljoona', + 'other': '0 miljoonaa', + }, + 7: {'other': '00 miljoonaa'}, + 9: { + 'one': '0 miljardi', + 'other': '0 miljardia', + }, + 10: {'other': '00 miljardia'}, + 12: { + 'one': '0 biljoona', + 'other': '0 biljoonaa', + }, + 13: {'other': '00 biljoonaa'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0t.\u00A0\u00A4'}, + 6: {'other': '0\u00A0milj.\u00A0\u00A4'}, + 9: {'other': '0\u00A0mrd.\u00A0\u00A4'}, + 12: {'other': '0\u00A0bilj.\u00A0\u00A4'}, + }), + // Compact number symbols for locale fil. + "fil": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'one': '0 libo', + 'other': '0 na libo', + }, + 6: { + 'one': '0 milyon', + 'other': '0 na milyon', + }, + 9: { + 'one': '0 bilyon', + 'other': '0 na bilyon', + }, + 12: { + 'one': '0 trilyon', + 'other': '0 na trilyon', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale fr. + "fr": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0k'}, + 6: {'other': '0\u00A0M'}, + 9: {'other': '0\u00A0Md'}, + 12: {'other': '0\u00A0Bn'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + '1': 'mille', + 'one': '0 millier', + 'other': '0 mille', + }, + 4: {'other': '00 mille'}, + 6: { + 'one': '0 million', + 'other': '0 millions', + }, + 9: { + 'one': '0 milliard', + 'other': '0 milliards', + }, + 12: { + 'one': '0 billion', + 'other': '0 billions', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0k\u00A0\u00A4'}, + 6: {'other': '0\u00A0M\u00A0\u00A4'}, + 9: {'other': '0\u00A0Md\u00A0\u00A4'}, + 12: {'other': '0\u00A0Bn\u00A0\u00A4'}, + }), + // Compact number symbols for locale fr_CA. + "fr_CA": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0k'}, + 6: {'other': '0\u00A0M'}, + 9: {'other': '0\u00A0G'}, + 12: {'other': '0\u00A0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 mille'}, + 4: {'other': '00 mille'}, + 6: { + 'one': '0 million', + 'other': '0 millions', + }, + 9: { + 'one': '0 milliard', + 'other': '0 milliards', + }, + 12: { + 'one': '0 billion', + 'other': '0 billions', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0k\u00A4'}, + 6: {'other': '0\u00A0M\u00A4'}, + 9: {'other': '0\u00A0G\u00A4'}, + 12: {'other': '0\u00A0T\u00A4'}, + }), + // Compact number symbols for locale fr_CH. + "fr_CH": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0k'}, + 6: {'other': '0\u00A0M'}, + 9: {'other': '0\u00A0Md'}, + 12: {'other': '0\u00A0Bn'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + '1': 'mille', + 'one': '0 millier', + 'other': '0 mille', + }, + 4: {'other': '00 mille'}, + 6: { + 'one': '0 million', + 'other': '0 millions', + }, + 9: { + 'one': '0 milliard', + 'other': '0 milliards', + }, + 12: { + 'one': '0 billion', + 'other': '0 billions', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0k\u00A0\u00A4'}, + 6: {'other': '0\u00A0M\u00A0\u00A4'}, + 9: {'other': '0\u00A0Md\u00A0\u00A4'}, + 12: {'other': '0\u00A0Bn\u00A0\u00A4'}, + }), + // Compact number symbols for locale fur. + "fur": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0G'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00K'}, + 6: {'other': '\u00A4\u00A00M'}, + 9: {'other': '\u00A4\u00A00G'}, + 12: {'other': '\u00A4\u00A00T'}, + }), + // Compact number symbols for locale ga. + "ga": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0k'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 mh\u00EDle', + 'many': '0 m\u00EDle', + 'one': '0 mh\u00EDle', + 'other': '0 m\u00EDle', + 'two': '0 mh\u00EDle', + }, + 4: {'other': '00 m\u00EDle'}, + 6: { + 'few': '0 mhilli\u00FAn', + 'many': '0 milli\u00FAn', + 'one': '0 mhilli\u00FAn', + 'other': '0 milli\u00FAn', + 'two': '0 mhilli\u00FAn', + }, + 7: {'other': '00 milli\u00FAn'}, + 9: { + 'few': '0 bhilli\u00FAn', + 'many': '0 mbilli\u00FAn', + 'one': '0 bhilli\u00FAn', + 'other': '0 billi\u00FAn', + 'two': '0 bhilli\u00FAn', + }, + 10: { + 'few': '00 billi\u00FAn', + 'many': '00 mbilli\u00FAn', + 'one': '00 billi\u00FAn', + 'other': '00 billi\u00FAn', + 'two': '00 billi\u00FAn', + }, + 11: {'other': '000 billi\u00FAn'}, + 12: { + 'few': '0 thrilli\u00FAn', + 'many': '0 dtrilli\u00FAn', + 'one': '0 trilli\u00FAn', + 'other': '0 trilli\u00FAn', + 'two': '0 thrilli\u00FAn', + }, + 13: { + 'few': '00 trilli\u00FAn', + 'many': '00 dtrilli\u00FAn', + 'one': '00 trilli\u00FAn', + 'other': '00 trilli\u00FAn', + 'two': '00 trilli\u00FAn', + }, + 14: {'other': '000 trilli\u00FAn'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40k'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale gl. + "gl": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0M'}, + 12: {'other': '0\u00A0B'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: { + 'one': '0 mill\u00F3n', + 'other': '0 mill\u00F3ns', + }, + 7: {'other': '00 mill\u00F3ns'}, + 12: { + 'one': '0 bill\u00F3n', + 'other': '0 bill\u00F3ns', + }, + 13: {'other': '00 bill\u00F3ns'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0M\u00A4'}, + 11: {'other': '00000\u00A0M\u00A4'}, + 12: {'other': '0\u00A0B\u00A4'}, + }), + // Compact number symbols for locale gsw. + "gsw": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0Tsg.'}, + 6: {'other': '0\u00A0Mio.'}, + 9: {'other': '0\u00A0Mrd.'}, + 12: {'other': '0\u00A0Bio.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 Tuusig'}, + 6: { + 'one': '0 Millioon', + 'other': '0 Millioone', + }, + 9: {'other': '0 Milliarde'}, + 12: { + 'one': '0 Billioon', + 'other': '0 Billioone', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0Tsg.\u00A0\u00A4'}, + 6: {'other': '0\u00A0Mio.\u00A0\u00A4'}, + 9: {'other': '0\u00A0Mrd.\u00A0\u00A4'}, + 12: {'other': '0\u00A0Bio.\u00A0\u00A4'}, + }), + // Compact number symbols for locale gu. + "gu": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0AB9\u0A9C\u0ABE\u0AB0'}, + 5: {'other': '0\u00A0\u0AB2\u0ABE\u0A96'}, + 7: {'other': '0\u00A0\u0A95\u0AB0\u0ACB\u0AA1'}, + 9: {'other': '0\u00A0\u0A85\u0AAC\u0A9C'}, + 11: {'other': '0\u00A0\u0AA8\u0ABF\u0A96\u0AB0\u0ACD\u0AB5'}, + 12: {'other': '0\u00A0\u0AAE\u0AB9\u0ABE\u0AAA\u0AA6\u0ACD\u0AAE'}, + 13: {'other': '0\u00A0\u0AB6\u0A82\u0A95\u0AC1'}, + 14: {'other': '0\u00A0\u0A9C\u0AB2\u0AA7\u0ABF'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u0AB9\u0A9C\u0ABE\u0AB0'}, + 5: {'other': '0 \u0AB2\u0ABE\u0A96'}, + 7: {'other': '0 \u0A95\u0AB0\u0ACB\u0AA1'}, + 9: {'other': '0 \u0A85\u0AAC\u0A9C'}, + 11: {'other': '0 \u0AA8\u0ABF\u0A96\u0AB0\u0ACD\u0AB5'}, + 12: {'other': '0 \u0AAE\u0AB9\u0ABE\u0AAA\u0AA6\u0ACD\u0AAE'}, + 13: {'other': '0 \u0AB6\u0A82\u0A95\u0AC1'}, + 14: {'other': '0 \u0A9C\u0AB2\u0AA7\u0ABF'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u00A0\u0AB9\u0A9C\u0ABE\u0AB0'}, + 5: {'other': '\u00A40\u00A0\u0AB2\u0ABE\u0A96'}, + 7: {'other': '\u00A40\u00A0\u0A95\u0AB0\u0ACB\u0AA1'}, + 9: {'other': '\u00A40\u00A0\u0A85\u0AAC\u0A9C'}, + 11: {'other': '\u00A40\u00A0\u0AA8\u0ABF\u0A96\u0AB0\u0ACD\u0AB5'}, + 12: {'other': '\u00A40\u00A0\u0AAE\u0AB9\u0ABE\u0AAA\u0AA6\u0ACD\u0AAE'}, + 13: {'other': '\u00A40\u00A0\u0AB6\u0A82\u0A95\u0AC1'}, + 14: {'other': '\u00A40\u00A0\u0A9C\u0AB2\u0AA7\u0ABF'}, + }), + // Compact number symbols for locale haw. + "haw": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0G'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40G'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale he. + "he": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K\u200F'}, + 6: {'other': '0M\u200F'}, + 9: {'other': '0B\u200F'}, + 12: {'other': '0T\u200F'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '\u200F0 \u05D0\u05DC\u05E3'}, + 6: {'other': '\u200F0 \u05DE\u05D9\u05DC\u05D9\u05D5\u05DF'}, + 9: {'other': '\u200F0 \u05DE\u05D9\u05DC\u05D9\u05D0\u05E8\u05D3'}, + 12: {'other': '\u200F0 \u05D8\u05E8\u05D9\u05DC\u05D9\u05D5\u05DF'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K\u200F'}, + 6: {'other': '\u00A40M\u200F'}, + 9: {'other': '\u00A40B\u200F'}, + 12: {'other': '\u00A40T\u200F'}, + }), + // Compact number symbols for locale hi. + "hi": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0939\u091C\u093C\u093E\u0930'}, + 5: {'other': '0\u00A0\u0932\u093E\u0916'}, + 7: {'other': '0\u00A0\u0915\u0970'}, + 9: {'other': '0\u00A0\u0905\u0970'}, + 11: {'other': '0\u00A0\u0916\u0970'}, + 13: {'other': '0\u00A0\u0928\u0940\u0932'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u0939\u091C\u093C\u093E\u0930'}, + 5: {'other': '0 \u0932\u093E\u0916'}, + 7: {'other': '0 \u0915\u0930\u094B\u0921\u093C'}, + 9: {'other': '0 \u0905\u0930\u092C'}, + 11: {'other': '0 \u0916\u0930\u092C'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u00A0\u0939\u091C\u093C\u093E\u0930'}, + 5: {'other': '\u00A40\u00A0\u0932\u093E\u0916'}, + 7: {'other': '\u00A40\u00A0\u0915\u0970'}, + 9: {'other': '\u00A40\u00A0\u0905\u0970'}, + 11: {'other': '\u00A40\u00A0\u0916\u0970'}, + 13: {'other': '\u00A40\u00A0\u0928\u0940\u0932'}, + }), + // Compact number symbols for locale hr. + "hr": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0tis.'}, + 6: {'other': '0\u00A0mil.'}, + 9: {'other': '0\u00A0mlr.'}, + 12: {'other': '0\u00A0bil.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 tisu\u0107e', + 'one': '0 tisu\u0107a', + 'other': '0 tisu\u0107a', + }, + 6: { + 'few': '0 milijuna', + 'one': '0 milijun', + 'other': '0 milijuna', + }, + 9: { + 'few': '0 milijarde', + 'one': '0 milijarda', + 'other': '0 milijardi', + }, + 12: { + 'few': '0 bilijuna', + 'one': '0 bilijun', + 'other': '0 bilijuna', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0tis.\u00A0\u00A4'}, + 6: {'other': '0\u00A0mil.\u00A0\u00A4'}, + 9: {'other': '0\u00A0mlr.\u00A0\u00A4'}, + 12: {'other': '0\u00A0bil.\u00A0\u00A4'}, + }), + // Compact number symbols for locale hu. + "hu": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0E'}, + 6: {'other': '0\u00A0M'}, + 9: {'other': '0\u00A0Mrd'}, + 12: {'other': '0\u00A0B'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 ezer'}, + 6: {'other': '0 milli\u00F3'}, + 9: {'other': '0 milli\u00E1rd'}, + 12: {'other': '0 billi\u00F3'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0E\u00A0\u00A4'}, + 6: {'other': '0\u00A0M\u00A0\u00A4'}, + 9: {'other': '0\u00A0Mrd\u00A0\u00A4'}, + 12: {'other': '0\u00A0B\u00A0\u00A4'}, + }), + // Compact number symbols for locale hy. + "hy": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0570\u0566\u0580'}, + 6: {'other': '0\u00A0\u0574\u056C\u0576'}, + 9: {'other': '0\u00A0\u0574\u056C\u0580\u0564'}, + 12: {'other': '0\u00A0\u057F\u0580\u056C\u0576'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u0570\u0561\u0566\u0561\u0580'}, + 6: {'other': '0 \u0574\u056B\u056C\u056B\u0578\u0576'}, + 9: {'other': '0 \u0574\u056B\u056C\u056B\u0561\u0580\u0564'}, + 12: {'other': '0 \u057F\u0580\u056B\u056C\u056B\u0578\u0576'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u0570\u0566\u0580\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u0574\u056C\u0576\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u0574\u056C\u0580\u0564\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u057F\u0580\u056C\u0576\u00A0\u00A4'}, + }), + // Compact number symbols for locale id. + "id": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0rb'}, + 6: {'other': '0\u00A0jt'}, + 9: {'other': '0\u00A0M'}, + 12: {'other': '0\u00A0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 ribu'}, + 6: {'other': '0 juta'}, + 9: {'other': '0 miliar'}, + 12: {'other': '0 triliun'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u00A0rb'}, + 6: {'other': '\u00A40\u00A0jt'}, + 9: {'other': '\u00A40\u00A0M'}, + 12: {'other': '\u00A40\u00A0T'}, + }), + // Compact number symbols for locale in. + "in": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0rb'}, + 6: {'other': '0\u00A0jt'}, + 9: {'other': '0\u00A0M'}, + 12: {'other': '0\u00A0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 ribu'}, + 6: {'other': '0 juta'}, + 9: {'other': '0 miliar'}, + 12: {'other': '0 triliun'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u00A0rb'}, + 6: {'other': '\u00A40\u00A0jt'}, + 9: {'other': '\u00A40\u00A0M'}, + 12: {'other': '\u00A40\u00A0T'}, + }), + // Compact number symbols for locale is. + "is": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u00FE.'}, + 6: {'other': '0\u00A0m.'}, + 9: {'other': '0\u00A0ma.'}, + 12: {'other': '0\u00A0bn'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u00FE\u00FAsund'}, + 6: { + 'one': '0 millj\u00F3n', + 'other': '0 millj\u00F3nir', + }, + 9: { + 'one': '0 milljar\u00F0ur', + 'other': '0 milljar\u00F0ar', + }, + 12: { + 'one': '0 billj\u00F3n', + 'other': '0 billj\u00F3nir', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u00FE.\u00A0\u00A4'}, + 6: {'other': '0\u00A0m.\u00A0\u00A4'}, + 9: {'other': '0\u00A0ma.\u00A0\u00A4'}, + 12: {'other': '0\u00A0bn\u00A0\u00A4'}, + }), + // Compact number symbols for locale it. + "it": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0Mln'}, + 9: {'other': '0\u00A0Mrd'}, + 12: {'other': '0\u00A0Bln'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'one': 'mille', + 'other': '0 mila', + }, + 4: {'other': '00 mila'}, + 6: { + 'one': '0 milione', + 'other': '0 milioni', + }, + 7: {'other': '00 milioni'}, + 9: { + 'one': '0 miliardo', + 'other': '0 miliardi', + }, + 10: {'other': '00 miliardi'}, + 12: { + 'one': '0 mille miliardi', + 'other': '0 mila miliardi', + }, + 13: {'other': '00 mila miliardi'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0Mio\u00A0\u00A4'}, + 9: {'other': '0\u00A0Mrd\u00A0\u00A4'}, + 12: {'other': '0\u00A0Bln\u00A0\u00A4'}, + }), + // Compact number symbols for locale it_CH. + "it_CH": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0Mln'}, + 9: {'other': '0\u00A0Mrd'}, + 12: {'other': '0\u00A0Bln'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'one': 'mille', + 'other': '0 mila', + }, + 4: {'other': '00 mila'}, + 6: { + 'one': '0 milione', + 'other': '0 milioni', + }, + 7: {'other': '00 milioni'}, + 9: { + 'one': '0 miliardo', + 'other': '0 miliardi', + }, + 10: {'other': '00 miliardi'}, + 12: { + 'one': '0 mille miliardi', + 'other': '0 mila miliardi', + }, + 13: {'other': '00 mila miliardi'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0'}, + 5: {'other': '0'}, + 6: {'other': '0\u00A0Mio\u00A0\u00A4'}, + 9: {'other': '0\u00A0Mrd\u00A0\u00A4'}, + 12: {'other': '0\u00A0Bln\u00A0\u00A4'}, + }), + // Compact number symbols for locale iw. + "iw": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K\u200F'}, + 6: {'other': '0M\u200F'}, + 9: {'other': '0B\u200F'}, + 12: {'other': '0T\u200F'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '\u200F0 \u05D0\u05DC\u05E3'}, + 6: {'other': '\u200F0 \u05DE\u05D9\u05DC\u05D9\u05D5\u05DF'}, + 9: {'other': '\u200F0 \u05DE\u05D9\u05DC\u05D9\u05D0\u05E8\u05D3'}, + 12: {'other': '\u200F0 \u05D8\u05E8\u05D9\u05DC\u05D9\u05D5\u05DF'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K\u200F'}, + 6: {'other': '\u00A40M\u200F'}, + 9: {'other': '\u00A40B\u200F'}, + 12: {'other': '\u00A40T\u200F'}, + }), + // Compact number symbols for locale ja. + "ja": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0\u4E07'}, + 8: {'other': '0\u5104'}, + 12: {'other': '0\u5146'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0\u4E07'}, + 8: {'other': '0\u5104'}, + 12: {'other': '0\u5146'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '\u00A40\u4E07'}, + 8: {'other': '\u00A40\u5104'}, + 12: {'other': '\u00A40\u5146'}, + }), + // Compact number symbols for locale ka. + "ka": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u10D0\u10D7.'}, + 6: {'other': '0\u00A0\u10DB\u10DA\u10DC.'}, + 9: {'other': '0\u00A0\u10DB\u10DA\u10E0\u10D3.'}, + 11: {'other': '000\u00A0\u10DB\u10DA\u10E0.'}, + 12: {'other': '0\u00A0\u10E2\u10E0\u10DA.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u10D0\u10D7\u10D0\u10E1\u10D8'}, + 6: {'other': '0 \u10DB\u10D8\u10DA\u10D8\u10DD\u10DC\u10D8'}, + 9: {'other': '0 \u10DB\u10D8\u10DA\u10D8\u10D0\u10E0\u10D3\u10D8'}, + 12: {'other': '0 \u10E2\u10E0\u10D8\u10DA\u10D8\u10DD\u10DC\u10D8'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u10D0\u10D7.\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u10DB\u10DA\u10DC.\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u10DB\u10DA\u10E0\u10D3.\u00A0\u00A4'}, + 11: {'other': '000\u00A0\u10DB\u10DA\u10E0.\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u10E2\u10E0\u10DA.\u00A0\u00A4'}, + }), + // Compact number symbols for locale kk. + "kk": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u043C\u044B\u04A3'}, + 5: {'other': '000\u00A0\u043C.'}, + 6: {'other': '0\u00A0\u043C\u043B\u043D'}, + 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434'}, + 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u043C\u044B\u04A3'}, + 6: {'other': '0 \u043C\u0438\u043B\u043B\u0438\u043E\u043D'}, + 9: {'other': '0 \u043C\u0438\u043B\u043B\u0438\u0430\u0440\u0434'}, + 12: {'other': '0 \u0442\u0440\u0438\u043B\u043B\u0438\u043E\u043D'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u043C\u044B\u04A3\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u043C\u043B\u043D\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D\u00A0\u00A4'}, + }), + // Compact number symbols for locale km. + "km": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u1796\u17B6\u1793\u17CB'}, + 4: {'other': '00\u00A0\u1796\u17B6\u1793\u17CB'}, + 6: {'other': '0\u00A0\u179B\u17B6\u1793'}, + 9: {'other': '0\u00A0\u1794\u17CA\u17B8\u179B\u17B6\u1793'}, + 12: {'other': '0\u00A0\u1791\u17D2\u179A\u17B8\u179B\u17B6\u1793'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u1796\u17B6\u1793\u17CB'}, + 5: {'other': '000\u1796\u17B6\u1793\u17CB'}, + 6: {'other': '0 \u179B\u17B6\u1793'}, + 9: {'other': '0 \u1794\u17CA\u17B8\u179B\u17B6\u1793'}, + 12: {'other': '0 \u1791\u17D2\u179A\u17B8\u179B\u17B6\u1793'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u00A0\u1796\u17B6\u1793\u17CB'}, + 6: {'other': '\u00A40\u00A0\u179B\u17B6\u1793'}, + 9: {'other': '\u00A40\u00A0\u1794\u17CA\u17B8\u179B\u17B6\u1793'}, + 12: {'other': '\u00A40\u00A0\u1791\u17D2\u179A\u17B8\u179B\u17B6\u1793'}, + }), + // Compact number symbols for locale kn. + "kn": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u0CB8\u0CBE'}, + 6: {'other': '0\u0CAE\u0CBF'}, + 9: {'other': '0\u0CAC\u0CBF'}, + 12: {'other': '0\u0C9F\u0CCD\u0CB0\u0CBF'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u0CB8\u0CBE\u0CB5\u0CBF\u0CB0'}, + 6: {'other': '0 \u0CAE\u0CBF\u0CB2\u0CBF\u0CAF\u0CA8\u0CCD'}, + 9: {'other': '0 \u0CAC\u0CBF\u0CB2\u0CBF\u0CAF\u0CA8\u0CCD'}, + 12: { + 'other': '0 \u0C9F\u0CCD\u0CB0\u0CBF\u0CB2\u0CBF\u0CAF\u0CA8\u0CCD\u200C' + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u0CB8\u0CBE'}, + 6: {'other': '\u00A40\u0CAE\u0CBF'}, + 9: {'other': '\u00A40\u0CAC\u0CBF'}, + 12: {'other': '\u00A40\u0C9F\u0CCD\u0CB0\u0CBF'}, + }), + // Compact number symbols for locale ko. + "ko": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\uCC9C'}, + 4: {'other': '0\uB9CC'}, + 8: {'other': '0\uC5B5'}, + 12: {'other': '0\uC870'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0\uCC9C'}, + 4: {'other': '0\uB9CC'}, + 8: {'other': '0\uC5B5'}, + 12: {'other': '0\uC870'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\uCC9C'}, + 4: {'other': '\u00A40\uB9CC'}, + 8: {'other': '\u00A40\uC5B5'}, + 12: {'other': '\u00A40\uC870'}, + }), + // Compact number symbols for locale ky. + "ky": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u043C\u0438\u04A3'}, + 6: {'other': '0\u00A0\u043C\u043B\u043D'}, + 9: {'other': '0\u00A0\u043C\u043B\u0434'}, + 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u043C\u0438\u04A3'}, + 6: {'other': '0 \u043C\u0438\u043B\u043B\u0438\u043E\u043D'}, + 9: {'other': '0 \u043C\u0438\u043B\u043B\u0438\u0430\u0440\u0434'}, + 12: {'other': '0 \u0442\u0440\u0438\u043B\u043B\u0438\u043E\u043D'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u043C\u0438\u04A3\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u043C\u043B\u043D\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u043C\u043B\u0434\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D\u00A0\u00A4'}, + }), + // Compact number symbols for locale ln. + "ln": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0G'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0K\u00A0\u00A4'}, + 6: {'other': '0M\u00A0\u00A4'}, + 9: {'other': '0G\u00A0\u00A4'}, + 12: {'other': '0T\u00A0\u00A4'}, + }), + // Compact number symbols for locale lo. + "lo": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0E9E\u0EB1\u0E99'}, + 5: {'other': '000\u00A0\u0E81\u0EB5\u0E9A'}, + 6: {'other': '0\u00A0\u0EA5\u0EC9\u0EB2\u0E99'}, + 9: {'other': '0\u00A0\u0E95\u0EB7\u0EC9'}, + 12: {'other': '0\u00A0\u0EA5\u0EC9\u0EB2\u0E99\u0EA5\u0EC9\u0EB2\u0E99'}, + 13: {'other': '00\u0EA5\u0EA5'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u0E9E\u0EB1\u0E99'}, + 5: {'other': '0 \u0EC1\u0EAA\u0E99'}, + 6: {'other': '0 \u0EA5\u0EC9\u0EB2\u0E99'}, + 9: {'other': '0 \u0E95\u0EB7\u0EC9'}, + 12: {'other': '0 \u0EA5\u0EC9\u0EB2\u0E99\u0EA5\u0EC9\u0EB2\u0E99'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u00A0\u0E9E\u0EB1\u0E99'}, + 5: {'other': '\u00A4000\u00A0\u0E81\u0EB5\u0E9A'}, + 6: {'other': '\u00A40\u00A0\u0EA5\u0EC9\u0EB2\u0E99'}, + 9: {'other': '\u00A40\u00A0\u0E95\u0EB7\u0EC9'}, + 12: { + 'other': '\u00A40\u00A0\u0EA5\u0EC9\u0EB2\u0E99\u0EA5\u0EC9\u0EB2\u0E99' + }, + }), + // Compact number symbols for locale lt. + "lt": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0t\u016Bkst.'}, + 6: {'other': '0\u00A0mln.'}, + 9: {'other': '0\u00A0mlrd.'}, + 12: {'other': '0\u00A0trln.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 t\u016Bkstan\u010Diai', + 'many': '0 t\u016Bkstan\u010Dio', + 'one': '0 t\u016Bkstantis', + 'other': '0 t\u016Bkstan\u010Di\u0173', + }, + 6: { + 'few': '0 milijonai', + 'many': '0 milijono', + 'one': '0 milijonas', + 'other': '0 milijon\u0173', + }, + 9: { + 'few': '0 milijardai', + 'many': '0 milijardo', + 'one': '0 milijardas', + 'other': '0 milijard\u0173', + }, + 12: { + 'few': '0 trilijonai', + 'many': '0 trilijono', + 'one': '0 trilijonas', + 'other': '0 trilijon\u0173', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0t\u016Bkst.\u00A0\u00A4'}, + 6: {'other': '0\u00A0mln.\u00A0\u00A4'}, + 9: {'other': '0\u00A0mlrd.\u00A0\u00A4'}, + 12: {'other': '0\u00A0trln.\u00A0\u00A4'}, + }), + // Compact number symbols for locale lv. + "lv": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0t\u016Bkst.'}, + 6: {'other': '0\u00A0milj.'}, + 9: {'other': '0\u00A0mljrd.'}, + 12: {'other': '0\u00A0trilj.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'one': '0 t\u016Bkstotis', + 'other': '0 t\u016Bksto\u0161i', + 'zero': '0 t\u016Bksto\u0161u', + }, + 4: { + 'one': '00 t\u016Bkstotis', + 'other': '00 t\u016Bksto\u0161i', + 'zero': '00 t\u016Bksto\u0161i', + }, + 6: { + 'one': '0 miljons', + 'other': '0 miljoni', + 'zero': '0 miljonu', + }, + 7: { + 'one': '00 miljons', + 'other': '00 miljoni', + 'zero': '00 miljoni', + }, + 9: { + 'one': '0 miljards', + 'other': '0 miljardi', + 'zero': '0 miljardu', + }, + 10: { + 'one': '00 miljards', + 'other': '00 miljardi', + 'zero': '00 miljardi', + }, + 12: { + 'one': '0 triljons', + 'other': '0 triljoni', + 'zero': '0 triljonu', + }, + 13: { + 'one': '00 triljons', + 'other': '00 triljoni', + 'zero': '00 triljoni', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0t\u016Bkst.\u00A0\u00A4'}, + 6: {'other': '0\u00A0milj.\u00A0\u00A4'}, + 9: {'other': '0\u00A0mljrd.\u00A0\u00A4'}, + 12: {'other': '0\u00A0trilj.\u00A0\u00A4'}, + }), + // Compact number symbols for locale mg. + "mg": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0G'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40G'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale mk. + "mk": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0438\u043B\u0458.'}, + 6: {'other': '0\u00A0\u043C\u0438\u043B.'}, + 8: {'other': '000\u00A0\u041C'}, + 9: {'other': '0\u00A0\u043C\u0438\u043B\u0458.'}, + 11: { + 'one': '000\u00A0\u043C\u0458.', + 'other': '000\u00A0\u043C\u0438.', + }, + 12: {'other': '0\u00A0\u0431\u0438\u043B.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'one': '0 \u0438\u043B\u0458\u0430\u0434\u0430', + 'other': '0 \u0438\u043B\u0458\u0430\u0434\u0438', + }, + 6: { + 'one': '0 \u043C\u0438\u043B\u0438\u043E\u043D', + 'other': '0 \u043C\u0438\u043B\u0438\u043E\u043D\u0438', + }, + 9: { + 'one': '0 \u043C\u0438\u043B\u0438\u0458\u0430\u0440\u0434\u0430', + 'other': '0 \u043C\u0438\u043B\u0438\u0458\u0430\u0440\u0434\u0438', + }, + 12: { + 'one': '0 \u0431\u0438\u043B\u0438\u043E\u043D', + 'other': '0 \u0431\u0438\u043B\u0438\u043E\u043D\u0438', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u0438\u043B\u0458.\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u043C\u0438\u043B.\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u043C\u0438\u043B\u0458.\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u0431\u0438\u043B.\u00A0\u00A4'}, + }), + // Compact number symbols for locale ml. + "ml": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u0D06\u0D2F\u0D3F\u0D30\u0D02'}, + 6: {'other': '0 \u0D26\u0D36\u0D32\u0D15\u0D4D\u0D37\u0D02'}, + 9: {'other': '0 \u0D32\u0D15\u0D4D\u0D37\u0D02 \u0D15\u0D4B\u0D1F\u0D3F'}, + 12: {'other': '0 \u0D1F\u0D4D\u0D30\u0D3F\u0D32\u0D4D\u0D2F\u0D7A'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale mn. + "mn": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u043C\u044F\u043D\u0433\u0430'}, + 6: {'other': '0\u00A0\u0441\u0430\u044F'}, + 9: {'other': '0\u00A0\u0442\u044D\u0440\u0431\u0443\u043C'}, + 11: {'other': '000\u0422'}, + 12: {'other': '0\u0418\u041D'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u043C\u044F\u043D\u0433\u0430'}, + 6: {'other': '0 \u0441\u0430\u044F'}, + 9: {'other': '0 \u0442\u044D\u0440\u0431\u0443\u043C'}, + 12: {'other': '0 \u0438\u0445 \u043D\u0430\u044F\u0434'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00\u00A0\u043C\u044F\u043D\u0433\u0430'}, + 5: {'other': '\u00A4000\u00A0\u043C\u044F\u043D\u0433\u0430'}, + 6: {'other': '\u00A40\u00A0\u0441\u0430\u044F'}, + 9: {'other': '\u00A40\u00A0\u0442\u044D\u0440\u0431\u0443\u043C'}, + 10: {'other': '\u00A4\u00A000\u00A0\u0442\u044D\u0440\u0431\u0443\u043C'}, + 12: { + 'other': '\u00A4\u00A00\u00A0\u0438\u0445\u00A0\u043D\u0430\u044F\u0434' + }, + }), + // Compact number symbols for locale mr. + "mr": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0939'}, + 5: {'other': '0\u00A0\u0932\u093E\u0916'}, + 7: {'other': '0\u00A0\u0915\u094B\u091F\u0940'}, + 9: {'other': '0\u00A0\u0905\u092C\u094D\u091C'}, + 11: {'other': '0\u00A0\u0916\u0930\u094D\u0935'}, + 13: {'other': '0\u00A0\u092A\u0926\u094D\u092E'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u0939\u091C\u093E\u0930'}, + 5: {'other': '0 \u0932\u093E\u0916'}, + 7: {'other': '0 \u0915\u094B\u091F\u0940'}, + 9: {'other': '0 \u0905\u092C\u094D\u091C'}, + 11: {'other': '0 \u0916\u0930\u094D\u0935'}, + 13: {'other': '0 \u092A\u0926\u094D\u092E'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u00A0\u0939'}, + 5: {'other': '\u00A40\u00A0\u0932\u093E\u0916'}, + 7: {'other': '\u00A40\u00A0\u0915\u094B\u091F\u0940'}, + 9: {'other': '\u00A40\u00A0\u0905\u092C\u094D\u091C'}, + 11: {'other': '\u00A40\u00A0\u0916\u0930\u094D\u0935'}, + 13: {'other': '\u00A40\u00A0\u092A\u0926\u094D\u092E'}, + }), + // Compact number symbols for locale ms. + "ms": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0J'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 ribu'}, + 6: {'other': '0 juta'}, + 9: {'other': '0 bilion'}, + 12: {'other': '0 trilion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40J'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale mt. + "mt": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0G'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40G'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale my. + "my": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u1011\u1031\u102C\u1004\u103A'}, + 4: {'other': '0\u101E\u1031\u102C\u1004\u103A\u1038'}, + 5: {'other': '0\u101E\u102D\u1014\u103A\u1038'}, + 6: {'other': '0\u101E\u1014\u103A\u1038'}, + 7: {'other': '0\u1000\u102F\u100B\u1031'}, + 9: {'other': '\u1000\u102F\u100B\u1031000'}, + 10: {'other': '\u1000\u102F\u100B\u10310\u1011'}, + 11: {'other': '\u1000\u102F\u100B\u10310\u101E'}, + 12: {'other': '\u100B\u10310\u101E\u102D\u1014\u103A\u1038'}, + 13: {'other': '\u100B\u10310\u101E\u1014\u103A\u1038'}, + 14: {'other': '0\u1000\u1031\u102C\u100B\u102D'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0\u1011\u1031\u102C\u1004\u103A'}, + 4: {'other': '0\u101E\u1031\u102C\u1004\u103A\u1038'}, + 5: {'other': '0\u101E\u102D\u1014\u103A\u1038'}, + 6: {'other': '0\u101E\u1014\u103A\u1038'}, + 7: {'other': '0\u1000\u102F\u100B\u1031'}, + 9: {'other': '\u1000\u102F\u100B\u1031000'}, + 11: { + 'other': '\u1000\u102F\u100B\u10310\u101E\u1031\u102C\u1004\u103A\u1038' + }, + 12: {'other': '\u1000\u102F\u100B\u10310\u101E\u102D\u1014\u103A\u1038'}, + 13: {'other': '\u1000\u102F\u100B\u10310\u101E\u1014\u103A\u1038'}, + 14: {'other': '0\u1000\u1031\u102C\u100B\u102D'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00\u1011\u1031\u102C\u1004\u103A'}, + 4: {'other': '\u00A4\u00A00\u101E\u1031\u102C\u1004\u103A\u1038'}, + 5: {'other': '\u00A4\u00A00\u101E\u102D\u1014\u103A\u1038'}, + 6: {'other': '\u00A4\u00A00\u101E\u1014\u103A\u1038'}, + 7: {'other': '\u00A4\u00A00\u1000\u102F\u100B\u1031'}, + 9: {'other': '\u00A4\u00A0\u1000\u102F\u100B\u1031000'}, + 11: { + 'other': + '\u00A4\u00A0\u1000\u102F\u100B\u10310\u101E\u1031\u102C\u1004\u103A\u1038' + }, + 12: { + 'other': + '\u00A4\u00A0\u1000\u102F\u100B\u10310\u101E\u102D\u1014\u103A\u1038' + }, + 13: { + 'other': '\u00A4\u00A0\u1000\u102F\u100B\u10310\u101E\u1014\u103A\u1038' + }, + 14: {'other': '\u00A4\u00A00\u1000\u1031\u102C\u100B\u102D'}, + }), + // Compact number symbols for locale nb. + "nb": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0k'}, + 6: {'other': '0\u00A0mill.'}, + 9: {'other': '0\u00A0mrd.'}, + 12: {'other': '0\u00A0bill.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 tusen'}, + 6: { + 'one': '0 million', + 'other': '0 millioner', + }, + 7: {'other': '00 millioner'}, + 9: { + 'one': '0 milliard', + 'other': '0 milliarder', + }, + 10: {'other': '00 milliarder'}, + 12: { + 'one': '0 billion', + 'other': '0 billioner', + }, + 13: {'other': '00 billioner'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00k'}, + 6: {'other': '\u00A4\u00A00\u00A0mill.'}, + 9: {'other': '\u00A4\u00A00\u00A0mrd.'}, + 12: {'other': '\u00A4\u00A00\u00A0bill.'}, + }), + // Compact number symbols for locale ne. + "ne": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0939\u091C\u093E\u0930'}, + 5: {'other': '0\u00A0\u0932\u093E\u0916'}, + 7: {'other': '0\u00A0\u0915\u0930\u094B\u0921'}, + 9: {'other': '0\u00A0\u0905\u0930\u092C'}, + 11: {'other': '0\u00A0\u0916\u0930\u092C'}, + 13: {'other': '0\u00A0\u0936\u0902\u0916'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u0939\u091C\u093E\u0930'}, + 5: {'other': '0 \u0932\u093E\u0916'}, + 6: {'other': '0 \u0915\u0930\u094B\u0921'}, + 9: {'other': '0 \u0905\u0930\u092C'}, + 12: {'other': '00 \u0916\u0930\u092C'}, + 13: {'other': '0 \u0936\u0902\u0916'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00\u00A0\u0939\u091C\u093E\u0930'}, + 5: {'other': '\u00A4\u00A00\u00A0\u0932\u093E\u0916'}, + 7: {'other': '\u00A4\u00A00\u00A0\u0915\u0930\u094B\u0921'}, + 9: {'other': '\u00A4\u00A00\u00A0\u0905\u0930\u092C'}, + 11: {'other': '\u00A4\u00A00\u00A0\u0916\u0930\u092C'}, + 13: {'other': '\u00A4\u00A00\u00A0\u0936\u0902\u0916'}, + }), + // Compact number symbols for locale nl. + "nl": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0\u00A0mln.'}, + 9: {'other': '0\u00A0mld.'}, + 12: {'other': '0\u00A0bln.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 duizend'}, + 6: {'other': '0 miljoen'}, + 9: {'other': '0 miljard'}, + 12: {'other': '0 biljoen'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00K'}, + 6: {'other': '\u00A4\u00A00\u00A0mln.'}, + 9: {'other': '\u00A4\u00A00\u00A0mld.'}, + 12: {'other': '\u00A4\u00A00\u00A0bln.'}, + }), + // Compact number symbols for locale no. + "no": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0k'}, + 6: {'other': '0\u00A0mill.'}, + 9: {'other': '0\u00A0mrd.'}, + 12: {'other': '0\u00A0bill.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 tusen'}, + 6: { + 'one': '0 million', + 'other': '0 millioner', + }, + 7: {'other': '00 millioner'}, + 9: { + 'one': '0 milliard', + 'other': '0 milliarder', + }, + 10: {'other': '00 milliarder'}, + 12: { + 'one': '0 billion', + 'other': '0 billioner', + }, + 13: {'other': '00 billioner'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00k'}, + 6: {'other': '\u00A4\u00A00\u00A0mill.'}, + 9: {'other': '\u00A4\u00A00\u00A0mrd.'}, + 12: {'other': '\u00A4\u00A00\u00A0bill.'}, + }), + // Compact number symbols for locale no_NO. + "no_NO": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0k'}, + 6: {'other': '0\u00A0mill.'}, + 9: {'other': '0\u00A0mrd.'}, + 12: {'other': '0\u00A0bill.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 tusen'}, + 6: { + 'one': '0 million', + 'other': '0 millioner', + }, + 7: {'other': '00 millioner'}, + 9: { + 'one': '0 milliard', + 'other': '0 milliarder', + }, + 10: {'other': '00 milliarder'}, + 12: { + 'one': '0 billion', + 'other': '0 billioner', + }, + 13: {'other': '00 billioner'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00k'}, + 6: {'other': '\u00A4\u00A00\u00A0mill.'}, + 9: {'other': '\u00A4\u00A00\u00A0mrd.'}, + 12: {'other': '\u00A4\u00A00\u00A0bill.'}, + }), + // Compact number symbols for locale nyn. + "nyn": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0G'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40G'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale or. + "or": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u0B39'}, + 6: {'other': '0\u0B28\u0B3F'}, + 9: {'other': '0\u0B2C\u0B3F'}, + 12: {'other': '0\u0B1F\u0B4D\u0B30\u0B3F'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u0B39\u0B1C\u0B3E\u0B30'}, + 6: {'other': '0 \u0B28\u0B3F\u0B5F\u0B41\u0B24'}, + 9: {'other': '0 \u0B36\u0B39\u0B15\u0B4B\u0B1F\u0B3F'}, + 12: {'other': '0 \u0B32\u0B15\u0B4D\u0B37\u0B15\u0B4B\u0B1F\u0B3F'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u0B39'}, + 6: {'other': '\u00A40\u0B28\u0B3F'}, + 9: {'other': '\u00A40\u0B2C\u0B3F'}, + 12: {'other': '\u00A40\u0B1F\u0B4D\u0B30\u0B3F'}, + }), + // Compact number symbols for locale pa. + "pa": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0A39\u0A1C\u0A3C\u0A3E\u0A30'}, + 5: {'other': '0\u00A0\u0A32\u0A71\u0A16'}, + 7: {'other': '0\u00A0\u0A15\u0A30\u0A4B\u0A5C'}, + 9: {'other': '0\u00A0\u0A05\u0A30\u0A2C'}, + 11: {'other': '0\u00A0\u0A16\u0A30\u0A2C'}, + 13: {'other': '0\u00A0\u0A28\u0A40\u0A32'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u0A39\u0A1C\u0A3C\u0A3E\u0A30'}, + 5: {'other': '0 \u0A32\u0A71\u0A16'}, + 7: {'other': '0 \u0A15\u0A30\u0A4B\u0A5C'}, + 9: {'other': '0 \u0A05\u0A30\u0A2C'}, + 11: {'other': '0 \u0A16\u0A30\u0A2C'}, + 13: {'other': '0 \u0A28\u0A40\u0A32'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00\u00A0\u0A39\u0A1C\u0A3C\u0A3E\u0A30'}, + 5: {'other': '\u00A4\u00A00\u00A0\u0A32\u0A71\u0A16'}, + 7: {'other': '\u00A4\u00A00\u00A0\u0A15\u0A30\u0A4B\u0A5C'}, + 9: {'other': '\u00A4\u00A00\u00A0\u0A05\u0A30\u0A2C'}, + 11: {'other': '\u00A4\u00A00\u00A0\u0A16\u0A30\u0A2C'}, + 13: {'other': '\u00A4\u00A00\u00A0\u0A28\u0A40\u0A32'}, + }), + // Compact number symbols for locale pl. + "pl": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0tys.'}, + 6: {'other': '0\u00A0mln'}, + 9: {'other': '0\u00A0mld'}, + 12: {'other': '0\u00A0bln'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 tysi\u0105ce', + 'many': '0 tysi\u0119cy', + 'one': '0 tysi\u0105c', + 'other': '0 tysi\u0105ca', + }, + 6: { + 'few': '0 miliony', + 'many': '0 milion\u00F3w', + 'one': '0 milion', + 'other': '0 miliona', + }, + 9: { + 'few': '0 miliardy', + 'many': '0 miliard\u00F3w', + 'one': '0 miliard', + 'other': '0 miliarda', + }, + 12: { + 'few': '0 biliony', + 'many': '0 bilion\u00F3w', + 'one': '0 bilion', + 'other': '0 biliona', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0tys.\u00A0\u00A4'}, + 6: {'other': '0\u00A0mln\u00A0\u00A4'}, + 9: {'other': '0\u00A0mld\u00A0\u00A4'}, + 12: {'other': '0\u00A0bln\u00A0\u00A4'}, + }), + // Compact number symbols for locale ps. + "ps": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 11: { + 'one': '000G', + 'other': '000B', + }, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0G'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0K\u00A0\u00A4'}, + 6: {'other': '0M\u00A0\u00A4'}, + 9: {'other': '0G\u00A0\u00A4'}, + 10: { + 'one': '00G\u00A0\u00A4', + 'other': '\u00A400B', + }, + 11: {'other': '\u00A4000B'}, + 12: {'other': '0T\u00A0\u00A4'}, + }), + // Compact number symbols for locale pt. + "pt": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0mil'}, + 6: {'other': '0\u00A0mi'}, + 9: {'other': '0\u00A0bi'}, + 12: {'other': '0\u00A0tri'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 mil'}, + 6: { + 'one': '0 milh\u00E3o', + 'other': '0 milh\u00F5es', + }, + 9: { + 'one': '0 bilh\u00E3o', + 'other': '0 bilh\u00F5es', + }, + 12: { + 'one': '0 trilh\u00E3o', + 'other': '0 trilh\u00F5es', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00\u00A0mil'}, + 6: {'other': '\u00A4\u00A00\u00A0mi'}, + 9: {'other': '\u00A4\u00A00\u00A0bi'}, + 12: {'other': '\u00A4\u00A00\u00A0tri'}, + }), + // Compact number symbols for locale pt_BR. + "pt_BR": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0mil'}, + 6: {'other': '0\u00A0mi'}, + 9: {'other': '0\u00A0bi'}, + 12: {'other': '0\u00A0tri'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 mil'}, + 6: { + 'one': '0 milh\u00E3o', + 'other': '0 milh\u00F5es', + }, + 9: { + 'one': '0 bilh\u00E3o', + 'other': '0 bilh\u00F5es', + }, + 12: { + 'one': '0 trilh\u00E3o', + 'other': '0 trilh\u00F5es', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00\u00A0mil'}, + 6: {'other': '\u00A4\u00A00\u00A0mi'}, + 9: {'other': '\u00A4\u00A00\u00A0bi'}, + 12: {'other': '\u00A4\u00A00\u00A0tri'}, + }), + // Compact number symbols for locale pt_PT. + "pt_PT": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0mil'}, + 6: {'other': '0\u00A0M'}, + 9: {'other': '0\u00A0mM'}, + 12: {'other': '0\u00A0Bi'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 mil'}, + 6: { + 'one': '0 milh\u00E3o', + 'other': '0 milh\u00F5es', + }, + 7: {'other': '00 milh\u00F5es'}, + 9: {'other': '0 mil milh\u00F5es'}, + 12: { + 'one': '0 bili\u00E3o', + 'other': '0 bili\u00F5es', + }, + 13: {'other': '00 bili\u00F5es'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0mil\u00A0\u00A4'}, + 6: {'other': '0\u00A0M\u00A0\u00A4'}, + 9: {'other': '0\u00A0mM\u00A0\u00A4'}, + 12: {'other': '0\u00A0B\u00A0\u00A4'}, + }), + // Compact number symbols for locale ro. + "ro": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0K'}, + 6: {'other': '0\u00A0mil.'}, + 9: {'other': '0\u00A0mld.'}, + 12: {'other': '0\u00A0tril.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 mii', + 'one': '0 mie', + 'other': '0 de mii', + }, + 6: { + 'few': '0 milioane', + 'one': '0 milion', + 'other': '0 de milioane', + }, + 9: { + 'few': '0 miliarde', + 'one': '0 miliard', + 'other': '0 de miliarde', + }, + 12: { + 'few': '0 trilioane', + 'one': '0 trilion', + 'other': '0 de trilioane', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: { + 'few': '0\u00A0mii\u00A0\u00A4', + 'one': '0\u00A0mie\u00A0\u00A4', + 'other': '0\u00A0mii\u00A0\u00A4', + }, + 4: {'other': '00\u00A0mii\u00A0\u00A4'}, + 6: {'other': '0\u00A0mil.\u00A0\u00A4'}, + 9: {'other': '0\u00A0mld.\u00A0\u00A4'}, + 12: {'other': '0\u00A0tril.\u00A0\u00A4'}, + }), + // Compact number symbols for locale ru. + "ru": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0442\u044B\u0441.'}, + 6: {'other': '0\u00A0\u043C\u043B\u043D'}, + 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434'}, + 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 \u0442\u044B\u0441\u044F\u0447\u0438', + 'many': '0 \u0442\u044B\u0441\u044F\u0447', + 'one': '0 \u0442\u044B\u0441\u044F\u0447\u0430', + 'other': '0 \u0442\u044B\u0441\u044F\u0447\u0438', + }, + 6: { + 'few': '0 \u043C\u0438\u043B\u043B\u0438\u043E\u043D\u0430', + 'many': '0 \u043C\u0438\u043B\u043B\u0438\u043E\u043D\u043E\u0432', + 'one': '0 \u043C\u0438\u043B\u043B\u0438\u043E\u043D', + 'other': '0 \u043C\u0438\u043B\u043B\u0438\u043E\u043D\u0430', + }, + 9: { + 'few': '0 \u043C\u0438\u043B\u043B\u0438\u0430\u0440\u0434\u0430', + 'many': '0 \u043C\u0438\u043B\u043B\u0438\u0430\u0440\u0434\u043E\u0432', + 'one': '0 \u043C\u0438\u043B\u043B\u0438\u0430\u0440\u0434', + 'other': '0 \u043C\u0438\u043B\u043B\u0438\u0430\u0440\u0434\u0430', + }, + 12: { + 'few': '0 \u0442\u0440\u0438\u043B\u043B\u0438\u043E\u043D\u0430', + 'many': '0 \u0442\u0440\u0438\u043B\u043B\u0438\u043E\u043D\u043E\u0432', + 'one': '0 \u0442\u0440\u0438\u043B\u043B\u0438\u043E\u043D', + 'other': '0 \u0442\u0440\u0438\u043B\u043B\u0438\u043E\u043D\u0430', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u0442\u044B\u0441.\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u043C\u043B\u043D\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D\u00A0\u00A4'}, + }), + // Compact number symbols for locale si. + "si": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '\u0DAF0'}, + 6: {'other': '\u0DB8\u0DD20'}, + 9: {'other': '\u0DB6\u0DD20'}, + 12: {'other': '\u0DA7\u0DCA\u200D\u0DBB\u0DD20'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '\u0DAF\u0DC4\u0DC3 0'}, + 6: {'other': '\u0DB8\u0DD2\u0DBD\u0DD2\u0DBA\u0DB1 0'}, + 9: {'other': '\u0DB6\u0DD2\u0DBD\u0DD2\u0DBA\u0DB1 0'}, + 12: {'other': '\u0DA7\u0DCA\u200D\u0DBB\u0DD2\u0DBD\u0DD2\u0DBA\u0DB1 0'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u0DAF0'}, + 6: {'other': '\u00A4\u0DB8\u0DD20'}, + 9: {'other': '\u00A4\u0DB6\u0DD20'}, + 12: {'other': '\u00A4\u0DA7\u0DCA\u200D\u0DBB\u0DD20'}, + }), + // Compact number symbols for locale sk. + "sk": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0tis.'}, + 6: {'other': '0\u00A0mil.'}, + 9: {'other': '0\u00A0mld.'}, + 12: {'other': '0\u00A0bil.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 tis\u00EDce', + 'many': '0 tis\u00EDca', + 'one': '0 tis\u00EDc', + 'other': '0 tis\u00EDc', + }, + 4: { + 'few': '00 tis\u00EDc', + 'many': '00 tis\u00EDca', + 'one': '00 tis\u00EDc', + 'other': '00 tis\u00EDc', + }, + 6: { + 'few': '0 mili\u00F3ny', + 'many': '0 mili\u00F3na', + 'one': '0 mili\u00F3n', + 'other': '0 mili\u00F3nov', + }, + 7: { + 'few': '00 mili\u00F3nov', + 'many': '00 mili\u00F3na', + 'one': '00 mili\u00F3nov', + 'other': '00 mili\u00F3nov', + }, + 9: { + 'few': '0 miliardy', + 'many': '0 miliardy', + 'one': '0 miliarda', + 'other': '0 mili\u00E1rd', + }, + 10: { + 'few': '00 mili\u00E1rd', + 'many': '00 miliardy', + 'one': '00 mili\u00E1rd', + 'other': '00 mili\u00E1rd', + }, + 12: { + 'few': '0 bili\u00F3ny', + 'many': '0 bili\u00F3na', + 'one': '0 bili\u00F3n', + 'other': '0 bili\u00F3nov', + }, + 13: { + 'few': '00 bili\u00F3nov', + 'many': '00 bili\u00F3na', + 'one': '00 bili\u00F3nov', + 'other': '00 bili\u00F3nov', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0tis.\u00A0\u00A4'}, + 6: {'other': '0\u00A0mil.\u00A0\u00A4'}, + 9: {'other': '0\u00A0mld.\u00A0\u00A4'}, + 12: {'other': '0\u00A0bil.\u00A0\u00A4'}, + }), + // Compact number symbols for locale sl. + "sl": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0tis.'}, + 6: {'other': '0\u00A0mio.'}, + 9: {'other': '0\u00A0mrd.'}, + 12: {'other': '0\u00A0bil.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 tiso\u010D'}, + 6: { + 'few': '0 milijone', + 'one': '0 milijon', + 'other': '0 milijonov', + 'two': '0 milijona', + }, + 7: { + 'few': '00 milijoni', + 'one': '00 milijon', + 'other': '00 milijonov', + 'two': '00 milijona', + }, + 9: { + 'few': '0 milijarde', + 'one': '0 milijarda', + 'other': '0 milijard', + 'two': '0 milijardi', + }, + 12: { + 'few': '0 bilijoni', + 'one': '0 bilijon', + 'other': '0 bilijonov', + 'two': '0 bilijona', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0tis.\u00A0\u00A4'}, + 6: {'other': '0\u00A0mio.\u00A0\u00A4'}, + 9: {'other': '0\u00A0mrd.\u00A0\u00A4'}, + 12: {'other': '0\u00A0bil.\u00A0\u00A4'}, + }), + // Compact number symbols for locale sq. + "sq": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0mij\u00EB'}, + 6: {'other': '0\u00A0mln'}, + 9: {'other': '0\u00A0mld'}, + 12: {'other': '0\u00A0bln'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 mij\u00EB'}, + 6: {'other': '0 milion'}, + 9: {'other': '0 miliard'}, + 12: {'other': '0 bilion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0mij\u00EB\u00A0\u00A4'}, + 6: {'other': '0\u00A0mln\u00A0\u00A4'}, + 9: {'other': '0\u00A0mld\u00A0\u00A4'}, + 12: {'other': '0\u00A0bln\u00A0\u00A4'}, + }), + // Compact number symbols for locale sr. + "sr": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0445\u0438\u0459.'}, + 6: {'other': '0\u00A0\u043C\u0438\u043B.'}, + 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434.'}, + 12: {'other': '0\u00A0\u0431\u0438\u043B.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 \u0445\u0438\u0459\u0430\u0434\u0435', + 'one': '0 \u0445\u0438\u0459\u0430\u0434\u0430', + 'other': '0 \u0445\u0438\u0459\u0430\u0434\u0430', + }, + 6: { + 'few': '0 \u043C\u0438\u043B\u0438\u043E\u043D\u0430', + 'one': '0 \u043C\u0438\u043B\u0438\u043E\u043D', + 'other': '0 \u043C\u0438\u043B\u0438\u043E\u043D\u0430', + }, + 9: { + 'few': '0 \u043C\u0438\u043B\u0438\u0458\u0430\u0440\u0434\u0435', + 'one': '0 \u043C\u0438\u043B\u0438\u0458\u0430\u0440\u0434\u0430', + 'other': '0 \u043C\u0438\u043B\u0438\u0458\u0430\u0440\u0434\u0438', + }, + 12: { + 'few': '0 \u0431\u0438\u043B\u0438\u043E\u043D\u0430', + 'one': '0 \u0431\u0438\u043B\u0438\u043E\u043D', + 'other': '0 \u0431\u0438\u043B\u0438\u043E\u043D\u0430', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u0445\u0438\u0459.\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u043C\u0438\u043B.\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434.\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u0431\u0438\u043B.\u00A0\u00A4'}, + }), + // Compact number symbols for locale sr_Latn. + "sr_Latn": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0hilj.'}, + 6: {'other': '0\u00A0mil.'}, + 9: {'other': '0\u00A0mlrd.'}, + 12: {'other': '0\u00A0bil.'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 hiljade', + 'one': '0 hiljada', + 'other': '0 hiljada', + }, + 6: { + 'few': '0 miliona', + 'one': '0 milion', + 'other': '0 miliona', + }, + 9: { + 'few': '0 milijarde', + 'one': '0 milijarda', + 'other': '0 milijardi', + }, + 12: { + 'few': '0 biliona', + 'one': '0 bilion', + 'other': '0 biliona', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0hilj.\u00A0\u00A4'}, + 6: {'other': '0\u00A0mil.\u00A0\u00A4'}, + 9: {'other': '0\u00A0mlrd.\u00A0\u00A4'}, + 12: {'other': '0\u00A0bil.\u00A0\u00A4'}, + }), + // Compact number symbols for locale sv. + "sv": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0tn'}, + 6: {'other': '0\u00A0mn'}, + 9: {'other': '0\u00A0md'}, + 12: {'other': '0\u00A0bn'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 tusen'}, + 6: { + 'one': '0 miljon', + 'other': '0 miljoner', + }, + 8: {'other': '000 miljoner'}, + 9: { + 'one': '0 miljard', + 'other': '0 miljarder', + }, + 10: {'other': '00 miljarder'}, + 12: { + 'one': '0 biljon', + 'other': '0 biljoner', + }, + 13: {'other': '00 biljoner'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0tn\u00A0\u00A4'}, + 6: {'other': '0\u00A0mn\u00A0\u00A4'}, + 9: {'other': '0\u00A0md\u00A0\u00A4'}, + 12: {'other': '0\u00A0bn\u00A0\u00A4'}, + }), + // Compact number symbols for locale sw. + "sw": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': 'elfu\u00A00;elfu\u00A0-0'}, + 6: { + 'one': '0M;-0M', + 'other': '0M', + }, + 9: {'other': '0B;-0B'}, + 12: { + 'one': '0T;-0T', + 'other': '0T', + }, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': 'elfu 0;elfu -0'}, + 6: {'other': 'milioni 0;milioni -0'}, + 9: {'other': 'bilioni 0;bilioni -0'}, + 12: {'other': 'trilioni 0;trilioni -0'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A0elfu0'}, + 4: {'other': '\u00A4\u00A0elfu00;\u00A4elfu\u00A0-00'}, + 5: {'other': '\u00A4\u00A0laki000;\u00A4laki\u00A0-000'}, + 6: { + 'one': '\u00A4\u00A00M;\u00A4-0M', + 'other': '\u00A4\u00A00M', + }, + 7: { + 'one': '\u00A4\u00A000M;\u00A4M-00M', + 'other': '\u00A4\u00A000M;\u00A4-00M', + }, + 8: { + 'one': '\u00A4\u00A0000M;\u00A4Milioni-000', + 'other': '\u00A4\u00A0000M', + }, + 9: {'other': '\u00A4\u00A00B;\u00A4-0B'}, + 12: { + 'one': '\u00A4\u00A00T;\u00A4-0T', + 'other': '\u00A4\u00A00T', + }, + 14: {'other': '\u00A4\u00A0000T;\u00A4-000T'}, + }), + // Compact number symbols for locale ta. + "ta": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u0B86'}, + 6: {'other': '0\u0BAE\u0BBF'}, + 9: {'other': '0\u0BAA\u0BBF'}, + 12: {'other': '0\u0B9F\u0BBF'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u0B86\u0BAF\u0BBF\u0BB0\u0BAE\u0BCD'}, + 6: {'other': '0 \u0BAE\u0BBF\u0BB2\u0BCD\u0BB2\u0BBF\u0BAF\u0BA9\u0BCD'}, + 9: {'other': '0 \u0BAA\u0BBF\u0BB2\u0BCD\u0BB2\u0BBF\u0BAF\u0BA9\u0BCD'}, + 12: { + 'other': + '0 \u0B9F\u0BBF\u0BB0\u0BBF\u0BB2\u0BCD\u0BB2\u0BBF\u0BAF\u0BA9\u0BCD' + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00\u0B86'}, + 6: {'other': '\u00A4\u00A00\u0BAE\u0BBF'}, + 9: { + 'one': '\u00A4\u00A00\u0BAA\u0BBF', + 'other': '\u00A40\u0BAA\u0BBF', + }, + 10: {'other': '\u00A4\u00A000\u0BAA\u0BBF'}, + 11: { + 'one': '\u00A4\u00A0000\u0BAA\u0BBF', + 'other': '\u00A4000\u0BAA\u0BBF', + }, + 12: {'other': '\u00A4\u00A00\u0B9F\u0BBF'}, + }), + // Compact number symbols for locale te. + "te": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u0C35\u0C47'}, + 6: {'other': '0\u0C2E\u0C3F'}, + 9: {'other': '0\u0C2C\u0C3F'}, + 12: {'other': '0\u0C1F\u0C4D\u0C30\u0C3F'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'one': '0 \u0C35\u0C47\u0C2F\u0C3F', + 'other': '0 \u0C35\u0C47\u0C32\u0C41', + }, + 4: {'other': '00 \u0C35\u0C47\u0C32\u0C41'}, + 6: { + 'one': '0 \u0C2E\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D', + 'other': '0 \u0C2E\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41', + }, + 7: {'other': '00 \u0C2E\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41'}, + 9: { + 'one': '0 \u0C2C\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D', + 'other': '0 \u0C2C\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41', + }, + 10: {'other': '00 \u0C2C\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41'}, + 12: { + 'one': '0 \u0C1F\u0C4D\u0C30\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D', + 'other': + '0 \u0C1F\u0C4D\u0C30\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41', + }, + 13: { + 'other': + '00 \u0C1F\u0C4D\u0C30\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41' + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40\u0C35\u0C47'}, + 6: {'other': '\u00A40\u0C2E\u0C3F'}, + 9: {'other': '\u00A40\u0C2C\u0C3F'}, + 12: {'other': '\u00A40\u0C1F\u0C4D\u0C30\u0C3F'}, + }), + // Compact number symbols for locale th. + "th": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u0E1E\u0E31\u0E19'}, + 4: {'other': '0 \u0E2B\u0E21\u0E37\u0E48\u0E19'}, + 5: {'other': '0 \u0E41\u0E2A\u0E19'}, + 6: {'other': '0 \u0E25\u0E49\u0E32\u0E19'}, + 9: {'other': '0 \u0E1E\u0E31\u0E19\u0E25\u0E49\u0E32\u0E19'}, + 10: {'other': '0 \u0E2B\u0E21\u0E37\u0E48\u0E19\u0E25\u0E49\u0E32\u0E19'}, + 11: {'other': '0 \u0E41\u0E2A\u0E19\u0E25\u0E49\u0E32\u0E19'}, + 12: {'other': '0 \u0E25\u0E49\u0E32\u0E19\u0E25\u0E49\u0E32\u0E19'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale tl. + "tl": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'one': '0 libo', + 'other': '0 na libo', + }, + 6: { + 'one': '0 milyon', + 'other': '0 na milyon', + }, + 9: { + 'one': '0 bilyon', + 'other': '0 na bilyon', + }, + 12: { + 'one': '0 trilyon', + 'other': '0 na trilyon', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale tr. + "tr": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0B'}, + 6: {'other': '0\u00A0Mn'}, + 9: {'other': '0\u00A0Mr'}, + 12: {'other': '0\u00A0Tn'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 bin'}, + 6: {'other': '0 milyon'}, + 9: {'other': '0 milyar'}, + 12: {'other': '0 trilyon'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0B\u00A0\u00A4'}, + 6: {'other': '0\u00A0Mn\u00A0\u00A4'}, + 9: {'other': '0\u00A0Mr\u00A0\u00A4'}, + 12: {'other': '0\u00A0Tn\u00A0\u00A4'}, + }), + // Compact number symbols for locale uk. + "uk": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u0442\u0438\u0441.'}, + 6: {'other': '0\u00A0\u043C\u043B\u043D'}, + 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434'}, + 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: { + 'few': '0 \u0442\u0438\u0441\u044F\u0447\u0456', + 'many': '0 \u0442\u0438\u0441\u044F\u0447', + 'one': '0 \u0442\u0438\u0441\u044F\u0447\u0430', + 'other': '0 \u0442\u0438\u0441\u044F\u0447\u0456', + }, + 6: { + 'few': '0 \u043C\u0456\u043B\u044C\u0439\u043E\u043D\u0438', + 'many': '0 \u043C\u0456\u043B\u044C\u0439\u043E\u043D\u0456\u0432', + 'one': '0 \u043C\u0456\u043B\u044C\u0439\u043E\u043D', + 'other': '0 \u043C\u0456\u043B\u044C\u0439\u043E\u043D\u0430', + }, + 9: { + 'few': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434\u0438', + 'many': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434\u0456\u0432', + 'one': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434', + 'other': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434\u0430', + }, + 12: { + 'few': '0 \u0442\u0440\u0438\u043B\u044C\u0439\u043E\u043D\u0438', + 'many': '0 \u0442\u0440\u0438\u043B\u044C\u0439\u043E\u043D\u0456\u0432', + 'one': '0 \u0442\u0440\u0438\u043B\u044C\u0439\u043E\u043D', + 'other': '0 \u0442\u0440\u0438\u043B\u044C\u0439\u043E\u043D\u0430', + }, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0\u0442\u0438\u0441.\u00A0\u00A4'}, + 6: {'other': '0\u00A0\u043C\u043B\u043D\u00A0\u00A4'}, + 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434\u00A0\u00A4'}, + 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D\u00A0\u00A4'}, + }), + // Compact number symbols for locale ur. + "ur": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0\u06C1\u0632\u0627\u0631'}, + 5: {'other': '0\u00A0\u0644\u0627\u06A9\u06BE'}, + 7: {'other': '0\u00A0\u06A9\u0631\u0648\u0691'}, + 9: {'other': '0\u00A0\u0627\u0631\u0628'}, + 11: {'other': '0\u00A0\u06A9\u06BE\u0631\u0628'}, + 13: {'other': '00\u00A0\u0679\u0631\u06CC\u0644\u06CC\u0646'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 \u06C1\u0632\u0627\u0631'}, + 5: {'other': '0 \u0644\u0627\u06A9\u06BE'}, + 7: {'other': '0 \u06A9\u0631\u0648\u0691'}, + 9: {'other': '0 \u0627\u0631\u0628'}, + 11: {'other': '0 \u06A9\u06BE\u0631\u0628'}, + 13: {'other': '00 \u0679\u0631\u06CC\u0644\u06CC\u0646'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A4\u00A00\u00A0\u06C1\u0632\u0627\u0631'}, + 5: {'other': '\u00A4\u00A00\u00A0\u0644\u0627\u06A9\u06BE'}, + 7: {'other': '\u00A4\u00A00\u00A0\u06A9\u0631\u0648\u0691'}, + 9: {'other': '\u00A4\u00A00\u00A0\u0627\u0631\u0628'}, + 11: {'other': '\u00A4\u00A00\u00A0\u06A9\u06BE\u0631\u0628'}, + 12: {'other': '\u00A40\u00A0\u0679\u0631\u06CC\u0644\u06CC\u0646'}, + 13: {'other': '\u00A4\u00A000\u00A0\u0679\u0631\u06CC\u0644\u06CC\u0646'}, + }), + // Compact number symbols for locale uz. + "uz": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0ming'}, + 6: {'other': '0\u00A0mln'}, + 9: {'other': '0\u00A0mlrd'}, + 12: {'other': '0\u00A0trln'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 ming'}, + 6: {'other': '0 million'}, + 9: {'other': '0 milliard'}, + 12: {'other': '0 trillion'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0ming\u00A0\u00A4'}, + 6: {'other': '0\u00A0mln\u00A0\u00A4'}, + 9: {'other': '0\u00A0mlrd\u00A0\u00A4'}, + 12: {'other': '0\u00A0trln\u00A0\u00A4'}, + }), + // Compact number symbols for locale vi. + "vi": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0\u00A0N'}, + 6: {'other': '0\u00A0Tr'}, + 9: {'other': '0\u00A0T'}, + 12: {'other': '0\u00A0NT'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 ngh\u00ECn'}, + 6: {'other': '0 tri\u1EC7u'}, + 9: {'other': '0 t\u1EF7'}, + 12: {'other': '0 ngh\u00ECn t\u1EF7'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0\u00A0N\u00A0\u00A4'}, + 6: {'other': '0\u00A0Tr\u00A0\u00A4'}, + 9: {'other': '0\u00A0T\u00A0\u00A4'}, + 12: {'other': '0\u00A0NT\u00A0\u00A4'}, + }), + // Compact number symbols for locale zh. + "zh": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0\u4E07'}, + 8: {'other': '0\u4EBF'}, + 12: {'other': '0\u4E07\u4EBF'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0\u4E07'}, + 8: {'other': '0\u4EBF'}, + 12: {'other': '0\u4E07\u4EBF'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '\u00A40\u4E07'}, + 8: {'other': '\u00A40\u4EBF'}, + 12: {'other': '\u00A40\u4E07\u4EBF'}, + }), + // Compact number symbols for locale zh_CN. + "zh_CN": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0\u4E07'}, + 8: {'other': '0\u4EBF'}, + 12: {'other': '0\u4E07\u4EBF'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0\u4E07'}, + 8: {'other': '0\u4EBF'}, + 12: {'other': '0\u4E07\u4EBF'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '\u00A40\u4E07'}, + 8: {'other': '\u00A40\u4EBF'}, + 12: {'other': '\u00A40\u4E07\u4EBF'}, + }), + // Compact number symbols for locale zh_HK. + "zh_HK": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0\u842C'}, + 8: {'other': '0\u5104'}, + 12: {'other': '0\u5146'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: {'other': '\u00A40M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }), + // Compact number symbols for locale zh_TW. + "zh_TW": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0\u842C'}, + 8: {'other': '0\u5104'}, + 12: {'other': '0\u5146'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '0\u842C'}, + 8: {'other': '0\u5104'}, + 12: {'other': '0\u5146'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '0'}, + 4: {'other': '\u00A40\u842C'}, + 8: {'other': '\u00A40\u5104'}, + 12: {'other': '\u00A40\u5146'}, + }), + // Compact number symbols for locale zu. + "zu": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { + 3: {'other': '0K'}, + 6: {'other': '0M'}, + 9: {'other': '0B'}, + 12: {'other': '0T'}, + }, COMPACT_DECIMAL_LONG_PATTERN: const { + 3: {'other': '0 inkulungwane'}, + 6: {'other': '0 isigidi'}, + 9: {'other': '0 isigidi sezigidi'}, + 12: {'other': '0 isigidintathu'}, + }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { + 3: {'other': '\u00A40K'}, + 6: { + 'one': '\u00A40M', + 'other': '\u00A4\u00A00M', + }, + 8: {'other': '\u00A4000M'}, + 9: {'other': '\u00A40B'}, + 12: {'other': '\u00A40T'}, + }) +}; + +final currencyFractionDigits = { + "ADP": 0, + "AFN": 0, + "ALL": 0, + "AMD": 2, + "BHD": 3, + "BIF": 0, + "BYN": 2, + "BYR": 0, + "CAD": 2, + "CHF": 2, + "CLF": 4, + "CLP": 0, + "COP": 2, + "CRC": 2, + "CZK": 2, + "DEFAULT": 2, + "DJF": 0, + "DKK": 2, + "ESP": 0, + "GNF": 0, + "GYD": 2, + "HUF": 2, + "IDR": 2, + "IQD": 0, + "IRR": 0, + "ISK": 0, + "ITL": 0, + "JOD": 3, + "JPY": 0, + "KMF": 0, + "KPW": 0, + "KRW": 0, + "KWD": 3, + "LAK": 0, + "LBP": 0, + "LUF": 0, + "LYD": 3, + "MGA": 0, + "MGF": 0, + "MMK": 0, + "MNT": 2, + "MRO": 0, + "MUR": 2, + "NOK": 2, + "OMR": 3, + "PKR": 2, + "PYG": 0, + "RSD": 0, + "RWF": 0, + "SEK": 2, + "SLE": 2, + "SLL": 0, + "SOS": 0, + "STD": 0, + "SYP": 0, + "TMM": 0, + "TND": 3, + "TRL": 0, + "TWD": 2, + "TZS": 2, + "UGX": 0, + "UYI": 0, + "UYW": 4, + "UZS": 2, + "VEF": 2, + "VND": 0, + "VUV": 0, + "XAF": 0, + "XOF": 0, + "XPF": 0, + "YER": 0, + "ZMK": 0, + "ZWD": 0, +}; diff --git a/dart/lib/src/vendor/intl/plural_rules.dart b/dart/lib/src/vendor/intl/plural_rules.dart new file mode 100644 index 0000000000..282b5fa9a4 --- /dev/null +++ b/dart/lib/src/vendor/intl/plural_rules.dart @@ -0,0 +1,602 @@ +// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// Provides locale-specific plural rules. Based on pluralrules.js from Closure. +/// Follow java/com/google/i18n/tools/generators/README.md to generate js rules, +/// which can then be ported to dart. +/// +/// Each function does the calculation for one or more locales. These are done in terms of +/// various values used by the CLDR syntax and defined by UTS #35 +/// http://unicode.org/reports/tr35/tr35-numbers.html#Plural_rules_syntax +/// +/// * n - absolute value of the source number (integer and decimals). +/// * i - integer digits of n. +/// * v - number of visible fraction digits in n, with trailing zeros. +/// * w - number of visible fraction digits in n, without trailing zeros. +/// * f - visible fractional digits in n, with trailing zeros. +/// * t - visible fractional digits in n, without trailing zeros. +library plural_rules; + +// Suppress naming issues as changing them might be breaking. +// ignore_for_file: constant_identifier_names, non_constant_identifier_names + +import 'dart:math' as math; + +typedef PluralRule = PluralCase Function(); + +/// The possible cases used in a plural rule. +enum PluralCase { ZERO, ONE, TWO, FEW, MANY, OTHER } + +/// The default rule in case we don't have anything more specific for a locale. +PluralCase _default_rule() => OTHER; + +/// This must be called before evaluating a new rule, because we're using +/// library-global state to both keep the rules terse and minimize space. +void startRuleEvaluation(num howMany, [int? precision = 0]) { + _n = howMany; + _precision = precision; + _i = _n.round(); + _updateVF(_n); + _updateWT(_v, _f); +} + +/// The number whose [PluralCase] we are trying to find. +/// +// This is library-global state, along with the other variables. This allows us +// to avoid calculating parameters that the functions don't need and also +// not introduce a subclass per locale or have instance tear-offs which +// we can't cache. This is fine as long as these methods aren't async, which +// they should never be. +num _n = 0; + +/// The integer part of [_n] +int _i = 0; +int? _precision; + +/// Returns the number of digits in the fractional part of a number +/// (3.1416 => 4) +/// +/// Takes the item count [n] and uses [_precision]. +/// That's because a just looking at the value of a number is not enough to +/// decide the plural form. For example "1 dollar" vs "1.00 dollars", the +/// value is 1, but how it is formatted also matters. +int _decimals(num n) { + var str = _precision == null ? '$n' : n.toStringAsFixed(_precision!); + var result = str.indexOf('.'); + return (result == -1) ? 0 : str.length - result - 1; +} + +/// Calculates and sets the _v and _f as per CLDR plural rules. +/// +/// The short names for parameters / return match the CLDR syntax and UTS #35 +/// (https://unicode.org/reports/tr35/tr35-numbers.html#Plural_rules_syntax) +/// Takes the item count [n] and a [precision]. +void _updateVF(num n) { + var defaultDigits = 3; + + _v = _precision ?? math.min(_decimals(n), defaultDigits); + + var base = math.pow(10, _v) as int; + _f = (n * base).floor() % base; +} + +/// Calculates and sets _w and _t as per CLDR plural rules. +/// +/// The short names for parameters / return match the CLDR syntax and UTS #35 +/// (https://unicode.org/reports/tr35/tr35-numbers.html#Plural_rules_syntax) +/// @param v Calculated previously. +/// @param f Calculated previously. +void _updateWT(int v, int f) { + if (f == 0) { + // Unused, for now _w = 0; + _t = 0; + return; + } + + while ((f % 10) == 0) { + f = (f / 10).floor(); + v--; + } + + // Unused, for now _w = v; + _t = f; +} + +/// Number of visible fraction digits. +int _v = 0; + +/// Number of visible fraction digits without trailing zeros. +// Unused, for now int _w = 0; + +/// The visible fraction digits in n, with trailing zeros. +int _f = 0; + +/// The visible fraction digits in n, without trailing zeros. +int _t = 0; + +// An example, for precision n = 3.1415 and precision = 7) +// n : 3.1415 +// str n: 3.1415000 (the "formatted" n, 7 fractional digits) +// i : 3 (the integer part of n) +// f : 1415000 (the fractional part of n) +// v : 7 (how many digits in f) +// t : 1415 (f, without trailing 0s) +// w : 4 (how many digits in t) + +PluralCase get ZERO => PluralCase.ZERO; +PluralCase get ONE => PluralCase.ONE; +PluralCase get TWO => PluralCase.TWO; +PluralCase get FEW => PluralCase.FEW; +PluralCase get MANY => PluralCase.MANY; +PluralCase get OTHER => PluralCase.OTHER; + +PluralCase _fil_rule() { + if (_v == 0 && (_i == 1 || _i == 2 || _i == 3) || + _v == 0 && _i % 10 != 4 && _i % 10 != 6 && _i % 10 != 9 || + _v != 0 && _f % 10 != 4 && _f % 10 != 6 && _f % 10 != 9) { + return ONE; + } + return OTHER; +} + +PluralCase _br_rule() { + if (_n % 10 == 1 && _n % 100 != 11 && _n % 100 != 71 && _n % 100 != 91) { + return ONE; + } + if (_n % 10 == 2 && _n % 100 != 12 && _n % 100 != 72 && _n % 100 != 92) { + return TWO; + } + if ((_n % 10 >= 3 && _n % 10 <= 4 || _n % 10 == 9) && + (_n % 100 < 10 || _n % 100 > 19) && + (_n % 100 < 70 || _n % 100 > 79) && + (_n % 100 < 90 || _n % 100 > 99)) { + return FEW; + } + if (_n != 0 && _n % 1000000 == 0) { + return MANY; + } + return OTHER; +} + +PluralCase _sr_rule() { + if (_v == 0 && _i % 10 == 1 && _i % 100 != 11 || + _f % 10 == 1 && _f % 100 != 11) { + return ONE; + } + if (_v == 0 && + _i % 10 >= 2 && + _i % 10 <= 4 && + (_i % 100 < 12 || _i % 100 > 14) || + _f % 10 >= 2 && _f % 10 <= 4 && (_f % 100 < 12 || _f % 100 > 14)) { + return FEW; + } + return OTHER; +} + +PluralCase _hi_rule() { + if (_i == 0 || _n == 1) { + return ONE; + } + return OTHER; +} + +PluralCase _es_rule() { + if (_n == 1) { + return ONE; + } + return OTHER; +} + +PluralCase _hy_rule() { + if (_n >= 0 && _n <= 1.5) { + return ONE; + } + return OTHER; +} + +PluralCase _pt_rule() { + if (_n >= 0 && _n <= 2 && _n != 2) { + return ONE; + } + return OTHER; +} + +PluralCase _cs_rule() { + if (_i == 1 && _v == 0) { + return ONE; + } + if (_i >= 2 && _i <= 4 && _v == 0) { + return FEW; + } + if (_v != 0) { + return MANY; + } + return OTHER; +} + +PluralCase _pl_rule() { + if (_i == 1 && _v == 0) { + return ONE; + } + if (_v == 0 && + _i % 10 >= 2 && + _i % 10 <= 4 && + (_i % 100 < 12 || _i % 100 > 14)) { + return FEW; + } + if (_v == 0 && _i != 1 && _i % 10 >= 0 && _i % 10 <= 1 || + _v == 0 && _i % 10 >= 5 && _i % 10 <= 9 || + _v == 0 && _i % 100 >= 12 && _i % 100 <= 14) { + return MANY; + } + return OTHER; +} + +PluralCase _it_rule() { + if (_n == 1 && _v == 0) { + return ONE; + } + return OTHER; +} + +PluralCase _lv_rule() { + if (_n % 10 == 0 || + _n % 100 >= 11 && _n % 100 <= 19 || + _v == 2 && _f % 100 >= 11 && _f % 100 <= 19) { + return ZERO; + } + if (_n % 10 == 1 && _n % 100 != 11 || + _v == 2 && _f % 10 == 1 && _f % 100 != 11 || + _v != 2 && _f % 10 == 1) { + return ONE; + } + return OTHER; +} + +PluralCase _he_rule() { + if (_i == 1 && _v == 0) { + return ONE; + } + if (_i == 2 && _v == 0) { + return TWO; + } + if (_v == 0 && (_n < 0 || _n > 10) && _n % 10 == 0) { + return MANY; + } + return OTHER; +} + +PluralCase _mt_rule() { + if (_n == 1) { + return ONE; + } + if (_n == 0 || _n % 100 >= 2 && _n % 100 <= 10) { + return FEW; + } + if (_n % 100 >= 11 && _n % 100 <= 19) { + return MANY; + } + return OTHER; +} + +PluralCase _si_rule() { + if ((_n == 0 || _n == 1) || _i == 0 && _f == 1) { + return ONE; + } + return OTHER; +} + +PluralCase _cy_rule() { + if (_n == 0) { + return ZERO; + } + if (_n == 1) { + return ONE; + } + if (_n == 2) { + return TWO; + } + if (_n == 3) { + return FEW; + } + if (_n == 6) { + return MANY; + } + return OTHER; +} + +PluralCase _da_rule() { + if (_n == 1 || _t != 0 && (_i == 0 || _i == 1)) { + return ONE; + } + return OTHER; +} + +PluralCase _ru_rule() { + if (_v == 0 && _i % 10 == 1 && _i % 100 != 11) { + return ONE; + } + if (_v == 0 && + _i % 10 >= 2 && + _i % 10 <= 4 && + (_i % 100 < 12 || _i % 100 > 14)) { + return FEW; + } + if (_v == 0 && _i % 10 == 0 || + _v == 0 && _i % 10 >= 5 && _i % 10 <= 9 || + _v == 0 && _i % 100 >= 11 && _i % 100 <= 14) { + return MANY; + } + return OTHER; +} + +PluralCase _be_rule() { + if (_v != 0) { + return OTHER; + } + if (_n % 10 == 1 && _n % 100 != 11) { + return ONE; + } + if (_n % 10 >= 2 && _n % 10 <= 4 && (_n % 100 < 12 || _n % 100 > 14)) { + return FEW; + } + if (_n % 10 == 0 || + _n % 10 >= 5 && _n % 10 <= 9 || + _n % 100 >= 11 && _n % 100 <= 14) { + return MANY; + } + return OTHER; +} + +PluralCase _fr_rule() { + if (_n >= 0 && _n <= 1.5) { + return ONE; + } + return OTHER; +} + +PluralCase _ga_rule() { + if (_v != 0) { + return OTHER; + } + if (_n == 1) { + return ONE; + } + if (_n == 2) { + return TWO; + } + if (_n >= 3 && _n <= 6) { + return FEW; + } + if (_n >= 7 && _n <= 10) { + return MANY; + } + return OTHER; +} + +PluralCase _af_rule() { + if (_i == 1 && _v == 0) { + return ONE; + } + return OTHER; +} + +PluralCase _mk_rule() { + if (_v == 0 && _i % 10 == 1 || _f % 10 == 1) { + return ONE; + } + return OTHER; +} + +PluralCase _is_rule() { + if (_t == 0 && _i % 10 == 1 && _i % 100 != 11 || _t != 0) { + return ONE; + } + return OTHER; +} + +PluralCase _ro_rule() { + if (_i == 1 && _v == 0) { + return ONE; + } + if (_v != 0 || _n == 0 || _n != 1 && _n % 100 >= 1 && _n % 100 <= 19) { + return FEW; + } + return OTHER; +} + +PluralCase _ar_rule() { + if (_v != 0) { + return OTHER; + } + if (_n == 1) { + return ZERO; + } + if (_n == 1) { + return ONE; + } + if (_n == 2) { + return TWO; + } + if (_n % 100 >= 3 && _n % 100 <= 10) { + return FEW; + } + if (_n % 100 >= 11 && _n % 100 <= 99) { + return MANY; + } + return OTHER; +} + +PluralCase _sl_rule() { + if (_v == 0 && _i % 100 == 1) { + return ONE; + } + if (_v == 0 && _i % 100 == 2) { + return TWO; + } + if (_v == 0 && _i % 100 >= 3 && _i % 100 <= 4 || _v != 0) { + return FEW; + } + return OTHER; +} + +PluralCase _lt_rule() { + if (_v == 0 && _n % 10 == 1 && (_n % 100 < 11 || _n % 100 > 19)) { + return ONE; + } + if (_v == 0 && + _n % 10 >= 2 && + _n % 10 <= 9 && + (_n % 100 < 11 || _n % 100 > 19)) { + return FEW; + } + if (_f != 0) { + return MANY; + } + return OTHER; +} + +PluralCase _en_rule() { + if (_i == 1 && _v == 0) { + return ONE; + } + return OTHER; +} + +PluralCase _ln_rule() { + if (_v == 00 && (_i == 0 || _i == 1)) { + return ONE; + } + return OTHER; +} + +/// Selected Plural rules by locale. +final pluralRules = { + 'en_ISO': _en_rule, + 'af': _af_rule, + 'am': _hi_rule, + 'ar': _ar_rule, + 'ar_DZ': _ar_rule, + 'ar_EG': _ar_rule, + 'as': _hi_rule, + 'az': _af_rule, + 'be': _be_rule, + 'bg': _af_rule, + 'bm': _default_rule, + 'bn': _hi_rule, + 'br': _br_rule, + 'bs': _sr_rule, + 'ca': _en_rule, + 'chr': _af_rule, + 'cs': _cs_rule, + 'cy': _cy_rule, + 'da': _da_rule, + 'de': _en_rule, + 'de_AT': _en_rule, + 'de_CH': _en_rule, + 'el': _af_rule, + 'en': _en_rule, + 'en_AU': _en_rule, + 'en_CA': _en_rule, + 'en_GB': _en_rule, + 'en_IE': _en_rule, + 'en_IN': _en_rule, + 'en_MY': _en_rule, + 'en_NZ': _en_rule, + 'en_SG': _en_rule, + 'en_US': _en_rule, + 'en_ZA': _en_rule, + 'es': _es_rule, + 'es_419': _es_rule, + 'es_ES': _es_rule, + 'es_MX': _es_rule, + 'es_US': _es_rule, + 'et': _en_rule, + 'eu': _af_rule, + 'fa': _hi_rule, + 'fi': _en_rule, + 'fil': _fil_rule, + 'fr': _fr_rule, + 'fr_CA': _fr_rule, + 'fr_CH': _fr_rule, + 'fur': _af_rule, + 'ga': _ga_rule, + 'gl': _en_rule, + 'gsw': _af_rule, + 'gu': _hi_rule, + 'haw': _af_rule, + 'he': _he_rule, + 'hi': _hi_rule, + 'hr': _sr_rule, + 'hu': _af_rule, + 'hy': _hy_rule, + 'id': _default_rule, + 'in': _default_rule, + 'is': _is_rule, + 'it': _it_rule, + 'it_CH': _it_rule, + 'iw': _he_rule, + 'ja': _default_rule, + 'ka': _af_rule, + 'kk': _af_rule, + 'km': _default_rule, + 'kn': _hi_rule, + 'ko': _default_rule, + 'ky': _af_rule, + 'ln': _ln_rule, + 'lo': _default_rule, + 'lt': _lt_rule, + 'lv': _lv_rule, + 'mg': _ln_rule, + 'mk': _mk_rule, + 'ml': _af_rule, + 'mn': _af_rule, + 'mo': _ro_rule, + 'mr': _af_rule, + 'ms': _default_rule, + 'mt': _mt_rule, + 'my': _default_rule, + 'nb': _af_rule, + 'ne': _af_rule, + 'nl': _en_rule, + 'no': _af_rule, + 'no_NO': _af_rule, + 'nyn': _af_rule, + 'or': _af_rule, + 'pa': _ln_rule, + 'pl': _pl_rule, + 'ps': _af_rule, + 'pt': _pt_rule, + 'pt_BR': _pt_rule, + 'pt_PT': _it_rule, + 'ro': _ro_rule, + 'ru': _ru_rule, + 'sh': _sr_rule, + 'si': _si_rule, + 'sk': _cs_rule, + 'sl': _sl_rule, + 'sq': _af_rule, + 'sr': _sr_rule, + 'sr_Latn': _sr_rule, + 'sv': _en_rule, + 'sw': _en_rule, + 'ta': _af_rule, + 'te': _af_rule, + 'th': _default_rule, + 'tl': _fil_rule, + 'tr': _af_rule, + 'uk': _ru_rule, + 'ur': _en_rule, + 'uz': _af_rule, + 'vi': _default_rule, + 'zh': _default_rule, + 'zh_CN': _default_rule, + 'zh_HK': _default_rule, + 'zh_TW': _default_rule, + 'zu': _hi_rule, + 'default': _default_rule +}; + +/// Do we have plural rules specific to [locale] +bool localeHasPluralRules(String locale) => pluralRules.containsKey(locale); diff --git a/dart/lib/src/vendor/intl/string_stack.dart b/dart/lib/src/vendor/intl/string_stack.dart new file mode 100644 index 0000000000..c428b126a2 --- /dev/null +++ b/dart/lib/src/vendor/intl/string_stack.dart @@ -0,0 +1,49 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:math'; + +import 'package:meta/meta.dart'; + +/// An indexed position in a String which can read by specified character +/// counts, or read digits up to a delimiter. +class StringStack { + final String contents; + int _index = 0; + + StringStack(this.contents); + + bool get atStart => _index == 0; + + bool get atEnd => _index >= contents.length; + + String next() => contents[_index++]; + + /// Advance the index by [n]. + void pop([int n = 1]) => _index += n; + + /// Return the next [n] characters, or as many as there are remaining, + /// and advance the index. + String read([int n = 1]) { + var result = peek(n); + pop(n); + return result; + } + + /// Returns whether the input starts with [pattern] from the current index. + bool startsWith(String pattern) => contents.startsWith(pattern, _index); + + /// Return the next [howMany] characters, or as many as there are remaining, + /// without advancing the index. + String peek([int howMany = 1]) => + contents.substring(_index, min(_index + howMany, contents.length)); + + /// Return the remaining contents of the String, without advancing the index. + String peekAll() => peek(contents.length - _index); + + @override + String toString() { + return '$contents at $_index'; + } +} diff --git a/dart/test/utils/sample_rate_format_test.dart b/dart/test/vendor/intl/number_format_test.dart similarity index 86% rename from dart/test/utils/sample_rate_format_test.dart rename to dart/test/vendor/intl/number_format_test.dart index fccff4d005..1f3e529047 100644 --- a/dart/test/utils/sample_rate_format_test.dart +++ b/dart/test/vendor/intl/number_format_test.dart @@ -1,4 +1,4 @@ -import 'package:sentry/src/utils/sample_rate_format.dart'; +import 'package:sentry/src/vendor/intl/number_format.dart'; import 'package:test/test.dart'; void main() { @@ -27,7 +27,7 @@ void main() { ]; for (var inputAndOutput in inputsAndOutputs) { - expect(SampleRateFormat.format(inputAndOutput.i), inputAndOutput.o); + expect(NumberFormat('#.################').format(inputAndOutput.i), inputAndOutput.o); } }); } From 0303d1d166c38b9ec6b619192fa9e426c69c268a Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 20 Feb 2023 11:15:45 +0100 Subject: [PATCH 06/29] run format --- dart/lib/src/sentry_tracer.dart | 4 +- .../vendor/intl/compact_number_format.dart | 34 +++++++------- dart/lib/src/vendor/intl/intl_helpers.dart | 4 +- dart/lib/src/vendor/intl/number_format.dart | 32 +++++++------- .../src/vendor/intl/number_format_parser.dart | 24 +++++----- dart/lib/src/vendor/intl/number_parser.dart | 32 +++++++------- dart/lib/src/vendor/intl/number_symbols.dart | 34 +++++++------- .../src/vendor/intl/number_symbols_data.dart | 44 +++++++++---------- dart/lib/src/vendor/intl/plural_rules.dart | 6 +-- dart/lib/src/vendor/intl/string_stack.dart | 2 - dart/test/vendor/intl/number_format_test.dart | 3 +- 11 files changed, 110 insertions(+), 109 deletions(-) diff --git a/dart/lib/src/sentry_tracer.dart b/dart/lib/src/sentry_tracer.dart index 3d896ae8d3..a22631e1c7 100644 --- a/dart/lib/src/sentry_tracer.dart +++ b/dart/lib/src/sentry_tracer.dart @@ -346,7 +346,9 @@ class SentryTracer extends ISentrySpan { if (!isValidSampleRate(sampleRate)) { return null; } - return sampleRate != null ? NumberFormat("#.################").format(sampleRate) : null; + return sampleRate != null + ? NumberFormat("#.################").format(sampleRate) + : null; } bool _isHighQualityTransactionName(SentryTransactionNameSource source) { diff --git a/dart/lib/src/vendor/intl/compact_number_format.dart b/dart/lib/src/vendor/intl/compact_number_format.dart index af2012ccc3..715b472c0a 100644 --- a/dart/lib/src/vendor/intl/compact_number_format.dart +++ b/dart/lib/src/vendor/intl/compact_number_format.dart @@ -140,12 +140,12 @@ class _CompactStyleWithNegative extends _CompactStyleBase { class _CompactStyle extends _CompactStyleBase { _CompactStyle( {this.pattern, - this.divisor = 1, - this.positivePrefix = '', - this.negativePrefix = '', - this.positiveSuffix = '', - this.negativeSuffix = '', - this.isDirectValue = false}); + this.divisor = 1, + this.positivePrefix = '', + this.negativePrefix = '', + this.positiveSuffix = '', + this.negativeSuffix = '', + this.isDirectValue = false}); /// The pattern on which this is based. /// @@ -220,9 +220,9 @@ class _CompactStyle extends _CompactStyleBase { } final positivePrefix = - (explicitSign && !isSigned) ? '${symbols.PLUS_SIGN}$prefix' : prefix; + (explicitSign && !isSigned) ? '${symbols.PLUS_SIGN}$prefix' : prefix; final negativePrefix = - (!isSigned) ? '${symbols.MINUS_SIGN}$prefix' : prefix; + (!isSigned) ? '${symbols.MINUS_SIGN}$prefix' : prefix; final positiveSuffix = suffix; final negativeSuffix = suffix; @@ -256,14 +256,14 @@ class _CompactNumberFormat extends NumberFormat { factory _CompactNumberFormat( {String? locale, - _CompactFormatType? formatType, - String? name, - String? currencySymbol, - String? Function(NumberSymbols) getPattern = _forDecimal, - int? decimalDigits, - bool explicitSign = false, - bool lookupSimpleCurrencySymbol = false, - bool isForCurrency = false}) { + _CompactFormatType? formatType, + String? name, + String? currencySymbol, + String? Function(NumberSymbols) getPattern = _forDecimal, + int? decimalDigits, + bool explicitSign = false, + bool lookupSimpleCurrencySymbol = false, + bool isForCurrency = false}) { // Initialization copied from `NumberFormat` constructor. // TODO(davidmorgan): deduplicate. locale = helpers.verifiedLocale(locale, NumberFormat.localeExists, null)!; @@ -378,7 +378,7 @@ class _CompactNumberFormat extends NumberFormat { this._styles, this._explicitSign) : super._(currencyName, currencySymbol, isForCurrency, locale, localeZero, - pattern, symbols, zeroOffset, result) { + pattern, symbols, zeroOffset, result) { significantDigits = 3; turnOffGrouping(); } diff --git a/dart/lib/src/vendor/intl/intl_helpers.dart b/dart/lib/src/vendor/intl/intl_helpers.dart index f58e1b2bba..bb9687e406 100644 --- a/dart/lib/src/vendor/intl/intl_helpers.dart +++ b/dart/lib/src/vendor/intl/intl_helpers.dart @@ -45,7 +45,7 @@ class UninitializedLocaleData implements MessageLookup { if (throwOnFallback && _badMessages.isNotEmpty) { throw StateError( 'The following messages were called before locale initialization:' - ' $_uninitializedMessages'); + ' $_uninitializedMessages'); } } @@ -108,7 +108,7 @@ abstract class LocaleDataReader { /// by the implementing package so that we're not dependent on its /// implementation. MessageLookup messageLookup = -UninitializedLocaleData('initializeMessages()', null); + UninitializedLocaleData('initializeMessages()', null); /// Initialize the message lookup mechanism. This is for internal use only. /// User applications should import `message_lookup_by_library.dart` and call diff --git a/dart/lib/src/vendor/intl/number_format.dart b/dart/lib/src/vendor/intl/number_format.dart index 2987bb10db..b0c5e5dde7 100644 --- a/dart/lib/src/vendor/intl/number_format.dart +++ b/dart/lib/src/vendor/intl/number_format.dart @@ -208,7 +208,7 @@ class NumberFormat { /// Create a number format that prints as DECIMAL_PATTERN. factory NumberFormat.decimalPatternDigits( - {String? locale, int? decimalDigits}) => + {String? locale, int? decimalDigits}) => NumberFormat._forPattern(locale, (x) => x.DECIMAL_PATTERN, decimalDigits: decimalDigits); @@ -218,7 +218,7 @@ class NumberFormat { /// Create a number format that prints as PERCENT_PATTERN. factory NumberFormat.decimalPercentPattern( - {String? locale, int? decimalDigits}) => + {String? locale, int? decimalDigits}) => NumberFormat._forPattern(locale, (x) => x.PERCENT_PATTERN, decimalDigits: decimalDigits); @@ -287,11 +287,11 @@ class NumberFormat { /// unsupported formats (e.g. accounting format for currencies.) // TODO(alanknight): Should we allow decimalDigits on other numbers. factory NumberFormat.currency( - {String? locale, - String? name, - String? symbol, - int? decimalDigits, - String? customPattern}) => + {String? locale, + String? name, + String? symbol, + int? decimalDigits, + String? customPattern}) => NumberFormat._forPattern( locale, (x) => customPattern ?? x.CURRENCY_PATTERN, name: name, @@ -355,10 +355,10 @@ class NumberFormat { /// information, typically the verified locale. factory NumberFormat._forPattern(String? locale, _PatternGetter getPattern, {String? name, - String? currencySymbol, - int? decimalDigits, - bool lookupSimpleCurrencySymbol = false, - bool isForCurrency = false}) { + String? currencySymbol, + int? decimalDigits, + bool lookupSimpleCurrencySymbol = false, + bool isForCurrency = false}) { locale = helpers.verifiedLocale(locale, localeExists, null)!; var symbols = numberFormatSymbols[locale] as NumberSymbols; var localeZero = symbols.ZERO_DIGIT.codeUnitAt(0); @@ -675,9 +675,9 @@ class NumberFormat { var integerLength = number == 0 ? 1 : integerPart != 0 - ? numberOfIntegerDigits(integerPart) - // We might need to add digits after decimal point. - : (log(fraction) / ln10).ceil(); + ? numberOfIntegerDigits(integerPart) + // We might need to add digits after decimal point. + : (log(fraction) / ln10).ceil(); if (minimumSignificantDigits != null) { var remainingSignificantDigits = @@ -801,7 +801,7 @@ class NumberFormat { var extra = extraIntegerDigits == 0 ? '' : extraIntegerDigits.toString(); var intDigits = _mainIntegerDigits(integerPart); var paddedExtra = - intDigits.isEmpty ? extra : extra.padLeft(_multiplierDigits, '0'); + intDigits.isEmpty ? extra : extra.padLeft(_multiplierDigits, '0'); return '$intDigits$paddedExtra$paddingDigits'; } @@ -827,7 +827,7 @@ class NumberFormat { void _formatFractionPart(String fractionPart, int minDigits) { var fractionLength = fractionPart.length; while (fractionPart.codeUnitAt(fractionLength - 1) == - constants.asciiZeroCodeUnit && + constants.asciiZeroCodeUnit && fractionLength > minDigits + 1) { fractionLength--; } diff --git a/dart/lib/src/vendor/intl/number_format_parser.dart b/dart/lib/src/vendor/intl/number_format_parser.dart index 8e1d232885..8dc602b418 100644 --- a/dart/lib/src/vendor/intl/number_format_parser.dart +++ b/dart/lib/src/vendor/intl/number_format_parser.dart @@ -92,25 +92,25 @@ class NumberFormatParser { pattern = StringStack(input); static NumberFormatParseResult parse( - NumberSymbols symbols, - String? input, - bool isForCurrency, - String currencySymbol, - String currencyName, - int? decimalDigits) => + NumberSymbols symbols, + String? input, + bool isForCurrency, + String currencySymbol, + String currencyName, + int? decimalDigits) => input == null ? NumberFormatParseResult(symbols, decimalDigits) : (NumberFormatParser(symbols, input, isForCurrency, currencySymbol, - currencyName, decimalDigits) - .._parse()) - .result; + currencyName, decimalDigits) + .._parse()) + .result; /// For currencies, the default number of decimal places to use in /// formatting. Defaults to two for non-currencies or currencies where it's /// not specified. int get _defaultDecimalDigits => currencyFractionDigits[currencyName.toUpperCase()] ?? - currencyFractionDigits['DEFAULT']!; + currencyFractionDigits['DEFAULT']!; /// Parse the input pattern and update [result]. void _parse() { @@ -190,7 +190,7 @@ class NumberFormatParser { case PATTERN_SEPARATOR: return false; case PATTERN_CURRENCY_SIGN: - // TODO(alanknight): Handle the local/global/portable currency signs + // TODO(alanknight): Handle the local/global/portable currency signs affix.write(currencySymbol); break; case PATTERN_PERCENT: @@ -250,7 +250,7 @@ class NumberFormatParser { var totalDigits = digitLeftCount + zeroDigitCount + digitRightCount; result.maximumFractionDigits = - decimalPos >= 0 ? totalDigits - decimalPos : 0; + decimalPos >= 0 ? totalDigits - decimalPos : 0; if (decimalPos >= 0) { result.minimumFractionDigits = digitLeftCount + zeroDigitCount - decimalPos; diff --git a/dart/lib/src/vendor/intl/number_parser.dart b/dart/lib/src/vendor/intl/number_parser.dart index d5e1ecb669..6ecd5ce838 100644 --- a/dart/lib/src/vendor/intl/number_parser.dart +++ b/dart/lib/src/vendor/intl/number_parser.dart @@ -81,22 +81,22 @@ class NumberParser { Map? _replacements; Map _initializeReplacements() => { - symbols.DECIMAL_SEP: () => '.', - symbols.EXP_SYMBOL: () => 'E', - symbols.GROUP_SEP: handleSpace, - symbols.PERCENT: () { - scale = NumberFormatParser.PERCENT_SCALE; - return ''; - }, - symbols.PERMILL: () { - scale = NumberFormatParser.PER_MILLE_SCALE; - return ''; - }, - ' ': handleSpace, - '\u00a0': handleSpace, - '+': () => '+', - '-': () => '-', - }; + symbols.DECIMAL_SEP: () => '.', + symbols.EXP_SYMBOL: () => 'E', + symbols.GROUP_SEP: handleSpace, + symbols.PERCENT: () { + scale = NumberFormatParser.PERCENT_SCALE; + return ''; + }, + symbols.PERMILL: () { + scale = NumberFormatParser.PER_MILLE_SCALE; + return ''; + }, + ' ': handleSpace, + '\u00a0': handleSpace, + '+': () => '+', + '-': () => '-', + }; void invalidFormat() => throw FormatException('Invalid number: ${input.contents}'); diff --git a/dart/lib/src/vendor/intl/number_symbols.dart b/dart/lib/src/vendor/intl/number_symbols.dart index bce154bb7a..b16156e3d9 100644 --- a/dart/lib/src/vendor/intl/number_symbols.dart +++ b/dart/lib/src/vendor/intl/number_symbols.dart @@ -30,21 +30,21 @@ class NumberSymbols { const NumberSymbols( {required this.NAME, - required this.DECIMAL_SEP, - required this.GROUP_SEP, - required this.PERCENT, - required this.ZERO_DIGIT, - required this.PLUS_SIGN, - required this.MINUS_SIGN, - required this.EXP_SYMBOL, - required this.PERMILL, - required this.INFINITY, - required this.NAN, - required this.DECIMAL_PATTERN, - required this.SCIENTIFIC_PATTERN, - required this.PERCENT_PATTERN, - required this.CURRENCY_PATTERN, - required this.DEF_CURRENCY_CODE}); + required this.DECIMAL_SEP, + required this.GROUP_SEP, + required this.PERCENT, + required this.ZERO_DIGIT, + required this.PLUS_SIGN, + required this.MINUS_SIGN, + required this.EXP_SYMBOL, + required this.PERMILL, + required this.INFINITY, + required this.NAN, + required this.DECIMAL_PATTERN, + required this.SCIENTIFIC_PATTERN, + required this.PERCENT_PATTERN, + required this.CURRENCY_PATTERN, + required this.DEF_CURRENCY_CODE}); @override String toString() => NAME; @@ -60,6 +60,6 @@ class CompactNumberSymbols { final Map> COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN; CompactNumberSymbols( {required this.COMPACT_DECIMAL_SHORT_PATTERN, - this.COMPACT_DECIMAL_LONG_PATTERN, - required this.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN}); + this.COMPACT_DECIMAL_LONG_PATTERN, + required this.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN}); } diff --git a/dart/lib/src/vendor/intl/number_symbols_data.dart b/dart/lib/src/vendor/intl/number_symbols_data.dart index 9b0ea379d3..b8ce1fc1cb 100644 --- a/dart/lib/src/vendor/intl/number_symbols_data.dart +++ b/dart/lib/src/vendor/intl/number_symbols_data.dart @@ -976,7 +976,7 @@ final Map numberFormatSymbols = { SCIENTIFIC_PATTERN: '#E0', PERCENT_PATTERN: '#,##0%', CURRENCY_PATTERN: - '\u200F#,##0.00\u00A0\u00A4;\u200F-#,##0.00\u00A0\u00A4', + '\u200F#,##0.00\u00A0\u00A4;\u200F-#,##0.00\u00A0\u00A4', DEF_CURRENCY_CODE: 'ILS'), // Number formatting symbols for locale hi. "hi": new NumberSymbols( @@ -1157,7 +1157,7 @@ final Map numberFormatSymbols = { SCIENTIFIC_PATTERN: '#E0', PERCENT_PATTERN: '#,##0%', CURRENCY_PATTERN: - '\u200F#,##0.00\u00A0\u00A4;\u200F-#,##0.00\u00A0\u00A4', + '\u200F#,##0.00\u00A0\u00A4;\u200F-#,##0.00\u00A0\u00A4', DEF_CURRENCY_CODE: 'ILS'), // Number formatting symbols for locale ja. "ja": new NumberSymbols( @@ -1190,7 +1190,7 @@ final Map numberFormatSymbols = { PERMILL: '\u2030', INFINITY: '\u221E', NAN: - '\u10D0\u10E0\u00A0\u10D0\u10E0\u10D8\u10E1\u00A0\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8', + '\u10D0\u10E0\u00A0\u10D0\u10E0\u10D8\u10E1\u00A0\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8', DECIMAL_PATTERN: '#,##0.###', SCIENTIFIC_PATTERN: '#E0', PERCENT_PATTERN: '#,##0%', @@ -1317,7 +1317,7 @@ final Map numberFormatSymbols = { PERMILL: '\u2030', INFINITY: '\u221E', NAN: - '\u0E9A\u0ECD\u0EC8\u200B\u0EC1\u0EA1\u0EC8\u0E99\u200B\u0EC2\u0E95\u200B\u0EC0\u0EA5\u0E81', + '\u0E9A\u0ECD\u0EC8\u200B\u0EC1\u0EA1\u0EC8\u0E99\u200B\u0EC2\u0E95\u200B\u0EC0\u0EA5\u0E81', DECIMAL_PATTERN: '#,##0.###', SCIENTIFIC_PATTERN: '#', PERCENT_PATTERN: '#,##0%', @@ -1498,7 +1498,7 @@ final Map numberFormatSymbols = { PERMILL: '\u2030', INFINITY: '\u221E', NAN: - '\u1002\u100F\u1014\u103A\u1038\u1019\u101F\u102F\u1010\u103A\u101E\u1031\u102C', + '\u1002\u100F\u1014\u103A\u1038\u1019\u101F\u102F\u1010\u103A\u101E\u1031\u102C', DECIMAL_PATTERN: '#,##0.###', SCIENTIFIC_PATTERN: '#E0', PERCENT_PATTERN: '#,##0%', @@ -2356,7 +2356,7 @@ Map compactNumberSymbols = { }, 12: { 'other': - '\u00A4\u00A00\u00A0\u09B6\u09A4\u00A0\u09AA\u09F0\u09BE\u09F0\u09CD\u09A6\u09CD\u09A7' + '\u00A4\u00A00\u00A0\u09B6\u09A4\u00A0\u09AA\u09F0\u09BE\u09F0\u09CD\u09A6\u09CD\u09A7' }, }), // Compact number symbols for locale az. @@ -2868,33 +2868,33 @@ Map compactNumberSymbols = { 4: {'other': '00 \u03C7\u03B9\u03BB\u03B9\u03AC\u03B4\u03B5\u03C2'}, 6: { 'one': - '0 \u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03BF', + '0 \u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03BF', 'other': - '0 \u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1', + '0 \u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1', }, 7: { 'other': - '00 \u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1' + '00 \u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1' }, 9: { 'one': - '0 \u03B4\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03BF', + '0 \u03B4\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03BF', 'other': - '0 \u03B4\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1', + '0 \u03B4\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1', }, 10: { 'other': - '00 \u03B4\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1' + '00 \u03B4\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1' }, 12: { 'one': - '0 \u03C4\u03C1\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03BF', + '0 \u03C4\u03C1\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03BF', 'other': - '0 \u03C4\u03C1\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1', + '0 \u03C4\u03C1\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1', }, 13: { 'other': - '00 \u03C4\u03C1\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1' + '00 \u03C4\u03C1\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1' }, }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { 3: {'other': '0\u00A0\u03C7\u03B9\u03BB.\u00A0\u00A4'}, @@ -3272,7 +3272,7 @@ Map compactNumberSymbols = { 9: {'other': '0 \u0645\u06CC\u0644\u06CC\u0627\u0631\u062F'}, 12: { 'other': - '0 \u0647\u0632\u0627\u0631\u0645\u06CC\u0644\u06CC\u0627\u0631\u062F' + '0 \u0647\u0632\u0627\u0631\u0645\u06CC\u0644\u06CC\u0627\u0631\u062F' }, }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { 3: {'other': '0\u00A0\u0647\u0632\u0627\u0631\u00A0\u00A4'}, @@ -3282,7 +3282,7 @@ Map compactNumberSymbols = { }, 12: { 'other': - '0\u00A0\u0647\u0632\u0627\u0631\u0645\u06CC\u0644\u06CC\u0627\u0631\u062F\u00A0\u00A4' + '0\u00A0\u0647\u0632\u0627\u0631\u0645\u06CC\u0644\u06CC\u0627\u0631\u062F\u00A0\u00A4' }, }), // Compact number symbols for locale fi. @@ -4280,11 +4280,11 @@ Map compactNumberSymbols = { 9: {'other': '\u00A4\u00A0\u1000\u102F\u100B\u1031000'}, 11: { 'other': - '\u00A4\u00A0\u1000\u102F\u100B\u10310\u101E\u1031\u102C\u1004\u103A\u1038' + '\u00A4\u00A0\u1000\u102F\u100B\u10310\u101E\u1031\u102C\u1004\u103A\u1038' }, 12: { 'other': - '\u00A4\u00A0\u1000\u102F\u100B\u10310\u101E\u102D\u1014\u103A\u1038' + '\u00A4\u00A0\u1000\u102F\u100B\u10310\u101E\u102D\u1014\u103A\u1038' }, 13: { 'other': '\u00A4\u00A0\u1000\u102F\u100B\u10310\u101E\u1014\u103A\u1038' @@ -4965,7 +4965,7 @@ Map compactNumberSymbols = { 9: {'other': '0 \u0BAA\u0BBF\u0BB2\u0BCD\u0BB2\u0BBF\u0BAF\u0BA9\u0BCD'}, 12: { 'other': - '0 \u0B9F\u0BBF\u0BB0\u0BBF\u0BB2\u0BCD\u0BB2\u0BBF\u0BAF\u0BA9\u0BCD' + '0 \u0B9F\u0BBF\u0BB0\u0BBF\u0BB2\u0BCD\u0BB2\u0BBF\u0BAF\u0BA9\u0BCD' }, }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { 3: {'other': '\u00A4\u00A00\u0B86'}, @@ -5006,11 +5006,11 @@ Map compactNumberSymbols = { 12: { 'one': '0 \u0C1F\u0C4D\u0C30\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D', 'other': - '0 \u0C1F\u0C4D\u0C30\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41', + '0 \u0C1F\u0C4D\u0C30\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41', }, 13: { 'other': - '00 \u0C1F\u0C4D\u0C30\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41' + '00 \u0C1F\u0C4D\u0C30\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41' }, }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { 3: {'other': '\u00A40\u0C35\u0C47'}, diff --git a/dart/lib/src/vendor/intl/plural_rules.dart b/dart/lib/src/vendor/intl/plural_rules.dart index 282b5fa9a4..c11b6da01e 100644 --- a/dart/lib/src/vendor/intl/plural_rules.dart +++ b/dart/lib/src/vendor/intl/plural_rules.dart @@ -165,9 +165,9 @@ PluralCase _sr_rule() { return ONE; } if (_v == 0 && - _i % 10 >= 2 && - _i % 10 <= 4 && - (_i % 100 < 12 || _i % 100 > 14) || + _i % 10 >= 2 && + _i % 10 <= 4 && + (_i % 100 < 12 || _i % 100 > 14) || _f % 10 >= 2 && _f % 10 <= 4 && (_f % 100 < 12 || _f % 100 > 14)) { return FEW; } diff --git a/dart/lib/src/vendor/intl/string_stack.dart b/dart/lib/src/vendor/intl/string_stack.dart index c428b126a2..90ce5e793f 100644 --- a/dart/lib/src/vendor/intl/string_stack.dart +++ b/dart/lib/src/vendor/intl/string_stack.dart @@ -4,8 +4,6 @@ import 'dart:math'; -import 'package:meta/meta.dart'; - /// An indexed position in a String which can read by specified character /// counts, or read digits up to a delimiter. class StringStack { diff --git a/dart/test/vendor/intl/number_format_test.dart b/dart/test/vendor/intl/number_format_test.dart index 1f3e529047..f19fb00e6b 100644 --- a/dart/test/vendor/intl/number_format_test.dart +++ b/dart/test/vendor/intl/number_format_test.dart @@ -27,7 +27,8 @@ void main() { ]; for (var inputAndOutput in inputsAndOutputs) { - expect(NumberFormat('#.################').format(inputAndOutput.i), inputAndOutput.o); + expect(NumberFormat('#.################').format(inputAndOutput.i), + inputAndOutput.o); } }); } From 5031f2ce6a24c12b71a9bba45bbdf6543d780e1b Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 13 Mar 2023 09:56:41 +0100 Subject: [PATCH 07/29] remove unused codepath --- dart/lib/src/vendor/intl/number_format.dart | 58 +-------------------- 1 file changed, 1 insertion(+), 57 deletions(-) diff --git a/dart/lib/src/vendor/intl/number_format.dart b/dart/lib/src/vendor/intl/number_format.dart index b0c5e5dde7..20ed8beaa5 100644 --- a/dart/lib/src/vendor/intl/number_format.dart +++ b/dart/lib/src/vendor/intl/number_format.dart @@ -73,8 +73,6 @@ class NumberFormat { /// Set to true if the format has explicitly set the grouping size. final bool _decimalSeparatorAlwaysShown; - final bool _useSignForPositiveExponent; - final bool _useExponentialNotation; /// Explicitly store if we are a currency format, and so should use the /// appropriate number of decimal digits for a currency. @@ -400,7 +398,6 @@ class NumberFormat { negativeSuffix = result.negativeSuffix, multiplier = result.multiplier, _multiplierDigits = result.multiplierDigits, - _useExponentialNotation = result.useExponentialNotation, minimumExponentDigits = result.minimumExponentDigits, maximumIntegerDigits = result.maximumIntegerDigits, minimumIntegerDigits = result.minimumIntegerDigits, @@ -408,7 +405,6 @@ class NumberFormat { _minimumFractionDigits = result.minimumFractionDigits, _groupingSize = result.groupingSize, _finalGroupingSize = result.finalGroupingSize, - _useSignForPositiveExponent = result.useSignForPositiveExponent, _decimalSeparatorAlwaysShown = result.decimalSeparatorAlwaysShown, decimalDigits = result.decimalDigits; @@ -495,59 +491,7 @@ class NumberFormat { /// Format the main part of the number in the form dictated by the pattern. void _formatNumber(number) { - if (_useExponentialNotation) { - _formatExponential(number); - } else { - _formatFixed(number); - } - } - - /// Format the number in exponential notation. - void _formatExponential(num number) { - if (number == 0.0) { - _formatFixed(number); - _formatExponent(0); - return; - } - - var exponent = (log(number) / _ln10).floor(); - var mantissa = number / pow(10.0, exponent); - - if (maximumIntegerDigits > 1 && - maximumIntegerDigits > minimumIntegerDigits) { - // A repeating range is defined; adjust to it as follows. - // If repeat == 3, we have 6,5,4=>3; 3,2,1=>0; 0,-1,-2=>-3; - // -3,-4,-5=>-6, etc. This takes into account that the - // exponent we have here is off by one from what we expect; - // it is for the format 0.MMMMMx10^n. - while ((exponent % maximumIntegerDigits) != 0) { - mantissa *= 10; - exponent--; - } - } else { - // No repeating range is defined, use minimum integer digits. - if (minimumIntegerDigits < 1) { - exponent++; - mantissa /= 10; - } else { - exponent -= minimumIntegerDigits - 1; - mantissa *= pow(10, minimumIntegerDigits - 1); - } - } - _formatFixed(mantissa); - _formatExponent(exponent); - } - - /// Format the exponent portion, e.g. in "1.3e-5" the "e-5". - void _formatExponent(num exponent) { - _add(symbols.EXP_SYMBOL); - if (exponent < 0) { - exponent = -exponent; - _add(symbols.MINUS_SIGN); - } else if (_useSignForPositiveExponent) { - _add(symbols.PLUS_SIGN); - } - _pad(minimumExponentDigits, exponent.toString()); + _formatFixed(number); } /// Used to test if we have exceeded integer limits. From 030097e455184081af357740272baae790da911f Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 13 Mar 2023 10:23:43 +0100 Subject: [PATCH 08/29] remove unused factories --- dart/lib/src/vendor/intl/number_format.dart | 194 -------------------- 1 file changed, 194 deletions(-) diff --git a/dart/lib/src/vendor/intl/number_format.dart b/dart/lib/src/vendor/intl/number_format.dart index 20ed8beaa5..c13ea76d84 100644 --- a/dart/lib/src/vendor/intl/number_format.dart +++ b/dart/lib/src/vendor/intl/number_format.dart @@ -200,151 +200,6 @@ class NumberFormat { factory NumberFormat([String? newPattern, String? locale]) => NumberFormat._forPattern(locale, (x) => newPattern); - /// Create a number format that prints as DECIMAL_PATTERN. - factory NumberFormat.decimalPattern([String? locale]) => - NumberFormat._forPattern(locale, (x) => x.DECIMAL_PATTERN); - - /// Create a number format that prints as DECIMAL_PATTERN. - factory NumberFormat.decimalPatternDigits( - {String? locale, int? decimalDigits}) => - NumberFormat._forPattern(locale, (x) => x.DECIMAL_PATTERN, - decimalDigits: decimalDigits); - - /// Create a number format that prints as PERCENT_PATTERN. - factory NumberFormat.percentPattern([String? locale]) => - NumberFormat._forPattern(locale, (x) => x.PERCENT_PATTERN); - - /// Create a number format that prints as PERCENT_PATTERN. - factory NumberFormat.decimalPercentPattern( - {String? locale, int? decimalDigits}) => - NumberFormat._forPattern(locale, (x) => x.PERCENT_PATTERN, - decimalDigits: decimalDigits); - - /// Create a number format that prints as SCIENTIFIC_PATTERN. - factory NumberFormat.scientificPattern([String? locale]) => - NumberFormat._forPattern(locale, (x) => x.SCIENTIFIC_PATTERN); - - /// A regular expression to validate currency names are exactly three - /// alphabetic characters. - static final _checkCurrencyName = RegExp(r'^[a-zA-Z]{3}$'); - - /// Create a number format that prints as CURRENCY_PATTERN. (Deprecated: - /// prefer NumberFormat.currency) - /// - /// If provided, - /// use [currencyNameOrSymbol] in place of the default currency name. e.g. - /// var eurosInCurrentLocale = NumberFormat - /// .currencyPattern(Intl.defaultLocale, "€"); - @Deprecated('Use NumberFormat.currency') - factory NumberFormat.currencyPattern( - [String? locale, String? currencyNameOrSymbol]) { - // If it looks like an iso4217 name, pass as name, otherwise as symbol. - if (currencyNameOrSymbol != null && - _checkCurrencyName.hasMatch(currencyNameOrSymbol)) { - return NumberFormat.currency(locale: locale, name: currencyNameOrSymbol); - } else { - return NumberFormat.currency( - locale: locale, symbol: currencyNameOrSymbol); - } - } - - /// Create a [NumberFormat] that formats using the locale's CURRENCY_PATTERN. - /// - /// If [locale] is not specified, it will use the current default locale. - /// - /// If [name] is specified, the currency with that ISO 4217 name will be used. - /// Otherwise we will use the default currency name for the current locale. If - /// no [symbol] is specified, we will use the currency name in the formatted - /// result. e.g. - /// var f = NumberFormat.currency(locale: 'en_US', name: 'EUR') - /// will format currency like "EUR1.23". If we did not specify the name, it - /// would format like "USD1.23". - /// - /// If [symbol] is used, then that symbol will be used in formatting instead - /// of the name. e.g. - /// var eurosInCurrentLocale = NumberFormat.currency(symbol: "€"); - /// will format like "€1.23". Otherwise it will use the currency name. - /// If this is not explicitly specified in the constructor, then for - /// currencies we use the default value for the currency if the name is given, - /// otherwise we use the value from the pattern for the locale. - /// - /// If [decimalDigits] is specified, numbers will format with that many digits - /// after the decimal place. If it's not, they will use the default for the - /// currency in [name], and the default currency for [locale] if the currency - /// name is not specified. e.g. - /// NumberFormat.currency(name: 'USD', decimalDigits: 7) - /// will format with 7 decimal digits, because that's what we asked for. But - /// NumberFormat.currency(locale: 'en_US', name: 'JPY') - /// will format with zero, because that's the default for JPY, and the - /// currency's default takes priority over the locale's default. - /// NumberFormat.currency(locale: 'en_US') - /// will format with two, which is the default for that locale. - /// - /// The [customPattern] parameter can be used to specify a particular - /// format. This is useful if you have your own locale data which includes - /// unsupported formats (e.g. accounting format for currencies.) - // TODO(alanknight): Should we allow decimalDigits on other numbers. - factory NumberFormat.currency( - {String? locale, - String? name, - String? symbol, - int? decimalDigits, - String? customPattern}) => - NumberFormat._forPattern( - locale, (x) => customPattern ?? x.CURRENCY_PATTERN, - name: name, - currencySymbol: symbol, - decimalDigits: decimalDigits, - isForCurrency: true); - - /// Creates a [NumberFormat] for currencies, using the simple symbol for the - /// currency if one is available (e.g. $, €), so it should only be used if the - /// short currency symbol will be unambiguous. - /// - /// If [locale] is not specified, it will use the current default locale. - /// - /// If [name] is specified, the currency with that ISO 4217 name will be used. - /// Otherwise we will use the default currency name for the current locale. We - /// will assume that the symbol for this is well known in the locale and - /// unambiguous. If you format CAD in an en_US locale using this format it - /// will display as "$", which may be confusing to the user. - /// - /// If [decimalDigits] is specified, numbers will format with that many digits - /// after the decimal place. If it's not, they will use the default for the - /// currency in [name], and the default currency for [locale] if the currency - /// name is not specified. e.g. - /// NumberFormat.simpleCurrency(name: 'USD', decimalDigits: 7) - /// will format with 7 decimal digits, because that's what we asked for. But - /// NumberFormat.simpleCurrency(locale: 'en_US', name: 'JPY') - /// will format with zero, because that's the default for JPY, and the - /// currency's default takes priority over the locale's default. - /// NumberFormat.simpleCurrency(locale: 'en_US') - /// will format with two, which is the default for that locale. - factory NumberFormat.simpleCurrency( - {String? locale, String? name, int? decimalDigits}) { - return NumberFormat._forPattern(locale, (x) => x.CURRENCY_PATTERN, - name: name, - decimalDigits: decimalDigits, - lookupSimpleCurrencySymbol: true, - isForCurrency: true); - } - - /// Returns the simple currency symbol for given currency code, or - /// [currencyCode] if no simple symbol is listed. - /// - /// The simple currency symbol is generally short, and the same or related to - /// what is used in countries having the currency as an official symbol. It - /// may be a symbol character, or may have letters, or both. It may be - /// different according to the locale: for example, for an Arabic locale it - /// may consist of Arabic letters, but for a French locale consist of Latin - /// letters. It will not be unique: for example, "$" can appear for both USD - /// and CAD. - /// - /// (The current implementation is the same for all locales, but this is - /// temporary and callers shouldn't rely on it.) - String simpleCurrencySymbol(String currencyCode) => - constants.simpleCurrencySymbols[currencyCode] ?? currencyCode; - /// Create a number format that prints in a pattern we get from /// the [getPattern] function using the locale [locale]. /// @@ -408,55 +263,6 @@ class NumberFormat { _decimalSeparatorAlwaysShown = result.decimalSeparatorAlwaysShown, decimalDigits = result.decimalDigits; - /// A number format for compact representations, e.g. "1.2M" instead - /// of "1,200,000". - factory NumberFormat.compact({String? locale, bool explicitSign = false}) { - return _CompactNumberFormat( - locale: locale, - formatType: _CompactFormatType.COMPACT_DECIMAL_SHORT_PATTERN, - explicitSign: explicitSign); - } - - /// A number format for "long" compact representations, e.g. "1.2 million" - /// instead of "1,200,000". - factory NumberFormat.compactLong( - {String? locale, bool explicitSign = false}) { - return _CompactNumberFormat( - locale: locale, - formatType: _CompactFormatType.COMPACT_DECIMAL_LONG_PATTERN, - explicitSign: explicitSign); - } - - /// A number format for compact currency representations, e.g. "$1.2M" instead - /// of "$1,200,000", and which will automatically determine a currency symbol - /// based on the currency name or the locale. See - /// [NumberFormat.simpleCurrency]. - factory NumberFormat.compactSimpleCurrency( - {String? locale, String? name, int? decimalDigits}) { - return _CompactNumberFormat( - locale: locale, - formatType: _CompactFormatType.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN, - name: name, - getPattern: (symbols) => symbols.CURRENCY_PATTERN, - decimalDigits: decimalDigits, - lookupSimpleCurrencySymbol: true, - isForCurrency: true); - } - - /// A number format for compact currency representations, e.g. "$1.2M" instead - /// of "$1,200,000". - factory NumberFormat.compactCurrency( - {String? locale, String? name, String? symbol, int? decimalDigits}) { - return _CompactNumberFormat( - locale: locale, - formatType: _CompactFormatType.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN, - name: name, - getPattern: (symbols) => symbols.CURRENCY_PATTERN, - currencySymbol: symbol, - decimalDigits: decimalDigits, - isForCurrency: true); - } - /// Return the locale code in which we operate, e.g. 'en_US' or 'pt'. String get locale => _locale; From 2f821b1c71c1b3af480f7d6e9ec7c4e696f5a5f2 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 13 Mar 2023 10:24:45 +0100 Subject: [PATCH 09/29] remove grouping --- .../vendor/intl/compact_number_format.dart | 1 - dart/lib/src/vendor/intl/number_format.dart | 38 ------------------- 2 files changed, 39 deletions(-) diff --git a/dart/lib/src/vendor/intl/compact_number_format.dart b/dart/lib/src/vendor/intl/compact_number_format.dart index 715b472c0a..2d293b4344 100644 --- a/dart/lib/src/vendor/intl/compact_number_format.dart +++ b/dart/lib/src/vendor/intl/compact_number_format.dart @@ -380,7 +380,6 @@ class _CompactNumberFormat extends NumberFormat { : super._(currencyName, currencySymbol, isForCurrency, locale, localeZero, pattern, symbols, zeroOffset, result) { significantDigits = 3; - turnOffGrouping(); } @override diff --git a/dart/lib/src/vendor/intl/number_format.dart b/dart/lib/src/vendor/intl/number_format.dart index c13ea76d84..7b78088957 100644 --- a/dart/lib/src/vendor/intl/number_format.dart +++ b/dart/lib/src/vendor/intl/number_format.dart @@ -62,15 +62,6 @@ class NumberFormat { final String negativeSuffix; final String positiveSuffix; - /// How many numbers in a group when using punctuation to group digits in - /// large numbers. e.g. in en_US: "1,000,000" has a grouping size of 3 digits - /// between commas. - int _groupingSize; - - /// In some formats the last grouping size may be different than previous - /// ones, e.g. Hindi. - int _finalGroupingSize; - /// Set to true if the format has explicitly set the grouping size. final bool _decimalSeparatorAlwaysShown; @@ -258,8 +249,6 @@ class NumberFormat { minimumIntegerDigits = result.minimumIntegerDigits, _maximumFractionDigits = result.maximumFractionDigits, _minimumFractionDigits = result.minimumFractionDigits, - _groupingSize = result.groupingSize, - _finalGroupingSize = result.finalGroupingSize, _decimalSeparatorAlwaysShown = result.decimalSeparatorAlwaysShown, decimalDigits = result.decimalDigits; @@ -518,7 +507,6 @@ class NumberFormat { digitLength = integerDigits.length; for (var i = 0; i < digitLength; i++) { _addDigit(integerDigits.codeUnitAt(i)); - _group(digitLength, i); } } else if (!fractionPresent) { // If neither fraction nor integer part exists, just print zero. @@ -632,23 +620,6 @@ class NumberFormat { } } - /// We are printing the digits of the number from left to right. We may need - /// to print a thousands separator or other grouping character as appropriate - /// to the locale. So we find how many places we are from the end of the number - /// by subtracting our current [position] from the [totalLength] and printing - /// the separator character every [_groupingSize] digits, with the final - /// grouping possibly being of a different size, [_finalGroupingSize]. - void _group(int totalLength, int position) { - var distanceFromEnd = totalLength - position; - if (distanceFromEnd <= 1 || _groupingSize <= 0) return; - if (distanceFromEnd == _finalGroupingSize + 1) { - _add(symbols.GROUP_SEP); - } else if ((distanceFromEnd > _finalGroupingSize) && - (distanceFromEnd - _finalGroupingSize) % _groupingSize == 1) { - _add(symbols.GROUP_SEP); - } - } - /// The code point for the locale's zero digit. /// /// Initialized when the locale is set. @@ -668,15 +639,6 @@ class NumberFormat { /// In en_US there are no suffixes for positive or negative. String _signSuffix(x) => x.isNegative ? negativeSuffix : positiveSuffix; - /// Explicitly turn off any grouping (e.g. by thousands) in this format. - /// - /// This is used in compact number formatting, where we - /// omit the normal grouping. Best to know what you're doing if you call it. - void turnOffGrouping() { - _groupingSize = 0; - _finalGroupingSize = 0; - } - @override String toString() => 'NumberFormat($_locale, $_pattern)'; } From 7c7bd6bd3f5f1bb6fdd4829577d9100133177cd4 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 13 Mar 2023 10:27:08 +0100 Subject: [PATCH 10/29] remvoce compact_number_format & plural_rules --- .../vendor/intl/compact_number_format.dart | 595 ----------------- dart/lib/src/vendor/intl/number_format.dart | 3 - dart/lib/src/vendor/intl/plural_rules.dart | 602 ------------------ 3 files changed, 1200 deletions(-) delete mode 100644 dart/lib/src/vendor/intl/compact_number_format.dart delete mode 100644 dart/lib/src/vendor/intl/plural_rules.dart diff --git a/dart/lib/src/vendor/intl/compact_number_format.dart b/dart/lib/src/vendor/intl/compact_number_format.dart deleted file mode 100644 index 2d293b4344..0000000000 --- a/dart/lib/src/vendor/intl/compact_number_format.dart +++ /dev/null @@ -1,595 +0,0 @@ -// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -part of 'number_format.dart'; - -// Suppress naming issues as changes would be breaking. -// ignore_for_file: constant_identifier_names - -/// An abstract class for compact number styles. -abstract class _CompactStyleBase { - /// The _CompactStyle for the [number]. - _CompactStyle styleForNumber(dynamic number, _CompactNumberFormat format); - - /// What should we divide the number by in order to print. Normally it is - /// either `10^normalizedExponent` or 1 if we shouldn't divide at all. - int get divisor; - - /// The iterable of all possible styles which we represent. - /// - /// Normally this will be either a list with just ourself, or of two elements - /// for our positive and negative styles. - Iterable<_CompactStyle> get allStyles; -} - -/// A compact format with separate styles for plural forms. -class _CompactStyleWithPlurals extends _CompactStyleBase { - int exponent; - Map styles; - plural_rules.PluralCase Function()? _plural; - late _CompactStyleBase _defaultStyle; - - _CompactStyleWithPlurals(this.styles, this.exponent, String? locale) { - _plural = plural_rules.pluralRules[locale]; - _defaultStyle = styles['other']!; - } - - @override - Iterable<_CompactStyle> get allStyles => - styles.values.expand((x) => x.allStyles); - - @override - int get divisor => _defaultStyle.divisor; - - @override - _CompactStyle styleForNumber(dynamic number, _CompactNumberFormat format) { - var value = number.abs(); - if (_plural == null) { - return _defaultStyle.styleForNumber(number, format); - } - - var displayed = value; - var precision = format._minimumFractionDigits; - - if (format.significantDigitsInUse) { - // Note: this is not 100% correct, but good enough for most cases. - var integerPart = format._floor(value); - var integerLength = NumberFormat.numberOfIntegerDigits(integerPart); - if (format.minimumSignificantDigits != null) { - precision = max(0, format.minimumSignificantDigits! - integerLength); - } - } - - // Round to the right precision. - var factor = pow(10, precision); - displayed = (displayed * factor).round() / factor; - - if (format.significantDigitsInUse && - !format.minimumSignificantDigitsStrict) { - // Check for trailing 0. - var fractionStr = format._floor(displayed * factor).toString(); - while (precision > 0 && fractionStr.endsWith('0')) { - precision--; - fractionStr = fractionStr.substring(0, fractionStr.length - 1); - } - } - - // Direct value? (French 1000 => "mille" has key "1".) - if (number >= 0 && precision == 0) { - var indexed = styles[format._floor(displayed).toString()]; - if (indexed != null) { - return indexed.styleForNumber(number, format); - } - } - - plural_rules.startRuleEvaluation(displayed, precision); - var pluralCase = _plural!(); - var style = _defaultStyle; - switch (pluralCase) { - case plural_rules.PluralCase.ZERO: - style = styles['zero'] ?? _defaultStyle; - break; - case plural_rules.PluralCase.ONE: - style = styles['one'] ?? _defaultStyle; - break; - case plural_rules.PluralCase.TWO: - style = styles['two'] ?? styles['few'] ?? _defaultStyle; - break; - case plural_rules.PluralCase.FEW: - style = styles['few'] ?? _defaultStyle; - break; - case plural_rules.PluralCase.MANY: - style = styles['many'] ?? _defaultStyle; - break; - default: - // Keep _defaultStyle; - } - return style.styleForNumber(number, format); - } -} - -/// A compact format with separate styles for positive and negative numbers. -class _CompactStyleWithNegative extends _CompactStyleBase { - _CompactStyleWithNegative(this.positiveStyle, this.negativeStyle); - final _CompactStyle positiveStyle; - final _CompactStyle negativeStyle; - - @override - _CompactStyle styleForNumber(dynamic number, _CompactNumberFormat format) => - number < 0 ? negativeStyle : positiveStyle; - - @override - int get divisor => positiveStyle.divisor; - - @override - List<_CompactStyle> get allStyles => [positiveStyle, negativeStyle]; -} - -/// Represents a compact format for a particular base -/// -/// For example, 10K can be used to represent 10,000. Corresponds to one of the -/// patterns in COMPACT_DECIMAL_SHORT_FORMAT. So, for example, in en_US we have -/// the pattern -/// -/// 4: '00K' -/// which matches -/// -/// _CompactStyle(pattern: '00K', divisor: 1000, -/// prefix: '', suffix: 'K'); -class _CompactStyle extends _CompactStyleBase { - _CompactStyle( - {this.pattern, - this.divisor = 1, - this.positivePrefix = '', - this.negativePrefix = '', - this.positiveSuffix = '', - this.negativeSuffix = '', - this.isDirectValue = false}); - - /// The pattern on which this is based. - /// - /// We don't actually need this, but it makes debugging easier. - String? pattern; - - /// What should we divide the number by in order to print. Normally is either - /// 10^normalizedExponent or 1 if we shouldn't divide at all. - @override - int divisor; - - // Prefixes / suffixes. - String positivePrefix; - String negativePrefix; - String positiveSuffix; - String negativeSuffix; - - /// Whether this pattern omits numbers. Ex: "mille" for 1000 in fr. - bool isDirectValue; - - /// Return true if this is the fallback compact pattern, printing the number - /// un-compacted. e.g. 1200 might print as '1.2K', but 12 just prints as '12'. - /// - /// For currencies, with the fallback pattern we use the super implementation - /// so that we will respect things like the default number of decimal digits - /// for a particular currency (e.g. two for USD, zero for JPY) - bool get isFallback => pattern == null || pattern == '0'; - - @override - _CompactStyle styleForNumber(dynamic number, _CompactNumberFormat format) => - this; - - @override - List<_CompactStyle> get allStyles => [this]; - - static final _regex = RegExp('([^0]*)(0+)(.*)'); - - static final _justZeros = RegExp(r'^0*$'); - - /// Does pattern have any additional characters or is it just zeros. - static bool _hasNonZeroContent(String pattern) => - !_justZeros.hasMatch(pattern); - - /// Creates a [_CompactStyle] instance for pattern with [normalizedExponent]. - static _CompactStyle createStyle( - NumberSymbols symbols, String pattern, int normalizedExponent, - {bool isSigned = false, bool explicitSign = false}) { - var prefix = ''; - var suffix = ''; - var divisor = 1; - var isDirectValue = false; - var match = _regex.firstMatch(pattern); - if (match != null) { - prefix = match.group(1)!; - suffix = match.group(3)!; - // If the pattern is just zeros, with no suffix, then we shouldn't divide - // by the number of digits. e.g. for 'af', the pattern for 3 is '0', but - // it doesn't mean that 4321 should print as 4. But if the pattern was - // '0K', then it should print as '4K'. So we have to check if the pattern - // has a suffix. This seems extremely hacky, but I don't know how else to - // encode that. Check what other things are doing. - if (_hasNonZeroContent(pattern)) { - var integerDigits = match.group(2)!.length; - divisor = pow(10, normalizedExponent - integerDigits + 1) as int; - } - } else { - if (pattern.isNotEmpty && !pattern.contains('0')) { - // "Direct" pattern: no numbers. - divisor = pow(10, normalizedExponent) as int; - isDirectValue = true; - } - } - - final positivePrefix = - (explicitSign && !isSigned) ? '${symbols.PLUS_SIGN}$prefix' : prefix; - final negativePrefix = - (!isSigned) ? '${symbols.MINUS_SIGN}$prefix' : prefix; - final positiveSuffix = suffix; - final negativeSuffix = suffix; - - return _CompactStyle( - pattern: pattern, - positivePrefix: positivePrefix, - negativePrefix: negativePrefix, - positiveSuffix: positiveSuffix, - negativeSuffix: negativeSuffix, - divisor: divisor, - isDirectValue: isDirectValue); - } -} - -/// Enumerates the different formats supported. -enum _CompactFormatType { - COMPACT_DECIMAL_SHORT_PATTERN, - COMPACT_DECIMAL_LONG_PATTERN, - COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN -} - -class _CompactNumberFormat extends NumberFormat { - /// A default, using the decimal pattern, for the `getPattern` constructor parameter. - static String _forDecimal(NumberSymbols symbols) => symbols.DECIMAL_PATTERN; - - // Map exponent => style. - final Map _styles; - - // Whether positive sign should be explicitly printed. - final bool _explicitSign; - - factory _CompactNumberFormat( - {String? locale, - _CompactFormatType? formatType, - String? name, - String? currencySymbol, - String? Function(NumberSymbols) getPattern = _forDecimal, - int? decimalDigits, - bool explicitSign = false, - bool lookupSimpleCurrencySymbol = false, - bool isForCurrency = false}) { - // Initialization copied from `NumberFormat` constructor. - // TODO(davidmorgan): deduplicate. - locale = helpers.verifiedLocale(locale, NumberFormat.localeExists, null)!; - var symbols = numberFormatSymbols[locale] as NumberSymbols; - var localeZero = symbols.ZERO_DIGIT.codeUnitAt(0); - var zeroOffset = localeZero - constants.asciiZeroCodeUnit; - name ??= symbols.DEF_CURRENCY_CODE; - if (currencySymbol == null && lookupSimpleCurrencySymbol) { - currencySymbol = constants.simpleCurrencySymbols[name]; - } - currencySymbol ??= name; - var pattern = getPattern(symbols); - - // CompactNumberFormat initialization. - - /// Map from magnitude to formatting pattern for that magnitude. - /// - /// The magnitude is the exponent when using the normalized scientific - /// notation (so numbers from 1000 to 9999 correspond to magnitude 3). - /// - /// These patterns are taken from the appropriate CompactNumberSymbols - /// instance's COMPACT_DECIMAL_SHORT_PATTERN, COMPACT_DECIMAL_LONG_PATTERN, - /// or COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN members. - Map> patterns; - - var compactSymbols = compactNumberSymbols[locale]!; - - var styles = {}; - switch (formatType) { - case _CompactFormatType.COMPACT_DECIMAL_SHORT_PATTERN: - patterns = compactSymbols.COMPACT_DECIMAL_SHORT_PATTERN; - break; - case _CompactFormatType.COMPACT_DECIMAL_LONG_PATTERN: - patterns = compactSymbols.COMPACT_DECIMAL_LONG_PATTERN ?? - compactSymbols.COMPACT_DECIMAL_SHORT_PATTERN; - break; - case _CompactFormatType.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: - patterns = compactSymbols.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN; - break; - default: - throw ArgumentError.notNull('formatType'); - } - - patterns.forEach((int exponent, Map patterns) { - _CompactStyleBase style; - if (patterns.keys.length == 1 && patterns.keys.single == 'other') { - // No plural. - var pattern = patterns.values.single; - style = _styleFromPattern(pattern, exponent, explicitSign, symbols); - } else { - style = _CompactStyleWithPlurals( - patterns.map((key, value) => MapEntry(key, - _styleFromPattern(value, exponent, explicitSign, symbols))), - exponent, - locale); - } - styles[exponent] = style; - }); - - return _CompactNumberFormat._( - name, - currencySymbol, - isForCurrency, - locale, - localeZero, - pattern, - symbols, - zeroOffset, - NumberFormatParser.parse(symbols, pattern, isForCurrency, - currencySymbol, name, decimalDigits), - styles, - explicitSign); - } - - static _CompactStyleBase _styleFromPattern( - String pattern, int exponent, bool explicitSign, NumberSymbols symbols) { - if (pattern.contains(';')) { - var patterns = pattern.split(';'); - var positivePattern = patterns.first; - var negativePattern = patterns.last; - if (explicitSign && - !positivePattern.contains(symbols.PLUS_SIGN) && - negativePattern.contains(symbols.MINUS_SIGN) && - positivePattern == - negativePattern.replaceAll(symbols.MINUS_SIGN, '')) { - // Re-use the negative pattern, with plus sign. - positivePattern = - negativePattern.replaceAll(symbols.MINUS_SIGN, symbols.PLUS_SIGN); - } - return _CompactStyleWithNegative( - _CompactStyle.createStyle(symbols, positivePattern, exponent, - isSigned: positivePattern.contains(symbols.PLUS_SIGN)), - _CompactStyle.createStyle(symbols, negativePattern, exponent, - isSigned: true)); - } else { - return _CompactStyle.createStyle(symbols, pattern, exponent, - explicitSign: explicitSign); - } - } - - _CompactNumberFormat._( - String currencyName, - String currencySymbol, - bool isForCurrency, - String locale, - int localeZero, - String? pattern, - NumberSymbols symbols, - int zeroOffset, - NumberFormatParseResult result, - // Fields introduced in this class. - this._styles, - this._explicitSign) - : super._(currencyName, currencySymbol, isForCurrency, locale, localeZero, - pattern, symbols, zeroOffset, result) { - significantDigits = 3; - } - - @override - set significantDigits(int? x) { - // Replicate ICU behavior: set only the minimumSignificantDigits and - // do not force trailing 0 in fractional part. - _explicitMinimumFractionDigits = false; - minimumSignificantDigits = x; - maximumSignificantDigits = null; - minimumSignificantDigitsStrict = false; - } - - @override - int get minimumFractionDigits => - _style != null && !_style!.isFallback && !_explicitMinimumFractionDigits - ? 0 - : super.minimumFractionDigits; - - /// The style in which we will format a particular number. - /// - /// This is a temporary variable that is only valid within a call to format - /// and parse. - _CompactStyle? _style; - - // We delegate prefixes to current _style. - @override - String get positivePrefix => - _style!.isFallback ? super.positivePrefix : _style!.positivePrefix; - @override - String get negativePrefix => - _style!.isFallback ? super.negativePrefix : _style!.negativePrefix; - @override - String get positiveSuffix => - _style!.isFallback ? super.positiveSuffix : _style!.positiveSuffix; - @override - String get negativeSuffix => - _style!.isFallback ? super.negativeSuffix : _style!.negativeSuffix; - - @override - String format(dynamic number) { - var style = _styleFor(number); - _style = style; - final divisor = style.isFallback ? 1 : style.divisor; - final numberToFormat = _divide(number, divisor); - var formatted = style.isDirectValue - ? '${_signPrefix(number)}${style.pattern}${_signSuffix(number)}' - : super.format(numberToFormat); - if (_explicitSign && - style.isFallback && - number >= 0 && - !formatted.contains(symbols.PLUS_SIGN)) { - formatted = '${symbols.PLUS_SIGN}$formatted'; - } - if (_isForCurrency && !style.isFallback) { - formatted = formatted.replaceFirst('\u00a4', currencySymbol); - } - _style = null; - return formatted; - } - - @override - bool _useDefaultSignificantDigits() { - // For non-currencies, or for currencies if the numbers are large enough to - // compact, always use the number of significant digits and ignore - // decimalDigits. - return !_isForCurrency || !_style!.isFallback; - } - - /// Divide numbers that may not have a division operator (e.g. Int64). - /// - /// Only used for powers of 10, so we require an integer denominator. - static num _divide(numerator, int denominator) { - if (numerator is num) { - return numerator / denominator; - } - // If it doesn't fit in a JS int after division, we're not going to be able - // to meaningfully print a compact representation for it. - var divided = numerator ~/ denominator; - var integerPart = divided.toInt(); - if (divided != integerPart) { - throw FormatException( - 'Number too big to use with compact format', numerator); - } - var remainder = numerator.remainder(denominator).toInt(); - var originalFraction = numerator - (numerator ~/ 1); - var fraction = originalFraction == 0 ? 0 : originalFraction / denominator; - return integerPart + (remainder / denominator) + fraction; - } - - _CompactStyle _styleFor(number) { - if (number.abs() < 10) { - // Cannot be compacted. - return _defaultCompactStyle; - } - var rounded = number.toDouble(); // No rounding yet... - var digitLength = NumberFormat.numberOfIntegerDigits(number); - var divisor = 1; // Default. - - void updateRounding() { - var fractionDigits = maximumFractionDigits; - if (significantDigitsInUse) { - var divisorLength = NumberFormat.numberOfIntegerDigits(divisor); - // We have to round the number based on the number of significant - // digits so that we pick the right style based on the rounded form - // and format 999999 as 1M rather than 1000K. - fractionDigits = - (maximumSignificantDigits ?? minimumSignificantDigits ?? 0) - - digitLength + - divisorLength - - 1; - if (maximumSignificantDigits == null) { - // Keep all digits of the integer part. - fractionDigits = max(0, fractionDigits); - } - } - var fractionMultiplier = pow(10, fractionDigits); - rounded = (rounded * fractionMultiplier / divisor).round() * - divisor / - fractionMultiplier; - digitLength = NumberFormat.numberOfIntegerDigits(rounded); - } - - updateRounding(); - - _CompactStyleBase? style; - for (var entry in _styles.entries) { - var exponent = entry.key + 1; - if (exponent > digitLength) { - break; - } - style = entry.value; - // Recompute digits length based on new exponent. - divisor = style.divisor; - updateRounding(); - } - return style?.styleForNumber(_divide(number, divisor), this) ?? - _defaultCompactStyle; - } - - Iterable<_CompactStyle> get _stylesForSearching => - _styles.values.expand((x) => x.allStyles); - - String _normalize(String input) { - return input - .replaceAll('\u200e', '') // LEFT-TO-RIGHT MARK. - .replaceAll('\u200f', '') // RIGHT-TO-LEFT MARK. - .replaceAll('\u0020', '') // SPACE. - .replaceAll('\u00a0', '') // NO-BREAK SPACE. - .replaceAll('\u202f', '') // NARROW NO-BREAK SPACE. - .replaceAll('\u2212', '-'); // MINUS SIGN. - } - - @override - num parse(final String inputText) { - for (var style in [_defaultCompactStyle, ..._stylesForSearching]) { - _style = style; - var text = _normalize(inputText); - var negative = false; - var negativePrefix = _normalize(style.negativePrefix); - var negativeSuffix = _normalize(style.negativeSuffix); - var positivePrefix = _normalize(style.positivePrefix); - var positiveSuffix = _normalize(style.positiveSuffix); - if (!style.isFallback) { - if (text.startsWith(negativePrefix) && text.endsWith(negativeSuffix)) { - text = text.substring( - negativePrefix.length, text.length - negativeSuffix.length); - negative = true; - } else if (text.startsWith(positivePrefix) && - text.endsWith(positiveSuffix)) { - text = text.substring( - positivePrefix.length, text.length - positiveSuffix.length); - } else { - continue; - } - } - if (style.isDirectValue) { - // "Direct formatting" pattern (1000 => "mille"). - if (text == style.pattern!) { - _style = null; - return style.divisor * (negative ? -1 : 1); - } else { - // Do not attempt parsing: no number. - continue; - } - } - var number = _tryParsing(text); - if (number == null && _zeroOffset != 0) { - // Locale has non-roman numerals. - // Try simple number parse, in case input contains roman numerals. - number = num.tryParse(text); - } - if (number != null) { - _style = null; - return number * style.divisor * (negative ? -1 : 1); - } - } - _style = null; - - throw FormatException( - "Cannot parse compact number in locale '$locale'", inputText); - } - - /// Returns text parsed into a number if possible, else returns null. - num? _tryParsing(String text) { - try { - return super.parse(text); - } on FormatException { - return null; - } - } -} - -final _defaultCompactStyle = _CompactStyle(); diff --git a/dart/lib/src/vendor/intl/number_format.dart b/dart/lib/src/vendor/intl/number_format.dart index 7b78088957..544cc40a77 100644 --- a/dart/lib/src/vendor/intl/number_format.dart +++ b/dart/lib/src/vendor/intl/number_format.dart @@ -3,14 +3,11 @@ import 'dart:math'; import 'number_symbols.dart'; import 'number_symbols_data.dart'; import 'intl_helpers.dart' as helpers; -import 'plural_rules.dart' as plural_rules; import 'constants.dart' as constants; import 'number_format_parser.dart'; import 'number_parser.dart'; -part 'compact_number_format.dart'; - // ignore_for_file: constant_identifier_names /// The function that we pass internally to NumberFormat to get diff --git a/dart/lib/src/vendor/intl/plural_rules.dart b/dart/lib/src/vendor/intl/plural_rules.dart deleted file mode 100644 index c11b6da01e..0000000000 --- a/dart/lib/src/vendor/intl/plural_rules.dart +++ /dev/null @@ -1,602 +0,0 @@ -// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -/// Provides locale-specific plural rules. Based on pluralrules.js from Closure. -/// Follow java/com/google/i18n/tools/generators/README.md to generate js rules, -/// which can then be ported to dart. -/// -/// Each function does the calculation for one or more locales. These are done in terms of -/// various values used by the CLDR syntax and defined by UTS #35 -/// http://unicode.org/reports/tr35/tr35-numbers.html#Plural_rules_syntax -/// -/// * n - absolute value of the source number (integer and decimals). -/// * i - integer digits of n. -/// * v - number of visible fraction digits in n, with trailing zeros. -/// * w - number of visible fraction digits in n, without trailing zeros. -/// * f - visible fractional digits in n, with trailing zeros. -/// * t - visible fractional digits in n, without trailing zeros. -library plural_rules; - -// Suppress naming issues as changing them might be breaking. -// ignore_for_file: constant_identifier_names, non_constant_identifier_names - -import 'dart:math' as math; - -typedef PluralRule = PluralCase Function(); - -/// The possible cases used in a plural rule. -enum PluralCase { ZERO, ONE, TWO, FEW, MANY, OTHER } - -/// The default rule in case we don't have anything more specific for a locale. -PluralCase _default_rule() => OTHER; - -/// This must be called before evaluating a new rule, because we're using -/// library-global state to both keep the rules terse and minimize space. -void startRuleEvaluation(num howMany, [int? precision = 0]) { - _n = howMany; - _precision = precision; - _i = _n.round(); - _updateVF(_n); - _updateWT(_v, _f); -} - -/// The number whose [PluralCase] we are trying to find. -/// -// This is library-global state, along with the other variables. This allows us -// to avoid calculating parameters that the functions don't need and also -// not introduce a subclass per locale or have instance tear-offs which -// we can't cache. This is fine as long as these methods aren't async, which -// they should never be. -num _n = 0; - -/// The integer part of [_n] -int _i = 0; -int? _precision; - -/// Returns the number of digits in the fractional part of a number -/// (3.1416 => 4) -/// -/// Takes the item count [n] and uses [_precision]. -/// That's because a just looking at the value of a number is not enough to -/// decide the plural form. For example "1 dollar" vs "1.00 dollars", the -/// value is 1, but how it is formatted also matters. -int _decimals(num n) { - var str = _precision == null ? '$n' : n.toStringAsFixed(_precision!); - var result = str.indexOf('.'); - return (result == -1) ? 0 : str.length - result - 1; -} - -/// Calculates and sets the _v and _f as per CLDR plural rules. -/// -/// The short names for parameters / return match the CLDR syntax and UTS #35 -/// (https://unicode.org/reports/tr35/tr35-numbers.html#Plural_rules_syntax) -/// Takes the item count [n] and a [precision]. -void _updateVF(num n) { - var defaultDigits = 3; - - _v = _precision ?? math.min(_decimals(n), defaultDigits); - - var base = math.pow(10, _v) as int; - _f = (n * base).floor() % base; -} - -/// Calculates and sets _w and _t as per CLDR plural rules. -/// -/// The short names for parameters / return match the CLDR syntax and UTS #35 -/// (https://unicode.org/reports/tr35/tr35-numbers.html#Plural_rules_syntax) -/// @param v Calculated previously. -/// @param f Calculated previously. -void _updateWT(int v, int f) { - if (f == 0) { - // Unused, for now _w = 0; - _t = 0; - return; - } - - while ((f % 10) == 0) { - f = (f / 10).floor(); - v--; - } - - // Unused, for now _w = v; - _t = f; -} - -/// Number of visible fraction digits. -int _v = 0; - -/// Number of visible fraction digits without trailing zeros. -// Unused, for now int _w = 0; - -/// The visible fraction digits in n, with trailing zeros. -int _f = 0; - -/// The visible fraction digits in n, without trailing zeros. -int _t = 0; - -// An example, for precision n = 3.1415 and precision = 7) -// n : 3.1415 -// str n: 3.1415000 (the "formatted" n, 7 fractional digits) -// i : 3 (the integer part of n) -// f : 1415000 (the fractional part of n) -// v : 7 (how many digits in f) -// t : 1415 (f, without trailing 0s) -// w : 4 (how many digits in t) - -PluralCase get ZERO => PluralCase.ZERO; -PluralCase get ONE => PluralCase.ONE; -PluralCase get TWO => PluralCase.TWO; -PluralCase get FEW => PluralCase.FEW; -PluralCase get MANY => PluralCase.MANY; -PluralCase get OTHER => PluralCase.OTHER; - -PluralCase _fil_rule() { - if (_v == 0 && (_i == 1 || _i == 2 || _i == 3) || - _v == 0 && _i % 10 != 4 && _i % 10 != 6 && _i % 10 != 9 || - _v != 0 && _f % 10 != 4 && _f % 10 != 6 && _f % 10 != 9) { - return ONE; - } - return OTHER; -} - -PluralCase _br_rule() { - if (_n % 10 == 1 && _n % 100 != 11 && _n % 100 != 71 && _n % 100 != 91) { - return ONE; - } - if (_n % 10 == 2 && _n % 100 != 12 && _n % 100 != 72 && _n % 100 != 92) { - return TWO; - } - if ((_n % 10 >= 3 && _n % 10 <= 4 || _n % 10 == 9) && - (_n % 100 < 10 || _n % 100 > 19) && - (_n % 100 < 70 || _n % 100 > 79) && - (_n % 100 < 90 || _n % 100 > 99)) { - return FEW; - } - if (_n != 0 && _n % 1000000 == 0) { - return MANY; - } - return OTHER; -} - -PluralCase _sr_rule() { - if (_v == 0 && _i % 10 == 1 && _i % 100 != 11 || - _f % 10 == 1 && _f % 100 != 11) { - return ONE; - } - if (_v == 0 && - _i % 10 >= 2 && - _i % 10 <= 4 && - (_i % 100 < 12 || _i % 100 > 14) || - _f % 10 >= 2 && _f % 10 <= 4 && (_f % 100 < 12 || _f % 100 > 14)) { - return FEW; - } - return OTHER; -} - -PluralCase _hi_rule() { - if (_i == 0 || _n == 1) { - return ONE; - } - return OTHER; -} - -PluralCase _es_rule() { - if (_n == 1) { - return ONE; - } - return OTHER; -} - -PluralCase _hy_rule() { - if (_n >= 0 && _n <= 1.5) { - return ONE; - } - return OTHER; -} - -PluralCase _pt_rule() { - if (_n >= 0 && _n <= 2 && _n != 2) { - return ONE; - } - return OTHER; -} - -PluralCase _cs_rule() { - if (_i == 1 && _v == 0) { - return ONE; - } - if (_i >= 2 && _i <= 4 && _v == 0) { - return FEW; - } - if (_v != 0) { - return MANY; - } - return OTHER; -} - -PluralCase _pl_rule() { - if (_i == 1 && _v == 0) { - return ONE; - } - if (_v == 0 && - _i % 10 >= 2 && - _i % 10 <= 4 && - (_i % 100 < 12 || _i % 100 > 14)) { - return FEW; - } - if (_v == 0 && _i != 1 && _i % 10 >= 0 && _i % 10 <= 1 || - _v == 0 && _i % 10 >= 5 && _i % 10 <= 9 || - _v == 0 && _i % 100 >= 12 && _i % 100 <= 14) { - return MANY; - } - return OTHER; -} - -PluralCase _it_rule() { - if (_n == 1 && _v == 0) { - return ONE; - } - return OTHER; -} - -PluralCase _lv_rule() { - if (_n % 10 == 0 || - _n % 100 >= 11 && _n % 100 <= 19 || - _v == 2 && _f % 100 >= 11 && _f % 100 <= 19) { - return ZERO; - } - if (_n % 10 == 1 && _n % 100 != 11 || - _v == 2 && _f % 10 == 1 && _f % 100 != 11 || - _v != 2 && _f % 10 == 1) { - return ONE; - } - return OTHER; -} - -PluralCase _he_rule() { - if (_i == 1 && _v == 0) { - return ONE; - } - if (_i == 2 && _v == 0) { - return TWO; - } - if (_v == 0 && (_n < 0 || _n > 10) && _n % 10 == 0) { - return MANY; - } - return OTHER; -} - -PluralCase _mt_rule() { - if (_n == 1) { - return ONE; - } - if (_n == 0 || _n % 100 >= 2 && _n % 100 <= 10) { - return FEW; - } - if (_n % 100 >= 11 && _n % 100 <= 19) { - return MANY; - } - return OTHER; -} - -PluralCase _si_rule() { - if ((_n == 0 || _n == 1) || _i == 0 && _f == 1) { - return ONE; - } - return OTHER; -} - -PluralCase _cy_rule() { - if (_n == 0) { - return ZERO; - } - if (_n == 1) { - return ONE; - } - if (_n == 2) { - return TWO; - } - if (_n == 3) { - return FEW; - } - if (_n == 6) { - return MANY; - } - return OTHER; -} - -PluralCase _da_rule() { - if (_n == 1 || _t != 0 && (_i == 0 || _i == 1)) { - return ONE; - } - return OTHER; -} - -PluralCase _ru_rule() { - if (_v == 0 && _i % 10 == 1 && _i % 100 != 11) { - return ONE; - } - if (_v == 0 && - _i % 10 >= 2 && - _i % 10 <= 4 && - (_i % 100 < 12 || _i % 100 > 14)) { - return FEW; - } - if (_v == 0 && _i % 10 == 0 || - _v == 0 && _i % 10 >= 5 && _i % 10 <= 9 || - _v == 0 && _i % 100 >= 11 && _i % 100 <= 14) { - return MANY; - } - return OTHER; -} - -PluralCase _be_rule() { - if (_v != 0) { - return OTHER; - } - if (_n % 10 == 1 && _n % 100 != 11) { - return ONE; - } - if (_n % 10 >= 2 && _n % 10 <= 4 && (_n % 100 < 12 || _n % 100 > 14)) { - return FEW; - } - if (_n % 10 == 0 || - _n % 10 >= 5 && _n % 10 <= 9 || - _n % 100 >= 11 && _n % 100 <= 14) { - return MANY; - } - return OTHER; -} - -PluralCase _fr_rule() { - if (_n >= 0 && _n <= 1.5) { - return ONE; - } - return OTHER; -} - -PluralCase _ga_rule() { - if (_v != 0) { - return OTHER; - } - if (_n == 1) { - return ONE; - } - if (_n == 2) { - return TWO; - } - if (_n >= 3 && _n <= 6) { - return FEW; - } - if (_n >= 7 && _n <= 10) { - return MANY; - } - return OTHER; -} - -PluralCase _af_rule() { - if (_i == 1 && _v == 0) { - return ONE; - } - return OTHER; -} - -PluralCase _mk_rule() { - if (_v == 0 && _i % 10 == 1 || _f % 10 == 1) { - return ONE; - } - return OTHER; -} - -PluralCase _is_rule() { - if (_t == 0 && _i % 10 == 1 && _i % 100 != 11 || _t != 0) { - return ONE; - } - return OTHER; -} - -PluralCase _ro_rule() { - if (_i == 1 && _v == 0) { - return ONE; - } - if (_v != 0 || _n == 0 || _n != 1 && _n % 100 >= 1 && _n % 100 <= 19) { - return FEW; - } - return OTHER; -} - -PluralCase _ar_rule() { - if (_v != 0) { - return OTHER; - } - if (_n == 1) { - return ZERO; - } - if (_n == 1) { - return ONE; - } - if (_n == 2) { - return TWO; - } - if (_n % 100 >= 3 && _n % 100 <= 10) { - return FEW; - } - if (_n % 100 >= 11 && _n % 100 <= 99) { - return MANY; - } - return OTHER; -} - -PluralCase _sl_rule() { - if (_v == 0 && _i % 100 == 1) { - return ONE; - } - if (_v == 0 && _i % 100 == 2) { - return TWO; - } - if (_v == 0 && _i % 100 >= 3 && _i % 100 <= 4 || _v != 0) { - return FEW; - } - return OTHER; -} - -PluralCase _lt_rule() { - if (_v == 0 && _n % 10 == 1 && (_n % 100 < 11 || _n % 100 > 19)) { - return ONE; - } - if (_v == 0 && - _n % 10 >= 2 && - _n % 10 <= 9 && - (_n % 100 < 11 || _n % 100 > 19)) { - return FEW; - } - if (_f != 0) { - return MANY; - } - return OTHER; -} - -PluralCase _en_rule() { - if (_i == 1 && _v == 0) { - return ONE; - } - return OTHER; -} - -PluralCase _ln_rule() { - if (_v == 00 && (_i == 0 || _i == 1)) { - return ONE; - } - return OTHER; -} - -/// Selected Plural rules by locale. -final pluralRules = { - 'en_ISO': _en_rule, - 'af': _af_rule, - 'am': _hi_rule, - 'ar': _ar_rule, - 'ar_DZ': _ar_rule, - 'ar_EG': _ar_rule, - 'as': _hi_rule, - 'az': _af_rule, - 'be': _be_rule, - 'bg': _af_rule, - 'bm': _default_rule, - 'bn': _hi_rule, - 'br': _br_rule, - 'bs': _sr_rule, - 'ca': _en_rule, - 'chr': _af_rule, - 'cs': _cs_rule, - 'cy': _cy_rule, - 'da': _da_rule, - 'de': _en_rule, - 'de_AT': _en_rule, - 'de_CH': _en_rule, - 'el': _af_rule, - 'en': _en_rule, - 'en_AU': _en_rule, - 'en_CA': _en_rule, - 'en_GB': _en_rule, - 'en_IE': _en_rule, - 'en_IN': _en_rule, - 'en_MY': _en_rule, - 'en_NZ': _en_rule, - 'en_SG': _en_rule, - 'en_US': _en_rule, - 'en_ZA': _en_rule, - 'es': _es_rule, - 'es_419': _es_rule, - 'es_ES': _es_rule, - 'es_MX': _es_rule, - 'es_US': _es_rule, - 'et': _en_rule, - 'eu': _af_rule, - 'fa': _hi_rule, - 'fi': _en_rule, - 'fil': _fil_rule, - 'fr': _fr_rule, - 'fr_CA': _fr_rule, - 'fr_CH': _fr_rule, - 'fur': _af_rule, - 'ga': _ga_rule, - 'gl': _en_rule, - 'gsw': _af_rule, - 'gu': _hi_rule, - 'haw': _af_rule, - 'he': _he_rule, - 'hi': _hi_rule, - 'hr': _sr_rule, - 'hu': _af_rule, - 'hy': _hy_rule, - 'id': _default_rule, - 'in': _default_rule, - 'is': _is_rule, - 'it': _it_rule, - 'it_CH': _it_rule, - 'iw': _he_rule, - 'ja': _default_rule, - 'ka': _af_rule, - 'kk': _af_rule, - 'km': _default_rule, - 'kn': _hi_rule, - 'ko': _default_rule, - 'ky': _af_rule, - 'ln': _ln_rule, - 'lo': _default_rule, - 'lt': _lt_rule, - 'lv': _lv_rule, - 'mg': _ln_rule, - 'mk': _mk_rule, - 'ml': _af_rule, - 'mn': _af_rule, - 'mo': _ro_rule, - 'mr': _af_rule, - 'ms': _default_rule, - 'mt': _mt_rule, - 'my': _default_rule, - 'nb': _af_rule, - 'ne': _af_rule, - 'nl': _en_rule, - 'no': _af_rule, - 'no_NO': _af_rule, - 'nyn': _af_rule, - 'or': _af_rule, - 'pa': _ln_rule, - 'pl': _pl_rule, - 'ps': _af_rule, - 'pt': _pt_rule, - 'pt_BR': _pt_rule, - 'pt_PT': _it_rule, - 'ro': _ro_rule, - 'ru': _ru_rule, - 'sh': _sr_rule, - 'si': _si_rule, - 'sk': _cs_rule, - 'sl': _sl_rule, - 'sq': _af_rule, - 'sr': _sr_rule, - 'sr_Latn': _sr_rule, - 'sv': _en_rule, - 'sw': _en_rule, - 'ta': _af_rule, - 'te': _af_rule, - 'th': _default_rule, - 'tl': _fil_rule, - 'tr': _af_rule, - 'uk': _ru_rule, - 'ur': _en_rule, - 'uz': _af_rule, - 'vi': _default_rule, - 'zh': _default_rule, - 'zh_CN': _default_rule, - 'zh_HK': _default_rule, - 'zh_TW': _default_rule, - 'zu': _hi_rule, - 'default': _default_rule -}; - -/// Do we have plural rules specific to [locale] -bool localeHasPluralRules(String locale) => pluralRules.containsKey(locale); From 4e0c337a4519e9c293225e926460e48f65fba017 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 13 Mar 2023 10:37:33 +0100 Subject: [PATCH 11/29] remove dynaic number format --- dart/lib/src/sentry_tracer.dart | 2 +- dart/lib/src/vendor/intl/number_format.dart | 111 +----- .../src/vendor/intl/number_format_parser.dart | 366 ------------------ dart/lib/src/vendor/intl/number_parser.dart | 241 ------------ dart/test/vendor/intl/number_format_test.dart | 2 +- 5 files changed, 22 insertions(+), 700 deletions(-) delete mode 100644 dart/lib/src/vendor/intl/number_format_parser.dart delete mode 100644 dart/lib/src/vendor/intl/number_parser.dart diff --git a/dart/lib/src/sentry_tracer.dart b/dart/lib/src/sentry_tracer.dart index 5cc261cb04..3a9f255dae 100644 --- a/dart/lib/src/sentry_tracer.dart +++ b/dart/lib/src/sentry_tracer.dart @@ -350,7 +350,7 @@ class SentryTracer extends ISentrySpan { return null; } return sampleRate != null - ? NumberFormat("#.################").format(sampleRate) + ? NumberFormat().format(sampleRate) : null; } diff --git a/dart/lib/src/vendor/intl/number_format.dart b/dart/lib/src/vendor/intl/number_format.dart index 544cc40a77..47b73ec9ad 100644 --- a/dart/lib/src/vendor/intl/number_format.dart +++ b/dart/lib/src/vendor/intl/number_format.dart @@ -5,15 +5,9 @@ import 'number_symbols_data.dart'; import 'intl_helpers.dart' as helpers; import 'constants.dart' as constants; -import 'number_format_parser.dart'; -import 'number_parser.dart'; // ignore_for_file: constant_identifier_names -/// The function that we pass internally to NumberFormat to get -/// the appropriate pattern (e.g. currency) -typedef _PatternGetter = String? Function(NumberSymbols); - /// Provides the ability to format a number in a locale-specific way. /// /// The format is specified as a pattern using a subset of the ICU formatting @@ -62,12 +56,6 @@ class NumberFormat { /// Set to true if the format has explicitly set the grouping size. final bool _decimalSeparatorAlwaysShown; - /// Explicitly store if we are a currency format, and so should use the - /// appropriate number of decimal digits for a currency. - // TODO(alanknight): Handle currency formats which are specified in a raw - /// pattern, not using one of the currency constructors. - final bool _isForCurrency; - int maximumIntegerDigits; int minimumIntegerDigits; @@ -141,24 +129,12 @@ class NumberFormat { /// How many digits are there in the [multiplier]. final int _multiplierDigits; - /// Stores the pattern used to create this format. This isn't used, but - /// is helpful in debugging. - final String? _pattern; - /// The locale in which we print numbers. final String _locale; /// Caches the symbols used for our locale. final NumberSymbols _symbols; - /// The name of the currency to print, in ISO 4217 form. - String? currencyName; - - /// The symbol to be used when formatting this as currency. - /// - /// For example, "$", "US$", or "€". - final String currencySymbol; - /// The number of decimal places to use when formatting. /// /// If this is not explicitly specified in the constructor, then for @@ -185,8 +161,8 @@ class NumberFormat { /// Create a number format that prints using [newPattern] as it applies in /// [locale]. - factory NumberFormat([String? newPattern, String? locale]) => - NumberFormat._forPattern(locale, (x) => newPattern); + factory NumberFormat([String? locale]) => + NumberFormat._forPattern(locale); /// Create a number format that prints in a pattern we get from /// the [getPattern] function using the locale [locale]. @@ -194,60 +170,38 @@ class NumberFormat { /// The [currencySymbol] can either be specified directly, or we can pass a /// function [computeCurrencySymbol] that will compute it later, given other /// information, typically the verified locale. - factory NumberFormat._forPattern(String? locale, _PatternGetter getPattern, - {String? name, - String? currencySymbol, - int? decimalDigits, - bool lookupSimpleCurrencySymbol = false, - bool isForCurrency = false}) { + factory NumberFormat._forPattern(String? locale) { locale = helpers.verifiedLocale(locale, localeExists, null)!; + var symbols = numberFormatSymbols[locale] as NumberSymbols; var localeZero = symbols.ZERO_DIGIT.codeUnitAt(0); var zeroOffset = localeZero - constants.asciiZeroCodeUnit; - name ??= symbols.DEF_CURRENCY_CODE; - if (currencySymbol == null && lookupSimpleCurrencySymbol) { - currencySymbol = constants.simpleCurrencySymbols[name]; - } - currencySymbol ??= name; - - var pattern = getPattern(symbols); return NumberFormat._( - name, - currencySymbol, - isForCurrency, locale, localeZero, - pattern, symbols, - zeroOffset, - NumberFormatParser.parse(symbols, pattern, isForCurrency, - currencySymbol, name, decimalDigits)); + zeroOffset); } NumberFormat._( - this.currencyName, - this.currencySymbol, - this._isForCurrency, this._locale, this.localeZero, - this._pattern, this._symbols, - this._zeroOffset, - NumberFormatParseResult result) - : positivePrefix = result.positivePrefix, - negativePrefix = result.negativePrefix, - positiveSuffix = result.positiveSuffix, - negativeSuffix = result.negativeSuffix, - multiplier = result.multiplier, - _multiplierDigits = result.multiplierDigits, - minimumExponentDigits = result.minimumExponentDigits, - maximumIntegerDigits = result.maximumIntegerDigits, - minimumIntegerDigits = result.minimumIntegerDigits, - _maximumFractionDigits = result.maximumFractionDigits, - _minimumFractionDigits = result.minimumFractionDigits, - _decimalSeparatorAlwaysShown = result.decimalSeparatorAlwaysShown, - decimalDigits = result.decimalDigits; + this._zeroOffset) + : positivePrefix = "", + negativePrefix = "-", + positiveSuffix = "", + negativeSuffix = "", + multiplier = 1, + _multiplierDigits = 0, + minimumExponentDigits = 0, + maximumIntegerDigits = 40, + minimumIntegerDigits = 1, + _maximumFractionDigits = 16, + _minimumFractionDigits = 0, + _decimalSeparatorAlwaysShown = false, + decimalDigits = null; /// Return the locale code in which we operate, e.g. 'en_US' or 'pt'. String get locale => _locale; @@ -277,10 +231,6 @@ class NumberFormat { return result; } - /// Parse the number represented by the string. If it's not - /// parseable, throws a [FormatException]. - num parse(String text) => NumberParser(this, text).value!; - /// Format the main part of the number in the form dictated by the pattern. void _formatNumber(number) { _formatFixed(number); @@ -356,7 +306,7 @@ class NumberFormat { } /// Whether to use SignificantDigits unconditionally for fraction digits. - bool _useDefaultSignificantDigits() => !_isForCurrency; + bool _useDefaultSignificantDigits() => true; /// How many digits after the decimal place should we display, given that /// by default, [fractionDigits] should be used, and there are up to @@ -599,24 +549,6 @@ class NumberFormat { _buffer.writeCharCode(x + _zeroOffset); } - void _pad(int numberOfDigits, String basic) { - if (_zeroOffset == 0) { - _buffer.write(basic.padLeft(numberOfDigits, '0')); - } else { - _slowPad(numberOfDigits, basic); - } - } - - /// Print padding up to [numberOfDigits] above what's included in [basic]. - void _slowPad(int numberOfDigits, String basic) { - for (var i = 0; i < numberOfDigits - basic.length; i++) { - _add(symbols.ZERO_DIGIT); - } - for (var i = 0; i < basic.length; i++) { - _addDigit(basic.codeUnitAt(i)); - } - } - /// The code point for the locale's zero digit. /// /// Initialized when the locale is set. @@ -635,9 +567,6 @@ class NumberFormat { /// Returns the suffix for [x] based on wether it's positive or negative. /// In en_US there are no suffixes for positive or negative. String _signSuffix(x) => x.isNegative ? negativeSuffix : positiveSuffix; - - @override - String toString() => 'NumberFormat($_locale, $_pattern)'; } final _ln10 = log(10); diff --git a/dart/lib/src/vendor/intl/number_format_parser.dart b/dart/lib/src/vendor/intl/number_format_parser.dart deleted file mode 100644 index 8dc602b418..0000000000 --- a/dart/lib/src/vendor/intl/number_format_parser.dart +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -import 'dart:math'; - -import 'number_symbols.dart'; -import 'number_symbols_data.dart'; -import 'string_stack.dart'; - -// ignore_for_file: constant_identifier_names - -/// Output of [_NumberFormatParser.parse]. -/// -/// Everything needed to initialize a [NumberFormat]. -class NumberFormatParseResult { - String negativePrefix; - String positivePrefix = ''; - String negativeSuffix = ''; - String positiveSuffix = ''; - - int multiplier = 1; - int get multiplierDigits => (log(multiplier) / _ln10).round(); - - int minimumExponentDigits = 0; - - int maximumIntegerDigits = 40; - int minimumIntegerDigits = 1; - int maximumFractionDigits = 3; - int minimumFractionDigits = 0; - - int groupingSize = 3; - int finalGroupingSize = 3; - - bool decimalSeparatorAlwaysShown = false; - bool useSignForPositiveExponent = false; - bool useExponentialNotation = false; - - int? decimalDigits; - - // [decimalDigits] is both input and output of parsing. - NumberFormatParseResult(NumberSymbols symbols, this.decimalDigits) - : negativePrefix = symbols.MINUS_SIGN; -} - -/// Private class that parses the numeric formatting pattern and sets the -/// variables in [format] to appropriate values. Instances of this are -/// transient and store parsing state in instance variables, so can only be used -/// to parse a single pattern. -class NumberFormatParser { - /// The special characters in the pattern language. All others are treated - /// as literals. - static const PATTERN_SEPARATOR = ';'; - static const QUOTE = "'"; - static const PATTERN_DIGIT = '#'; - static const PATTERN_ZERO_DIGIT = '0'; - static const PATTERN_GROUPING_SEPARATOR = ','; - static const PATTERN_DECIMAL_SEPARATOR = '.'; - static const PATTERN_CURRENCY_SIGN = '\u00A4'; - static const PATTERN_PER_MILLE = '\u2030'; - static const PER_MILLE_SCALE = 1000; - static const PATTERN_PERCENT = '%'; - static const PERCENT_SCALE = 100; - static const PATTERN_EXPONENT = 'E'; - static const PATTERN_PLUS = '+'; - - /// The format whose state we are setting. - final NumberSymbols symbols; - - /// The pattern we are parsing. - final StringStack pattern; - - /// Whether this is a currency. - final bool isForCurrency; - - /// We can be passed a specific currency symbol, regardless of the locale. - final String currencySymbol; - - final String currencyName; - - // The result being constructed. - final NumberFormatParseResult result; - - bool groupingSizeSetExplicitly = false; - - /// Create a new [_NumberFormatParser] for a particular [NumberFormat] and - /// [input] pattern. - /// - /// [decimalDigits] is optional, if specified it overrides the default. - NumberFormatParser(this.symbols, String input, this.isForCurrency, - this.currencySymbol, this.currencyName, int? decimalDigits) - : result = NumberFormatParseResult(symbols, decimalDigits), - pattern = StringStack(input); - - static NumberFormatParseResult parse( - NumberSymbols symbols, - String? input, - bool isForCurrency, - String currencySymbol, - String currencyName, - int? decimalDigits) => - input == null - ? NumberFormatParseResult(symbols, decimalDigits) - : (NumberFormatParser(symbols, input, isForCurrency, currencySymbol, - currencyName, decimalDigits) - .._parse()) - .result; - - /// For currencies, the default number of decimal places to use in - /// formatting. Defaults to two for non-currencies or currencies where it's - /// not specified. - int get _defaultDecimalDigits => - currencyFractionDigits[currencyName.toUpperCase()] ?? - currencyFractionDigits['DEFAULT']!; - - /// Parse the input pattern and update [result]. - void _parse() { - result.positivePrefix = _parseAffix(); - var trunk = _parseTrunk(); - result.positiveSuffix = _parseAffix(); - // If we have separate positive and negative patterns, now parse the - // the negative version. - if (pattern.peek() == NumberFormatParser.PATTERN_SEPARATOR) { - pattern.pop(); - result.negativePrefix = _parseAffix(); - // Skip over the negative trunk, verifying that it's identical to the - // positive trunk. - var trunkStack = StringStack(trunk); - while (!trunkStack.atEnd) { - var each = trunkStack.read(); - if (pattern.peek() != each && !pattern.atEnd) { - throw FormatException( - 'Positive and negative trunks must be the same', trunk); - } - pattern.pop(); - } - result.negativeSuffix = _parseAffix(); - } else { - // If no negative affix is specified, they share the same positive affix. - result.negativePrefix = result.negativePrefix + result.positivePrefix; - result.negativeSuffix = result.positiveSuffix + result.negativeSuffix; - } - - if (isForCurrency) { - result.decimalDigits ??= _defaultDecimalDigits; - } - if (result.decimalDigits != null) { - result.minimumFractionDigits = result.decimalDigits!; - result.maximumFractionDigits = result.decimalDigits!; - } - } - - /// Variable used in parsing prefixes and suffixes to keep track of - /// whether or not we are in a quoted region. - bool inQuote = false; - - /// Parse a prefix or suffix and return the prefix/suffix string. Note that - /// this also may modify the state of [format]. - String _parseAffix() { - var affix = StringBuffer(); - inQuote = false; - while (parseCharacterAffix(affix) && pattern.read().isNotEmpty) {} - return affix.toString(); - } - - /// Parse an individual character as part of a prefix or suffix. Return true - /// if we should continue to look for more affix characters, and false if - /// we have reached the end. - bool parseCharacterAffix(StringBuffer affix) { - if (pattern.atEnd) return false; - var ch = pattern.peek(); - if (ch == QUOTE) { - var peek = pattern.peek(2); - if (peek.length == 2 && peek[1] == QUOTE) { - pattern.pop(); - affix.write(QUOTE); // 'don''t' - } else { - inQuote = !inQuote; - } - return true; - } - - if (inQuote) { - affix.write(ch); - } else { - switch (ch) { - case PATTERN_DIGIT: - case PATTERN_ZERO_DIGIT: - case PATTERN_GROUPING_SEPARATOR: - case PATTERN_DECIMAL_SEPARATOR: - case PATTERN_SEPARATOR: - return false; - case PATTERN_CURRENCY_SIGN: - // TODO(alanknight): Handle the local/global/portable currency signs - affix.write(currencySymbol); - break; - case PATTERN_PERCENT: - if (result.multiplier != 1 && result.multiplier != PERCENT_SCALE) { - throw const FormatException('Too many percent/permill'); - } - result.multiplier = PERCENT_SCALE; - affix.write(symbols.PERCENT); - break; - case PATTERN_PER_MILLE: - if (result.multiplier != 1 && result.multiplier != PER_MILLE_SCALE) { - throw const FormatException('Too many percent/permill'); - } - result.multiplier = PER_MILLE_SCALE; - affix.write(symbols.PERMILL); - break; - default: - affix.write(ch); - } - } - return true; - } - - /// Variables used in [_parseTrunk] and [parseTrunkCharacter]. - int decimalPos = -1; - int digitLeftCount = 0; - int zeroDigitCount = 0; - int digitRightCount = 0; - int groupingCount = -1; - - /// Parse the "trunk" portion of the pattern, the piece that doesn't include - /// positive or negative prefixes or suffixes. - String _parseTrunk() { - var loop = true; - var trunk = StringBuffer(); - while (pattern.peek().isNotEmpty && loop) { - loop = parseTrunkCharacter(trunk); - } - - if (zeroDigitCount == 0 && digitLeftCount > 0 && decimalPos >= 0) { - // Handle '###.###' and '###.' and '.###' - // Handle '.###' - var n = decimalPos == 0 ? 1 : decimalPos; - digitRightCount = digitLeftCount - n; - digitLeftCount = n - 1; - zeroDigitCount = 1; - } - - // Do syntax checking on the digits. - if (decimalPos < 0 && digitRightCount > 0 || - decimalPos >= 0 && - (decimalPos < digitLeftCount || - decimalPos > digitLeftCount + zeroDigitCount) || - groupingCount == 0) { - throw FormatException('Malformed pattern "${pattern.contents}"'); - } - var totalDigits = digitLeftCount + zeroDigitCount + digitRightCount; - - result.maximumFractionDigits = - decimalPos >= 0 ? totalDigits - decimalPos : 0; - if (decimalPos >= 0) { - result.minimumFractionDigits = - digitLeftCount + zeroDigitCount - decimalPos; - if (result.minimumFractionDigits < 0) { - result.minimumFractionDigits = 0; - } - } - - // The effectiveDecimalPos is the position the decimal is at or would be at - // if there is no decimal. Note that if decimalPos<0, then digitTotalCount - // == digitLeftCount + zeroDigitCount. - var effectiveDecimalPos = decimalPos >= 0 ? decimalPos : totalDigits; - result.minimumIntegerDigits = effectiveDecimalPos - digitLeftCount; - if (result.useExponentialNotation) { - result.maximumIntegerDigits = - digitLeftCount + result.minimumIntegerDigits; - - // In exponential display, we need to at least show something. - if (result.maximumFractionDigits == 0 && - result.minimumIntegerDigits == 0) { - result.minimumIntegerDigits = 1; - } - } - - result.finalGroupingSize = max(0, groupingCount); - if (!groupingSizeSetExplicitly) { - result.groupingSize = result.finalGroupingSize; - } - result.decimalSeparatorAlwaysShown = - decimalPos == 0 || decimalPos == totalDigits; - - return trunk.toString(); - } - - /// Parse an individual character of the trunk. Return true if we should - /// continue to look for additional trunk characters or false if we have - /// reached the end. - bool parseTrunkCharacter(StringBuffer trunk) { - var ch = pattern.peek(); - switch (ch) { - case PATTERN_DIGIT: - if (zeroDigitCount > 0) { - digitRightCount++; - } else { - digitLeftCount++; - } - if (groupingCount >= 0 && decimalPos < 0) { - groupingCount++; - } - break; - case PATTERN_ZERO_DIGIT: - if (digitRightCount > 0) { - throw FormatException( - 'Unexpected "0" in pattern "${pattern.contents}'); - } - zeroDigitCount++; - if (groupingCount >= 0 && decimalPos < 0) { - groupingCount++; - } - break; - case PATTERN_GROUPING_SEPARATOR: - if (groupingCount > 0) { - groupingSizeSetExplicitly = true; - result.groupingSize = groupingCount; - } - groupingCount = 0; - break; - case PATTERN_DECIMAL_SEPARATOR: - if (decimalPos >= 0) { - throw FormatException( - 'Multiple decimal separators in pattern "$pattern"'); - } - decimalPos = digitLeftCount + zeroDigitCount + digitRightCount; - break; - case PATTERN_EXPONENT: - trunk.write(ch); - if (result.useExponentialNotation) { - throw FormatException( - 'Multiple exponential symbols in pattern "$pattern"'); - } - result.useExponentialNotation = true; - result.minimumExponentDigits = 0; - - // exponent pattern can have a optional '+'. - pattern.pop(); - var nextChar = pattern.peek(); - if (nextChar == PATTERN_PLUS) { - trunk.write(pattern.read()); - result.useSignForPositiveExponent = true; - } - - // Use lookahead to parse out the exponential part - // of the pattern, then jump into phase 2. - while (pattern.peek() == PATTERN_ZERO_DIGIT) { - trunk.write(pattern.read()); - result.minimumExponentDigits++; - } - - if ((digitLeftCount + zeroDigitCount) < 1 || - result.minimumExponentDigits < 1) { - throw FormatException('Malformed exponential pattern "$pattern"'); - } - return false; - default: - return false; - } - trunk.write(ch); - pattern.pop(); - return true; - } -} - -final _ln10 = log(10); diff --git a/dart/lib/src/vendor/intl/number_parser.dart b/dart/lib/src/vendor/intl/number_parser.dart deleted file mode 100644 index 6ecd5ce838..0000000000 --- a/dart/lib/src/vendor/intl/number_parser.dart +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'number_symbols.dart'; - -import 'constants.dart' as constants; -import 'number_format.dart'; -import 'number_format_parser.dart'; -import 'string_stack.dart'; - -/// A one-time object for parsing a particular numeric string. One-time here -/// means an instance can only parse one string. This is implemented by -/// transforming from a locale-specific format to one that the system can parse, -/// then calls the system parsing methods on it. -class NumberParser { - /// The format for which we are parsing. - final NumberFormat format; - - /// The text we are parsing. - final String text; - - /// What we use to iterate over the input text. - final StringStack input; - - /// The result of parsing [text] according to [format]. Automatically - /// populated in the constructor. - num? value; - - /// The symbols used by our format. - NumberSymbols get symbols => format.symbols; - - /// Where we accumulate the normalized representation of the number. - final StringBuffer _normalized = StringBuffer(); - - /// Did we see something that indicates this is, or at least might be, - /// a positive number. - bool gotPositive = false; - - /// Did we see something that indicates this is, or at least might be, - /// a negative number. - bool gotNegative = false; - - /// Did we see the required positive suffix at the end. Should - /// match [gotPositive]. - bool gotPositiveSuffix = false; - - /// Did we see the required negative suffix at the end. Should - /// match [gotNegative]. - bool gotNegativeSuffix = false; - - /// Should we stop parsing before hitting the end of the string. - bool done = false; - - /// Have we already skipped over any required prefixes. - bool prefixesSkipped = false; - - /// If the number is percent or permill, what do we divide by at the end. - int scale = 1; - - String get _positivePrefix => format.positivePrefix; - String get _negativePrefix => format.negativePrefix; - String get _positiveSuffix => format.positiveSuffix; - String get _negativeSuffix => format.negativeSuffix; - int get _localeZero => format.localeZero; - - /// Create a new [_NumberParser] on which we can call parse(). - NumberParser(this.format, this.text) : input = StringStack(text) { - scale = format.multiplier; - value = parse(); - } - - /// The strings we might replace with functions that return the replacement - /// values. They are functions because we might need to check something - /// in the context. Note that the ordering is important here. For example, - /// `symbols.PERCENT` might be " %", and we must handle that before we - /// look at an individual space. - Map get replacements => - _replacements ??= _initializeReplacements(); - - Map? _replacements; - - Map _initializeReplacements() => { - symbols.DECIMAL_SEP: () => '.', - symbols.EXP_SYMBOL: () => 'E', - symbols.GROUP_SEP: handleSpace, - symbols.PERCENT: () { - scale = NumberFormatParser.PERCENT_SCALE; - return ''; - }, - symbols.PERMILL: () { - scale = NumberFormatParser.PER_MILLE_SCALE; - return ''; - }, - ' ': handleSpace, - '\u00a0': handleSpace, - '+': () => '+', - '-': () => '-', - }; - - void invalidFormat() => - throw FormatException('Invalid number: ${input.contents}'); - - /// Replace a space in the number with the normalized form. If space is not - /// a significant character (normally grouping) then it's just invalid. If it - /// is the grouping character, then it's only valid if it's followed by a - /// digit. e.g. '$12 345.00' - void handleSpace() => - groupingIsNotASpaceOrElseItIsSpaceFollowedByADigit ? '' : invalidFormat(); - - /// Determine if a space is a valid character in the number. See - /// [handleSpace]. - bool get groupingIsNotASpaceOrElseItIsSpaceFollowedByADigit { - if (symbols.GROUP_SEP != '\u00a0' || symbols.GROUP_SEP != ' ') return true; - var peeked = input.peek(symbols.GROUP_SEP.length + 1); - return asDigit(peeked[peeked.length - 1]) != null; - } - - /// Turn [char] into a number representing a digit, or null if it doesn't - /// represent a digit in this locale. - int? asDigit(String char) { - var charCode = char.codeUnitAt(0); - var digitValue = charCode - _localeZero; - if (digitValue >= 0 && digitValue < 10) { - return digitValue; - } else { - return null; - } - } - - /// Check to see if the input begins with either the positive or negative - /// prefixes. Set the [gotPositive] and [gotNegative] variables accordingly. - void checkPrefixes({bool skip = false}) { - bool checkPrefix(String prefix) => - prefix.isNotEmpty && input.startsWith(prefix); - - // TODO(alanknight): There's a faint possibility of a bug here where - // a positive prefix is followed by a negative prefix that's also a valid - // part of the number, but that seems very unlikely. - if (checkPrefix(_positivePrefix)) gotPositive = true; - if (checkPrefix(_negativePrefix)) gotNegative = true; - - // The positive prefix might be a substring of the negative, in - // which case both would match. - if (gotPositive && gotNegative) { - if (_positivePrefix.length > _negativePrefix.length) { - gotNegative = false; - } else if (_negativePrefix.length > _positivePrefix.length) { - gotPositive = false; - } - } - if (skip) { - if (gotPositive) input.pop(_positivePrefix.length); - if (gotNegative) input.pop(_negativePrefix.length); - } - } - - /// If the rest of our input is either the positive or negative suffix, - /// set [gotPositiveSuffix] or [gotNegativeSuffix] accordingly. - void checkSuffixes() { - var remainder = input.peekAll(); - if (remainder == _positiveSuffix) gotPositiveSuffix = true; - if (remainder == _negativeSuffix) gotNegativeSuffix = true; - } - - /// We've encountered a character that's not a digit. Go through our - /// replacement rules looking for how to handle it. If we see something - /// that's not a digit and doesn't have a replacement, then we're done - /// and the number is probably invalid. - void processNonDigit() { - // It might just be a prefix that we haven't skipped. We don't want to - // skip them initially because they might also be semantically meaningful, - // e.g. leading %. So we allow them through the loop, but only once. - var foundAnInterpretation = false; - if (input.atStart && !prefixesSkipped) { - prefixesSkipped = true; - checkPrefixes(skip: true); - foundAnInterpretation = true; - } - - for (var key in replacements.keys) { - if (input.startsWith(key)) { - _normalized.write(replacements[key]!()); - input.pop(key.length); - return; - } - } - // We haven't found either of these things, this seems invalid. - if (!foundAnInterpretation) { - done = true; - } - } - - /// Parse [text] and return the resulting number. Throws [FormatException] - /// if we can't parse it. - num parse() { - if (text == symbols.NAN) return 0.0 / 0.0; - if (text == '$_positivePrefix${symbols.INFINITY}$_positiveSuffix') { - return 1.0 / 0.0; - } - if (text == '$_negativePrefix${symbols.INFINITY}$_negativeSuffix') { - return -1.0 / 0.0; - } - - checkPrefixes(); - var parsed = parseNumber(input); - - if (gotPositive && !gotPositiveSuffix) invalidNumber(); - if (gotNegative && !gotNegativeSuffix) invalidNumber(); - if (!input.atEnd) invalidNumber(); - - return parsed; - } - - /// The number is invalid, throw a [FormatException]. - void invalidNumber() => - throw FormatException('Invalid Number: ${input.contents}'); - - /// Parse the number portion of the input, i.e. not any prefixes or suffixes, - /// and assuming NaN and Infinity are already handled. - num parseNumber(StringStack input) { - if (gotNegative) { - _normalized.write('-'); - } - while (!done && !input.atEnd) { - var digit = asDigit(input.peek()); - if (digit != null) { - _normalized.writeCharCode(constants.asciiZeroCodeUnit + digit); - input.next(); - } else { - processNonDigit(); - } - checkSuffixes(); - } - - var normalizedText = _normalized.toString(); - num? parsed = int.tryParse(normalizedText); - parsed ??= double.parse(normalizedText); - return parsed / scale; - } -} diff --git a/dart/test/vendor/intl/number_format_test.dart b/dart/test/vendor/intl/number_format_test.dart index f19fb00e6b..4933bfb890 100644 --- a/dart/test/vendor/intl/number_format_test.dart +++ b/dart/test/vendor/intl/number_format_test.dart @@ -27,7 +27,7 @@ void main() { ]; for (var inputAndOutput in inputsAndOutputs) { - expect(NumberFormat('#.################').format(inputAndOutput.i), + expect(NumberFormat().format(inputAndOutput.i), inputAndOutput.o); } }); From d7c734197caaf9d344e51bc27d9cfb1a37257c47 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 13 Mar 2023 10:39:48 +0100 Subject: [PATCH 12/29] remove prefixes & suffixes --- dart/lib/src/vendor/intl/number_format.dart | 22 +-------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/dart/lib/src/vendor/intl/number_format.dart b/dart/lib/src/vendor/intl/number_format.dart index 47b73ec9ad..230e42bd2a 100644 --- a/dart/lib/src/vendor/intl/number_format.dart +++ b/dart/lib/src/vendor/intl/number_format.dart @@ -47,11 +47,6 @@ import 'constants.dart' as constants; /// limited. For example, at the moment, scientificPattern prints only as /// equivalent to "#E0" and does not take into account significant digits. class NumberFormat { - /// Variables to determine how number printing behaves. - final String negativePrefix; - final String positivePrefix; - final String negativeSuffix; - final String positiveSuffix; /// Set to true if the format has explicitly set the grouping size. final bool _decimalSeparatorAlwaysShown; @@ -189,11 +184,7 @@ class NumberFormat { this.localeZero, this._symbols, this._zeroOffset) - : positivePrefix = "", - negativePrefix = "-", - positiveSuffix = "", - negativeSuffix = "", - multiplier = 1, + : multiplier = 1, _multiplierDigits = 0, minimumExponentDigits = 0, maximumIntegerDigits = 40, @@ -220,11 +211,8 @@ class NumberFormat { /// Format [number] according to our pattern and return the formatted string. String format(dynamic number) { if (_isNaN(number)) return symbols.NAN; - if (_isInfinite(number)) return '${_signPrefix(number)}${symbols.INFINITY}'; - _add(_signPrefix(number)); _formatNumber(number.abs()); - _add(_signSuffix(number)); var result = _buffer.toString(); _buffer.clear(); @@ -559,14 +547,6 @@ class NumberFormat { /// In other words, a constant _localeZero - _zero. Initialized when /// the locale is set. final int _zeroOffset; - - /// Returns the prefix for [x] based on whether it's positive or negative. - /// In en_US this would be '' and '-' respectively. - String _signPrefix(x) => x.isNegative ? negativePrefix : positivePrefix; - - /// Returns the suffix for [x] based on wether it's positive or negative. - /// In en_US there are no suffixes for positive or negative. - String _signSuffix(x) => x.isNegative ? negativeSuffix : positiveSuffix; } final _ln10 = log(10); From 9fa5a3a812896f578c9fd7b8681c2a61f6344a3c Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 13 Mar 2023 10:45:27 +0100 Subject: [PATCH 13/29] remove more unused code --- dart/lib/src/vendor/intl/constants.dart | 164 - dart/lib/src/vendor/intl/global_state.dart | 19 - dart/lib/src/vendor/intl/intl_helpers.dart | 226 - dart/lib/src/vendor/intl/number_format.dart | 50 +- .../src/vendor/intl/number_symbols_data.dart | 5348 ----------------- dart/lib/src/vendor/intl/string_stack.dart | 47 - 6 files changed, 20 insertions(+), 5834 deletions(-) delete mode 100644 dart/lib/src/vendor/intl/constants.dart delete mode 100644 dart/lib/src/vendor/intl/global_state.dart delete mode 100644 dart/lib/src/vendor/intl/intl_helpers.dart delete mode 100644 dart/lib/src/vendor/intl/number_symbols_data.dart delete mode 100644 dart/lib/src/vendor/intl/string_stack.dart diff --git a/dart/lib/src/vendor/intl/constants.dart b/dart/lib/src/vendor/intl/constants.dart deleted file mode 100644 index 5db4ebfd92..0000000000 --- a/dart/lib/src/vendor/intl/constants.dart +++ /dev/null @@ -1,164 +0,0 @@ -final int asciiZeroCodeUnit = '0'.codeUnitAt(0); - -final Map simpleCurrencySymbols = { - 'AFN': 'Af.', - 'TOP': r'T$', - 'MGA': 'Ar', - 'THB': '\u0e3f', - 'PAB': 'B/.', - 'ETB': 'Birr', - 'VEF': 'Bs', - 'BOB': 'Bs', - 'GHS': 'GHS', - 'CRC': '\u20a1', - 'NIO': r'C$', - 'GMD': 'GMD', - 'MKD': 'din', - 'BHD': 'din', - 'DZD': 'din', - 'IQD': 'din', - 'JOD': 'din', - 'KWD': 'din', - 'LYD': 'din', - 'RSD': 'din', - 'TND': 'din', - 'AED': 'dh', - 'MAD': 'dh', - 'STD': 'Db', - 'BSD': r'$', - 'FJD': r'$', - 'GYD': r'$', - 'KYD': r'$', - 'LRD': r'$', - 'SBD': r'$', - 'SRD': r'$', - 'AUD': r'$', - 'BBD': r'$', - 'BMD': r'$', - 'BND': r'$', - 'BZD': r'$', - 'CAD': r'$', - 'HKD': r'$', - 'JMD': r'$', - 'NAD': r'$', - 'NZD': r'$', - 'SGD': r'$', - 'TTD': r'$', - 'TWD': r'NT$', - 'USD': r'$', - 'XCD': r'$', - 'VND': '\u20ab', - 'AMD': 'Dram', - 'CVE': 'CVE', - 'EUR': '\u20ac', - 'AWG': 'Afl.', - 'HUF': 'Ft', - 'BIF': 'FBu', - 'CDF': 'FrCD', - 'CHF': 'CHF', - 'DJF': 'Fdj', - 'GNF': 'FG', - 'RWF': 'RF', - 'XOF': 'CFA', - 'XPF': 'FCFP', - 'KMF': 'CF', - 'XAF': 'FCFA', - 'HTG': 'HTG', - 'PYG': 'Gs', - 'UAH': '\u20b4', - 'PGK': 'PGK', - 'LAK': '\u20ad', - 'CZK': 'K\u010d', - 'SEK': 'kr', - 'ISK': 'kr', - 'DKK': 'kr', - 'NOK': 'kr', - 'HRK': 'kn', - 'MWK': 'MWK', - 'ZMK': 'ZWK', - 'AOA': 'Kz', - 'MMK': 'K', - 'GEL': 'GEL', - 'LVL': 'Ls', - 'ALL': 'Lek', - 'HNL': 'L', - 'SLL': 'SLL', - 'MDL': 'MDL', - 'RON': 'RON', - 'BGN': 'lev', - 'SZL': 'SZL', - 'TRY': 'TL', - 'LTL': 'Lt', - 'LSL': 'LSL', - 'AZN': 'man.', - 'BAM': 'KM', - 'MZN': 'MTn', - 'NGN': '\u20a6', - 'ERN': 'Nfk', - 'BTN': 'Nu.', - 'MRO': 'MRO', - 'MOP': 'MOP', - 'CUP': r'$', - 'CUC': r'$', - 'ARS': r'$', - 'CLF': 'UF', - 'CLP': r'$', - 'COP': r'$', - 'DOP': r'$', - 'MXN': r'$', - 'PHP': '\u20b1', - 'UYU': r'$', - 'FKP': '£', - 'GIP': '£', - 'SHP': '£', - 'EGP': 'E£', - 'LBP': 'L£', - 'SDG': 'SDG', - 'SSP': 'SSP', - 'GBP': '£', - 'SYP': '£', - 'BWP': 'P', - 'GTQ': 'Q', - 'ZAR': 'R', - 'BRL': r'R$', - 'OMR': 'Rial', - 'QAR': 'Rial', - 'YER': 'Rial', - 'IRR': 'Rial', - 'KHR': 'Riel', - 'MYR': 'RM', - 'SAR': 'Riyal', - 'BYR': 'BYR', - 'RUB': '\u20BD', - 'MUR': 'Rs', - 'SCR': 'SCR', - 'LKR': 'Rs', - 'NPR': 'Rs', - 'INR': '\u20b9', - 'PKR': 'Rs', - 'IDR': 'Rp', - 'ILS': '\u20aa', - 'KES': 'Ksh', - 'SOS': 'SOS', - 'TZS': 'TSh', - 'UGX': 'UGX', - 'PEN': 'S/', - 'KGS': 'KGS', - 'UZS': 'so\u02bcm', - 'TJS': 'Som', - 'BDT': '\u09f3', - 'WST': 'WST', - 'KZT': '\u20b8', - 'MNT': '\u20ae', - 'VUV': 'VUV', - 'KPW': '\u20a9', - 'KRW': '\u20a9', - 'JPY': '¥', - 'CNY': '¥', - 'PLN': 'z\u0142', - 'MVR': 'Rf', - 'NLG': 'NAf', - 'ZMW': 'ZK', - 'ANG': 'ƒ', - 'TMT': 'TMT', -}; diff --git a/dart/lib/src/vendor/intl/global_state.dart b/dart/lib/src/vendor/intl/global_state.dart deleted file mode 100644 index 9060196e6a..0000000000 --- a/dart/lib/src/vendor/intl/global_state.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'dart:async'; - -String systemLocale = 'en_US'; - -String? _defaultLocale; - -set defaultLocale(String? newLocale) { - _defaultLocale = newLocale; -} - -String? get defaultLocale { - var zoneLocale = Zone.current[#Intl.locale] as String?; - return zoneLocale ?? _defaultLocale; -} - -String getCurrentLocale() { - defaultLocale ??= systemLocale; - return defaultLocale!; -} diff --git a/dart/lib/src/vendor/intl/intl_helpers.dart b/dart/lib/src/vendor/intl/intl_helpers.dart deleted file mode 100644 index bb9687e406..0000000000 --- a/dart/lib/src/vendor/intl/intl_helpers.dart +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -/// A library for general helper code associated with the intl library -/// rather than confined to specific parts of it. -library intl_helpers; - -import 'global_state.dart' as global_state; -import 'intl_helpers.dart' as helpers; - -/// Type for the callback action when a message translation is not found. -typedef MessageIfAbsent = String? Function( - String? messageText, List? args); - -/// This is used as a marker for a locale data map that hasn't been initialized, -/// and will throw an exception on any usage that isn't the fallback -/// patterns/symbols provided. -class UninitializedLocaleData implements MessageLookup { - final String message; - final F fallbackData; - UninitializedLocaleData(this.message, this.fallbackData); - - bool _isFallback(String key) => canonicalizedLocale(key) == 'en_US'; - - F operator [](String key) => - _isFallback(key) ? fallbackData : _throwException(); - - /// If a message is looked up before any locale initialization, record it, - /// and throw an exception with that information once the locale is - /// initialized. - /// - /// Set this during development to find issues with race conditions between - /// message caching and locale initialization. If the results of Intl.message - /// calls aren't being cached, then this won't help. - /// - /// There's nothing that actually sets this, so checking this requires - /// patching the code here. - static final bool throwOnFallback = false; - - /// The messages that were called before the locale was initialized. - final List _badMessages = []; - - void _reportErrors() { - if (throwOnFallback && _badMessages.isNotEmpty) { - throw StateError( - 'The following messages were called before locale initialization:' - ' $_uninitializedMessages'); - } - } - - String get _uninitializedMessages => - (_badMessages.toSet().toList()..sort()).join('\n '); - - @override - String? lookupMessage(String? messageText, String? locale, String? name, - List? args, String? meaning, - {MessageIfAbsent? ifAbsent}) { - if (throwOnFallback) { - _badMessages.add((name ?? messageText)!); - } - return messageText; - } - - /// Given an initial locale or null, returns the locale that will be used - /// for messages. - String findLocale(String? locale) => - locale ?? global_state.getCurrentLocale(); - - List get keys => _throwException() as List; - - bool containsKey(String key) { - if (!_isFallback(key)) { - _throwException(); - } - return true; - } - - F _throwException() { - throw LocaleDataException('Locale data has not been initialized' - ', call $message.'); - } - - @override - void addLocale(String localeName, Function findLocale) => _throwException(); -} - -abstract class MessageLookup { - String? lookupMessage(String? messageText, String? locale, String? name, - List? args, String? meaning, - {MessageIfAbsent? ifAbsent}); - void addLocale(String localeName, Function findLocale); -} - -class LocaleDataException implements Exception { - final String message; - LocaleDataException(this.message); - @override - String toString() => 'LocaleDataException: $message'; -} - -/// An abstract superclass for data readers to keep the type system happy. -abstract class LocaleDataReader { - Future read(String locale); -} - -/// The internal mechanism for looking up messages. We expect this to be set -/// by the implementing package so that we're not dependent on its -/// implementation. -MessageLookup messageLookup = - UninitializedLocaleData('initializeMessages()', null); - -/// Initialize the message lookup mechanism. This is for internal use only. -/// User applications should import `message_lookup_by_library.dart` and call -/// `initializeMessages` -void initializeInternalMessageLookup(Function lookupFunction) { - if (messageLookup is UninitializedLocaleData) { - // This line has to be precisely this way to work around an analyzer crash. - (messageLookup as UninitializedLocaleData)._reportErrors(); - messageLookup = lookupFunction(); - } -} - -/// If a message is a string literal without interpolation, compute -/// a name based on that and the meaning, if present. -// NOTE: THIS LOGIC IS DUPLICATED IN intl_translation AND THE TWO MUST MATCH. -String? computeMessageName(String? name, String? text, String? meaning) { - if (name != null && name != '') return name; - return meaning == null ? text : '${text}_$meaning'; -} - -/// Returns an index of a separator between language and region. -/// -/// Assumes that language length can be only 2 or 3. -int _separatorIndex(String locale) { - if (locale.length < 3) { - return -1; - } - if (locale[2] == '-' || locale[2] == '_') { - return 2; - } - if (locale.length < 4) { - return -1; - } - if (locale[3] == '-' || locale[3] == '_') { - return 3; - } - return -1; -} - -String canonicalizedLocale(String? aLocale) { -// Locales of length < 5 are presumably two-letter forms, or else malformed. -// We return them unmodified and if correct they will be found. -// Locales longer than 6 might be malformed, but also do occur. Do as -// little as possible to them, but make the '-' be an '_' if it's there. -// We treat C as a special case, and assume it wants en_ISO for formatting. -// TODO(alanknight): en_ISO is probably not quite right for the C/Posix -// locale for formatting. Consider adding C to the formats database. - if (aLocale == null) return global_state.getCurrentLocale(); - if (aLocale == 'C') return 'en_ISO'; - if (aLocale.length < 5) return aLocale; - - var separatorIndex = _separatorIndex(aLocale); - if (separatorIndex == -1) { - return aLocale; - } - var language = aLocale.substring(0, separatorIndex); - var region = aLocale.substring(separatorIndex + 1); - // If it's longer than three it's something odd, so don't touch it. - if (region.length <= 3) region = region.toUpperCase(); - return '${language}_$region'; -} - -String? verifiedLocale(String? newLocale, bool Function(String) localeExists, - String? Function(String)? onFailure) { -// TODO(alanknight): Previously we kept a single verified locale on the Intl -// object, but with different verification for different uses, that's more -// difficult. As a result, we call this more often. Consider keeping -// verified locales for each purpose if it turns out to be a performance -// issue. - if (newLocale == null) { - return verifiedLocale( - global_state.getCurrentLocale(), localeExists, onFailure); - } - if (localeExists(newLocale)) { - return newLocale; - } - for (var each in [ - helpers.canonicalizedLocale(newLocale), - helpers.shortLocale(newLocale), - 'fallback' - ]) { - if (localeExists(each)) { - return each; - } - } - return (onFailure ?? _throwLocaleError)(newLocale); -} - -/// The default action if a locale isn't found in verifiedLocale. Throw -/// an exception indicating the locale isn't correct. -String _throwLocaleError(String localeName) { - throw ArgumentError('Invalid locale "$localeName"'); -} - -/// Return the short version of a locale name, e.g. 'en_US' => 'en' -String shortLocale(String aLocale) { - // TODO(b/241094372): Remove this check. - if (aLocale == 'invalid') { - return 'in'; - } - if (aLocale.length < 2) { - return aLocale; - } - var separatorIndex = _separatorIndex(aLocale); - if (separatorIndex == -1) { - if (aLocale.length < 4) { - // aLocale is already only a language code. - return aLocale.toLowerCase(); - } else { - // Something weird, returning as is. - return aLocale; - } - } - return aLocale.substring(0, separatorIndex).toLowerCase(); -} diff --git a/dart/lib/src/vendor/intl/number_format.dart b/dart/lib/src/vendor/intl/number_format.dart index 230e42bd2a..e09d9de800 100644 --- a/dart/lib/src/vendor/intl/number_format.dart +++ b/dart/lib/src/vendor/intl/number_format.dart @@ -1,10 +1,6 @@ import 'dart:math'; import 'number_symbols.dart'; -import 'number_symbols_data.dart'; -import 'intl_helpers.dart' as helpers; - -import 'constants.dart' as constants; // ignore_for_file: constant_identifier_names @@ -124,9 +120,6 @@ class NumberFormat { /// How many digits are there in the [multiplier]. final int _multiplierDigits; - /// The locale in which we print numbers. - final String _locale; - /// Caches the symbols used for our locale. final NumberSymbols _symbols; @@ -166,21 +159,33 @@ class NumberFormat { /// function [computeCurrencySymbol] that will compute it later, given other /// information, typically the verified locale. factory NumberFormat._forPattern(String? locale) { - locale = helpers.verifiedLocale(locale, localeExists, null)!; - - var symbols = numberFormatSymbols[locale] as NumberSymbols; + var symbols = NumberSymbols( + NAME: "en", + DECIMAL_SEP: '.', + GROUP_SEP: ',', + PERCENT: '%', + ZERO_DIGIT: '0', + PLUS_SIGN: '+', + MINUS_SIGN: '-', + EXP_SYMBOL: 'E', + PERMILL: '\u2030', + INFINITY: '\u221E', + NAN: 'NaN', + DECIMAL_PATTERN: '#,##0.###', + SCIENTIFIC_PATTERN: '#E0', + PERCENT_PATTERN: '#,##0%', + CURRENCY_PATTERN: '\u00A4#,##0.00', + DEF_CURRENCY_CODE: 'USD'); var localeZero = symbols.ZERO_DIGIT.codeUnitAt(0); - var zeroOffset = localeZero - constants.asciiZeroCodeUnit; + var zeroOffset = localeZero - '0'.codeUnitAt(0); return NumberFormat._( - locale, localeZero, symbols, zeroOffset); } NumberFormat._( - this._locale, this.localeZero, this._symbols, this._zeroOffset) @@ -194,16 +199,6 @@ class NumberFormat { _decimalSeparatorAlwaysShown = false, decimalDigits = null; - /// Return the locale code in which we operate, e.g. 'en_US' or 'pt'. - String get locale => _locale; - - /// Return true if the locale exists, or if it is null. The null case - /// is interpreted to mean that we use the default locale. - static bool localeExists(String? localeName) { - if (localeName == null) return false; - return numberFormatSymbols.containsKey(localeName); - } - /// Return the symbols which are used in our locale. Cache them to avoid /// repeated lookup. NumberSymbols get symbols => _symbols; @@ -212,18 +207,13 @@ class NumberFormat { String format(dynamic number) { if (_isNaN(number)) return symbols.NAN; - _formatNumber(number.abs()); + _formatFixed(number.abs()); var result = _buffer.toString(); _buffer.clear(); return result; } - /// Format the main part of the number in the form dictated by the pattern. - void _formatNumber(number) { - _formatFixed(number); - } - /// Used to test if we have exceeded integer limits. // TODO(alanknight): Do we have a MaxInt constant we could use instead? static final _maxInt = 1 is double ? pow(2, 52) : 1.0e300.floor(); @@ -500,7 +490,7 @@ class NumberFormat { void _formatFractionPart(String fractionPart, int minDigits) { var fractionLength = fractionPart.length; while (fractionPart.codeUnitAt(fractionLength - 1) == - constants.asciiZeroCodeUnit && + '0'.codeUnitAt(0) && fractionLength > minDigits + 1) { fractionLength--; } diff --git a/dart/lib/src/vendor/intl/number_symbols_data.dart b/dart/lib/src/vendor/intl/number_symbols_data.dart deleted file mode 100644 index b8ce1fc1cb..0000000000 --- a/dart/lib/src/vendor/intl/number_symbols_data.dart +++ /dev/null @@ -1,5348 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. -// Please see the AUTHORS file -// for details. All rights reserved. Use of this source -// code is governed by a -// BSD-style license that can be found in the LICENSE file. - -/// Date/time formatting symbols for all locales. -/// -/// DO NOT EDIT. This file is autogenerated by script. See -/// http://go/generate_number_constants.py using the --for_dart flag. -/// File generated from CLDR ver. 41 -/// -/// Before checkin, this file could have been manually edited. This is -/// to incorporate changes before we could correct CLDR. All manual -/// modification must be documented in this section, and should be -/// removed after those changes land to CLDR. -// MANUAL EDIT TO SUPPRESS WARNINGS IN GENERATED CODE -// ignore_for_file: unnecessary_new, prefer_single_quotes, prefer_const_constructors -library number_symbol_data; - -import 'number_symbols.dart'; - -/// Map from locale to [NumberSymbols] used for that locale. -// TODO(#482): "final Map" -final Map numberFormatSymbols = { - // Number formatting symbols for locale af. - "af": new NumberSymbols( - NAME: "af", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'ZAR'), - // Number formatting symbols for locale am. - "am": new NumberSymbols( - NAME: "am", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'ETB'), - // Number formatting symbols for locale ar. - "ar": new NumberSymbols( - NAME: "ar", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '\u200E%\u200E', - ZERO_DIGIT: '0', - PLUS_SIGN: '\u200E+', - MINUS_SIGN: '\u200E-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: '\u0644\u064A\u0633\u00A0\u0631\u0642\u0645\u064B\u0627', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', - DEF_CURRENCY_CODE: 'EGP'), - // Number formatting symbols for locale ar_DZ. - "ar_DZ": new NumberSymbols( - NAME: "ar_DZ", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '\u200E%\u200E', - ZERO_DIGIT: '0', - PLUS_SIGN: '\u200E+', - MINUS_SIGN: '\u200E-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: '\u0644\u064A\u0633\u00A0\u0631\u0642\u0645\u064B\u0627', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', - DEF_CURRENCY_CODE: 'DZD'), - // Number formatting symbols for locale ar_EG. - "ar_EG": new NumberSymbols( - NAME: "ar_EG", - DECIMAL_SEP: '\u066B', - GROUP_SEP: '\u066C', - PERCENT: '\u066A\u061C', - ZERO_DIGIT: '\u0660', - PLUS_SIGN: '\u061C+', - MINUS_SIGN: '\u061C-', - EXP_SYMBOL: '\u0627\u0633', - PERMILL: '\u0609', - INFINITY: '\u221E', - NAN: '\u0644\u064A\u0633\u00A0\u0631\u0642\u0645', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EGP'), - // Number formatting symbols for locale as. - "as": new NumberSymbols( - NAME: "as", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '\u09E6', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##,##0.00', - DEF_CURRENCY_CODE: 'INR'), - // Number formatting symbols for locale az. - "az": new NumberSymbols( - NAME: "az", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'AZN'), - // Number formatting symbols for locale be. - "be": new NumberSymbols( - NAME: "be", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'BYN'), - // Number formatting symbols for locale bg. - "bg": new NumberSymbols( - NAME: "bg", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'BGN'), - // Number formatting symbols for locale bm. - "bm": new NumberSymbols( - NAME: "bm", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'XOF'), - // Number formatting symbols for locale bn. - "bn": new NumberSymbols( - NAME: "bn", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '\u09E6', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##,##0.00\u00A4', - DEF_CURRENCY_CODE: 'BDT'), - // Number formatting symbols for locale br. - "br": new NumberSymbols( - NAME: "br", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale bs. - "bs": new NumberSymbols( - NAME: "bs", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'BAM'), - // Number formatting symbols for locale ca. - "ca": new NumberSymbols( - NAME: "ca", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale chr. - "chr": new NumberSymbols( - NAME: "chr", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'USD'), - // Number formatting symbols for locale cs. - "cs": new NumberSymbols( - NAME: "cs", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'CZK'), - // Number formatting symbols for locale cy. - "cy": new NumberSymbols( - NAME: "cy", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'GBP'), - // Number formatting symbols for locale da. - "da": new NumberSymbols( - NAME: "da", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'DKK'), - // Number formatting symbols for locale de. - "de": new NumberSymbols( - NAME: "de", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale de_AT. - "de_AT": new NumberSymbols( - NAME: "de_AT", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale de_CH. - "de_CH": new NumberSymbols( - NAME: "de_CH", - DECIMAL_SEP: '.', - GROUP_SEP: '\u2019', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00;\u00A4-#,##0.00', - DEF_CURRENCY_CODE: 'CHF'), - // Number formatting symbols for locale el. - "el": new NumberSymbols( - NAME: "el", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'e', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale en. - "en": new NumberSymbols( - NAME: "en", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'USD'), - // Number formatting symbols for locale en_AU. - "en_AU": new NumberSymbols( - NAME: "en_AU", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'e', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'AUD'), - // Number formatting symbols for locale en_CA. - "en_CA": new NumberSymbols( - NAME: "en_CA", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'CAD'), - // Number formatting symbols for locale en_GB. - "en_GB": new NumberSymbols( - NAME: "en_GB", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'GBP'), - // Number formatting symbols for locale en_IE. - "en_IE": new NumberSymbols( - NAME: "en_IE", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale en_IN. - "en_IN": new NumberSymbols( - NAME: "en_IN", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##,##0%', - CURRENCY_PATTERN: '\u00A4#,##,##0.00', - DEF_CURRENCY_CODE: 'INR'), - // Number formatting symbols for locale en_MY. - "en_MY": new NumberSymbols( - NAME: "en_MY", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'MYR'), - // Number formatting symbols for locale en_NZ. - "en_NZ": new NumberSymbols( - NAME: "en_NZ", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'NZD'), - // Number formatting symbols for locale en_SG. - "en_SG": new NumberSymbols( - NAME: "en_SG", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'SGD'), - // Number formatting symbols for locale en_US. - "en_US": new NumberSymbols( - NAME: "en_US", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'USD'), - // Number formatting symbols for locale en_ZA. - "en_ZA": new NumberSymbols( - NAME: "en_ZA", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'ZAR'), - // Number formatting symbols for locale es. - "es": new NumberSymbols( - NAME: "es", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale es_419. - "es_419": new NumberSymbols( - NAME: "es_419", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'MXN'), - // Number formatting symbols for locale es_ES. - "es_ES": new NumberSymbols( - NAME: "es_ES", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale es_MX. - "es_MX": new NumberSymbols( - NAME: "es_MX", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'MXN'), - // Number formatting symbols for locale es_US. - "es_US": new NumberSymbols( - NAME: "es_US", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'USD'), - // Number formatting symbols for locale et. - "et": new NumberSymbols( - NAME: "et", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '\u2212', - EXP_SYMBOL: '\u00D710^', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale eu. - "eu": new NumberSymbols( - NAME: "eu", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '\u2212', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '%\u00A0#,##0', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale fa. - "fa": new NumberSymbols( - NAME: "fa", - DECIMAL_SEP: '\u066B', - GROUP_SEP: '\u066C', - PERCENT: '\u066A', - ZERO_DIGIT: '\u06F0', - PLUS_SIGN: '\u200E+', - MINUS_SIGN: '\u200E\u2212', - EXP_SYMBOL: '\u00D7\u06F1\u06F0^', - PERMILL: '\u0609', - INFINITY: '\u221E', - NAN: '\u0646\u0627\u0639\u062F\u062F', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u200E\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'IRR'), - // Number formatting symbols for locale fi. - "fi": new NumberSymbols( - NAME: "fi", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '\u2212', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'ep\u00E4luku', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale fil. - "fil": new NumberSymbols( - NAME: "fil", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'PHP'), - // Number formatting symbols for locale fr. - "fr": new NumberSymbols( - NAME: "fr", - DECIMAL_SEP: ',', - GROUP_SEP: '\u202F', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale fr_CA. - "fr_CA": new NumberSymbols( - NAME: "fr_CA", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'CAD'), - // Number formatting symbols for locale fr_CH. - "fr_CH": new NumberSymbols( - NAME: "fr_CH", - DECIMAL_SEP: ',', - GROUP_SEP: '\u202F', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'CHF'), - // Number formatting symbols for locale fur. - "fur": new NumberSymbols( - NAME: "fur", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale ga. - "ga": new NumberSymbols( - NAME: "ga", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'Nuimh', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale gl. - "gl": new NumberSymbols( - NAME: "gl", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale gsw. - "gsw": new NumberSymbols( - NAME: "gsw", - DECIMAL_SEP: '.', - GROUP_SEP: '\u2019', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '\u2212', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'CHF'), - // Number formatting symbols for locale gu. - "gu": new NumberSymbols( - NAME: "gu", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##,##0.###', - SCIENTIFIC_PATTERN: '[#E0]', - PERCENT_PATTERN: '#,##,##0%', - CURRENCY_PATTERN: '\u00A4#,##,##0.00', - DEF_CURRENCY_CODE: 'INR'), - // Number formatting symbols for locale haw. - "haw": new NumberSymbols( - NAME: "haw", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'USD'), - // Number formatting symbols for locale he. - "he": new NumberSymbols( - NAME: "he", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '\u200E+', - MINUS_SIGN: '\u200E-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: - '\u200F#,##0.00\u00A0\u00A4;\u200F-#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'ILS'), - // Number formatting symbols for locale hi. - "hi": new NumberSymbols( - NAME: "hi", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##,##0.###', - SCIENTIFIC_PATTERN: '[#E0]', - PERCENT_PATTERN: '#,##,##0%', - CURRENCY_PATTERN: '\u00A4#,##,##0.00', - DEF_CURRENCY_CODE: 'INR'), - // Number formatting symbols for locale hr. - "hr": new NumberSymbols( - NAME: "hr", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '\u2212', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'HRK'), - // Number formatting symbols for locale hu. - "hu": new NumberSymbols( - NAME: "hu", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'HUF'), - // Number formatting symbols for locale hy. - "hy": new NumberSymbols( - NAME: "hy", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: '\u0548\u0579\u0539', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'AMD'), - // Number formatting symbols for locale id. - "id": new NumberSymbols( - NAME: "id", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'IDR'), - // Number formatting symbols for locale in. - "in": new NumberSymbols( - NAME: "in", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'IDR'), - // Number formatting symbols for locale is. - "is": new NumberSymbols( - NAME: "is", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'ISK'), - // Number formatting symbols for locale it. - "it": new NumberSymbols( - NAME: "it", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale it_CH. - "it_CH": new NumberSymbols( - NAME: "it_CH", - DECIMAL_SEP: '.', - GROUP_SEP: '\u2019', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00;\u00A4-#,##0.00', - DEF_CURRENCY_CODE: 'CHF'), - // Number formatting symbols for locale iw. - "iw": new NumberSymbols( - NAME: "iw", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '\u200E+', - MINUS_SIGN: '\u200E-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: - '\u200F#,##0.00\u00A0\u00A4;\u200F-#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'ILS'), - // Number formatting symbols for locale ja. - "ja": new NumberSymbols( - NAME: "ja", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'JPY'), - // Number formatting symbols for locale ka. - "ka": new NumberSymbols( - NAME: "ka", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: - '\u10D0\u10E0\u00A0\u10D0\u10E0\u10D8\u10E1\u00A0\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'GEL'), - // Number formatting symbols for locale kk. - "kk": new NumberSymbols( - NAME: "kk", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: '\u0441\u0430\u043D\u00A0\u0435\u043C\u0435\u0441', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'KZT'), - // Number formatting symbols for locale km. - "km": new NumberSymbols( - NAME: "km", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A4', - DEF_CURRENCY_CODE: 'KHR'), - // Number formatting symbols for locale kn. - "kn": new NumberSymbols( - NAME: "kn", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'INR'), - // Number formatting symbols for locale ko. - "ko": new NumberSymbols( - NAME: "ko", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'KRW'), - // Number formatting symbols for locale ky. - "ky": new NumberSymbols( - NAME: "ky", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: '\u0441\u0430\u043D\u00A0\u044D\u043C\u0435\u0441', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'KGS'), - // Number formatting symbols for locale ln. - "ln": new NumberSymbols( - NAME: "ln", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'CDF'), - // Number formatting symbols for locale lo. - "lo": new NumberSymbols( - NAME: "lo", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: - '\u0E9A\u0ECD\u0EC8\u200B\u0EC1\u0EA1\u0EC8\u0E99\u200B\u0EC2\u0E95\u200B\u0EC0\u0EA5\u0E81', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00;\u00A4-#,##0.00', - DEF_CURRENCY_CODE: 'LAK'), - // Number formatting symbols for locale lt. - "lt": new NumberSymbols( - NAME: "lt", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '\u2212', - EXP_SYMBOL: '\u00D710^', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale lv. - "lv": new NumberSymbols( - NAME: "lv", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NS', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale mg. - "mg": new NumberSymbols( - NAME: "mg", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', - DEF_CURRENCY_CODE: 'MGA'), - // Number formatting symbols for locale mk. - "mk": new NumberSymbols( - NAME: "mk", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'MKD'), - // Number formatting symbols for locale ml. - "ml": new NumberSymbols( - NAME: "ml", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'INR'), - // Number formatting symbols for locale mn. - "mn": new NumberSymbols( - NAME: "mn", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', - DEF_CURRENCY_CODE: 'MNT'), - // Number formatting symbols for locale mr. - "mr": new NumberSymbols( - NAME: "mr", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '\u0966', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##,##0.###', - SCIENTIFIC_PATTERN: '[#E0]', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'INR'), - // Number formatting symbols for locale ms. - "ms": new NumberSymbols( - NAME: "ms", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'MYR'), - // Number formatting symbols for locale mt. - "mt": new NumberSymbols( - NAME: "mt", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale my. - "my": new NumberSymbols( - NAME: "my", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '\u1040', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: - '\u1002\u100F\u1014\u103A\u1038\u1019\u101F\u102F\u1010\u103A\u101E\u1031\u102C', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'MMK'), - // Number formatting symbols for locale nb. - "nb": new NumberSymbols( - NAME: "nb", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '\u2212', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00;\u00A4\u00A0-#,##0.00', - DEF_CURRENCY_CODE: 'NOK'), - // Number formatting symbols for locale ne. - "ne": new NumberSymbols( - NAME: "ne", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '\u0966', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##,##0.00', - DEF_CURRENCY_CODE: 'NPR'), - // Number formatting symbols for locale nl. - "nl": new NumberSymbols( - NAME: "nl", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00;\u00A4\u00A0-#,##0.00', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale no. - "no": new NumberSymbols( - NAME: "no", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '\u2212', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00;\u00A4\u00A0-#,##0.00', - DEF_CURRENCY_CODE: 'NOK'), - // Number formatting symbols for locale no_NO. - "no_NO": new NumberSymbols( - NAME: "no_NO", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '\u2212', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00;\u00A4\u00A0-#,##0.00', - DEF_CURRENCY_CODE: 'NOK'), - // Number formatting symbols for locale nyn. - "nyn": new NumberSymbols( - NAME: "nyn", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'UGX'), - // Number formatting symbols for locale or. - "or": new NumberSymbols( - NAME: "or", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'INR'), - // Number formatting symbols for locale pa. - "pa": new NumberSymbols( - NAME: "pa", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##,##0.###', - SCIENTIFIC_PATTERN: '[#E0]', - PERCENT_PATTERN: '#,##,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##,##0.00', - DEF_CURRENCY_CODE: 'INR'), - // Number formatting symbols for locale pl. - "pl": new NumberSymbols( - NAME: "pl", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'PLN'), - // Number formatting symbols for locale ps. - "ps": new NumberSymbols( - NAME: "ps", - DECIMAL_SEP: '\u066B', - GROUP_SEP: '\u066C', - PERCENT: '\u066A', - ZERO_DIGIT: '\u06F0', - PLUS_SIGN: '\u200E+\u200E', - MINUS_SIGN: '\u200E-\u200E', - EXP_SYMBOL: '\u00D7\u06F1\u06F0^', - PERMILL: '\u0609', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'AFN'), - // Number formatting symbols for locale pt. - "pt": new NumberSymbols( - NAME: "pt", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', - DEF_CURRENCY_CODE: 'BRL'), - // Number formatting symbols for locale pt_BR. - "pt_BR": new NumberSymbols( - NAME: "pt_BR", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', - DEF_CURRENCY_CODE: 'BRL'), - // Number formatting symbols for locale pt_PT. - "pt_PT": new NumberSymbols( - NAME: "pt_PT", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale ro. - "ro": new NumberSymbols( - NAME: "ro", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'RON'), - // Number formatting symbols for locale ru. - "ru": new NumberSymbols( - NAME: "ru", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: '\u043D\u0435\u00A0\u0447\u0438\u0441\u043B\u043E', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'RUB'), - // Number formatting symbols for locale si. - "si": new NumberSymbols( - NAME: "si", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'LKR'), - // Number formatting symbols for locale sk. - "sk": new NumberSymbols( - NAME: "sk", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'e', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale sl. - "sl": new NumberSymbols( - NAME: "sl", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '\u2212', - EXP_SYMBOL: 'e', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'EUR'), - // Number formatting symbols for locale sq. - "sq": new NumberSymbols( - NAME: "sq", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'ALL'), - // Number formatting symbols for locale sr. - "sr": new NumberSymbols( - NAME: "sr", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'RSD'), - // Number formatting symbols for locale sr_Latn. - "sr_Latn": new NumberSymbols( - NAME: "sr_Latn", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'RSD'), - // Number formatting symbols for locale sv. - "sv": new NumberSymbols( - NAME: "sv", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '\u2212', - EXP_SYMBOL: '\u00D710^', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0\u00A0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'SEK'), - // Number formatting symbols for locale sw. - "sw": new NumberSymbols( - NAME: "sw", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', - DEF_CURRENCY_CODE: 'TZS'), - // Number formatting symbols for locale ta. - "ta": new NumberSymbols( - NAME: "ta", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##,##0.00', - DEF_CURRENCY_CODE: 'INR'), - // Number formatting symbols for locale te. - "te": new NumberSymbols( - NAME: "te", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##,##0.00', - DEF_CURRENCY_CODE: 'INR'), - // Number formatting symbols for locale th. - "th": new NumberSymbols( - NAME: "th", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'THB'), - // Number formatting symbols for locale tl. - "tl": new NumberSymbols( - NAME: "tl", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'PHP'), - // Number formatting symbols for locale tr. - "tr": new NumberSymbols( - NAME: "tr", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '%#,##0', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'TRY'), - // Number formatting symbols for locale uk. - "uk": new NumberSymbols( - NAME: "uk", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: '\u0415', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'UAH'), - // Number formatting symbols for locale ur. - "ur": new NumberSymbols( - NAME: "ur", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '\u200E+', - MINUS_SIGN: '\u200E-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4\u00A0#,##0.00', - DEF_CURRENCY_CODE: 'PKR'), - // Number formatting symbols for locale uz. - "uz": new NumberSymbols( - NAME: "uz", - DECIMAL_SEP: ',', - GROUP_SEP: '\u00A0', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'son\u00A0emas', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'UZS'), - // Number formatting symbols for locale vi. - "vi": new NumberSymbols( - NAME: "vi", - DECIMAL_SEP: ',', - GROUP_SEP: '.', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '#,##0.00\u00A0\u00A4', - DEF_CURRENCY_CODE: 'VND'), - // Number formatting symbols for locale zh. - "zh": new NumberSymbols( - NAME: "zh", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'CNY'), - // Number formatting symbols for locale zh_CN. - "zh_CN": new NumberSymbols( - NAME: "zh_CN", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'CNY'), - // Number formatting symbols for locale zh_HK. - "zh_HK": new NumberSymbols( - NAME: "zh_HK", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: '\u975E\u6578\u503C', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'HKD'), - // Number formatting symbols for locale zh_TW. - "zh_TW": new NumberSymbols( - NAME: "zh_TW", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: '\u975E\u6578\u503C', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'TWD'), - // Number formatting symbols for locale zu. - "zu": new NumberSymbols( - NAME: "zu", - DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', - ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', - NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'ZAR') -}; - -Map compactNumberSymbols = { - // Compact number symbols for locale af. - "af": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0k'}, - 6: {'other': '0\u00A0m'}, - 9: {'other': '0\u00A0mjd'}, - 12: {'other': '0\u00A0bn'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 duisend'}, - 6: {'other': '0 miljoen'}, - 9: {'other': '0 miljard'}, - 12: {'other': '0 biljoen'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u00A0k'}, - 6: {'other': '\u00A40\u00A0m'}, - 9: {'other': '\u00A40\u00A0mjd'}, - 12: {'other': '\u00A40\u00A0bn'}, - }), - // Compact number symbols for locale am. - "am": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u123A'}, - 6: {'other': '0\u00A0\u121A'}, - 9: {'other': '0\u00A0\u1262'}, - 12: {'other': '0\u00A0\u1275'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u123A'}, - 6: {'other': '0 \u121A\u120A\u12EE\u1295'}, - 9: {'other': '0 \u1262\u120A\u12EE\u1295'}, - 12: {'other': '0 \u1275\u122A\u120A\u12EE\u1295'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u00A0\u123A'}, - 6: {'other': '\u00A40\u00A0\u121A'}, - 9: {'other': '\u00A40\u00A0\u1262'}, - 12: {'other': '\u00A40\u00A0\u1275'}, - }), - // Compact number symbols for locale ar. - "ar": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: { - 'few': '0\u00A0\u0622\u0644\u0627\u0641', - 'many': '0\u00A0\u0623\u0644\u0641', - 'one': '0\u00A0\u0623\u0644\u0641', - 'other': '0\u00A0\u0623\u0644\u0641', - 'two': '0\u00A0\u0623\u0644\u0641', - 'zero': '0\u00A0\u0623\u0644\u0641', - }, - 4: {'other': '00\u00A0\u0623\u0644\u0641'}, - 6: {'other': '0\u00A0\u0645\u0644\u064A\u0648\u0646'}, - 9: {'other': '0\u00A0\u0645\u0644\u064A\u0627\u0631'}, - 12: {'other': '0\u00A0\u062A\u0631\u0644\u064A\u0648\u0646'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 \u0622\u0644\u0627\u0641', - 'many': '0 \u0623\u0644\u0641', - 'one': '0 \u0623\u0644\u0641', - 'other': '0 \u0623\u0644\u0641', - 'two': '0 \u0623\u0644\u0641', - 'zero': '0 \u0623\u0644\u0641', - }, - 4: {'other': '00 \u0623\u0644\u0641'}, - 6: { - 'few': '0 \u0645\u0644\u0627\u064A\u064A\u0646', - 'many': '0 \u0645\u0644\u064A\u0648\u0646', - 'one': '0 \u0645\u0644\u064A\u0648\u0646', - 'other': '0 \u0645\u0644\u064A\u0648\u0646', - 'two': '0 \u0645\u0644\u064A\u0648\u0646', - 'zero': '0 \u0645\u0644\u064A\u0648\u0646', - }, - 8: {'other': '000 \u0645\u0644\u064A\u0648\u0646'}, - 9: {'other': '0 \u0645\u0644\u064A\u0627\u0631'}, - 12: {'other': '0 \u062A\u0631\u0644\u064A\u0648\u0646'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u0623\u0644\u0641\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u0645\u0644\u064A\u0648\u0646\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u0645\u0644\u064A\u0627\u0631\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u062A\u0631\u0644\u064A\u0648\u0646\u00A0\u00A4'}, - }), - // Compact number symbols for locale ar_DZ. - "ar_DZ": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: { - 'few': '0\u00A0\u0622\u0644\u0627\u0641', - 'many': '0\u00A0\u0623\u0644\u0641', - 'one': '0\u00A0\u0623\u0644\u0641', - 'other': '0\u00A0\u0623\u0644\u0641', - 'two': '0\u00A0\u0623\u0644\u0641', - 'zero': '0\u00A0\u0623\u0644\u0641', - }, - 4: {'other': '00\u00A0\u0623\u0644\u0641'}, - 6: {'other': '0\u00A0\u0645\u0644\u064A\u0648\u0646'}, - 9: {'other': '0\u00A0\u0645\u0644\u064A\u0627\u0631'}, - 12: {'other': '0\u00A0\u062A\u0631\u0644\u064A\u0648\u0646'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 \u0622\u0644\u0627\u0641', - 'many': '0 \u0623\u0644\u0641', - 'one': '0 \u0623\u0644\u0641', - 'other': '0 \u0623\u0644\u0641', - 'two': '0 \u0623\u0644\u0641', - 'zero': '0 \u0623\u0644\u0641', - }, - 4: {'other': '00 \u0623\u0644\u0641'}, - 6: { - 'few': '0 \u0645\u0644\u0627\u064A\u064A\u0646', - 'many': '0 \u0645\u0644\u064A\u0648\u0646', - 'one': '0 \u0645\u0644\u064A\u0648\u0646', - 'other': '0 \u0645\u0644\u064A\u0648\u0646', - 'two': '0 \u0645\u0644\u064A\u0648\u0646', - 'zero': '0 \u0645\u0644\u064A\u0648\u0646', - }, - 8: {'other': '000 \u0645\u0644\u064A\u0648\u0646'}, - 9: {'other': '0 \u0645\u0644\u064A\u0627\u0631'}, - 12: {'other': '0 \u062A\u0631\u0644\u064A\u0648\u0646'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u0623\u0644\u0641\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u0645\u0644\u064A\u0648\u0646\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u0645\u0644\u064A\u0627\u0631\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u062A\u0631\u0644\u064A\u0648\u0646\u00A0\u00A4'}, - }), - // Compact number symbols for locale ar_EG. - "ar_EG": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: { - 'few': '0\u00A0\u0622\u0644\u0627\u0641', - 'many': '0\u00A0\u0623\u0644\u0641', - 'one': '0\u00A0\u0623\u0644\u0641', - 'other': '0\u00A0\u0623\u0644\u0641', - 'two': '0\u00A0\u0623\u0644\u0641', - 'zero': '0\u00A0\u0623\u0644\u0641', - }, - 4: {'other': '00\u00A0\u0623\u0644\u0641'}, - 6: {'other': '0\u00A0\u0645\u0644\u064A\u0648\u0646'}, - 9: {'other': '0\u00A0\u0645\u0644\u064A\u0627\u0631'}, - 12: {'other': '0\u00A0\u062A\u0631\u0644\u064A\u0648\u0646'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 \u0622\u0644\u0627\u0641', - 'many': '0 \u0623\u0644\u0641', - 'one': '0 \u0623\u0644\u0641', - 'other': '0 \u0623\u0644\u0641', - 'two': '0 \u0623\u0644\u0641', - 'zero': '0 \u0623\u0644\u0641', - }, - 4: {'other': '00 \u0623\u0644\u0641'}, - 6: { - 'few': '0 \u0645\u0644\u0627\u064A\u064A\u0646', - 'many': '0 \u0645\u0644\u064A\u0648\u0646', - 'one': '0 \u0645\u0644\u064A\u0648\u0646', - 'other': '0 \u0645\u0644\u064A\u0648\u0646', - 'two': '0 \u0645\u0644\u064A\u0648\u0646', - 'zero': '0 \u0645\u0644\u064A\u0648\u0646', - }, - 8: {'other': '000 \u0645\u0644\u064A\u0648\u0646'}, - 9: {'other': '0 \u0645\u0644\u064A\u0627\u0631'}, - 12: {'other': '0 \u062A\u0631\u0644\u064A\u0648\u0646'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u0623\u0644\u0641\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u0645\u0644\u064A\u0648\u0646\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u0645\u0644\u064A\u0627\u0631\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u062A\u0631\u0644\u064A\u0648\u0646\u00A0\u00A4'}, - }), - // Compact number symbols for locale as. - "as": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u09B9\u09BE\u099C\u09BE\u09F0'}, - 5: {'other': '0\u00A0\u09B2\u09BE\u0996'}, - 6: {'other': '0\u00A0\u09A8\u09BF\u09AF\u09C1\u09A4'}, - 8: {'other': '000\u00A0\u09A8\u09BF\u0983'}, - 9: {'other': '0\u00A0\u09B6\u0983\u00A0\u0995\u09CB\u0983'}, - 11: {'other': '000\u00A0\u09B6\u0983\u00A0\u0995\u0983'}, - 12: {'other': '0\u00A0\u09B6\u0983\u00A0\u09AA\u0983'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u09B9\u09BE\u099C\u09BE\u09F0'}, - 5: {'other': '0 \u09B2\u09BE\u0996'}, - 6: {'other': '0 \u09A8\u09BF\u09AF\u09C1\u09A4'}, - 9: {'other': '0 \u09B6\u09A4 \u0995\u09CB\u099F\u09BF'}, - 12: { - 'other': '0 \u09B6\u09A4 \u09AA\u09F0\u09BE\u09F0\u09CD\u09A6\u09CD\u09A7' - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00\u00A0\u09B9\u09BE\u099C\u09BE\u09F0'}, - 5: {'other': '\u00A4\u00A0000\u00A0\u09B2\u09BE\u0996'}, - 6: {'other': '\u00A4\u00A00\u00A0\u09A8\u09BF\u09AF\u09C1\u09A4'}, - 9: { - 'other': '\u00A4\u00A00\u00A0\u09B6\u09A4\u00A0\u0995\u09CB\u099F\u09BF' - }, - 12: { - 'other': - '\u00A4\u00A00\u00A0\u09B6\u09A4\u00A0\u09AA\u09F0\u09BE\u09F0\u09CD\u09A6\u09CD\u09A7' - }, - }), - // Compact number symbols for locale az. - "az": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0\u00A0mln'}, - 9: {'other': '0\u00A0mlrd'}, - 12: {'other': '0\u00A0trln'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 min'}, - 6: {'other': '0 milyon'}, - 9: {'other': '0 milyard'}, - 12: {'other': '0 trilyon'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0K\u00A0\u00A4'}, - 6: {'other': '0M\u00A0\u00A4'}, - 9: {'other': '0G\u00A0\u00A4'}, - 12: {'other': '0T\u00A0\u00A4'}, - }), - // Compact number symbols for locale be. - "be": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0442\u044B\u0441.'}, - 6: {'other': '0\u00A0\u043C\u043B\u043D'}, - 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434'}, - 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 \u0442\u044B\u0441\u044F\u0447\u044B', - 'many': '0 \u0442\u044B\u0441\u044F\u0447', - 'one': '0 \u0442\u044B\u0441\u044F\u0447\u0430', - 'other': '0 \u0442\u044B\u0441\u044F\u0447\u044B', - }, - 6: { - 'few': '0 \u043C\u0456\u043B\u044C\u0451\u043D\u044B', - 'many': '0 \u043C\u0456\u043B\u044C\u0451\u043D\u0430\u045E', - 'one': '0 \u043C\u0456\u043B\u044C\u0451\u043D', - 'other': '0 \u043C\u0456\u043B\u044C\u0451\u043D\u0430', - }, - 9: { - 'few': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434\u044B', - 'many': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434\u0430\u045E', - 'one': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434', - 'other': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434\u0430', - }, - 12: { - 'few': '0 \u0442\u0440\u044B\u043B\u044C\u0451\u043D\u044B', - 'many': '0 \u0442\u0440\u044B\u043B\u044C\u0451\u043D\u0430\u045E', - 'one': '0 \u0442\u0440\u044B\u043B\u044C\u0451\u043D', - 'other': '0 \u0442\u0440\u044B\u043B\u044C\u0451\u043D\u0430', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u0442\u044B\u0441.\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u043C\u043B\u043D\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D\u00A0\u00A4'}, - }), - // Compact number symbols for locale bg. - "bg": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0445\u0438\u043B.'}, - 6: {'other': '0\u00A0\u043C\u043B\u043D.'}, - 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434.'}, - 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'one': '0 \u0445\u0438\u043B.', - 'other': '0 \u0445\u0438\u043B\u044F\u0434\u0438', - }, - 4: {'other': '00 \u0445\u0438\u043B\u044F\u0434\u0438'}, - 6: { - 'one': '0 \u043C\u0438\u043B\u0438\u043E\u043D', - 'other': '0 \u043C\u0438\u043B\u0438\u043E\u043D\u0430', - }, - 7: {'other': '00 \u043C\u0438\u043B\u0438\u043E\u043D\u0430'}, - 9: { - 'one': '0 \u043C\u0438\u043B\u0438\u0430\u0440\u0434', - 'other': '0 \u043C\u0438\u043B\u0438\u0430\u0440\u0434\u0430', - }, - 10: {'other': '00 \u043C\u0438\u043B\u0438\u0430\u0440\u0434\u0430'}, - 12: { - 'one': '0 \u0442\u0440\u0438\u043B\u0438\u043E\u043D', - 'other': '0 \u0442\u0440\u0438\u043B\u0438\u043E\u043D\u0430', - }, - 13: {'other': '00 \u0442\u0440\u0438\u043B\u0438\u043E\u043D\u0430'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u0445\u0438\u043B.\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u043C\u043B\u043D.\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434.\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D.\u00A0\u00A4'}, - }), - // Compact number symbols for locale bm. - "bm": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0G'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40G'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale bn. - "bn": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u09B9\u09BE'}, - 5: {'other': '0\u00A0\u09B2\u09BE'}, - 7: {'other': '0\u00A0\u0995\u09CB'}, - 10: { - 'one': '00\u00A0\u09B6\u09A4\u00A0\u0995\u09CB', - 'other': '00\u09B6\u09A4\u00A0\u0995\u09CB', - }, - 11: {'other': '000\u0995\u09CB'}, - 12: {'other': '0\u00A0\u09B2\u09BE.\u0995\u09CB.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u09B9\u09BE\u099C\u09BE\u09B0'}, - 5: {'other': '0 \u09B2\u09BE\u0996'}, - 7: {'other': '0 \u0995\u09CB\u099F\u09BF'}, - 12: {'other': '0 \u09B2\u09BE\u0996 \u0995\u09CB\u099F\u09BF'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u09B9\u09BE\u00A4'}, - 5: {'other': '0\u00A0\u09B2\u09BE\u00A4'}, - 7: {'other': '0\u00A0\u0995\u09CB\u00A4'}, - 12: {'other': '0\u00A0\u09B2\u09BE.\u0995\u09CB.\u00A4'}, - }), - // Compact number symbols for locale br. - "br": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0k'}, - 6: {'other': '0M'}, - 9: {'other': '0G'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 miliad', - 'many': '0 a viliado\u00F9', - 'one': '0 miliad', - 'other': '0 miliad', - 'two': '0 viliad', - }, - 6: { - 'few': '0 milion', - 'many': '0 a v/miliono\u00F9', - 'one': '0 milion', - 'other': '0 milion', - 'two': '0 v/milion', - }, - 9: { - 'few': '0 miliard', - 'many': '0 a viliardo\u00F9', - 'one': '0 miliard', - 'other': '0 miliard', - 'two': '0 viliard', - }, - 12: { - 'few': '0 bilion', - 'many': '0 a v/biliono\u00F9', - 'one': '0 bilion', - 'other': '0 bilion', - 'two': '0 v/bilion', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0k\u00A4'}, - 6: {'other': '0\u00A0M\u00A4'}, - 9: {'other': '0\u00A0G\u00A4'}, - 12: {'other': '0\u00A0T\u00A4'}, - }), - // Compact number symbols for locale bs. - "bs": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0hilj.'}, - 6: {'other': '0\u00A0mil.'}, - 9: {'other': '0\u00A0mlr.'}, - 12: {'other': '0\u00A0bil.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 hiljade', - 'one': '0 hiljada', - 'other': '0 hiljada', - }, - 6: { - 'few': '0 miliona', - 'one': '0 milion', - 'other': '0 miliona', - }, - 9: { - 'few': '0 milijarde', - 'one': '0 milijarda', - 'other': '0 milijardi', - }, - 12: { - 'few': '0 biliona', - 'one': '0 bilion', - 'other': '0 biliona', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0hilj.\u00A0\u00A4'}, - 6: {'other': '0\u00A0mil.\u00A0\u00A4'}, - 9: {'other': '0\u00A0mlr.\u00A0\u00A4'}, - 12: {'other': '0\u00A0bil.\u00A0\u00A4'}, - }), - // Compact number symbols for locale ca. - "ca": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0m'}, - 6: {'other': '0\u00A0M'}, - 10: {'other': '00mM'}, - 12: {'other': '0\u00A0B'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'one': '0 miler', - 'other': '0 milers', - }, - 4: {'other': '00 milers'}, - 6: { - 'one': '0 mili\u00F3', - 'other': '0 milions', - }, - 7: {'other': '00 milions'}, - 9: { - 'one': '0 miler de milions', - 'other': '0 milers de milions', - }, - 10: {'other': '00 milers de milions'}, - 12: { - 'one': '0 bili\u00F3', - 'other': '0 bilions', - }, - 13: {'other': '00 bilions'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0m\u00A0\u00A4'}, - 6: {'other': '0\u00A0M\u00A0\u00A4'}, - 10: {'other': '00mM\u00A0\u00A4'}, - 12: {'other': '0\u00A0B\u00A0\u00A4'}, - }), - // Compact number symbols for locale chr. - "chr": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u13A2\u13EF\u13A6\u13F4\u13B5'}, - 6: {'other': '0 \u13A2\u13F3\u13C6\u13D7\u13C5\u13DB'}, - 9: {'other': '0 \u13A2\u13EF\u13D4\u13B3\u13D7\u13C5\u13DB'}, - 12: {'other': '0 \u13A2\u13EF\u13E6\u13A0\u13D7\u13C5\u13DB'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale cs. - "cs": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0tis.'}, - 6: {'other': '0\u00A0mil.'}, - 9: {'other': '0\u00A0mld.'}, - 12: {'other': '0\u00A0bil.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 tis\u00EDce', - 'many': '0 tis\u00EDce', - 'one': '0 tis\u00EDc', - 'other': '0 tis\u00EDc', - }, - 4: { - 'few': '00 tis\u00EDc', - 'many': '00 tis\u00EDce', - 'one': '00 tis\u00EDc', - 'other': '00 tis\u00EDc', - }, - 6: { - 'few': '0 miliony', - 'many': '0 milionu', - 'one': '0 milion', - 'other': '0 milion\u016F', - }, - 7: { - 'few': '00 milion\u016F', - 'many': '00 milionu', - 'one': '00 milion\u016F', - 'other': '00 milion\u016F', - }, - 9: { - 'few': '0 miliardy', - 'many': '0 miliardy', - 'one': '0 miliarda', - 'other': '0 miliard', - }, - 10: { - 'few': '00 miliard', - 'many': '00 miliardy', - 'one': '00 miliard', - 'other': '00 miliard', - }, - 12: { - 'few': '0 biliony', - 'many': '0 bilionu', - 'one': '0 bilion', - 'other': '0 bilion\u016F', - }, - 13: { - 'few': '00 bilion\u016F', - 'many': '00 bilionu', - 'one': '00 bilion\u016F', - 'other': '00 bilion\u016F', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0tis.\u00A0\u00A4'}, - 6: {'other': '0\u00A0mil.\u00A0\u00A4'}, - 9: {'other': '0\u00A0mld.\u00A0\u00A4'}, - 12: {'other': '0\u00A0bil.\u00A0\u00A4'}, - }), - // Compact number symbols for locale cy. - "cy": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0K', - 'many': '0K', - 'one': '0 mil', - 'other': '0 mil', - 'two': '0K', - 'zero': '0 mil', - }, - 4: { - 'few': '00K', - 'many': '00K', - 'one': '00 mil', - 'other': '00 mil', - 'two': '00K', - 'zero': '00K', - }, - 6: { - 'few': '0M', - 'many': '0M', - 'one': '0 miliwn', - 'other': '0 miliwn', - 'two': '0M', - 'zero': '0M', - }, - 9: { - 'few': '0B', - 'many': '0B', - 'one': '0 biliwn', - 'other': '0 biliwn', - 'two': '0B', - 'zero': '0B', - }, - 12: { - 'few': '0T', - 'many': '0T', - 'one': '0 triliwn', - 'other': '0 triliwn', - 'two': '0T', - 'zero': '0T', - }, - 14: { - 'few': '000T', - 'many': '000T', - 'one': '000T', - 'other': '000 triliwn', - 'two': '000T', - 'zero': '000T', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale da. - "da": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0t'}, - 6: {'other': '0\u00A0mio.'}, - 9: {'other': '0\u00A0mia.'}, - 12: {'other': '0\u00A0bio.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 tusind'}, - 6: { - 'one': '0 million', - 'other': '0 millioner', - }, - 7: {'other': '00 millioner'}, - 9: { - 'one': '0 milliard', - 'other': '0 milliarder', - }, - 10: {'other': '00 milliarder'}, - 12: { - 'one': '0 billion', - 'other': '0 billioner', - }, - 13: {'other': '00 billioner'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0t\u00A0\u00A4'}, - 6: {'other': '0\u00A0mio.\u00A0\u00A4'}, - 9: {'other': '0\u00A0mia.\u00A0\u00A4'}, - 12: {'other': '0\u00A0bio.\u00A0\u00A4'}, - }), - // Compact number symbols for locale de. - "de": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0Mio.'}, - 9: {'other': '0\u00A0Mrd.'}, - 12: {'other': '0\u00A0Bio.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 Tausend'}, - 6: { - 'one': '0 Million', - 'other': '0 Millionen', - }, - 7: {'other': '00 Millionen'}, - 9: { - 'one': '0 Milliarde', - 'other': '0 Milliarden', - }, - 10: {'other': '00 Milliarden'}, - 12: { - 'one': '0 Billion', - 'other': '0 Billionen', - }, - 13: {'other': '00 Billionen'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0Mio.\u00A0\u00A4'}, - 9: {'other': '0\u00A0Mrd.\u00A0\u00A4'}, - 12: {'other': '0\u00A0Bio.\u00A0\u00A4'}, - }), - // Compact number symbols for locale de_AT. - "de_AT": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0Mio.'}, - 9: {'other': '0\u00A0Mrd.'}, - 12: {'other': '0\u00A0Bio.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 Tausend'}, - 6: { - 'one': '0 Million', - 'other': '0 Millionen', - }, - 7: {'other': '00 Millionen'}, - 9: { - 'one': '0 Milliarde', - 'other': '0 Milliarden', - }, - 10: {'other': '00 Milliarden'}, - 12: { - 'one': '0 Billion', - 'other': '0 Billionen', - }, - 13: {'other': '00 Billionen'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0Mio.\u00A0\u00A4'}, - 9: {'other': '0\u00A0Mrd.\u00A0\u00A4'}, - 12: {'other': '0\u00A0Bio.\u00A0\u00A4'}, - }), - // Compact number symbols for locale de_CH. - "de_CH": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0Mio.'}, - 9: {'other': '0\u00A0Mrd.'}, - 12: {'other': '0\u00A0Bio.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 Tausend'}, - 6: { - 'one': '0 Million', - 'other': '0 Millionen', - }, - 7: {'other': '00 Millionen'}, - 9: { - 'one': '0 Milliarde', - 'other': '0 Milliarden', - }, - 10: {'other': '00 Milliarden'}, - 12: { - 'one': '0 Billion', - 'other': '0 Billionen', - }, - 13: {'other': '00 Billionen'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0Mio.\u00A0\u00A4'}, - 9: {'other': '0\u00A0Mrd.\u00A0\u00A4'}, - 12: {'other': '0\u00A0Bio.\u00A0\u00A4'}, - }), - // Compact number symbols for locale el. - "el": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u03C7\u03B9\u03BB.'}, - 6: {'other': '0\u00A0\u03B5\u03BA.'}, - 9: {'other': '0\u00A0\u03B4\u03B9\u03C3.'}, - 12: {'other': '0\u00A0\u03C4\u03C1\u03B9\u03C3.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'one': '0 \u03C7\u03B9\u03BB\u03B9\u03AC\u03B4\u03B1', - 'other': '0 \u03C7\u03B9\u03BB\u03B9\u03AC\u03B4\u03B5\u03C2', - }, - 4: {'other': '00 \u03C7\u03B9\u03BB\u03B9\u03AC\u03B4\u03B5\u03C2'}, - 6: { - 'one': - '0 \u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03BF', - 'other': - '0 \u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1', - }, - 7: { - 'other': - '00 \u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1' - }, - 9: { - 'one': - '0 \u03B4\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03BF', - 'other': - '0 \u03B4\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1', - }, - 10: { - 'other': - '00 \u03B4\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1' - }, - 12: { - 'one': - '0 \u03C4\u03C1\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03BF', - 'other': - '0 \u03C4\u03C1\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1', - }, - 13: { - 'other': - '00 \u03C4\u03C1\u03B9\u03C3\u03B5\u03BA\u03B1\u03C4\u03BF\u03BC\u03BC\u03CD\u03C1\u03B9\u03B1' - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u03C7\u03B9\u03BB.\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u03B5\u03BA.\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u03B4\u03B9\u03C3.\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u03C4\u03C1\u03B9\u03C3.\u00A0\u00A4'}, - }), - // Compact number symbols for locale en. - "en": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 thousand'}, - 6: {'other': '0 million'}, - 9: {'other': '0 billion'}, - 12: {'other': '0 trillion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale en_AU. - "en_AU": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 thousand'}, - 6: {'other': '0 million'}, - 9: {'other': '0 billion'}, - 12: {'other': '0 trillion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale en_CA. - "en_CA": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 thousand'}, - 6: {'other': '0 million'}, - 9: {'other': '0 billion'}, - 12: {'other': '0 trillion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale en_GB. - "en_GB": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 thousand'}, - 6: {'other': '0 million'}, - 9: {'other': '0 billion'}, - 12: {'other': '0 trillion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale en_IE. - "en_IE": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 thousand'}, - 6: {'other': '0 million'}, - 9: {'other': '0 billion'}, - 12: {'other': '0 trillion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale en_IN. - "en_IN": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0T'}, - 5: {'other': '0L'}, - 7: {'other': '0Cr'}, - 10: {'other': '0TCr'}, - 12: {'other': '0LCr'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 thousand'}, - 6: {'other': '0 million'}, - 9: {'other': '0 billion'}, - 12: {'other': '0 trillion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40T'}, - 5: {'other': '\u00A40L'}, - 7: {'other': '\u00A40Cr'}, - 10: {'other': '\u00A40TCr'}, - 12: {'other': '\u00A40LCr'}, - }), - // Compact number symbols for locale en_MY. - "en_MY": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 thousand'}, - 6: {'other': '0 million'}, - 9: {'other': '0 billion'}, - 12: {'other': '0 trillion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale en_NZ. - "en_NZ": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 thousand'}, - 6: {'other': '0 million'}, - 9: {'other': '0 billion'}, - 12: {'other': '0 trillion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale en_SG. - "en_SG": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 thousand'}, - 6: {'other': '0 million'}, - 9: {'other': '0 billion'}, - 12: {'other': '0 trillion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale en_US. - "en_US": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 thousand'}, - 6: {'other': '0 million'}, - 9: {'other': '0 billion'}, - 12: {'other': '0 trillion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale en_ZA. - "en_ZA": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 thousand'}, - 6: {'other': '0 million'}, - 9: {'other': '0 billion'}, - 12: {'other': '0 trillion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale es. - "es": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0mil'}, - 6: {'other': '0\u00A0M'}, - 10: {'other': '00\u00A0mil\u00A0M'}, - 12: {'other': '0\u00A0B'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 mil'}, - 6: { - 'one': '0 mill\u00F3n', - 'other': '0 millones', - }, - 7: {'other': '00 millones'}, - 9: {'other': '0 mil millones'}, - 12: { - 'one': '0 bill\u00F3n', - 'other': '0 billones', - }, - 13: {'other': '00 billones'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0mil\u00A0\u00A4'}, - 6: {'other': '0\u00A0M\u00A4'}, - 10: {'other': '00\u00A0mil\u00A0M\u00A4'}, - 12: {'other': '0\u00A0B\u00A4'}, - }), - // Compact number symbols for locale es_419. - "es_419": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0K'}, - 4: {'other': '00\u00A0k'}, - 6: {'other': '0\u00A0M'}, - 10: {'other': '00\u00A0mil\u00A0M'}, - 12: {'other': '0\u00A0B'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 mil'}, - 6: { - 'one': '0 mill\u00F3n', - 'other': '0 millones', - }, - 7: {'other': '00 millones'}, - 9: {'other': '0 mil millones'}, - 12: {'other': '0 bill\u00F3n'}, - 13: {'other': '00 billones'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u00A0K'}, - 6: {'other': '\u00A40\u00A0M'}, - 10: {'other': '\u00A400\u00A0MRD'}, - 12: {'other': '\u00A40\u00A0B'}, - }), - // Compact number symbols for locale es_ES. - "es_ES": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0mil'}, - 6: {'other': '0\u00A0M'}, - 10: {'other': '00\u00A0mil\u00A0M'}, - 12: {'other': '0\u00A0B'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 mil'}, - 6: { - 'one': '0 mill\u00F3n', - 'other': '0 millones', - }, - 7: {'other': '00 millones'}, - 9: {'other': '0 mil millones'}, - 12: { - 'one': '0 bill\u00F3n', - 'other': '0 billones', - }, - 13: {'other': '00 billones'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0mil\u00A0\u00A4'}, - 6: {'other': '0\u00A0M\u00A4'}, - 10: {'other': '00\u00A0mil\u00A0M\u00A4'}, - 12: {'other': '0\u00A0B\u00A4'}, - }), - // Compact number symbols for locale es_MX. - "es_MX": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0k'}, - 6: {'other': '0\u00A0M'}, - 10: {'other': '00\u00A0mil\u00A0M'}, - 12: {'other': '0\u00A0B'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 mil'}, - 6: { - 'one': '0 mill\u00F3n', - 'other': '0 millones', - }, - 7: {'other': '00 millones'}, - 9: {'other': '0 mil millones'}, - 12: { - 'one': '0 bill\u00F3n', - 'other': '0 billones', - }, - 13: {'other': '00 billones'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0k\u00A4'}, - 6: {'other': '0\u00A0M\u00A4'}, - 10: {'other': '00\u00A0MRD\u00A0\u00A4'}, - 12: {'other': '0\u00A0B\u00A4'}, - }), - // Compact number symbols for locale es_US. - "es_US": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0K'}, - 6: {'other': '0\u00A0M'}, - 10: {'other': '00\u00A0mil\u00A0M'}, - 12: {'other': '0\u00A0B'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 mil'}, - 6: { - 'one': '0 mill\u00F3n', - 'other': '0 millones', - }, - 7: {'other': '00 millones'}, - 9: {'other': '0 mil millones'}, - 12: {'other': '0 bill\u00F3n'}, - 13: {'other': '00 billones'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u00A0K'}, - 6: {'other': '\u00A40\u00A0M'}, - 10: {'other': '\u00A400\u00A0B'}, - 12: {'other': '\u00A40\u00A0T'}, - }), - // Compact number symbols for locale et. - "et": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0tuh'}, - 6: {'other': '0\u00A0mln'}, - 9: {'other': '0\u00A0mld'}, - 12: {'other': '0\u00A0trln'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 tuhat'}, - 6: { - 'one': '0 miljon', - 'other': '0 miljonit', - }, - 7: {'other': '00 miljonit'}, - 9: { - 'one': '0 miljard', - 'other': '0 miljardit', - }, - 10: {'other': '00 miljardit'}, - 12: { - 'one': '0 triljon', - 'other': '0 triljonit', - }, - 13: {'other': '00 triljonit'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0tuh\u00A0\u00A4'}, - 6: {'other': '0\u00A0mln\u00A0\u00A4'}, - 9: {'other': '0\u00A0mld\u00A0\u00A4'}, - 12: {'other': '0\u00A0trln\u00A0\u00A4'}, - }), - // Compact number symbols for locale eu. - "eu": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0M'}, - 12: {'other': '0\u00A0B'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0 milioi'}, - 12: {'other': '0 bilioi'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0M\u00A0\u00A4'}, - 12: {'other': '0\u00A0B\u00A0\u00A4'}, - }), - // Compact number symbols for locale fa. - "fa": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0647\u0632\u0627\u0631'}, - 6: {'other': '0\u00A0\u0645\u06CC\u0644\u06CC\u0648\u0646'}, - 9: {'other': '0\u00A0\u0645\u06CC\u0644\u06CC\u0627\u0631\u062F'}, - 12: {'other': '0\u00A0\u062A\u0631\u06CC\u0644\u06CC\u0648\u0646'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u0647\u0632\u0627\u0631'}, - 6: {'other': '0 \u0645\u06CC\u0644\u06CC\u0648\u0646'}, - 9: {'other': '0 \u0645\u06CC\u0644\u06CC\u0627\u0631\u062F'}, - 12: { - 'other': - '0 \u0647\u0632\u0627\u0631\u0645\u06CC\u0644\u06CC\u0627\u0631\u062F' - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u0647\u0632\u0627\u0631\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u0645\u06CC\u0644\u06CC\u0648\u0646\u00A0\u00A4'}, - 9: { - 'other': '0\u00A0\u0645\u06CC\u0644\u06CC\u0627\u0631\u062F\u00A0\u00A4' - }, - 12: { - 'other': - '0\u00A0\u0647\u0632\u0627\u0631\u0645\u06CC\u0644\u06CC\u0627\u0631\u062F\u00A0\u00A4' - }, - }), - // Compact number symbols for locale fi. - "fi": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0t.'}, - 6: {'other': '0\u00A0milj.'}, - 9: {'other': '0\u00A0mrd.'}, - 12: {'other': '0\u00A0bilj.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'one': '0 tuhat', - 'other': '0 tuhatta', - }, - 4: {'other': '00 tuhatta'}, - 6: { - 'one': '0 miljoona', - 'other': '0 miljoonaa', - }, - 7: {'other': '00 miljoonaa'}, - 9: { - 'one': '0 miljardi', - 'other': '0 miljardia', - }, - 10: {'other': '00 miljardia'}, - 12: { - 'one': '0 biljoona', - 'other': '0 biljoonaa', - }, - 13: {'other': '00 biljoonaa'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0t.\u00A0\u00A4'}, - 6: {'other': '0\u00A0milj.\u00A0\u00A4'}, - 9: {'other': '0\u00A0mrd.\u00A0\u00A4'}, - 12: {'other': '0\u00A0bilj.\u00A0\u00A4'}, - }), - // Compact number symbols for locale fil. - "fil": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'one': '0 libo', - 'other': '0 na libo', - }, - 6: { - 'one': '0 milyon', - 'other': '0 na milyon', - }, - 9: { - 'one': '0 bilyon', - 'other': '0 na bilyon', - }, - 12: { - 'one': '0 trilyon', - 'other': '0 na trilyon', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale fr. - "fr": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0k'}, - 6: {'other': '0\u00A0M'}, - 9: {'other': '0\u00A0Md'}, - 12: {'other': '0\u00A0Bn'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - '1': 'mille', - 'one': '0 millier', - 'other': '0 mille', - }, - 4: {'other': '00 mille'}, - 6: { - 'one': '0 million', - 'other': '0 millions', - }, - 9: { - 'one': '0 milliard', - 'other': '0 milliards', - }, - 12: { - 'one': '0 billion', - 'other': '0 billions', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0k\u00A0\u00A4'}, - 6: {'other': '0\u00A0M\u00A0\u00A4'}, - 9: {'other': '0\u00A0Md\u00A0\u00A4'}, - 12: {'other': '0\u00A0Bn\u00A0\u00A4'}, - }), - // Compact number symbols for locale fr_CA. - "fr_CA": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0k'}, - 6: {'other': '0\u00A0M'}, - 9: {'other': '0\u00A0G'}, - 12: {'other': '0\u00A0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 mille'}, - 4: {'other': '00 mille'}, - 6: { - 'one': '0 million', - 'other': '0 millions', - }, - 9: { - 'one': '0 milliard', - 'other': '0 milliards', - }, - 12: { - 'one': '0 billion', - 'other': '0 billions', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0k\u00A4'}, - 6: {'other': '0\u00A0M\u00A4'}, - 9: {'other': '0\u00A0G\u00A4'}, - 12: {'other': '0\u00A0T\u00A4'}, - }), - // Compact number symbols for locale fr_CH. - "fr_CH": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0k'}, - 6: {'other': '0\u00A0M'}, - 9: {'other': '0\u00A0Md'}, - 12: {'other': '0\u00A0Bn'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - '1': 'mille', - 'one': '0 millier', - 'other': '0 mille', - }, - 4: {'other': '00 mille'}, - 6: { - 'one': '0 million', - 'other': '0 millions', - }, - 9: { - 'one': '0 milliard', - 'other': '0 milliards', - }, - 12: { - 'one': '0 billion', - 'other': '0 billions', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0k\u00A0\u00A4'}, - 6: {'other': '0\u00A0M\u00A0\u00A4'}, - 9: {'other': '0\u00A0Md\u00A0\u00A4'}, - 12: {'other': '0\u00A0Bn\u00A0\u00A4'}, - }), - // Compact number symbols for locale fur. - "fur": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0G'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00K'}, - 6: {'other': '\u00A4\u00A00M'}, - 9: {'other': '\u00A4\u00A00G'}, - 12: {'other': '\u00A4\u00A00T'}, - }), - // Compact number symbols for locale ga. - "ga": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0k'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 mh\u00EDle', - 'many': '0 m\u00EDle', - 'one': '0 mh\u00EDle', - 'other': '0 m\u00EDle', - 'two': '0 mh\u00EDle', - }, - 4: {'other': '00 m\u00EDle'}, - 6: { - 'few': '0 mhilli\u00FAn', - 'many': '0 milli\u00FAn', - 'one': '0 mhilli\u00FAn', - 'other': '0 milli\u00FAn', - 'two': '0 mhilli\u00FAn', - }, - 7: {'other': '00 milli\u00FAn'}, - 9: { - 'few': '0 bhilli\u00FAn', - 'many': '0 mbilli\u00FAn', - 'one': '0 bhilli\u00FAn', - 'other': '0 billi\u00FAn', - 'two': '0 bhilli\u00FAn', - }, - 10: { - 'few': '00 billi\u00FAn', - 'many': '00 mbilli\u00FAn', - 'one': '00 billi\u00FAn', - 'other': '00 billi\u00FAn', - 'two': '00 billi\u00FAn', - }, - 11: {'other': '000 billi\u00FAn'}, - 12: { - 'few': '0 thrilli\u00FAn', - 'many': '0 dtrilli\u00FAn', - 'one': '0 trilli\u00FAn', - 'other': '0 trilli\u00FAn', - 'two': '0 thrilli\u00FAn', - }, - 13: { - 'few': '00 trilli\u00FAn', - 'many': '00 dtrilli\u00FAn', - 'one': '00 trilli\u00FAn', - 'other': '00 trilli\u00FAn', - 'two': '00 trilli\u00FAn', - }, - 14: {'other': '000 trilli\u00FAn'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40k'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale gl. - "gl": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0M'}, - 12: {'other': '0\u00A0B'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: { - 'one': '0 mill\u00F3n', - 'other': '0 mill\u00F3ns', - }, - 7: {'other': '00 mill\u00F3ns'}, - 12: { - 'one': '0 bill\u00F3n', - 'other': '0 bill\u00F3ns', - }, - 13: {'other': '00 bill\u00F3ns'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0M\u00A4'}, - 11: {'other': '00000\u00A0M\u00A4'}, - 12: {'other': '0\u00A0B\u00A4'}, - }), - // Compact number symbols for locale gsw. - "gsw": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0Tsg.'}, - 6: {'other': '0\u00A0Mio.'}, - 9: {'other': '0\u00A0Mrd.'}, - 12: {'other': '0\u00A0Bio.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 Tuusig'}, - 6: { - 'one': '0 Millioon', - 'other': '0 Millioone', - }, - 9: {'other': '0 Milliarde'}, - 12: { - 'one': '0 Billioon', - 'other': '0 Billioone', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0Tsg.\u00A0\u00A4'}, - 6: {'other': '0\u00A0Mio.\u00A0\u00A4'}, - 9: {'other': '0\u00A0Mrd.\u00A0\u00A4'}, - 12: {'other': '0\u00A0Bio.\u00A0\u00A4'}, - }), - // Compact number symbols for locale gu. - "gu": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0AB9\u0A9C\u0ABE\u0AB0'}, - 5: {'other': '0\u00A0\u0AB2\u0ABE\u0A96'}, - 7: {'other': '0\u00A0\u0A95\u0AB0\u0ACB\u0AA1'}, - 9: {'other': '0\u00A0\u0A85\u0AAC\u0A9C'}, - 11: {'other': '0\u00A0\u0AA8\u0ABF\u0A96\u0AB0\u0ACD\u0AB5'}, - 12: {'other': '0\u00A0\u0AAE\u0AB9\u0ABE\u0AAA\u0AA6\u0ACD\u0AAE'}, - 13: {'other': '0\u00A0\u0AB6\u0A82\u0A95\u0AC1'}, - 14: {'other': '0\u00A0\u0A9C\u0AB2\u0AA7\u0ABF'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u0AB9\u0A9C\u0ABE\u0AB0'}, - 5: {'other': '0 \u0AB2\u0ABE\u0A96'}, - 7: {'other': '0 \u0A95\u0AB0\u0ACB\u0AA1'}, - 9: {'other': '0 \u0A85\u0AAC\u0A9C'}, - 11: {'other': '0 \u0AA8\u0ABF\u0A96\u0AB0\u0ACD\u0AB5'}, - 12: {'other': '0 \u0AAE\u0AB9\u0ABE\u0AAA\u0AA6\u0ACD\u0AAE'}, - 13: {'other': '0 \u0AB6\u0A82\u0A95\u0AC1'}, - 14: {'other': '0 \u0A9C\u0AB2\u0AA7\u0ABF'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u00A0\u0AB9\u0A9C\u0ABE\u0AB0'}, - 5: {'other': '\u00A40\u00A0\u0AB2\u0ABE\u0A96'}, - 7: {'other': '\u00A40\u00A0\u0A95\u0AB0\u0ACB\u0AA1'}, - 9: {'other': '\u00A40\u00A0\u0A85\u0AAC\u0A9C'}, - 11: {'other': '\u00A40\u00A0\u0AA8\u0ABF\u0A96\u0AB0\u0ACD\u0AB5'}, - 12: {'other': '\u00A40\u00A0\u0AAE\u0AB9\u0ABE\u0AAA\u0AA6\u0ACD\u0AAE'}, - 13: {'other': '\u00A40\u00A0\u0AB6\u0A82\u0A95\u0AC1'}, - 14: {'other': '\u00A40\u00A0\u0A9C\u0AB2\u0AA7\u0ABF'}, - }), - // Compact number symbols for locale haw. - "haw": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0G'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40G'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale he. - "he": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K\u200F'}, - 6: {'other': '0M\u200F'}, - 9: {'other': '0B\u200F'}, - 12: {'other': '0T\u200F'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '\u200F0 \u05D0\u05DC\u05E3'}, - 6: {'other': '\u200F0 \u05DE\u05D9\u05DC\u05D9\u05D5\u05DF'}, - 9: {'other': '\u200F0 \u05DE\u05D9\u05DC\u05D9\u05D0\u05E8\u05D3'}, - 12: {'other': '\u200F0 \u05D8\u05E8\u05D9\u05DC\u05D9\u05D5\u05DF'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K\u200F'}, - 6: {'other': '\u00A40M\u200F'}, - 9: {'other': '\u00A40B\u200F'}, - 12: {'other': '\u00A40T\u200F'}, - }), - // Compact number symbols for locale hi. - "hi": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0939\u091C\u093C\u093E\u0930'}, - 5: {'other': '0\u00A0\u0932\u093E\u0916'}, - 7: {'other': '0\u00A0\u0915\u0970'}, - 9: {'other': '0\u00A0\u0905\u0970'}, - 11: {'other': '0\u00A0\u0916\u0970'}, - 13: {'other': '0\u00A0\u0928\u0940\u0932'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u0939\u091C\u093C\u093E\u0930'}, - 5: {'other': '0 \u0932\u093E\u0916'}, - 7: {'other': '0 \u0915\u0930\u094B\u0921\u093C'}, - 9: {'other': '0 \u0905\u0930\u092C'}, - 11: {'other': '0 \u0916\u0930\u092C'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u00A0\u0939\u091C\u093C\u093E\u0930'}, - 5: {'other': '\u00A40\u00A0\u0932\u093E\u0916'}, - 7: {'other': '\u00A40\u00A0\u0915\u0970'}, - 9: {'other': '\u00A40\u00A0\u0905\u0970'}, - 11: {'other': '\u00A40\u00A0\u0916\u0970'}, - 13: {'other': '\u00A40\u00A0\u0928\u0940\u0932'}, - }), - // Compact number symbols for locale hr. - "hr": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0tis.'}, - 6: {'other': '0\u00A0mil.'}, - 9: {'other': '0\u00A0mlr.'}, - 12: {'other': '0\u00A0bil.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 tisu\u0107e', - 'one': '0 tisu\u0107a', - 'other': '0 tisu\u0107a', - }, - 6: { - 'few': '0 milijuna', - 'one': '0 milijun', - 'other': '0 milijuna', - }, - 9: { - 'few': '0 milijarde', - 'one': '0 milijarda', - 'other': '0 milijardi', - }, - 12: { - 'few': '0 bilijuna', - 'one': '0 bilijun', - 'other': '0 bilijuna', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0tis.\u00A0\u00A4'}, - 6: {'other': '0\u00A0mil.\u00A0\u00A4'}, - 9: {'other': '0\u00A0mlr.\u00A0\u00A4'}, - 12: {'other': '0\u00A0bil.\u00A0\u00A4'}, - }), - // Compact number symbols for locale hu. - "hu": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0E'}, - 6: {'other': '0\u00A0M'}, - 9: {'other': '0\u00A0Mrd'}, - 12: {'other': '0\u00A0B'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 ezer'}, - 6: {'other': '0 milli\u00F3'}, - 9: {'other': '0 milli\u00E1rd'}, - 12: {'other': '0 billi\u00F3'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0E\u00A0\u00A4'}, - 6: {'other': '0\u00A0M\u00A0\u00A4'}, - 9: {'other': '0\u00A0Mrd\u00A0\u00A4'}, - 12: {'other': '0\u00A0B\u00A0\u00A4'}, - }), - // Compact number symbols for locale hy. - "hy": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0570\u0566\u0580'}, - 6: {'other': '0\u00A0\u0574\u056C\u0576'}, - 9: {'other': '0\u00A0\u0574\u056C\u0580\u0564'}, - 12: {'other': '0\u00A0\u057F\u0580\u056C\u0576'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u0570\u0561\u0566\u0561\u0580'}, - 6: {'other': '0 \u0574\u056B\u056C\u056B\u0578\u0576'}, - 9: {'other': '0 \u0574\u056B\u056C\u056B\u0561\u0580\u0564'}, - 12: {'other': '0 \u057F\u0580\u056B\u056C\u056B\u0578\u0576'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u0570\u0566\u0580\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u0574\u056C\u0576\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u0574\u056C\u0580\u0564\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u057F\u0580\u056C\u0576\u00A0\u00A4'}, - }), - // Compact number symbols for locale id. - "id": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0rb'}, - 6: {'other': '0\u00A0jt'}, - 9: {'other': '0\u00A0M'}, - 12: {'other': '0\u00A0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 ribu'}, - 6: {'other': '0 juta'}, - 9: {'other': '0 miliar'}, - 12: {'other': '0 triliun'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u00A0rb'}, - 6: {'other': '\u00A40\u00A0jt'}, - 9: {'other': '\u00A40\u00A0M'}, - 12: {'other': '\u00A40\u00A0T'}, - }), - // Compact number symbols for locale in. - "in": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0rb'}, - 6: {'other': '0\u00A0jt'}, - 9: {'other': '0\u00A0M'}, - 12: {'other': '0\u00A0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 ribu'}, - 6: {'other': '0 juta'}, - 9: {'other': '0 miliar'}, - 12: {'other': '0 triliun'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u00A0rb'}, - 6: {'other': '\u00A40\u00A0jt'}, - 9: {'other': '\u00A40\u00A0M'}, - 12: {'other': '\u00A40\u00A0T'}, - }), - // Compact number symbols for locale is. - "is": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u00FE.'}, - 6: {'other': '0\u00A0m.'}, - 9: {'other': '0\u00A0ma.'}, - 12: {'other': '0\u00A0bn'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u00FE\u00FAsund'}, - 6: { - 'one': '0 millj\u00F3n', - 'other': '0 millj\u00F3nir', - }, - 9: { - 'one': '0 milljar\u00F0ur', - 'other': '0 milljar\u00F0ar', - }, - 12: { - 'one': '0 billj\u00F3n', - 'other': '0 billj\u00F3nir', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u00FE.\u00A0\u00A4'}, - 6: {'other': '0\u00A0m.\u00A0\u00A4'}, - 9: {'other': '0\u00A0ma.\u00A0\u00A4'}, - 12: {'other': '0\u00A0bn\u00A0\u00A4'}, - }), - // Compact number symbols for locale it. - "it": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0Mln'}, - 9: {'other': '0\u00A0Mrd'}, - 12: {'other': '0\u00A0Bln'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'one': 'mille', - 'other': '0 mila', - }, - 4: {'other': '00 mila'}, - 6: { - 'one': '0 milione', - 'other': '0 milioni', - }, - 7: {'other': '00 milioni'}, - 9: { - 'one': '0 miliardo', - 'other': '0 miliardi', - }, - 10: {'other': '00 miliardi'}, - 12: { - 'one': '0 mille miliardi', - 'other': '0 mila miliardi', - }, - 13: {'other': '00 mila miliardi'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0Mio\u00A0\u00A4'}, - 9: {'other': '0\u00A0Mrd\u00A0\u00A4'}, - 12: {'other': '0\u00A0Bln\u00A0\u00A4'}, - }), - // Compact number symbols for locale it_CH. - "it_CH": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0Mln'}, - 9: {'other': '0\u00A0Mrd'}, - 12: {'other': '0\u00A0Bln'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'one': 'mille', - 'other': '0 mila', - }, - 4: {'other': '00 mila'}, - 6: { - 'one': '0 milione', - 'other': '0 milioni', - }, - 7: {'other': '00 milioni'}, - 9: { - 'one': '0 miliardo', - 'other': '0 miliardi', - }, - 10: {'other': '00 miliardi'}, - 12: { - 'one': '0 mille miliardi', - 'other': '0 mila miliardi', - }, - 13: {'other': '00 mila miliardi'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0'}, - 5: {'other': '0'}, - 6: {'other': '0\u00A0Mio\u00A0\u00A4'}, - 9: {'other': '0\u00A0Mrd\u00A0\u00A4'}, - 12: {'other': '0\u00A0Bln\u00A0\u00A4'}, - }), - // Compact number symbols for locale iw. - "iw": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K\u200F'}, - 6: {'other': '0M\u200F'}, - 9: {'other': '0B\u200F'}, - 12: {'other': '0T\u200F'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '\u200F0 \u05D0\u05DC\u05E3'}, - 6: {'other': '\u200F0 \u05DE\u05D9\u05DC\u05D9\u05D5\u05DF'}, - 9: {'other': '\u200F0 \u05DE\u05D9\u05DC\u05D9\u05D0\u05E8\u05D3'}, - 12: {'other': '\u200F0 \u05D8\u05E8\u05D9\u05DC\u05D9\u05D5\u05DF'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K\u200F'}, - 6: {'other': '\u00A40M\u200F'}, - 9: {'other': '\u00A40B\u200F'}, - 12: {'other': '\u00A40T\u200F'}, - }), - // Compact number symbols for locale ja. - "ja": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0\u4E07'}, - 8: {'other': '0\u5104'}, - 12: {'other': '0\u5146'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0\u4E07'}, - 8: {'other': '0\u5104'}, - 12: {'other': '0\u5146'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '\u00A40\u4E07'}, - 8: {'other': '\u00A40\u5104'}, - 12: {'other': '\u00A40\u5146'}, - }), - // Compact number symbols for locale ka. - "ka": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u10D0\u10D7.'}, - 6: {'other': '0\u00A0\u10DB\u10DA\u10DC.'}, - 9: {'other': '0\u00A0\u10DB\u10DA\u10E0\u10D3.'}, - 11: {'other': '000\u00A0\u10DB\u10DA\u10E0.'}, - 12: {'other': '0\u00A0\u10E2\u10E0\u10DA.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u10D0\u10D7\u10D0\u10E1\u10D8'}, - 6: {'other': '0 \u10DB\u10D8\u10DA\u10D8\u10DD\u10DC\u10D8'}, - 9: {'other': '0 \u10DB\u10D8\u10DA\u10D8\u10D0\u10E0\u10D3\u10D8'}, - 12: {'other': '0 \u10E2\u10E0\u10D8\u10DA\u10D8\u10DD\u10DC\u10D8'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u10D0\u10D7.\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u10DB\u10DA\u10DC.\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u10DB\u10DA\u10E0\u10D3.\u00A0\u00A4'}, - 11: {'other': '000\u00A0\u10DB\u10DA\u10E0.\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u10E2\u10E0\u10DA.\u00A0\u00A4'}, - }), - // Compact number symbols for locale kk. - "kk": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u043C\u044B\u04A3'}, - 5: {'other': '000\u00A0\u043C.'}, - 6: {'other': '0\u00A0\u043C\u043B\u043D'}, - 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434'}, - 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u043C\u044B\u04A3'}, - 6: {'other': '0 \u043C\u0438\u043B\u043B\u0438\u043E\u043D'}, - 9: {'other': '0 \u043C\u0438\u043B\u043B\u0438\u0430\u0440\u0434'}, - 12: {'other': '0 \u0442\u0440\u0438\u043B\u043B\u0438\u043E\u043D'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u043C\u044B\u04A3\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u043C\u043B\u043D\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D\u00A0\u00A4'}, - }), - // Compact number symbols for locale km. - "km": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u1796\u17B6\u1793\u17CB'}, - 4: {'other': '00\u00A0\u1796\u17B6\u1793\u17CB'}, - 6: {'other': '0\u00A0\u179B\u17B6\u1793'}, - 9: {'other': '0\u00A0\u1794\u17CA\u17B8\u179B\u17B6\u1793'}, - 12: {'other': '0\u00A0\u1791\u17D2\u179A\u17B8\u179B\u17B6\u1793'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u1796\u17B6\u1793\u17CB'}, - 5: {'other': '000\u1796\u17B6\u1793\u17CB'}, - 6: {'other': '0 \u179B\u17B6\u1793'}, - 9: {'other': '0 \u1794\u17CA\u17B8\u179B\u17B6\u1793'}, - 12: {'other': '0 \u1791\u17D2\u179A\u17B8\u179B\u17B6\u1793'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u00A0\u1796\u17B6\u1793\u17CB'}, - 6: {'other': '\u00A40\u00A0\u179B\u17B6\u1793'}, - 9: {'other': '\u00A40\u00A0\u1794\u17CA\u17B8\u179B\u17B6\u1793'}, - 12: {'other': '\u00A40\u00A0\u1791\u17D2\u179A\u17B8\u179B\u17B6\u1793'}, - }), - // Compact number symbols for locale kn. - "kn": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u0CB8\u0CBE'}, - 6: {'other': '0\u0CAE\u0CBF'}, - 9: {'other': '0\u0CAC\u0CBF'}, - 12: {'other': '0\u0C9F\u0CCD\u0CB0\u0CBF'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u0CB8\u0CBE\u0CB5\u0CBF\u0CB0'}, - 6: {'other': '0 \u0CAE\u0CBF\u0CB2\u0CBF\u0CAF\u0CA8\u0CCD'}, - 9: {'other': '0 \u0CAC\u0CBF\u0CB2\u0CBF\u0CAF\u0CA8\u0CCD'}, - 12: { - 'other': '0 \u0C9F\u0CCD\u0CB0\u0CBF\u0CB2\u0CBF\u0CAF\u0CA8\u0CCD\u200C' - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u0CB8\u0CBE'}, - 6: {'other': '\u00A40\u0CAE\u0CBF'}, - 9: {'other': '\u00A40\u0CAC\u0CBF'}, - 12: {'other': '\u00A40\u0C9F\u0CCD\u0CB0\u0CBF'}, - }), - // Compact number symbols for locale ko. - "ko": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\uCC9C'}, - 4: {'other': '0\uB9CC'}, - 8: {'other': '0\uC5B5'}, - 12: {'other': '0\uC870'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0\uCC9C'}, - 4: {'other': '0\uB9CC'}, - 8: {'other': '0\uC5B5'}, - 12: {'other': '0\uC870'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\uCC9C'}, - 4: {'other': '\u00A40\uB9CC'}, - 8: {'other': '\u00A40\uC5B5'}, - 12: {'other': '\u00A40\uC870'}, - }), - // Compact number symbols for locale ky. - "ky": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u043C\u0438\u04A3'}, - 6: {'other': '0\u00A0\u043C\u043B\u043D'}, - 9: {'other': '0\u00A0\u043C\u043B\u0434'}, - 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u043C\u0438\u04A3'}, - 6: {'other': '0 \u043C\u0438\u043B\u043B\u0438\u043E\u043D'}, - 9: {'other': '0 \u043C\u0438\u043B\u043B\u0438\u0430\u0440\u0434'}, - 12: {'other': '0 \u0442\u0440\u0438\u043B\u043B\u0438\u043E\u043D'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u043C\u0438\u04A3\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u043C\u043B\u043D\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u043C\u043B\u0434\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D\u00A0\u00A4'}, - }), - // Compact number symbols for locale ln. - "ln": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0G'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0K\u00A0\u00A4'}, - 6: {'other': '0M\u00A0\u00A4'}, - 9: {'other': '0G\u00A0\u00A4'}, - 12: {'other': '0T\u00A0\u00A4'}, - }), - // Compact number symbols for locale lo. - "lo": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0E9E\u0EB1\u0E99'}, - 5: {'other': '000\u00A0\u0E81\u0EB5\u0E9A'}, - 6: {'other': '0\u00A0\u0EA5\u0EC9\u0EB2\u0E99'}, - 9: {'other': '0\u00A0\u0E95\u0EB7\u0EC9'}, - 12: {'other': '0\u00A0\u0EA5\u0EC9\u0EB2\u0E99\u0EA5\u0EC9\u0EB2\u0E99'}, - 13: {'other': '00\u0EA5\u0EA5'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u0E9E\u0EB1\u0E99'}, - 5: {'other': '0 \u0EC1\u0EAA\u0E99'}, - 6: {'other': '0 \u0EA5\u0EC9\u0EB2\u0E99'}, - 9: {'other': '0 \u0E95\u0EB7\u0EC9'}, - 12: {'other': '0 \u0EA5\u0EC9\u0EB2\u0E99\u0EA5\u0EC9\u0EB2\u0E99'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u00A0\u0E9E\u0EB1\u0E99'}, - 5: {'other': '\u00A4000\u00A0\u0E81\u0EB5\u0E9A'}, - 6: {'other': '\u00A40\u00A0\u0EA5\u0EC9\u0EB2\u0E99'}, - 9: {'other': '\u00A40\u00A0\u0E95\u0EB7\u0EC9'}, - 12: { - 'other': '\u00A40\u00A0\u0EA5\u0EC9\u0EB2\u0E99\u0EA5\u0EC9\u0EB2\u0E99' - }, - }), - // Compact number symbols for locale lt. - "lt": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0t\u016Bkst.'}, - 6: {'other': '0\u00A0mln.'}, - 9: {'other': '0\u00A0mlrd.'}, - 12: {'other': '0\u00A0trln.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 t\u016Bkstan\u010Diai', - 'many': '0 t\u016Bkstan\u010Dio', - 'one': '0 t\u016Bkstantis', - 'other': '0 t\u016Bkstan\u010Di\u0173', - }, - 6: { - 'few': '0 milijonai', - 'many': '0 milijono', - 'one': '0 milijonas', - 'other': '0 milijon\u0173', - }, - 9: { - 'few': '0 milijardai', - 'many': '0 milijardo', - 'one': '0 milijardas', - 'other': '0 milijard\u0173', - }, - 12: { - 'few': '0 trilijonai', - 'many': '0 trilijono', - 'one': '0 trilijonas', - 'other': '0 trilijon\u0173', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0t\u016Bkst.\u00A0\u00A4'}, - 6: {'other': '0\u00A0mln.\u00A0\u00A4'}, - 9: {'other': '0\u00A0mlrd.\u00A0\u00A4'}, - 12: {'other': '0\u00A0trln.\u00A0\u00A4'}, - }), - // Compact number symbols for locale lv. - "lv": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0t\u016Bkst.'}, - 6: {'other': '0\u00A0milj.'}, - 9: {'other': '0\u00A0mljrd.'}, - 12: {'other': '0\u00A0trilj.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'one': '0 t\u016Bkstotis', - 'other': '0 t\u016Bksto\u0161i', - 'zero': '0 t\u016Bksto\u0161u', - }, - 4: { - 'one': '00 t\u016Bkstotis', - 'other': '00 t\u016Bksto\u0161i', - 'zero': '00 t\u016Bksto\u0161i', - }, - 6: { - 'one': '0 miljons', - 'other': '0 miljoni', - 'zero': '0 miljonu', - }, - 7: { - 'one': '00 miljons', - 'other': '00 miljoni', - 'zero': '00 miljoni', - }, - 9: { - 'one': '0 miljards', - 'other': '0 miljardi', - 'zero': '0 miljardu', - }, - 10: { - 'one': '00 miljards', - 'other': '00 miljardi', - 'zero': '00 miljardi', - }, - 12: { - 'one': '0 triljons', - 'other': '0 triljoni', - 'zero': '0 triljonu', - }, - 13: { - 'one': '00 triljons', - 'other': '00 triljoni', - 'zero': '00 triljoni', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0t\u016Bkst.\u00A0\u00A4'}, - 6: {'other': '0\u00A0milj.\u00A0\u00A4'}, - 9: {'other': '0\u00A0mljrd.\u00A0\u00A4'}, - 12: {'other': '0\u00A0trilj.\u00A0\u00A4'}, - }), - // Compact number symbols for locale mg. - "mg": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0G'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40G'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale mk. - "mk": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0438\u043B\u0458.'}, - 6: {'other': '0\u00A0\u043C\u0438\u043B.'}, - 8: {'other': '000\u00A0\u041C'}, - 9: {'other': '0\u00A0\u043C\u0438\u043B\u0458.'}, - 11: { - 'one': '000\u00A0\u043C\u0458.', - 'other': '000\u00A0\u043C\u0438.', - }, - 12: {'other': '0\u00A0\u0431\u0438\u043B.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'one': '0 \u0438\u043B\u0458\u0430\u0434\u0430', - 'other': '0 \u0438\u043B\u0458\u0430\u0434\u0438', - }, - 6: { - 'one': '0 \u043C\u0438\u043B\u0438\u043E\u043D', - 'other': '0 \u043C\u0438\u043B\u0438\u043E\u043D\u0438', - }, - 9: { - 'one': '0 \u043C\u0438\u043B\u0438\u0458\u0430\u0440\u0434\u0430', - 'other': '0 \u043C\u0438\u043B\u0438\u0458\u0430\u0440\u0434\u0438', - }, - 12: { - 'one': '0 \u0431\u0438\u043B\u0438\u043E\u043D', - 'other': '0 \u0431\u0438\u043B\u0438\u043E\u043D\u0438', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u0438\u043B\u0458.\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u043C\u0438\u043B.\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u043C\u0438\u043B\u0458.\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u0431\u0438\u043B.\u00A0\u00A4'}, - }), - // Compact number symbols for locale ml. - "ml": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u0D06\u0D2F\u0D3F\u0D30\u0D02'}, - 6: {'other': '0 \u0D26\u0D36\u0D32\u0D15\u0D4D\u0D37\u0D02'}, - 9: {'other': '0 \u0D32\u0D15\u0D4D\u0D37\u0D02 \u0D15\u0D4B\u0D1F\u0D3F'}, - 12: {'other': '0 \u0D1F\u0D4D\u0D30\u0D3F\u0D32\u0D4D\u0D2F\u0D7A'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale mn. - "mn": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u043C\u044F\u043D\u0433\u0430'}, - 6: {'other': '0\u00A0\u0441\u0430\u044F'}, - 9: {'other': '0\u00A0\u0442\u044D\u0440\u0431\u0443\u043C'}, - 11: {'other': '000\u0422'}, - 12: {'other': '0\u0418\u041D'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u043C\u044F\u043D\u0433\u0430'}, - 6: {'other': '0 \u0441\u0430\u044F'}, - 9: {'other': '0 \u0442\u044D\u0440\u0431\u0443\u043C'}, - 12: {'other': '0 \u0438\u0445 \u043D\u0430\u044F\u0434'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00\u00A0\u043C\u044F\u043D\u0433\u0430'}, - 5: {'other': '\u00A4000\u00A0\u043C\u044F\u043D\u0433\u0430'}, - 6: {'other': '\u00A40\u00A0\u0441\u0430\u044F'}, - 9: {'other': '\u00A40\u00A0\u0442\u044D\u0440\u0431\u0443\u043C'}, - 10: {'other': '\u00A4\u00A000\u00A0\u0442\u044D\u0440\u0431\u0443\u043C'}, - 12: { - 'other': '\u00A4\u00A00\u00A0\u0438\u0445\u00A0\u043D\u0430\u044F\u0434' - }, - }), - // Compact number symbols for locale mr. - "mr": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0939'}, - 5: {'other': '0\u00A0\u0932\u093E\u0916'}, - 7: {'other': '0\u00A0\u0915\u094B\u091F\u0940'}, - 9: {'other': '0\u00A0\u0905\u092C\u094D\u091C'}, - 11: {'other': '0\u00A0\u0916\u0930\u094D\u0935'}, - 13: {'other': '0\u00A0\u092A\u0926\u094D\u092E'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u0939\u091C\u093E\u0930'}, - 5: {'other': '0 \u0932\u093E\u0916'}, - 7: {'other': '0 \u0915\u094B\u091F\u0940'}, - 9: {'other': '0 \u0905\u092C\u094D\u091C'}, - 11: {'other': '0 \u0916\u0930\u094D\u0935'}, - 13: {'other': '0 \u092A\u0926\u094D\u092E'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u00A0\u0939'}, - 5: {'other': '\u00A40\u00A0\u0932\u093E\u0916'}, - 7: {'other': '\u00A40\u00A0\u0915\u094B\u091F\u0940'}, - 9: {'other': '\u00A40\u00A0\u0905\u092C\u094D\u091C'}, - 11: {'other': '\u00A40\u00A0\u0916\u0930\u094D\u0935'}, - 13: {'other': '\u00A40\u00A0\u092A\u0926\u094D\u092E'}, - }), - // Compact number symbols for locale ms. - "ms": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0J'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 ribu'}, - 6: {'other': '0 juta'}, - 9: {'other': '0 bilion'}, - 12: {'other': '0 trilion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40J'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale mt. - "mt": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0G'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40G'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale my. - "my": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u1011\u1031\u102C\u1004\u103A'}, - 4: {'other': '0\u101E\u1031\u102C\u1004\u103A\u1038'}, - 5: {'other': '0\u101E\u102D\u1014\u103A\u1038'}, - 6: {'other': '0\u101E\u1014\u103A\u1038'}, - 7: {'other': '0\u1000\u102F\u100B\u1031'}, - 9: {'other': '\u1000\u102F\u100B\u1031000'}, - 10: {'other': '\u1000\u102F\u100B\u10310\u1011'}, - 11: {'other': '\u1000\u102F\u100B\u10310\u101E'}, - 12: {'other': '\u100B\u10310\u101E\u102D\u1014\u103A\u1038'}, - 13: {'other': '\u100B\u10310\u101E\u1014\u103A\u1038'}, - 14: {'other': '0\u1000\u1031\u102C\u100B\u102D'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0\u1011\u1031\u102C\u1004\u103A'}, - 4: {'other': '0\u101E\u1031\u102C\u1004\u103A\u1038'}, - 5: {'other': '0\u101E\u102D\u1014\u103A\u1038'}, - 6: {'other': '0\u101E\u1014\u103A\u1038'}, - 7: {'other': '0\u1000\u102F\u100B\u1031'}, - 9: {'other': '\u1000\u102F\u100B\u1031000'}, - 11: { - 'other': '\u1000\u102F\u100B\u10310\u101E\u1031\u102C\u1004\u103A\u1038' - }, - 12: {'other': '\u1000\u102F\u100B\u10310\u101E\u102D\u1014\u103A\u1038'}, - 13: {'other': '\u1000\u102F\u100B\u10310\u101E\u1014\u103A\u1038'}, - 14: {'other': '0\u1000\u1031\u102C\u100B\u102D'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00\u1011\u1031\u102C\u1004\u103A'}, - 4: {'other': '\u00A4\u00A00\u101E\u1031\u102C\u1004\u103A\u1038'}, - 5: {'other': '\u00A4\u00A00\u101E\u102D\u1014\u103A\u1038'}, - 6: {'other': '\u00A4\u00A00\u101E\u1014\u103A\u1038'}, - 7: {'other': '\u00A4\u00A00\u1000\u102F\u100B\u1031'}, - 9: {'other': '\u00A4\u00A0\u1000\u102F\u100B\u1031000'}, - 11: { - 'other': - '\u00A4\u00A0\u1000\u102F\u100B\u10310\u101E\u1031\u102C\u1004\u103A\u1038' - }, - 12: { - 'other': - '\u00A4\u00A0\u1000\u102F\u100B\u10310\u101E\u102D\u1014\u103A\u1038' - }, - 13: { - 'other': '\u00A4\u00A0\u1000\u102F\u100B\u10310\u101E\u1014\u103A\u1038' - }, - 14: {'other': '\u00A4\u00A00\u1000\u1031\u102C\u100B\u102D'}, - }), - // Compact number symbols for locale nb. - "nb": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0k'}, - 6: {'other': '0\u00A0mill.'}, - 9: {'other': '0\u00A0mrd.'}, - 12: {'other': '0\u00A0bill.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 tusen'}, - 6: { - 'one': '0 million', - 'other': '0 millioner', - }, - 7: {'other': '00 millioner'}, - 9: { - 'one': '0 milliard', - 'other': '0 milliarder', - }, - 10: {'other': '00 milliarder'}, - 12: { - 'one': '0 billion', - 'other': '0 billioner', - }, - 13: {'other': '00 billioner'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00k'}, - 6: {'other': '\u00A4\u00A00\u00A0mill.'}, - 9: {'other': '\u00A4\u00A00\u00A0mrd.'}, - 12: {'other': '\u00A4\u00A00\u00A0bill.'}, - }), - // Compact number symbols for locale ne. - "ne": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0939\u091C\u093E\u0930'}, - 5: {'other': '0\u00A0\u0932\u093E\u0916'}, - 7: {'other': '0\u00A0\u0915\u0930\u094B\u0921'}, - 9: {'other': '0\u00A0\u0905\u0930\u092C'}, - 11: {'other': '0\u00A0\u0916\u0930\u092C'}, - 13: {'other': '0\u00A0\u0936\u0902\u0916'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u0939\u091C\u093E\u0930'}, - 5: {'other': '0 \u0932\u093E\u0916'}, - 6: {'other': '0 \u0915\u0930\u094B\u0921'}, - 9: {'other': '0 \u0905\u0930\u092C'}, - 12: {'other': '00 \u0916\u0930\u092C'}, - 13: {'other': '0 \u0936\u0902\u0916'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00\u00A0\u0939\u091C\u093E\u0930'}, - 5: {'other': '\u00A4\u00A00\u00A0\u0932\u093E\u0916'}, - 7: {'other': '\u00A4\u00A00\u00A0\u0915\u0930\u094B\u0921'}, - 9: {'other': '\u00A4\u00A00\u00A0\u0905\u0930\u092C'}, - 11: {'other': '\u00A4\u00A00\u00A0\u0916\u0930\u092C'}, - 13: {'other': '\u00A4\u00A00\u00A0\u0936\u0902\u0916'}, - }), - // Compact number symbols for locale nl. - "nl": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0\u00A0mln.'}, - 9: {'other': '0\u00A0mld.'}, - 12: {'other': '0\u00A0bln.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 duizend'}, - 6: {'other': '0 miljoen'}, - 9: {'other': '0 miljard'}, - 12: {'other': '0 biljoen'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00K'}, - 6: {'other': '\u00A4\u00A00\u00A0mln.'}, - 9: {'other': '\u00A4\u00A00\u00A0mld.'}, - 12: {'other': '\u00A4\u00A00\u00A0bln.'}, - }), - // Compact number symbols for locale no. - "no": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0k'}, - 6: {'other': '0\u00A0mill.'}, - 9: {'other': '0\u00A0mrd.'}, - 12: {'other': '0\u00A0bill.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 tusen'}, - 6: { - 'one': '0 million', - 'other': '0 millioner', - }, - 7: {'other': '00 millioner'}, - 9: { - 'one': '0 milliard', - 'other': '0 milliarder', - }, - 10: {'other': '00 milliarder'}, - 12: { - 'one': '0 billion', - 'other': '0 billioner', - }, - 13: {'other': '00 billioner'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00k'}, - 6: {'other': '\u00A4\u00A00\u00A0mill.'}, - 9: {'other': '\u00A4\u00A00\u00A0mrd.'}, - 12: {'other': '\u00A4\u00A00\u00A0bill.'}, - }), - // Compact number symbols for locale no_NO. - "no_NO": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0k'}, - 6: {'other': '0\u00A0mill.'}, - 9: {'other': '0\u00A0mrd.'}, - 12: {'other': '0\u00A0bill.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 tusen'}, - 6: { - 'one': '0 million', - 'other': '0 millioner', - }, - 7: {'other': '00 millioner'}, - 9: { - 'one': '0 milliard', - 'other': '0 milliarder', - }, - 10: {'other': '00 milliarder'}, - 12: { - 'one': '0 billion', - 'other': '0 billioner', - }, - 13: {'other': '00 billioner'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00k'}, - 6: {'other': '\u00A4\u00A00\u00A0mill.'}, - 9: {'other': '\u00A4\u00A00\u00A0mrd.'}, - 12: {'other': '\u00A4\u00A00\u00A0bill.'}, - }), - // Compact number symbols for locale nyn. - "nyn": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0G'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40G'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale or. - "or": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u0B39'}, - 6: {'other': '0\u0B28\u0B3F'}, - 9: {'other': '0\u0B2C\u0B3F'}, - 12: {'other': '0\u0B1F\u0B4D\u0B30\u0B3F'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u0B39\u0B1C\u0B3E\u0B30'}, - 6: {'other': '0 \u0B28\u0B3F\u0B5F\u0B41\u0B24'}, - 9: {'other': '0 \u0B36\u0B39\u0B15\u0B4B\u0B1F\u0B3F'}, - 12: {'other': '0 \u0B32\u0B15\u0B4D\u0B37\u0B15\u0B4B\u0B1F\u0B3F'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u0B39'}, - 6: {'other': '\u00A40\u0B28\u0B3F'}, - 9: {'other': '\u00A40\u0B2C\u0B3F'}, - 12: {'other': '\u00A40\u0B1F\u0B4D\u0B30\u0B3F'}, - }), - // Compact number symbols for locale pa. - "pa": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0A39\u0A1C\u0A3C\u0A3E\u0A30'}, - 5: {'other': '0\u00A0\u0A32\u0A71\u0A16'}, - 7: {'other': '0\u00A0\u0A15\u0A30\u0A4B\u0A5C'}, - 9: {'other': '0\u00A0\u0A05\u0A30\u0A2C'}, - 11: {'other': '0\u00A0\u0A16\u0A30\u0A2C'}, - 13: {'other': '0\u00A0\u0A28\u0A40\u0A32'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u0A39\u0A1C\u0A3C\u0A3E\u0A30'}, - 5: {'other': '0 \u0A32\u0A71\u0A16'}, - 7: {'other': '0 \u0A15\u0A30\u0A4B\u0A5C'}, - 9: {'other': '0 \u0A05\u0A30\u0A2C'}, - 11: {'other': '0 \u0A16\u0A30\u0A2C'}, - 13: {'other': '0 \u0A28\u0A40\u0A32'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00\u00A0\u0A39\u0A1C\u0A3C\u0A3E\u0A30'}, - 5: {'other': '\u00A4\u00A00\u00A0\u0A32\u0A71\u0A16'}, - 7: {'other': '\u00A4\u00A00\u00A0\u0A15\u0A30\u0A4B\u0A5C'}, - 9: {'other': '\u00A4\u00A00\u00A0\u0A05\u0A30\u0A2C'}, - 11: {'other': '\u00A4\u00A00\u00A0\u0A16\u0A30\u0A2C'}, - 13: {'other': '\u00A4\u00A00\u00A0\u0A28\u0A40\u0A32'}, - }), - // Compact number symbols for locale pl. - "pl": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0tys.'}, - 6: {'other': '0\u00A0mln'}, - 9: {'other': '0\u00A0mld'}, - 12: {'other': '0\u00A0bln'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 tysi\u0105ce', - 'many': '0 tysi\u0119cy', - 'one': '0 tysi\u0105c', - 'other': '0 tysi\u0105ca', - }, - 6: { - 'few': '0 miliony', - 'many': '0 milion\u00F3w', - 'one': '0 milion', - 'other': '0 miliona', - }, - 9: { - 'few': '0 miliardy', - 'many': '0 miliard\u00F3w', - 'one': '0 miliard', - 'other': '0 miliarda', - }, - 12: { - 'few': '0 biliony', - 'many': '0 bilion\u00F3w', - 'one': '0 bilion', - 'other': '0 biliona', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0tys.\u00A0\u00A4'}, - 6: {'other': '0\u00A0mln\u00A0\u00A4'}, - 9: {'other': '0\u00A0mld\u00A0\u00A4'}, - 12: {'other': '0\u00A0bln\u00A0\u00A4'}, - }), - // Compact number symbols for locale ps. - "ps": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 11: { - 'one': '000G', - 'other': '000B', - }, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0G'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0K\u00A0\u00A4'}, - 6: {'other': '0M\u00A0\u00A4'}, - 9: {'other': '0G\u00A0\u00A4'}, - 10: { - 'one': '00G\u00A0\u00A4', - 'other': '\u00A400B', - }, - 11: {'other': '\u00A4000B'}, - 12: {'other': '0T\u00A0\u00A4'}, - }), - // Compact number symbols for locale pt. - "pt": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0mil'}, - 6: {'other': '0\u00A0mi'}, - 9: {'other': '0\u00A0bi'}, - 12: {'other': '0\u00A0tri'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 mil'}, - 6: { - 'one': '0 milh\u00E3o', - 'other': '0 milh\u00F5es', - }, - 9: { - 'one': '0 bilh\u00E3o', - 'other': '0 bilh\u00F5es', - }, - 12: { - 'one': '0 trilh\u00E3o', - 'other': '0 trilh\u00F5es', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00\u00A0mil'}, - 6: {'other': '\u00A4\u00A00\u00A0mi'}, - 9: {'other': '\u00A4\u00A00\u00A0bi'}, - 12: {'other': '\u00A4\u00A00\u00A0tri'}, - }), - // Compact number symbols for locale pt_BR. - "pt_BR": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0mil'}, - 6: {'other': '0\u00A0mi'}, - 9: {'other': '0\u00A0bi'}, - 12: {'other': '0\u00A0tri'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 mil'}, - 6: { - 'one': '0 milh\u00E3o', - 'other': '0 milh\u00F5es', - }, - 9: { - 'one': '0 bilh\u00E3o', - 'other': '0 bilh\u00F5es', - }, - 12: { - 'one': '0 trilh\u00E3o', - 'other': '0 trilh\u00F5es', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00\u00A0mil'}, - 6: {'other': '\u00A4\u00A00\u00A0mi'}, - 9: {'other': '\u00A4\u00A00\u00A0bi'}, - 12: {'other': '\u00A4\u00A00\u00A0tri'}, - }), - // Compact number symbols for locale pt_PT. - "pt_PT": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0mil'}, - 6: {'other': '0\u00A0M'}, - 9: {'other': '0\u00A0mM'}, - 12: {'other': '0\u00A0Bi'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 mil'}, - 6: { - 'one': '0 milh\u00E3o', - 'other': '0 milh\u00F5es', - }, - 7: {'other': '00 milh\u00F5es'}, - 9: {'other': '0 mil milh\u00F5es'}, - 12: { - 'one': '0 bili\u00E3o', - 'other': '0 bili\u00F5es', - }, - 13: {'other': '00 bili\u00F5es'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0mil\u00A0\u00A4'}, - 6: {'other': '0\u00A0M\u00A0\u00A4'}, - 9: {'other': '0\u00A0mM\u00A0\u00A4'}, - 12: {'other': '0\u00A0B\u00A0\u00A4'}, - }), - // Compact number symbols for locale ro. - "ro": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0K'}, - 6: {'other': '0\u00A0mil.'}, - 9: {'other': '0\u00A0mld.'}, - 12: {'other': '0\u00A0tril.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 mii', - 'one': '0 mie', - 'other': '0 de mii', - }, - 6: { - 'few': '0 milioane', - 'one': '0 milion', - 'other': '0 de milioane', - }, - 9: { - 'few': '0 miliarde', - 'one': '0 miliard', - 'other': '0 de miliarde', - }, - 12: { - 'few': '0 trilioane', - 'one': '0 trilion', - 'other': '0 de trilioane', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: { - 'few': '0\u00A0mii\u00A0\u00A4', - 'one': '0\u00A0mie\u00A0\u00A4', - 'other': '0\u00A0mii\u00A0\u00A4', - }, - 4: {'other': '00\u00A0mii\u00A0\u00A4'}, - 6: {'other': '0\u00A0mil.\u00A0\u00A4'}, - 9: {'other': '0\u00A0mld.\u00A0\u00A4'}, - 12: {'other': '0\u00A0tril.\u00A0\u00A4'}, - }), - // Compact number symbols for locale ru. - "ru": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0442\u044B\u0441.'}, - 6: {'other': '0\u00A0\u043C\u043B\u043D'}, - 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434'}, - 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 \u0442\u044B\u0441\u044F\u0447\u0438', - 'many': '0 \u0442\u044B\u0441\u044F\u0447', - 'one': '0 \u0442\u044B\u0441\u044F\u0447\u0430', - 'other': '0 \u0442\u044B\u0441\u044F\u0447\u0438', - }, - 6: { - 'few': '0 \u043C\u0438\u043B\u043B\u0438\u043E\u043D\u0430', - 'many': '0 \u043C\u0438\u043B\u043B\u0438\u043E\u043D\u043E\u0432', - 'one': '0 \u043C\u0438\u043B\u043B\u0438\u043E\u043D', - 'other': '0 \u043C\u0438\u043B\u043B\u0438\u043E\u043D\u0430', - }, - 9: { - 'few': '0 \u043C\u0438\u043B\u043B\u0438\u0430\u0440\u0434\u0430', - 'many': '0 \u043C\u0438\u043B\u043B\u0438\u0430\u0440\u0434\u043E\u0432', - 'one': '0 \u043C\u0438\u043B\u043B\u0438\u0430\u0440\u0434', - 'other': '0 \u043C\u0438\u043B\u043B\u0438\u0430\u0440\u0434\u0430', - }, - 12: { - 'few': '0 \u0442\u0440\u0438\u043B\u043B\u0438\u043E\u043D\u0430', - 'many': '0 \u0442\u0440\u0438\u043B\u043B\u0438\u043E\u043D\u043E\u0432', - 'one': '0 \u0442\u0440\u0438\u043B\u043B\u0438\u043E\u043D', - 'other': '0 \u0442\u0440\u0438\u043B\u043B\u0438\u043E\u043D\u0430', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u0442\u044B\u0441.\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u043C\u043B\u043D\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D\u00A0\u00A4'}, - }), - // Compact number symbols for locale si. - "si": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '\u0DAF0'}, - 6: {'other': '\u0DB8\u0DD20'}, - 9: {'other': '\u0DB6\u0DD20'}, - 12: {'other': '\u0DA7\u0DCA\u200D\u0DBB\u0DD20'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '\u0DAF\u0DC4\u0DC3 0'}, - 6: {'other': '\u0DB8\u0DD2\u0DBD\u0DD2\u0DBA\u0DB1 0'}, - 9: {'other': '\u0DB6\u0DD2\u0DBD\u0DD2\u0DBA\u0DB1 0'}, - 12: {'other': '\u0DA7\u0DCA\u200D\u0DBB\u0DD2\u0DBD\u0DD2\u0DBA\u0DB1 0'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u0DAF0'}, - 6: {'other': '\u00A4\u0DB8\u0DD20'}, - 9: {'other': '\u00A4\u0DB6\u0DD20'}, - 12: {'other': '\u00A4\u0DA7\u0DCA\u200D\u0DBB\u0DD20'}, - }), - // Compact number symbols for locale sk. - "sk": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0tis.'}, - 6: {'other': '0\u00A0mil.'}, - 9: {'other': '0\u00A0mld.'}, - 12: {'other': '0\u00A0bil.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 tis\u00EDce', - 'many': '0 tis\u00EDca', - 'one': '0 tis\u00EDc', - 'other': '0 tis\u00EDc', - }, - 4: { - 'few': '00 tis\u00EDc', - 'many': '00 tis\u00EDca', - 'one': '00 tis\u00EDc', - 'other': '00 tis\u00EDc', - }, - 6: { - 'few': '0 mili\u00F3ny', - 'many': '0 mili\u00F3na', - 'one': '0 mili\u00F3n', - 'other': '0 mili\u00F3nov', - }, - 7: { - 'few': '00 mili\u00F3nov', - 'many': '00 mili\u00F3na', - 'one': '00 mili\u00F3nov', - 'other': '00 mili\u00F3nov', - }, - 9: { - 'few': '0 miliardy', - 'many': '0 miliardy', - 'one': '0 miliarda', - 'other': '0 mili\u00E1rd', - }, - 10: { - 'few': '00 mili\u00E1rd', - 'many': '00 miliardy', - 'one': '00 mili\u00E1rd', - 'other': '00 mili\u00E1rd', - }, - 12: { - 'few': '0 bili\u00F3ny', - 'many': '0 bili\u00F3na', - 'one': '0 bili\u00F3n', - 'other': '0 bili\u00F3nov', - }, - 13: { - 'few': '00 bili\u00F3nov', - 'many': '00 bili\u00F3na', - 'one': '00 bili\u00F3nov', - 'other': '00 bili\u00F3nov', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0tis.\u00A0\u00A4'}, - 6: {'other': '0\u00A0mil.\u00A0\u00A4'}, - 9: {'other': '0\u00A0mld.\u00A0\u00A4'}, - 12: {'other': '0\u00A0bil.\u00A0\u00A4'}, - }), - // Compact number symbols for locale sl. - "sl": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0tis.'}, - 6: {'other': '0\u00A0mio.'}, - 9: {'other': '0\u00A0mrd.'}, - 12: {'other': '0\u00A0bil.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 tiso\u010D'}, - 6: { - 'few': '0 milijone', - 'one': '0 milijon', - 'other': '0 milijonov', - 'two': '0 milijona', - }, - 7: { - 'few': '00 milijoni', - 'one': '00 milijon', - 'other': '00 milijonov', - 'two': '00 milijona', - }, - 9: { - 'few': '0 milijarde', - 'one': '0 milijarda', - 'other': '0 milijard', - 'two': '0 milijardi', - }, - 12: { - 'few': '0 bilijoni', - 'one': '0 bilijon', - 'other': '0 bilijonov', - 'two': '0 bilijona', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0tis.\u00A0\u00A4'}, - 6: {'other': '0\u00A0mio.\u00A0\u00A4'}, - 9: {'other': '0\u00A0mrd.\u00A0\u00A4'}, - 12: {'other': '0\u00A0bil.\u00A0\u00A4'}, - }), - // Compact number symbols for locale sq. - "sq": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0mij\u00EB'}, - 6: {'other': '0\u00A0mln'}, - 9: {'other': '0\u00A0mld'}, - 12: {'other': '0\u00A0bln'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 mij\u00EB'}, - 6: {'other': '0 milion'}, - 9: {'other': '0 miliard'}, - 12: {'other': '0 bilion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0mij\u00EB\u00A0\u00A4'}, - 6: {'other': '0\u00A0mln\u00A0\u00A4'}, - 9: {'other': '0\u00A0mld\u00A0\u00A4'}, - 12: {'other': '0\u00A0bln\u00A0\u00A4'}, - }), - // Compact number symbols for locale sr. - "sr": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0445\u0438\u0459.'}, - 6: {'other': '0\u00A0\u043C\u0438\u043B.'}, - 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434.'}, - 12: {'other': '0\u00A0\u0431\u0438\u043B.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 \u0445\u0438\u0459\u0430\u0434\u0435', - 'one': '0 \u0445\u0438\u0459\u0430\u0434\u0430', - 'other': '0 \u0445\u0438\u0459\u0430\u0434\u0430', - }, - 6: { - 'few': '0 \u043C\u0438\u043B\u0438\u043E\u043D\u0430', - 'one': '0 \u043C\u0438\u043B\u0438\u043E\u043D', - 'other': '0 \u043C\u0438\u043B\u0438\u043E\u043D\u0430', - }, - 9: { - 'few': '0 \u043C\u0438\u043B\u0438\u0458\u0430\u0440\u0434\u0435', - 'one': '0 \u043C\u0438\u043B\u0438\u0458\u0430\u0440\u0434\u0430', - 'other': '0 \u043C\u0438\u043B\u0438\u0458\u0430\u0440\u0434\u0438', - }, - 12: { - 'few': '0 \u0431\u0438\u043B\u0438\u043E\u043D\u0430', - 'one': '0 \u0431\u0438\u043B\u0438\u043E\u043D', - 'other': '0 \u0431\u0438\u043B\u0438\u043E\u043D\u0430', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u0445\u0438\u0459.\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u043C\u0438\u043B.\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434.\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u0431\u0438\u043B.\u00A0\u00A4'}, - }), - // Compact number symbols for locale sr_Latn. - "sr_Latn": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0hilj.'}, - 6: {'other': '0\u00A0mil.'}, - 9: {'other': '0\u00A0mlrd.'}, - 12: {'other': '0\u00A0bil.'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 hiljade', - 'one': '0 hiljada', - 'other': '0 hiljada', - }, - 6: { - 'few': '0 miliona', - 'one': '0 milion', - 'other': '0 miliona', - }, - 9: { - 'few': '0 milijarde', - 'one': '0 milijarda', - 'other': '0 milijardi', - }, - 12: { - 'few': '0 biliona', - 'one': '0 bilion', - 'other': '0 biliona', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0hilj.\u00A0\u00A4'}, - 6: {'other': '0\u00A0mil.\u00A0\u00A4'}, - 9: {'other': '0\u00A0mlrd.\u00A0\u00A4'}, - 12: {'other': '0\u00A0bil.\u00A0\u00A4'}, - }), - // Compact number symbols for locale sv. - "sv": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0tn'}, - 6: {'other': '0\u00A0mn'}, - 9: {'other': '0\u00A0md'}, - 12: {'other': '0\u00A0bn'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 tusen'}, - 6: { - 'one': '0 miljon', - 'other': '0 miljoner', - }, - 8: {'other': '000 miljoner'}, - 9: { - 'one': '0 miljard', - 'other': '0 miljarder', - }, - 10: {'other': '00 miljarder'}, - 12: { - 'one': '0 biljon', - 'other': '0 biljoner', - }, - 13: {'other': '00 biljoner'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0tn\u00A0\u00A4'}, - 6: {'other': '0\u00A0mn\u00A0\u00A4'}, - 9: {'other': '0\u00A0md\u00A0\u00A4'}, - 12: {'other': '0\u00A0bn\u00A0\u00A4'}, - }), - // Compact number symbols for locale sw. - "sw": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': 'elfu\u00A00;elfu\u00A0-0'}, - 6: { - 'one': '0M;-0M', - 'other': '0M', - }, - 9: {'other': '0B;-0B'}, - 12: { - 'one': '0T;-0T', - 'other': '0T', - }, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': 'elfu 0;elfu -0'}, - 6: {'other': 'milioni 0;milioni -0'}, - 9: {'other': 'bilioni 0;bilioni -0'}, - 12: {'other': 'trilioni 0;trilioni -0'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A0elfu0'}, - 4: {'other': '\u00A4\u00A0elfu00;\u00A4elfu\u00A0-00'}, - 5: {'other': '\u00A4\u00A0laki000;\u00A4laki\u00A0-000'}, - 6: { - 'one': '\u00A4\u00A00M;\u00A4-0M', - 'other': '\u00A4\u00A00M', - }, - 7: { - 'one': '\u00A4\u00A000M;\u00A4M-00M', - 'other': '\u00A4\u00A000M;\u00A4-00M', - }, - 8: { - 'one': '\u00A4\u00A0000M;\u00A4Milioni-000', - 'other': '\u00A4\u00A0000M', - }, - 9: {'other': '\u00A4\u00A00B;\u00A4-0B'}, - 12: { - 'one': '\u00A4\u00A00T;\u00A4-0T', - 'other': '\u00A4\u00A00T', - }, - 14: {'other': '\u00A4\u00A0000T;\u00A4-000T'}, - }), - // Compact number symbols for locale ta. - "ta": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u0B86'}, - 6: {'other': '0\u0BAE\u0BBF'}, - 9: {'other': '0\u0BAA\u0BBF'}, - 12: {'other': '0\u0B9F\u0BBF'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u0B86\u0BAF\u0BBF\u0BB0\u0BAE\u0BCD'}, - 6: {'other': '0 \u0BAE\u0BBF\u0BB2\u0BCD\u0BB2\u0BBF\u0BAF\u0BA9\u0BCD'}, - 9: {'other': '0 \u0BAA\u0BBF\u0BB2\u0BCD\u0BB2\u0BBF\u0BAF\u0BA9\u0BCD'}, - 12: { - 'other': - '0 \u0B9F\u0BBF\u0BB0\u0BBF\u0BB2\u0BCD\u0BB2\u0BBF\u0BAF\u0BA9\u0BCD' - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00\u0B86'}, - 6: {'other': '\u00A4\u00A00\u0BAE\u0BBF'}, - 9: { - 'one': '\u00A4\u00A00\u0BAA\u0BBF', - 'other': '\u00A40\u0BAA\u0BBF', - }, - 10: {'other': '\u00A4\u00A000\u0BAA\u0BBF'}, - 11: { - 'one': '\u00A4\u00A0000\u0BAA\u0BBF', - 'other': '\u00A4000\u0BAA\u0BBF', - }, - 12: {'other': '\u00A4\u00A00\u0B9F\u0BBF'}, - }), - // Compact number symbols for locale te. - "te": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u0C35\u0C47'}, - 6: {'other': '0\u0C2E\u0C3F'}, - 9: {'other': '0\u0C2C\u0C3F'}, - 12: {'other': '0\u0C1F\u0C4D\u0C30\u0C3F'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'one': '0 \u0C35\u0C47\u0C2F\u0C3F', - 'other': '0 \u0C35\u0C47\u0C32\u0C41', - }, - 4: {'other': '00 \u0C35\u0C47\u0C32\u0C41'}, - 6: { - 'one': '0 \u0C2E\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D', - 'other': '0 \u0C2E\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41', - }, - 7: {'other': '00 \u0C2E\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41'}, - 9: { - 'one': '0 \u0C2C\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D', - 'other': '0 \u0C2C\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41', - }, - 10: {'other': '00 \u0C2C\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41'}, - 12: { - 'one': '0 \u0C1F\u0C4D\u0C30\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D', - 'other': - '0 \u0C1F\u0C4D\u0C30\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41', - }, - 13: { - 'other': - '00 \u0C1F\u0C4D\u0C30\u0C3F\u0C32\u0C3F\u0C2F\u0C28\u0C4D\u0C32\u0C41' - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40\u0C35\u0C47'}, - 6: {'other': '\u00A40\u0C2E\u0C3F'}, - 9: {'other': '\u00A40\u0C2C\u0C3F'}, - 12: {'other': '\u00A40\u0C1F\u0C4D\u0C30\u0C3F'}, - }), - // Compact number symbols for locale th. - "th": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u0E1E\u0E31\u0E19'}, - 4: {'other': '0 \u0E2B\u0E21\u0E37\u0E48\u0E19'}, - 5: {'other': '0 \u0E41\u0E2A\u0E19'}, - 6: {'other': '0 \u0E25\u0E49\u0E32\u0E19'}, - 9: {'other': '0 \u0E1E\u0E31\u0E19\u0E25\u0E49\u0E32\u0E19'}, - 10: {'other': '0 \u0E2B\u0E21\u0E37\u0E48\u0E19\u0E25\u0E49\u0E32\u0E19'}, - 11: {'other': '0 \u0E41\u0E2A\u0E19\u0E25\u0E49\u0E32\u0E19'}, - 12: {'other': '0 \u0E25\u0E49\u0E32\u0E19\u0E25\u0E49\u0E32\u0E19'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale tl. - "tl": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'one': '0 libo', - 'other': '0 na libo', - }, - 6: { - 'one': '0 milyon', - 'other': '0 na milyon', - }, - 9: { - 'one': '0 bilyon', - 'other': '0 na bilyon', - }, - 12: { - 'one': '0 trilyon', - 'other': '0 na trilyon', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale tr. - "tr": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0B'}, - 6: {'other': '0\u00A0Mn'}, - 9: {'other': '0\u00A0Mr'}, - 12: {'other': '0\u00A0Tn'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 bin'}, - 6: {'other': '0 milyon'}, - 9: {'other': '0 milyar'}, - 12: {'other': '0 trilyon'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0B\u00A0\u00A4'}, - 6: {'other': '0\u00A0Mn\u00A0\u00A4'}, - 9: {'other': '0\u00A0Mr\u00A0\u00A4'}, - 12: {'other': '0\u00A0Tn\u00A0\u00A4'}, - }), - // Compact number symbols for locale uk. - "uk": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u0442\u0438\u0441.'}, - 6: {'other': '0\u00A0\u043C\u043B\u043D'}, - 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434'}, - 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: { - 'few': '0 \u0442\u0438\u0441\u044F\u0447\u0456', - 'many': '0 \u0442\u0438\u0441\u044F\u0447', - 'one': '0 \u0442\u0438\u0441\u044F\u0447\u0430', - 'other': '0 \u0442\u0438\u0441\u044F\u0447\u0456', - }, - 6: { - 'few': '0 \u043C\u0456\u043B\u044C\u0439\u043E\u043D\u0438', - 'many': '0 \u043C\u0456\u043B\u044C\u0439\u043E\u043D\u0456\u0432', - 'one': '0 \u043C\u0456\u043B\u044C\u0439\u043E\u043D', - 'other': '0 \u043C\u0456\u043B\u044C\u0439\u043E\u043D\u0430', - }, - 9: { - 'few': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434\u0438', - 'many': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434\u0456\u0432', - 'one': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434', - 'other': '0 \u043C\u0456\u043B\u044C\u044F\u0440\u0434\u0430', - }, - 12: { - 'few': '0 \u0442\u0440\u0438\u043B\u044C\u0439\u043E\u043D\u0438', - 'many': '0 \u0442\u0440\u0438\u043B\u044C\u0439\u043E\u043D\u0456\u0432', - 'one': '0 \u0442\u0440\u0438\u043B\u044C\u0439\u043E\u043D', - 'other': '0 \u0442\u0440\u0438\u043B\u044C\u0439\u043E\u043D\u0430', - }, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0\u0442\u0438\u0441.\u00A0\u00A4'}, - 6: {'other': '0\u00A0\u043C\u043B\u043D\u00A0\u00A4'}, - 9: {'other': '0\u00A0\u043C\u043B\u0440\u0434\u00A0\u00A4'}, - 12: {'other': '0\u00A0\u0442\u0440\u043B\u043D\u00A0\u00A4'}, - }), - // Compact number symbols for locale ur. - "ur": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0\u06C1\u0632\u0627\u0631'}, - 5: {'other': '0\u00A0\u0644\u0627\u06A9\u06BE'}, - 7: {'other': '0\u00A0\u06A9\u0631\u0648\u0691'}, - 9: {'other': '0\u00A0\u0627\u0631\u0628'}, - 11: {'other': '0\u00A0\u06A9\u06BE\u0631\u0628'}, - 13: {'other': '00\u00A0\u0679\u0631\u06CC\u0644\u06CC\u0646'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 \u06C1\u0632\u0627\u0631'}, - 5: {'other': '0 \u0644\u0627\u06A9\u06BE'}, - 7: {'other': '0 \u06A9\u0631\u0648\u0691'}, - 9: {'other': '0 \u0627\u0631\u0628'}, - 11: {'other': '0 \u06A9\u06BE\u0631\u0628'}, - 13: {'other': '00 \u0679\u0631\u06CC\u0644\u06CC\u0646'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A4\u00A00\u00A0\u06C1\u0632\u0627\u0631'}, - 5: {'other': '\u00A4\u00A00\u00A0\u0644\u0627\u06A9\u06BE'}, - 7: {'other': '\u00A4\u00A00\u00A0\u06A9\u0631\u0648\u0691'}, - 9: {'other': '\u00A4\u00A00\u00A0\u0627\u0631\u0628'}, - 11: {'other': '\u00A4\u00A00\u00A0\u06A9\u06BE\u0631\u0628'}, - 12: {'other': '\u00A40\u00A0\u0679\u0631\u06CC\u0644\u06CC\u0646'}, - 13: {'other': '\u00A4\u00A000\u00A0\u0679\u0631\u06CC\u0644\u06CC\u0646'}, - }), - // Compact number symbols for locale uz. - "uz": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0ming'}, - 6: {'other': '0\u00A0mln'}, - 9: {'other': '0\u00A0mlrd'}, - 12: {'other': '0\u00A0trln'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 ming'}, - 6: {'other': '0 million'}, - 9: {'other': '0 milliard'}, - 12: {'other': '0 trillion'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0ming\u00A0\u00A4'}, - 6: {'other': '0\u00A0mln\u00A0\u00A4'}, - 9: {'other': '0\u00A0mlrd\u00A0\u00A4'}, - 12: {'other': '0\u00A0trln\u00A0\u00A4'}, - }), - // Compact number symbols for locale vi. - "vi": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0\u00A0N'}, - 6: {'other': '0\u00A0Tr'}, - 9: {'other': '0\u00A0T'}, - 12: {'other': '0\u00A0NT'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 ngh\u00ECn'}, - 6: {'other': '0 tri\u1EC7u'}, - 9: {'other': '0 t\u1EF7'}, - 12: {'other': '0 ngh\u00ECn t\u1EF7'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0\u00A0N\u00A0\u00A4'}, - 6: {'other': '0\u00A0Tr\u00A0\u00A4'}, - 9: {'other': '0\u00A0T\u00A0\u00A4'}, - 12: {'other': '0\u00A0NT\u00A0\u00A4'}, - }), - // Compact number symbols for locale zh. - "zh": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0\u4E07'}, - 8: {'other': '0\u4EBF'}, - 12: {'other': '0\u4E07\u4EBF'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0\u4E07'}, - 8: {'other': '0\u4EBF'}, - 12: {'other': '0\u4E07\u4EBF'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '\u00A40\u4E07'}, - 8: {'other': '\u00A40\u4EBF'}, - 12: {'other': '\u00A40\u4E07\u4EBF'}, - }), - // Compact number symbols for locale zh_CN. - "zh_CN": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0\u4E07'}, - 8: {'other': '0\u4EBF'}, - 12: {'other': '0\u4E07\u4EBF'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0\u4E07'}, - 8: {'other': '0\u4EBF'}, - 12: {'other': '0\u4E07\u4EBF'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '\u00A40\u4E07'}, - 8: {'other': '\u00A40\u4EBF'}, - 12: {'other': '\u00A40\u4E07\u4EBF'}, - }), - // Compact number symbols for locale zh_HK. - "zh_HK": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0\u842C'}, - 8: {'other': '0\u5104'}, - 12: {'other': '0\u5146'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: {'other': '\u00A40M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }), - // Compact number symbols for locale zh_TW. - "zh_TW": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0\u842C'}, - 8: {'other': '0\u5104'}, - 12: {'other': '0\u5146'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '0\u842C'}, - 8: {'other': '0\u5104'}, - 12: {'other': '0\u5146'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '0'}, - 4: {'other': '\u00A40\u842C'}, - 8: {'other': '\u00A40\u5104'}, - 12: {'other': '\u00A40\u5146'}, - }), - // Compact number symbols for locale zu. - "zu": new CompactNumberSymbols(COMPACT_DECIMAL_SHORT_PATTERN: const { - 3: {'other': '0K'}, - 6: {'other': '0M'}, - 9: {'other': '0B'}, - 12: {'other': '0T'}, - }, COMPACT_DECIMAL_LONG_PATTERN: const { - 3: {'other': '0 inkulungwane'}, - 6: {'other': '0 isigidi'}, - 9: {'other': '0 isigidi sezigidi'}, - 12: {'other': '0 isigidintathu'}, - }, COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN: const { - 3: {'other': '\u00A40K'}, - 6: { - 'one': '\u00A40M', - 'other': '\u00A4\u00A00M', - }, - 8: {'other': '\u00A4000M'}, - 9: {'other': '\u00A40B'}, - 12: {'other': '\u00A40T'}, - }) -}; - -final currencyFractionDigits = { - "ADP": 0, - "AFN": 0, - "ALL": 0, - "AMD": 2, - "BHD": 3, - "BIF": 0, - "BYN": 2, - "BYR": 0, - "CAD": 2, - "CHF": 2, - "CLF": 4, - "CLP": 0, - "COP": 2, - "CRC": 2, - "CZK": 2, - "DEFAULT": 2, - "DJF": 0, - "DKK": 2, - "ESP": 0, - "GNF": 0, - "GYD": 2, - "HUF": 2, - "IDR": 2, - "IQD": 0, - "IRR": 0, - "ISK": 0, - "ITL": 0, - "JOD": 3, - "JPY": 0, - "KMF": 0, - "KPW": 0, - "KRW": 0, - "KWD": 3, - "LAK": 0, - "LBP": 0, - "LUF": 0, - "LYD": 3, - "MGA": 0, - "MGF": 0, - "MMK": 0, - "MNT": 2, - "MRO": 0, - "MUR": 2, - "NOK": 2, - "OMR": 3, - "PKR": 2, - "PYG": 0, - "RSD": 0, - "RWF": 0, - "SEK": 2, - "SLE": 2, - "SLL": 0, - "SOS": 0, - "STD": 0, - "SYP": 0, - "TMM": 0, - "TND": 3, - "TRL": 0, - "TWD": 2, - "TZS": 2, - "UGX": 0, - "UYI": 0, - "UYW": 4, - "UZS": 2, - "VEF": 2, - "VND": 0, - "VUV": 0, - "XAF": 0, - "XOF": 0, - "XPF": 0, - "YER": 0, - "ZMK": 0, - "ZWD": 0, -}; diff --git a/dart/lib/src/vendor/intl/string_stack.dart b/dart/lib/src/vendor/intl/string_stack.dart deleted file mode 100644 index 90ce5e793f..0000000000 --- a/dart/lib/src/vendor/intl/string_stack.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'dart:math'; - -/// An indexed position in a String which can read by specified character -/// counts, or read digits up to a delimiter. -class StringStack { - final String contents; - int _index = 0; - - StringStack(this.contents); - - bool get atStart => _index == 0; - - bool get atEnd => _index >= contents.length; - - String next() => contents[_index++]; - - /// Advance the index by [n]. - void pop([int n = 1]) => _index += n; - - /// Return the next [n] characters, or as many as there are remaining, - /// and advance the index. - String read([int n = 1]) { - var result = peek(n); - pop(n); - return result; - } - - /// Returns whether the input starts with [pattern] from the current index. - bool startsWith(String pattern) => contents.startsWith(pattern, _index); - - /// Return the next [howMany] characters, or as many as there are remaining, - /// without advancing the index. - String peek([int howMany = 1]) => - contents.substring(_index, min(_index + howMany, contents.length)); - - /// Return the remaining contents of the String, without advancing the index. - String peekAll() => peek(contents.length - _index); - - @override - String toString() { - return '$contents at $_index'; - } -} From b858d6bf85ae8e92e9979c7dc385dbb5bb87ffe9 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 13 Mar 2023 10:55:17 +0100 Subject: [PATCH 14/29] remove unused number format props --- dart/lib/src/vendor/intl/number_format.dart | 63 ++++---------------- dart/lib/src/vendor/intl/number_symbols.dart | 53 +--------------- 2 files changed, 15 insertions(+), 101 deletions(-) diff --git a/dart/lib/src/vendor/intl/number_format.dart b/dart/lib/src/vendor/intl/number_format.dart index e09d9de800..b98b07e720 100644 --- a/dart/lib/src/vendor/intl/number_format.dart +++ b/dart/lib/src/vendor/intl/number_format.dart @@ -47,28 +47,15 @@ class NumberFormat { /// Set to true if the format has explicitly set the grouping size. final bool _decimalSeparatorAlwaysShown; - int maximumIntegerDigits; int minimumIntegerDigits; - bool _explicitMaximumFractionDigits = false; + final bool _explicitMaximumFractionDigits = false; int _maximumFractionDigits; int get maximumFractionDigits => _maximumFractionDigits; - set maximumFractionDigits(int x) { - significantDigitsInUse = false; - _explicitMaximumFractionDigits = true; - _maximumFractionDigits = x; - _minimumFractionDigits = min(_minimumFractionDigits, x); - } - bool _explicitMinimumFractionDigits = false; + final bool _explicitMinimumFractionDigits = false; int _minimumFractionDigits; int get minimumFractionDigits => _minimumFractionDigits; - set minimumFractionDigits(int x) { - significantDigitsInUse = false; - _explicitMinimumFractionDigits = true; - _minimumFractionDigits = x; - _maximumFractionDigits = max(_maximumFractionDigits, x); - } int minimumExponentDigits; @@ -113,13 +100,6 @@ class NumberFormat { bool significantDigitsInUse = false; - /// For percent and permille, what are we multiplying by in order to - /// get the printed value, e.g. 100 for percent. - final int multiplier; - - /// How many digits are there in the [multiplier]. - final int _multiplierDigits; - /// Caches the symbols used for our locale. final NumberSymbols _symbols; @@ -147,52 +127,33 @@ class NumberFormat { /// at a time. In languages with threads we'd need to pass this on the stack. final StringBuffer _buffer = StringBuffer(); - /// Create a number format that prints using [newPattern] as it applies in - /// [locale]. - factory NumberFormat([String? locale]) => - NumberFormat._forPattern(locale); - /// Create a number format that prints in a pattern we get from /// the [getPattern] function using the locale [locale]. /// /// The [currencySymbol] can either be specified directly, or we can pass a /// function [computeCurrencySymbol] that will compute it later, given other /// information, typically the verified locale. - factory NumberFormat._forPattern(String? locale) { + factory NumberFormat([String? locale]) { var symbols = NumberSymbols( - NAME: "en", DECIMAL_SEP: '.', - GROUP_SEP: ',', - PERCENT: '%', ZERO_DIGIT: '0', - PLUS_SIGN: '+', - MINUS_SIGN: '-', - EXP_SYMBOL: 'E', - PERMILL: '\u2030', - INFINITY: '\u221E', NAN: 'NaN', - DECIMAL_PATTERN: '#,##0.###', - SCIENTIFIC_PATTERN: '#E0', - PERCENT_PATTERN: '#,##0%', - CURRENCY_PATTERN: '\u00A4#,##0.00', - DEF_CURRENCY_CODE: 'USD'); + ); var localeZero = symbols.ZERO_DIGIT.codeUnitAt(0); var zeroOffset = localeZero - '0'.codeUnitAt(0); return NumberFormat._( localeZero, symbols, - zeroOffset); + zeroOffset, + ); } NumberFormat._( this.localeZero, this._symbols, this._zeroOffset) - : multiplier = 1, - _multiplierDigits = 0, - minimumExponentDigits = 0, - maximumIntegerDigits = 40, + : minimumExponentDigits = 0, minimumIntegerDigits = 1, _maximumFractionDigits = 16, _minimumFractionDigits = 0, @@ -345,7 +306,7 @@ class NumberFormat { if (minimumSignificantDigits != null) { var remainingSignificantDigits = - minimumSignificantDigits! - _multiplierDigits - integerLength; + minimumSignificantDigits! - integerLength; fractionDigits = max(0, remainingSignificantDigits); if (minimumSignificantDigitsStrict) { @@ -361,7 +322,7 @@ class NumberFormat { integerPart = 0; fractionDigits = 0; } else if (maximumSignificantDigits! < - integerLength + _multiplierDigits) { + integerLength) { // We may have to round. var divideBy = pow(10, integerLength - maximumSignificantDigits!); if (maximumSignificantDigits! < integerLength) { @@ -371,7 +332,7 @@ class NumberFormat { fractionDigits = 0; } else { fractionDigits = - maximumSignificantDigits! - integerLength - _multiplierDigits; + maximumSignificantDigits! - integerLength; fractionDigits = _adjustFractionDigits(fractionDigits, fractionDigits); } @@ -390,7 +351,7 @@ class NumberFormat { computeFractionDigits(); power = pow(10, fractionDigits) as int; - digitMultiplier = power * multiplier; + digitMultiplier = power; // Multiply out to the number of decimal places and the percent, then // round. For fixed-size integer types this should always be zero, so @@ -464,7 +425,7 @@ class NumberFormat { var extra = extraIntegerDigits == 0 ? '' : extraIntegerDigits.toString(); var intDigits = _mainIntegerDigits(integerPart); var paddedExtra = - intDigits.isEmpty ? extra : extra.padLeft(_multiplierDigits, '0'); + intDigits.isEmpty ? extra : extra.padLeft(0, '0'); return '$intDigits$paddedExtra$paddingDigits'; } diff --git a/dart/lib/src/vendor/intl/number_symbols.dart b/dart/lib/src/vendor/intl/number_symbols.dart index b16156e3d9..faa8466948 100644 --- a/dart/lib/src/vendor/intl/number_symbols.dart +++ b/dart/lib/src/vendor/intl/number_symbols.dart @@ -6,60 +6,13 @@ library number_symbols; // Suppress naming issues as changes would be breaking. // ignore_for_file: non_constant_identifier_names -/// This holds onto information about how a particular locale formats -/// numbers. It contains strings for things like the decimal separator, digit to -/// use for "0" and infinity. We expect the data for instances to be generated -/// out of ICU or a similar reference source. class NumberSymbols { - final String NAME; final String DECIMAL_SEP, - GROUP_SEP, - PERCENT, ZERO_DIGIT, - PLUS_SIGN, - MINUS_SIGN, - EXP_SYMBOL, - PERMILL, - INFINITY, - NAN, - DECIMAL_PATTERN, - SCIENTIFIC_PATTERN, - PERCENT_PATTERN, - CURRENCY_PATTERN, - DEF_CURRENCY_CODE; + NAN; const NumberSymbols( - {required this.NAME, - required this.DECIMAL_SEP, - required this.GROUP_SEP, - required this.PERCENT, + {required this.DECIMAL_SEP, required this.ZERO_DIGIT, - required this.PLUS_SIGN, - required this.MINUS_SIGN, - required this.EXP_SYMBOL, - required this.PERMILL, - required this.INFINITY, - required this.NAN, - required this.DECIMAL_PATTERN, - required this.SCIENTIFIC_PATTERN, - required this.PERCENT_PATTERN, - required this.CURRENCY_PATTERN, - required this.DEF_CURRENCY_CODE}); - - @override - String toString() => NAME; -} - -/// A container class for SHORT, LONG, and SHORT CURRENCY patterns. -/// -/// (This class' members contain more than just symbols: they contain the full -/// number formatting pattern.) -class CompactNumberSymbols { - final Map> COMPACT_DECIMAL_SHORT_PATTERN; - final Map>? COMPACT_DECIMAL_LONG_PATTERN; - final Map> COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN; - CompactNumberSymbols( - {required this.COMPACT_DECIMAL_SHORT_PATTERN, - this.COMPACT_DECIMAL_LONG_PATTERN, - required this.COMPACT_DECIMAL_SHORT_CURRENCY_PATTERN}); + required this.NAN}); } From 3b8cc9f7ac61b8d82566ace5f70d1df5ed5c0bee Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 13 Mar 2023 11:18:50 +0100 Subject: [PATCH 15/29] rename to sample rate format --- dart/lib/src/sentry_tracer.dart | 4 +- dart/lib/src/utils/sample_rate_format.dart | 303 +++++++++++ dart/lib/src/vendor/intl/number_format.dart | 503 ------------------ dart/lib/src/vendor/intl/number_symbols.dart | 18 - .../sample_rate_format_test.dart} | 12 +- 5 files changed, 315 insertions(+), 525 deletions(-) create mode 100644 dart/lib/src/utils/sample_rate_format.dart delete mode 100644 dart/lib/src/vendor/intl/number_format.dart delete mode 100644 dart/lib/src/vendor/intl/number_symbols.dart rename dart/test/{vendor/intl/number_format_test.dart => utils/sample_rate_format_test.dart} (77%) diff --git a/dart/lib/src/sentry_tracer.dart b/dart/lib/src/sentry_tracer.dart index 3a9f255dae..a345645c80 100644 --- a/dart/lib/src/sentry_tracer.dart +++ b/dart/lib/src/sentry_tracer.dart @@ -4,7 +4,7 @@ import 'package:meta/meta.dart'; import '../sentry.dart'; import 'sentry_tracer_finish_status.dart'; -import 'vendor/intl/number_format.dart'; +import 'utils/sample_rate_format.dart'; @internal class SentryTracer extends ISentrySpan { @@ -350,7 +350,7 @@ class SentryTracer extends ISentrySpan { return null; } return sampleRate != null - ? NumberFormat().format(sampleRate) + ? SampleRateFormat().format(sampleRate) : null; } diff --git a/dart/lib/src/utils/sample_rate_format.dart b/dart/lib/src/utils/sample_rate_format.dart new file mode 100644 index 0000000000..6e479cdf6c --- /dev/null +++ b/dart/lib/src/utils/sample_rate_format.dart @@ -0,0 +1,303 @@ +import 'dart:math'; + +// Suppress naming issues as changes would be breaking. +// ignore_for_file: non_constant_identifier_names +class NumberSymbols { + final String DECIMAL_SEP, + ZERO_DIGIT, + NAN; + + const NumberSymbols( + {required this.DECIMAL_SEP, + required this.ZERO_DIGIT, + required this.NAN}); +} + +class SampleRateFormat { + + int minimumIntegerDigits; + + int _maximumFractionDigits; + int get maximumFractionDigits => _maximumFractionDigits; + + int _minimumFractionDigits; + int get minimumFractionDigits => _minimumFractionDigits; + + int? _minimumSignificantDigits; + int? get minimumSignificantDigits => _minimumSignificantDigits; + + /// The difference between our zero and '0'. + /// + /// In other words, a constant _localeZero - _zero. Initialized when + /// the locale is set. + final int _zeroOffset; + + /// Caches the symbols used for our locale. + final NumberSymbols _symbols; + + /// Transient internal state in which to build up the result of the format + /// operation. We can have this be just an instance variable because Dart is + /// single-threaded and unless we do an asynchronous operation in the process + /// of formatting then there will only ever be one number being formatted + /// at a time. In languages with threads we'd need to pass this on the stack. + final StringBuffer _buffer = StringBuffer(); + + factory SampleRateFormat() { + var symbols = NumberSymbols( + DECIMAL_SEP: '.', + ZERO_DIGIT: '0', + NAN: 'NaN', + ); + var localeZero = symbols.ZERO_DIGIT.codeUnitAt(0); + var zeroOffset = localeZero - '0'.codeUnitAt(0); + + return SampleRateFormat._( + symbols, + zeroOffset, + ); + } + + SampleRateFormat._( + this._symbols, + this._zeroOffset) + : minimumIntegerDigits = 1, + _maximumFractionDigits = 16, + _minimumFractionDigits = 0; + + /// Return the symbols which are used in our locale. Cache them to avoid + /// repeated lookup. + NumberSymbols get symbols => _symbols; + + /// Format the sample rate + String format(dynamic sampleRate) { + if (_isNaN(sampleRate)) return symbols.NAN; + if (_isSmallerZero(sampleRate)) { + sampleRate = 0; + } + if (_isLargerOne(sampleRate)) { + sampleRate = 1; + } + _formatFixed(sampleRate.abs()); + + var result = _buffer.toString(); + _buffer.clear(); + return result; + } + + /// Used to test if we have exceeded integer limits. + static final _maxInt = 1 is double ? pow(2, 52) : 1.0e300.floor(); + static final _maxDigits = (log(_maxInt) / log(10)).ceil(); + + bool _isNaN(number) => number is num ? number.isNaN : false; + bool _isSmallerZero(number) => number is num ? number < 0 : false; + bool _isLargerOne(number) => number is num ? number > 1 : false; + + /// Format the basic number portion, including the fractional digits. + void _formatFixed(dynamic number) { + dynamic integerPart; + int fractionPart; + int extraIntegerDigits; + var fractionDigits = maximumFractionDigits; + var minFractionDigits = minimumFractionDigits; + + var power = 0; + int digitMultiplier; + + // We have three possible pieces. First, the basic integer part. If this + // is a percent or permille, the additional 2 or 3 digits. Finally the + // fractional part. + // We avoid multiplying the number because it might overflow if we have + // a fixed-size integer type, so we extract each of the three as an + // integer pieces. + integerPart = _floor(number); + var fraction = number - integerPart; + if (fraction.toInt() != 0) { + // If the fractional part leftover is > 1, presumbly the number + // was too big for a fixed-size integer, so leave it as whatever + // it was - the obvious thing is a double. + integerPart = number; + fraction = 0; + } + + power = pow(10, fractionDigits) as int; + digitMultiplier = power; + + // Multiply out to the number of decimal places and the percent, then + // round. For fixed-size integer types this should always be zero, so + // multiplying is OK. + var remainingDigits = _round(fraction * digitMultiplier).toInt(); + + if (remainingDigits >= digitMultiplier) { + // Overflow into the main digits: 0.99 => 1.00 + integerPart++; + remainingDigits -= digitMultiplier; + } else if (_numberOfIntegerDigits(remainingDigits) > + _numberOfIntegerDigits(_floor(fraction * digitMultiplier).toInt())) { + // Fraction has been rounded (0.0996 -> 0.1). + fraction = remainingDigits / digitMultiplier; + } + + // Separate out the extra integer parts from the fraction part. + extraIntegerDigits = remainingDigits ~/ power; + fractionPart = remainingDigits % power; + + var integerDigits = _integerDigits(integerPart, extraIntegerDigits); + var digitLength = integerDigits.length; + var fractionPresent = + fractionDigits > 0 && (minFractionDigits > 0 || fractionPart > 0); + + if (_hasIntegerDigits(integerDigits)) { + // Add the padding digits to the regular digits so that we get grouping. + var padding = '0' * (minimumIntegerDigits - digitLength); + integerDigits = '$padding$integerDigits'; + digitLength = integerDigits.length; + for (var i = 0; i < digitLength; i++) { + _addDigit(integerDigits.codeUnitAt(i)); + } + } else if (!fractionPresent) { + // If neither fraction nor integer part exists, just print zero. + _addZero(); + } + + _decimalSeparator(fractionPresent); + if (fractionPresent) { + _formatFractionPart((fractionPart + power).toString(), minFractionDigits); + } + } + + /// Helper to get the floor of a number which might not be num. This should + /// only ever be called with an argument which is positive, or whose abs() + /// is negative. The second case is the maximum negative value on a + /// fixed-length integer. Since they are integers, they are also their own + /// floor. + dynamic _floor(dynamic number) { + if (number.isNegative && !number.abs().isNegative) { + throw ArgumentError( + 'Internal error: expected positive number, got $number'); + } + return (number is num) ? number.floor() : number ~/ 1; + } + + /// Helper to round a number which might not be num. + dynamic _round(dynamic number) { + if (number is num) { + if (number.isInfinite) { + return _maxInt; + } else { + return number.round(); + } + } else if (number.remainder(1) == 0) { + // Not a normal number, but int-like, e.g. Int64 + return number; + } else { + // TODO(alanknight): Do this more efficiently. If IntX had floor and + // round we could avoid this. + var basic = _floor(number); + var fraction = (number - basic).toDouble().round(); + return fraction == 0 ? number : number + fraction; + } + } + + // Return the number of digits left of the decimal place in [number]. + static int _numberOfIntegerDigits(dynamic number) { + var simpleNumber = (number.toDouble() as double).abs(); + // It's unfortunate that we have to do this, but we get precision errors + // that affect the result if we use logs, e.g. 1000000 + if (simpleNumber < 10) return 1; + if (simpleNumber < 100) return 2; + if (simpleNumber < 1000) return 3; + if (simpleNumber < 10000) return 4; + if (simpleNumber < 100000) return 5; + if (simpleNumber < 1000000) return 6; + if (simpleNumber < 10000000) return 7; + if (simpleNumber < 100000000) return 8; + if (simpleNumber < 1000000000) return 9; + if (simpleNumber < 10000000000) return 10; + if (simpleNumber < 100000000000) return 11; + if (simpleNumber < 1000000000000) return 12; + if (simpleNumber < 10000000000000) return 13; + if (simpleNumber < 100000000000000) return 14; + if (simpleNumber < 1000000000000000) return 15; + if (simpleNumber < 10000000000000000) return 16; + if (simpleNumber < 100000000000000000) return 17; + if (simpleNumber < 1000000000000000000) return 18; + return 19; + } + + /// Compute the raw integer digits which will then be printed with + /// grouping and translated to localized digits. + String _integerDigits(integerPart, extraIntegerDigits) { + // If the integer part is larger than the maximum integer size + // (2^52 on Javascript, 2^63 on the VM) it will lose precision, + // so pad out the rest of it with zeros. + var paddingDigits = ''; + if (integerPart is num && integerPart > _maxInt) { + var howManyDigitsTooBig = (log(integerPart) / log(10)).ceil() - _maxDigits; + num divisor = pow(10, howManyDigitsTooBig).round(); + // pow() produces 0 if the result is too large for a 64-bit int. + // If that happens, use a floating point divisor instead. + if (divisor == 0) divisor = pow(10.0, howManyDigitsTooBig); + paddingDigits = '0' * howManyDigitsTooBig.toInt(); + integerPart = (integerPart / divisor).truncate(); + } + + var extra = extraIntegerDigits == 0 ? '' : extraIntegerDigits.toString(); + var intDigits = _mainIntegerDigits(integerPart); + var paddedExtra = + intDigits.isEmpty ? extra : extra.padLeft(0, '0'); + return '$intDigits$paddedExtra$paddingDigits'; + } + + /// The digit string of the integer part. This is the empty string if the + /// integer part is zero and otherwise is the toString() of the integer + /// part, stripping off any minus sign. + String _mainIntegerDigits(integer) { + if (integer == 0) return ''; + var digits = integer.toString(); + // If we have a fixed-length int representation, it can have a negative + // number whose negation is also negative, e.g. 2^-63 in 64-bit. + // Remove the minus sign. + return digits.startsWith('-') ? digits.substring(1) : digits; + } + + /// Format the part after the decimal place in a fixed point number. + void _formatFractionPart(String fractionPart, int minDigits) { + var fractionLength = fractionPart.length; + while (fractionPart.codeUnitAt(fractionLength - 1) == + '0'.codeUnitAt(0) && + fractionLength > minDigits + 1) { + fractionLength--; + } + for (var i = 1; i < fractionLength; i++) { + _addDigit(fractionPart.codeUnitAt(i)); + } + } + + /// Print the decimal separator if appropriate. + void _decimalSeparator(bool fractionPresent) { + if (fractionPresent) { + _add(symbols.DECIMAL_SEP); + } + } + + /// Return true if we have a main integer part which is printable, either + /// because we have digits left of the decimal point (this may include digits + /// which have been moved left because of percent or permille formatting), + /// or because the minimum number of printable digits is greater than 1. + bool _hasIntegerDigits(String digits) => + digits.isNotEmpty || minimumIntegerDigits > 0; + + /// A group of methods that provide support for writing digits and other + /// required characters into [_buffer] easily. + void _add(String x) { + _buffer.write(x); + } + + void _addZero() { + _buffer.write(symbols.ZERO_DIGIT); + } + + void _addDigit(int x) { + _buffer.writeCharCode(x + _zeroOffset); + } +} diff --git a/dart/lib/src/vendor/intl/number_format.dart b/dart/lib/src/vendor/intl/number_format.dart deleted file mode 100644 index b98b07e720..0000000000 --- a/dart/lib/src/vendor/intl/number_format.dart +++ /dev/null @@ -1,503 +0,0 @@ -import 'dart:math'; - -import 'number_symbols.dart'; - -// ignore_for_file: constant_identifier_names - -/// Provides the ability to format a number in a locale-specific way. -/// -/// The format is specified as a pattern using a subset of the ICU formatting -/// patterns. -/// -/// - `0` A single digit -/// - `#` A single digit, omitted if the value is zero -/// - `.` Decimal separator -/// - `-` Minus sign -/// - `,` Grouping separator -/// - `E` Separates mantissa and expontent -/// - `+` - Before an exponent, to say it should be prefixed with a plus sign. -/// - `%` - In prefix or suffix, multiply by 100 and show as percentage -/// - `‰ (\u2030)` In prefix or suffix, multiply by 1000 and show as per mille -/// - `¤ (\u00A4)` Currency sign, replaced by currency name -/// - `'` Used to quote special characters -/// - `;` Used to separate the positive and negative patterns (if both present) -/// -/// For example, -/// -/// var f = NumberFormat("###.0#", "en_US"); -/// print(f.format(12.345)); -/// ==> 12.34 -/// -/// If the locale is not specified, it will default to the current locale. If -/// the format is not specified it will print in a basic format with at least -/// one integer digit and three fraction digits. -/// -/// There are also standard patterns available via the special constructors. -/// e.g. -/// -/// var percent = NumberFormat.percentPattern("ar"); -/// var eurosInUSFormat = NumberFormat.currency(locale: "en_US", -/// symbol: "€"); -/// -/// There are several such constructors available, though some of them are -/// limited. For example, at the moment, scientificPattern prints only as -/// equivalent to "#E0" and does not take into account significant digits. -class NumberFormat { - - /// Set to true if the format has explicitly set the grouping size. - final bool _decimalSeparatorAlwaysShown; - - int minimumIntegerDigits; - - final bool _explicitMaximumFractionDigits = false; - int _maximumFractionDigits; - int get maximumFractionDigits => _maximumFractionDigits; - - final bool _explicitMinimumFractionDigits = false; - int _minimumFractionDigits; - int get minimumFractionDigits => _minimumFractionDigits; - - int minimumExponentDigits; - - int? _maximumSignificantDigits; - int? get maximumSignificantDigits => _maximumSignificantDigits; - set maximumSignificantDigits(int? x) { - _maximumSignificantDigits = x; - if (x != null && _minimumSignificantDigits != null) { - _minimumSignificantDigits = min(_minimumSignificantDigits!, x); - } - significantDigitsInUse = true; - } - - /// Whether minimumSignificantDigits should cause trailing 0 in fraction part. - /// - /// Ex: with 2 significant digits: - /// 0.999 => "1.0" (strict) or "1" (non-strict). - bool minimumSignificantDigitsStrict = false; - - int? _minimumSignificantDigits; - int? get minimumSignificantDigits => _minimumSignificantDigits; - set minimumSignificantDigits(int? x) { - _minimumSignificantDigits = x; - if (x != null && _maximumSignificantDigits != null) { - _maximumSignificantDigits = max(_maximumSignificantDigits!, x); - } - significantDigitsInUse = true; - minimumSignificantDigitsStrict = x != null; - } - - /// How many significant digits should we print. - /// - /// Note that if significantDigitsInUse is the default false, this - /// will be ignored. - @Deprecated('Use maximumSignificantDigits / minimumSignificantDigits') - int? get significantDigits => _minimumSignificantDigits; - - set significantDigits(int? x) { - minimumSignificantDigits = x; - maximumSignificantDigits = x; - } - - bool significantDigitsInUse = false; - - /// Caches the symbols used for our locale. - final NumberSymbols _symbols; - - /// The number of decimal places to use when formatting. - /// - /// If this is not explicitly specified in the constructor, then for - /// currencies we use the default value for the currency if the name is given, - /// otherwise we use the value from the pattern for the locale. - /// - /// So, for example, - /// NumberFormat.currency(name: 'USD', decimalDigits: 7) - /// will format with 7 decimal digits, because that's what we asked for. But - /// NumberFormat.currency(locale: 'en_US', name: 'JPY') - /// will format with zero, because that's the default for JPY, and the - /// currency's default takes priority over the locale's default. - /// NumberFormat.currency(locale: 'en_US') - /// will format with two, which is the default for that locale. - /// - final int? decimalDigits; - - /// Transient internal state in which to build up the result of the format - /// operation. We can have this be just an instance variable because Dart is - /// single-threaded and unless we do an asynchronous operation in the process - /// of formatting then there will only ever be one number being formatted - /// at a time. In languages with threads we'd need to pass this on the stack. - final StringBuffer _buffer = StringBuffer(); - - /// Create a number format that prints in a pattern we get from - /// the [getPattern] function using the locale [locale]. - /// - /// The [currencySymbol] can either be specified directly, or we can pass a - /// function [computeCurrencySymbol] that will compute it later, given other - /// information, typically the verified locale. - factory NumberFormat([String? locale]) { - var symbols = NumberSymbols( - DECIMAL_SEP: '.', - ZERO_DIGIT: '0', - NAN: 'NaN', - ); - var localeZero = symbols.ZERO_DIGIT.codeUnitAt(0); - var zeroOffset = localeZero - '0'.codeUnitAt(0); - - return NumberFormat._( - localeZero, - symbols, - zeroOffset, - ); - } - - NumberFormat._( - this.localeZero, - this._symbols, - this._zeroOffset) - : minimumExponentDigits = 0, - minimumIntegerDigits = 1, - _maximumFractionDigits = 16, - _minimumFractionDigits = 0, - _decimalSeparatorAlwaysShown = false, - decimalDigits = null; - - /// Return the symbols which are used in our locale. Cache them to avoid - /// repeated lookup. - NumberSymbols get symbols => _symbols; - - /// Format [number] according to our pattern and return the formatted string. - String format(dynamic number) { - if (_isNaN(number)) return symbols.NAN; - - _formatFixed(number.abs()); - - var result = _buffer.toString(); - _buffer.clear(); - return result; - } - - /// Used to test if we have exceeded integer limits. - // TODO(alanknight): Do we have a MaxInt constant we could use instead? - static final _maxInt = 1 is double ? pow(2, 52) : 1.0e300.floor(); - static final _maxDigits = (log(_maxInt) / log(10)).ceil(); - - /// Helpers to check numbers that don't conform to the [num] interface, - /// e.g. Int64 - bool _isInfinite(number) => number is num ? number.isInfinite : false; - bool _isNaN(number) => number is num ? number.isNaN : false; - - /// Helper to get the floor of a number which might not be num. This should - /// only ever be called with an argument which is positive, or whose abs() - /// is negative. The second case is the maximum negative value on a - /// fixed-length integer. Since they are integers, they are also their own - /// floor. - dynamic _floor(dynamic number) { - if (number.isNegative && !number.abs().isNegative) { - throw ArgumentError( - 'Internal error: expected positive number, got $number'); - } - return (number is num) ? number.floor() : number ~/ 1; - } - - /// Helper to round a number which might not be num. - dynamic _round(dynamic number) { - if (number is num) { - if (number.isInfinite) { - return _maxInt; - } else { - return number.round(); - } - } else if (number.remainder(1) == 0) { - // Not a normal number, but int-like, e.g. Int64 - return number; - } else { - // TODO(alanknight): Do this more efficiently. If IntX had floor and - // round we could avoid this. - var basic = _floor(number); - var fraction = (number - basic).toDouble().round(); - return fraction == 0 ? number : number + fraction; - } - } - - // Return the number of digits left of the decimal place in [number]. - static int numberOfIntegerDigits(dynamic number) { - var simpleNumber = (number.toDouble() as double).abs(); - // It's unfortunate that we have to do this, but we get precision errors - // that affect the result if we use logs, e.g. 1000000 - if (simpleNumber < 10) return 1; - if (simpleNumber < 100) return 2; - if (simpleNumber < 1000) return 3; - if (simpleNumber < 10000) return 4; - if (simpleNumber < 100000) return 5; - if (simpleNumber < 1000000) return 6; - if (simpleNumber < 10000000) return 7; - if (simpleNumber < 100000000) return 8; - if (simpleNumber < 1000000000) return 9; - if (simpleNumber < 10000000000) return 10; - if (simpleNumber < 100000000000) return 11; - if (simpleNumber < 1000000000000) return 12; - if (simpleNumber < 10000000000000) return 13; - if (simpleNumber < 100000000000000) return 14; - if (simpleNumber < 1000000000000000) return 15; - if (simpleNumber < 10000000000000000) return 16; - if (simpleNumber < 100000000000000000) return 17; - if (simpleNumber < 1000000000000000000) return 18; - return 19; - } - - /// Whether to use SignificantDigits unconditionally for fraction digits. - bool _useDefaultSignificantDigits() => true; - - /// How many digits after the decimal place should we display, given that - /// by default, [fractionDigits] should be used, and there are up to - /// [expectedSignificantDigits] left to display in the fractional part.. - int _adjustFractionDigits(int fractionDigits, expectedSignificantDigits) { - if (_useDefaultSignificantDigits()) return fractionDigits; - // If we are printing a currency significant digits would have us only print - // some of the decimal digits, use all of them. So $12.30, not $12.3 - if (expectedSignificantDigits > 0) { - return decimalDigits!; - } else { - return min(fractionDigits, decimalDigits!); - } - } - - /// Format the basic number portion, including the fractional digits. - void _formatFixed(dynamic number) { - dynamic integerPart; - int fractionPart; - int extraIntegerDigits; - var fractionDigits = maximumFractionDigits; - var minFractionDigits = minimumFractionDigits; - - var power = 0; - int digitMultiplier; - - if (_isInfinite(number)) { - integerPart = number.toInt(); - extraIntegerDigits = 0; - fractionPart = 0; - } else { - // We have three possible pieces. First, the basic integer part. If this - // is a percent or permille, the additional 2 or 3 digits. Finally the - // fractional part. - // We avoid multiplying the number because it might overflow if we have - // a fixed-size integer type, so we extract each of the three as an - // integer pieces. - integerPart = _floor(number); - var fraction = number - integerPart; - if (fraction.toInt() != 0) { - // If the fractional part leftover is > 1, presumbly the number - // was too big for a fixed-size integer, so leave it as whatever - // it was - the obvious thing is a double. - integerPart = number; - fraction = 0; - } - - /// If we have significant digits, compute the number of fraction - /// digits based on that. - void computeFractionDigits() { - if (significantDigitsInUse) { - var integerLength = number == 0 - ? 1 - : integerPart != 0 - ? numberOfIntegerDigits(integerPart) - // We might need to add digits after decimal point. - : (log(fraction) / ln10).ceil(); - - if (minimumSignificantDigits != null) { - var remainingSignificantDigits = - minimumSignificantDigits! - integerLength; - - fractionDigits = max(0, remainingSignificantDigits); - if (minimumSignificantDigitsStrict) { - minFractionDigits = fractionDigits; - } - fractionDigits = _adjustFractionDigits( - fractionDigits, remainingSignificantDigits); - } - - if (maximumSignificantDigits != null) { - if (maximumSignificantDigits! == 0) { - // Stupid case: only '0' has no significant digits. - integerPart = 0; - fractionDigits = 0; - } else if (maximumSignificantDigits! < - integerLength) { - // We may have to round. - var divideBy = pow(10, integerLength - maximumSignificantDigits!); - if (maximumSignificantDigits! < integerLength) { - integerPart = (integerPart / divideBy).round() * divideBy; - } - fraction = (fraction / divideBy).round() * divideBy; - fractionDigits = 0; - } else { - fractionDigits = - maximumSignificantDigits! - integerLength; - fractionDigits = - _adjustFractionDigits(fractionDigits, fractionDigits); - } - } - if (fractionDigits > maximumFractionDigits && - _explicitMaximumFractionDigits) { - fractionDigits = min(fractionDigits, maximumFractionDigits); - } - if (fractionDigits < minimumFractionDigits && - _explicitMinimumFractionDigits) { - fractionDigits = _minimumFractionDigits; - } - } - } - - computeFractionDigits(); - - power = pow(10, fractionDigits) as int; - digitMultiplier = power; - - // Multiply out to the number of decimal places and the percent, then - // round. For fixed-size integer types this should always be zero, so - // multiplying is OK. - var remainingDigits = _round(fraction * digitMultiplier).toInt(); - - var hasRounding = false; - if (remainingDigits >= digitMultiplier) { - // Overflow into the main digits: 0.99 => 1.00 - integerPart++; - remainingDigits -= digitMultiplier; - hasRounding = true; - } else if (numberOfIntegerDigits(remainingDigits) > - numberOfIntegerDigits(_floor(fraction * digitMultiplier).toInt())) { - // Fraction has been rounded (0.0996 -> 0.1). - fraction = remainingDigits / digitMultiplier; - hasRounding = true; - } - if (hasRounding && significantDigitsInUse) { - // We might have to recompute significant digits after fraction. - // With 3 significant digits, "9.999" should be "10.0", not "10.00". - computeFractionDigits(); - } - - // Separate out the extra integer parts from the fraction part. - extraIntegerDigits = remainingDigits ~/ power; - fractionPart = remainingDigits % power; - } - - var integerDigits = _integerDigits(integerPart, extraIntegerDigits); - var digitLength = integerDigits.length; - var fractionPresent = - fractionDigits > 0 && (minFractionDigits > 0 || fractionPart > 0); - - if (_hasIntegerDigits(integerDigits)) { - // Add the padding digits to the regular digits so that we get grouping. - var padding = '0' * (minimumIntegerDigits - digitLength); - integerDigits = '$padding$integerDigits'; - digitLength = integerDigits.length; - for (var i = 0; i < digitLength; i++) { - _addDigit(integerDigits.codeUnitAt(i)); - } - } else if (!fractionPresent) { - // If neither fraction nor integer part exists, just print zero. - _addZero(); - } - - _decimalSeparator(fractionPresent); - if (fractionPresent) { - _formatFractionPart((fractionPart + power).toString(), minFractionDigits); - } - } - - /// Compute the raw integer digits which will then be printed with - /// grouping and translated to localized digits. - String _integerDigits(integerPart, extraIntegerDigits) { - // If the integer part is larger than the maximum integer size - // (2^52 on Javascript, 2^63 on the VM) it will lose precision, - // so pad out the rest of it with zeros. - var paddingDigits = ''; - if (integerPart is num && integerPart > _maxInt) { - var howManyDigitsTooBig = (log(integerPart) / _ln10).ceil() - _maxDigits; - num divisor = pow(10, howManyDigitsTooBig).round(); - // pow() produces 0 if the result is too large for a 64-bit int. - // If that happens, use a floating point divisor instead. - if (divisor == 0) divisor = pow(10.0, howManyDigitsTooBig); - paddingDigits = '0' * howManyDigitsTooBig.toInt(); - integerPart = (integerPart / divisor).truncate(); - } - - var extra = extraIntegerDigits == 0 ? '' : extraIntegerDigits.toString(); - var intDigits = _mainIntegerDigits(integerPart); - var paddedExtra = - intDigits.isEmpty ? extra : extra.padLeft(0, '0'); - return '$intDigits$paddedExtra$paddingDigits'; - } - - /// The digit string of the integer part. This is the empty string if the - /// integer part is zero and otherwise is the toString() of the integer - /// part, stripping off any minus sign. - String _mainIntegerDigits(integer) { - if (integer == 0) return ''; - var digits = integer.toString(); - if (significantDigitsInUse && - maximumSignificantDigits != null && - digits.length > maximumSignificantDigits!) { - digits = digits.substring(0, maximumSignificantDigits!) + - ''.padLeft(digits.length - maximumSignificantDigits!, '0'); - } - // If we have a fixed-length int representation, it can have a negative - // number whose negation is also negative, e.g. 2^-63 in 64-bit. - // Remove the minus sign. - return digits.startsWith('-') ? digits.substring(1) : digits; - } - - /// Format the part after the decimal place in a fixed point number. - void _formatFractionPart(String fractionPart, int minDigits) { - var fractionLength = fractionPart.length; - while (fractionPart.codeUnitAt(fractionLength - 1) == - '0'.codeUnitAt(0) && - fractionLength > minDigits + 1) { - fractionLength--; - } - for (var i = 1; i < fractionLength; i++) { - _addDigit(fractionPart.codeUnitAt(i)); - } - } - - /// Print the decimal separator if appropriate. - void _decimalSeparator(bool fractionPresent) { - if (_decimalSeparatorAlwaysShown || fractionPresent) { - _add(symbols.DECIMAL_SEP); - } - } - - /// Return true if we have a main integer part which is printable, either - /// because we have digits left of the decimal point (this may include digits - /// which have been moved left because of percent or permille formatting), - /// or because the minimum number of printable digits is greater than 1. - bool _hasIntegerDigits(String digits) => - digits.isNotEmpty || minimumIntegerDigits > 0; - - /// A group of methods that provide support for writing digits and other - /// required characters into [_buffer] easily. - void _add(String x) { - _buffer.write(x); - } - - void _addZero() { - _buffer.write(symbols.ZERO_DIGIT); - } - - void _addDigit(int x) { - _buffer.writeCharCode(x + _zeroOffset); - } - - /// The code point for the locale's zero digit. - /// - /// Initialized when the locale is set. - final int localeZero; - - /// The difference between our zero and '0'. - /// - /// In other words, a constant _localeZero - _zero. Initialized when - /// the locale is set. - final int _zeroOffset; -} - -final _ln10 = log(10); diff --git a/dart/lib/src/vendor/intl/number_symbols.dart b/dart/lib/src/vendor/intl/number_symbols.dart deleted file mode 100644 index faa8466948..0000000000 --- a/dart/lib/src/vendor/intl/number_symbols.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. -library number_symbols; - -// Suppress naming issues as changes would be breaking. -// ignore_for_file: non_constant_identifier_names - -class NumberSymbols { - final String DECIMAL_SEP, - ZERO_DIGIT, - NAN; - - const NumberSymbols( - {required this.DECIMAL_SEP, - required this.ZERO_DIGIT, - required this.NAN}); -} diff --git a/dart/test/vendor/intl/number_format_test.dart b/dart/test/utils/sample_rate_format_test.dart similarity index 77% rename from dart/test/vendor/intl/number_format_test.dart rename to dart/test/utils/sample_rate_format_test.dart index 4933bfb890..b6edbf7d5f 100644 --- a/dart/test/vendor/intl/number_format_test.dart +++ b/dart/test/utils/sample_rate_format_test.dart @@ -1,4 +1,4 @@ -import 'package:sentry/src/vendor/intl/number_format.dart'; +import 'package:sentry/src/utils/sample_rate_format.dart'; import 'package:test/test.dart'; void main() { @@ -27,10 +27,18 @@ void main() { ]; for (var inputAndOutput in inputsAndOutputs) { - expect(NumberFormat().format(inputAndOutput.i), + expect(SampleRateFormat().format(inputAndOutput.i), inputAndOutput.o); } }); + + test('input smaller 0 is capped', () { + expect(SampleRateFormat().format(-1), '0'); + }); + + test('input larger 1 is capped', () { + expect(SampleRateFormat().format(1.1), '1'); + }); } class Tuple { From 4e7222af02c64e9a6399f468018a7f14a6733137 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 13 Mar 2023 11:25:57 +0100 Subject: [PATCH 16/29] change to internal --- dart/lib/src/utils/sample_rate_format.dart | 61 ++++++++++------------ 1 file changed, 27 insertions(+), 34 deletions(-) diff --git a/dart/lib/src/utils/sample_rate_format.dart b/dart/lib/src/utils/sample_rate_format.dart index 6e479cdf6c..c0db8b5a54 100644 --- a/dart/lib/src/utils/sample_rate_format.dart +++ b/dart/lib/src/utils/sample_rate_format.dart @@ -1,30 +1,13 @@ import 'dart:math'; -// Suppress naming issues as changes would be breaking. -// ignore_for_file: non_constant_identifier_names -class NumberSymbols { - final String DECIMAL_SEP, - ZERO_DIGIT, - NAN; - - const NumberSymbols( - {required this.DECIMAL_SEP, - required this.ZERO_DIGIT, - required this.NAN}); -} +import 'package:meta/meta.dart'; +@internal class SampleRateFormat { - int minimumIntegerDigits; - + int _minimumIntegerDigits; int _maximumFractionDigits; - int get maximumFractionDigits => _maximumFractionDigits; - int _minimumFractionDigits; - int get minimumFractionDigits => _minimumFractionDigits; - - int? _minimumSignificantDigits; - int? get minimumSignificantDigits => _minimumSignificantDigits; /// The difference between our zero and '0'. /// @@ -32,8 +15,8 @@ class SampleRateFormat { /// the locale is set. final int _zeroOffset; - /// Caches the symbols used for our locale. - final NumberSymbols _symbols; + /// Caches the symbols + final _NumberSymbols _symbols; /// Transient internal state in which to build up the result of the format /// operation. We can have this be just an instance variable because Dart is @@ -43,7 +26,7 @@ class SampleRateFormat { final StringBuffer _buffer = StringBuffer(); factory SampleRateFormat() { - var symbols = NumberSymbols( + var symbols = _NumberSymbols( DECIMAL_SEP: '.', ZERO_DIGIT: '0', NAN: 'NaN', @@ -60,17 +43,14 @@ class SampleRateFormat { SampleRateFormat._( this._symbols, this._zeroOffset) - : minimumIntegerDigits = 1, + : _minimumIntegerDigits = 1, _maximumFractionDigits = 16, _minimumFractionDigits = 0; - /// Return the symbols which are used in our locale. Cache them to avoid - /// repeated lookup. - NumberSymbols get symbols => _symbols; /// Format the sample rate String format(dynamic sampleRate) { - if (_isNaN(sampleRate)) return symbols.NAN; + if (_isNaN(sampleRate)) return _symbols.NAN; if (_isSmallerZero(sampleRate)) { sampleRate = 0; } @@ -97,8 +77,8 @@ class SampleRateFormat { dynamic integerPart; int fractionPart; int extraIntegerDigits; - var fractionDigits = maximumFractionDigits; - var minFractionDigits = minimumFractionDigits; + var fractionDigits = _maximumFractionDigits; + var minFractionDigits = _minimumFractionDigits; var power = 0; int digitMultiplier; @@ -148,7 +128,7 @@ class SampleRateFormat { if (_hasIntegerDigits(integerDigits)) { // Add the padding digits to the regular digits so that we get grouping. - var padding = '0' * (minimumIntegerDigits - digitLength); + var padding = '0' * (_minimumIntegerDigits - digitLength); integerDigits = '$padding$integerDigits'; digitLength = integerDigits.length; for (var i = 0; i < digitLength; i++) { @@ -276,7 +256,7 @@ class SampleRateFormat { /// Print the decimal separator if appropriate. void _decimalSeparator(bool fractionPresent) { if (fractionPresent) { - _add(symbols.DECIMAL_SEP); + _add(_symbols.DECIMAL_SEP); } } @@ -285,7 +265,7 @@ class SampleRateFormat { /// which have been moved left because of percent or permille formatting), /// or because the minimum number of printable digits is greater than 1. bool _hasIntegerDigits(String digits) => - digits.isNotEmpty || minimumIntegerDigits > 0; + digits.isNotEmpty || _minimumIntegerDigits > 0; /// A group of methods that provide support for writing digits and other /// required characters into [_buffer] easily. @@ -294,10 +274,23 @@ class SampleRateFormat { } void _addZero() { - _buffer.write(symbols.ZERO_DIGIT); + _buffer.write(_symbols.ZERO_DIGIT); } void _addDigit(int x) { _buffer.writeCharCode(x + _zeroOffset); } } + +// Suppress naming issues as changes would be breaking. +// ignore_for_file: non_constant_identifier_names +class _NumberSymbols { + final String DECIMAL_SEP, + ZERO_DIGIT, + NAN; + + const _NumberSymbols( + {required this.DECIMAL_SEP, + required this.ZERO_DIGIT, + required this.NAN}); +} From 20d5549e1ac2fe68bb5b92fc790683903e1efece Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 13 Mar 2023 11:32:34 +0100 Subject: [PATCH 17/29] test if formatting is same as intl --- dart/lib/src/sentry_tracer.dart | 4 +-- dart/lib/src/utils/sample_rate_format.dart | 35 ++++++++------------ dart/pubspec.yaml | 1 + dart/test/utils/sample_rate_format_test.dart | 19 ++++++++--- 4 files changed, 31 insertions(+), 28 deletions(-) diff --git a/dart/lib/src/sentry_tracer.dart b/dart/lib/src/sentry_tracer.dart index a345645c80..622eaaa3da 100644 --- a/dart/lib/src/sentry_tracer.dart +++ b/dart/lib/src/sentry_tracer.dart @@ -349,9 +349,7 @@ class SentryTracer extends ISentrySpan { if (!isValidSampleRate(sampleRate)) { return null; } - return sampleRate != null - ? SampleRateFormat().format(sampleRate) - : null; + return sampleRate != null ? SampleRateFormat().format(sampleRate) : null; } bool _isHighQualityTransactionName(SentryTransactionNameSource source) { diff --git a/dart/lib/src/utils/sample_rate_format.dart b/dart/lib/src/utils/sample_rate_format.dart index c0db8b5a54..c9894b7990 100644 --- a/dart/lib/src/utils/sample_rate_format.dart +++ b/dart/lib/src/utils/sample_rate_format.dart @@ -2,9 +2,10 @@ import 'dart:math'; import 'package:meta/meta.dart'; +/// Implementation details from `intl` package +/// https://pub.dev/packages/intl @internal class SampleRateFormat { - int _minimumIntegerDigits; int _maximumFractionDigits; int _minimumFractionDigits; @@ -27,27 +28,24 @@ class SampleRateFormat { factory SampleRateFormat() { var symbols = _NumberSymbols( - DECIMAL_SEP: '.', - ZERO_DIGIT: '0', - NAN: 'NaN', + DECIMAL_SEP: '.', + ZERO_DIGIT: '0', + NAN: 'NaN', ); var localeZero = symbols.ZERO_DIGIT.codeUnitAt(0); var zeroOffset = localeZero - '0'.codeUnitAt(0); return SampleRateFormat._( - symbols, - zeroOffset, + symbols, + zeroOffset, ); } - SampleRateFormat._( - this._symbols, - this._zeroOffset) + SampleRateFormat._(this._symbols, this._zeroOffset) : _minimumIntegerDigits = 1, _maximumFractionDigits = 16, _minimumFractionDigits = 0; - /// Format the sample rate String format(dynamic sampleRate) { if (_isNaN(sampleRate)) return _symbols.NAN; @@ -212,7 +210,8 @@ class SampleRateFormat { // so pad out the rest of it with zeros. var paddingDigits = ''; if (integerPart is num && integerPart > _maxInt) { - var howManyDigitsTooBig = (log(integerPart) / log(10)).ceil() - _maxDigits; + var howManyDigitsTooBig = + (log(integerPart) / log(10)).ceil() - _maxDigits; num divisor = pow(10, howManyDigitsTooBig).round(); // pow() produces 0 if the result is too large for a 64-bit int. // If that happens, use a floating point divisor instead. @@ -223,8 +222,7 @@ class SampleRateFormat { var extra = extraIntegerDigits == 0 ? '' : extraIntegerDigits.toString(); var intDigits = _mainIntegerDigits(integerPart); - var paddedExtra = - intDigits.isEmpty ? extra : extra.padLeft(0, '0'); + var paddedExtra = intDigits.isEmpty ? extra : extra.padLeft(0, '0'); return '$intDigits$paddedExtra$paddingDigits'; } @@ -243,8 +241,7 @@ class SampleRateFormat { /// Format the part after the decimal place in a fixed point number. void _formatFractionPart(String fractionPart, int minDigits) { var fractionLength = fractionPart.length; - while (fractionPart.codeUnitAt(fractionLength - 1) == - '0'.codeUnitAt(0) && + while (fractionPart.codeUnitAt(fractionLength - 1) == '0'.codeUnitAt(0) && fractionLength > minDigits + 1) { fractionLength--; } @@ -285,12 +282,8 @@ class SampleRateFormat { // Suppress naming issues as changes would be breaking. // ignore_for_file: non_constant_identifier_names class _NumberSymbols { - final String DECIMAL_SEP, - ZERO_DIGIT, - NAN; + final String DECIMAL_SEP, ZERO_DIGIT, NAN; const _NumberSymbols( - {required this.DECIMAL_SEP, - required this.ZERO_DIGIT, - required this.NAN}); + {required this.DECIMAL_SEP, required this.ZERO_DIGIT, required this.NAN}); } diff --git a/dart/pubspec.yaml b/dart/pubspec.yaml index 7d8a4e1db9..20909a3654 100644 --- a/dart/pubspec.yaml +++ b/dart/pubspec.yaml @@ -24,3 +24,4 @@ dev_dependencies: yaml: ^3.1.0 # needed for version match (code and pubspec) collection: ^1.16.0 coverage: ^1.3.0 + intl: '>=0.17.0 <1.0.0' diff --git a/dart/test/utils/sample_rate_format_test.dart b/dart/test/utils/sample_rate_format_test.dart index b6edbf7d5f..285f9b5315 100644 --- a/dart/test/utils/sample_rate_format_test.dart +++ b/dart/test/utils/sample_rate_format_test.dart @@ -1,5 +1,7 @@ +import 'package:intl/intl.dart'; import 'package:sentry/src/utils/sample_rate_format.dart'; import 'package:test/test.dart'; +import 'dart:math'; void main() { test('format', () { @@ -27,16 +29,25 @@ void main() { ]; for (var inputAndOutput in inputsAndOutputs) { - expect(SampleRateFormat().format(inputAndOutput.i), - inputAndOutput.o); + expect(SampleRateFormat().format(inputAndOutput.i), inputAndOutput.o); } }); - test('input smaller 0 is capped', () { + test('formats same as intl', () { + for (var i = 0; i < 1000; i++) { + var doubleValue = Random().nextDouble(); + expect( + NumberFormat('#.################').format(doubleValue), + SampleRateFormat().format(doubleValue), + ); + } + }); + + test('input smaller 0 is capped', () { expect(SampleRateFormat().format(-1), '0'); }); - test('input larger 1 is capped', () { + test('input larger 1 is capped', () { expect(SampleRateFormat().format(1.1), '1'); }); } From f9d91227267fe555572af5e3f25532efcb6b24b4 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 14 Mar 2023 16:24:35 +0100 Subject: [PATCH 18/29] implemented pr feedback --- dart/lib/src/utils/sample_rate_format.dart | 33 +++++++++++--------- dart/pubspec.yaml | 1 - dart/test/utils/sample_rate_format_test.dart | 18 +++-------- 3 files changed, 23 insertions(+), 29 deletions(-) diff --git a/dart/lib/src/utils/sample_rate_format.dart b/dart/lib/src/utils/sample_rate_format.dart index c9894b7990..e0887fb256 100644 --- a/dart/lib/src/utils/sample_rate_format.dart +++ b/dart/lib/src/utils/sample_rate_format.dart @@ -30,7 +30,6 @@ class SampleRateFormat { var symbols = _NumberSymbols( DECIMAL_SEP: '.', ZERO_DIGIT: '0', - NAN: 'NaN', ); var localeZero = symbols.ZERO_DIGIT.codeUnitAt(0); var zeroOffset = localeZero - '0'.codeUnitAt(0); @@ -48,18 +47,23 @@ class SampleRateFormat { /// Format the sample rate String format(dynamic sampleRate) { - if (_isNaN(sampleRate)) return _symbols.NAN; - if (_isSmallerZero(sampleRate)) { - sampleRate = 0; - } - if (_isLargerOne(sampleRate)) { - sampleRate = 1; + try { + if (_isNaN(sampleRate)) return '0'; + if (_isSmallerZero(sampleRate)) { + sampleRate = 0; + } + if (_isLargerOne(sampleRate)) { + sampleRate = 1; + } + _formatFixed(sampleRate.abs()); + + var result = _buffer.toString(); + _buffer.clear(); + return result; + } catch (_) { + _buffer.clear(); + return '0'; } - _formatFixed(sampleRate.abs()); - - var result = _buffer.toString(); - _buffer.clear(); - return result; } /// Used to test if we have exceeded integer limits. @@ -282,8 +286,7 @@ class SampleRateFormat { // Suppress naming issues as changes would be breaking. // ignore_for_file: non_constant_identifier_names class _NumberSymbols { - final String DECIMAL_SEP, ZERO_DIGIT, NAN; + final String DECIMAL_SEP, ZERO_DIGIT; - const _NumberSymbols( - {required this.DECIMAL_SEP, required this.ZERO_DIGIT, required this.NAN}); + const _NumberSymbols({required this.DECIMAL_SEP, required this.ZERO_DIGIT}); } diff --git a/dart/pubspec.yaml b/dart/pubspec.yaml index 20909a3654..7d8a4e1db9 100644 --- a/dart/pubspec.yaml +++ b/dart/pubspec.yaml @@ -24,4 +24,3 @@ dev_dependencies: yaml: ^3.1.0 # needed for version match (code and pubspec) collection: ^1.16.0 coverage: ^1.3.0 - intl: '>=0.17.0 <1.0.0' diff --git a/dart/test/utils/sample_rate_format_test.dart b/dart/test/utils/sample_rate_format_test.dart index 285f9b5315..86b0d0b035 100644 --- a/dart/test/utils/sample_rate_format_test.dart +++ b/dart/test/utils/sample_rate_format_test.dart @@ -1,7 +1,5 @@ -import 'package:intl/intl.dart'; import 'package:sentry/src/utils/sample_rate_format.dart'; import 'package:test/test.dart'; -import 'dart:math'; void main() { test('format', () { @@ -28,21 +26,11 @@ void main() { Tuple(0.19191919191919199, '0.191919191919192'), ]; - for (var inputAndOutput in inputsAndOutputs) { + for (final inputAndOutput in inputsAndOutputs) { expect(SampleRateFormat().format(inputAndOutput.i), inputAndOutput.o); } }); - test('formats same as intl', () { - for (var i = 0; i < 1000; i++) { - var doubleValue = Random().nextDouble(); - expect( - NumberFormat('#.################').format(doubleValue), - SampleRateFormat().format(doubleValue), - ); - } - }); - test('input smaller 0 is capped', () { expect(SampleRateFormat().format(-1), '0'); }); @@ -50,6 +38,10 @@ void main() { test('input larger 1 is capped', () { expect(SampleRateFormat().format(1.1), '1'); }); + + test('call with naN returns 0', () { + expect(SampleRateFormat().format(double.nan), '0'); + }); } class Tuple { From 0d00694ef7a0e9f3715d689a0dd17f88d5e2b667 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> Date: Tue, 14 Mar 2023 17:07:56 +0100 Subject: [PATCH 19/29] Update dart/test/utils/sample_rate_format_test.dart --- dart/test/utils/sample_rate_format_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dart/test/utils/sample_rate_format_test.dart b/dart/test/utils/sample_rate_format_test.dart index 86b0d0b035..73c0cdda95 100644 --- a/dart/test/utils/sample_rate_format_test.dart +++ b/dart/test/utils/sample_rate_format_test.dart @@ -39,7 +39,7 @@ void main() { expect(SampleRateFormat().format(1.1), '1'); }); - test('call with naN returns 0', () { + test('call with NaN returns 0', () { expect(SampleRateFormat().format(double.nan), '0'); }); } From 5062f5f822b2d2afd20c7b373e6236a9dd989181 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 20 Mar 2023 13:53:53 +0100 Subject: [PATCH 20/29] test how intl behaves on different platforms --- dart/pubspec.yaml | 1 + dart/test/utils/sample_rate_format_test.dart | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/dart/pubspec.yaml b/dart/pubspec.yaml index 40e6408772..41239e2b4d 100644 --- a/dart/pubspec.yaml +++ b/dart/pubspec.yaml @@ -24,3 +24,4 @@ dev_dependencies: yaml: ^3.1.0 # needed for version match (code and pubspec) collection: ^1.16.0 coverage: ^1.3.0 + intl: '>=0.17.0 <1.0.0' \ No newline at end of file diff --git a/dart/test/utils/sample_rate_format_test.dart b/dart/test/utils/sample_rate_format_test.dart index 73c0cdda95..bac63bc69d 100644 --- a/dart/test/utils/sample_rate_format_test.dart +++ b/dart/test/utils/sample_rate_format_test.dart @@ -1,5 +1,6 @@ import 'package:sentry/src/utils/sample_rate_format.dart'; import 'package:test/test.dart'; +import 'package:intl/intl.dart'; void main() { test('format', () { @@ -31,6 +32,20 @@ void main() { } }); + test('intl platform difference', () { + expect( + NumberFormat('#.################').format(0.1919191919191919), + '0.1919191919191919', + ); + }); + + test('intl platform difference 2', () { + expect( + NumberFormat('#.################').format(0.19191919191919199), + '0.191919191919192', + ); + }); + test('input smaller 0 is capped', () { expect(SampleRateFormat().format(-1), '0'); }); From 377b72e6e964ebec290c58a9f00dd900505142ab Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 20 Mar 2023 14:22:40 +0100 Subject: [PATCH 21/29] remove intl again --- dart/pubspec.yaml | 3 +-- dart/test/utils/sample_rate_format_test.dart | 14 -------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/dart/pubspec.yaml b/dart/pubspec.yaml index 41239e2b4d..e1b924dbb3 100644 --- a/dart/pubspec.yaml +++ b/dart/pubspec.yaml @@ -23,5 +23,4 @@ dev_dependencies: test: ^1.21.1 yaml: ^3.1.0 # needed for version match (code and pubspec) collection: ^1.16.0 - coverage: ^1.3.0 - intl: '>=0.17.0 <1.0.0' \ No newline at end of file + coverage: ^1.3.0 \ No newline at end of file diff --git a/dart/test/utils/sample_rate_format_test.dart b/dart/test/utils/sample_rate_format_test.dart index bac63bc69d..c2d793f916 100644 --- a/dart/test/utils/sample_rate_format_test.dart +++ b/dart/test/utils/sample_rate_format_test.dart @@ -32,20 +32,6 @@ void main() { } }); - test('intl platform difference', () { - expect( - NumberFormat('#.################').format(0.1919191919191919), - '0.1919191919191919', - ); - }); - - test('intl platform difference 2', () { - expect( - NumberFormat('#.################').format(0.19191919191919199), - '0.191919191919192', - ); - }); - test('input smaller 0 is capped', () { expect(SampleRateFormat().format(-1), '0'); }); From 2073840ab0d204f69f51bca50024188583ad32ff Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 20 Mar 2023 14:31:45 +0100 Subject: [PATCH 22/29] fix analyze issues --- dart/test/utils/sample_rate_format_test.dart | 1 - flutter/test/integrations/load_image_list_test.dart | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dart/test/utils/sample_rate_format_test.dart b/dart/test/utils/sample_rate_format_test.dart index c2d793f916..73c0cdda95 100644 --- a/dart/test/utils/sample_rate_format_test.dart +++ b/dart/test/utils/sample_rate_format_test.dart @@ -1,6 +1,5 @@ import 'package:sentry/src/utils/sample_rate_format.dart'; import 'package:test/test.dart'; -import 'package:intl/intl.dart'; void main() { test('format', () { diff --git a/flutter/test/integrations/load_image_list_test.dart b/flutter/test/integrations/load_image_list_test.dart index 1dd4ab1839..0fbe6848ea 100644 --- a/flutter/test/integrations/load_image_list_test.dart +++ b/flutter/test/integrations/load_image_list_test.dart @@ -155,8 +155,7 @@ void main() { expect('test', image.debugFile); }); - test('Native layer is not called as there is no exceptions', - () async { + test('Native layer is not called as there is no exceptions', () async { var called = false; final sut = fixture.getSut(); From 271e89eb9cab56e5f4fc823a0f421cbce692b67d Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 21 Mar 2023 14:39:33 +0100 Subject: [PATCH 23/29] compare with delta --- dart/test/utils/sample_rate_format_test.dart | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dart/test/utils/sample_rate_format_test.dart b/dart/test/utils/sample_rate_format_test.dart index 73c0cdda95..37d094ee53 100644 --- a/dart/test/utils/sample_rate_format_test.dart +++ b/dart/test/utils/sample_rate_format_test.dart @@ -1,3 +1,4 @@ +import 'dart:math'; import 'package:sentry/src/utils/sample_rate_format.dart'; import 'package:test/test.dart'; @@ -27,7 +28,18 @@ void main() { ]; for (final inputAndOutput in inputsAndOutputs) { - expect(SampleRateFormat().format(inputAndOutput.i), inputAndOutput.o); + final actual = SampleRateFormat().format(inputAndOutput.i); + final expected = inputAndOutput.o; + final epsilon = 0.0000000000000001; + + final actualDouble = double.parse(actual); + final expectedDouble = double.parse(expected); + + if (expectedDouble > 0) { + expect((actualDouble/expectedDouble - 1).abs() < epsilon, true); + } else { + expect(actualDouble, expectedDouble); + } } }); From 57aa8b9cbd8ffe496434b6a2166a37abd92ec8d9 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 21 Mar 2023 15:12:05 +0100 Subject: [PATCH 24/29] compare with numberformat --- dart/pubspec.yaml | 3 +- dart/test/utils/sample_rate_format_test.dart | 62 +++++++++----------- 2 files changed, 29 insertions(+), 36 deletions(-) diff --git a/dart/pubspec.yaml b/dart/pubspec.yaml index 7fc73e1025..c1c02bf2e2 100644 --- a/dart/pubspec.yaml +++ b/dart/pubspec.yaml @@ -23,4 +23,5 @@ dev_dependencies: test: ^1.21.1 yaml: ^3.1.0 # needed for version match (code and pubspec) collection: ^1.16.0 - coverage: ^1.3.0 \ No newline at end of file + coverage: ^1.3.0 + intl: '>=0.17.0 <1.0.0' \ No newline at end of file diff --git a/dart/test/utils/sample_rate_format_test.dart b/dart/test/utils/sample_rate_format_test.dart index 37d094ee53..ae03f02840 100644 --- a/dart/test/utils/sample_rate_format_test.dart +++ b/dart/test/utils/sample_rate_format_test.dart @@ -1,45 +1,37 @@ -import 'dart:math'; import 'package:sentry/src/utils/sample_rate_format.dart'; import 'package:test/test.dart'; +import 'package:intl/intl.dart'; void main() { test('format', () { - final inputsAndOutputs = [ - Tuple(0.0, '0'), - Tuple(1.0, '1'), - Tuple(0.1, '0.1'), - Tuple(0.11, '0.11'), - Tuple(0.19, '0.19'), - Tuple(0.191, '0.191'), - Tuple(0.1919, '0.1919'), - Tuple(0.19191, '0.19191'), - Tuple(0.191919, '0.191919'), - Tuple(0.1919191, '0.1919191'), - Tuple(0.19191919, '0.19191919'), - Tuple(0.191919191, '0.191919191'), - Tuple(0.1919191919, '0.1919191919'), - Tuple(0.19191919191, '0.19191919191'), - Tuple(0.191919191919, '0.191919191919'), - Tuple(0.1919191919191, '0.1919191919191'), - Tuple(0.19191919191919, '0.19191919191919'), - Tuple(0.191919191919191, '0.191919191919191'), - Tuple(0.1919191919191919, '0.1919191919191919'), - Tuple(0.19191919191919199, '0.191919191919192'), + final inputs = [ + 0.0, + 1.0, + 0.1, + 0.11, + 0.19, + 0.191, + 0.1919, + 0.19191, + 0.191919, + 0.1919191, + 0.19191919, + 0.191919191, + 0.1919191919, + 0.19191919191, + 0.191919191919, + 0.1919191919191, + 0.19191919191919, + 0.191919191919191, + 0.1919191919191919, + 0.19191919191919199, ]; - for (final inputAndOutput in inputsAndOutputs) { - final actual = SampleRateFormat().format(inputAndOutput.i); - final expected = inputAndOutput.o; - final epsilon = 0.0000000000000001; - - final actualDouble = double.parse(actual); - final expectedDouble = double.parse(expected); - - if (expectedDouble > 0) { - expect((actualDouble/expectedDouble - 1).abs() < epsilon, true); - } else { - expect(actualDouble, expectedDouble); - } + for (final input in inputs) { + expect( + SampleRateFormat().format(input), + NumberFormat('#.################').format(input), + ); } }); From 25b0488184b4a077ffc6de5cd0f79481d6de7678 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 21 Mar 2023 15:12:46 +0100 Subject: [PATCH 25/29] remove unused test helper --- dart/test/utils/sample_rate_format_test.dart | 6 ------ 1 file changed, 6 deletions(-) diff --git a/dart/test/utils/sample_rate_format_test.dart b/dart/test/utils/sample_rate_format_test.dart index ae03f02840..b068185a96 100644 --- a/dart/test/utils/sample_rate_format_test.dart +++ b/dart/test/utils/sample_rate_format_test.dart @@ -47,9 +47,3 @@ void main() { expect(SampleRateFormat().format(double.nan), '0'); }); } - -class Tuple { - Tuple(this.i, this.o); - final double i; - final String o; -} From b015bcfad7b9c56fc991f3dbbe97f713bb701dd0 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 21 Mar 2023 15:17:45 +0100 Subject: [PATCH 26/29] run format --- dart/test/utils/sample_rate_format_test.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dart/test/utils/sample_rate_format_test.dart b/dart/test/utils/sample_rate_format_test.dart index b068185a96..a9b4c80b09 100644 --- a/dart/test/utils/sample_rate_format_test.dart +++ b/dart/test/utils/sample_rate_format_test.dart @@ -29,8 +29,8 @@ void main() { for (final input in inputs) { expect( - SampleRateFormat().format(input), - NumberFormat('#.################').format(input), + SampleRateFormat().format(input), + NumberFormat('#.################').format(input), ); } }); From a4574fc253882d45ce04d65e07c650dd4a257b01 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Mon, 27 Mar 2023 10:58:23 +0200 Subject: [PATCH 27/29] add license --- dart/lib/src/utils/sample_rate_format.dart | 32 +++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/dart/lib/src/utils/sample_rate_format.dart b/dart/lib/src/utils/sample_rate_format.dart index e0887fb256..09f3e6f7f7 100644 --- a/dart/lib/src/utils/sample_rate_format.dart +++ b/dart/lib/src/utils/sample_rate_format.dart @@ -2,8 +2,38 @@ import 'dart:math'; import 'package:meta/meta.dart'; -/// Implementation details from `intl` package +/// Code ported & adapted from `intl` package /// https://pub.dev/packages/intl +/// +/// License: +/// +/// Copyright 2013, the Dart project authors. +/// +/// Redistribution and use in source and binary forms, with or without +/// modification, are permitted provided that the following conditions are +/// met: +/// +/// * Redistributions of source code must retain the above copyright +/// notice, this list of conditions and the following disclaimer. +/// * Redistributions in binary form must reproduce the above +/// copyright notice, this list of conditions and the following +/// disclaimer in the documentation and/or other materials provided +/// with the distribution. +/// * Neither the name of Google LLC nor the names of its +/// contributors may be used to endorse or promote products derived +/// from this software without specific prior written permission. +/// +/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +/// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +/// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +/// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +/// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +/// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +/// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +/// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +/// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +/// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. @internal class SampleRateFormat { int _minimumIntegerDigits; From 818321b5e75bcd430b40d429880034b11e9deb13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Andra=C5=A1ec?= Date: Mon, 27 Mar 2023 11:15:21 +0200 Subject: [PATCH 28/29] Update dart/pubspec.yaml Co-authored-by: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> --- dart/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dart/pubspec.yaml b/dart/pubspec.yaml index c1c02bf2e2..1599bdbf6f 100644 --- a/dart/pubspec.yaml +++ b/dart/pubspec.yaml @@ -24,4 +24,4 @@ dev_dependencies: yaml: ^3.1.0 # needed for version match (code and pubspec) collection: ^1.16.0 coverage: ^1.3.0 - intl: '>=0.17.0 <1.0.0' \ No newline at end of file + intl: '>=0.17.0 <1.0.0' From 510d90d7a1aa4e93496f3f1e48b2ac10bb5e488d Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Mon, 27 Mar 2023 12:14:29 +0200 Subject: [PATCH 29/29] fix license --- dart/lib/src/utils/sample_rate_format.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dart/lib/src/utils/sample_rate_format.dart b/dart/lib/src/utils/sample_rate_format.dart index 09f3e6f7f7..4abb79edd8 100644 --- a/dart/lib/src/utils/sample_rate_format.dart +++ b/dart/lib/src/utils/sample_rate_format.dart @@ -1,7 +1,3 @@ -import 'dart:math'; - -import 'package:meta/meta.dart'; - /// Code ported & adapted from `intl` package /// https://pub.dev/packages/intl /// @@ -34,6 +30,11 @@ import 'package:meta/meta.dart'; /// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT /// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE /// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import 'dart:math'; + +import 'package:meta/meta.dart'; + @internal class SampleRateFormat { int _minimumIntegerDigits;