Skip to content

Commit

Permalink
Merge branch 'dart-lang:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem authored Nov 28, 2024
2 parents 44451c8 + ddb95b5 commit 4857a91
Show file tree
Hide file tree
Showing 220 changed files with 2,972 additions and 1,266 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pkgs/intl4x/lib/src/bindings/* linguist-generated=true
pkgs/intl4x/**/*.g.dart linguist-generated=true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/intl4x.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
name: "package:intl4x"
about: "Create a bug or file a feature request against package:intl4x."
labels: "package:intl4x"
---
---
26 changes: 13 additions & 13 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# Configuration for .github/workflows/pull_request_label.yml.
# Configuration for .github/workflows/pull_request_label.yml.

'type-infra':
- changed-files:
- any-glob-to-any-file: '.github/**'
- any-glob-to-any-file: '.github/**'

'package:intl':
- changed-files:
- any-glob-to-any-file: 'pkgs/intl/**'
- any-glob-to-any-file: 'pkgs/intl/**'

'package:intl_translation':
'package:intl4x':
- changed-files:
- any-glob-to-any-file: 'pkgs/intl_translation/**'
- any-glob-to-any-file: 'pkgs/intl4x/**'

'package:intl4x':
'package:intl_translation':
- changed-files:
- any-glob-to-any-file: 'pkgs/intl4x/**'
- any-glob-to-any-file: 'pkgs/intl_translation/**'

'package:messages':
- changed-files:
- any-glob-to-any-file: 'pkgs/messages/**'
- any-glob-to-any-file: 'pkgs/messages/**'

'package:messages_serializer':
'package:messages_builder':
- changed-files:
- any-glob-to-any-file: 'pkgs/messages_serializer/**'
- any-glob-to-any-file: 'pkgs/messages_builder/**'

'package:messages_builder':
'package:messages_serializer':
- changed-files:
- any-glob-to-any-file: 'pkgs/messages_builder/**'
- any-glob-to-any-file: 'pkgs/messages_serializer/**'

'package:messages_shrinker':
- changed-files:
- any-glob-to-any-file: 'pkgs/messages_shrinker/**'
- any-glob-to-any-file: 'pkgs/messages_shrinker/**'
4 changes: 2 additions & 2 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: stable
sdk: dev

- uses: actions/checkout@7739b9ba2efcda9dde65ad1e3c2dbe65b41dfba7

Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:

- name: Upload Reference Summary iff on main branch
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: reference_exec_summary
path: conformance/TEMP_DATA/testReports/exec_summary.json
16 changes: 10 additions & 6 deletions .github/workflows/intl4x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ on:
paths:
- '.github/workflows/intl4x.yml'
- 'pkgs/intl4x/**'
- 'submodules/**'
push:
branches: [ main ]
paths:
- '.github/workflows/intl4x.yml'
- 'pkgs/intl4x/**'
- 'submodules/**'
schedule:
- cron: '0 0 * * 0' # weekly

Expand All @@ -28,7 +30,7 @@ jobs:
working-directory: pkgs/intl4x
strategy:
matrix:
sdk: [stable, dev] # {pkgs.versions}
sdk: [dev]
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- sdk: dev
Expand Down Expand Up @@ -118,7 +120,7 @@ jobs:
cd ffi/dart
dart pub get
cd ../..
dart run ffi/dart/tool/build_libs.dart bin/linux_x64 linux_x64 dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/linux_x64 linux_x64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components,compiled_data
- name: Build Mac
if: matrix.os == 'macos-latest'
Expand All @@ -130,7 +132,7 @@ jobs:
cd ffi/dart
dart pub get
cd ../..
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_arm64 macos_arm64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components,compiled_data
- name: Build Windows
if: matrix.os == 'windows-latest'
Expand All @@ -142,7 +144,7 @@ jobs:
cd ffi/dart
dart pub get
cd ../..
dart run ffi/dart/tool/build_libs.dart bin/windows_x64 windows_x64 dynamic default_components,experimental_components
dart run ffi/dart/tool/build_libs.dart bin/windows_x64 windows_x64 dynamic icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components,compiled_data
- run: echo "LOCAL_ICU4X_BINARY=$(realpath submodules/icu4x/bin/linux_x64)" >> $GITHUB_ENV
if: matrix.os == 'ubuntu-latest'
Expand All @@ -158,10 +160,12 @@ jobs:
- name: Display structure of downloaded files
run: ls -R

- run: |
- name: Run `dart pub get`
run: |
cd pkgs/intl4x
dart pub get
- run: |
- name: Run `dart test`
run: |
cd pkgs/intl4x
dart --enable-experiment=native-assets test
56 changes: 34 additions & 22 deletions .github/workflows/intl4x_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
compiletype: [ dynamic, static ]
runs-on: ${{ matrix.os }}
env:
DATA: ${{ matrix.compiletype == 'dynamic' && ',compiled_data' || '' }}

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
Expand Down Expand Up @@ -65,15 +68,18 @@ jobs:
cd ffi/dart
dart pub get
cd ../..
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
dart run ffi/dart/tool/build_libs.dart bin/android_arm_${{ matrix.compiletype }} android_arm ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/android_arm64_${{ matrix.compiletype }} android_arm64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/android_ia32_${{ matrix.compiletype }} android_ia32 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/android_x64_${{ matrix.compiletype }} android_x64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/linux_arm_${{ matrix.compiletype }} linux_arm ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/linux_arm64_${{ matrix.compiletype }} linux_arm64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/linux_riscv64_${{ matrix.compiletype }} linux_riscv64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/linux_x64_${{ matrix.compiletype }} linux_x64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
- name: Build Linux data
if: matrix.os == 'ubuntu-latest' && matrix.compiletype == 'static'
run: |
cargo run -p icu_datagen -- --locales full --keys all --format blob --out bin/full.postcard
cd provider/datagen # avoid global feature resolution
Expand All @@ -99,12 +105,15 @@ jobs:
cd ffi/dart
dart pub get
cd ../..
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
dart run ffi/dart/tool/build_libs.dart bin/ios_arm_${{ matrix.compiletype }} ios_arm ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/ios_arm64_${{ matrix.compiletype }} ios_arm64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/ios_x64_${{ matrix.compiletype }} ios_x64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/macos_arm64_${{ matrix.compiletype }} macos_arm64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/macos_x64_${{ matrix.compiletype }} macos_x64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
- name: Build Mac data
if: matrix.os == 'macos-latest' && matrix.compiletype == 'static'
run: |
cd provider/datagen # avoid global feature resolution
rustup target add aarch64-apple-darwin
cargo build --release --bin icu4x-datagen --no-default-features --features bin,blob_exporter,blob_input,rayon,experimental_components --target aarch64-apple-darwin
Expand All @@ -125,10 +134,13 @@ jobs:
cd ffi/dart
dart pub get
cd ../..
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
dart run ffi/dart/tool/build_libs.dart bin/windows_arm64_${{ matrix.compiletype }} windows_arm64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/windows_ia32_${{ matrix.compiletype }} windows_ia32 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
dart run ffi/dart/tool/build_libs.dart bin/windows_x64_${{ matrix.compiletype }} windows_x64 ${{ matrix.compiletype }} icu_collator,icu_datetime,icu_list,icu_decimal,icu_plurals,experimental_components${{ env.DATA }}
- name: Build Windows data
if: matrix.os == 'windows-latest' && matrix.compiletype == 'static'
run: |
cd provider/datagen # avoid global feature resolution
rustup target add aarch64-pc-windows-msvc
cargo build --release --bin icu4x-datagen --no-default-features --features bin,blob_exporter,blob_input,rayon,experimental_components --target aarch64-pc-windows-msvc
Expand All @@ -140,9 +152,9 @@ jobs:
cp target/x86_64-pc-windows-msvc/release/icu4x-datagen.exe bin/windows_x64-datagen.exe
- name: Upload artifacts
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: dart-${{matrix.os}}-libs
name: dart-${{matrix.os}}-${{ matrix.compiletype }}-libs
path: submodules/icu4x/bin

check_hashes:
Expand Down Expand Up @@ -173,7 +185,7 @@ jobs:
run: |
cd pkgs/intl4x
dart pub get
dart --enable-experiment=native-assets tool/generate_hashes.dart
dart --enable-experiment=native-assets tool/regenerate_hashes.dart
git diff --exit-code
release:
Expand All @@ -188,7 +200,7 @@ jobs:
run: ls -R

- name: Release
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
uses: softprops/action-gh-release@e7a8f85e1c67a31e6ed99a94b41bd0b71bbee6b8
with:
files: '**'
fail_on_unmatched_files: true
Expand Down
30 changes: 18 additions & 12 deletions .github/workflows/messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,34 @@ jobs:
defaults:
run:
working-directory: pkgs/messages
strategy:
matrix:
sdk: [stable, dev] # {pkgs.versions}
dependencies: [path, published]
include:
- sdk: stable
run-tests: true

steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672

- uses: flutter-actions/setup-flutter@61f93c6f11e0234fa9ec4df59362c9699b979660
with:
sdk: ${{matrix.sdk}}
channel: beta

- run: dart pub get

- run: dart pub get
working-directory: pkgs/messages/example

- run: (cd example_json; dart pub get)
- run: flutter pub get
working-directory: pkgs/messages/examples_flutter/my_application

- run: flutter pub get
working-directory: pkgs/messages/examples_flutter/my_shopping_cart

- run: dart analyze --fatal-infos

- run: dart format --output=none --set-exit-if-changed .
if: ${{matrix.run-tests}}

- run: dart test
if: ${{matrix.run-tests}}

