diff options
Diffstat (limited to 'template/html')
27 files changed, 330 insertions, 330 deletions
diff --git a/template/html/about.html b/template/html/about.html index 24c0f2c..29bb2e9 100644 --- a/template/html/about.html +++ b/template/html/about.html @@ -1,39 +1,39 @@ -{{ define "title"}}{{ t "About" }}{{ end }} +{{ define "title"}}{{ t "page.about.title" }}{{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "About" }}</h1> + <h1>{{ t "page.about.title" }}</h1> <ul> <li> - <a href="{{ route "settings" }}">{{ t "Settings" }}</a> + <a href="{{ route "settings" }}">{{ t "menu.preferences" }}</a> </li> <li> - <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a> + <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a> </li> <li> - <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a> + <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a> </li> {{ if .user.IsAdmin }} <li> - <a href="{{ route "users" }}">{{ t "Users" }}</a> + <a href="{{ route "users" }}">{{ t "menu.users" }}</a> </li> {{ end }} </ul> </section> <div class="panel"> - <h3>{{ t "Version" }}</h3> + <h3>Miniflux</h3> <ul> - <li><strong>{{ t "Version:" }}</strong> {{ .version }}</li> - <li><strong>{{ t "Build Date:" }}</strong> {{ .build_date }}</li> + <li><strong>{{ t "page.about.version" }}</strong> {{ .version }}</li> + <li><strong>{{ t "page.about.build_date" }}</strong> {{ .build_date }}</li> </ul> </div> <div class="panel"> - <h3>{{ t "Authors" }}</h3> + <h3>{{ t "page.about.credits" }}</h3> <ul> - <li><strong>{{ t "Author:" }}</strong> Frédéric Guillot</li> - <li><strong>{{ t "License:" }}</strong> Apache 2.0</li> + <li><strong>{{ t "page.about.author" }}</strong> Frédéric Guillot</li> + <li><strong>{{ t "page.about.license" }}</strong> Apache 2.0</li> </ul> </div> diff --git a/template/html/add_subscription.html b/template/html/add_subscription.html index 7ccbc20..35f0cdf 100644 --- a/template/html/add_subscription.html +++ b/template/html/add_subscription.html @@ -1,23 +1,23 @@ -{{ define "title"}}{{ t "New Subscription" }}{{ end }} +{{ define "title"}}{{ t "page.add_feed.title" }}{{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "New Subscription" }}</h1> + <h1>{{ t "page.add_feed.title" }}</h1> <ul> <li> - <a href="{{ route "feeds" }}">{{ t "Feeds" }}</a> + <a href="{{ route "feeds" }}">{{ t "menu.feeds" }}</a> </li> <li> - <a href="{{ route "export" }}">{{ t "Export" }}</a> + <a href="{{ route "export" }}">{{ t "menu.export" }}</a> </li> <li> - <a href="{{ route "import" }}">{{ t "Import" }}</a> + <a href="{{ route "import" }}">{{ t "menu.import" }}</a> </li> </ul> </section> {{ if not .categories }} - <p class="alert alert-error">{{ t "There is no category. You must have at least one category." }}</p> + <p class="alert alert-error">{{ t "page.add_feed.no_category" }}</p> {{ else }} <form action="{{ route "submitSubscription" }}" method="post" autocomplete="off"> <input type="hidden" name="csrf" value="{{ .csrf }}"> @@ -26,10 +26,10 @@ <div class="alert alert-error">{{ t .errorMessage }}</div> {{ end }} - <label for="form-url">{{ t "URL" }}</label> + <label for="form-url">{{ t "page.add_feed.label.url" }}</label> <input type="url" name="url" id="form-url" placeholder="https://domain.tld/" value="{{ .form.URL }}" required autofocus> - <label for="form-category">{{ t "Category" }}</label> + <label for="form-category">{{ t "form.feed.label.category" }}</label> <select id="form-category" name="category_id"> {{ range .categories }} <option value="{{ .ID }}">{{ .Title }}</option> @@ -37,17 +37,17 @@ </select> <fieldset> - <legend>{{ t "Advanced Options" }}</legend> + <legend>{{ t "page.add_feed.legend.advanced_options" }}</legend> - <label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "Fetch original content" }}</label> + <label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "form.feed.label.crawler" }}</label> - <label for="form-user-agent">{{ t "User-Agent" }}</label> - <input type="text" name="user_agent" id="form-user-agent" placeholder="{{ .defaultUserAgent }}" value="{{ .form.UserAgent }}"> + <label for="form-user-agent">{{ t "form.feed.label.user_agent" }}</label> + <input type="text" name="user_agent" id="form-user-agent" placeholder="{{ .defaultUserAgent }}" value="{{ .form.UserAgent }}" autocomplete="off"> - <label for="form-feed-username">{{ t "Feed Username" }}</label> + <label for="form-feed-username">{{ t "form.feed.label.feed_username" }}</label> <input type="text" name="feed_username" id="form-feed-username" value="{{ .form.Username }}"> - <label for="form-feed-password">{{ t "Feed Password" }}</label> + <label for="form-feed-password">{{ t "form.feed.label.feed_password" }}</label> <!-- We are using the type "text" otherwise Firefox always autocomplete this password: @@ -59,7 +59,7 @@ </fieldset> <div class="buttons"> - <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Find a subscription" }}</button> + <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.loading" }}">{{ t "page.add_feed.submit" }}</button> </div> </form> {{ end }} diff --git a/template/html/bookmark_entries.html b/template/html/bookmark_entries.html index f66d0d6..f2cdcf1 100644 --- a/template/html/bookmark_entries.html +++ b/template/html/bookmark_entries.html @@ -1,12 +1,12 @@ -{{ define "title"}}{{ t "Favorites" }} ({{ .total }}){{ end }} +{{ define "title"}}{{ t "page.starred.title" }} ({{ .total }}){{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "Favorites" }} ({{ .total }})</h1> + <h1>{{ t "page.starred.title" }} ({{ .total }})</h1> </section> {{ if not .entries }} - <p class="alert alert-info">{{ t "There is no bookmark at the moment." }}</p> + <p class="alert alert-info">{{ t "alert.no_bookmark" }}</p> {{ else }} <div class="items"> {{ range .entries }} diff --git a/template/html/categories.html b/template/html/categories.html index c2d7850..dde0339 100644 --- a/template/html/categories.html +++ b/template/html/categories.html @@ -1,17 +1,17 @@ -{{ define "title"}}{{ t "Categories" }} ({{ .total }}){{ end }} +{{ define "title"}}{{ t "page.categories.title" }} ({{ .total }}){{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "Categories" }} ({{ .total }})</h1> + <h1>{{ t "page.categories.title" }} ({{ .total }})</h1> <ul> <li> - <a href="{{ route "createCategory" }}">{{ t "Create a category" }}</a> + <a href="{{ route "createCategory" }}">{{ t "menu.create_category" }}</a> </li> </ul> </section> {{ if not .categories }} - <p class="alert alert-error">{{ t "There is no category." }}</p> + <p class="alert alert-error">{{ t "page.categories.no_category" }}</p> {{ else }} <div class="items"> {{ range .categories }} @@ -27,7 +27,7 @@ {{ if eq .FeedCount 0 }} {{ t "No feed." }} {{ else }} - {{ plural "plural.categories.feed_count" .FeedCount .FeedCount }} + {{ plural "page.categories.feed_count" .FeedCount .FeedCount }} {{ end }} </li> </ul> @@ -39,11 +39,11 @@ <li> <a href="#" data-confirm="true" - data-label-question="{{ t "Are you sure?" }}" - data-label-yes="{{ t "yes" }}" - data-label-no="{{ t "no" }}" - data-label-loading="{{ t "Work in progress..." }}" - data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ t "Remove" }}</a> + data-label-question="{{ t "confirm.question" }}" + data-label-yes="{{ t "confirm.yes" }}" + data-label-no="{{ t "confirm.no" }}" + data-label-loading="{{ t "confirm.loading" }}" + data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ t "action.remove" }}</a> </li> {{ end }} </ul> diff --git a/template/html/category_entries.html b/template/html/category_entries.html index e704195..5c5d7fa 100644 --- a/template/html/category_entries.html +++ b/template/html/category_entries.html @@ -6,14 +6,14 @@ {{ if .entries }} <ul> <li> - <a href="#" data-on-click="markPageAsRead">{{ t "Mark this page as read" }}</a> + <a href="#" data-on-click="markPageAsRead">{{ t "menu.mark_page_as_read" }}</a> </li> </ul> {{ end }} </section> {{ if not .entries }} - <p class="alert">{{ t "There is no article in this category." }}</p> + <p class="alert">{{ t "alert.no_category" }}</p> {{ else }} <div class="items"> {{ range .entries }} @@ -35,7 +35,7 @@ {{ if .entries }} <ul> <li> - <a href="#" data-on-click="markPageAsRead">{{ t "Mark this page as read" }}</a> + <a href="#" data-on-click="markPageAsRead">{{ t "menu.mark_page_as_read" }}</a> </li> </ul> {{ end }} diff --git a/template/html/choose_subscription.html b/template/html/choose_subscription.html index 2b053a1..bac7083 100644 --- a/template/html/choose_subscription.html +++ b/template/html/choose_subscription.html @@ -1,17 +1,17 @@ -{{ define "title"}}{{ t "Choose a Subscription" }}{{ end }} +{{ define "title"}}{{ t "page.add_feed.title" }}{{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "New Subscription" }}</h1> + <h1>{{ t "page.add_feed.title" }}</h1> <ul> <li> - <a href="{{ route "feeds" }}">{{ t "Feeds" }}</a> + <a href="{{ route "feeds" }}">{{ t "menu.feeds" }}</a> </li> <li> - <a href="{{ route "export" }}">{{ t "Export" }}</a> + <a href="{{ route "export" }}">{{ t "menu.export" }}</a> </li> <li> - <a href="{{ route "import" }}">{{ t "Import" }}</a> + <a href="{{ route "import" }}">{{ t "menu.import" }}</a> </li> </ul> </section> @@ -26,7 +26,7 @@ <input type="hidden" name="crawler" value="1"> {{ end }} - <h3>{{ t "Choose a Subscription" }}</h3> + <h3>{{ t "page.add_feed.choose_feed" }}</h3> {{ range .subscriptions }} <div class="radio-group"> @@ -36,7 +36,7 @@ {{ end }} <div class="buttons"> - <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Subscribe" }}</button> + <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.loading" }}">{{ t "action.subscribe" }}</button> </div> </form> {{ end }} diff --git a/template/html/common/entry_pagination.html b/template/html/common/entry_pagination.html index bb2b84f..6ec49a6 100644 --- a/template/html/common/entry_pagination.html +++ b/template/html/common/entry_pagination.html @@ -2,17 +2,17 @@ <div class="pagination"> <div class="pagination-prev"> {{ if .prevEntry }} - <a href="{{ .prevEntryRoute }}{{ if .searchQuery }}?q={{ .searchQuery }}{{ end }}" title="{{ .prevEntry.Title }}" data-page="previous">{{ t "Previous" }}</a> + <a href="{{ .prevEntryRoute }}{{ if .searchQuery }}?q={{ .searchQuery }}{{ end }}" title="{{ .prevEntry.Title }}" data-page="previous">{{ t "pagination.previous" }}</a> {{ else }} - {{ t "Previous" }} + {{ t "pagination.previous" }} {{ end }} </div> <div class="pagination-next"> {{ if .nextEntry }} - <a href="{{ .nextEntryRoute }}{{ if .searchQuery }}?q={{ .searchQuery }}{{ end }}" title="{{ .nextEntry.Title }}" data-page="next">{{ t "Next" }}</a> + <a href="{{ .nextEntryRoute }}{{ if .searchQuery }}?q={{ .searchQuery }}{{ end }}" title="{{ .nextEntry.Title }}" data-page="next">{{ t "pagination.next" }}</a> {{ else }} - {{ t "Next" }} + {{ t "pagination.next" }} {{ end }} </div> </div> diff --git a/template/html/common/item_meta.html b/template/html/common/item_meta.html index 4ea052e..ba83da7 100644 --- a/template/html/common/item_meta.html +++ b/template/html/common/item_meta.html @@ -10,40 +10,40 @@ {{ if .hasSaveEntry }} <li> <a href="#" - title="{{ t "Save this article" }}" + title="{{ t "entry.save.title" }}" data-save-entry="true" data-save-url="{{ route "saveEntry" "entryID" .entry.ID }}" - data-label-loading="{{ t "Saving..." }}" - data-label-done="{{ t "Done!" }}" - >{{ t "Save" }}</a> + data-label-loading="{{ t "entry.state.saving" }}" + data-label-done="{{ t "entry.save.completed" }}" + >{{ t "entry.save.label" }}</a> </li> {{ end }} <li> - <a href="{{ .entry.URL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ t "Original" }}</a> + <a href="{{ .entry.URL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ t "entry.original.label" }}</a> </li> {{ if .entry.CommentsURL }} <li> - <a href="{{ .entry.CommentsURL }}" title="{{ t "View Comments" }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ t "Comments" }}</a> + <a href="{{ .entry.CommentsURL }}" title="{{ t "entry.comments.title" }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ t "entry.comments.label" }}</a> </li> {{ end }} <li> <a href="#" data-toggle-bookmark="true" data-bookmark-url="{{ route "toggleBookmark" "entryID" .entry.ID }}" - data-label-loading="{{ t "Saving..." }}" - data-label-star="☆ {{ t "Star" }}" - data-label-unstar="★ {{ t "Unstar" }}" + data-label-loading="{{ t "entry.state.saving" }}" + data-label-star="☆ {{ t "entry.bookmark.toggle.on" }}" + data-label-unstar="★ {{ t "entry.bookmark.toggle.off" }}" data-value="{{ if .entry.Starred }}star{{ else }}unstar{{ end }}" - >{{ if .entry.Starred }}★ {{ t "Unstar" }}{{ else }}☆ {{ t "Star" }}{{ end }}</a> + >{{ if .entry.Starred }}★ {{ t "entry.bookmark.toggle.off" }}{{ else }}☆ {{ t "entry.bookmark.toggle.on" }}{{ end }}</a> </li> <li> <a href="#" - title="{{ t "Change entry status" }}" + title="{{ t "entry.status.title" }}" data-toggle-status="true" - data-label-read="✔︎ {{ t "Read" }}" - data-label-unread="✘ {{ t "Unread" }}" + data-label-read="✔︎ {{ t "entry.status.read" }}" + data-label-unread="✘ {{ t "entry.status.unread" }}" data-value="{{ if eq .entry.Status "read" }}read{{ else }}unread{{ end }}" - >{{ if eq .entry.Status "read" }}✘ {{ t "Unread" }}{{ else }}✔︎ {{ t "Read" }}{{ end }}</a> + >{{ if eq .entry.Status "read" }}✘ {{ t "entry.status.unread" }}{{ else }}✔︎ {{ t "entry.status.read" }}{{ end }}</a> </li> </ul> </div> diff --git a/template/html/common/layout.html b/template/html/common/layout.html index b6a7b13..a79032d 100644 --- a/template/html/common/layout.html +++ b/template/html/common/layout.html @@ -46,42 +46,42 @@ <a href="{{ route "unread" }}">Mini<span>flux</span></a> </div> <ul> - <li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g u" }}"> - <a href="{{ route "unread" }}" data-page="unread">{{ t "Unread" }} + <li {{ if eq .menu "unread" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g u" }}"> + <a href="{{ route "unread" }}" data-page="unread">{{ t "menu.unread" }} {{ if gt .countUnread 0 }} <span class="unread-counter-wrapper">(<span class="unread-counter">{{ .countUnread }}</span>)</span> {{ end }} </a> </li> - <li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g b" }}"> - <a href="{{ route "starred" }}" data-page="starred">{{ t "Starred" }}</a> + <li {{ if eq .menu "starred" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g b" }}"> + <a href="{{ route "starred" }}" data-page="starred">{{ t "menu.starred" }}</a> </li> - <li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g h" }}"> - <a href="{{ route "history" }}" data-page="history">{{ t "History" }}</a> + <li {{ if eq .menu "history" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g h" }}"> + <a href="{{ route "history" }}" data-page="history">{{ t "menu.history" }}</a> </li> - <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g f" }}"> - <a href="{{ route "feeds" }}" data-page="feeds">{{ t "Feeds" }} + <li {{ if eq .menu "feeds" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g f" }}"> + <a href="{{ route "feeds" }}" data-page="feeds">{{ t "menu.feeds" }} {{ if gt .countErrorFeeds 0 }} <span class="error-feeds-counter-wrapper">(<span class="error-feeds-counter">{{ .countErrorFeeds }}</span>)</span> {{ end }} </a> </li> - <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g c" }}"> - <a href="{{ route "categories" }}" data-page="categories">{{ t "Categories" }}</a> + <li {{ if eq .menu "categories" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g c" }}"> + <a href="{{ route "categories" }}" data-page="categories">{{ t "menu.categories" }}</a> </li> - <li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "Keyboard Shortcut: %s" "g s" }}"> - <a href="{{ route "settings" }}" data-page="settings">{{ t "Settings" }}</a> + <li {{ if eq .menu "settings" }}class="active"{{ end }} title="{{ t "tooltip.keyboard_shortcuts" "g s" }}"> + <a href="{{ route "settings" }}" data-page="settings">{{ t "menu.settings" }}</a> </li> <li> - <a href="{{ route "logout" }}" title="{{ t "Logged as %s" .user.Username }}">{{ t "Logout" }}</a> + <a href="{{ route "logout" }}" title="{{ t "tooltip.logged_user" .user.Username }}">{{ t "menu.logout" }}</a> </li> </ul> <div class="search"> <div class="search-toggle-switch {{ if $.searchQuery }}has-search-query{{ end }}"> - <a href="#" data-action="search">« {{ t "Search" }}</a> + <a href="#" data-action="search">« {{ t "search.label" }}</a> </div> <form action="{{ route "searchEntries" }}" class="search-form {{ if $.searchQuery }}has-search-query{{ end }}"> - <input type="search" name="q" id="search-input" placeholder="{{ t "Search..." }}" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required> + <input type="search" name="q" id="search-input" placeholder="{{ t "search.placeholder" }}" {{ if $.searchQuery }}value="{{ .searchQuery }}"{{ end }} required> </form> </div> </nav> @@ -99,43 +99,43 @@ <template id="keyboard-shortcuts"> <div id="modal-left"> <a href="#" class="btn-close-modal">x</a> - <h3>{{ t "Keyboard Shortcuts" }}</h3> + <h3>{{ t "page.keyboard_shortcuts.title" }}</h3> <div class="keyboard-shortcuts"> - <p>{{ t "Sections Navigation" }}</p> + <p>{{ t "page.keyboard_shortcuts.subtitle.sections" }}</p> <ul> - <li>{{ t "Go to unread" }} = <strong>g + u</strong></li> - <li>{{ t "Go to bookmarks" }} = <strong>g + b</strong></li> - <li>{{ t "Go to history" }} = <strong>g + h</strong></li> - <li>{{ t "Go to feeds" }} = <strong>g + f</strong></li> - <li>{{ t "Go to categories" }} = <strong>g + c</strong></li> - <li>{{ t "Go to settings" }} = <strong>g + s</strong></li> - <li>{{ t "Show keyboard shortcuts" }} = <strong>?</strong></li> + <li>{{ t "page.keyboard_shortcuts.go_to_unread" }} = <strong>g + u</strong></li> + <li>{{ t "page.keyboard_shortcuts.go_to_starred" }} = <strong>g + b</strong></li> + <li>{{ t "page.keyboard_shortcuts.go_to_history" }} = <strong>g + h</strong></li> + <li>{{ t "page.keyboard_shortcuts.go_to_feeds" }} = <strong>g + f</strong></li> + <li>{{ t "page.keyboard_shortcuts.go_to_categories" }} = <strong>g + c</strong></li> + <li>{{ t "page.keyboard_shortcuts.go_to_settings" }} = <strong>g + s</strong></li> + <li>{{ t "page.keyboard_shortcuts.show_keyboard_shortcuts" }} = <strong>?</strong></li> </ul> - <p>{{ t "Items Navigation" }}</p> + <p>{{ t "page.keyboard_shortcuts.subtitle.items" }}</p> <ul> - <li>{{ t "Go to previous item" }} = <strong>p {{ t "or" }} j {{ t "or" }} ◄</strong></li> - <li>{{ t "Go to next item" }} = <strong>n {{ t "or" }} k {{ t "or" }} ►</strong></li> + <li>{{ t "page.keyboard_shortcuts.go_to_previous_item" }} = <strong>p</strong>, <strong>j</strong>, <strong>◄</strong></li> + <li>{{ t "page.keyboard_shortcuts.go_to_next_item" }} = <strong>n</strong>, <strong>k</strong>, <strong>►</strong></li> </ul> - <p>{{ t "Pages Navigation" }}</p> + <p>{{ t "page.keyboard_shortcuts.subtitle.pages" }}</p> <ul> - <li>{{ t "Go to previous page" }} = <strong>h</strong></li> - <li>{{ t "Go to next page" }} = <strong>l</strong></li> + <li>{{ t "page.keyboard_shortcuts.go_to_previous_page" }} = <strong>h</strong></li> + <li>{{ t "page.keyboard_shortcuts.go_to_next_page" }} = <strong>l</strong></li> </ul> - <p>{{ t "Actions" }}</p> + <p>{{ t "page.keyboard_shortcuts.subtitle.actions" }}</p> <ul> - <li>{{ t "Open selected item" }} = <strong>o</strong></li> - <li>{{ t "Open original link" }} = <strong>v</strong></li> - <li>{{ t "Toggle read/unread" }} = <strong>m</strong></li> - <li>{{ t "Mark current page as read" }} = <strong>A</strong></li> - <li>{{ t "Download original content" }} = <strong>d</strong></li> - <li>{{ t "Toggle bookmark" }} = <strong>f</strong></li> - <li>{{ t "Save article" }} = <strong>s</strong></li> - <li>{{ t "Set focus on search form" }} = <strong>/</strong></li> - <li>{{ t "Close modal dialog" }} = <strong>Esc</strong></li> + <li>{{ t "page.keyboard_shortcuts.open_item" }} = <strong>o</strong></li> + <li>{{ t "page.keyboard_shortcuts.open_original" }} = <strong>v</strong></li> + <li>{{ t "page.keyboard_shortcuts.toggle_read_status" }} = <strong>m</strong></li> + <li>{{ t "page.keyboard_shortcuts.mark_page_as_read" }} = <strong>A</strong></li> + <li>{{ t "page.keyboard_shortcuts.download_content" }} = <strong>d</strong></li> + <li>{{ t "page.keyboard_shortcuts.toggle_bookmark_status" }} = <strong>f</strong></li> + <li>{{ t "page.keyboard_shortcuts.save_article" }} = <strong>s</strong></li> + <li>{{ t "page.keyboard_shortcuts.go_to_search" }} = <strong>/</strong></li> + <li>{{ t "page.keyboard_shortcuts.close_modal" }} = <strong>Esc</strong></li> </ul> </div> </div> diff --git a/template/html/common/pagination.html b/template/html/common/pagination.html index 3ea32fb..328d748 100644 --- a/template/html/common/pagination.html +++ b/template/html/common/pagination.html @@ -2,17 +2,17 @@ <div class="pagination"> <div class="pagination-prev"> {{ if .ShowPrev }} - <a href="{{ .Route }}{{ if gt .PrevOffset 0 }}?offset={{ .PrevOffset }}{{ if .SearchQuery }}&q={{ .SearchQuery }}{{ end }}{{ else }}{{ if .SearchQuery }}?q={{ .SearchQuery }}{{ end }}{{ end }}" data-page="previous">{{ t "Previous" }}</a> + <a href="{{ .Route }}{{ if gt .PrevOffset 0 }}?offset={{ .PrevOffset }}{{ if .SearchQuery }}&q={{ .SearchQuery }}{{ end }}{{ else }}{{ if .SearchQuery }}?q={{ .SearchQuery }}{{ end }}{{ end }}" data-page="previous">{{ t "pagination.previous" }}</a> {{ else }} - {{ t "Previous" }} + {{ t "pagination.previous" }} {{ end }} </div> <div class="pagination-next"> {{ if .ShowNext }} - <a href="{{ .Route }}?offset={{ .NextOffset }}{{ if .SearchQuery }}&q={{ .SearchQuery }}{{ end }}" data-page="next">{{ t "Next" }}</a> + <a href="{{ .Route }}?offset={{ .NextOffset }}{{ if .SearchQuery }}&q={{ .SearchQuery }}{{ end }}" data-page="next">{{ t "pagination.next" }}</a> {{ else }} - {{ t "Next" }} + {{ t "pagination.next" }} {{ end }} </div> </div> diff --git a/template/html/create_category.html b/template/html/create_category.html index 7c4c93f..1a7212c 100644 --- a/template/html/create_category.html +++ b/template/html/create_category.html @@ -1,11 +1,11 @@ -{{ define "title"}}{{ t "New Category" }}{{ end }} +{{ define "title"}}{{ t "page.new_category.title" }}{{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "New Category" }}</h1> + <h1>{{ t "page.new_category.title" }}</h1> <ul> <li> - <a href="{{ route "categories" }}">{{ t "Categories" }}</a> + <a href="{{ route "categories" }}">{{ t "menu.categories" }}</a> </li> </ul> </section> @@ -17,11 +17,11 @@ <div class="alert alert-error">{{ t .errorMessage }}</div> {{ end }} - <label for="form-title">{{ t "Title" }}</label> + <label for="form-title">{{ t "form.category.label.title" }}</label> <input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus> <div class="buttons"> - <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Save" }}</button> {{ t "or" }} <a href="{{ route "categories" }}">{{ t "cancel" }}</a> + <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.save" }}</button> {{ t "action.or" }} <a href="{{ route "categories" }}">{{ t "action.cancel" }}</a> </div> </form> {{ end }} diff --git a/template/html/create_user.html b/template/html/create_user.html index f46defe..7672d09 100644 --- a/template/html/create_user.html +++ b/template/html/create_user.html @@ -1,23 +1,23 @@ -{{ define "title"}}{{ t "New User" }}{{ end }} +{{ define "title"}}{{ t "page.new_user.title" }}{{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "New User" }}</h1> + <h1>{{ t "page.new_user.title" }}</h1> <ul> <li> - <a href="{{ route "settings" }}">{{ t "Settings" }}</a> + <a href="{{ route "settings" }}">{{ t "menu.settings" }}</a> </li> <li> - <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a> + <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a> </li> <li> - <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a> + <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a> </li> <li> - <a href="{{ route "users" }}">{{ t "Users" }}</a> + <a href="{{ route "users" }}">{{ t "menu.users" }}</a> </li> <li> - <a href="{{ route "about" }}">{{ t "About" }}</a> + <a href="{{ route "about" }}">{{ t "menu.about" }}</a> </li> </ul> </section> @@ -29,19 +29,19 @@ <div class="alert alert-error">{{ t .errorMessage }}</div> {{ end }} - <label for="form-username">{{ t "Username" }}</label> + <label for="form-username">{{ t "form.user.label.username" }}</label> <input type="text" name="username" id="form-username" value="{{ .form.Username }}" autocomplete="new-password" required autofocus> - <label for="form-password">{{ t "Password" }}</label> + <label for="form-password">{{ t "form.user.label.password" }}</label> <input type="password" name="password" id="form-password" value="{{ .form.Password }}" autocomplete="new-password" required> - <label for="form-confirmation">{{ t "Confirmation" }}</label> + <label for="form-confirmation">{{ t "form.user.label.confirmation" }}</label> <input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" required> - <label><input type="checkbox" name="is_admin" value="1" {{ if .form.IsAdmin }}checked{{ end }}> {{ t "Administrator" }}</label> + <label><input type="checkbox" name="is_admin" value="1" {{ if .form.IsAdmin }}checked{{ end }}> {{ t "form.user.label.admin" }}</label> <div class="buttons"> - <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Save" }}</button> {{ t "or" }} <a href="{{ route "users" }}">{{ t "cancel" }}</a> + <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.save" }}</button> {{ t "action.or" }} <a href="{{ route "users" }}">{{ t "action.cancel" }}</a> </div> </form> {{ end }} diff --git a/template/html/edit_category.html b/template/html/edit_category.html index 2981fa4..6b21e46 100644 --- a/template/html/edit_category.html +++ b/template/html/edit_category.html @@ -1,14 +1,14 @@ -{{ define "title"}}{{ t "Edit Category: %s" .category.Title }}{{ end }} +{{ define "title"}}{{ t "page.edit_category.title" .category.Title }}{{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "Edit Category: %s" .category.Title }}</h1> + <h1>{{ t "page.edit_category.title" .category.Title }}</h1> <ul> <li> - <a href="{{ route "categories" }}">{{ t "Categories" }}</a> + <a href="{{ route "categories" }}">{{ t "menu.categories" }}</a> </li> <li> - <a href="{{ route "createCategory" }}">{{ t "Create a category" }}</a> + <a href="{{ route "createCategory" }}">{{ t "menu.create_category" }}</a> </li> </ul> </section> @@ -20,11 +20,11 @@ <div class="alert alert-error">{{ t .errorMessage }}</div> {{ end }} - <label for="form-title">{{ t "Title" }}</label> + <label for="form-title">{{ t "form.category.label.title" }}</label> <input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus> <div class="buttons"> - <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button> {{ t "or" }} <a href="{{ route "categories" }}">{{ t "cancel" }}</a> + <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button> {{ t "action.or" }} <a href="{{ route "categories" }}">{{ t "action.cancel" }}</a> </div> </form> {{ end }} diff --git a/template/html/edit_feed.html b/template/html/edit_feed.html index 0e0017c..b827435 100644 --- a/template/html/edit_feed.html +++ b/template/html/edit_feed.html @@ -1,30 +1,30 @@ -{{ define "title"}}{{ t "Edit Feed: %s" .feed.Title }}{{ end }} +{{ define "title"}}{{ t "page.edit_feed.title" .feed.Title }}{{ end }} {{ define "content"}} <section class="page-header"> <h1>{{ .feed.Title }}</h1> <ul> <li> - <a href="{{ route "feeds" }}">{{ t "Feeds" }}</a> + <a href="{{ route "feeds" }}">{{ t "menu.feeds" }}</a> </li> <li> - <a href="{{ route "addSubscription" }}">{{ t "Add subscription" }}</a> + <a href="{{ route "addSubscription" }}">{{ t "menu.add_feed" }}</a> </li> <li> - <a href="{{ route "export" }}">{{ t "Export" }}</a> + <a href="{{ route "export" }}">{{ t "menu.export" }}</a> </li> <li> - <a href="{{ route "import" }}">{{ t "Import" }}</a> + <a href="{{ route "import" }}">{{ t "menu.import" }}</a> </li> </ul> </section> {{ if not .categories }} - <p class="alert alert-error">{{ t "There is no category!" }}</p> + <p class="alert alert-error">{{ t "page.add_feed.no_category" }}</p> {{ else }} {{ if ne .feed.ParsingErrorCount 0 }} <div class="alert alert-error"> - <h3>{{ t "Last Parsing Error" }}</h3> + <h3>{{ t "page.edit_feed.last_parsing_error" }}</h3> <p>{{ t .feed.ParsingErrorMsg }}</p> </div> {{ end }} @@ -36,19 +36,19 @@ <div class="alert alert-error">{{ t .errorMessage }}</div> {{ end }} - <label for="form-title">{{ t "Title" }}</label> + <label for="form-title">{{ t "form.feed.label.title" }}</label> <input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus> - <label for="form-site-url">{{ t "Site URL" }}</label> + <label for="form-site-url">{{ t "form.feed.label.site_url" }}</label> <input type="url" name="site_url" id="form-site-url" placeholder="https://domain.tld/" value="{{ .form.SiteURL }}" required> - <label for="form-feed-url">{{ t "Feed URL" }}</label> + <label for="form-feed-url">{{ t "form.feed.label.feed_url" }}</label> <input type="url" name="feed_url" id="form-feed-url" placeholder="https://domain.tld/" value="{{ .form.FeedURL }}" required> - <label for="form-feed-username">{{ t "Feed Username" }}</label> + <label for="form-feed-username">{{ t "form.feed.label.feed_username" }}</label> <input type="text" name="feed_username" id="form-feed-username" value="{{ .form.Username }}"> - <label for="form-feed-password">{{ t "Feed Password" }}</label> + <label for="form-feed-password">{{ t "form.feed.label.feed_password" }}</label> <!-- We are using the type "text" otherwise Firefox always autocomplete this password: @@ -58,46 +58,46 @@ --> <input type="text" name="feed_password" id="form-feed-password" value="{{ .form.Password }}"> - <label for="form-user-agent">{{ t "User-Agent" }}</label> + <label for="form-user-agent">{{ t "form.feed.label.user_agent" }}</label> <input type="text" name="user_agent" id="form-user-agent" placeholder="{{ .defaultUserAgent }}" value="{{ .form.UserAgent }}"> - <label for="form-scraper-rules">{{ t "Scraper Rules" }}</label> + <label for="form-scraper-rules">{{ t "form.feed.label.scraper_rules" }}</label> <input type="text" name="scraper_rules" id="form-scraper-rules" value="{{ .form.ScraperRules }}"> - <label for="form-rewrite-rules">{{ t "Rewrite Rules" }}</label> + <label for="form-rewrite-rules">{{ t "form.feed.label.rewrite_rules" }}</label> <input type="text" name="rewrite_rules" id="form-rewrite-rules" value="{{ .form.RewriteRules }}"> - <label for="form-category">{{ t "Category" }}</label> + <label for="form-category">{{ t "form.feed.label.category" }}</label> <select id="form-category" name="category_id"> {{ range .categories }} <option value="{{ .ID }}" {{ if eq .ID $.form.CategoryID }}selected="selected"{{ end }}>{{ .Title }}</option> {{ end }} </select> - <label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "Fetch original content" }}</label> + <label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "form.feed.label.crawler" }}</label> <div class="buttons"> - <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button> {{ t "or" }} <a href="{{ route "feeds" }}">{{ t "cancel" }}</a> + <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button> {{ t "action.or" }} <a href="{{ route "feeds" }}">{{ t "action.cancel" }}</a> </div> </form> <div class="panel"> <ul> - <li><strong>{{ t "Last checked:" }} </strong><time datetime="{{ isodate .feed.CheckedAt }}" title="{{ isodate .feed.CheckedAt }}">{{ elapsed $.user.Timezone .feed.CheckedAt }}</time></li> - <li><strong>{{ t "ETag header:" }} </strong>{{ if .feed.EtagHeader }}{{ .feed.EtagHeader }}{{ else }}{{ t "None" }}{{ end }}</li> - <li><strong>{{ t "LastModified header:" }} </strong>{{ if .feed.LastModifiedHeader }}{{ .feed.LastModifiedHeader }}{{ else }}{{ t "None" }}{{ end }}</li> + <li><strong>{{ t "page.edit_feed.last_check" }} </strong><time datetime="{{ isodate .feed.CheckedAt }}" title="{{ isodate .feed.CheckedAt }}">{{ elapsed $.user.Timezone .feed.CheckedAt }}</time></li> + <li><strong>{{ t "page.edit_feed.etag_header" }} </strong>{{ if .feed.EtagHeader }}{{ .feed.EtagHeader }}{{ else }}{{ t "page.edit_feed.no_header" }}{{ end }}</li> + <li><strong>{{ t "page.edit_feed.last_modified_header" }} </strong>{{ if .feed.LastModifiedHeader }}{{ .feed.LastModifiedHeader }}{{ else }}{{ t "page.edit_feed.no_header" }}{{ end }}</li> </ul> </div> <div class="alert alert-error"> <a href="#" data-confirm="true" - data-label-question="{{ t "Are you sure?" }}" - data-label-yes="{{ t "yes" }}" - data-label-no="{{ t "no" }}" - data-label-loading="{{ t "Work in progress..." }}" + data-label-question="{{ t "confirm.question" }}" + data-label-yes="{{ t "confirm.yes" }}" + data-label-no="{{ t "confirm.no" }}" + data-label-loading="{{ t "confirm.loading" }}" data-url="{{ route "removeFeed" "feedID" .feed.ID }}" - data-redirect-url="{{ route "feeds" }}">{{ t "Remove this feed" }}</a> + data-redirect-url="{{ route "feeds" }}">{{ t "action.remove_feed" }}</a> </div> {{ end }} diff --git a/template/html/edit_user.html b/template/html/edit_user.html index 7825021..bc23682 100644 --- a/template/html/edit_user.html +++ b/template/html/edit_user.html @@ -1,26 +1,26 @@ -{{ define "title"}}{{ t "Edit user: %s" .selected_user.Username }}{{ end }} +{{ define "title"}}{{ t "page.edit_user.title" .selected_user.Username }}{{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "Edit user %s" .selected_user.Username }}</h1> + <h1>{{ t "page.edit_user.title" .selected_user.Username }}</h1> <ul> <li> - <a href="{{ route "settings" }}">{{ t "Settings" }}</a> + <a href="{{ route "settings" }}">{{ t "menu.settings" }}</a> </li> <li> - <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a> + <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a> </li> <li> - <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a> + <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a> </li> <li> - <a href="{{ route "users" }}">{{ t "Users" }}</a> + <a href="{{ route "users" }}">{{ t "menu.users" }}</a> </li> <li> - <a href="{{ route "createUser" }}">{{ t "Add user" }}</a> + <a href="{{ route "createUser" }}">{{ t "menu.add_user" }}</a> </li> <li> - <a href="{{ route "about" }}">{{ t "About" }}</a> + <a href="{{ route "about" }}">{{ t "menu.about" }}</a> </li> </ul> </section> @@ -32,19 +32,19 @@ <div class="alert alert-error">{{ t .errorMessage }}</div> {{ end }} - <label for="form-username">{{ t "Username" }}</label> + <label for="form-username">{{ t "form.user.label.username" }}</label> <input type="text" name="username" id="form-username" value="{{ .form.Username }}" autocomplete="new-password" required autofocus> - <label for="form-password">{{ t "Password" }}</label> + <label for="form-password">{{ t "form.user.label.password" }}</label> <input type="password" name="password" id="form-password" value="{{ .form.Password }}" autocomplete="new-password"> - <label for="form-confirmation">{{ t "Confirmation" }}</label> + <label for="form-confirmation">{{ t "form.user.label.confirmation" }}</label> <input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" autocomplete="new-password"> - <label><input type="checkbox" name="is_admin" value="1" {{ if .form.IsAdmin }}checked{{ end }}> {{ t "Administrator" }}</label> + <label><input type="checkbox" name="is_admin" value="1" {{ if .form.IsAdmin }}checked{{ end }}> {{ t "form.user.label.admin" }}</label> <div class="buttons"> - <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button> {{ t "or" }} <a href="{{ route "users" }}">{{ t "cancel" }}</a> + <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button> {{ t "action.or" }} <a href="{{ route "users" }}">{{ t "action.cancel" }}</a> </div> </form> {{ end }} diff --git a/template/html/entry.html b/template/html/entry.html index e3a956f..0a30611 100644 --- a/template/html/entry.html +++ b/template/html/entry.html @@ -10,46 +10,46 @@ <ul> <li> <a href="#" - title="{{ t "Change entry status" }}" + title="{{ t "entry.status.title" }}" data-toggle-status="true" - data-label-read="✔︎ {{ t "Read" }}" - data-label-unread="✘ {{ t "Unread" }}" + data-label-read="✔︎ {{ t "entry.status.read" }}" + data-label-unread="✘ {{ t "entry.status.unread" }}" data-value="{{ if eq .entry.Status "read" }}read{{ else }}unread{{ end }}" - >{{ if eq .entry.Status "read" }}✘ {{ t "Unread" }}{{ else }}✔︎ {{ t "Read" }}{{ end }}</a> + >{{ if eq .entry.Status "read" }}✘ {{ t "entry.status.unread" }}{{ else }}✔︎ {{ t "entry.status.read" }}{{ end }}</a> </li> <li> <a href="#" data-toggle-bookmark="true" data-bookmark-url="{{ route "toggleBookmark" "entryID" .entry.ID }}" - data-label-loading="{{ t "Saving..." }}" - data-label-star="☆ {{ t "Star" }}" - data-label-unstar="★ {{ t "Unstar" }}" + data-label-loading="{{ t "entry.state.saving" }}" + data-label-star="☆ {{ t "entry.bookmark.toggle.on" }}" + data-label-unstar="★ {{ t "entry.bookmark.toggle.off" }}" data-value="{{ if .entry.Starred }}star{{ else }}unstar{{ end }}" - >{{ if .entry.Starred }}★ {{ t "Unstar" }}{{ else }}☆ {{ t "Star" }}{{ end }}</a> + >{{ if .entry.Starred }}★ {{ t "entry.bookmark.toggle.off" }}{{ else }}☆ {{ t "entry.bookmark.toggle.on" }}{{ end }}</a> </li> {{ if .hasSaveEntry }} <li> <a href="#" - title="{{ t "Save this article" }}" + title="{{ t "entry.save.title" }}" data-save-entry="true" data-save-url="{{ route "saveEntry" "entryID" .entry.ID }}" - data-label-loading="{{ t "Saving..." }}" - data-label-done="{{ t "Done!" }}" - >{{ t "Save" }}</a> + data-label-loading="{{ t "entry.state.saving" }}" + data-label-done="{{ t "entry.save.completed" }}" + >{{ t "entry.save.title" }}</a> </li> {{ end }} <li> <a href="#" - title="{{ t "Fetch original content" }}" + title="{{ t "entry.scraper.title" }}" data-fetch-content-entry="true" data-fetch-content-url="{{ route "fetchContent" "entryID" .entry.ID }}" - data-label-loading="{{ t "Loading..." }}" - data-label-done="{{ t "Done!" }}" - >{{ t "Fetch original content" }}</a> + data-label-loading="{{ t "entry.state.loading" }}" + data-label-done="{{ t "entry.scraper.completed" }}" + >{{ t "entry.scraper.label" }}</a> </li> {{ if .entry.CommentsURL }} <li> - <a href="{{ .entry.CommentsURL }}" title="{{ t "View Comments" }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ t "Comments" }}</a> + <a href="{{ .entry.CommentsURL }}" title="{{ t "entry.comments.title" }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ t "entry.comments.label" }}</a> </li> {{ end }} </ul> @@ -110,7 +110,7 @@ {{ end }} <div class="entry-enclosure-download"> - <a href="{{ .URL }}" title="{{ .URL }} ({{ .MimeType }})" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ t "Download" }}</a> + <a href="{{ .URL }}" title="{{ .URL }} ({{ .MimeType }})" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ t "action.download" }}</a> <small>({{ .URL }})</small> </div> </div> diff --git a/template/html/feed_entries.html b/template/html/feed_entries.html index 1759874..a85cffc 100644 --- a/template/html/feed_entries.html +++ b/template/html/feed_entries.html @@ -6,25 +6,25 @@ <ul> {{ if .entries }} <li> - <a href="#" data-on-click="markPageAsRead">{{ t "Mark this page as read" }}</a> + <a href="#" data-on-click="markPageAsRead">{{ t "menu.mark_page_as_read" }}</a> </li> {{ end }} <li> - <a href="{{ route "refreshFeed" "feedID" .feed.ID }}">{{ t "Refresh" }}</a> + <a href="{{ route "refreshFeed" "feedID" .feed.ID }}">{{ t "menu.refresh_feed" }}</a> </li> <li> - <a href="{{ route "editFeed" "feedID" .feed.ID }}">{{ t "Edit" }}</a> + <a href="{{ route "editFeed" "feedID" .feed.ID }}">{{ t "menu.edit_feed" }}</a> </li> </ul> </section> {{ if ne .feed.ParsingErrorCount 0 }} <div class="alert alert-error"> - <h3>{{ t "There is a problem with this feed" }}</h3> + <h3>{{ t "alert.feed_error" }}</h3> <p>{{ t .feed.ParsingErrorMsg }}</p> </div> {{ else if not .entries }} - <p class="alert">{{ t "There is no article for this feed." }}</p> + <p class="alert">{{ t "alert.no_feed_entry" }}</p> {{ else }} <div class="items"> {{ range .entries }} @@ -46,7 +46,7 @@ {{ if .entries }} <ul> <li> - <a href="#" data-on-click="markPageAsRead">{{ t "Mark this page as read" }}</a> + <a href="#" data-on-click="markPageAsRead">{{ t "menu.mark_page_as_read" }}</a> </li> </ul> {{ end }} diff --git a/template/html/feeds.html b/template/html/feeds.html index 957ee15..5988ef2 100644 --- a/template/html/feeds.html +++ b/template/html/feeds.html @@ -1,26 +1,26 @@ -{{ define "title"}}{{ t "Feeds" }} ({{ .total }}){{ end }} +{{ define "title"}}{{ t "page.feeds.title" }} ({{ .total }}){{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "Feeds" }} ({{ .total }})</h1> + <h1>{{ t "page.feeds.title" }} ({{ .total }})</h1> <ul> <li> - <a href="{{ route "addSubscription" }}">{{ t "Add subscription" }}</a> + <a href="{{ route "addSubscription" }}">{{ t "menu.add_feed" }}</a> </li> <li> - <a href="{{ route "export" }}">{{ t "Export" }}</a> + <a href="{{ route "export" }}">{{ t "menu.export" }}</a> </li> <li> - <a href="{{ route "import" }}">{{ t "Import" }}</a> + <a href="{{ route "import" }}">{{ t "menu.import" }}</a> </li> <li> - <a href="{{ route "refreshAllFeeds" }}">{{ t "Refresh all feeds in background" }}</a> + <a href="{{ route "refreshAllFeeds" }}">{{ t "menu.refresh_all_feeds" }}</a> </li> </ul> </section> {{ if not .feeds }} - <p class="alert">{{ t "You don't have any subscription." }}</p> + <p class="alert">{{ t "alert.no_feed" }}</p> {{ else }} <div class="items"> {{ range .feeds }} @@ -42,7 +42,7 @@ <a href="{{ .SiteURL }}" title="{{ .SiteURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ domain .SiteURL }}</a> </li> <li> - {{ t "Last check:" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed $.user.Timezone .CheckedAt }}</time> + {{ t "page.feeds.last_check" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed $.user.Timezone .CheckedAt }}</time> </li> </ul> <ul> @@ -55,17 +55,17 @@ <li> <a href="#" data-confirm="true" - data-label-question="{{ t "Are you sure?" }}" - data-label-yes="{{ t "yes" }}" - data-label-no="{{ t "no" }}" - data-label-loading="{{ t "Work in progress..." }}" - data-url="{{ route "removeFeed" "feedID" .ID }}">{{ t "Remove" }}</a> + data-label-question="{{ t "confirm.question" }}" + data-label-yes="{{ t "confirm.yes" }}" + data-label-no="{{ t "confirm.no" }}" + data-label-loading="{{ t "confirm.loading" }}" + data-url="{{ route "removeFeed" "feedID" .ID }}">{{ t "action.remove" }}</a> </li> </ul> </div> {{ if ne .ParsingErrorCount 0 }} <div class="parsing-error"> - <strong title="{{ .ParsingErrorMsg }}" class="parsing-error-count">{{ plural "plural.feed.error_count" .ParsingErrorCount .ParsingErrorCount }}</strong> + <strong title="{{ .ParsingErrorMsg }}" class="parsing-error-count">{{ plural "page.feeds.error_count" .ParsingErrorCount .ParsingErrorCount }}</strong> - <small class="parsing-error-message">{{ .ParsingErrorMsg }}</small> </div> {{ end }} diff --git a/template/html/history_entries.html b/template/html/history_entries.html index 9824f11..0888778 100644 --- a/template/html/history_entries.html +++ b/template/html/history_entries.html @@ -1,19 +1,19 @@ -{{ define "title"}}{{ t "History" }} ({{ .total }}){{ end }} +{{ define "title"}}{{ t "page.history.title" }} ({{ .total }}){{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "History" }} ({{ .total }})</h1> + <h1>{{ t "page.history.title" }} ({{ .total }})</h1> {{ if .entries }} <ul> <li> - <a href="{{ route "flushHistory" }}">{{ t "Flush history" }}</a> + <a href="{{ route "flushHistory" }}">{{ t "menu.flush_history" }}</a> </li> </ul> {{ end }} </section> {{ if not .entries }} - <p class="alert alert-info">{{ t "There is no history at the moment." }}</p> + <p class="alert alert-info">{{ t "alert.no_history" }}</p> {{ else }} <div class="items"> {{ range .entries }} diff --git a/template/html/import.html b/template/html/import.html index dbdb9b0..0668f25 100644 --- a/template/html/import.html +++ b/template/html/import.html @@ -1,17 +1,17 @@ -{{ define "title"}}{{ t "Import" }}{{ end }} +{{ define "title"}}{{ t "page.import.title" }}{{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "Import" }}</h1> + <h1>{{ t "page.import.title" }}</h1> <ul> <li> - <a href="{{ route "feeds" }}">{{ t "Feeds" }}</a> + <a href="{{ route "feeds" }}">{{ t "menu.feeds" }}</a> </li> <li> - <a href="{{ route "addSubscription" }}">{{ t "Add subscription" }}</a> + <a href="{{ route "addSubscription" }}">{{ t "menu.add_feed" }}</a> </li> <li> - <a href="{{ route "export" }}">{{ t "Export" }}</a> + <a href="{{ route "export" }}">{{ t "menu.export" }}</a> </li> </ul> </section> @@ -23,11 +23,11 @@ <div class="alert alert-error">{{ t .errorMessage }}</div> {{ end }} - <label for="form-file">{{ t "OPML file" }}</label> + <label for="form-file">{{ t "form.import.label.file" }}</label> <input type="file" name="file" id="form-file"> <div class="buttons"> - <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Import" }}</button> + <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.import" }}</button> </div> </form> diff --git a/template/html/integrations.html b/template/html/integrations.html index 593db81..01f8197 100644 --- a/template/html/integrations.html +++ b/template/html/integrations.html @@ -1,22 +1,22 @@ -{{ define "title"}}{{ t "Integrations" }}{{ end }} +{{ define "title"}}{{ t "page.integrations.title" }}{{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "Integrations" }}</h1> + <h1>{{ t "page.integrations.title" }}</h1> <ul> <li> - <a href="{{ route "settings" }}">{{ t "Settings" }}</a> + <a href="{{ route "settings" }}">{{ t "menu.settings" }}</a> </li> <li> - <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a> + <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a> </li> {{ if .user.IsAdmin }} <li> - <a href="{{ route "users" }}">{{ t "Users" }}</a> + <a href="{{ route "users" }}">{{ t "menu.users" }}</a> </li> {{ end }} <li> - <a href="{{ route "about" }}">{{ t "About" }}</a> + <a href="{{ route "about" }}">{{ t "menu.about" }}</a> </li> </ul> </section> @@ -31,131 +31,131 @@ <h3>Fever</h3> <div class="form-section"> <label> - <input type="checkbox" name="fever_enabled" value="1" {{ if .form.FeverEnabled }}checked{{ end }}> {{ t "Activate Fever API" }} + <input type="checkbox" name="fever_enabled" value="1" {{ if .form.FeverEnabled }}checked{{ end }}> {{ t "form.integration.fever_activate" }} </label> - <label for="form-fever-username">{{ t "Fever Username" }}</label> + <label for="form-fever-username">{{ t "form.integration.fever_username" }}</label> <input type="text" name="fever_username" id="form-fever-username" value="{{ .form.FeverUsername }}"> - <label for="form-fever-password">{{ t "Fever Password" }}</label> + <label for="form-fever-password">{{ t "form.integration.fever_password" }}</label> <input type="password" name="fever_password" id="form-fever-password" value="{{ .form.FeverPassword }}" autocomplete="new-password"> - <p>{{ t "Fever API endpoint:" }} <strong>{{ rootURL }}{{ route "feverEndpoint" }}</strong></p> + <p>{{ t "form.integration.fever_endpoint" }} <strong>{{ rootURL }}{{ route "feverEndpoint" }}</strong></p> </div> <h3>Pinboard</h3> <div class="form-section"> <label> - <input type="checkbox" name="pinboard_enabled" value="1" {{ if .form.PinboardEnabled }}checked{{ end }}> {{ t "Save articles to Pinboard" }} + <input type="checkbox" name="pinboard_enabled" value="1" {{ if .form.PinboardEnabled }}checked{{ end }}> {{ t "form.integration.pinboard_activate" }} </label> - <label for="form-pinboard-token">{{ t "Pinboard API Token" }}</label> + <label for="form-pinboard-token">{{ t "form.integration.pinboard_token" }}</label> <input type="password" name="pinboard_token" id="form-pinboard-token" value="{{ .form.PinboardToken }}" autocomplete="new-password"> - <label for="form-pinboard-tags">{{ t "Pinboard Tags" }}</label> + <label for="form-pinboard-tags">{{ t "form.integration.pinboard_tags" }}</label> <input type="text" name="pinboard_tags" id="form-pinboard-tags" value="{{ .form.PinboardTags }}"> <label> - <input type="checkbox" name="pinboard_mark_as_unread" value="1" {{ if .form.PinboardMarkAsUnread }}checked{{ end }}> {{ t "Mark bookmark as unread" }} + <input type="checkbox" name="pinboard_mark_as_unread" value="1" {{ if .form.PinboardMarkAsUnread }}checked{{ end }}> {{ t "form.integration.pinboard_bookmark" }} </label> </div> <h3>Instapaper</h3> <div class="form-section"> <label> - <input type="checkbox" name="instapaper_enabled" value="1" {{ if .form.InstapaperEnabled }}checked{{ end }}> {{ t "Save articles to Instapaper" }} + <input type="checkbox" name="instapaper_enabled" value="1" {{ if .form.InstapaperEnabled }}checked{{ end }}> {{ t "form.integration.instapaper_activate" }} </label> - <label for="form-instapaper-username">{{ t "Instapaper Username" }}</label> + <label for="form-instapaper-username">{{ t "form.integration.instapaper_username" }}</label> <input type="text" name="instapaper_username" id="form-instapaper-username" value="{{ .form.InstapaperUsername }}"> - <label for="form-instapaper-password">{{ t "Instapaper Password" }}</label> + <label for="form-instapaper-password">{{ t "form.integration.instapaper_password" }}</label> <input type="password" name="instapaper_password" id="form-instapaper-password" value="{{ .form.InstapaperPassword }}" autocomplete="new-password"> </div> <h3>Pocket</h3> <div class="form-section"> <label> - <input type="checkbox" name="pocket_enabled" value="1" {{ if .form.PocketEnabled }}checked{{ end }}> {{ t "Save articles to Pocket" }} + <input type="checkbox" name="pocket_enabled" value="1" {{ if .form.PocketEnabled }}checked{{ end }}> {{ t "form.integration.pocket_activate" }} </label> {{ if not .hasPocketConsumerKeyConfigured }} - <label for="form-pocket-consumer-key">{{ t "Pocket Consumer Key" }}</label> + <label for="form-pocket-consumer-key">{{ t "form.integration.pocket_consumer_key" }}</label> <input type="text" name="pocket_consumer_key" id="form-pocket-consumer-key" value="{{ .form.PocketConsumerKey }}"> {{ end }} - <label for="form-pocket-access-token">{{ t "Pocket Access Token" }}</label> + <label for="form-pocket-access-token">{{ t "form.integration.pocket_access_token" }}</label> <input type="password" name="pocket_access_token" id="form-pocket-access-token" value="{{ .form.PocketAccessToken }}" autocomplete="new-password"> {{ if not .form.PocketAccessToken }} - <p><a href="{{ route "pocketAuthorize" }}">{{ t "Connect your Pocket account" }}</a></p> + <p><a href="{{ route "pocketAuthorize" }}">{{ t "form.integration.pocket_connect_link" }}</a></p> {{ end }} </div> <h3>Wallabag</h3> <div class="form-section"> <label> - <input type="checkbox" name="wallabag_enabled" value="1" {{ if .form.WallabagEnabled }}checked{{ end }}> {{ t "Save articles to Wallabag" }} + <input type="checkbox" name="wallabag_enabled" value="1" {{ if .form.WallabagEnabled }}checked{{ end }}> {{ t "form.integration.wallabag_activate" }} </label> - <label for="form-wallabag-url">{{ t "Wallabag API Endpoint" }}</label> + <label for="form-wallabag-url">{{ t "form.integration.wallabag_endpoint" }}</label> <input type="url" name="wallabag_url" id="form-wallabag-url" value="{{ .form.WallabagURL }}" placeholder="http://v2.wallabag.org/"> - <label for="form-wallabag-client-id">{{ t "Wallabag Client ID" }}</label> + <label for="form-wallabag-client-id">{{ t "form.integration.wallabag_client_id" }}</label> <input type="text" name="wallabag_client_id" id="form-wallabag-client-id" value="{{ .form.WallabagClientID }}"> - <label for="form-wallabag-client-secret">{{ t "Wallabag Client Secret" }}</label> + <label for="form-wallabag-client-secret">{{ t "form.integration.wallabag_client_secret" }}</label> <input type="password" name="wallabag_client_secret" id="form-wallabag-client-secret" value="{{ .form.WallabagClientSecret }}" autocomplete="new-password"> - <label for="form-wallabag-username">{{ t "Wallabag Username" }}</label> + <label for="form-wallabag-username">{{ t "form.integration.wallabag_username" }}</label> <input type="text" name="wallabag_username" id="form-wallabag-username" value="{{ .form.WallabagUsername }}"> - <label for="form-wallabag-password">{{ t "Wallabag Password" }}</label> + <label for="form-wallabag-password">{{ t "form.integration.wallabag_password" }}</label> <input type="password" name="wallabag_password" id="form-wallabag-password" value="{{ .form.WallabagPassword }}" autocomplete="new-password"> </div> <h3>Nunux Keeper</h3> <div class="form-section"> <label> - <input type="checkbox" name="nunux_keeper_enabled" value="1" {{ if .form.NunuxKeeperEnabled }}checked{{ end }}> {{ t "Save articles to Nunux Keeper" }} + <input type="checkbox" name="nunux_keeper_enabled" value="1" {{ if .form.NunuxKeeperEnabled }}checked{{ end }}> {{ t "form.integration.nunux_keeper_activate" }} </label> - <label for="form-nunux-keeper-url">{{ t "Nunux Keeper API Endpoint" }}</label> + <label for="form-nunux-keeper-url">{{ t "form.integration.nunux_keeper_endpoint" }}</label> <input type="url" name="nunux_keeper_url" id="form-nunux-keeper-url" value="{{ .form.NunuxKeeperURL }}" placeholder="https://api.nunux.org/keeper"> - <label for="form-nunux-keeper-api-key">{{ t "Nunux Keeper API key" }}</label> + <label for="form-nunux-keeper-api-key">{{ t "form.integration.nunux_keeper_api_key" }}</label> <input type="text" name="nunux_keeper_api_key" id="form-nunux-keeper-api-key" value="{{ .form.NunuxKeeperAPIKey }}"> </div> <div class="buttons"> - <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button> + <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button> </div> </form> -<h3>{{ t "Miniflux API" }}</h3> +<h3>{{ t "page.integration.miniflux_api" }}</h3> <div class="panel"> <ul> <li> - {{ t "API Endpoint" }} = <strong>{{ baseURL }}/v1/</strong> + {{ t "page.integration.miniflux_api_endpoint" }} = <strong>{{ baseURL }}/v1/</strong> </li> <li> - {{ t "Username" }} = <strong>{{ .user.Username }}</strong> + {{ t "page.integration.miniflux_api_username" }} = <strong>{{ .user.Username }}</strong> </li> <li> - {{ t "Password" }} = <strong>{{ t "Your account password" }}</strong> + {{ t "page.integration.miniflux_api_password" }} = <strong>{{ t "page.integration.miniflux_api_password_value" }}</strong> </li> </ul> </div> -<h3>{{ t "Bookmarklet" }}</h3> +<h3>{{ t "page.integration.bookmarklet" }}</h3> <div class="panel"> - <p>{{ t "This special link allows you to subscribe to a website directly by using a bookmark in your web browser." }}</p> + <p>{{ t "page.integration.bookmarklet.help" }}</p> <div class="bookmarklet"> - <a href="javascript:location.href='{{ rootURL }}{{ route "bookmarklet" }}?uri='+encodeURIComponent(window.location.href)">{{ t "Add to Miniflux" }}</a> + <a href="javascript:location.href='{{ rootURL }}{{ route "bookmarklet" }}?uri='+encodeURIComponent(window.location.href)">{{ t "page.integration.bookmarklet.name" }}</a> </div> - <p>{{ t "Drag and drop this link to your bookmarks." }}</p> + <p>{{ t "page.integration.bookmarklet.instructions" }}</p> </div> {{ end }} diff --git a/template/html/login.html b/template/html/login.html index 906458a..fabb70c 100644 --- a/template/html/login.html +++ b/template/html/login.html @@ -1,4 +1,4 @@ -{{ define "title"}}{{ t "Sign In" }}{{ end }} +{{ define "title"}}{{ t "page.login.title" }}{{ end }} {{ define "content"}} <section class="login-form"> @@ -9,19 +9,19 @@ <div class="alert alert-error">{{ t .errorMessage }}</div> {{ end }} - <label for="form-username">{{ t "Username" }}</label> + <label for="form-username">{{ t "form.user.label.username" }}</label> <input type="text" name="username" id="form-username" value="{{ .form.Username }}" required autofocus> - <label for="form-password">{{ t "Password" }}</label> + <label for="form-password">{{ t "form.user.label.password" }}</label> <input type="password" name="password" id="form-password" value="{{ .form.Password }}" required> <div class="buttons"> - <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Sign in" }}</button> + <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.login" }}</button> </div> </form> {{ if hasOAuth2Provider "google" }} <div class="oauth2"> - <a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "Sign in with Google" }}</a> + <a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "page.login.google_signin" }}</a> </div> {{ end }} </section> diff --git a/template/html/search_entries.html b/template/html/search_entries.html index c5299e2..f09c27d 100644 --- a/template/html/search_entries.html +++ b/template/html/search_entries.html @@ -1,12 +1,12 @@ -{{ define "title"}}{{ t "Search Results" }} ({{ .total }}){{ end }} +{{ define "title"}}{{ t "page.search.title" }} ({{ .total }}){{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "Search Results" }} ({{ .total }})</h1> + <h1>{{ t "page.search.title" }} ({{ .total }})</h1> </section> {{ if not .entries }} - <p class="alert alert-info">{{ t "There is no result for this search." }}</p> + <p class="alert alert-info">{{ t "alert.no_search_result" }}</p> {{ else }} <div class="items"> {{ range .entries }} diff --git a/template/html/sessions.html b/template/html/sessions.html index 6e639d6..c28d7ac 100644 --- a/template/html/sessions.html +++ b/template/html/sessions.html @@ -1,35 +1,35 @@ -{{ define "title"}}{{ t "Sessions" }}{{ end }} +{{ define "title"}}{{ t "page.sessions.title" }}{{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "Sessions" }}</h1> + <h1>{{ t "page.sessions.title" }}</h1> <ul> <li> - <a href="{{ route "settings" }}">{{ t "Settings" }}</a> + <a href="{{ route "settings" }}">{{ t "menu.settings" }}</a> </li> <li> - <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a> + <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a> </li> {{ if .user.IsAdmin }} <li> - <a href="{{ route "users" }}">{{ t "Users" }}</a> + <a href="{{ route "users" }}">{{ t "menu.users" }}</a> </li> <li> - <a href="{{ route "createUser" }}">{{ t "Add user" }}</a> + <a href="{{ route "createUser" }}">{{ t "menu.add_user" }}</a> </li> {{ end }} <li> - <a href="{{ route "about" }}">{{ t "About" }}</a> + <a href="{{ route "about" }}">{{ t "menu.about" }}</a> </li> </ul> </section> <table> <tr> - <th>{{ t "Date" }}</th> - <th>{{ t "IP Address" }}</th> - <th>{{ t "User Agent" }}</th> - <th>{{ t "Actions" }}</th> + <th>{{ t "page.sessions.table.date" }}</th> + <th>{{ t "page.sessions.table.ip" }}</th> + <th>{{ t "page.sessions.table.user_agent" }}</th> + <th>{{ t "page.sessions.table.actions" }}</th> </tr> {{ range .sessions }} <tr {{ if eq .Token $.currentSessionToken }}class="row-highlighted"{{ end }}> @@ -38,15 +38,15 @@ <td title="{{ .UserAgent }}">{{ .UserAgent }}</td> <td class="column-20"> {{ if eq .Token $.currentSessionToken }} - {{ t "Current session" }} + {{ t "page.sessions.table.current_session" }} {{ else }} <a href="#" data-confirm="true" - data-label-question="{{ t "Are you sure?" }}" - data-label-yes="{{ t "yes" }}" - data-label-no="{{ t "no" }}" - data-label-loading="{{ t "Work in progress..." }}" - data-url="{{ route "removeSession" "sessionID" .ID }}">{{ t "Remove" }}</a> + data-label-question="{{ t "confirm.question" }}" + data-label-yes="{{ t "confirm.yes" }}" + data-label-no="{{ t "confirm.no" }}" + data-label-loading="{{ t "confirm.loading" }}" + data-url="{{ route "removeSession" "sessionID" .ID }}">{{ t "action.remove" }}</a> {{ end }} </td> </tr> diff --git a/template/html/settings.html b/template/html/settings.html index 7e76569..3b07871 100644 --- a/template/html/settings.html +++ b/template/html/settings.html @@ -1,22 +1,22 @@ -{{ define "title"}}{{ t "Settings" }}{{ end }} +{{ define "title"}}{{ t "page.settings.title" }}{{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "Settings" }}</h1> + <h1>{{ t "page.settings.title" }}</h1> <ul> <li> - <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a> + <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a> </li> <li> - <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a> + <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a> </li> {{ if .user.IsAdmin }} <li> - <a href="{{ route "users" }}">{{ t "Users" }}</a> + <a href="{{ route "users" }}">{{ t "menu.users" }}</a> </li> {{ end }} <li> - <a href="{{ route "about" }}">{{ t "About" }}</a> + <a href="{{ route "about" }}">{{ t "menu.about" }}</a> </li> </ul> </section> @@ -28,53 +28,53 @@ <div class="alert alert-error">{{ t .errorMessage }}</div> {{ end }} - <label for="form-username">{{ t "Username" }}</label> + <label for="form-username">{{ t "form.user.label.username" }}</label> <input type="text" name="username" id="form-username" value="{{ .form.Username }}" required> - <label for="form-password">{{ t "Password" }}</label> + <label for="form-password">{{ t "form.user.label.password" }}</label> <input type="password" name="password" id="form-password" value="{{ .form.Password }}" autocomplete="new-password"> - <label for="form-confirmation">{{ t "Confirmation" }}</label> + <label for="form-confirmation">{{ t "form.user.label.confirmation" }}</label> <input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" autocomplete="new-password"> - <label for="form-language">{{ t "Language" }}</label> + <label for="form-language">{{ t "form.prefs.label.language" }}</label> <select id="form-language" name="language"> {{ range $key, $value := .languages }} <option value="{{ $key }}" {{ if eq $key $.form.Language }}selected="selected"{{ end }}>{{ $value }}</option> {{ end }} </select> - <label for="form-timezone">{{ t "Timezone" }}</label> + <label for="form-timezone">{{ t "form.prefs.label.timezone" }}</label> <select id="form-timezone" name="timezone"> {{ range $key, $value := .timezones }} <option value="{{ $key }}" {{ if eq $key $.form.Timezone }}selected="selected"{{ end }}>{{ $value }}</option> {{ end }} </select> - <label for="form-theme">{{ t "Theme" }}</label> + <label for="form-theme">{{ t "form.prefs.label.theme" }}</label> <select id="form-theme" name="theme"> {{ range $key, $value := .themes }} <option value="{{ $key }}" {{ if eq $key $.form.Theme }}selected="selected"{{ end }}>{{ $value }}</option> {{ end }} </select> - <label for="form-entry-direction">{{ t "Entry Sorting" }}</label> + <label for="form-entry-direction">{{ t "form.prefs.label.entry_sorting" }}</label> <select id="form-entry-direction" name="entry_direction"> - <option value="asc" {{ if eq "asc" $.form.EntryDirection }}selected="selected"{{ end }}>{{ t "Older entries first" }}</option> - <option value="desc" {{ if eq "desc" $.form.EntryDirection }}selected="selected"{{ end }}>{{ t "Recent entries first" }}</option> + <option value="asc" {{ if eq "asc" $.form.EntryDirection }}selected="selected"{{ end }}>{{ t "form.prefs.select.older_first" }}</option> + <option value="desc" {{ if eq "desc" $.form.EntryDirection }}selected="selected"{{ end }}>{{ t "form.prefs.select.recent_first" }}</option> </select> <div class="buttons"> - <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button> + <button type="submit" class="button button-primary" data-label-loading="{{ t "form.submit.saving" }}">{{ t "action.update" }}</button> </div> </form> {{ if hasOAuth2Provider "google" }} <div class="panel"> {{ if hasKey .user.Extra "google_id" }} - <a href="{{ route "oauth2Unlink" "provider" "google" }}">{{ t "Unlink my Google account" }}</a> + <a href="{{ route "oauth2Unlink" "provider" "google" }}">{{ t "page.settings.unlink_google_account" }}</a> {{ else }} - <a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "Link my Google account" }}</a> + <a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "page.settings.link_google_account" }}</a> {{ end }} </div> {{ end }} diff --git a/template/html/unread_entries.html b/template/html/unread_entries.html index cadafb4..1db2b28 100644 --- a/template/html/unread_entries.html +++ b/template/html/unread_entries.html @@ -1,22 +1,22 @@ -{{ define "title"}}{{ t "Unread Items" }} {{ if gt .countUnread 0 }}({{ .countUnread }}){{ end }} {{ end }} +{{ define "title"}}{{ t "page.unread.title" }} {{ if gt .countUnread 0 }}({{ .countUnread }}){{ end }} {{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "Unread" }} (<span class="unread-counter">{{ .countUnread }}</span>)</h1> + <h1>{{ t "page.unread.title" }} (<span class="unread-counter">{{ .countUnread }}</span>)</h1> {{ if .entries }} <ul> <li> - <a href="#" data-on-click="markPageAsRead">{{ t "Mark this page as read" }}</a> + <a href="#" data-on-click="markPageAsRead">{{ t "menu.mark_page_as_read" }}</a> </li> <li> - <a href="{{ route "markAllAsRead" }}">{{ t "Mark all as read" }}</a> + <a href="{{ route "markAllAsRead" }}">{{ t "menu.mark_all_as_read" }}</a> </li> </ul> {{ end }} </section> {{ if not .entries }} - <p class="alert">{{ t "There is no unread article." }}</p> + <p class="alert">{{ t "alert.no_unread_entry" }}</p> {{ else }} <div class="items hide-read-items"> {{ range .entries }} @@ -38,7 +38,7 @@ {{ if .entries }} <ul> <li> - <a href="#" data-on-click="markPageAsRead">{{ t "Mark this page as read" }}</a> + <a href="#" data-on-click="markPageAsRead">{{ t "menu.mark_page_as_read" }}</a> </li> </ul> {{ end }} diff --git a/template/html/users.html b/template/html/users.html index 8bffc2f..fb20e85 100644 --- a/template/html/users.html +++ b/template/html/users.html @@ -1,58 +1,58 @@ -{{ define "title"}}{{ t "Users" }}{{ end }} +{{ define "title"}}{{ t "page.users.title" }}{{ end }} {{ define "content"}} <section class="page-header"> - <h1>{{ t "Users" }}</h1> + <h1>{{ t "page.users.title" }}</h1> <ul> <li> - <a href="{{ route "settings" }}">{{ t "Settings" }}</a> + <a href="{{ route "settings" }}">{{ t "menu.settings" }}</a> </li> <li> - <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a> + <a href="{{ route "integrations" }}">{{ t "menu.integrations" }}</a> </li> <li> - <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a> + <a href="{{ route "sessions" }}">{{ t "menu.sessions" }}</a> </li> <li> - <a href="{{ route "createUser" }}">{{ t "Add user" }}</a> + <a href="{{ route "createUser" }}">{{ t "menu.add_user" }}</a> </li> <li> - <a href="{{ route "about" }}">{{ t "About" }}</a> + <a href="{{ route "about" }}">{{ t "menu.about" }}</a> </li> </ul> </section> {{ if eq (len .users) 1 }} - <p class="alert">{{ t "You are the only user." }}</p> + <p class="alert">{{ t "alert.no_user" }}</p> {{ else }} <table> <tr> <th class="column-20">{{ t "Username" }}</th> - <th>{{ t "Administrator" }}</th> - <th>{{ t "Last Login" }}</th> - <th>{{ t "Actions" }}</th> + <th>{{ t "page.users.is_admin" }}</th> + <th>{{ t "page.users.last_login" }}</th> + <th>{{ t "page.users.actions" }}</th> </tr> {{ range .users }} {{ if ne .ID $.user.ID }} <tr> <td>{{ .Username }}</td> - <td>{{ if eq .IsAdmin true }}{{ t "Yes" }}{{ else }}{{ t "No" }}{{ end }}</td> + <td>{{ if eq .IsAdmin true }}{{ t "page.users.admin.yes" }}{{ else }}{{ t "page.users.admin.no" }}{{ end }}</td> <td> {{ if .LastLoginAt }} <time datetime="{{ isodate .LastLoginAt }}" title="{{ isodate .LastLoginAt }}">{{ elapsed $.user.Timezone .LastLoginAt }}</time> {{ else }} - {{ t "Never" }} + {{ t "page.users.never_logged" }} {{ end }} </td> <td> - <a href="{{ route "editUser" "userID" .ID }}">{{ t "Edit" }}</a>, + <a href="{{ route "editUser" "userID" .ID }}">{{ t "action.edit" }}</a>, <a href="#" data-confirm="true" - data-label-question="{{ t "Are you sure?" }}" - data-label-yes="{{ t "yes" }}" - data-label-no="{{ t "no" }}" - data-label-loading="{{ t "Work in progress..." }}" - data-url="{{ route "removeUser" "userID" .ID }}">{{ t "Remove" }}</a> + data-label-question="{{ t "confirm.question" }}" + data-label-yes="{{ t "confirm.yes" }}" + data-label-no="{{ t "confirm.no" }}" + data-label-loading="{{ t "confirm.loading" }}" + data-url="{{ route "removeUser" "userID" .ID }}">{{ t "action.remove" }}</a> </td> </tr> {{ end }} |