Skip to content

Commit cffc22e

Browse files
committed
feat: internationalize formatTimeAgo function
- Replaced date-fns formatDistanceToNow with custom implementation - Added time_ago translation strings to all locale files - Created comprehensive tests for formatTimeAgo function - Removed date-fns dependency from format.ts
1 parent 0ef9c9a commit cffc22e

File tree

20 files changed

+468
-34
lines changed

20 files changed

+468
-34
lines changed

webview-ui/src/i18n/locales/ca/common.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/de/common.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/en/common.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,21 @@
6767
"editMessage": "Edit Message",
6868
"editWarning": "Editing this message will delete all subsequent messages in the conversation. Do you want to proceed?",
6969
"proceed": "Proceed"
70+
},
71+
"time_ago": {
72+
"just_now": "just now",
73+
"seconds_ago": "{{count}} seconds ago",
74+
"minute_ago": "a minute ago",
75+
"minutes_ago": "{{count}} minutes ago",
76+
"hour_ago": "an hour ago",
77+
"hours_ago": "{{count}} hours ago",
78+
"day_ago": "a day ago",
79+
"days_ago": "{{count}} days ago",
80+
"week_ago": "a week ago",
81+
"weeks_ago": "{{count}} weeks ago",
82+
"month_ago": "a month ago",
83+
"months_ago": "{{count}} months ago",
84+
"year_ago": "a year ago",
85+
"years_ago": "{{count}} years ago"
7086
}
7187
}

webview-ui/src/i18n/locales/es/common.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/fr/common.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/hi/common.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/id/common.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/it/common.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/ja/common.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/ko/common.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)