- name: Regenerate and run example
working-directory: pkgs/messages/example
run: |
dart run messages || exit 1
git diff --exit-code || exit 1
dart run || exit 1
4 changes: 2 additions & 2 deletions .github/workflows/messages_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
working-directory: pkgs/messages_builder
strategy:
matrix:
sdk: [stable, dev] # {pkgs.versions}
sdk: [dev]
include:
- sdk: stable
- sdk: dev
run-tests: true
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/messages_serializer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
working-directory: pkgs/messages_serializer
strategy:
matrix:
sdk: [stable, dev] # {pkgs.versions}
sdk: [dev]
include:
- sdk: stable
- sdk: dev
run-tests: true
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/messages_shrinker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
working-directory: pkgs/messages_shrinker
strategy:
matrix:
sdk: [stable, dev] # {pkgs.versions}
sdk: [dev]
include:
- sdk: stable
- sdk: dev
run-tests: true
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
if: ${{ github.repository_owner == 'dart-lang' }}
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
with:
sdk: dev
write-comments: false
checkout_submodules: true
ignore-packages: "submodules"
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@ This repository is home to Dart internationalization (i18n) and localization (l1

## Packages

| Package | Description | Version | Status |
| Package | Description | Issues | Version |
| --- | --- | --- | --- |
| [intl](pkgs/intl/) | Contains code to deal with internationalized/localized messages, date and number formatting and parsing, bi-directional text, and other internationalization issues. | [![pub package](https://img.shields.io/pub/v/intl.svg)](https://pub.dev/packages/intl) | Stable |
| [intl_translation](pkgs/intl_translation/) | Contains code to localize apps to different locales, by extracting to ARB files and generating code to retrieve messages from ARB files. | [![pub package](https://img.shields.io/pub/v/intl_translation.svg)](https://pub.dev/packages/intl_translation) |Stable |
| [intl4x](pkgs/intl4x/) | A lightweight modular library for internationalization (i18n) functionality. | [![Pub](https://img.shields.io/pub/v/intl4x.svg)](https://pub.dev/packages/intl4x) | Experimental |
| [messages](pkgs/messages/) | A data-based, easy, safe, and small localization (l10n) library. | [![Pub](https://img.shields.io/pub/v/messages.svg)](https://pub.dev/packages/messages) | Experimental |
| [intl](pkgs/intl/) | Contains code to deal with internationalized/localized messages, date and number formatting and parsing, bi-directional text, and other internationalization issues. | [![package issues](https://img.shields.io/badge/package:intl-4774bc)](https://github.com/dart-lang/i18n/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aintl) | [![pub package](https://img.shields.io/pub/v/intl.svg)](https://pub.dev/packages/intl) |
| [intl4x](pkgs/intl4x/) | A lightweight modular library for internationalization (i18n) functionality. | [![package issues](https://img.shields.io/badge/package:intl4x-4774bc)](https://github.com/dart-lang/i18n/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aintl4x) | [![pub package](https://img.shields.io/pub/v/intl4x.svg)](https://pub.dev/packages/intl4x) |
| [intl_translation](pkgs/intl_translation/) | Contains code to deal with internationalized/localized messages, date and number formatting and parsing, bi-directional text, and other internationalization issues. | [![package issues](https://img.shields.io/badge/package:intl__translation-4774bc)](https://github.com/dart-lang/i18n/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aintl_translation) | [![pub package](https://img.shields.io/pub/v/intl_translation.svg)](https://pub.dev/packages/intl_translation) |
| [messages](pkgs/messages/) | A lightweight modular library for localization (l10n) functionality. | [![package issues](https://img.shields.io/badge/package:messages-4774bc)](https://github.com/dart-lang/i18n/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Amessages) | |
| [messages_builder](pkgs/messages_builder/) | Build the messages for consumption by package:messages | [![package issues](https://img.shields.io/badge/package:messages__builder-4774bc)](https://github.com/dart-lang/i18n/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Amessages_builder) | |
| [messages_serializer](pkgs/messages_serializer/) | Serialization of messages for package:messages. | [![package issues](https://img.shields.io/badge/package:messages__serializer-4774bc)](https://github.com/dart-lang/i18n/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Amessages_serializer) | |
| [messages_shrinker](pkgs/messages_shrinker/) | Removing unneeded messages from message data files for package:messages. | [![package issues](https://img.shields.io/badge/package:messages__shrinker-4774bc)](https://github.com/dart-lang/i18n/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Amessages_shrinker) | [![pub package](https://img.shields.io/pub/v/messages_shrinker.svg)](https://pub.dev/packages/messages_shrinker) |

## Contribute

Let us know about [bugs and feature requests](https://github.com/dart-lang/i18n/issues), file a [pull request](https://github.com/dart-lang/i18n/pulls), or participate in the [discussions](https://github.com/dart-lang/i18n/discussions)!

## Publishing automation

Expand Down
Loading

0 comments on commit 4857a91

Please sign in to comment.