-
Notifications
You must be signed in to change notification settings - Fork 813
Closed
Description
Currently, many translation values in the .arb
files (e.g. oscilloscope
, multimeter
, etc.) are written in ALL CAPS. This practice is not recommended for the following reasons:
Problems with ALL CAPS in .arb
Files
- Reduces accessibility: screen readers may misread or skip fully capitalized text
- Limits flexibility: cannot style text differently for various UI contexts
- Confuses translators: capitalization rules vary by language
- Pollutes generated Dart files: localization comments reflect the ALL CAPS
Recommended Changes
-
Update all strings in
.arb
files from ALL CAPS to natural casing:-
Example:
"oscilloscope": "Oscilloscope"
instead of
"oscilloscope": "OSCILLOSCOPE"
-
-
Apply styling in UI code, not in localization:
- Use
.toUpperCase()
in widgets where uppercase is needed visually. - Avoid hardcoding casing into translations.
- Use
-
Regenerate the Dart localization files:
-
Use
flutter gen-l10n
after updating the.arb
files. -
This will reflect correct casing in:
/// In en, this message translates to: /// **'Oscilloscope'**
-
Benefits
- Clean and accessible translation files
- Proper styling separation (translation vs. presentation)
- Easier for translators and contributors to understand
- Future-proof localization setup across languages and devices
AsCress
Metadata
Metadata
Assignees
Labels
No labels