From beb7a0cfcb6a5a76d680707a4c458eee51d87c07 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Fri, 21 Sep 2018 18:53:29 -0700 Subject: Use unique translation IDs instead of English text as key --- template/common.go | 132 +++---- template/elapsed.go | 70 ---- template/elapsed_test.go | 38 -- template/functions.go | 46 ++- template/functions_test.go | 31 ++ template/html/about.html | 24 +- template/html/add_subscription.html | 30 +- template/html/bookmark_entries.html | 6 +- template/html/categories.html | 20 +- template/html/category_entries.html | 6 +- template/html/choose_subscription.html | 14 +- template/html/common/entry_pagination.html | 8 +- template/html/common/item_meta.html | 28 +- template/html/common/layout.html | 80 ++-- template/html/common/pagination.html | 8 +- template/html/create_category.html | 10 +- template/html/create_user.html | 24 +- template/html/edit_category.html | 12 +- template/html/edit_feed.html | 52 +-- template/html/edit_user.html | 26 +- template/html/entry.html | 36 +- template/html/feed_entries.html | 12 +- template/html/feeds.html | 28 +- template/html/history_entries.html | 8 +- template/html/import.html | 14 +- template/html/integrations.html | 78 ++-- template/html/login.html | 10 +- template/html/search_entries.html | 6 +- template/html/sessions.html | 34 +- template/html/settings.html | 36 +- template/html/unread_entries.html | 12 +- template/html/users.html | 38 +- template/views.go | 582 ++++++++++++++--------------- 33 files changed, 763 insertions(+), 796 deletions(-) delete mode 100644 template/elapsed.go delete mode 100644 template/elapsed_test.go (limited to 'template') diff --git a/template/common.go b/template/common.go index 74379a0..bfd3f7a 100644 --- a/template/common.go +++ b/template/common.go @@ -7,17 +7,17 @@ var templateCommonMap = map[string]string{ @@ -34,40 +34,40 @@ var templateCommonMap = map[string]string{ {{ if .hasSaveEntry }}
  • {{ t "Save" }} + data-label-loading="{{ t "entry.state.saving" }}" + data-label-done="{{ t "entry.save.completed" }}" + >{{ t "entry.save.label" }}
  • {{ end }}
  • - {{ t "Original" }} + {{ t "entry.original.label" }}
  • {{ if .entry.CommentsURL }}
  • - {{ t "Comments" }} + {{ t "entry.comments.label" }}
  • {{ end }}
  • {{ if .entry.Starred }}★ {{ t "Unstar" }}{{ else }}☆ {{ t "Star" }}{{ end }} + >{{ if .entry.Starred }}★ {{ t "entry.bookmark.toggle.off" }}{{ else }}☆ {{ t "entry.bookmark.toggle.on" }}{{ end }}
  • {{ if eq .entry.Status "read" }}✘ {{ t "Unread" }}{{ else }}✔︎ {{ t "Read" }}{{ end }} + >{{ if eq .entry.Status "read" }}✘ {{ t "entry.status.unread" }}{{ else }}✔︎ {{ t "entry.status.read" }}{{ end }}
  • @@ -120,42 +120,42 @@ var templateCommonMap = map[string]string{ Miniflux @@ -173,43 +173,43 @@ var templateCommonMap = map[string]string{