Skip to content

Commit

Permalink
Merge branch 'main' into adaptMessagesExample
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem authored Jul 29, 2024
2 parents e1cfe57 + 8d63e87 commit 9a4d6ca
Show file tree
Hide file tree
Showing 221 changed files with 14,893 additions and 440 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pkgs/intl4x/lib/src/bindings linguist-generated=true
2 changes: 1 addition & 1 deletion .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
run_all:
runs-on: ubuntu-latest
steps:
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: stable

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/intl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run-tests: true
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: ${{matrix.sdk}}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/intl4x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
submodules: true

- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: ${{matrix.sdk}}

Expand Down
46 changes: 24 additions & 22 deletions .github/workflows/intl4x_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ permissions:
on:
push:
tags:
- 'intl4x-v.*'
- 'intl4x-icu*'
schedule:
- cron: '0 0 * * 0' # weekly
workflow_dispatch:

jobs:
dart-libs:
name: "Build Dart binaries"
name: Build Dart binaries
strategy:
fail-fast: false
matrix:
Expand All @@ -21,7 +23,7 @@ jobs:
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
submodules: 'true'
submodules: true

- name: Install Rust toolchains
run: |
Expand All @@ -30,7 +32,7 @@ jobs:
- name: Show the selected Rust toolchain
run: rustup show

- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: dev

Expand Down Expand Up @@ -59,14 +61,14 @@ jobs:
cd ffi/dart
dart pub get
cd ../..
dart run ffi/dart/tool/build_libs.dart bin/android_arm android_arm
dart run ffi/dart/tool/build_libs.dart bin/android_arm64 android_arm64
dart run ffi/dart/tool/build_libs.dart bin/android_ia32 android_ia32
dart run ffi/dart/tool/build_libs.dart bin/android_x64 android_x64
dart run ffi/dart/tool/build_libs.dart bin/linux_arm linux_arm
dart run ffi/dart/tool/build_libs.dart bin/linux_arm64 linux_arm64
dart run ffi/dart/tool/build_libs.dart bin/linux_riscv64 linux_riscv64
dart run ffi/dart/tool/build_libs.dart bin/linux_x64 linux_x64
dart run ffi/dart/tool/build_libs.dart bin/android_arm android_arm dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/android_arm64 android_arm64 dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/android_ia32 android_ia32 dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/android_x64 android_x64 dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/linux_arm linux_arm dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/linux_arm64 linux_arm64 dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/linux_riscv64 linux_riscv64 dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/linux_x64 linux_x64 dynamic default_components,experimental_components
cargo run -p icu_datagen -- --locales full --keys all --format blob --out bin/full.postcard
Expand All @@ -93,11 +95,11 @@ jobs:
cd ffi/dart
dart pub get
cd ../..
dart run ffi/dart/tool/build_libs.dart bin/ios_arm ios_arm
dart run ffi/dart/tool/build_libs.dart bin/ios_arm64 ios_arm64
dart run ffi/dart/tool/build_libs.dart bin/ios_x64 ios_x64
dart run ffi/dart/tool/build_libs.dart bin/macos_arm64 macos_arm64
dart run ffi/dart/tool/build_libs.dart bin/macos_x64 macos_x64
dart run ffi/dart/tool/build_libs.dart bin/ios_arm ios_arm dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/ios_arm64 ios_arm64 dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/ios_x64 ios_x64 dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/macos_arm64 macos_arm64 dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/macos_x64 macos_x64 dynamic default_components,experimental_components
cd provider/datagen # avoid global feature resolution
rustup target add aarch64-apple-darwin
Expand All @@ -119,9 +121,9 @@ jobs:
cd ffi/dart
dart pub get
cd ../..
dart run ffi/dart/tool/build_libs.dart bin/windows_arm64 windows_arm64
dart run ffi/dart/tool/build_libs.dart bin/windows_ia32 windows_ia32
dart run ffi/dart/tool/build_libs.dart bin/windows_x64 windows_x64
dart run ffi/dart/tool/build_libs.dart bin/windows_arm64 windows_arm64 dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/windows_ia32 windows_ia32 dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/windows_x64 windows_x64 dynamic default_components,experimental_components
cd provider/datagen # avoid global feature resolution
rustup target add aarch64-pc-windows-msvc
Expand Down Expand Up @@ -151,8 +153,8 @@ jobs:
run: ls -R

