Repository: flutter
Issue: [intl] Add support for the "Toki Pona" language
Labels: c: new feature,tool,framework,a: internationalization,c: proposal,P3,team-framework,triaged-framework

I am using the “tok” language code for Toki Pona. According to https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry, it is a valid language code.

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Create a new project with `flutter create` <!-- (see "Code sample" section below) -->
2. Add the `intl` package to `pubspec.yaml`, and do `flutter pub get`
3. Enable the `generate: true` flag in `pubspec.yaml`
4. Create a `l10n.yaml` file in the project root with the contents below
5. Create `project_root/lib/app_tok.arb` file with the contents below
6. Run `flutter gen-l10n`
<details><summary>l10n.yaml</summary>


```yaml
arb-dir: lib/l10n/
template-arb-file: app_tok.arb
output-localization-file: app_localizations.dart
```
</details>

<details><summary>lib/l10n/app_tok.arb</summary>

```json
{
    "helloWorld": "ma o, toki!",
    "@helloWorld": {
      "description": "The conventional newborn programmer greeting"
    }
}
```
</details>

**Expected results:** <!-- what did you want to see? --> The l10n files are generated successfully.

**Actual results:** <!-- what did you see? --> The .arb file's locale could not be determined.


<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue. If there is a crash, please include
      the entirety of the crash log including the backtrace.
-->

```
flutter gen-l10n --verbose
[  +70 ms] executing: uname -m
[  +33 ms] Exit code 0 from: uname -m
[        ] x86_64
[   +5 ms] executing: [/home/beltza/projects/flutter/] git -c
log.showSignature=false log -n 1 --pretty=format:%H
[  +12 ms] Exit code 0 from: git -c log.showSignature=false log -n 1
--pretty=format:%H
[        ] 3d2de8b1d8f68e57038e26d376b682b198845375
[        ] executing: [/home/beltza/projects/flutter/] git tag --points-at
3d2de8b1d8f68e57038e26d376b682b198845375
[  +17 ms] Exit code 0 from: git tag --points-at
3d2de8b1d8f68e57038e26d376b682b198845375
[   +1 ms] executing: [/home/beltza/projects/flutter/] git describe --match
*.*.* --long --tags 3d2de8b1d8f68e57038e26d376b682b198845375
[  +69 ms] Exit code 0 from: git describe --match *.*.* --long --tags
3d2de8b1d8f68e57038e26d376b682b198845375
[        ] 3.0.0-0.0.pre-2193-g3d2de8b1d8
[  +52 ms] executing: [/home/beltza/projects/flutter/] git rev-parse
--abbrev-ref --symbolic @{upstream}
[   +7 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{upstream}
[        ] origin/master
[        ] executing: [/home/beltza/projects/flutter/] git ls-remote --get-url
origin
[   +6 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +43 ms] executing: [/home/beltza/projects/flutter/] git rev-parse
--abbrev-ref HEAD
[   +7 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[  +58 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not
required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping
update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required,
skipping update.
[  +52 ms] Artifact Instance of 'MaterialFonts' is not required, skipping
update.
[        ] Artifact Instance of 'GradleWrapper' is not required, skipping
update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not
required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping
update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required,
skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping
update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required,
skipping update.
[        ] Artifact Instance of 'PubDependencies' is not required, skipping
update.
[  +77 ms] Because l10n.yaml exists, the options defined there will be used
instead.
           To use the command line arguments, delete the l10n.yaml file in the
Flutter
           project.


[ +111 ms] "flutter gen-l10n" took 273ms.
[   +5 ms] The following .arb file's locale could not be determined:
           /home/beltza/projects/flutterissue/tokipona/lib/l10n/app_tok.arb
           Make sure that the locale is specified in the file's '@@locale'
property or as
           part of the filename (e.g. file_en.arb)
[   +4 ms]
           #0      throwToolExit
(package:flutter_tools/src/base/common.dart:10:3)
           #1      generateLocalizations
           (package:flutter_tools/src/localizations/gen_l10n.dart:72:5)
           #2      GenerateLocalizationsCommand.runCommand

(package:flutter_tools/src/commands/generate_localizations.dart:210:7)
           #3      FlutterCommand.verifyThenRunCommand
           (package:flutter_tools/src/runner/flutter_command.dart:1375:12)
           <asynchronous suspension>
           #4      FlutterCommand.run.<anonymous closure>
           (package:flutter_tools/src/runner/flutter_command.dart:1209:27)
           <asynchronous suspension>
           #5      AppContext.run.<anonymous closure>
           (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #6      CommandRunner.runCommand
(package:args/command_runner.dart:209:13)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand.<anonymous closure>

(package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
           <asynchronous suspension>
           #8      AppContext.run.<anonymous closure>
           (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #9      FlutterCommandRunner.runCommand

(package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
           <asynchronous suspension>
           #10     run.<anonymous closure>.<anonymous closure>
           (package:flutter_tools/runner.dart:62:9)
           <asynchronous suspension>
           #11     AppContext.run.<anonymous closure>
           (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #12     main (package:flutter_tools/executable.dart:91:3)
           <asynchronous suspension>


[ +131 ms] ensureAnalyticsSent: 129ms
[   +1 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 1
```

<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->

```
flutter analyze
Generating synthetic localizations package failed with 1 error:

Exception: The following .arb file's locale could not be determined:
/home/beltza/projects/flutterissue/tokipona/lib/l10n/app_tok.arb
Make sure that the locale is specified in the file's '@@locale' property or as part of the filename (e.g.
file_en.arb)
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
flutter doctor -v
[✓] Flutter (Channel master, 3.1.0-0.0.pre.2193, on Linux Mint 20.3 5.18.16-xanmod1, locale en_US.UTF-8)
    • Flutter version 3.1.0-0.0.pre.2193 on channel master at /home/beltza/projects/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 3d2de8b1d8 (2 weeks ago), 2022-08-10 10:52:22 -0400
    • Engine revision 91f4618f13
    • Dart version 2.19.0 (build 2.19.0-83.0.dev)
    • DevTools version 2.16.0

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /home/beltzal/Android/Sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 2021.2)
    • Android Studio at /home/beltzal/Programs/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Linux Mint 20.3 5.18.16-xanmod1
    • Chrome (web)    • chrome • web-javascript • Brave Browser 104.1.42.88

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.
```

</details>


<!--
      Consider also attaching screenshots and/or videos to better
      illustrate the issue.

      You can upload them directly on GitHub.
      Beware that video file size is limited to 10MB.
-->