Skip to content

Fix timeago translations#647

Closed
epou wants to merge 1 commit intomainfrom
fix_timeago_translations
Closed

Fix timeago translations#647
epou wants to merge 1 commit intomainfrom
fix_timeago_translations

Conversation

@epou
Copy link
Member

@epou epou commented Nov 14, 2025

No description provided.

@epou epou requested a review from Copilot November 14, 2025 10:58
@epou epou self-assigned this Nov 14, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(),
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The short Croatian locale should use timeago.HrShortMessages() instead of timeago.HrMessages() to maintain consistency with other language short variants.

Suggested change
'hr_short': timeago.HrMessages(),
'hr_short': timeago.HrShortMessages(),

Copilot uses AI. Check for mistakes.
'tr': timeago.TrMessages(),
'tr_short': timeago.TrShortMessages(),
'zh': timeago.ZhCnMessages(),
'zh_short': timeago.ZhCnMessages(),
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The short Chinese locale should use timeago.ZhCnShortMessages() instead of timeago.ZhCnMessages() to maintain consistency with other language short variants.

Suggested change
'zh_short': timeago.ZhCnMessages(),
'zh_short': timeago.ZhCnShortMessages(),

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.60%. Comparing base (d8dfc4a) to head (6891d86).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
lib/utils/Application.dart 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
unittests 25.60% <0.00%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
lib/utils/Application.dart 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@epou
Copy link
Member Author

epou commented Nov 14, 2025

Closing in favor of #648

@epou epou closed this Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants