Andrew Kolos be724796aa
update generated localized message files in the stocks test app (#148741)
Fixes https://github.com/flutter/flutter/issues/149386. Fixes https://github.com/flutter/flutter/issues/106150.

The stocks test app includes Dart files containing localized messages generated by `package:flutter_localizations`. However, these files appear to have become out of date. Running `pub get` in the project will regenerate these files and generate a diff, which can be annoying when working on the repo.

This PR generates the files. ~~It also updates the templates for these files to be compliant with flutter/flutter repo lint rules, including `noop_primitive_operations` and `use_super_parameters`.~~ It also adds `// ignore_for_file: type=lint` to these files to disable linting for these files. This avoids issues like  https://github.com/flutter/flutter/issues/106150 and [this](https://github.com/flutter/flutter/pull/148741#issuecomment-2141161753).
2024-06-03 18:08:19 +00:00

1.0 KiB

Regenerating the i18n files

The arb files in this directory are used to generate stock_strings.dart, which contains the StockStrings class. This localizations class is used by the stocks application to look up localized message strings. The stocks app uses the Dart intl package.

To update the English and Spanish localizations, modify the stocks_en_US.arb, stocks_en.arb, or stocks_es.arb files. See the ARB specification for more info.

To modify the project's configuration of the localizations tool, change the l10n.yaml file.

The StockStrings class creates a delegate that performs message lookups based on the locale of the device. In this case, the stocks app supports en, en_US, and es locales. Thus, the StockStringsEn and StockStringsEs classes extends StockStrings. StockStringsEnUs extends StockStringsEn. This allows StockStringsEnUs to fall back on messages in StockStringsEn.