- name: Release
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0
with:
files: '**'
fail_on_unmatched_files: true
body: "Build artifacts for `package:intl4x`, based on ICU4X at ref ${{ env.icu_version }}"
body: "Build artifacts for `package:intl4x`, based on ICU4X at ref ${{ github.ref_name }}"
2 changes: 1 addition & 1 deletion .github/workflows/intl_translation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run-tests: true
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: ${{matrix.sdk}}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: ${{matrix.sdk}}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/messages_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run-tests: true
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: ${{matrix.sdk}}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/messages_serializer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run-tests: true
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: ${{matrix.sdk}}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/messages_shrinker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run-tests: true
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: ${{matrix.sdk}}

Expand Down
5 changes: 3 additions & 2 deletions pkgs/intl/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
## 0.20.0-wip
* Fix caching of messages in CompositeMessageLookup
* Fix caching of messages in `CompositeMessageLookup`.
* Type `numberFormatSymbols` as a `Map<String, NumberSymbols>`.
* Type `dateTimeSymbolMap` as a `Map<String, DateSymbols>`.
* Add example for pub.dev.
* Fix issues with AM/PM markers.
* Update to CLDR v44.1.
* Require Dart `^3.3`
* Require `package:web` `^0.5.0`.
* Support compiling to WASM
* Support compiling to WASM.
* Update to and account for `package:lints` `^4.0.0`.

## 0.19.0
* Update to CLDR v44.
Expand Down
1 change: 1 addition & 0 deletions pkgs/intl/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ linter:
- directives_ordering
- prefer_single_quotes
- sort_pub_dependencies
- unnecessary_library_directive
- unnecessary_parenthesis

# These are works in progress.
Expand Down
2 changes: 1 addition & 1 deletion pkgs/intl/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ dependencies:
path: ../

dev_dependencies:
lints: ^3.0.0
lints: ^4.0.0
2 changes: 2 additions & 0 deletions pkgs/intl/lib/date_symbol_data_custom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
/// API to allow setting Date/Time formatting in a custom way.
///
/// It does not actually provide any data - that's left to the user of the API.
library;

import 'date_symbols.dart';
import 'src/date_format_internal.dart';

Expand Down
3 changes: 1 addition & 2 deletions pkgs/intl/lib/date_symbol_data_file.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

/// This file should be imported, along with date_format.dart in order to read
/// locale data from files in the file system.
library date_symbol_data_file;
library;

import 'package:path/path.dart' as path;

Expand Down
4 changes: 2 additions & 2 deletions pkgs/intl/lib/date_symbol_data_http_request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.

/// This file should be imported, along with date_format.dart in order to read
/// locale data via http requests to a web server..
library date_symbol_data_http_request;
/// locale data via http requests to a web server.
library;

import 'date_symbols.dart';
import 'intl.dart';
Expand Down
21 changes: 10 additions & 11 deletions pkgs/intl/lib/date_symbol_data_local.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@
// BSD-style license that can be found in the LICENSE file.

/// Date/time formatting symbols for all locales.
///
/// DO NOT EDIT. This file is autogenerated by script. See
/// 'http://go/generate_datetime_constants.py' using the --for_dart
/// flag.
/// File generated from CLDR ver. 44.1
///
/// Before checkin, this file could have been manually edited. This is
/// to incorporate changes before we could correct CLDR. All manual
/// modification must be documented in this section, and should be
/// removed after those changes land to CLDR.
// DO NOT EDIT. This file is autogenerated by script. See
// 'http://go/generate_datetime_constants.py' using the --for_dart
// flag.
// File generated from CLDR ver. 44.1
//
// Before checkin, this file could have been manually edited. This is
// to incorporate changes before we could correct CLDR. All manual
// modification must be documented in this section, and should be
// removed after those changes land to CLDR.
library;

// MANUAL EDIT TO SUPPRESS WARNINGS IN GENERATED CODE
// ignore_for_file: unnecessary_new, prefer_single_quotes, directives_ordering
library date_symbol_data_local;

import "date_symbols.dart";
import "date_time_patterns.dart";
Expand Down
1 change: 0 additions & 1 deletion pkgs/intl/lib/date_symbols.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library date_symbols;

