aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/lib/i18n
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-11-09 11:52:39 +0000
committerGitHub <noreply@github.com>2025-11-09 11:52:39 +0000
commit725b5218ea03d677cebbe62aadd2d227f8b6e214 (patch)
treea4abbbb7fc0b62d6dda468b4e3eac0c684266fb2 /apps/web/lib/i18n
parent3083be0c9dc9ec0ded58eda937b83fbdf511f386 (diff)
downloadkarakeep-725b5218ea03d677cebbe62aadd2d227f8b6e214.tar.zst
feat: Add bookmark sources statistics section (#2110)
* feat: add bookmark sources statistics to usage stats page Add a new section to the usage statistics page that displays stats about bookmark sources (mobile, extension, web, API, CLI, etc). Changes: - Add bookmarksBySource field to user stats response schema - Implement backend query to fetch bookmarks grouped by source - Add new "Bookmark Sources" card to stats page UI - Add helper function to format source names for display * refactor: use stricter enum type for bookmark sources in stats API Replace generic string type with zBookmarkSourceSchema enum for better type safety and autocomplete. This ensures the API contract matches the database schema definition. Changes: - Import and use zBookmarkSourceSchema in user stats response - Define BookmarkSource type alias in frontend - Update formatSourceName to use stricter type and return non-nullable - Remove fallback case since all enum values are now handled * refactor: use shared BookmarkSource type and add i18n support - Replace local BookmarkSource type with canonical type from shared package using z.infer<typeof zBookmarkSourceSchema> - Add translation support for "Bookmark Sources" title and empty state - Add bookmark_sources.title and bookmark_sources.empty keys to English locale file This ensures type consistency across the codebase and prepares for future localization of the bookmark sources feature. * fix icons --------- Co-authored-by: Claude <noreply@anthropic.com>
Diffstat (limited to 'apps/web/lib/i18n')
-rw-r--r--apps/web/lib/i18n/locales/en/translation.json4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/web/lib/i18n/locales/en/translation.json b/apps/web/lib/i18n/locales/en/translation.json
index f582cd9b..4fc58be7 100644
--- a/apps/web/lib/i18n/locales/en/translation.json
+++ b/apps/web/lib/i18n/locales/en/translation.json
@@ -181,6 +181,10 @@
},
"storage_breakdown": {
"title": "Storage Breakdown"
+ },
+ "bookmark_sources": {
+ "title": "Bookmark Sources",
+ "empty": "No source data available"
}
},
"ai": {