-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to messages #762
Updates to messages #762
Conversation
PR HealthBreaking changes ✔️Details
Changelog Entry ✔️Details
Changes to files need to be accounted for in their respective changelogs. Coverage
|
File | Coverage |
---|---|
pkgs/intl4x/lib/intl4x.dart | 💔 Not covered |
pkgs/messages/example_json/bin/example.dart | 💔 Not covered |
pkgs/messages/example_json/lib/testarb.g.dart | 💔 Not covered |
pkgs/messages/example_json/lib/testarbctx2.g.dart | 💔 Not covered |
pkgs/messages/lib/messages.dart | 💔 Not covered |
pkgs/messages/lib/src/deserializer/deserializer.dart | 💔 Not covered |
pkgs/messages/lib/src/deserializer/deserializer_json.dart | 💚 94 % ⬆️ 22 % |
pkgs/messages/lib/src/message.dart | 💚 66 % ⬆️ 23 % |
pkgs/messages/lib/src/message_format.dart | 💔 Not covered |
pkgs/messages/lib/src/message_list_json.dart | 💚 67 % |
pkgs/messages/lib/src/plural_selector.dart | 💔 Not covered |
pkgs/messages_builder/lib/code_generation/constructor_generation.dart | 💔 Not covered |
pkgs/messages_builder/lib/code_generation/field_generation.dart | 💔 Not covered |
pkgs/messages_builder/lib/code_generation/import_generation.dart | 💔 Not covered |
pkgs/messages_builder/lib/code_generation/method_generation.dart | 💔 Not covered |
pkgs/messages_builder/lib/generation_options.dart | 💔 Not covered |
pkgs/messages_builder/lib/message_parser/plural_parser.dart | 💔 98 % ⬇️ 0 % |
pkgs/messages_serializer/lib/src/serializer_json.dart | 💚 94 % ⬆️ 25 % |
pkgs/messages_shrinker/lib/messages_shrinker.dart | 💔 90 % ⬇️ 7 % |
This check for test coverage is informational (issues shown here will not fail the PR).
This check can be disabled by tagging the PR with skip-coverage-check
License Headers ⚠️
Details
// 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.
Files |
---|
pkgs/messages/example_json/lib/testarb.g.dart |
pkgs/messages/example_json/lib/testarbctx2.g.dart |
All source files should start with a license header.
Unrelated files missing license headers
Files |
---|
pkgs/intl_translation/test/generate_localized/code_map_messages_fr.dart |
pkgs/intl_translation/test/generate_localized/code_map_messages_all_locales.dart |
pkgs/intl_translation/test/generate_localized/code_map_messages_all.dart |
pkgs/intl_translation/test/two_components/component_messages_all.dart |
pkgs/intl_translation/test/two_components/app_messages_fr.dart |
pkgs/intl_translation/test/two_components/component_messages_fr_xyz123.dart |
pkgs/intl_translation/test/two_components/component_messages_all_locales.dart |
pkgs/intl_translation/test/two_components/app_messages_all_locales.dart |
pkgs/intl_translation/test/two_components/app_messages_all.dart |
pkgs/intl_translation/example/lib/generated/messages_de_CH.dart |
pkgs/intl_translation/example/lib/generated/messages_all_locales.dart |
pkgs/intl_translation/example/lib/generated/messages_en.dart |
pkgs/intl_translation/example/lib/generated/messages_iw.dart |
pkgs/intl_translation/example/lib/generated/messages_es.dart |
pkgs/intl_translation/example/lib/generated/messages_de.dart |
pkgs/intl_translation/example/lib/generated/messages_all.dart |
pkgs/messages_shrinker/bin/messages_shrinker.dart |
This check can be disabled by tagging the PR with skip-license-check
Package publish validation ✔️
Details
Package | Version | Status |
---|---|---|
package:intl4x | 0.7.1 | ready to publish |
package:messages | 0.2.0 | ready to publish |
package:messages_builder | 0.2.0 | ready to publish |
package:messages_serializer | 0.2.0 | ready to publish |
package:messages_shrinker | 0.2.0 | ready to publish |
package:intl | 0.19.0 | already published at pub.dev |
package:intl_translation | 0.19.0-wip | WIP (no publish necessary) |
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.
Package publishing
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting my head around this PR, it looks like the generated message code delegates to one of a few intl libraries to perform pluralization.
Using a typedef here makes sense. I'm curious if we'll we need any other abstractions over the underlying intl library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like great cleanup and I understand much more now. Thanks for pinging me on this!
A few minor suggestions to consider:
Remove
IntlObject
, as we only need its plural selection. Define aPluralSelector
typedef instead of an interface, which alleviates issues around packaging (where should an interface live?).We support
intl4x
andintl
out of the box, but users can also specify their own plural selectors if they want to.cc @parlough - this should clarify some of your questions from dart-lang/dart-pad#2748
Contribution guidelines:
dart format
.Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.