// Suppress naming lints, as changes would be breaking.
// ignore_for_file: non_constant_identifier_names
Expand Down
10 changes: 4 additions & 6 deletions pkgs/intl/lib/date_time_patterns.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
// BSD-style license that can be found in the LICENSE file.

/// Date/time formatting symbols for a large subset of locales.
///
/// DO NOT EDIT. This file is autogenerated from ICU data. See
/// 'http://go/generate_datetime_pattern_dart.cc' (Google internal)
/// File generated from CLDR ver. 44.1
// DO NOT EDIT. This file is autogenerated from ICU data. See
// 'http://go/generate_datetime_pattern_dart.cc' (Google internal)
// File generated from CLDR ver. 44.1
library;

// MANUAL EDIT TO SUPPRESS WARNINGS IN GENERATED CODE
// ignore_for_file: unnecessary_const

library date_time_patterns;

/// Returns a Map from locale names to another Map that goes from skeletons
/// to the locale-specific formatting patterns.
/// Internal use only. Call initializeDateFormatting instead.
Expand Down
2 changes: 1 addition & 1 deletion pkgs/intl/lib/intl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/// For things that require locale or other data, there are multiple different
/// ways of making that data available, which may require importing different
/// libraries. See the class comments for more details.
library intl;
library;

import 'dart:async';

Expand Down
3 changes: 1 addition & 2 deletions pkgs/intl/lib/intl_browser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
/// when running in the web browser. You should import only one of this or
/// intl_standalone.dart. Right now the only thing provided here is the
/// ability to find the default locale from the browser.
library intl_browser;
library;

import 'package:web/web.dart';
import 'intl.dart';
Expand Down
1 change: 1 addition & 0 deletions pkgs/intl/lib/intl_default.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/// when running in the web browser. You should import only one of this or
/// intl_standalone.dart. Right now the only thing provided here is the
/// ability to find the default locale from the browser.
library;

Future<String> findSystemLocale() => throw UnimplementedError(
'This is a stub for either `intl_standalone` or `intl_browser`');
3 changes: 1 addition & 2 deletions pkgs/intl/lib/intl_standalone.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
/// when running standalone. You should import only one of this or
/// intl_browser.dart. Right now the only thing provided here is finding
/// the operating system locale.
library intl_standalone;
library;

import 'dart:io';
import 'intl.dart';
Expand Down
4 changes: 3 additions & 1 deletion pkgs/intl/lib/locale.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +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.

/// This library provides access to the [Locale] class.
/// Provides access to the [Locale] class.
library;

export 'src/locale.dart';
7 changes: 3 additions & 4 deletions pkgs/intl/lib/message_format.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
// BSD-style license that can be found in the LICENSE file.

// `MessageFormat` is a "locale aware printf", with plural / gender support.
///
/// `MessageFormat` prepares strings for display to users, with optional
/// arguments (variables/placeholders). The arguments can occur in any order,
/// which is necessary for translation into languages with different grammars.
/// It supports syntax to represent plurals and select options.
library message_format;
library;

import 'dart:collection';
import 'intl.dart';
Expand Down Expand Up @@ -807,12 +806,12 @@ class _TypeAndVal<T, V> {
enum _ElementType { string, block }

class _ElementTypeAndVal extends _TypeAndVal<_ElementType, String> {
_ElementTypeAndVal(_ElementType type, String value) : super(type, value);
_ElementTypeAndVal(super.type, super.value);
}

/// Block type.
enum _BlockType { plural, ordinal, select, simple, string, unknown }

class _BlockTypeAndVal extends _TypeAndVal<_BlockType, Object> {
_BlockTypeAndVal(_BlockType type, Object value) : super(type, value);
_BlockTypeAndVal(super.type, super.value);
}
2 changes: 1 addition & 1 deletion pkgs/intl/lib/message_lookup_by_library.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
///
/// See Intl class comment or `tests/message_format_test.dart` for more
/// examples.
library message_lookup_by_library;
library;

import 'package:intl/intl.dart';
import 'package:intl/src/intl_helpers.dart';
Expand Down
1 change: 0 additions & 1 deletion pkgs/intl/lib/number_symbols.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library number_symbols;

// Suppress naming issues as changes would be breaking.
// ignore_for_file: non_constant_identifier_names
Expand Down
Loading

0 comments on commit 9a4d6ca

Please sign in to comment.