From 3a0ff8db8ffc33cb34149cdebe303cbcc6a8d04f Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Tue, 29 Dec 2020 21:07:22 +1300 Subject: [PATCH] Localize into Italian & Swedish --- src/Links.hs | 15 +++++++++++---- useragent.css | 4 ++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/Links.hs b/src/Links.hs index abc882f..c6e7a32 100644 --- a/src/Links.hs +++ b/src/Links.hs @@ -79,12 +79,19 @@ linksFromPage Page { backStack = back', forwardStack = forward' } = -- TODO internationalize! link' "reload" title' url' : - link' "reload without cache" "Fetch again from server without checking for a local copy" - url' { uriScheme = "nocache+" ++ uriScheme url' } : - [link' "back" t u | (t, u) <- head' back'] ++ - [link' "forward" t u | (t, u) <- head' forward' ] ++ + link' "aggiorna" title' url' : -- Italian + link' "ladda om" title' url' : -- Swedish (Svenska) + link' "reload without cache" "Fetch again from server without checking for a local copy" uncached : + link' "aggiorna senza cache" "" uncached : -- Italian + link' "ladda om utan cache" "hämta från servern igen utan att kolla efter en lokal kopia" uncached : -- Swedish (Svenska) + [link' l t u | (t, u) <- head' back', l <- backLabels] ++ + [link' l t u | (t, u) <- head' forward', l <- forwardLabels] ++ [link' n desc $ URI "app:" Nothing id "" "" | Application n _ desc id <- apps'] ++ extractLinks html' + where + uncached = url' { uriScheme = "nocache+" ++ uriScheme url' } + backLabels = ["back", {- Italian -} "indietro", {- Swedish -} "tillbaka"] + forwardLabels = ["forward", {- Italian -} "avanti", {- Swedish -} "framåt"] head' (a:_) = [a] head' [] = [] diff --git a/useragent.css b/useragent.css index 771408c..6dc0ac1 100644 --- a/useragent.css +++ b/useragent.css @@ -20,6 +20,8 @@ table::before {content: "Table"; voice-volume: x-soft} table:lang(hu)::before {content: "táblázat"} table:lang(nl)::before {content: "tabel"} table:lang(es)::before {content: "tabla"} +table:lang(it)::before {content: "tabella"} +table:lang(sv)::before {content: "tabell"} table {counter-increment: -rhaps-table; counter-reset: -rhaps-tablerow} tr { cue-before: url(about:bulletpoint.wav); @@ -57,6 +59,8 @@ img {content: "Image " attr(src)} img:lang(hu):not([alt]) {content: "kép " attr(src)} img:lang(nl):not([alt]) {content: "afbeelding " attr(src)} img:lang(es):not([alt]) {content: "imagen " attr(src)} +img:lang(it):not([alt]) {content: "immagine " attr(src)} +img:lang(sv):not([alt]) {content: "bild " attr(src)} img[alt] {content: attr(alt)} b, strong {voice-rate: slow} -- 2.30.2