mirror of
https://github.com/vide/matedroid.git
synced 2026-01-20 00:03:17 +08:00
* feat(i18n): add localization support for DashboardScreen - Set up localization infrastructure with values-it, values-es, values-ca folders - Extract all hardcoded strings from DashboardScreen to strings.xml - Add Italian, Spanish, and Catalan translations - Include contextual comments for translators Supported languages: English (default), Italian, Spanish, Catalan * feat(i18n): add localization for SettingsScreen - Extract all hardcoded strings from SettingsScreen - Add Italian, Spanish, and Catalan translations - Include contextual comments for server settings, display settings, and advanced options * feat(i18n): add localization for DrivesScreen - Extract all hardcoded strings from DrivesScreen - Add localized filter labels for date and distance filters - Add Italian, Spanish, and Catalan translations for: - Screen title and navigation - Summary card labels - Drive stat labels - Chart titles (drives/time/distance/speed per day/week/month) - Filter chip labels * feat(i18n): add localization for DriveDetailScreen - Extract all hardcoded strings from DriveDetailScreen - Add Italian, Spanish, and Catalan translations for: - Screen title and navigation - Route header (from/to, started/ended) - Stats section titles and labels - Chart titles (speed/power/battery/elevation profiles) * feat(i18n): localize ChargesScreen strings Extract and translate all user-facing strings from ChargesScreen: - Screen title and section headers - Summary card labels (Total Sessions, Total Energy, Total Cost, etc.) - Charge item stat labels (Added, Duration, Cost, Battery) - Empty state message - Chart titles for energy/cost/charges per day/week/month - Filter labels using helper functions for DateFilter and ChargeTypeFilter Translations provided for Italian (it), Spanish (es), and Catalan (ca). * feat(i18n): localize ChargeDetailScreen strings Extract and translate all user-facing strings from ChargeDetailScreen: - Screen title and header labels (Location, Started, Ended) - Stats section titles (Energy, Battery, Power, Charger, Temperature, Cost) - Stats labels (voltage/current max/min/avg, efficiency, etc.) - Chart titles (Power Profile, Voltage Profile, Current Profile, Battery Level) - Map marker title - AC/DC badge text Translations provided for Italian (it), Spanish (es), and Catalan (ca). * feat(i18n): localize BatteryScreen strings Extract and translate all user-facing strings from BatteryScreen: - Screen titles (Battery Health, Battery Detail) - Capacity section (Usable new/now, Rated) - Degradation section (Estimated degradation, Loss kWh/%) - Range section (Max Range new/now, Range loss) - Current charge section - Range information section (Estimated, Rated, Ideal ranges) - Estimated total capacity section - Info dialog titles and messages with explanatory content - Common dialog button text (Got it) Translations provided for Italian (it), Spanish (es), and Catalan (ca). * feat(i18n): localize StatsScreen - Add strings for stats title, sync messages, progress indicators - Localize drives overview and charges overview sections - Localize all record labels (longest drive, top speed, etc.) - Add category names (Drives, Battery, Weather & Altitude, Distances) - Localize temperature extremes and AC/DC ratio cards - Add dialog strings for sync logs, gap records, range records - Add translations for Italian, Spanish, and Catalan Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(i18n): localize MileageScreen - Add strings for mileage title, chart titles (by year/month/day) - Localize empty states (no data, no data for year) - Add summary labels (Total, Avg/Year, Avg/Month, # of drives) - Localize info dialog explaining average per year calculation - Add "Recent trips" and "Drives" section headers - Localize all "View details" content descriptions - Add translations for Italian, Spanish, and Catalan Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(i18n): localize SoftwareVersionsScreen - Add strings for software title, overview card labels - Localize date filter labels (Last 6 months, Last year, All time) - Add update history header and empty state message - Localize version card labels (Current version, Installed, Days, Duration) - Add strings for longest installed badge - Localize chart title and format strings - Add translations for Italian, Spanish, and Catalan Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(i18n): localize common components and weather card - Add fullscreen/exit fullscreen content descriptions - Localize WeatherAlongTheWayCard title, loading, and empty states - Localize weather table headers (Time, Distance, Weather) - Localize weather condition descriptions (Clear sky, Partly cloudy, etc.) - Localize distance markers (Start, End) - Add translations for Italian, Spanish, and Catalan Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs: add localization instructions to DEVELOPMENT.md - Document supported languages (English, Italian, Spanish, Catalan) - Add string naming conventions (snake_case) - Explain how to add new strings with context comments - Document format strings with placeholders - Add instructions for adding new languages - Include testing tips for translations Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(i18n): enable per-app language selection (Android 13+) - Add locale_config.xml declaring supported languages (en, it, es, ca) - Reference locale config in AndroidManifest.xml - Users can now change app language without changing system language Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix(i18n): keep AC/DC untranslated in all languages Technical terms AC (Alternating Current) and DC (Direct Current) are universally understood and should not be translated to CA/CC. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: add lint check for hardcoded strings - Configure Android Lint to treat HardcodedText and SetTextI18n as errors - Add CI workflow that runs lint on every push/PR to main - Build job depends on lint passing - Upload lint report as artifact on failure Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs: add localization rules to CLAUDE.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: combine lint and build into single job Lint requires compilation anyway, so running them in one job allows Gradle to reuse artifacts and is more efficient than two separate jobs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: increase JVM heap to prevent OOM in CI - Increase Gradle daemon heap from 2GB to 4GB - Add HeapDumpOnOutOfMemoryError for debugging - Set test JVM max heap to 1GB Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2.6 KiB
2.6 KiB
RULES TO FOLLOW FOR THIS PROJECT
Development style
- create a new branch and associated Github pull request for each new feature or set of bugfixes.
- automatically commit to git any meaningful change, with a short but clear commit message.
- follow the "Keep a changelog" and Semantic versioning best practices but DO NOT release major versions by yourself. Ask me if you think they might be released.
- create a new release only when specifically told.
- keep an always up-to-date README.md, but don't change its writing style.
- always update
docs/DEVELOPMENT.mdanddocs/ASSETS.mdif anything related to those parts changes.
Charts and graphs
Histograms
- Every histogram bar MUST be tappable, and when tapped it will show a tooltip with its value
- The bars will be in the palette accent color
Line graphs
- The line graph MUST have 4 labels on the Y axis: 1st quarter, half, 3rd quarter, end.
- It MUST have 5 labels on the X axis (which is usually time): start, 1st quarter, half, 3rd quarter, end.
- Tapping on one point of the graph will show a tooltip with the value of the Y axis.
F-Droid and Fastlane
- The app is published on F-Droid, which builds from source.
- Fastlane metadata is stored in
fastlane/metadata/android/en-US/:title.txt,short_description.txt,full_description.txtfor app store listingchangelogs/<versionCode>.txtfor each release (e.g.,12.txtfor versionCode 12)images/icon.png(512x512) andimages/phoneScreenshots/for visuals
- When releasing a new version, create a new changelog file matching the versionCode in
app/build.gradle.kts. - The F-Droid build recipe is stored in
fdroid/com.matedroid.yml(reference copy; actual recipe lives in fdroiddata repo).
Localization
- NEVER hardcode user-visible strings in Kotlin code. Always use
stringResource(R.string.xxx). - When adding new UI text, add the string to all 4 locale files:
res/values/strings.xml(English, default)res/values-it/strings.xml(Italian)res/values-es/strings.xml(Spanish)res/values-ca/strings.xml(Catalan)
- Use snake_case for string names (e.g.,
settings_title,drive_history). - Add XML comments above strings to provide context for translators.
- Technical terms like AC, DC, kW, kWh should NOT be translated.
- Always run
./gradlew lintDebugbefore committing to catch hardcoded strings.
Gotchas and notes
- Always check the local instance of Teslamate API and its documentation to know what's the returned JSON format.
- The TeslamateApi's parseDateParam function only accepts:
- RFC3339 format: 2024-12-07T00:00:00Z
- DateTime format: 2024-12-07 00:00:00