Repository navigation
Add an opt-in Filipino-in-Baybayin locale pilot - #321
Merged
Merged
Conversation
- Register NotoSansTagalog in the theme font fallback list alongside NotoSansSC for the Baybayin pilot - Use kAppLocalizationsDelegates and resolveAppLocale for locale handling in the app widget
Also add Noto Sans Tagalog license to the app info screen.
Introduce the tl-Tglg locale as a script-specific opt-in: script matching keeps ordinary tl devices from selecting it, and stored locale tags are parsed script-aware. The pilot inherits English ICU rules so untranslated messages pluralize correctly while Localizations still reports the Tagalog-in-Baybayin locale.
Bundle Noto Sans Tagalog, add a 50-message tl_Tglg draft with Latin transliterations, and wire a language option with review docs and tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces an experimental, explicitly opt-in
tl_Tglglocale so Baybayin canbe reviewed in the real UI without changing what any existing device shows.
Script-aware, opt-in locale
kBaybayinLocale = Locale.fromSubtags(languageCode: 'tl', scriptCode: 'Tglg')to the supported locales after English and Chinese.resolveSupportedLocalenow tries an exact match, then a script match, and only then a language-only match that requires the supported locale to have no script. A plaintl,tl_PH,tl_Latn, orfildevice therefore never activates the pilot.resolveAppLocaletoMaterialAppso Flutter's default language-only fallback cannot select the script-specific entry.LocaleController.selectnormalizes through the same resolver, and stored values useLocale.toString().Partial pilot strings
app_tl.arbis an intentionally empty generator base;app_tl_Tglg.arbcarries 50 draft messages withx-latintransliterations andx-review-status. Everything not translated falls back to English.lookupFlickLocalizationsplus a first-priority Baybayin delegate. ItslocaleNameis overridden toenso inherited English text uses English ICU rules (an untranslatedsongUnit(0)says "song", not the Tagalog form) whileLocalizations.localeOf(context)still reportstl_Tglgand built-in Material controls use Tagalog.baybayinPilotDescriptionwarning ("Experimental draft; untranslated text stays in English") to the English, Tagalog and Chinese ARBs.Language settings
LanguageSettingsCardand uses it from Interface settings.Font and licensing
NotoSansTagalog-Regular.ttfand its OFL license, registers it inAppTheme.fontFamilyFallbackso Baybayin renders in the selector before the locale is selected, and adds the license to the app info screen.Review workflow
docs/BAYBAYIN_REVIEW.md: the pilot is explicitly unverified, documents the chosen conventions (modern final-consonant virama U+1714, shared da/ra, e/i and o/u), and carries a 50-row review sheet with English, UI context, Latin Tagalog, Baybayin and status.Tests
baybayin_pilot_test.dart: pilot is explicit, every draft has context, placeholders preserved, reviewer corrections reach labels and related forms, plurals/arguments survive generation, table/ARB sync.baybayin_layout_test.dart: selector survives narrow screens and enlarged text, can enter Baybayin and escape to English, and Baybayin navigation fits without changing music metadata.locale_switch_test.dart: script-specific locales are never matched by language alone, persisted reloads keep the script, legacy/script/region/malformed stored tags resolve safely, Filipino device locales stay on English, and switches reach widgets and services.Related issue
none
Checklist
flutter analyzepassesflutter testpassescargo test --manifest-path rust/Cargo.tomlpassesflutter run --flavor full)CHANGELOG.mdupdated for user-facing changes