Skip to content

Commit 60cd7ff

Browse files
rushsteve1fguillot
authored andcommitted
refactor: Replace "Bookmarks" with "Starred"
Replaces usage of the word "bookmark" with "star"/"starred" in order to be more consistent with the UI and database models, and to reduce confusion with "bookmarklet" and integration features. This is in preparation of future work on read-it-later features. Which are also not called "bookmarks" to prevent any further confusion. https://github.com/orgs/miniflux/discussions/3719 Related-to: #2219
1 parent 4d656d2 commit 60cd7ff

37 files changed

+171
-170
lines changed

client/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -650,9 +650,9 @@ func (c *Client) UpdateEntry(entryID int64, entryChanges *EntryModificationReque
650650
return entry, nil
651651
}
652652

653-
// ToggleBookmark toggles entry bookmark value.
654-
func (c *Client) ToggleBookmark(entryID int64) error {
655-
_, err := c.request.Put(fmt.Sprintf("/v1/entries/%d/bookmark", entryID), nil)
653+
// ToggleStarred toggles entry starred value.
654+
func (c *Client) ToggleStarred(entryID int64) error {
655+
_, err := c.request.Put(fmt.Sprintf("/v1/entries/%d/star", entryID), nil)
656656
return err
657657
}
658658

internal/api/api.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ func Serve(router *mux.Router, store *storage.Storage, pool *worker.Pool) {
6767
sr.HandleFunc("/entries", handler.setEntryStatus).Methods(http.MethodPut)
6868
sr.HandleFunc("/entries/{entryID}", handler.getEntry).Methods(http.MethodGet)
6969
sr.HandleFunc("/entries/{entryID}", handler.updateEntry).Methods(http.MethodPut)
70-
sr.HandleFunc("/entries/{entryID}/bookmark", handler.toggleBookmark).Methods(http.MethodPut)
70+
sr.HandleFunc("/entries/{entryID}/bookmark", handler.toggleStarred).Methods(http.MethodPut)
71+
sr.HandleFunc("/entries/{entryID}/star", handler.toggleStarred).Methods(http.MethodPut)
7172
sr.HandleFunc("/entries/{entryID}/save", handler.saveEntry).Methods(http.MethodPost)
7273
sr.HandleFunc("/entries/{entryID}/fetch-content", handler.fetchContent).Methods(http.MethodGet)
7374
sr.HandleFunc("/flush-history", handler.flushHistory).Methods(http.MethodPut, http.MethodDelete)

internal/api/api_integration_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2749,7 +2749,7 @@ func TestUpdateEntryEndpoint(t *testing.T) {
27492749
}
27502750
}
27512751

2752-
func TestToggleBookmarkEndpoint(t *testing.T) {
2752+
func TestToggleStarredEndpoint(t *testing.T) {
27532753
testConfig := newIntegrationTestConfig()
27542754
if !testConfig.isConfigured() {
27552755
t.Skip(skipIntegrationTestsMessage)
@@ -2777,7 +2777,7 @@ func TestToggleBookmarkEndpoint(t *testing.T) {
27772777
t.Fatalf(`Failed to get entries: %v`, err)
27782778
}
27792779

2780-
if err := regularUserClient.ToggleBookmark(result.Entries[0].ID); err != nil {
2780+
if err := regularUserClient.ToggleStarred(result.Entries[0].ID); err != nil {
27812781
t.Fatal(err)
27822782
}
27832783

@@ -2787,7 +2787,7 @@ func TestToggleBookmarkEndpoint(t *testing.T) {
27872787
}
27882788

27892789
if !entry.Starred {
2790-
t.Fatalf(`The entry should be bookmarked`)
2790+
t.Fatalf(`The entry should be starred`)
27912791
}
27922792
}
27932793

internal/api/entry.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ func (h *handler) setEntryStatus(w http.ResponseWriter, r *http.Request) {
186186
json.NoContent(w, r)
187187
}
188188

189-
func (h *handler) toggleBookmark(w http.ResponseWriter, r *http.Request) {
189+
func (h *handler) toggleStarred(w http.ResponseWriter, r *http.Request) {
190190
entryID := request.RouteInt64Param(r, "entryID")
191-
if err := h.store.ToggleBookmark(request.UserID(r), entryID); err != nil {
191+
if err := h.store.ToggleStarred(request.UserID(r), entryID); err != nil {
192192
json.ServerError(w, r, err)
193193
return
194194
}

internal/fever/handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ func (h *handler) handleWriteItems(w http.ResponseWriter, r *http.Request) {
455455
slog.Int64("user_id", userID),
456456
slog.Int64("entry_id", entryID),
457457
)
458-
if err := h.store.ToggleBookmark(userID, entryID); err != nil {
458+
if err := h.store.ToggleStarred(userID, entryID); err != nil {
459459
json.ServerError(w, r, err)
460460
return
461461
}
@@ -474,7 +474,7 @@ func (h *handler) handleWriteItems(w http.ResponseWriter, r *http.Request) {
474474
slog.Int64("user_id", userID),
475475
slog.Int64("entry_id", entryID),
476476
)
477-
if err := h.store.ToggleBookmark(userID, entryID); err != nil {
477+
if err := h.store.ToggleStarred(userID, entryID); err != nil {
478478
json.ServerError(w, r, err)
479479
return
480480
}

internal/googlereader/handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,15 @@ func (h *handler) editTagHandler(w http.ResponseWriter, r *http.Request) {
357357
}
358358

359359
if len(unstarredEntryIDs) > 0 {
360-
err = h.store.SetEntriesBookmarkedState(userID, unstarredEntryIDs, false)
360+
err = h.store.SetEntriesStarredState(userID, unstarredEntryIDs, false)
361361
if err != nil {
362362
json.ServerError(w, r, err)
363363
return
364364
}
365365
}
366366

367367
if len(starredEntryIDs) > 0 {
368-
err = h.store.SetEntriesBookmarkedState(userID, starredEntryIDs, true)
368+
err = h.store.SetEntriesStarredState(userID, starredEntryIDs, true)
369369
if err != nil {
370370
json.ServerError(w, r, err)
371371
return

internal/locale/translations/de_DE.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"alert.account_unlinked": "Ihr externer Account ist jetzt getrennt!",
1616
"alert.background_feed_refresh": "Alle Abonnements werden derzeit im Hintergrund aktualisiert. Sie können Miniflux weiterhin benutzen, während dieser Prozess ausgeführt wird.",
1717
"alert.feed_error": "Es gibt ein Problem mit diesem Abonnement",
18-
"alert.no_bookmark": "Es existiert derzeit kein Lesezeichen.",
18+
"alert.no_starred": "Es existiert derzeit kein Lesezeichen.",
1919
"alert.no_category": "Es ist keine Kategorie vorhanden.",
2020
"alert.no_category_entry": "Es befindet sich kein Artikel in dieser Kategorie.",
2121
"alert.no_feed": "Es sind keine Abonnements vorhanden.",
@@ -46,10 +46,10 @@
4646
"enclosure_media_controls.speed.reset.title": "Wiedergabegeschwindigkeit auf 1x zurücksetzen",
4747
"enclosure_media_controls.speed.slower": "Langsamer",
4848
"enclosure_media_controls.speed.slower.title": "%sx langsamer",
49-
"entry.bookmark.toast.off": "Nicht markiert",
50-
"entry.bookmark.toast.on": "Markiert",
51-
"entry.bookmark.toggle.off": "Lesezeichen entfernen",
52-
"entry.bookmark.toggle.on": "Lesezeichen hinzufügen",
49+
"entry.starred.toast.off": "Nicht markiert",
50+
"entry.starred.toast.on": "Markiert",
51+
"entry.starred.toggle.off": "Lesezeichen entfernen",
52+
"entry.starred.toggle.on": "Lesezeichen hinzufügen",
5353
"entry.comments.label": "Kommentare",
5454
"entry.comments.title": "Kommentare anzeigen",
5555
"entry.estimated_reading_time": [
@@ -517,7 +517,7 @@
517517
"page.keyboard_shortcuts.subtitle.pages": "Navigation zwischen den Seiten",
518518
"page.keyboard_shortcuts.subtitle.sections": "Navigation zwischen den Menüpunkten",
519519
"page.keyboard_shortcuts.title": "Tastenkürzel",
520-
"page.keyboard_shortcuts.toggle_bookmark_status": "Lesezeichen hinzufügen/entfernen",
520+
"page.keyboard_shortcuts.toggle_star_status": "Lesezeichen hinzufügen/entfernen",
521521
"page.keyboard_shortcuts.toggle_entry_attachments": "Artikelanhänge öffnen/schließen",
522522
"page.keyboard_shortcuts.toggle_read_status_next": "Gewählten Artikel als gelesen/ungelesen markieren, nächsten auswählen",
523523
"page.keyboard_shortcuts.toggle_read_status_prev": "Gewählten Artikel als gelesen/ungelesen markieren, vorherigen auswählen",

internal/locale/translations/el_EL.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"alert.account_unlinked": "Ο εξωτερικός σας λογαριασμός είναι πλέον αποσυνδεδεμένος!",
1616
"alert.background_feed_refresh": "Όλες οι ροές ανανεώνονται στο παρασκήνιο. Μπορείτε να συνεχίσετε να χρησιμοποιείτε το Miniflux όσο εκτελείται αυτή η διαδικασία.",
1717
"alert.feed_error": "Υπάρχει πρόβλημα με αυτήν τη ροή",
18-
"alert.no_bookmark": "Δεν υπάρχει σελιδοδείκτης αυτή τη στιγμή.",
18+
"alert.no_starred": "Δεν υπάρχει σελιδοδείκτης αυτή τη στιγμή.",
1919
"alert.no_category": "Δεν υπάρχει κατηγορία.",
2020
"alert.no_category_entry": "Δεν υπάρχουν άρθρα σε αυτήν την κατηγορία.",
2121
"alert.no_feed": "Δεν έχετε συνδρομές.",
@@ -46,10 +46,10 @@
4646
"enclosure_media_controls.speed.reset.title": "Επαναφορά ταχύτητας σε 1x",
4747
"enclosure_media_controls.speed.slower": "Πιο αργά",
4848
"enclosure_media_controls.speed.slower.title": "Πιο αργά κατά %sx",
49-
"entry.bookmark.toast.off": "Μη αγαπημένα",
50-
"entry.bookmark.toast.on": "Αγαπημένα",
51-
"entry.bookmark.toggle.off": "Αναίρεση αγαπημένου",
52-
"entry.bookmark.toggle.on": "Αγαπημένο",
49+
"entry.starred.toast.off": "Μη αγαπημένα",
50+
"entry.starred.toast.on": "Αγαπημένα",
51+
"entry.starred.toggle.off": "Αναίρεση αγαπημένου",
52+
"entry.starred.toggle.on": "Αγαπημένο",
5353
"entry.comments.label": "Σχόλια",
5454
"entry.comments.title": "Δείτε Σχόλια",
5555
"entry.estimated_reading_time": [
@@ -517,7 +517,7 @@
517517
"page.keyboard_shortcuts.subtitle.pages": "Πλοήγηση Σελίδων",
518518
"page.keyboard_shortcuts.subtitle.sections": "Πλοήγηση Τμημάτων",
519519
"page.keyboard_shortcuts.title": "Συντομεύσεις Πληκτρολογίου",
520-
"page.keyboard_shortcuts.toggle_bookmark_status": "Εναλλαγή σελιδοδείκτη",
520+
"page.keyboard_shortcuts.toggle_star_status": "Εναλλαγή σελιδοδείκτη",
521521
"page.keyboard_shortcuts.toggle_entry_attachments": "Εναλλαγή άνοιγμα/κλείσιμο συνημμένων καταχώρησης",
522522
"page.keyboard_shortcuts.toggle_read_status_next": "Εναλλαγή ανάγνωσης / μη αναγνωσμένης, εστίαση στη συνέχεια",
523523
"page.keyboard_shortcuts.toggle_read_status_prev": "Εναλλαγή ανάγνωσης / μη αναγνωσμένης, εστίαση στο προηγούμενο",

internal/locale/translations/en_US.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"alert.account_unlinked": "Your external account is now dissociated!",
1616
"alert.background_feed_refresh": "All feeds are being refreshed in the background. You can continue to use Miniflux while this process is running.",
1717
"alert.feed_error": "There is a problem with this feed",
18-
"alert.no_bookmark": "There are no starred entries.",
18+
"alert.no_starred": "There are no starred entries.",
1919
"alert.no_category": "There is no category.",
2020
"alert.no_category_entry": "There are no entries in this category.",
2121
"alert.no_feed": "You don’t have any feeds.",
@@ -46,10 +46,10 @@
4646
"enclosure_media_controls.speed.reset.title": "Reset speed to 1x",
4747
"enclosure_media_controls.speed.slower": "Slower",
4848
"enclosure_media_controls.speed.slower.title": "Slower by %sx",
49-
"entry.bookmark.toast.off": "Unstarred",
50-
"entry.bookmark.toast.on": "Starred",
51-
"entry.bookmark.toggle.off": "Unstar",
52-
"entry.bookmark.toggle.on": "Star",
49+
"entry.starred.toast.off": "Unstarred",
50+
"entry.starred.toast.on": "Starred",
51+
"entry.starred.toggle.off": "Unstar",
52+
"entry.starred.toggle.on": "Star",
5353
"entry.comments.label": "Comments",
5454
"entry.comments.title": "View Comments",
5555
"entry.estimated_reading_time": [
@@ -517,7 +517,7 @@
517517
"page.keyboard_shortcuts.subtitle.pages": "Pages Navigation",
518518
"page.keyboard_shortcuts.subtitle.sections": "Sections Navigation",
519519
"page.keyboard_shortcuts.title": "Keyboard Shortcuts",
520-
"page.keyboard_shortcuts.toggle_bookmark_status": "Toggle starred",
520+
"page.keyboard_shortcuts.toggle_star_status": "Toggle starred",
521521
"page.keyboard_shortcuts.toggle_entry_attachments": "Toggle open/close entry attachments",
522522
"page.keyboard_shortcuts.toggle_read_status_next": "Toggle read/unread, focus next",
523523
"page.keyboard_shortcuts.toggle_read_status_prev": "Toggle read/unread, focus previous",

internal/locale/translations/es_ES.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"alert.account_unlinked": "¡Tu cuenta externa ya está desvinculada!",
1616
"alert.background_feed_refresh": "Todos los feeds se actualizan en segundo plano. Puede continuar usando Miniflux mientras se ejecuta este proceso.",
1717
"alert.feed_error": "Hay un problema con esta fuente.",
18-
"alert.no_bookmark": "No hay marcador en este momento.",
18+
"alert.no_starred": "No hay marcador en este momento.",
1919
"alert.no_category": "No hay categoría.",
2020
"alert.no_category_entry": "No hay artículos en esta categoría.",
2121
"alert.no_feed": "No tienes fuentes.",
@@ -46,10 +46,10 @@
4646
"enclosure_media_controls.speed.reset.title": "Restablecer la velocidad a 1x",
4747
"enclosure_media_controls.speed.slower": "Despacio",
4848
"enclosure_media_controls.speed.slower.title": "Más despacio a %sx",
49-
"entry.bookmark.toast.off": "Sin estrellas",
50-
"entry.bookmark.toast.on": "Sembrado de estrellas",
51-
"entry.bookmark.toggle.off": "Desmarcar",
52-
"entry.bookmark.toggle.on": "Marcar",
49+
"entry.starred.toast.off": "Sin estrellas",
50+
"entry.starred.toast.on": "Sembrado de estrellas",
51+
"entry.starred.toggle.off": "Desmarcar",
52+
"entry.starred.toggle.on": "Marcar",
5353
"entry.comments.label": "Comentarios",
5454
"entry.comments.title": "Ver comentarios",
5555
"entry.estimated_reading_time": [
@@ -517,7 +517,7 @@
517517
"page.keyboard_shortcuts.subtitle.pages": "Navegación de páginas",
518518
"page.keyboard_shortcuts.subtitle.sections": "Navegación de secciones",
519519
"page.keyboard_shortcuts.title": "Atajos de teclado",
520-
"page.keyboard_shortcuts.toggle_bookmark_status": "Agregar o quitar marcador",
520+
"page.keyboard_shortcuts.toggle_star_status": "Agregar o quitar marcador",
521521
"page.keyboard_shortcuts.toggle_entry_attachments": "Alternar abrir/cerrar adjuntos de la entrada",
522522
"page.keyboard_shortcuts.toggle_read_status_next": "Marcar como leído o no leído, enfoque siguiente",
523523
"page.keyboard_shortcuts.toggle_read_status_prev": "Marcar como leído o no leído, foco anterior",

0 commit comments

Comments
 (0)