Commit graph

416 commits

Author SHA1 Message Date
Dan Field 58a4122b97
update packages (#50666) 2020-02-12 14:51:38 -08:00
Jonah Williams 18f38cd45b
Switch flutter_tools to use frontend_server for web compilation (#50365) 2020-02-11 15:43:46 -08:00
Alexandre Ardhuin f15c887c63
change quote to avoid escapes (#50368) 2020-02-11 20:58:27 +01:00
Shi-Hao Hong 5dfa8e9c05
Remove redundant gen_l10n tests (#50301) 2020-02-07 13:59:45 -08:00
Alexandre Ardhuin b953c3e5a8
use raw strings to avoid escaping (#50322) 2020-02-07 16:35:55 +01:00
Alexandre Ardhuin 5c28e3eeea
unnecessary escapes fixes (#50178)
* unnecessary escapes fixes

* replace some strings with raw strings

* update regexp

* address review comments
2020-02-07 06:35:50 +01:00
Jonah Williams 4896c85ede
[versions] update packages (#50251) 2020-02-06 08:44:00 -08:00
Hans Muller 82c00c915c
Move the localization_utils camelCase function to LocaleInfo (#50152) 2020-02-05 06:35:49 -08:00
Hans Muller c3e0f2d462
Add Message.isPlural, Message.getCountPlaceholder() to gen_l10n_types (#50132) 2020-02-05 06:35:29 -08:00
Alexandre Ardhuin 8061894f05
update template for gen_keycodes (#49884) 2020-01-31 21:58:51 +01:00
Alexandre Ardhuin b5f328e37e
remove unnecessary string interpolations (#49622) 2020-01-31 18:30:21 +01:00
Alexandre Ardhuin 5a8de59a66
refactor generateString to emit simpler dart code (#49334) 2020-01-31 11:57:54 +01:00
Hans Muller 3f2c6ea724
Integration test for the gen_l10n tool (#49586) 2020-01-29 12:45:03 -08:00
Jonah Williams 3f5786bee9
[versions] update versions --force-upgrade (#49590) 2020-01-28 13:07:45 -08:00
Dan Field fabeb2a16f
Revert string interp (#49602) 2020-01-28 07:56:51 -08:00
Darren Austin 9980d6e550
Script to generate missing localization resources (#49379)
Added a new script to generate missing localizations for use when adding new localizations to the Flutter framework.
2020-01-27 17:50:59 -08:00
Hans Muller 7539826d7b Update gen_l10n handling of plurals, numbers, and dates (#49357) 2020-01-27 16:18:02 -08:00
Dan Field 8b2993337a
revert #48985 (#49572) 2020-01-27 14:36:02 -08:00
Hans Muller bc5c46438a Migrate TextTheme to 2018 APIs (#48547) 2020-01-24 19:03:01 -08:00
Alexandre Ardhuin 92cbaa3efe remove unnecessary string interpolations (#49352) 2020-01-23 20:43:01 -08:00
Angjie Li f0a175f41d Use flutter_tools to start WebDriver browser. (#49228) 2020-01-21 16:48:02 -08:00
Alexandre Ardhuin 3800bb7b10 fix missing spaces in adjacent strings (#49159) 2020-01-21 16:43:03 -08:00
Anthony b67d5ec6e9 [a11y] Make sure RenderFractionalTranslation updates its semantics after the translation field is set (#48985) 2020-01-17 15:13:01 -08:00
Alexandre Ardhuin 003541499b use isA<Xxx>() matcher (#48482) 2020-01-16 12:43:03 -08:00
Hans Muller 667c38d551
gen_l10n: generated Intl.message parameter should be an ordinary string (#48929) 2020-01-16 07:20:38 -08:00
Shi-Hao Hong 47bba44920
L10n Currency Formatting, Fixes to Named vs Positional Parameters (#48445)
* Add currency formatting for l10n tool, fix positional vs named params
2020-01-10 14:19:40 -08:00
Alexandre Ardhuin 82262d8896 format operator== according to flutter style guide (#48449) 2020-01-09 08:23:02 -08:00
Shi-Hao Hong c525988c8c
Reorganize tests in l10n tool (#47704) 2020-01-08 12:29:18 -08:00
David Iglesias f65f7f0118 Change video_demo slightly so it works on web. (#46719) 2020-01-08 12:28:01 -08:00
Shi-Hao Hong b038b40941 gen_l10n Number Format Handling (#47706) 2020-01-07 22:38:02 -08:00
Alexandre Ardhuin 4f9b6cf017
enable lint prefer_final_in_for_each (#47724) 2020-01-07 16:32:04 +01:00
Dan Field 24f39d40a4 Revert "Revert "Add many more global analyses. (#47875)" (#48080)" (#48081)
This reverts commit 04ea3183ce.
2020-01-02 11:47:28 -08:00
Francisco Magdaleno 04ea3183ce
Revert "Add many more global analyses. (#47875)" (#48080)
This reverts commit e768c92fbc.
2020-01-02 09:25:59 -08:00
Ian Hickson e768c92fbc
Add many more global analyses. (#47875)
* Update packages.

* Add many more global analyses.

* Catch trailing spaces and trailing newlines in all text files.
  Before we were only checking newly added files, but that means we
  missed some.

* Port the trailing spaces logic to work on Windows too.

* Correct all the files with trailing spaces and newlines.

* Refactor some of the dev/bots logic into a utils.dart library.
  Notably, the "exit" and "print" shims for testing are now usable
  from test.dart, analyze.dart, and run_command.dart.

* Add an "exitWithError" function that prints the red lines and
  then exits. This is the preferred way to exit from test.dart,
  analyze.dart, and run_command.dart.

* More consistency in the output of analyze.dart.

* Refactor analyze.dart to use the _allFiles file enumerating logic
  more widely.

* Add some double-checking logic to the _allFiles logic to catch
  cases where changes to that logic end up catching fewer files
  than expected (helps prevent future false positives).

* Add a check to prevent new binary files from being added to
  the repository. Grandfather in the binaries that we've already
  added.

* Update all the dependencies (needed because we now import crypto in
  dev/bots/analyze.dart).
2019-12-30 17:12:19 -08:00
Shi-Hao Hong 173322dc78
Support preferred locales for gen_l10n (#47845)
* Add preferred-supported-locales option to gen_l10n.dart executable
2019-12-30 11:22:01 -08:00
Francisco Magdaleno f2f9d0e4fd
Revert "Flutter Web Driver Support (#47470)" (#47698)
This reverts commit cc1c9649c4.
2019-12-23 15:20:11 -08:00
Shi-Hao Hong 88cd1135bf
Handle plural gen_l10n regular placeholders and DateTime placeholders (#47483)
* Handle simple placeholders in plurals

* Handle Date plural placeholders

* Improve variable names

* Turn assert into exceptions, add tests
2019-12-20 16:22:44 -08:00
Angjie Li cc1c9649c4 Flutter Web Driver Support (#47470) 2019-12-19 19:53:01 -08:00
Alexandre Ardhuin 78db965642 Reland implicit-casts: false (#47431) 2019-12-19 02:23:01 -08:00
Lau Ching Jun a4858782da
Revert "implicit-casts: false (#47199)" (#47428)
This reverts commit c235998acf.
2019-12-18 23:53:00 -08:00
Alexandre Ardhuin c235998acf implicit-casts: false (#47199) 2019-12-18 23:23:01 -08:00
Lau Ching Jun 2df964581f
Revert "Flutter Web Driver Support (#45951)" (#47389)
This reverts commit 1ef0eadb45.
2019-12-18 17:02:31 -08:00
Angjie Li 1ef0eadb45 Flutter Web Driver Support (#45951)
* Support Flutter Driver test for Flutter Web application.

* Support Flutter Driver test for Flutter Web application.

* Fix documentation issues.

* Support Flutter Driver test for Flutter Web application.

* Fix documentation.

* Remove unused file from dartdoc check.

* Sync to date.

* Revert change to dartdoc.

* Address comments.

* Apply suggestions from code review

Co-Authored-By: Jonah Williams <jonahwilliams@google.com>

* Update copyrights.

* Update allowed list for browsers.

* Verify command line arguments for Drive command is correctly parsed.

* Make waitUntilFirstFrameRasterized throw unimplementedError for Flutter Web Driver.

* Add comment for why sync WebDriver is used.

* Update documentations.

* Add more unit tests and update documentation.

* Configure test.dart so that web_extension_test will be executed with --platform=chrome.

* Revert unnecessary changes.

* Add new file path for Windows to blacklist.

* Reconstruct the structure of flutter_driver/test/src folder to remove filtering logic in dev/bots/test.dart/

* Fix path to web_extension_test.dart.

* Add instructions for how to use WebFlutterDriver.

* Update getLayerTree to use sendCommand instead of _sendCommand.

* Update pubspec files.
2019-12-18 10:45:39 -08:00
Shi-Hao Hong c319f5f8d8
gen_l10n localizations date formatting (simple messages) (#47006)
* Implement date parsing for the gen_l10n tool
2019-12-17 14:03:43 -08:00
Shi-Hao Hong 7874bca248
Move localization executables to bin folder (#46251) 2019-12-16 17:30:57 -08:00
Shi-Hao Hong e7fec2bc33
Add helpful message about how to use localizationsDelegates list (#46250) 2019-12-13 12:00:35 -08:00
Shi-Hao Hong 2eed59c1d5
Add gen_l10n sorting tests (#46247)
* Add tests for sorting arbPathString, supportedLocales and supportedLanguageCodes alphabetically

* Plural arbPathStrings

* Factor out singleZhMessageArbFileString

* Make translations more accurate and generic
2019-12-13 10:03:56 -08:00
Shi-Hao Hong 37e66b2179
gen_l10n.dart tool testing (#44856)
* Add tests to gen_l10n.dart tool

* Separate out LocalizationsGenerator class to improve testability of code

* Add testing dependencies to dev/tools

* Integrate dev/tools testing to flutter CI

* Restructure dev/tools folder for testing

* Fix license headers
2019-12-06 11:35:08 -08:00
Alexandre Ardhuin ec1a015045
implicit-casts:false in dev (#45787) 2019-12-05 22:34:06 +01:00
Ian Hickson 449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Per Classon b5a85fcf48
Allow plural localized strings to not specify every case (#45168)
* Allow plural localized strings to not specify every case
2019-11-19 18:58:28 +01:00
Jonah Williams e77c24ef91
Update package test (#44882) 2019-11-14 09:31:36 -08:00
Shi-Hao Hong a872a701c3
Canonicalize locale string in gen_l10n.dart (#44758)
* Canonicalize locale string for gen_l10n.dart script

* Refresh stocks example to use canonicalized locale
2019-11-13 10:15:24 -08:00
Shi-Hao Hong 0d348138aa
Sort locales and method/properties/getters alphabetically (#44761)
* Sort locales and method/properties/getters alphabetically

* Refresh stocks example to show proper sorting
2019-11-13 10:14:53 -08:00
Jonah Williams a901b650b6
Update meta to 1.1.8 (#44584) 2019-11-12 13:48:42 -08:00
Shi-Hao Hong 2b498567a4
Sort Localization generation output (#44743)
* Sort Localization generation output

- When creating locales that were assumed from existing locales, the
file that is used is non-deterministic. This adds a sort to the iterator
to ensure that the same existing locale is used to generate the assumed
locale
- When generating material, cupertino and date localizations, the generated getters were not sorted. This
introduces an alphabetic sort

* remove main.dart.snapshot
2019-11-12 12:50:51 -08:00
Shi-Hao Hong 159a47da64
l10n tool improvements, stocks app i18n refresh (#44473)
* Add check for placeholders being an empty map

* Remove unnecessary properties from en_ES.arb in the stocks example

* Use getter instead of methods in the stocks example

* Fixed "annotating types for function expression parameters" lint issue from generated localizations delegate code
2019-11-11 14:42:29 -08:00
Shi-Hao Hong e7d78b69a1
Use raw string for l10n description (#44451)
* Use raw string for l10n description

* Stock app refresh
2019-11-08 19:34:37 -08:00
Ian Hickson 1ce4a4f36f
Make sure all our .dart files have license headers (#44467) 2019-11-08 16:53:21 -08:00
Greg Spencer c921c5ae67
Add macOS fn key support. (#44410)
This adds support for the fn key on macOS. It adds it to the key mappings as a supplemental mapping that overwrites the one from the Chrome headers, since the chrome headers have a TODO, but no implementation of the key.

Also, ignore the fn key entirely on macOS. This is because On macOS laptop keyboards, the fn key is used to generate home/end and f1-f12, but it ALSO generates a separate down/up event for the fn key itself. Other platforms hide the fn key, and just produce the key that it is combined with, so to keep it possible to write cross platform code that looks at which keys are pressed, the fn key is ignored.
2019-11-08 16:30:38 -08:00
Shi-Hao Hong b883624c75
l10n tool improvements, stocks app refresh (#44313)
* Add pubspec.yaml comment

* Add --help flag
2019-11-06 18:52:24 -08:00
Shi-Hao Hong 3e4bf5757d
Update Stocks example using i18n tool (#44223)
* Use l10n tool to generate stocks i18n files

* Rename *_en_EN.arb to *_en_US.arb

* Fix l10n script
2019-11-06 12:52:03 -08:00
Shi-Hao Hong ede637a759
l10n Localizations and LocalizationsDelegate Generation Tool (#43934)
*Starting with arb files in lib/l10n, the tool creates the following by default:
1. An AppLocalizations class containing:
- an `AppLocalizationsDelegate`
- a `supportedLocales` property that returns a list of all supported locales.
- a `localizationsDelegate` property that returns a list containing this delegate along with `GlobalMaterialLocalizations.delegate`, `GlobalCupertinoLocalizations.delegate`, and `GlobalWidgetsLocalizations.delegate`.
2. One Dart `message_<locale>.dart` file for each arb file, as well as a `messages_all.dart` file that performs the locale message lookup. The tool infers the locale of each arb file from the @@Locale property or the arb file's name.
2019-11-04 18:27:38 -08:00
Ian Hickson 292519be98
Roll dart package dependencies (#42496) 2019-10-11 11:12:31 -07:00
Mouad Debbar e045ef2969
Keymap for Web (#41397) 2019-10-01 14:10:53 -07:00
Alexandre Ardhuin a36f809e27
add missing trailing commas (in dev/) (#40704) 2019-09-19 07:54:46 +02:00
Greg Spencer 63e096b4ac
Update keyboard maps (#40697)
This updates the keyboard maps to use updated HID codes for game controller buttons (from Chrome), and to encode that GLFW "super" keys are what we call "meta" keys (i.e. Windows key or Command key).
2019-09-17 13:24:54 -07:00
Alexandre Ardhuin df4bf453ab
more UI-as-code (#35516) 2019-09-17 16:23:44 +02:00
Jonah Williams 91af071570
ensure dart2js does not compile unsupported packages (#40368) 2019-09-12 15:25:21 -07:00
Jonah Williams 0167f53101
update packages --force upgrade (#39932) 2019-09-05 19:35:59 -07:00
Harry Terkelsen d33cf11556
Automatically generated registrants for web plugins (#39628)
* WIP on web plugin registry

* WIP on registering plugins

* WIP on web plugin registration

* Only generate `package:flutter_web_plugins` imports if plugins are
defined

* Add parsing test

* Add documentation

* Fix analyzer warnings

* add license headers

* Add tests for package:flutter_web_plugins

* Run `flutter update-packages --force-upgrade`

* Fix analyzer errors

* Fix analyzer error in test

* Update copyright and remove flutter SDK constraints

* Enable tests since engine has rolled

* add flutter_web_plugins tests to bots

* Create an empty .packages file for WebFs test
2019-09-03 10:37:34 -07:00
Chris Bracken ffa3785411
Update package versions to latest (#39013)
This fixes a breakage in fuchsia where package_config version 1.1.0 is
required but flutter_tools is currently locked to 1.05.
2019-08-21 19:15:33 -07:00
Kate Lovett 6ff212b328
Comparing pixels instead of bytes with GoldenFileComparator (#38473) 2019-08-19 09:06:22 -07:00
Emmanuel Garcia 83a8a575ee
Update dependencies (#37971) 2019-08-10 12:38:20 -07:00
Yegor 9bc298deb6
update dependencies; add a Web smoke test (#37816)
update dependencies; add a Web smoke test
2019-08-09 09:58:49 -07:00
Emmanuel Garcia f3690d153b
Update packages 2019-08-06 06:19:42 -07:00
Jonah Williams a785db78fb
Reland "Integrate dwds into flutter tool for web support (#34252)" (#37649)" (#37650) 2019-08-05 16:51:57 -07:00
Jonah Williams 433436e1ee
Revert "Integrate dwds into flutter tool for web support (#34252)" (#37649) 2019-08-05 15:58:04 -07:00
Jonah Williams 4ccd81199f
Integrate dwds into flutter tool for web support (#34252) 2019-08-05 12:41:58 -07:00
Keerti Parthasarathy f3674ccfd7
Update dartdoc to 28.4 (#37314) 2019-07-31 13:41:27 -07:00
Hans Muller 82f8ded8d2
Add support for the Kannada (kn) locale (#37026) 2019-07-29 16:21:19 -07:00
Todd Volkert 1170105eae
flutter update-packages --force-upgrade (#36510) 2019-07-18 22:21:58 -07:00
Jonah Williams 93edc014ae
update packages (#35573) 2019-07-04 11:26:19 -07:00
Todd Volkert 04e2f22650
Force-upgrade package deps (#35206) 2019-06-27 14:02:23 -07:00
Alexandre Ardhuin 919dcf53f3
enable lints prefer_spread_collections and prefer_inlined_adds (#35189) 2019-06-27 21:23:16 +02:00
Dan Field 2ee297b0d0
Fix source-links (#34831) 2019-06-20 22:08:52 -07:00
Dan Field 1e05bb5b5d
Make docs do less work/be less flaky (#34818) 2019-06-20 17:59:37 -07:00
Ian Hickson d310d31de3
Roll pub dependencies (#33677) 2019-06-13 18:07:16 -07:00
Todd Volkert fb2f18e7e8
Prepare for Uint8List SDK breaking changes (#34295)
https://github.com/dart-lang/sdk/issues/36900
2019-06-12 10:22:50 -07:00
Greg Spencer f0978c225a
Game controller button support (#33868)
This adds support for game controller buttons. It adds some supplemental USB HID codes that aren't available from the Chromium source code, and maps those on Android to the game pad buttons that Android supports. Other platforms are not supported yet.
2019-06-05 16:23:17 -07:00
Greg Spencer 387e2b0602
Add actions and keyboard shortcut map support (#33298)
This implements the keyboard shortcut handling and action invocation in order to provide a place in the infrastructure for keyboard events to trigger actions. This will allow binding of key events to actions like "move the focus to the next widget" and "activate button".
2019-06-04 11:30:24 -07:00
Jonah Williams 83986acbdb
Add a real-er web restart, doctor, workflow (#33786) 2019-06-03 23:19:42 -07:00
Greg Spencer a70b020e18
Add pseudo-key synonyms for keys like shift, meta, alt, and control. (#33695)
This adds a list of key synonyms for non-printable keyboard keys that appear in more than one place So keys like LogicalKeyboardKey.shiftLeft and LogicalKeyboardKey.shiftRight now can be mapped to just LogicalKeyboardKey.shift.

I also fixed a bug in the gen_keycodes tool where GLFW entries would get removed if they weren't parsed from the source on the web.
2019-06-03 18:41:04 -07:00
Chris Bracken 98ea501995
Revert "Add real-er restart for web using webkit inspection protocol (#33629)" (#33703)
Revert "fix devicelab manfiest (#33698)"

This reverts commit 5a6a00dc54.
This reverts commit 0d79f0fc79.
2019-05-31 21:53:30 -07:00
Jonah Williams 5a6a00dc54
Add real-er restart for web using webkit inspection protocol (#33629) 2019-05-31 17:37:01 -07:00
Greg Spencer c289c99858
Update the keycodes from source (#33632)
Ran gen_keycodes.dart, which pulled a new keycode from the Chromium source. This PR just checks in that change.
2019-05-31 09:41:14 -07:00
Dan Field 0df3ec6bcb
Remove obsolete TOODs (#33554) 2019-05-30 08:09:15 -07:00
Jason Simmons 311cde98a6
Reland "Clean up some flutter_tools tests and roll dependencies" (#33225)
This relands flutter/flutter#33163 with a fix to the integration_ui test.
2019-05-29 19:04:35 -07:00
Jonah Williams 925f5f1c53
Revert "Wire up hot restart and incremental rebuilds for web (#33197)" (#33529)
This reverts commit 52ae99682e.
2019-05-29 12:09:01 -07:00
Jonah Williams 52ae99682e
Wire up hot restart and incremental rebuilds for web (#33197) 2019-05-29 09:49:16 -07:00