-
Notifications
You must be signed in to change notification settings - Fork 814
refactor: using natural casing in translations #2804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideThis PR shifts text casing responsibility from localization files to the UI layer by converting all ALL-CAPS translation entries to natural case and replacing inline uppercase strings in the UI with calls to toUpperCase() as needed. Class diagram for AppLocalizations and AppLocalizationsEn translation casing changesclassDiagram
class AppLocalizations {
+String oscilloscope
+String multimeter
+String logicAnalyzer
+String sensors
+String waveGenerator
+String powerSource
+String luxMeter
+String accelerometer
+String barometer
+String compass
+String gyroscope
+String thermometer
+String roboticArm
+String gasSensor
+String dustSensor
+String soundMeter
+String bluetooth
+String wifi
+String analysisOptionEveryEdge
+String analysisOptionEveryFallingEdge
+String analysisOptionEveryRisingEdge
+String analysisOptionEveryFourthRisingEdge
+String analysisOptionDisabled
+String analyze
+String cancel
+String low
+String high
}
class AppLocalizationsEn {
+String oscilloscope = "Oscilloscope"
+String multimeter = "Multimeter"
+String logicAnalyzer = "Logic Analyzer"
+String sensors = "Sensors"
+String waveGenerator = "Wave Generator"
+String powerSource = "Power Source"
+String luxMeter = "Lux Meter"
+String accelerometer = "Accelerometer"
+String barometer = "Barometer"
+String compass = "Compass"
+String gyroscope = "Gyroscope"
+String thermometer = "Thermometer"
+String roboticArm = "Robotic Arm"
+String gasSensor = "Gas Sensor"
+String dustSensor = "Dust Sensor"
+String soundMeter = "Sound Meter"
+String bluetooth = "Bluetooth"
+String wifi = "Wifi"
+String analysisOptionEveryEdge = "Every Edge"
+String analysisOptionEveryFallingEdge = "Every Falling Edge"
+String analysisOptionEveryRisingEdge = "Every Rising Edge"
+String analysisOptionEveryFourthRisingEdge = "Every Fourth Rising Edge"
+String analysisOptionDisabled = "Disabled"
+String analyze = "Analyze"
+String cancel = "Cancel"
+String low = "Low"
+String high = "High"
}
AppLocalizationsEn --|> AppLocalizations
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @AsCress - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `lib/l10n/app_localizations.dart:544` </location>
<code_context>
/// No description provided for @wifi.
///
/// In en, this message translates to:
- /// **'WIFI'**
+ /// **'Wifi'**
String get wifi;
</code_context>
<issue_to_address>
Consider using 'Wi-Fi' instead of 'Wifi' in documentation.
'Wi-Fi' is the standard spelling and improves clarity.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
/// No description provided for @wifi.
///
/// In en, this message translates to:
=======
/// No description provided for @wifi.
///
/// In en, this message translates to:
/// **'Wi-Fi'**
>>>>>>> REPLACE
</suggested_fix>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Build successful. APKs to test: https://github.com/fossasia/pslab-app/actions/runs/16629218184/artifacts/3651114895 |
Please follow best practices and mention the issue this PR resolves in the description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor change. Rest looks good.
@CloudyPadmal Thanks for the review ! Made the changes. |
Resolves #2794.
Refactors our translations to use natural casing.
Replaces the ALL CAPS translations and uses
toUpperCase()
instead to handling casing at a UI level.Summary by Sourcery
Refactor English translations to use natural casing and move uppercase formatting to the UI layer.
Enhancements: