Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes timeago translations by initializing locale messages for the timeago package. The change ensures that relative time formatting (e.g., "2 hours ago") is properly localized across all supported languages in the Mosquito Alert mobile app.
Key changes:
- Initialized timeago locale messages in the Application singleton constructor
- Added a mapping of language codes to their corresponding timeago message classes
- Updated the supported languages list to include previously missing Bengali (bn) and Swedish (sv)
| 'fr': timeago.FrMessages(), | ||
| 'fr_short': timeago.FrShortMessages(), | ||
| 'hr': timeago.HrMessages(), | ||
| 'hr_short': timeago.HrMessages(), |
There was a problem hiding this comment.
The short Croatian locale should use timeago.HrShortMessages() instead of timeago.HrMessages() to maintain consistency with other language short variants.
| 'hr_short': timeago.HrMessages(), | |
| 'hr_short': timeago.HrShortMessages(), |
| 'tr': timeago.TrMessages(), | ||
| 'tr_short': timeago.TrShortMessages(), | ||
| 'zh': timeago.ZhCnMessages(), | ||
| 'zh_short': timeago.ZhCnMessages(), |
There was a problem hiding this comment.
The short Chinese locale should use timeago.ZhCnShortMessages() instead of timeago.ZhCnMessages() to maintain consistency with other language short variants.
| 'zh_short': timeago.ZhCnMessages(), | |
| 'zh_short': timeago.ZhCnShortMessages(), |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #647 +/- ##
==========================================
- Coverage 25.75% 25.60% -0.15%
==========================================
Files 25 26 +1
Lines 1658 1695 +37
==========================================
+ Hits 427 434 +7
- Misses 1231 1261 +30
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Closing in favor of #648 |
No description provided.