~alcinnz/rhapsode

3a0ff8db8ffc33cb34149cdebe303cbcc6a8d04f — Adrian Cochrane 3 years ago a9c0bfc
Localize into Italian & Swedish
2 files changed, 15 insertions(+), 4 deletions(-)

M src/Links.hs
M useragent.css
M src/Links.hs => src/Links.hs +11 -4
@@ 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' [] = []

M useragent.css => useragent.css +4 -0
@@ 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}