$forall (path, _) <- jfiles j
@@ -15,8 +15,8 @@
#{path}
- Edit
+ _{HMsg "Edit"}
- Upload
+ _{HMsg "Upload"}
- Download
+ _{HMsg "Download"}
diff --git a/hledger-web/templates/register.hamlet b/hledger-web/templates/register.hamlet
index e8f3fe49347..f463a859172 100644
--- a/hledger-web/templates/register.hamlet
+++ b/hledger-web/templates/register.hamlet
@@ -2,18 +2,18 @@
#{header}
- ^{registerChartHtml qparam balancelabel $ accountTransactionsReportByCommodity items}
+ ^{registerChartHtml qparam (T.unpack balancelabel) $ accountTransactionsReportByCommodity items}
|
- Date
+ _{HMsgc "column heading" "Date"}
- | Description
- | To/From Account(s)
- | Amount Out/In
+ | _{HMsgc "column heading" "Description"}
+ | _{HMsgc "column heading" "To/From Account(s)"}
+ | _{HMsgc "column heading" "Amount Out/In"}
|
#{balancelabel}
diff --git a/hledger-web/templates/upload-form.hamlet b/hledger-web/templates/upload-form.hamlet
index 1c36f8833bc..fd71a90537e 100644
--- a/hledger-web/templates/upload-form.hamlet
+++ b/hledger-web/templates/upload-form.hamlet
@@ -1,13 +1,13 @@
- Upload to file #
+ _{HMsg "Upload to file"} #
#{f}
- Are you sure? This will overwrite your journal!
+ _{HMsg "Are you sure? This will overwrite your journal!"}
"
+
yit "keeps the period parameter off the other pages' search forms" $ do
request $ do
setMethod "GET"
diff --git a/hledger-web/Hledger/Web/Widget/Common.hs b/hledger-web/Hledger/Web/Widget/Common.hs
index 6e17ce419bb..5a0f8b902c0 100644
--- a/hledger-web/Hledger/Web/Widget/Common.hs
+++ b/hledger-web/Hledger/Web/Widget/Common.hs
@@ -93,21 +93,24 @@ balanceReportAsHtml (journalR, registerR) here hideEmpty trs j qparam qopts (ite
-- | Links to the balance report page, single-period and for each
-- interval, carrying the current search and date span; the report being
-- shown, identified by the interval it was built with, is marked.
-balanceReportLinks :: r -> Text -> DateSpan -> Interval -> HtmlUrl r
-balanceReportLinks balanceR qparam spn current =
+balanceReportLinks :: r -> Translations -> Text -> DateSpan -> Interval -> HtmlUrl r
+balanceReportLinks balanceR trs qparam spn current =
$(hamletFile "templates/balance-links.hamlet")
where
+ -- TRANSLATORS: the label before the balance page's report links.
+ reportlabel = tr trs "Report:"
-- Each link's label and title is a whole phrase, not a word slotted
-- into a sentence: an adjective that fits one language's sentence does
-- not fit another's, so a translation cannot be assembled from parts.
+ -- TRANSLATORS: the balance page's report links: each link's text, and its tooltip.
reports :: [(Text, Text, Maybe Text, Interval)]
reports =
- [ ("Balance", "Show the balance report", Nothing, NoInterval)
- , ("Yearly", "Show the yearly balance report", Just "yearly", Years 1)
- , ("Quarterly", "Show the quarterly balance report", Just "quarterly", Quarters 1)
- , ("Monthly", "Show the monthly balance report", Just "monthly", Months 1)
- , ("Weekly", "Show the weekly balance report", Just "weekly", Weeks 1)
- , ("Daily", "Show the daily balance report", Just "daily", Days 1)
+ [ (tr trs "Balance", tr trs "Show the balance report", Nothing, NoInterval)
+ , (tr trs "Yearly", tr trs "Show the yearly balance report", Just "yearly", Years 1)
+ , (tr trs "Quarterly", tr trs "Show the quarterly balance report", Just "quarterly", Quarters 1)
+ , (tr trs "Monthly", tr trs "Show the monthly balance report", Just "monthly", Months 1)
+ , (tr trs "Weekly", tr trs "Show the weekly balance report", Just "weekly", Weeks 1)
+ , (tr trs "Daily", tr trs "Show the daily balance report", Just "daily", Days 1)
]
-- Each link keeps the period's date span, so that changing the
-- interval does not silently widen the report to the whole journal.
diff --git a/hledger-web/templates/balance-links.hamlet b/hledger-web/templates/balance-links.hamlet
index 21c6cc077ea..6b7fc4b6da3 100644
--- a/hledger-web/templates/balance-links.hamlet
+++ b/hledger-web/templates/balance-links.hamlet
@@ -1,4 +1,4 @@
- Report:
+ #{reportlabel}
$forall (label, title, mperiod, interval) <- reports
#{label}
| |