aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/lib/i18n
diff options
context:
space:
mode:
authorDaksh Pareek <dakshpareek7@gmail.com>2025-01-12 21:53:34 +0530
committerGitHub <noreply@github.com>2025-01-12 16:23:34 +0000
commitb6293d118e7545b81e216073e66cd54c5b1a0b00 (patch)
tree19c2308ea7ea26593d890770945a2c5c71440048 /apps/web/lib/i18n
parentb8bd7d7eb27aaaadae728599f64a0874f66196ea (diff)
downloadkarakeep-b6293d118e7545b81e216073e66cd54c5b1a0b00.tar.zst
feat: Add Bookmark Sorting Feature (#812)
* feat: add bookmark sorting by creation date - Add sort order toggle in GlobalActions component - Implement ascending/descending sort functionality - Update translations for sorting feature in all languages - Add sort order icons and dropdown menu - Maintain sort preference in URL params * feat: add bookmark sorting by creation date - Add sort order toggle in GlobalActions component - Implement ascending/descending sort functionality - Update translations for sorting feature in all languages - Add sort order icons and dropdown menu - Maintain sort preference in URL params during session Note: Sort order resets to default on page refresh, server-side persistence can be implemented in future enhancement * feat: Add global sort by date feature with shared sort order state - Implement global sort order functionality using a shared Zustand store (`useSortOrder` hook). - Update `getBookmarks` and `searchBookmarks` endpoints to accept a `sortOrder` parameter. - Refactor code to import `ZSortOrder` from shared types (`bookmarks.ts`), ensuring consistency across the codebase. - Update components (`UpdatableBookmarksGrid`, `bookmark-search`) to use the shared `useSortOrder` hook. - Remove unused `zSortBy` definition from `packages/shared/types/bookmarks.ts` to avoid confusion. - Ensure consistent naming conventions by prefixing Zod inferred types with `Z`. - Clean up code and address previous PR feedback comments. * tiny fixes and fixing TS errors --------- Co-authored-by: Mohamed Bassem <me@mbassem.com>
Diffstat (limited to 'apps/web/lib/i18n')
-rw-r--r--apps/web/lib/i18n/locales/da/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/de/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/en/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/es/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/fr/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/hr/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/it/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/ja/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/nl/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/pl/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/ru/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/sv/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/tr/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/zh/translation.json7
-rw-r--r--apps/web/lib/i18n/locales/zhtw/translation.json7
15 files changed, 90 insertions, 15 deletions
diff --git a/apps/web/lib/i18n/locales/da/translation.json b/apps/web/lib/i18n/locales/da/translation.json
index 2ef97e76..d4744bac 100644
--- a/apps/web/lib/i18n/locales/da/translation.json
+++ b/apps/web/lib/i18n/locales/da/translation.json
@@ -30,7 +30,12 @@
"close": "Luk",
"edit_tags": "Rediger tags",
"save": "Gem",
- "merge": "Sammenflet"
+ "merge": "Sammenflet",
+ "sort": {
+ "title": "Sortér",
+ "newest_first": "Nyeste først",
+ "oldest_first": "Ældste først"
+ }
},
"settings": {
"import": {
diff --git a/apps/web/lib/i18n/locales/de/translation.json b/apps/web/lib/i18n/locales/de/translation.json
index d868b7f9..cb376be6 100644
--- a/apps/web/lib/i18n/locales/de/translation.json
+++ b/apps/web/lib/i18n/locales/de/translation.json
@@ -63,7 +63,12 @@
"cancel": "Abbrechen",
"apply_all": "Alle anwenden",
"ignore": "Ignorieren",
- "recrawl": "Erneutes Crawlen"
+ "recrawl": "Erneutes Crawlen",
+ "sort": {
+ "title": "Sortieren",
+ "newest_first": "Neueste zuerst",
+ "oldest_first": "Älteste zuerst"
+ }
},
"settings": {
"back_to_app": "Zurück zur App",
diff --git a/apps/web/lib/i18n/locales/en/translation.json b/apps/web/lib/i18n/locales/en/translation.json
index d23d5a96..ac08fa3f 100644
--- a/apps/web/lib/i18n/locales/en/translation.json
+++ b/apps/web/lib/i18n/locales/en/translation.json
@@ -63,7 +63,12 @@
"merge": "Merge",
"cancel": "Cancel",
"apply_all": "Apply All",
- "ignore": "Ignore"
+ "ignore": "Ignore",
+ "sort": {
+ "title": "Sort",
+ "newest_first": "Newest First",
+ "oldest_first": "Oldest First"
+ }
},
"highlights": {
"no_highlights": "You don't have any highlights yet."
diff --git a/apps/web/lib/i18n/locales/es/translation.json b/apps/web/lib/i18n/locales/es/translation.json
index 55e60ab5..40c6cb01 100644
--- a/apps/web/lib/i18n/locales/es/translation.json
+++ b/apps/web/lib/i18n/locales/es/translation.json
@@ -107,7 +107,12 @@
"recrawl": "Volver a crawlear",
"close_bulk_edit": "Cerrar editor en masa",
"bulk_edit": "Editar en masa",
- "manage_lists": "Administrar listas"
+ "manage_lists": "Administrar listas",
+ "sort": {
+ "title": "Ordenar",
+ "newest_first": "Más recientes primero",
+ "oldest_first": "Más antiguos primero"
+ }
},
"layouts": {
"compact": "Compacto",
diff --git a/apps/web/lib/i18n/locales/fr/translation.json b/apps/web/lib/i18n/locales/fr/translation.json
index 142e9148..dade8d21 100644
--- a/apps/web/lib/i18n/locales/fr/translation.json
+++ b/apps/web/lib/i18n/locales/fr/translation.json
@@ -60,7 +60,12 @@
"merge": "Fusionner",
"cancel": "Annuler",
"apply_all": "Tout appliquer",
- "ignore": "Ignorer"
+ "ignore": "Ignorer",
+ "sort": {
+ "title": "Trier",
+ "newest_first": "Plus récents d'abord",
+ "oldest_first": "Plus anciens d'abord"
+ }
},
"settings": {
"back_to_app": "Retour à l'application",
diff --git a/apps/web/lib/i18n/locales/hr/translation.json b/apps/web/lib/i18n/locales/hr/translation.json
index 83ae3851..6e250924 100644
--- a/apps/web/lib/i18n/locales/hr/translation.json
+++ b/apps/web/lib/i18n/locales/hr/translation.json
@@ -153,7 +153,12 @@
"close": "Zatvori",
"merge": "Spoji",
"cancel": "Otkaži",
- "apply_all": "Primijeni sve"
+ "apply_all": "Primijeni sve",
+ "sort": {
+ "title": "Sortiraj",
+ "newest_first": "Najnovije prvo",
+ "oldest_first": "Najstarije prvo"
+ }
},
"highlights": {
"no_highlights": "Još nemate nijednu istaknutu stavku."
diff --git a/apps/web/lib/i18n/locales/it/translation.json b/apps/web/lib/i18n/locales/it/translation.json
index 6479f6c8..e24b6b7f 100644
--- a/apps/web/lib/i18n/locales/it/translation.json
+++ b/apps/web/lib/i18n/locales/it/translation.json
@@ -30,7 +30,12 @@
"merge": "Unisci",
"cancel": "Cancella",
"apply_all": "Applica a tutto",
- "copy_link": "Copia link"
+ "copy_link": "Copia link",
+ "sort": {
+ "title": "Ordina",
+ "newest_first": "Prima i più recenti",
+ "oldest_first": "Prima i più vecchi"
+ }
},
"common": {
"attachments": "Allegati",
diff --git a/apps/web/lib/i18n/locales/ja/translation.json b/apps/web/lib/i18n/locales/ja/translation.json
index e44603bb..76767fcc 100644
--- a/apps/web/lib/i18n/locales/ja/translation.json
+++ b/apps/web/lib/i18n/locales/ja/translation.json
@@ -30,7 +30,12 @@
"recrawl": "再クロール",
"ignore": "無視する",
"cancel": "キャンセル",
- "download_full_page_archive": "全てのページアーカイブをダウンロード"
+ "download_full_page_archive": "全てのページアーカイブをダウンロード",
+ "sort": {
+ "title": "並び替え",
+ "newest_first": "新しい順",
+ "oldest_first": "古い順"
+ }
},
"admin": {
"actions": {
diff --git a/apps/web/lib/i18n/locales/nl/translation.json b/apps/web/lib/i18n/locales/nl/translation.json
index 08953704..569e38bc 100644
--- a/apps/web/lib/i18n/locales/nl/translation.json
+++ b/apps/web/lib/i18n/locales/nl/translation.json
@@ -62,7 +62,12 @@
"close": "Sluiten",
"merge": "Samenvoegen",
"cancel": "Annuleer",
- "ignore": "Negeren"
+ "ignore": "Negeren",
+ "sort": {
+ "title": "Sorteren",
+ "newest_first": "Nieuwste eerst",
+ "oldest_first": "Oudste eerst"
+ }
},
"settings": {
"ai": {
diff --git a/apps/web/lib/i18n/locales/pl/translation.json b/apps/web/lib/i18n/locales/pl/translation.json
index b072b56d..0d026542 100644
--- a/apps/web/lib/i18n/locales/pl/translation.json
+++ b/apps/web/lib/i18n/locales/pl/translation.json
@@ -55,7 +55,12 @@
"sign_out": "Wyloguj się",
"merge": "Scal",
"cancel": "Anuluj",
- "apply_all": "Zastosuj wszystko"
+ "apply_all": "Zastosuj wszystko",
+ "sort": {
+ "title": "Sortowanie",
+ "newest_first": "Najnowsze pierwsze",
+ "oldest_first": "Najstarsze pierwsze"
+ }
},
"settings": {
"info": {
diff --git a/apps/web/lib/i18n/locales/ru/translation.json b/apps/web/lib/i18n/locales/ru/translation.json
index eabe2e3f..4a8cdd52 100644
--- a/apps/web/lib/i18n/locales/ru/translation.json
+++ b/apps/web/lib/i18n/locales/ru/translation.json
@@ -110,7 +110,12 @@
"copy_link": "Скопировать ссылку",
"unselect_all": "Отменить выбор",
"select_all": "Выбрать все",
- "apply_all": "Применить всё"
+ "apply_all": "Применить всё",
+ "sort": {
+ "title": "Сортировка",
+ "newest_first": "Сначала новые",
+ "oldest_first": "Сначала старые"
+ }
},
"editor": {
"text_toolbar": {
diff --git a/apps/web/lib/i18n/locales/sv/translation.json b/apps/web/lib/i18n/locales/sv/translation.json
index 9adf3bec..26db4c88 100644
--- a/apps/web/lib/i18n/locales/sv/translation.json
+++ b/apps/web/lib/i18n/locales/sv/translation.json
@@ -55,7 +55,12 @@
"edit_tags": "Ändra taggar",
"summarize_with_ai": "Sammanfatta med AI",
"save": "Spara",
- "merge": "Sammanfoga"
+ "merge": "Sammanfoga",
+ "sort": {
+ "title": "Sortera",
+ "newest_first": "Nyast först",
+ "oldest_first": "Äldst först"
+ }
},
"settings": {
"back_to_app": "Tillbaka till app",
diff --git a/apps/web/lib/i18n/locales/tr/translation.json b/apps/web/lib/i18n/locales/tr/translation.json
index b14df6d7..9840c6f0 100644
--- a/apps/web/lib/i18n/locales/tr/translation.json
+++ b/apps/web/lib/i18n/locales/tr/translation.json
@@ -63,7 +63,12 @@
"merge": "Birleştir",
"cancel": "İptal",
"apply_all": "Hepsine Uygula",
- "ignore": "Yoksay"
+ "ignore": "Yoksay",
+ "sort": {
+ "title": "Sırala",
+ "newest_first": "En yeni önce",
+ "oldest_first": "En eski önce"
+ }
},
"highlights": {
"no_highlights": "Henüz hiçbir öne çıkarılmış içeriğiniz yok."
diff --git a/apps/web/lib/i18n/locales/zh/translation.json b/apps/web/lib/i18n/locales/zh/translation.json
index be09b221..87d098a6 100644
--- a/apps/web/lib/i18n/locales/zh/translation.json
+++ b/apps/web/lib/i18n/locales/zh/translation.json
@@ -61,7 +61,12 @@
"cancel": "取消",
"apply_all": "全部应用",
"ignore": "忽略",
- "recrawl": "重新抓取"
+ "recrawl": "重新抓取",
+ "sort": {
+ "title": "排序",
+ "newest_first": "最新优先",
+ "oldest_first": "最早优先"
+ }
},
"settings": {
"back_to_app": "返回应用",
diff --git a/apps/web/lib/i18n/locales/zhtw/translation.json b/apps/web/lib/i18n/locales/zhtw/translation.json
index bcdb83fb..693b0c0a 100644
--- a/apps/web/lib/i18n/locales/zhtw/translation.json
+++ b/apps/web/lib/i18n/locales/zhtw/translation.json
@@ -60,7 +60,12 @@
"merge": "合併",
"cancel": "取消",
"apply_all": "全部套用",
- "ignore": "忽略"
+ "ignore": "忽略",
+ "sort": {
+ "title": "排序",
+ "newest_first": "最新優先",
+ "oldest_first": "最舊優先"
+ }
},
"settings": {
"back_to_app": "返回應用程式",