From 735e43cc456ffbb0d3ee90a4b56d7fc96943be1c Mon Sep 17 00:00:00 2001 From: Peter Palmreuther Date: Sun, 11 Oct 2015 19:28:14 +0100 Subject: [PATCH] Enable language and language direction attributes For Right-To-Left languages HTML markup should contain appropriate information, to come closer towards "real" i18n. --- lagesonum/configuration.py | 8 ++++---- lagesonum/views/footer.tpl | 2 +- lagesonum/views/header.tpl | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lagesonum/configuration.py b/lagesonum/configuration.py index 0a0d11b..244f5ce 100644 --- a/lagesonum/configuration.py +++ b/lagesonum/configuration.py @@ -3,10 +3,10 @@ MAX_DAYS = 5 # locales in alphabetical order -LANGS = [ ('ar_SY', u'العربية', str.maketrans('1234567890', '١٢٣٤٥٦٧٨٩٠')), - ('de_DE', u'Deutsch', str.maketrans('1234567890', '1234567890')), - ('en_US', u'English', str.maketrans('1234567890', '1234567890')), - ('eo_EO', u'Esperanto', str.maketrans('1234567890', '1234567890')) +LANGS = [ ('ar_SY', u'العربية', str.maketrans('1234567890', '١٢٣٤٥٦٧٨٩٠'), 'rtl'), + ('de_DE', u'Deutsch', str.maketrans('1234567890', '1234567890'), 'ltr'), + ('en_US', u'English', str.maketrans('1234567890', '1234567890'), 'ltr'), + ('eo_EO', u'Esperanto', str.maketrans('1234567890', '1234567890'), 'ltr'), # ('fa_IR', u'?????'), # ('prs_AF', u'???'), # ('tr_TR', u'Türkçe'), diff --git a/lagesonum/views/footer.tpl b/lagesonum/views/footer.tpl index 8c382af..383942b 100644 --- a/lagesonum/views/footer.tpl +++ b/lagesonum/views/footer.tpl @@ -1,4 +1,4 @@ -
+

Diese Seite befindet sich noch im Testbetrieb. Es können unerwartete Störungen auftreten. Wir bitten um Entschuldigung. This website is still being tested. Unexpected errors may occur. We apologize for any inconvenience.

diff --git a/lagesonum/views/header.tpl b/lagesonum/views/header.tpl index e45377f..24e7cf9 100644 --- a/lagesonum/views/header.tpl +++ b/lagesonum/views/header.tpl @@ -1,7 +1,7 @@ % setdefault('current_lang', [l for l in languages if l[0] == request.locale][0]) - + @@ -74,7 +74,7 @@ pick a language {{current_lang[1]}}