]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Accessibility: specify the HTML lang attribute 1272/head
authorArthurHoaro <arthur@hoa.ro>
Sat, 9 Feb 2019 13:29:35 +0000 (14:29 +0100)
committerArthurHoaro <arthur@hoa.ro>
Sat, 9 Feb 2019 13:29:35 +0000 (14:29 +0100)
The lang is based on the user defined one. If the language is automatic, no language will be specified.

Fixes #1216

20 files changed:
application/render/PageBuilder.php
index.php
tpl/default/404.html
tpl/default/addlink.html
tpl/default/changepassword.html
tpl/default/changetag.html
tpl/default/configure.html
tpl/default/daily.html
tpl/default/editlink.html
tpl/default/export.html
tpl/default/import.html
tpl/default/install.html
tpl/default/linklist.html
tpl/default/loginform.html
tpl/default/picwall.html
tpl/default/pluginsadmin.html
tpl/default/tag.cloud.html
tpl/default/tag.list.html
tpl/default/thumbnails.html
tpl/default/tools.html

index 0569b67f93e4ded88780e1d52ee2c22a4e2054e1..3f86fc2681010c99b724ffbcef2cc758b0240418 100644 (file)
@@ -123,6 +123,8 @@ class PageBuilder
         $this->tpl->assign('hide_timestamps', $this->conf->get('privacy.hide_timestamps', false));
         $this->tpl->assign('token', $this->token);
 
+        $this->tpl->assign('language', $this->conf->get('translation.language'));
+
         if ($this->linkDB !== null) {
             $this->tpl->assign('tags', $this->linkDB->linksCountPerTag());
         }
index 633ab89e6386e90eaa02f76d5a1880cb9366dccb..50a871e0d182235233e6370f1062d9858c67ba17 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1074,7 +1074,6 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager,
             $PAGE->assign('api_enabled', $conf->get('api.enabled', true));
             $PAGE->assign('api_secret', $conf->get('api.secret'));
             $PAGE->assign('languages', Languages::getAvailableLanguages());
-            $PAGE->assign('language', $conf->get('translation.language'));
             $PAGE->assign('gd_enabled', extension_loaded('gd'));
             $PAGE->assign('thumbnails_mode', $conf->get('thumbnails.mode', Thumbnailer::MODE_NONE));
             $PAGE->assign('pagetitle', t('Configure') .' - '. $conf->get('general.title', 'Shaarli'));
index fd337cada52332a7850fb75ce3cb0808d235104c..10a9458a6d7f467977756a0e0b374c1161d0182b 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index 55864a023947c201ad09fd32754452f45bb02c6d..b4b4a0ec1e3a5443d6923dc72fca9535806ba132 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index 2d15c92ac81e2775d9992626b4384a1954dd15c3..3867e3ca45d4bffe0fb4b13e9ab244e18a8ca1ac 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index 6606c4fa6bacb6495f2185ee3b03798520fdde42..0da6a5ebf39aa0bf8e4db70b5db900789e089c80 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index 42e32230b7bacb88cad86354e06072bac72078c0..7a87c05dfe0f6ce17272e5d3be281372e992e8ff 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index 2c409478bed424edd51700855ed2f352c70dd9df..359ecbd0ec206d1b4116e9c076db6711e49facd2 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index d8c571552aced2a76cfb44a54dc22ded64622d5e..df14535d610ce5ce8008b3205d79121332065afe 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index af1d6e330218c75df41b2bb2c0f1a0aff5ddcfdc..99c01b11523a39fa72bc7da02e3b4582d01faa7f 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index bdc9086e304e1fbaf1e9accf58617e34be5a974d..20f854d10d2f2be3736a55c4faea8ea4acfcf046 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index 6199b33d6499bfbf988c65ccc16dc00880c78e51..f0e7040e0545c56eefe78aaf42e6e58d71107486 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index ed78f40a7502f625e60659a92738ef91fc669226..d7005c21cacefce82aed9430e5f4ba206c749818 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index 3cdab65ac367b47fb08b61c3030aff1a6660c1f3..bfc548154b982add5db736e90be864a6584589fc 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index 4c325487ac0dbfe10328f79205a4f4e9a4d1f242..5a95924497f10540b706b64a66fc7343699ae3aa 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index 820419725f7469e1f96fe94a46293b5ed9f97578..4bfaa934381893d09dd46388b34cd4ac3d4448e3 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index 9e52158dead46f29be307d8c6800100006f6ddeb..bedf3f8cbdc48badba69a568f2e5b71cd33a3d70 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index bcddcd56337a745c5a06d87a0476572ada9201aa..41eab246896b6d932644bb39ca9dcdb6dbf7c8a8 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index a8cf904e1a81c3657b09bbc6319c1a2340fe3542..f193979894b61c9a270a4c2a853405774dbd2b11 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>
index c9ce1eaf4970b61ecc40f0e0e96ce47b56f666e9..20d0c893cb8d80d7dce271d8937189daa7775ac1 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>
-<html>
+<html{if="$language !== 'auto'"} lang="{$language}"{/if}>
 <head>
   {include="includes"}
 </head>