Changeset:
bb9a49995c99
https://sourceforge.net/p/mrbs/hg-code/ci/bb9a49995c99fca0b126ae7c2e6b6262ae19f5f0
Author:
Campbell Morrison <[email protected]>
Date:
Mon Mar 06 14:54:24 2017 +0000
Log message:
Added a language attribute to the <html> element and then adjusted the CSS for
labels for French.
diffstat:
web/Themes/default/header.inc | 2 +-
web/css/mrbs-ielte8.css | 4 ++++
web/css/mrbs.css.php | 4 ++++
web/language.inc | 9 +++++++++
4 files changed, 18 insertions(+), 1 deletions(-)
diffs (59 lines):
diff -r b851618aee0c -r bb9a49995c99 web/Themes/default/header.inc
--- a/web/Themes/default/header.inc Mon Mar 06 14:15:20 2017 +0000
+++ b/web/Themes/default/header.inc Mon Mar 06 14:54:24 2017 +0000
@@ -220,7 +220,7 @@
echo DOCTYPE;
- echo "<html>\n";
+ echo "<html lang=\"" . htmlspecialchars(get_lang()) . "\">\n";
print_head($simple);
diff -r b851618aee0c -r bb9a49995c99 web/css/mrbs-ielte8.css
--- a/web/css/mrbs-ielte8.css Mon Mar 06 14:15:20 2017 +0000
+++ b/web/css/mrbs-ielte8.css Mon Mar 06 14:54:24 2017 +0000
@@ -8,6 +8,10 @@
content: ':';
}
+[lang="fr"] label:after {
+ content: '\00a0:';
+}
+
label.no_suffix:after {
content: '';
}
diff -r b851618aee0c -r bb9a49995c99 web/css/mrbs.css.php
--- a/web/css/mrbs.css.php Mon Mar 06 14:15:20 2017 +0000
+++ b/web/css/mrbs.css.php Mon Mar 06 14:54:24 2017 +0000
@@ -73,6 +73,10 @@
content: ':';
}
+[lang="fr"] label::after {
+ content: '\00a0:'; <?php // before the colon ?>
+}
+
label.no_suffix::after {
content: '';
}
diff -r b851618aee0c -r bb9a49995c99 web/language.inc
--- a/web/language.inc Mon Mar 06 14:15:20 2017 +0000
+++ b/web/language.inc Mon Mar 06 14:54:24 2017 +0000
@@ -1130,6 +1130,15 @@
}
+// Returns the language that MRBS is sing, in BCP-47 format
+function get_lang()
+{
+ global $lang;
+
+ return $lang;
+}
+
+
function get_bom($charset)
{
switch(utf8_strtolower($charset))
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits