diff --git a/.github/workflows/health.yaml b/.github/workflows/health.yaml index 55cba5a1..7e1409be 100644 --- a/.github/workflows/health.yaml +++ b/.github/workflows/health.yaml @@ -3,10 +3,17 @@ on: pull_request: branches: [ main ] types: [opened, synchronize, reopened, labeled, unlabeled] + jobs: health: uses: dart-lang/ecosystem/.github/workflows/health.yaml@main with: coverage_web: true + checkout_submodules: true + experiments: native-assets + sdk: dev + ignore_license: "**.g.dart,pkgs/intl_translation/example/lib/generated/**,pkgs/intl_translation/test/generate_localized/**,pkgs/intl_translation/test/two_components/**" + ignore_coverage: "**.g.dart" + ignore_packages: "submodules" permissions: pull-requests: write diff --git a/.github/workflows/intl4x.yml b/.github/workflows/intl4x.yml index 7359c371..591859fb 100644 --- a/.github/workflows/intl4x.yml +++ b/.github/workflows/intl4x.yml @@ -18,6 +18,10 @@ on: jobs: build: runs-on: ubuntu-latest + + env: + ICU4X_BUILD_MODE: fetch + defaults: run: working-directory: pkgs/intl4x @@ -25,23 +29,26 @@ jobs: matrix: sdk: [stable, dev] # {pkgs.versions} include: - - sdk: stable + - sdk: dev run-tests: true steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + with: + submodules: true + - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{matrix.sdk}} - - run: dart pub get + - run: dart --enable-experiment=native-assets pub get - - run: dart analyze --fatal-infos + - run: dart --enable-experiment=native-assets analyze --fatal-infos - - run: dart format --output=none --set-exit-if-changed . + - run: dart --enable-experiment=native-assets format --output=none --set-exit-if-changed . if: ${{matrix.run-tests}} - - run: dart test + - run: dart --enable-experiment=native-assets test if: ${{matrix.run-tests}} - - run: dart test -p chrome + - run: dart --enable-experiment=native-assets test -p chrome if: ${{matrix.run-tests}} diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 041c8d8b..453830bd 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -14,3 +14,4 @@ jobs: uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main with: write-comments: false + checkout_submodules: true diff --git a/.gitignore b/.gitignore index e6c5cd05..557acc47 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,4 @@ # Specific files pkgs/intl/test/number_format_compact_google3_icu_test.dart -pkgs/intl/update_from_cldr_data.sh \ No newline at end of file +pkgs/intl/update_from_cldr_data.sh diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..9967b5d1 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "submodules/icu4x"] + path = submodules/icu4x + url = https://github.com/unicode-org/icu4x.git diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 00000000..2c67e493 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,3 @@ +analyzer: + exclude: + - "submodules/*" diff --git a/pkgs/intl4x/CHANGELOG.md b/pkgs/intl4x/CHANGELOG.md index e41644ad..14e6b7a2 100644 --- a/pkgs/intl4x/CHANGELOG.md +++ b/pkgs/intl4x/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.0 + +- Add ICU4X support for collation. + ## 0.7.1 - Export plural rules. diff --git a/pkgs/intl4x/analysis_options.yaml b/pkgs/intl4x/analysis_options.yaml index 77a5e838..354473b4 100644 --- a/pkgs/intl4x/analysis_options.yaml +++ b/pkgs/intl4x/analysis_options.yaml @@ -7,3 +7,8 @@ linter: - prefer_final_locals - prefer_relative_imports - unnecessary_parenthesis + +analyzer: + exclude: + - "submodules/*" + - "lib/src/bindings/*" diff --git a/pkgs/intl4x/build.dart b/pkgs/intl4x/build.dart new file mode 100644 index 00000000..e20f0114 --- /dev/null +++ b/pkgs/intl4x/build.dart @@ -0,0 +1,256 @@ +// Copyright (c) 2024, 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:io'; + +import 'package:archive/archive_io.dart'; +import 'package:native_assets_cli/native_assets_cli.dart'; +import 'package:path/path.dart' as path; + +const crateName = 'icu_capi'; +const assetId = 'package:intl4x/src/bindings/lib.g.dart'; + +void main(List args) async { + final config = await BuildConfig.fromArgs(args); + + final libFolder = path.join(config.outDir.path, 'release'); + Directory(libFolder).createSync(); + final libPath = path.join( + libFolder, + config.targetOs.dylibFileName(crateName.replaceAll('-', '_')), + ); + + final buildMode = switch (Platform.environment['ICU4X_BUILD_MODE']) { + 'local' => LocalMode(libPath), + 'checkout' => CheckoutMode(config, libPath), + 'fetch' || null => FetchMode(libPath), + String() => throw ArgumentError(''' + + +Unknown build mode for icu4x. Set the `ICU4X_BUILD_MODE` environment variable with either `fetch`, `local`, or `checkout`. +* fetch: Fetch the precompiled binary from a CDN. +* local: Use a locally existing binary at the environment variable `LOCAL_ICU4X_BINARY`. +* checkout: Build a fresh library from a local git checkout of the icu4x repository at the environment variable `LOCAL_ICU4X_CHECKOUT`. + +'''), + }; + + await buildMode.build(); + + await BuildOutput( + assets: [ + Asset( + id: assetId, + linkMode: LinkMode.dynamic, + target: Target.current, + path: AssetAbsolutePath(Uri.file(libPath)), + ) + ], + dependencies: Dependencies([Uri.file('build.dart')]), + ).writeToFile(outDir: config.outDir); +} + +void unzipFirstFile({required File input, required File output}) { + final inputStream = InputFileStream(input.path); + final archive = ZipDecoder().decodeBuffer(inputStream); + final file = archive.files.firstOrNull; + // If it's a file and not a directory + if (file?.isFile ?? false) { + final outputStream = OutputFileStream(output.path); + file!.writeContent(outputStream); + outputStream.close(); + } +} + +sealed class BuildMode { + Future build(); +} + +final class FetchMode implements BuildMode { + final String libPath; + + FetchMode(this.libPath); + + @override + Future build() async { + // TODO: Get a nicer CDN than a generated link to a privately owned repo. + final request = await HttpClient().getUrl(Uri.parse( + 'https://nightly.link/mosuem/i18n/workflows/intl4x_artifacts/main/lib-$platformName-latest.zip')); + final response = await request.close(); + + final zippedDynamicLibrary = + File(path.join(Directory.systemTemp.path, 'tmp.zip')); + zippedDynamicLibrary.createSync(); + await response.pipe(zippedDynamicLibrary.openWrite()); + + final dynamicLibrary = File(libPath); + dynamicLibrary.createSync(recursive: true); + unzipFirstFile(input: zippedDynamicLibrary, output: dynamicLibrary); + } + + String get platformName { + if (Platform.isMacOS) { + return 'macos'; + } else if (Platform.isWindows) { + return 'windows'; + } else { + return 'ubuntu'; + } + } +} + +final class LocalMode implements BuildMode { + final String libPath; + + LocalMode(this.libPath); + + String get _localBinaryPath => Platform.environment['LOCAL_ICU4X_BINARY']!; + + @override + Future build() async { + await File(_localBinaryPath).copy(libPath); + } +} + +final class CheckoutMode implements BuildMode { + final BuildConfig config; + final String libPath; + CheckoutMode(this.config, this.libPath); + + @override + Future build() async { + final workingDirectory = Platform.environment['LOCAL_ICU4X_CHECKOUT']; + if (workingDirectory == null) { + throw ArgumentError('Specify the ICU4X checkout folder' + 'with the LOCAL_ICU4X_CHECKOUT variable'); + } + final lib = await buildLib( + config, + workingDirectory, + ); + await File(lib).copy(libPath); + } +} + +Future buildLib( + BuildConfig config, + String workingDirectory, +) async { + final rustTarget = + config.target.asRustTarget(config.targetIOSSdk == IOSSdk.iPhoneSimulator); + final isNoStd = config.target.isNoStdTarget; + + if (!isNoStd) { + final rustArguments = ['target', 'add', rustTarget]; + final rustup = await Process.run( + 'rustup', + rustArguments, + workingDirectory: workingDirectory, + ); + + if (rustup.exitCode != 0) { + throw ProcessException( + 'rustup', + rustArguments, + rustup.stderr.toString(), + rustup.exitCode, + ); + } + } + + final stdFeatures = [ + 'default_components', + 'compiled_data', + 'buffer_provider', + 'logging', + 'simple_logger', + ]; + final noStdFeatures = [ + 'default_components', + 'compiled_data', + 'buffer_provider', + 'libc-alloc', + 'panic-handler' + ]; + final tempDir = Directory.systemTemp.createTempSync(); + final linkModeType = + config.linkModePreference.preferredLinkMode == LinkMode.static + ? 'staticlib' + : 'cdylib'; + final arguments = [ + if (isNoStd) '+nightly', + 'rustc', + '-p={crateName}', + '--crate-type=$linkModeType', + '--release', + '--config=profile.release.panic="abort"', + '--config=profile.release.codegen-units=1', + '--no-default-features', + if (!isNoStd) '--features=${stdFeatures.join(',')}', + if (isNoStd) '--features=${noStdFeatures.join(',')}', + if (isNoStd) '-Zbuild-std=core,alloc', + if (isNoStd) '-Zbuild-std-features=panic_immediate_abort', + '--target=$rustTarget', + '--target-dir=${tempDir.path}' + ]; + final cargo = await Process.run( + 'cargo', + arguments, + workingDirectory: workingDirectory, + ); + + if (cargo.exitCode != 0) { + throw ProcessException( + 'cargo', + arguments, + cargo.stderr.toString(), + cargo.exitCode, + ); + } + + final dylibFilePath = path.join( + tempDir.path, + rustTarget, + 'release', + config.target.os.dylibFileName(crateName.replaceAll('-', '_')), + ); + if (!File(dylibFilePath).existsSync()) { + throw FileSystemException('Building the dylib failed', dylibFilePath); + } + return dylibFilePath; +} + +extension on Target { + String asRustTarget(bool isSimulator) { + if (this == Target.iOSArm64 && isSimulator) { + return 'aarch64-apple-ios-sim'; + } + return switch (this) { + Target.androidArm => 'armv7-linux-androideabi', + Target.androidArm64 => 'aarch64-linux-android', + Target.androidIA32 => 'i686-linux-android', + Target.androidRiscv64 => 'riscv64-linux-android', + Target.androidX64 => 'x86_64-linux-android', + Target.fuchsiaArm64 => 'aarch64-unknown-fuchsia', + Target.fuchsiaX64 => 'x86_64-unknown-fuchsia', + Target.iOSArm64 => 'aarch64-apple-ios', + Target.iOSX64 => 'x86_64-apple-ios', + Target.linuxArm => 'armv7-unknown-linux-gnueabihf', + Target.linuxArm64 => 'aarch64-unknown-linux-gnu', + Target.linuxIA32 => 'i686-unknown-linux-gnu', + Target.linuxRiscv32 => 'riscv32gc-unknown-linux-gnu', + Target.linuxRiscv64 => 'riscv64gc-unknown-linux-gnu', + Target.linuxX64 => 'x86_64-unknown-linux-gnu', + Target.macOSArm64 => 'aarch64-apple-darwin', + Target.macOSX64 => 'x86_64-apple-darwin', + Target.windowsArm64 => 'aarch64-pc-windows-msvc', + Target.windowsIA32 => 'i686-pc-windows-msvc', + Target.windowsX64 => 'x86_64-pc-windows-msvc', + Target() => throw UnimplementedError('Target not available for rust'), + }; + } + + bool get isNoStdTarget => + [Target.androidRiscv64, Target.linuxRiscv32].contains(this); +} diff --git a/pkgs/intl4x/lib/intl4x.dart b/pkgs/intl4x/lib/intl4x.dart index aba21c3c..a263df37 100644 --- a/pkgs/intl4x/lib/intl4x.dart +++ b/pkgs/intl4x/lib/intl4x.dart @@ -30,7 +30,7 @@ typedef Icu4xKey = String; /// The main class for all i18n calls, containing references to other /// functions such as -/// * [NumberFormatBuilder] +/// * [numberFormat] /// /// The functionalities are called through getters on an `Intl` instance, i.e. /// ```dart @@ -42,45 +42,43 @@ typedef Icu4xKey = String; /// ``` class Intl { final EcmaPolicy ecmaPolicy; - - // ignore: unused_field, prefer_final_fields - String _dyliblocation = 'path.dll'; //What about path.wasm? How to load this? - // ignore: unused_field, prefer_final_fields - String _datalocation = 'data.blob'; //What about additional data? - + final Data data; final List supportedLocales; final LocaleMatcher localeMatcher; Collation collation([CollationOptions options = const CollationOptions()]) => Collation( - options, - CollationImpl.build(locale, localeMatcher, ecmaPolicy), + CollationImpl.build(locale, data, options, localeMatcher, ecmaPolicy), ); NumberFormat numberFormat([NumberFormatOptions? options]) => NumberFormat( - options ?? NumberFormatOptions.custom(), - NumberFormatImpl.build(locale, localeMatcher, ecmaPolicy), + NumberFormatImpl.build(locale, data, + options ?? NumberFormatOptions.custom(), localeMatcher, ecmaPolicy), ); - ListFormat listFormat([ListFormatOptions? options]) => ListFormat( - options ?? const ListFormatOptions(), - ListFormatImpl.build(locale, localeMatcher, ecmaPolicy), + ListFormat listFormat( + [ListFormatOptions options = const ListFormatOptions()]) => + ListFormat( + ListFormatImpl.build(locale, data, options, localeMatcher, ecmaPolicy), ); - DisplayNames displayNames([DisplayNamesOptions? options]) => DisplayNames( - options ?? const DisplayNamesOptions(), - DisplayNamesImpl.build(locale, localeMatcher, ecmaPolicy), + DisplayNames displayNames( + [DisplayNamesOptions options = const DisplayNamesOptions()]) => + DisplayNames( + DisplayNamesImpl.build( + locale, data, options, localeMatcher, ecmaPolicy), ); - DateTimeFormat datetimeFormat([DateTimeFormatOptions? options]) => + DateTimeFormat datetimeFormat( + [DateTimeFormatOptions options = const DateTimeFormatOptions()]) => DateTimeFormat( - options ?? const DateTimeFormatOptions(), - DateTimeFormatImpl.build(locale, localeMatcher, ecmaPolicy), + DateTimeFormatImpl.build( + locale, data, options, localeMatcher, ecmaPolicy), ); PluralRules plural([PluralRulesOptions? options]) => PluralRules( - options ?? PluralRulesOptions(), - PluralRulesImpl.build(locale, localeMatcher, ecmaPolicy), + PluralRulesImpl.build(locale, data, options ?? PluralRulesOptions(), + localeMatcher, ecmaPolicy), ); /// Construct an [Intl] instance providing the current [locale] and the @@ -91,6 +89,7 @@ class Intl { this.ecmaPolicy = defaultPolicy, this.supportedLocales = allLocales, this.localeMatcher = LocaleMatcher.lookup, + this.data = const NoData(), }) : locale = locale ?? findSystemLocale(); Intl.includeLocales({ @@ -121,10 +120,12 @@ class Intl { Locale? locale, EcmaPolicy ecmaPolicy = defaultPolicy, LocaleMatcher localeMatcher = LocaleMatcher.lookup, + Data data = const BundleData(), }) : this._( locale: locale, ecmaPolicy: ecmaPolicy, supportedLocales: allLocales, + data: data, ); Locale locale; @@ -136,23 +137,3 @@ class Intl { return shouldUse && canUse; } } - -/// ICU4X will be compiled into the application, so there is no need to -/// specify any data here. Users may want to add additional data at runtime, -/// which could be supported through this API. -/// -/// TODO: Wire this through to the ICU4X formatters. -final Map> additionalICU4XData = {}; - -void addIcu4XData(Data data) { - final callbackFromICUTellingMeWhatLocalesTheDataContained = - extractKeysFromData(); - additionalICU4XData - .addAll(callbackFromICUTellingMeWhatLocalesTheDataContained); - throw UnimplementedError('Call to ICU4X here'); -} - -Map> extractKeysFromData() { - //TODO: Add implementation - return {}; -} diff --git a/pkgs/intl4x/lib/src/bindings/AnyCalendarKind.g.dart b/pkgs/intl4x/lib/src/bindings/AnyCalendarKind.g.dart new file mode 120000 index 00000000..17e72902 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/AnyCalendarKind.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/AnyCalendarKind.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/Bcp47ToIanaMapper.g.dart b/pkgs/intl4x/lib/src/bindings/Bcp47ToIanaMapper.g.dart new file mode 120000 index 00000000..5c63dc36 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/Bcp47ToIanaMapper.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/Bcp47ToIanaMapper.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/Bidi.g.dart b/pkgs/intl4x/lib/src/bindings/Bidi.g.dart new file mode 120000 index 00000000..c4fc1297 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/Bidi.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/Bidi.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/BidiDirection.g.dart b/pkgs/intl4x/lib/src/bindings/BidiDirection.g.dart new file mode 120000 index 00000000..9c547e57 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/BidiDirection.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/BidiDirection.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/BidiInfo.g.dart b/pkgs/intl4x/lib/src/bindings/BidiInfo.g.dart new file mode 120000 index 00000000..791bc8ff --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/BidiInfo.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/BidiInfo.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/BidiParagraph.g.dart b/pkgs/intl4x/lib/src/bindings/BidiParagraph.g.dart new file mode 120000 index 00000000..29b7658b --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/BidiParagraph.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/BidiParagraph.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/Calendar.g.dart b/pkgs/intl4x/lib/src/bindings/Calendar.g.dart new file mode 120000 index 00000000..c6e993d0 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/Calendar.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/Calendar.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CanonicalCombiningClassMap.g.dart b/pkgs/intl4x/lib/src/bindings/CanonicalCombiningClassMap.g.dart new file mode 120000 index 00000000..4b2a1127 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CanonicalCombiningClassMap.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CanonicalCombiningClassMap.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CanonicalComposition.g.dart b/pkgs/intl4x/lib/src/bindings/CanonicalComposition.g.dart new file mode 120000 index 00000000..445efcb4 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CanonicalComposition.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CanonicalComposition.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CanonicalDecomposition.g.dart b/pkgs/intl4x/lib/src/bindings/CanonicalDecomposition.g.dart new file mode 120000 index 00000000..b6b8809e --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CanonicalDecomposition.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CanonicalDecomposition.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CaseMapCloser.g.dart b/pkgs/intl4x/lib/src/bindings/CaseMapCloser.g.dart new file mode 120000 index 00000000..f2126f85 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CaseMapCloser.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CaseMapCloser.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CaseMapper.g.dart b/pkgs/intl4x/lib/src/bindings/CaseMapper.g.dart new file mode 120000 index 00000000..6b7d0d36 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CaseMapper.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CaseMapper.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CodePointMapData16.g.dart b/pkgs/intl4x/lib/src/bindings/CodePointMapData16.g.dart new file mode 120000 index 00000000..ebba7d40 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CodePointMapData16.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CodePointMapData16.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CodePointMapData8.g.dart b/pkgs/intl4x/lib/src/bindings/CodePointMapData8.g.dart new file mode 120000 index 00000000..e9b2eec8 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CodePointMapData8.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CodePointMapData8.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CodePointRangeIterator.g.dart b/pkgs/intl4x/lib/src/bindings/CodePointRangeIterator.g.dart new file mode 120000 index 00000000..41ce5dcd --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CodePointRangeIterator.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CodePointRangeIterator.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CodePointRangeIteratorResult.g.dart b/pkgs/intl4x/lib/src/bindings/CodePointRangeIteratorResult.g.dart new file mode 120000 index 00000000..ca40c652 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CodePointRangeIteratorResult.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CodePointRangeIteratorResult.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CodePointSetBuilder.g.dart b/pkgs/intl4x/lib/src/bindings/CodePointSetBuilder.g.dart new file mode 120000 index 00000000..642e172a --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CodePointSetBuilder.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CodePointSetBuilder.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CodePointSetData.g.dart b/pkgs/intl4x/lib/src/bindings/CodePointSetData.g.dart new file mode 120000 index 00000000..5c7ad408 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CodePointSetData.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CodePointSetData.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/Collator.g.dart b/pkgs/intl4x/lib/src/bindings/Collator.g.dart new file mode 120000 index 00000000..ff0994f6 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/Collator.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/Collator.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CollatorAlternateHandling.g.dart b/pkgs/intl4x/lib/src/bindings/CollatorAlternateHandling.g.dart new file mode 120000 index 00000000..0bdfdb57 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CollatorAlternateHandling.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CollatorAlternateHandling.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CollatorBackwardSecondLevel.g.dart b/pkgs/intl4x/lib/src/bindings/CollatorBackwardSecondLevel.g.dart new file mode 120000 index 00000000..a6e27f89 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CollatorBackwardSecondLevel.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CollatorBackwardSecondLevel.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CollatorCaseFirst.g.dart b/pkgs/intl4x/lib/src/bindings/CollatorCaseFirst.g.dart new file mode 120000 index 00000000..7462732d --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CollatorCaseFirst.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CollatorCaseFirst.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CollatorCaseLevel.g.dart b/pkgs/intl4x/lib/src/bindings/CollatorCaseLevel.g.dart new file mode 120000 index 00000000..7797c971 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CollatorCaseLevel.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CollatorCaseLevel.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CollatorMaxVariable.g.dart b/pkgs/intl4x/lib/src/bindings/CollatorMaxVariable.g.dart new file mode 120000 index 00000000..0213d811 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CollatorMaxVariable.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CollatorMaxVariable.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CollatorNumeric.g.dart b/pkgs/intl4x/lib/src/bindings/CollatorNumeric.g.dart new file mode 120000 index 00000000..26d6ea94 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CollatorNumeric.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CollatorNumeric.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CollatorOptions.g.dart b/pkgs/intl4x/lib/src/bindings/CollatorOptions.g.dart new file mode 120000 index 00000000..b7f55830 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CollatorOptions.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CollatorOptions.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CollatorStrength.g.dart b/pkgs/intl4x/lib/src/bindings/CollatorStrength.g.dart new file mode 120000 index 00000000..fee3edae --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CollatorStrength.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CollatorStrength.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/ComposingNormalizer.g.dart b/pkgs/intl4x/lib/src/bindings/ComposingNormalizer.g.dart new file mode 120000 index 00000000..8b3b82a3 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/ComposingNormalizer.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/ComposingNormalizer.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/CustomTimeZone.g.dart b/pkgs/intl4x/lib/src/bindings/CustomTimeZone.g.dart new file mode 120000 index 00000000..6cfcaf54 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/CustomTimeZone.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/CustomTimeZone.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/DataProvider.g.dart b/pkgs/intl4x/lib/src/bindings/DataProvider.g.dart new file mode 120000 index 00000000..720eb504 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/DataProvider.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/DataProvider.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/Date.g.dart b/pkgs/intl4x/lib/src/bindings/Date.g.dart new file mode 120000 index 00000000..f7a5ff56 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/Date.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/Date.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/DateFormatter.g.dart b/pkgs/intl4x/lib/src/bindings/DateFormatter.g.dart new file mode 120000 index 00000000..99e37e09 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/DateFormatter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/DateFormatter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/DateLength.g.dart b/pkgs/intl4x/lib/src/bindings/DateLength.g.dart new file mode 120000 index 00000000..99540b88 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/DateLength.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/DateLength.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/DateTime.g.dart b/pkgs/intl4x/lib/src/bindings/DateTime.g.dart new file mode 120000 index 00000000..acd736ce --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/DateTime.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/DateTime.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/DateTimeFormatter.g.dart b/pkgs/intl4x/lib/src/bindings/DateTimeFormatter.g.dart new file mode 120000 index 00000000..d6698347 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/DateTimeFormatter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/DateTimeFormatter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/Decomposed.g.dart b/pkgs/intl4x/lib/src/bindings/Decomposed.g.dart new file mode 120000 index 00000000..c727ea0e --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/Decomposed.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/Decomposed.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/DecomposingNormalizer.g.dart b/pkgs/intl4x/lib/src/bindings/DecomposingNormalizer.g.dart new file mode 120000 index 00000000..f0b10530 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/DecomposingNormalizer.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/DecomposingNormalizer.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/DisplayNamesFallback.g.dart b/pkgs/intl4x/lib/src/bindings/DisplayNamesFallback.g.dart new file mode 120000 index 00000000..92701242 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/DisplayNamesFallback.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/DisplayNamesFallback.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/DisplayNamesOptions.g.dart b/pkgs/intl4x/lib/src/bindings/DisplayNamesOptions.g.dart new file mode 120000 index 00000000..097a83eb --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/DisplayNamesOptions.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/DisplayNamesOptions.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/DisplayNamesStyle.g.dart b/pkgs/intl4x/lib/src/bindings/DisplayNamesStyle.g.dart new file mode 120000 index 00000000..bec4f646 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/DisplayNamesStyle.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/DisplayNamesStyle.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/Error.g.dart b/pkgs/intl4x/lib/src/bindings/Error.g.dart new file mode 120000 index 00000000..b42967ba --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/Error.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/Error.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/FixedDecimal.g.dart b/pkgs/intl4x/lib/src/bindings/FixedDecimal.g.dart new file mode 120000 index 00000000..1ed862c2 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/FixedDecimal.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/FixedDecimal.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/FixedDecimalFormatter.g.dart b/pkgs/intl4x/lib/src/bindings/FixedDecimalFormatter.g.dart new file mode 120000 index 00000000..25d1cb55 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/FixedDecimalFormatter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/FixedDecimalFormatter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/FixedDecimalGroupingStrategy.g.dart b/pkgs/intl4x/lib/src/bindings/FixedDecimalGroupingStrategy.g.dart new file mode 120000 index 00000000..63e3cda4 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/FixedDecimalGroupingStrategy.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/FixedDecimalGroupingStrategy.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/FixedDecimalSign.g.dart b/pkgs/intl4x/lib/src/bindings/FixedDecimalSign.g.dart new file mode 120000 index 00000000..08693c78 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/FixedDecimalSign.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/FixedDecimalSign.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/FixedDecimalSignDisplay.g.dart b/pkgs/intl4x/lib/src/bindings/FixedDecimalSignDisplay.g.dart new file mode 120000 index 00000000..c6ac8d9b --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/FixedDecimalSignDisplay.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/FixedDecimalSignDisplay.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/GeneralCategoryNameToMaskMapper.g.dart b/pkgs/intl4x/lib/src/bindings/GeneralCategoryNameToMaskMapper.g.dart new file mode 120000 index 00000000..e21a791b --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/GeneralCategoryNameToMaskMapper.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/GeneralCategoryNameToMaskMapper.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/GraphemeClusterBreakIteratorLatin1.g.dart b/pkgs/intl4x/lib/src/bindings/GraphemeClusterBreakIteratorLatin1.g.dart new file mode 120000 index 00000000..ba31374c --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/GraphemeClusterBreakIteratorLatin1.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/GraphemeClusterBreakIteratorLatin1.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/GraphemeClusterBreakIteratorUtf16.g.dart b/pkgs/intl4x/lib/src/bindings/GraphemeClusterBreakIteratorUtf16.g.dart new file mode 120000 index 00000000..593ddc97 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/GraphemeClusterBreakIteratorUtf16.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/GraphemeClusterBreakIteratorUtf16.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/GraphemeClusterBreakIteratorUtf8.g.dart b/pkgs/intl4x/lib/src/bindings/GraphemeClusterBreakIteratorUtf8.g.dart new file mode 120000 index 00000000..2770377a --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/GraphemeClusterBreakIteratorUtf8.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/GraphemeClusterBreakIteratorUtf8.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/GraphemeClusterSegmenter.g.dart b/pkgs/intl4x/lib/src/bindings/GraphemeClusterSegmenter.g.dart new file mode 120000 index 00000000..b2f5bf03 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/GraphemeClusterSegmenter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/GraphemeClusterSegmenter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/GregorianDateFormatter.g.dart b/pkgs/intl4x/lib/src/bindings/GregorianDateFormatter.g.dart new file mode 120000 index 00000000..f23d82d1 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/GregorianDateFormatter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/GregorianDateFormatter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/GregorianDateTimeFormatter.g.dart b/pkgs/intl4x/lib/src/bindings/GregorianDateTimeFormatter.g.dart new file mode 120000 index 00000000..ec6c4873 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/GregorianDateTimeFormatter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/GregorianDateTimeFormatter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/GregorianZonedDateTimeFormatter.g.dart b/pkgs/intl4x/lib/src/bindings/GregorianZonedDateTimeFormatter.g.dart new file mode 120000 index 00000000..d14da4ac --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/GregorianZonedDateTimeFormatter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/GregorianZonedDateTimeFormatter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/IanaToBcp47Mapper.g.dart b/pkgs/intl4x/lib/src/bindings/IanaToBcp47Mapper.g.dart new file mode 120000 index 00000000..f1d318f7 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/IanaToBcp47Mapper.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/IanaToBcp47Mapper.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/IsoDate.g.dart b/pkgs/intl4x/lib/src/bindings/IsoDate.g.dart new file mode 120000 index 00000000..c71ad177 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/IsoDate.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/IsoDate.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/IsoDateTime.g.dart b/pkgs/intl4x/lib/src/bindings/IsoDateTime.g.dart new file mode 120000 index 00000000..83ee0e4e --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/IsoDateTime.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/IsoDateTime.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/IsoTimeZoneFormat.g.dart b/pkgs/intl4x/lib/src/bindings/IsoTimeZoneFormat.g.dart new file mode 120000 index 00000000..fc4faf2a --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/IsoTimeZoneFormat.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/IsoTimeZoneFormat.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/IsoTimeZoneMinuteDisplay.g.dart b/pkgs/intl4x/lib/src/bindings/IsoTimeZoneMinuteDisplay.g.dart new file mode 120000 index 00000000..7bc7dc43 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/IsoTimeZoneMinuteDisplay.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/IsoTimeZoneMinuteDisplay.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/IsoTimeZoneOptions.g.dart b/pkgs/intl4x/lib/src/bindings/IsoTimeZoneOptions.g.dart new file mode 120000 index 00000000..15a12e68 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/IsoTimeZoneOptions.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/IsoTimeZoneOptions.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/IsoTimeZoneSecondDisplay.g.dart b/pkgs/intl4x/lib/src/bindings/IsoTimeZoneSecondDisplay.g.dart new file mode 120000 index 00000000..90f5a1c6 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/IsoTimeZoneSecondDisplay.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/IsoTimeZoneSecondDisplay.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/IsoWeekday.g.dart b/pkgs/intl4x/lib/src/bindings/IsoWeekday.g.dart new file mode 120000 index 00000000..66616bc3 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/IsoWeekday.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/IsoWeekday.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LanguageDisplay.g.dart b/pkgs/intl4x/lib/src/bindings/LanguageDisplay.g.dart new file mode 120000 index 00000000..e6c54f61 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LanguageDisplay.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LanguageDisplay.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LeadingAdjustment.g.dart b/pkgs/intl4x/lib/src/bindings/LeadingAdjustment.g.dart new file mode 120000 index 00000000..c9e2bb7b --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LeadingAdjustment.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LeadingAdjustment.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LineBreakIteratorLatin1.g.dart b/pkgs/intl4x/lib/src/bindings/LineBreakIteratorLatin1.g.dart new file mode 120000 index 00000000..96a7f438 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LineBreakIteratorLatin1.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LineBreakIteratorLatin1.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LineBreakIteratorUtf16.g.dart b/pkgs/intl4x/lib/src/bindings/LineBreakIteratorUtf16.g.dart new file mode 120000 index 00000000..36eaedca --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LineBreakIteratorUtf16.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LineBreakIteratorUtf16.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LineBreakIteratorUtf8.g.dart b/pkgs/intl4x/lib/src/bindings/LineBreakIteratorUtf8.g.dart new file mode 120000 index 00000000..05ed01ee --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LineBreakIteratorUtf8.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LineBreakIteratorUtf8.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LineBreakOptions.g.dart b/pkgs/intl4x/lib/src/bindings/LineBreakOptions.g.dart new file mode 120000 index 00000000..f9159097 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LineBreakOptions.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LineBreakOptions.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LineBreakStrictness.g.dart b/pkgs/intl4x/lib/src/bindings/LineBreakStrictness.g.dart new file mode 120000 index 00000000..704f2ee7 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LineBreakStrictness.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LineBreakStrictness.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LineBreakWordOption.g.dart b/pkgs/intl4x/lib/src/bindings/LineBreakWordOption.g.dart new file mode 120000 index 00000000..55927a84 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LineBreakWordOption.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LineBreakWordOption.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LineSegmenter.g.dart b/pkgs/intl4x/lib/src/bindings/LineSegmenter.g.dart new file mode 120000 index 00000000..bd91aebd --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LineSegmenter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LineSegmenter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/List.g.dart b/pkgs/intl4x/lib/src/bindings/List.g.dart new file mode 120000 index 00000000..f15ae36c --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/List.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/List.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/ListFormatter.g.dart b/pkgs/intl4x/lib/src/bindings/ListFormatter.g.dart new file mode 120000 index 00000000..6babee68 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/ListFormatter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/ListFormatter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/ListLength.g.dart b/pkgs/intl4x/lib/src/bindings/ListLength.g.dart new file mode 120000 index 00000000..463aa395 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/ListLength.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/ListLength.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/Locale.g.dart b/pkgs/intl4x/lib/src/bindings/Locale.g.dart new file mode 120000 index 00000000..d8f1cdda --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/Locale.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/Locale.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LocaleCanonicalizer.g.dart b/pkgs/intl4x/lib/src/bindings/LocaleCanonicalizer.g.dart new file mode 120000 index 00000000..4a371c91 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LocaleCanonicalizer.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LocaleCanonicalizer.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LocaleDirection.g.dart b/pkgs/intl4x/lib/src/bindings/LocaleDirection.g.dart new file mode 120000 index 00000000..1d6fa0f8 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LocaleDirection.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LocaleDirection.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LocaleDirectionality.g.dart b/pkgs/intl4x/lib/src/bindings/LocaleDirectionality.g.dart new file mode 120000 index 00000000..37838f3f --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LocaleDirectionality.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LocaleDirectionality.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LocaleDisplayNamesFormatter.g.dart b/pkgs/intl4x/lib/src/bindings/LocaleDisplayNamesFormatter.g.dart new file mode 120000 index 00000000..7858d023 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LocaleDisplayNamesFormatter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LocaleDisplayNamesFormatter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LocaleExpander.g.dart b/pkgs/intl4x/lib/src/bindings/LocaleExpander.g.dart new file mode 120000 index 00000000..c149ba01 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LocaleExpander.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LocaleExpander.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LocaleFallbackConfig.g.dart b/pkgs/intl4x/lib/src/bindings/LocaleFallbackConfig.g.dart new file mode 120000 index 00000000..6a57b6e3 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LocaleFallbackConfig.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LocaleFallbackConfig.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LocaleFallbackIterator.g.dart b/pkgs/intl4x/lib/src/bindings/LocaleFallbackIterator.g.dart new file mode 120000 index 00000000..d86e7334 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LocaleFallbackIterator.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LocaleFallbackIterator.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LocaleFallbackPriority.g.dart b/pkgs/intl4x/lib/src/bindings/LocaleFallbackPriority.g.dart new file mode 120000 index 00000000..ea7c34ea --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LocaleFallbackPriority.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LocaleFallbackPriority.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LocaleFallbackSupplement.g.dart b/pkgs/intl4x/lib/src/bindings/LocaleFallbackSupplement.g.dart new file mode 120000 index 00000000..888daff8 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LocaleFallbackSupplement.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LocaleFallbackSupplement.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LocaleFallbacker.g.dart b/pkgs/intl4x/lib/src/bindings/LocaleFallbacker.g.dart new file mode 120000 index 00000000..4e1cbd3f --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LocaleFallbacker.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LocaleFallbacker.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/LocaleFallbackerWithConfig.g.dart b/pkgs/intl4x/lib/src/bindings/LocaleFallbackerWithConfig.g.dart new file mode 120000 index 00000000..57fb23fc --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/LocaleFallbackerWithConfig.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/LocaleFallbackerWithConfig.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/Logger.g.dart b/pkgs/intl4x/lib/src/bindings/Logger.g.dart new file mode 120000 index 00000000..a02d0fec --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/Logger.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/Logger.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/MetazoneCalculator.g.dart b/pkgs/intl4x/lib/src/bindings/MetazoneCalculator.g.dart new file mode 120000 index 00000000..d9c169ad --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/MetazoneCalculator.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/MetazoneCalculator.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/Ordering.g.dart b/pkgs/intl4x/lib/src/bindings/Ordering.g.dart new file mode 120000 index 00000000..d46d77c4 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/Ordering.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/Ordering.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/PluralCategories.g.dart b/pkgs/intl4x/lib/src/bindings/PluralCategories.g.dart new file mode 120000 index 00000000..b5a59383 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/PluralCategories.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/PluralCategories.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/PluralCategory.g.dart b/pkgs/intl4x/lib/src/bindings/PluralCategory.g.dart new file mode 120000 index 00000000..0a1afc4d --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/PluralCategory.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/PluralCategory.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/PluralOperands.g.dart b/pkgs/intl4x/lib/src/bindings/PluralOperands.g.dart new file mode 120000 index 00000000..c79c2de4 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/PluralOperands.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/PluralOperands.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/PluralRules.g.dart b/pkgs/intl4x/lib/src/bindings/PluralRules.g.dart new file mode 120000 index 00000000..c6c27b5c --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/PluralRules.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/PluralRules.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/PropertyValueNameToEnumMapper.g.dart b/pkgs/intl4x/lib/src/bindings/PropertyValueNameToEnumMapper.g.dart new file mode 120000 index 00000000..12ccea21 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/PropertyValueNameToEnumMapper.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/PropertyValueNameToEnumMapper.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/RegionDisplayNames.g.dart b/pkgs/intl4x/lib/src/bindings/RegionDisplayNames.g.dart new file mode 120000 index 00000000..b672f8ca --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/RegionDisplayNames.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/RegionDisplayNames.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/ReorderedIndexMap.g.dart b/pkgs/intl4x/lib/src/bindings/ReorderedIndexMap.g.dart new file mode 120000 index 00000000..68b9d347 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/ReorderedIndexMap.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/ReorderedIndexMap.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/ResolvedCollatorOptions.g.dart b/pkgs/intl4x/lib/src/bindings/ResolvedCollatorOptions.g.dart new file mode 120000 index 00000000..214e3f44 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/ResolvedCollatorOptions.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/ResolvedCollatorOptions.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/RoundingIncrement.g.dart b/pkgs/intl4x/lib/src/bindings/RoundingIncrement.g.dart new file mode 120000 index 00000000..eefaf89d --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/RoundingIncrement.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/RoundingIncrement.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/ScriptExtensionsSet.g.dart b/pkgs/intl4x/lib/src/bindings/ScriptExtensionsSet.g.dart new file mode 120000 index 00000000..b2e59524 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/ScriptExtensionsSet.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/ScriptExtensionsSet.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/ScriptWithExtensions.g.dart b/pkgs/intl4x/lib/src/bindings/ScriptWithExtensions.g.dart new file mode 120000 index 00000000..77e3a43d --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/ScriptWithExtensions.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/ScriptWithExtensions.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/ScriptWithExtensionsBorrowed.g.dart b/pkgs/intl4x/lib/src/bindings/ScriptWithExtensionsBorrowed.g.dart new file mode 120000 index 00000000..50610ad3 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/ScriptWithExtensionsBorrowed.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/ScriptWithExtensionsBorrowed.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/SegmenterWordType.g.dart b/pkgs/intl4x/lib/src/bindings/SegmenterWordType.g.dart new file mode 120000 index 00000000..34a5631b --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/SegmenterWordType.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/SegmenterWordType.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/SentenceBreakIteratorLatin1.g.dart b/pkgs/intl4x/lib/src/bindings/SentenceBreakIteratorLatin1.g.dart new file mode 120000 index 00000000..03dd2ed4 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/SentenceBreakIteratorLatin1.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/SentenceBreakIteratorLatin1.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/SentenceBreakIteratorUtf16.g.dart b/pkgs/intl4x/lib/src/bindings/SentenceBreakIteratorUtf16.g.dart new file mode 120000 index 00000000..24147b77 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/SentenceBreakIteratorUtf16.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/SentenceBreakIteratorUtf16.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/SentenceBreakIteratorUtf8.g.dart b/pkgs/intl4x/lib/src/bindings/SentenceBreakIteratorUtf8.g.dart new file mode 120000 index 00000000..f2e64578 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/SentenceBreakIteratorUtf8.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/SentenceBreakIteratorUtf8.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/SentenceSegmenter.g.dart b/pkgs/intl4x/lib/src/bindings/SentenceSegmenter.g.dart new file mode 120000 index 00000000..66e73b34 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/SentenceSegmenter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/SentenceSegmenter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/Time.g.dart b/pkgs/intl4x/lib/src/bindings/Time.g.dart new file mode 120000 index 00000000..493594ef --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/Time.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/Time.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/TimeFormatter.g.dart b/pkgs/intl4x/lib/src/bindings/TimeFormatter.g.dart new file mode 120000 index 00000000..d772827c --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/TimeFormatter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/TimeFormatter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/TimeLength.g.dart b/pkgs/intl4x/lib/src/bindings/TimeLength.g.dart new file mode 120000 index 00000000..1c91cf8e --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/TimeLength.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/TimeLength.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/TimeZoneFormatter.g.dart b/pkgs/intl4x/lib/src/bindings/TimeZoneFormatter.g.dart new file mode 120000 index 00000000..a0c61ea7 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/TimeZoneFormatter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/TimeZoneFormatter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/TitlecaseMapper.g.dart b/pkgs/intl4x/lib/src/bindings/TitlecaseMapper.g.dart new file mode 120000 index 00000000..944c40c1 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/TitlecaseMapper.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/TitlecaseMapper.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/TitlecaseOptions.g.dart b/pkgs/intl4x/lib/src/bindings/TitlecaseOptions.g.dart new file mode 120000 index 00000000..1667c4bd --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/TitlecaseOptions.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/TitlecaseOptions.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/TrailingCase.g.dart b/pkgs/intl4x/lib/src/bindings/TrailingCase.g.dart new file mode 120000 index 00000000..caf5eb52 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/TrailingCase.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/TrailingCase.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/TransformResult.g.dart b/pkgs/intl4x/lib/src/bindings/TransformResult.g.dart new file mode 120000 index 00000000..28f525e7 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/TransformResult.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/TransformResult.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/UnicodeSetData.g.dart b/pkgs/intl4x/lib/src/bindings/UnicodeSetData.g.dart new file mode 120000 index 00000000..74e549d2 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/UnicodeSetData.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/UnicodeSetData.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/WeekCalculator.g.dart b/pkgs/intl4x/lib/src/bindings/WeekCalculator.g.dart new file mode 120000 index 00000000..96f5e7db --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/WeekCalculator.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/WeekCalculator.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/WeekOf.g.dart b/pkgs/intl4x/lib/src/bindings/WeekOf.g.dart new file mode 120000 index 00000000..39577a0b --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/WeekOf.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/WeekOf.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/WeekRelativeUnit.g.dart b/pkgs/intl4x/lib/src/bindings/WeekRelativeUnit.g.dart new file mode 120000 index 00000000..afc00638 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/WeekRelativeUnit.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/WeekRelativeUnit.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/WordBreakIteratorLatin1.g.dart b/pkgs/intl4x/lib/src/bindings/WordBreakIteratorLatin1.g.dart new file mode 120000 index 00000000..399aabbc --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/WordBreakIteratorLatin1.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/WordBreakIteratorLatin1.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/WordBreakIteratorUtf16.g.dart b/pkgs/intl4x/lib/src/bindings/WordBreakIteratorUtf16.g.dart new file mode 120000 index 00000000..154ff303 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/WordBreakIteratorUtf16.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/WordBreakIteratorUtf16.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/WordBreakIteratorUtf8.g.dart b/pkgs/intl4x/lib/src/bindings/WordBreakIteratorUtf8.g.dart new file mode 120000 index 00000000..fa1587d5 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/WordBreakIteratorUtf8.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/WordBreakIteratorUtf8.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/WordSegmenter.g.dart b/pkgs/intl4x/lib/src/bindings/WordSegmenter.g.dart new file mode 120000 index 00000000..c4c5faee --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/WordSegmenter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/WordSegmenter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/ZonedDateTimeFormatter.g.dart b/pkgs/intl4x/lib/src/bindings/ZonedDateTimeFormatter.g.dart new file mode 120000 index 00000000..fc1cfc80 --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/ZonedDateTimeFormatter.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/ZonedDateTimeFormatter.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/bindings/lib.g.dart b/pkgs/intl4x/lib/src/bindings/lib.g.dart new file mode 120000 index 00000000..69d6313b --- /dev/null +++ b/pkgs/intl4x/lib/src/bindings/lib.g.dart @@ -0,0 +1 @@ +../../../../../submodules/icu4x/ffi/capi/bindings/dart/lib.g.dart \ No newline at end of file diff --git a/pkgs/intl4x/lib/src/collation/collation.dart b/pkgs/intl4x/lib/src/collation/collation.dart index 2071671c..ae9ad40e 100644 --- a/pkgs/intl4x/lib/src/collation/collation.dart +++ b/pkgs/intl4x/lib/src/collation/collation.dart @@ -7,10 +7,9 @@ import 'collation_impl.dart'; import 'collation_options.dart'; class Collation { - final CollationOptions _options; final CollationImpl _collationImpl; - const Collation(this._options, this._collationImpl); + const Collation(this._collationImpl); /// Compare two strings in a locale-dependant manner. /// @@ -25,7 +24,7 @@ class Collation { if (isInTest) { return a.compareTo(b); } else { - return _collationImpl.compareImpl(a, b, _options); + return _collationImpl.compareImpl(a, b); } } } diff --git a/pkgs/intl4x/lib/src/collation/collation_4x.dart b/pkgs/intl4x/lib/src/collation/collation_4x.dart index daec2f0a..2a6d7691 100644 --- a/pkgs/intl4x/lib/src/collation/collation_4x.dart +++ b/pkgs/intl4x/lib/src/collation/collation_4x.dart @@ -2,17 +2,63 @@ // 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 '../bindings/lib.g.dart' as icu; +import '../data.dart'; +import '../data_4x.dart'; import '../locale/locale.dart'; +import '../locale/locale_4x.dart'; import 'collation_impl.dart'; import 'collation_options.dart'; -CollationImpl getCollator4X(Locale locale) => Collation4X(locale); +CollationImpl getCollator4X( + Locale locale, Data data, CollationOptions options) => + Collation4X(locale, data, options); class Collation4X extends CollationImpl { - Collation4X(super.locale); + final icu.Collator _collator; + + Collation4X(super.locale, Data data, super.options) + : _collator = icu.Collator( + data.to4X(), + locale.to4X(), + options.to4xOptions(), + ); @override - int compareImpl(String a, String b, CollationOptions options) { - throw UnimplementedError('Insert diplomat bindings here'); + int compareImpl(String a, String b) => _collator.compare(a, b).index; +} + +extension on CollationOptions { + icu.CollatorOptions to4xOptions() { + final icuNumeric = + numeric ? icu.CollatorNumeric.on : icu.CollatorNumeric.off; + + final icuCaseFirst = switch (caseFirst) { + CaseFirst.upper => icu.CollatorCaseFirst.upperFirst, + CaseFirst.lower => icu.CollatorCaseFirst.lowerFirst, + CaseFirst.localeDependent => icu.CollatorCaseFirst.off, + }; + + final icuStrength = switch (sensitivity) { + Sensitivity.base => icu.CollatorStrength.primary, + Sensitivity.accent => icu.CollatorStrength.secondary, + Sensitivity.caseSensitivity => icu.CollatorStrength.primary, + Sensitivity.variant => icu.CollatorStrength.tertiary, + null => icu.CollatorStrength.tertiary, + }; + + final icuCaseLevel = sensitivity == Sensitivity.caseSensitivity + ? icu.CollatorCaseLevel.on + : icu.CollatorCaseLevel.off; + + return icu.CollatorOptions( + strength: icuStrength, + numeric: icuNumeric, + caseFirst: icuCaseFirst, + caseLevel: icuCaseLevel, + alternateHandling: icu.CollatorAlternateHandling.nonIgnorable, + backwardSecondLevel: icu.CollatorBackwardSecondLevel.off, + maxVariable: icu.CollatorMaxVariable.auto, + ); } } diff --git a/pkgs/intl4x/lib/src/collation/collation_ecma.dart b/pkgs/intl4x/lib/src/collation/collation_ecma.dart index ef73765a..872cdc2e 100644 --- a/pkgs/intl4x/lib/src/collation/collation_ecma.dart +++ b/pkgs/intl4x/lib/src/collation/collation_ecma.dart @@ -12,9 +12,10 @@ import 'collation_options.dart'; CollationImpl? getCollatorECMA( Locale locale, + CollationOptions options, LocaleMatcher localeMatcher, ) => - CollationECMA.tryToBuild(locale, localeMatcher); + CollationECMA.tryToBuild(locale, options, localeMatcher); @JS('Intl.Collator') class CollatorJS { @@ -29,15 +30,16 @@ external List supportedLocalesOfJS( ]); class CollationECMA extends CollationImpl { - CollationECMA(super.locale); + CollationECMA(super.locale, super.options); static CollationImpl? tryToBuild( Locale locale, + CollationOptions options, LocaleMatcher localeMatcher, ) { final supportedLocales = supportedLocalesOf(localeMatcher, locale); return supportedLocales.isNotEmpty - ? CollationECMA(supportedLocales.first) + ? CollationECMA(supportedLocales.first, options) : null; } @@ -47,14 +49,14 @@ class CollationECMA extends CollationImpl { ) { final o = newObject(); setProperty(o, 'localeMatcher', localeMatcher.jsName); - return List.from(supportedLocalesOfJS([locale.toLanguageTag()], o)) + return List.from(supportedLocalesOfJS([locale.toLanguageTag()], o)) .whereType() .map(Locale.parse) .toList(); } @override - int compareImpl(String a, String b, CollationOptions options) { + int compareImpl(String a, String b) { final collatorJS = CollatorJS( [locale.toLanguageTag()], options.toJsOptions(), @@ -73,9 +75,7 @@ extension on CollationOptions { } setProperty(o, 'ignorePunctuation', ignorePunctuation); setProperty(o, 'numeric', numeric); - if (caseFirst != null) { - setProperty(o, 'caseFirst', caseFirst!.jsName); - } + setProperty(o, 'caseFirst', caseFirst.jsName); if (collation != null) { setProperty(o, 'collation', collation); } diff --git a/pkgs/intl4x/lib/src/collation/collation_impl.dart b/pkgs/intl4x/lib/src/collation/collation_impl.dart index 12be34c2..8aadbab8 100644 --- a/pkgs/intl4x/lib/src/collation/collation_impl.dart +++ b/pkgs/intl4x/lib/src/collation/collation_impl.dart @@ -2,37 +2,44 @@ // 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 '../data.dart'; import '../ecma/ecma_policy.dart'; import '../locale/locale.dart'; import '../options.dart'; import '../utils.dart'; -import 'collation_4x.dart'; +import 'collation.dart'; import 'collation_options.dart'; import 'collation_stub.dart' if (dart.library.js) 'collation_ecma.dart'; +import 'collation_stub_4x.dart' if (dart.library.io) 'collation_4x.dart'; /// Separated into a class to not clutter the public API with implementation /// details. abstract class CollationImpl { /// The current locale, selected by the localematcher final Locale locale; + final CollationOptions options; - CollationImpl(this.locale); + CollationImpl(this.locale, this.options); /// Factory to get the correct implementation, either calling on ICU4X or the /// in-built browser implementation. factory CollationImpl.build( - Locale locales, + Locale locale, + Data data, + CollationOptions options, LocaleMatcher localeMatcher, EcmaPolicy ecmaPolicy, ) => buildFormatter( - locales, + locale, + data, + options, localeMatcher, ecmaPolicy, getCollatorECMA, getCollator4X, ); - /// Actual implementation of the [compare] method. - int compareImpl(String a, String b, CollationOptions options); + /// Actual implementation of the [Collation.compare] method. + int compareImpl(String a, String b); } diff --git a/pkgs/intl4x/lib/src/collation/collation_options.dart b/pkgs/intl4x/lib/src/collation/collation_options.dart index e474e98c..0d93868f 100644 --- a/pkgs/intl4x/lib/src/collation/collation_options.dart +++ b/pkgs/intl4x/lib/src/collation/collation_options.dart @@ -9,7 +9,7 @@ class CollationOptions { final Sensitivity? sensitivity; final bool ignorePunctuation; final bool numeric; - final CaseFirst? caseFirst; + final CaseFirst caseFirst; final String? collation; final LocaleMatcher localeMatcher; @@ -19,7 +19,7 @@ class CollationOptions { this.sensitivity, this.ignorePunctuation = false, this.numeric = false, - this.caseFirst, + this.caseFirst = CaseFirst.localeDependent, this.collation, }); diff --git a/pkgs/intl4x/lib/src/collation/collation_stub.dart b/pkgs/intl4x/lib/src/collation/collation_stub.dart index 2c253543..f14d5c0e 100644 --- a/pkgs/intl4x/lib/src/collation/collation_stub.dart +++ b/pkgs/intl4x/lib/src/collation/collation_stub.dart @@ -2,10 +2,11 @@ // 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 '../../collation.dart'; import '../locale/locale.dart'; -import '../options.dart'; import 'collation_impl.dart'; /// Stub for the conditional import -CollationImpl? getCollatorECMA(Locale locale, LocaleMatcher localeMatcher) => +CollationImpl? getCollatorECMA( + Locale locale, CollationOptions options, LocaleMatcher localeMatcher) => throw UnimplementedError('Cannot use ECMA outside of web environments.'); diff --git a/pkgs/intl4x/lib/src/collation/collation_stub_4x.dart b/pkgs/intl4x/lib/src/collation/collation_stub_4x.dart new file mode 100644 index 00000000..3fec53d7 --- /dev/null +++ b/pkgs/intl4x/lib/src/collation/collation_stub_4x.dart @@ -0,0 +1,13 @@ +// Copyright (c) 2023, 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 '../../collation.dart'; +import '../data.dart'; +import '../locale/locale.dart'; +import 'collation_impl.dart'; + +/// Stub for the conditional import +CollationImpl getCollator4X( + Locale locale, Data data, CollationOptions options) => + throw UnimplementedError('Cannot use ECMA outside of web environments.'); diff --git a/pkgs/intl4x/lib/src/data.dart b/pkgs/intl4x/lib/src/data.dart index cebdaa6a..dc812315 100644 --- a/pkgs/intl4x/lib/src/data.dart +++ b/pkgs/intl4x/lib/src/data.dart @@ -1,20 +1,21 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2024, 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:typed_data'; - -/// Placeholder for the data type of ICU4X - tbd! -abstract final class Data {} +sealed class Data { + const Data(); +} -final class JsonData extends Data { - final String value; +final class AssetData extends Data { + final String key; - JsonData(this.value); + const AssetData(this.key); } -final class BlobData extends Data { - final Uint8List value; +final class BundleData extends Data { + const BundleData(); +} - BlobData(this.value); +final class NoData extends Data { + const NoData(); } diff --git a/pkgs/intl4x/lib/src/data_4x.dart b/pkgs/intl4x/lib/src/data_4x.dart new file mode 100644 index 00000000..469e98b1 --- /dev/null +++ b/pkgs/intl4x/lib/src/data_4x.dart @@ -0,0 +1,16 @@ +// Copyright (c) 2024, 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:io'; +import 'bindings/lib.g.dart' as icu; +import 'data.dart'; + +extension DataProvider on Data { + icu.DataProvider to4X() => switch (this) { + AssetData() => icu.DataProvider.fromByteSlice( + File((this as AssetData).key).readAsBytesSync().buffer), + BundleData() => icu.DataProvider.compiled(), + NoData() => icu.DataProvider.empty(), + }; +} diff --git a/pkgs/intl4x/lib/src/datetime_format/datetime_format.dart b/pkgs/intl4x/lib/src/datetime_format/datetime_format.dart index 0110cea4..2fd4dc95 100644 --- a/pkgs/intl4x/lib/src/datetime_format/datetime_format.dart +++ b/pkgs/intl4x/lib/src/datetime_format/datetime_format.dart @@ -4,7 +4,6 @@ import '../test_checker.dart'; import 'datetime_format_impl.dart'; -import 'datetime_format_options.dart'; /// `DateTime` formatting, for example: /// @@ -20,16 +19,15 @@ import 'datetime_format_options.dart'; /// .format(date); // Output: '4 mat.' /// ``` class DateTimeFormat { - final DateTimeFormatOptions _options; final DateTimeFormatImpl impl; - DateTimeFormat(this._options, this.impl); + DateTimeFormat(this.impl); String format(DateTime datetime) { if (isInTest) { return '$datetime//${impl.locale}'; } else { - return impl.formatImpl(datetime, _options); + return impl.formatImpl(datetime); } } } diff --git a/pkgs/intl4x/lib/src/datetime_format/datetime_format_4x.dart b/pkgs/intl4x/lib/src/datetime_format/datetime_format_4x.dart index 777a352d..f9e3f629 100644 --- a/pkgs/intl4x/lib/src/datetime_format/datetime_format_4x.dart +++ b/pkgs/intl4x/lib/src/datetime_format/datetime_format_4x.dart @@ -2,18 +2,23 @@ // 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 '../data.dart'; import '../locale/locale.dart'; import 'datetime_format_impl.dart'; import 'datetime_format_options.dart'; -DateTimeFormatImpl getDateTimeFormatter4X(Locale locale) => - DateTimeFormat4X(locale); +DateTimeFormatImpl getDateTimeFormatter4X( + Locale locale, + Data data, + DateTimeFormatOptions options, +) => + DateTimeFormat4X(locale, data, options); class DateTimeFormat4X extends DateTimeFormatImpl { - DateTimeFormat4X(super.locale); + DateTimeFormat4X(super.locale, Data data, super.options); @override - String formatImpl(DateTime datetime, DateTimeFormatOptions options) { + String formatImpl(DateTime datetime) { throw UnimplementedError('Insert diplomat bindings here'); } } diff --git a/pkgs/intl4x/lib/src/datetime_format/datetime_format_ecma.dart b/pkgs/intl4x/lib/src/datetime_format/datetime_format_ecma.dart index 892d584b..8fbabc21 100644 --- a/pkgs/intl4x/lib/src/datetime_format/datetime_format_ecma.dart +++ b/pkgs/intl4x/lib/src/datetime_format/datetime_format_ecma.dart @@ -12,9 +12,10 @@ import 'datetime_format_options.dart'; DateTimeFormatImpl? getDateTimeFormatterECMA( Locale locale, + DateTimeFormatOptions options, LocaleMatcher localeMatcher, ) => - _DateTimeFormatECMA.tryToBuild(locale, localeMatcher); + _DateTimeFormatECMA.tryToBuild(locale, options, localeMatcher); @JS('Intl.DateTimeFormat') class _DateTimeFormatJS { @@ -56,15 +57,16 @@ external int UTC( ); class _DateTimeFormatECMA extends DateTimeFormatImpl { - _DateTimeFormatECMA(super.locale); + _DateTimeFormatECMA(super.locale, super.options); static DateTimeFormatImpl? tryToBuild( Locale locale, + DateTimeFormatOptions options, LocaleMatcher localeMatcher, ) { final supportedLocales = supportedLocalesOf(localeMatcher, locale); return supportedLocales.isNotEmpty - ? _DateTimeFormatECMA(supportedLocales.first) + ? _DateTimeFormatECMA(supportedLocales.first, options) : null; //TODO: Add support to force return an instance instead of null. } @@ -74,14 +76,15 @@ class _DateTimeFormatECMA extends DateTimeFormatImpl { ) { final o = newObject(); setProperty(o, 'localeMatcher', localeMatcher.jsName); - return List.from(_supportedLocalesOfJS([locale.toLanguageTag()], o)) + return List.from( + _supportedLocalesOfJS([locale.toLanguageTag()], o)) .whereType() .map(Locale.parse) .toList(); } @override - String formatImpl(DateTime datetime, DateTimeFormatOptions options) { + String formatImpl(DateTime datetime) { final datetimeFormatJS = _DateTimeFormatJS( [locale.toLanguageTag()], options.toJsOptions(), diff --git a/pkgs/intl4x/lib/src/datetime_format/datetime_format_impl.dart b/pkgs/intl4x/lib/src/datetime_format/datetime_format_impl.dart index 23851aa2..f6bbb4b7 100644 --- a/pkgs/intl4x/lib/src/datetime_format/datetime_format_impl.dart +++ b/pkgs/intl4x/lib/src/datetime_format/datetime_format_impl.dart @@ -2,6 +2,7 @@ // 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 '../data.dart'; import '../ecma/ecma_policy.dart'; import '../locale/locale.dart'; import '../options.dart'; @@ -15,18 +16,23 @@ import 'datetime_format_stub.dart' /// datetime formatting. abstract class DateTimeFormatImpl { final Locale locale; + final DateTimeFormatOptions options; - DateTimeFormatImpl(this.locale); + DateTimeFormatImpl(this.locale, this.options); - String formatImpl(DateTime datetime, DateTimeFormatOptions options); + String formatImpl(DateTime datetime); factory DateTimeFormatImpl.build( Locale locale, + Data data, + DateTimeFormatOptions options, LocaleMatcher localeMatcher, EcmaPolicy ecmaPolicy, ) => buildFormatter( locale, + data, + options, localeMatcher, ecmaPolicy, getDateTimeFormatterECMA, diff --git a/pkgs/intl4x/lib/src/datetime_format/datetime_format_stub.dart b/pkgs/intl4x/lib/src/datetime_format/datetime_format_stub.dart index ab88d7cc..00877f24 100644 --- a/pkgs/intl4x/lib/src/datetime_format/datetime_format_stub.dart +++ b/pkgs/intl4x/lib/src/datetime_format/datetime_format_stub.dart @@ -2,12 +2,13 @@ // 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 '../../datetime_format.dart'; import '../locale/locale.dart'; -import '../options.dart'; import 'datetime_format_impl.dart'; DateTimeFormatImpl? getDateTimeFormatterECMA( Locale locales, + DateTimeFormatOptions options, LocaleMatcher localeMatcher, ) => throw UnimplementedError('Cannot use ECMA outside of web environments.'); diff --git a/pkgs/intl4x/lib/src/display_names/display_names.dart b/pkgs/intl4x/lib/src/display_names/display_names.dart index 09d82e1c..c84f2a11 100644 --- a/pkgs/intl4x/lib/src/display_names/display_names.dart +++ b/pkgs/intl4x/lib/src/display_names/display_names.dart @@ -8,10 +8,9 @@ import '../test_checker.dart'; import 'display_names_impl.dart'; class DisplayNames { - final DisplayNamesOptions _options; final DisplayNamesImpl _impl; - DisplayNames(this._options, this._impl); + DisplayNames(this._impl); String ofDateTime(DateTimeField field) => _of(field, _impl.ofDateTime); @@ -27,12 +26,12 @@ class DisplayNames { String _of( T object, - String Function(T field, DisplayNamesOptions options) implementation, + String Function(T field) implementation, ) { if (isInTest) { return '$object//${_impl.locale}'; } else { - return implementation(object, _options); + return implementation(object); } } } diff --git a/pkgs/intl4x/lib/src/display_names/display_names_4x.dart b/pkgs/intl4x/lib/src/display_names/display_names_4x.dart index 54fc6b6b..988ec30b 100644 --- a/pkgs/intl4x/lib/src/display_names/display_names_4x.dart +++ b/pkgs/intl4x/lib/src/display_names/display_names_4x.dart @@ -2,43 +2,49 @@ // 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 '../data.dart'; import '../locale/locale.dart'; import '../options.dart'; import 'display_names_impl.dart'; import 'display_names_options.dart'; -DisplayNamesImpl getDisplayNames4X(Locale locale) => DisplayNames4X(locale); +DisplayNamesImpl getDisplayNames4X( + Locale locale, + Data data, + DisplayNamesOptions options, +) => + DisplayNames4X(locale, data, options); class DisplayNames4X extends DisplayNamesImpl { - DisplayNames4X(super.locale); + DisplayNames4X(super.locale, Data data, super.options); @override - String ofCalendar(Calendar calendar, DisplayNamesOptions options) { + String ofCalendar(Calendar calendar) { throw UnimplementedError('Insert diplomat bindings here'); } @override - String ofCurrency(String currencyCode, DisplayNamesOptions options) { + String ofCurrency(String currencyCode) { throw UnimplementedError('Insert diplomat bindings here'); } @override - String ofDateTime(DateTimeField field, DisplayNamesOptions options) { + String ofDateTime(DateTimeField field) { throw UnimplementedError('Insert diplomat bindings here'); } @override - String ofLanguage(Locale locale, DisplayNamesOptions options) { + String ofLanguage(Locale locale) { throw UnimplementedError('Insert diplomat bindings here'); } @override - String ofRegion(String regionCode, DisplayNamesOptions options) { + String ofRegion(String regionCode) { throw UnimplementedError('Insert diplomat bindings here'); } @override - String ofScript(String scriptCode, DisplayNamesOptions options) { + String ofScript(String scriptCode) { throw UnimplementedError('Insert diplomat bindings here'); } } diff --git a/pkgs/intl4x/lib/src/display_names/display_names_ecma.dart b/pkgs/intl4x/lib/src/display_names/display_names_ecma.dart index 04ca7006..55693e71 100644 --- a/pkgs/intl4x/lib/src/display_names/display_names_ecma.dart +++ b/pkgs/intl4x/lib/src/display_names/display_names_ecma.dart @@ -12,9 +12,10 @@ import 'display_names_options.dart'; DisplayNamesImpl? getDisplayNamesECMA( Locale locale, + DisplayNamesOptions options, LocaleMatcher localeMatcher, ) => - _DisplayNamesECMA.tryToBuild(locale, localeMatcher); + _DisplayNamesECMA.tryToBuild(locale, options, localeMatcher); @JS('Intl.DisplayNames') class _DisplayNamesJS { @@ -29,15 +30,16 @@ external List _supportedLocalesOfJS( ]); class _DisplayNamesECMA extends DisplayNamesImpl { - _DisplayNamesECMA(super.locale); + _DisplayNamesECMA(super.locale, super.options); static DisplayNamesImpl? tryToBuild( Locale locale, + DisplayNamesOptions options, LocaleMatcher localeMatcher, ) { final supportedLocales = supportedLocalesOf(localeMatcher, locale); return supportedLocales.isNotEmpty - ? _DisplayNamesECMA(supportedLocales.first) + ? _DisplayNamesECMA(supportedLocales.first, options) : null; //TODO: Add support to force return an instance instead of null. } @@ -47,7 +49,8 @@ class _DisplayNamesECMA extends DisplayNamesImpl { ) { final o = newObject(); setProperty(o, 'localeMatcher', localeMatcher.jsName); - return List.from(_supportedLocalesOfJS([locale.toLanguageTag()], o)) + return List.from( + _supportedLocalesOfJS([locale.toLanguageTag()], o)) .whereType() .map(Locale.parse) .toList(); @@ -62,27 +65,27 @@ class _DisplayNamesECMA extends DisplayNamesImpl { } @override - String ofCalendar(Calendar calendar, DisplayNamesOptions options) => + String ofCalendar(Calendar calendar) => of(options, DisplayType.calendar, calendar.jsName); @override - String ofCurrency(String currencyCode, DisplayNamesOptions options) => + String ofCurrency(String currencyCode) => of(options, DisplayType.currency, currencyCode); @override - String ofDateTime(DateTimeField field, DisplayNamesOptions options) => + String ofDateTime(DateTimeField field) => of(options, DisplayType.dateTimeField, field.name); @override - String ofLanguage(Locale locale, DisplayNamesOptions options) => + String ofLanguage(Locale locale) => of(options, DisplayType.language, locale.toLanguageTag()); @override - String ofRegion(String regionCode, DisplayNamesOptions options) => + String ofRegion(String regionCode) => of(options, DisplayType.region, regionCode); @override - String ofScript(String scriptCode, DisplayNamesOptions options) => + String ofScript(String scriptCode) => of(options, DisplayType.script, scriptCode); } diff --git a/pkgs/intl4x/lib/src/display_names/display_names_impl.dart b/pkgs/intl4x/lib/src/display_names/display_names_impl.dart index 61f465a5..49eb1528 100644 --- a/pkgs/intl4x/lib/src/display_names/display_names_impl.dart +++ b/pkgs/intl4x/lib/src/display_names/display_names_impl.dart @@ -2,6 +2,7 @@ // 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 '../data.dart'; import '../ecma/ecma_policy.dart'; import '../locale/locale.dart'; import '../options.dart'; @@ -14,28 +15,33 @@ import 'display_names_stub.dart' if (dart.library.js) 'display_names_ecma.dart'; /// Display naming. abstract class DisplayNamesImpl { final Locale locale; + final DisplayNamesOptions options; - DisplayNamesImpl(this.locale); + DisplayNamesImpl(this.locale, this.options); - String ofDateTime(DateTimeField field, DisplayNamesOptions options); + String ofDateTime(DateTimeField field); - String ofLanguage(Locale locale, DisplayNamesOptions options); + String ofLanguage(Locale locale); - String ofRegion(String regionCode, DisplayNamesOptions options); + String ofRegion(String regionCode); - String ofScript(String scriptCode, DisplayNamesOptions options); + String ofScript(String scriptCode); - String ofCurrency(String currencyCode, DisplayNamesOptions options); + String ofCurrency(String currencyCode); - String ofCalendar(Calendar calendar, DisplayNamesOptions options); + String ofCalendar(Calendar calendar); factory DisplayNamesImpl.build( Locale locale, + Data data, + DisplayNamesOptions options, LocaleMatcher localeMatcher, EcmaPolicy ecmaPolicy, ) => buildFormatter( locale, + data, + options, localeMatcher, ecmaPolicy, getDisplayNamesECMA, diff --git a/pkgs/intl4x/lib/src/display_names/display_names_stub.dart b/pkgs/intl4x/lib/src/display_names/display_names_stub.dart index 443b627e..1f0188d6 100644 --- a/pkgs/intl4x/lib/src/display_names/display_names_stub.dart +++ b/pkgs/intl4x/lib/src/display_names/display_names_stub.dart @@ -2,12 +2,13 @@ // 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 '../../display_names.dart'; import '../locale/locale.dart'; -import '../options.dart'; import 'display_names_impl.dart'; DisplayNamesImpl? getDisplayNamesECMA( Locale locales, + DisplayNamesOptions options, LocaleMatcher localeMatcher, ) => throw UnimplementedError('Cannot use ECMA outside of web environments.'); diff --git a/pkgs/intl4x/lib/src/list_format/list_format.dart b/pkgs/intl4x/lib/src/list_format/list_format.dart index aaadadf7..1f68177f 100644 --- a/pkgs/intl4x/lib/src/list_format/list_format.dart +++ b/pkgs/intl4x/lib/src/list_format/list_format.dart @@ -4,13 +4,11 @@ import '../test_checker.dart'; import 'list_format_impl.dart'; -import 'list_format_options.dart'; class ListFormat { - final ListFormatOptions _options; final ListFormatImpl _listFormatImpl; - const ListFormat(this._options, this._listFormatImpl); + const ListFormat(this._listFormatImpl); /// Locale-dependant concatenation of lists, for example in `en-US` locale: /// ```dart @@ -20,7 +18,7 @@ class ListFormat { if (isInTest) { return '${list.join(', ')}//${_listFormatImpl.locale}'; } else { - return _listFormatImpl.formatImpl(list, _options); + return _listFormatImpl.formatImpl(list); } } } diff --git a/pkgs/intl4x/lib/src/list_format/list_format_4x.dart b/pkgs/intl4x/lib/src/list_format/list_format_4x.dart index d9af40d4..777a02bb 100644 --- a/pkgs/intl4x/lib/src/list_format/list_format_4x.dart +++ b/pkgs/intl4x/lib/src/list_format/list_format_4x.dart @@ -2,17 +2,20 @@ // 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 '../data.dart'; import '../locale/locale.dart'; import 'list_format_impl.dart'; import 'list_format_options.dart'; -ListFormatImpl getListFormatter4X(Locale locale) => ListFormat4X(locale); +ListFormatImpl getListFormatter4X( + Locale locale, Data data, ListFormatOptions options) => + ListFormat4X(locale, data, options); class ListFormat4X extends ListFormatImpl { - ListFormat4X(super.locale); + ListFormat4X(super.locale, Data data, super.options); @override - String formatImpl(List list, ListFormatOptions options) { + String formatImpl(List list) { throw UnimplementedError('Insert diplomat bindings here'); } } diff --git a/pkgs/intl4x/lib/src/list_format/list_format_ecma.dart b/pkgs/intl4x/lib/src/list_format/list_format_ecma.dart index 8dbe2e26..434e1a26 100644 --- a/pkgs/intl4x/lib/src/list_format/list_format_ecma.dart +++ b/pkgs/intl4x/lib/src/list_format/list_format_ecma.dart @@ -12,9 +12,10 @@ import 'list_format_options.dart'; ListFormatImpl? getListFormatterECMA( Locale locale, + ListFormatOptions options, LocaleMatcher localeMatcher, ) => - _ListFormatECMA.tryToBuild(locale, localeMatcher); + _ListFormatECMA.tryToBuild(locale, options, localeMatcher); @JS('Intl.ListFormat') class ListFormatJS { @@ -29,15 +30,16 @@ external List supportedLocalesOfJS( ]); class _ListFormatECMA extends ListFormatImpl { - _ListFormatECMA(super.locales); + _ListFormatECMA(super.locale, super.options); static ListFormatImpl? tryToBuild( Locale locale, + ListFormatOptions options, LocaleMatcher localeMatcher, ) { final supportedLocales = supportedLocalesOf(locale, localeMatcher); return supportedLocales.isNotEmpty - ? _ListFormatECMA(supportedLocales.first) + ? _ListFormatECMA(supportedLocales.first, options) : null; } @@ -47,14 +49,14 @@ class _ListFormatECMA extends ListFormatImpl { ) { final o = newObject(); setProperty(o, 'localeMatcher', localeMatcher.jsName); - return List.from(supportedLocalesOfJS([locale.toLanguageTag()], o)) + return List.from(supportedLocalesOfJS([locale.toLanguageTag()], o)) .whereType() .map(Locale.parse) .toList(); } @override - String formatImpl(List list, ListFormatOptions options) { + String formatImpl(List list) { return ListFormatJS([locale.toLanguageTag()], options.toJsOptions()) .format(list); } diff --git a/pkgs/intl4x/lib/src/list_format/list_format_impl.dart b/pkgs/intl4x/lib/src/list_format/list_format_impl.dart index f548df0a..941e7281 100644 --- a/pkgs/intl4x/lib/src/list_format/list_format_impl.dart +++ b/pkgs/intl4x/lib/src/list_format/list_format_impl.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import '../../ecma_policy.dart'; +import '../data.dart'; import '../ecma/ecma_policy.dart'; import '../locale/locale.dart'; import '../options.dart'; @@ -13,18 +14,23 @@ import 'list_format_stub.dart' if (dart.library.js) 'list_format_ecma.dart'; abstract class ListFormatImpl { final Locale locale; + final ListFormatOptions options; - ListFormatImpl(this.locale); + ListFormatImpl(this.locale, this.options); - String formatImpl(List list, ListFormatOptions options); + String formatImpl(List list); factory ListFormatImpl.build( Locale locales, + Data data, + ListFormatOptions options, LocaleMatcher localeMatcher, EcmaPolicy ecmaPolicy, ) => buildFormatter( locales, + data, + options, localeMatcher, ecmaPolicy, getListFormatterECMA, diff --git a/pkgs/intl4x/lib/src/list_format/list_format_stub.dart b/pkgs/intl4x/lib/src/list_format/list_format_stub.dart index 7c1bfb82..923d4374 100644 --- a/pkgs/intl4x/lib/src/list_format/list_format_stub.dart +++ b/pkgs/intl4x/lib/src/list_format/list_format_stub.dart @@ -2,12 +2,13 @@ // 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 '../../list_format.dart'; import '../locale/locale.dart'; -import '../options.dart'; import 'list_format_impl.dart'; ListFormatImpl? getListFormatterECMA( Locale locale, + ListFormatOptions options, LocaleMatcher localeMatcher, ) => throw UnimplementedError('Cannot use ECMA outside of web environments.'); diff --git a/pkgs/intl4x/lib/src/locale/locale_4x.dart b/pkgs/intl4x/lib/src/locale/locale_4x.dart new file mode 100644 index 00000000..f496b2a2 --- /dev/null +++ b/pkgs/intl4x/lib/src/locale/locale_4x.dart @@ -0,0 +1,16 @@ +// Copyright (c) 2024, 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 '../bindings/lib.g.dart' as icu; + +import 'locale.dart'; + +extension Locale4X on Locale { + icu.Locale to4X() { + final icu4xLocale = icu.Locale.und()..language = language; + if (region != null) icu4xLocale.region = region!; + if (script != null) icu4xLocale.script = script!; + return icu4xLocale; + } +} diff --git a/pkgs/intl4x/lib/src/number_format/number_format.dart b/pkgs/intl4x/lib/src/number_format/number_format.dart index 4a081245..33076e0a 100644 --- a/pkgs/intl4x/lib/src/number_format/number_format.dart +++ b/pkgs/intl4x/lib/src/number_format/number_format.dart @@ -4,19 +4,17 @@ import '../test_checker.dart'; import 'number_format_impl.dart'; -import 'number_format_options.dart'; class NumberFormat { - final NumberFormatOptions _options; final NumberFormatImpl impl; - NumberFormat(this._options, this.impl); + NumberFormat(this.impl); String format(Object number) { if (isInTest) { return '$number//${impl.locale}'; } else { - return impl.formatImpl(number, _options); + return impl.formatImpl(number); } } } diff --git a/pkgs/intl4x/lib/src/number_format/number_format_4x.dart b/pkgs/intl4x/lib/src/number_format/number_format_4x.dart index 0ac95ad8..f42863e6 100644 --- a/pkgs/intl4x/lib/src/number_format/number_format_4x.dart +++ b/pkgs/intl4x/lib/src/number_format/number_format_4x.dart @@ -2,17 +2,20 @@ // 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 '../data.dart'; import '../locale/locale.dart'; import 'number_format_impl.dart'; import 'number_format_options.dart'; -NumberFormatImpl getNumberFormatter4X(Locale locale) => NumberFormat4X(locale); +NumberFormatImpl getNumberFormatter4X( + Locale locale, Data data, NumberFormatOptions options) => + NumberFormat4X(locale, data, options); class NumberFormat4X extends NumberFormatImpl { - NumberFormat4X(super.locale); + NumberFormat4X(super.locale, Data data, super.options); @override - String formatImpl(Object number, NumberFormatOptions options) { + String formatImpl(Object number) { throw UnimplementedError('Insert diplomat bindings here'); } } diff --git a/pkgs/intl4x/lib/src/number_format/number_format_ecma.dart b/pkgs/intl4x/lib/src/number_format/number_format_ecma.dart index a9df368f..bad52b66 100644 --- a/pkgs/intl4x/lib/src/number_format/number_format_ecma.dart +++ b/pkgs/intl4x/lib/src/number_format/number_format_ecma.dart @@ -12,9 +12,10 @@ import 'number_format_options.dart'; NumberFormatImpl? getNumberFormatterECMA( Locale locale, + NumberFormatOptions options, LocaleMatcher localeMatcher, ) => - _NumberFormatECMA.tryToBuild(locale, localeMatcher); + _NumberFormatECMA.tryToBuild(locale, options, localeMatcher); @JS('Intl.NumberFormat') class _NumberFormatJS { @@ -29,16 +30,17 @@ external List _supportedLocalesOfJS( ]); class _NumberFormatECMA extends NumberFormatImpl { - _NumberFormatECMA(super.locales); + _NumberFormatECMA(super.locale, super.options); static NumberFormatImpl? tryToBuild( Locale locale, + NumberFormatOptions options, LocaleMatcher localeMatcher, ) { final supportedLocales = supportedLocalesOf(localeMatcher, locale); return supportedLocales.isNotEmpty - ? _NumberFormatECMA(supportedLocales.first) - : _NumberFormatECMA(const Locale(language: 'en')); + ? _NumberFormatECMA(supportedLocales.first, options) + : _NumberFormatECMA(const Locale(language: 'en'), options); } static List supportedLocalesOf( @@ -47,14 +49,15 @@ class _NumberFormatECMA extends NumberFormatImpl { ) { final o = newObject(); setProperty(o, 'localeMatcher', localeMatcher.jsName); - return List.from(_supportedLocalesOfJS([locale.toLanguageTag()], o)) + return List.from( + _supportedLocalesOfJS([locale.toLanguageTag()], o)) .whereType() .map(Locale.parse) .toList(); } @override - String formatImpl(Object number, NumberFormatOptions options) { + String formatImpl(Object number) { final numberFormatJS = _NumberFormatJS( [locale.toLanguageTag()], options.toJsOptions(), diff --git a/pkgs/intl4x/lib/src/number_format/number_format_impl.dart b/pkgs/intl4x/lib/src/number_format/number_format_impl.dart index 23622211..3ed53876 100644 --- a/pkgs/intl4x/lib/src/number_format/number_format_impl.dart +++ b/pkgs/intl4x/lib/src/number_format/number_format_impl.dart @@ -2,6 +2,7 @@ // 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 '../data.dart'; import '../ecma/ecma_policy.dart'; import '../locale/locale.dart'; import '../options.dart'; @@ -14,18 +15,23 @@ import 'number_format_stub.dart' if (dart.library.js) 'number_format_ecma.dart'; /// Number formatting. abstract class NumberFormatImpl { final Locale locale; + final NumberFormatOptions options; - NumberFormatImpl(this.locale); + NumberFormatImpl(this.locale, this.options); - String formatImpl(Object number, NumberFormatOptions options); + String formatImpl(Object number); factory NumberFormatImpl.build( Locale locale, + Data data, + NumberFormatOptions options, LocaleMatcher localeMatcher, EcmaPolicy ecmaPolicy, ) => buildFormatter( locale, + data, + options, localeMatcher, ecmaPolicy, getNumberFormatterECMA, diff --git a/pkgs/intl4x/lib/src/number_format/number_format_stub.dart b/pkgs/intl4x/lib/src/number_format/number_format_stub.dart index b47366d6..0f7404c9 100644 --- a/pkgs/intl4x/lib/src/number_format/number_format_stub.dart +++ b/pkgs/intl4x/lib/src/number_format/number_format_stub.dart @@ -2,12 +2,14 @@ // 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 '../../list_format.dart'; import '../locale/locale.dart'; -import '../options.dart'; import 'number_format_impl.dart'; +import 'number_format_options.dart'; NumberFormatImpl? getNumberFormatterECMA( - Locale locales, + Locale locale, + NumberFormatOptions options, LocaleMatcher localeMatcher, ) => throw UnimplementedError('Cannot use ECMA outside of web environments.'); diff --git a/pkgs/intl4x/lib/src/plural_rules/plural_rules.dart b/pkgs/intl4x/lib/src/plural_rules/plural_rules.dart index ed2f1d67..7676ae82 100644 --- a/pkgs/intl4x/lib/src/plural_rules/plural_rules.dart +++ b/pkgs/intl4x/lib/src/plural_rules/plural_rules.dart @@ -4,13 +4,11 @@ import '../test_checker.dart'; import 'plural_rules_impl.dart'; -import 'plural_rules_options.dart'; class PluralRules { - final PluralRulesOptions _options; final PluralRulesImpl _pluralRulesImpl; - const PluralRules(this._options, this._pluralRulesImpl); + const PluralRules(this._pluralRulesImpl); /// Locale-dependant pluralization, for example in English: /// @@ -19,7 +17,7 @@ class PluralRules { if (isInTest) { return PluralCategory.other; } else { - return _pluralRulesImpl.selectImpl(number, _options); + return _pluralRulesImpl.selectImpl(number); } } } diff --git a/pkgs/intl4x/lib/src/plural_rules/plural_rules_4x.dart b/pkgs/intl4x/lib/src/plural_rules/plural_rules_4x.dart index 750f6350..b1852795 100644 --- a/pkgs/intl4x/lib/src/plural_rules/plural_rules_4x.dart +++ b/pkgs/intl4x/lib/src/plural_rules/plural_rules_4x.dart @@ -2,18 +2,24 @@ // 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 '../data.dart'; import '../locale/locale.dart'; import 'plural_rules.dart'; import 'plural_rules_impl.dart'; import 'plural_rules_options.dart'; -PluralRulesImpl getPluralSelect4X(Locale locale) => PluralRules4X(locale); +PluralRulesImpl getPluralSelect4X( + Locale locale, + Data data, + PluralRulesOptions options, +) => + PluralRules4X(locale, data, options); class PluralRules4X extends PluralRulesImpl { - PluralRules4X(super.locale); + PluralRules4X(super.locale, Data data, super.options); @override - PluralCategory selectImpl(num number, PluralRulesOptions options) { + PluralCategory selectImpl(num number) { throw UnimplementedError('Insert diplomat bindings here'); } } diff --git a/pkgs/intl4x/lib/src/plural_rules/plural_rules_ecma.dart b/pkgs/intl4x/lib/src/plural_rules/plural_rules_ecma.dart index c81b66a7..7a909536 100644 --- a/pkgs/intl4x/lib/src/plural_rules/plural_rules_ecma.dart +++ b/pkgs/intl4x/lib/src/plural_rules/plural_rules_ecma.dart @@ -13,9 +13,10 @@ import 'plural_rules_options.dart'; PluralRulesImpl? getPluralSelectECMA( Locale locale, + PluralRulesOptions options, LocaleMatcher localeMatcher, ) => - _PluralRulesECMA.tryToBuild(locale, localeMatcher); + _PluralRulesECMA.tryToBuild(locale, options, localeMatcher); @JS('Intl.PluralRules') class PluralRulesJS { @@ -30,15 +31,16 @@ external List supportedLocalesOfJS( ]); class _PluralRulesECMA extends PluralRulesImpl { - _PluralRulesECMA(super.locales); + _PluralRulesECMA(super.locale, super.options); static PluralRulesImpl? tryToBuild( Locale locale, + PluralRulesOptions options, LocaleMatcher localeMatcher, ) { final supportedLocales = supportedLocalesOf(locale, localeMatcher); return supportedLocales.isNotEmpty - ? _PluralRulesECMA(supportedLocales.first) + ? _PluralRulesECMA(supportedLocales.first, options) : null; } @@ -48,14 +50,14 @@ class _PluralRulesECMA extends PluralRulesImpl { ) { final o = newObject(); setProperty(o, 'localeMatcher', localeMatcher.jsName); - return List.from(supportedLocalesOfJS([locale.toLanguageTag()], o)) + return List.from(supportedLocalesOfJS([locale.toLanguageTag()], o)) .whereType() .map(Locale.parse) .toList(); } @override - PluralCategory selectImpl(num number, PluralRulesOptions options) { + PluralCategory selectImpl(num number) { final categoryString = PluralRulesJS([locale.toLanguageTag()], options.toJsOptions()) .select(number); diff --git a/pkgs/intl4x/lib/src/plural_rules/plural_rules_impl.dart b/pkgs/intl4x/lib/src/plural_rules/plural_rules_impl.dart index b428fa1f..41d1121d 100644 --- a/pkgs/intl4x/lib/src/plural_rules/plural_rules_impl.dart +++ b/pkgs/intl4x/lib/src/plural_rules/plural_rules_impl.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import '../../ecma_policy.dart'; +import '../data.dart'; import '../ecma/ecma_policy.dart'; import '../locale/locale.dart'; import '../options.dart'; @@ -14,18 +15,23 @@ import 'plural_rules_stub.dart' if (dart.library.js) 'plural_rules_ecma.dart'; abstract class PluralRulesImpl { final Locale locale; + final PluralRulesOptions options; - PluralRulesImpl(this.locale); + PluralRulesImpl(this.locale, this.options); - PluralCategory selectImpl(num number, PluralRulesOptions options); + PluralCategory selectImpl(num number); factory PluralRulesImpl.build( Locale locales, + Data data, + PluralRulesOptions options, LocaleMatcher localeMatcher, EcmaPolicy ecmaPolicy, ) => buildFormatter( locales, + data, + options, localeMatcher, ecmaPolicy, getPluralSelectECMA, diff --git a/pkgs/intl4x/lib/src/plural_rules/plural_rules_stub.dart b/pkgs/intl4x/lib/src/plural_rules/plural_rules_stub.dart index 9704fa1e..0490d727 100644 --- a/pkgs/intl4x/lib/src/plural_rules/plural_rules_stub.dart +++ b/pkgs/intl4x/lib/src/plural_rules/plural_rules_stub.dart @@ -2,12 +2,13 @@ // 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 '../../plural_rules.dart'; import '../locale/locale.dart'; -import '../options.dart'; import 'plural_rules_impl.dart'; PluralRulesImpl? getPluralSelectECMA( Locale locale, + PluralRulesOptions options, LocaleMatcher localeMatcher, ) => throw UnimplementedError('Cannot use ECMA outside of web environments.'); diff --git a/pkgs/intl4x/lib/src/utils.dart b/pkgs/intl4x/lib/src/utils.dart index 6dd04573..5c934912 100644 --- a/pkgs/intl4x/lib/src/utils.dart +++ b/pkgs/intl4x/lib/src/utils.dart @@ -2,20 +2,25 @@ // 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 'data.dart'; import 'ecma/ecma_policy.dart'; import 'locale/locale.dart'; import 'options.dart'; -T buildFormatter( +T buildFormatter( Locale locale, + Data data, + Options options, LocaleMatcher localeMatcher, EcmaPolicy ecmaPolicy, - T? Function(Locale locales, LocaleMatcher localeMatcher) builderECMA, - T Function(Locale locales) builder4X, + T? Function(Locale locales, Options options, LocaleMatcher localeMatcher) + builderECMA, + T Function(Locale locales, Data data, Options options) builder4X, ) { if (ecmaPolicy.useBrowser(locale)) { - return builderECMA(locale, localeMatcher) ?? builder4X(locale); + return builderECMA(locale, options, localeMatcher) ?? + builder4X(locale, data, options); } else { - return builder4X(locale); + return builder4X(locale, data, options); } } diff --git a/pkgs/intl4x/pubspec.yaml b/pkgs/intl4x/pubspec.yaml index 2ceab4a2..6053ec62 100644 --- a/pkgs/intl4x/pubspec.yaml +++ b/pkgs/intl4x/pubspec.yaml @@ -1,22 +1,25 @@ name: intl4x description: >- A lightweight modular library for internationalization (i18n) functionality. -version: 0.7.1 +version: 0.8.0 repository: https://github.com/dart-lang/i18n/tree/main/pkgs/intl4x platforms: ## TODO: Add native platforms once ICU4X is integrated. web: - environment: - sdk: '>=3.0.0 <4.0.0' + sdk: ">=3.0.0 <4.0.0" dependencies: + ffi: ^2.1.0 js: ^0.6.5 - + dev_dependencies: + archive: ^3.4.10 args: ^2.4.2 build_runner: ^2.1.4 build_web_compilers: ^3.2.1 dart_flutter_team_lints: ^1.0.0 lints: ^2.0.0 - test: ^1.22.1 + native_assets_cli: ^0.3.2 + path: ^1.9.0 + test: ^1.22.1 \ No newline at end of file diff --git a/pkgs/intl4x/test/ecma/collation_test.dart b/pkgs/intl4x/test/collation_test.dart similarity index 79% rename from pkgs/intl4x/test/ecma/collation_test.dart rename to pkgs/intl4x/test/collation_test.dart index 4828ce6d..2dfa9e48 100644 --- a/pkgs/intl4x/test/ecma/collation_test.dart +++ b/pkgs/intl4x/test/collation_test.dart @@ -2,22 +2,22 @@ // 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. -@TestOn('browser') -library; - +import 'package:intl4x/collation.dart'; import 'package:intl4x/intl4x.dart'; -import 'package:intl4x/src/collation/collation_options.dart'; import 'package:test/test.dart'; -import '../utils.dart'; +import 'utils.dart'; void main() { - test('Does not compare in tests', () { - final unsorted = ['Z', 'a', 'z', 'ä']; - final collationGerman = - Intl(locale: const Locale(language: 'de', region: 'DE')).collation(); - expect(unsorted..sort(collationGerman.compare), orderedEquals(unsorted)); - }); + test( + 'Does not compare in tests', + () { + final unsorted = ['Z', 'a', 'z', 'ä']; + final collationGerman = + Intl(locale: const Locale(language: 'de', region: 'DE')).collation(); + expect(unsorted..sort(collationGerman.compare), orderedEquals(unsorted)); + }, + ); testWithFormatting('Simple EN', () { final list = ['A', 'B', 'C']; diff --git a/pkgs/intl4x/test/icu4x/collation_test.dart b/pkgs/intl4x/test/icu4x/collation_test.dart deleted file mode 100644 index 55e3b95b..00000000 --- a/pkgs/intl4x/test/icu4x/collation_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2023, 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. - -@TestOn('vm') -library; - -import 'package:intl4x/intl4x.dart'; -import 'package:test/test.dart'; - -import '../utils.dart'; - -void main() { - test('Does not compare in tests', () { - final unsorted = ['Z', 'a', 'z', 'ä']; - final collationGerman = - Intl(locale: const Locale(language: 'de', region: 'DE')).collation(); - expect(unsorted..sort(collationGerman.compare), orderedEquals(unsorted)); - }); - - testWithFormatting('Simple EN', () { - final list = ['A', 'B', 'C']; - final intl = Intl(locale: const Locale(language: 'en', region: 'US')); - final collation = intl.collation(); - expect(() => list..sort(collation.compare), - throwsA(isA())); - }); -} diff --git a/pkgs/messages_shrinker/CHANGELOG.md b/pkgs/messages_shrinker/CHANGELOG.md index 94eac149..7188fc88 100644 --- a/pkgs/messages_shrinker/CHANGELOG.md +++ b/pkgs/messages_shrinker/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.2-wip + +- Add license header. + ## 0.2.1 - Bump dependencies. diff --git a/pkgs/messages_shrinker/bin/messages_shrinker.dart b/pkgs/messages_shrinker/bin/messages_shrinker.dart index 6f5c7cbd..ee6f8bd9 100644 --- a/pkgs/messages_shrinker/bin/messages_shrinker.dart +++ b/pkgs/messages_shrinker/bin/messages_shrinker.dart @@ -1,3 +1,7 @@ +// Copyright (c) 2024, 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:io'; import 'package:args/args.dart'; diff --git a/pkgs/messages_shrinker/pubspec.yaml b/pkgs/messages_shrinker/pubspec.yaml index 8c1e6c96..687776b7 100644 --- a/pkgs/messages_shrinker/pubspec.yaml +++ b/pkgs/messages_shrinker/pubspec.yaml @@ -1,6 +1,6 @@ name: messages_shrinker description: Removing unneeded messages from message data files for package:messages. -version: 0.2.1 +version: 0.2.2-wip repository: https://github.com/dart-lang/i18n/pkgs/messages_shrinker environment: diff --git a/submodules/icu4x b/submodules/icu4x new file mode 160000 index 00000000..af4bbdba --- /dev/null +++ b/submodules/icu4x @@ -0,0 +1 @@ +Subproject commit af4bbdba5f9715726caa75528f8b95440db19948 diff --git a/tools/regenerate_bindings.sh b/tools/regenerate_bindings.sh new file mode 100644 index 00000000..62680783 --- /dev/null +++ b/tools/regenerate_bindings.sh @@ -0,0 +1,3 @@ +rm pkgs/intl4x/lib/src/bindings/* +cd pkgs/intl4x/lib/src/bindings/ +ln -s ../../../../../submodules/icu4x/ffi/capi/bindings/dart/*.dart .