mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-01 03:57:15 +00:00
Declare text direction on HTML element for better RTL/LTR styling support (#43506).
Patch by Go MAEDA (user:maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@24151 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cadb79138d
commit
4791d3801f
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="<%= current_language %>">
|
||||
<html lang="<%= current_language %>" dir="<%= l(:direction) %>">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title><%= html_title %></title>
|
||||
|
||||
@ -31,6 +31,7 @@ class ApplicationTest < Redmine::IntegrationTest
|
||||
assert_select 'h2', :text => 'Projets'
|
||||
assert_equal :fr, current_language
|
||||
assert_select "html[lang=?]", "fr"
|
||||
assert_select "html[dir=?]", "ltr"
|
||||
|
||||
# then an italien user
|
||||
get '/projects', :headers => {'HTTP_ACCEPT_LANGUAGE' => 'it;q=0.8,en-us;q=0.5,en;q=0.3'}
|
||||
@ -38,12 +39,19 @@ class ApplicationTest < Redmine::IntegrationTest
|
||||
assert_select 'h2', :text => 'Progetti'
|
||||
assert_equal :it, current_language
|
||||
assert_select "html[lang=?]", "it"
|
||||
assert_select "html[dir=?]", "ltr"
|
||||
|
||||
# html[dir] should be "rtl" for right-to-left scripts
|
||||
get '/projects', :headers => {'HTTP_ACCEPT_LANGUAGE' => 'ar'}
|
||||
assert_response :success
|
||||
assert_select "html[dir=?]", "rtl"
|
||||
|
||||
# not a supported language: default language should be used
|
||||
get '/projects', :headers => {'HTTP_ACCEPT_LANGUAGE' => 'zz'}
|
||||
assert_response :success
|
||||
assert_select 'h2', :text => 'Projects'
|
||||
assert_select "html[lang=?]", "en"
|
||||
assert_select "html[dir=?]", "ltr"
|
||||
end
|
||||
|
||||
def test_token_based_access_should_not_start_session
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user