##// END OF EJS Templates
Merged r11686 from trunk to 2.3-stable (#13584)...
Toshi MARUYAMA -
r11460:c1d853d95795
parent child
Show More
@@ -0,0 +1,22
1 /* Portuguese initialisation for the jQuery UI date picker plugin. */
2 jQuery(function($){
3 $.datepicker.regional['pt'] = {
4 closeText: 'Fechar',
5 prevText: '<Anterior',
6 nextText: 'Seguinte',
7 currentText: 'Hoje',
8 monthNames: ['Janeiro','Fevereiro','MarΓ§o','Abril','Maio','Junho',
9 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
10 monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
11 'Jul','Ago','Set','Out','Nov','Dez'],
12 dayNames: ['Domingo','Segunda-feira','TerΓ§a-feira','Quarta-feira','Quinta-feira','Sexta-feira','SΓ‘bado'],
13 dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','SΓ‘b'],
14 dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','SΓ‘b'],
15 weekHeader: 'Sem',
16 dateFormat: 'dd/mm/yy',
17 firstDay: 0,
18 isRTL: false,
19 showMonthAfterYear: false,
20 yearSuffix: ''};
21 $.datepicker.setDefaults($.datepicker.regional['pt']);
22 });
@@ -1,109 +1,119
1 1 # Redmine - project management software
2 2 # Copyright (C) 2006-2013 Jean-Philippe Lang
3 3 #
4 4 # This program is free software; you can redistribute it and/or
5 5 # modify it under the terms of the GNU General Public License
6 6 # as published by the Free Software Foundation; either version 2
7 7 # of the License, or (at your option) any later version.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU General Public License
15 15 # along with this program; if not, write to the Free Software
16 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 18 require File.expand_path('../../test_helper', __FILE__)
19 19
20 20 class LayoutTest < ActionController::IntegrationTest
21 21 fixtures :projects, :trackers, :issue_statuses, :issues,
22 22 :enumerations, :users, :issue_categories,
23 23 :projects_trackers,
24 24 :roles,
25 25 :member_roles,
26 26 :members,
27 27 :enabled_modules
28 28
29 29 test "browsing to a missing page should render the base layout" do
30 30 get "/users/100000000"
31 31
32 32 assert_response :not_found
33 33
34 34 # UsersController uses the admin layout by default
35 35 assert_select "#admin-menu", :count => 0
36 36 end
37 37
38 38 test "browsing to an unauthorized page should render the base layout" do
39 39 change_user_password('miscuser9', 'test1234')
40 40
41 41 log_user('miscuser9','test1234')
42 42
43 43 get "/admin"
44 44 assert_response :forbidden
45 45 assert_select "#admin-menu", :count => 0
46 46 end
47 47
48 48 def test_top_menu_and_search_not_visible_when_login_required
49 49 with_settings :login_required => '1' do
50 50 get '/'
51 51 assert_select "#top-menu > ul", 0
52 52 assert_select "#quick-search", 0
53 53 end
54 54 end
55 55
56 56 def test_top_menu_and_search_visible_when_login_not_required
57 57 with_settings :login_required => '0' do
58 58 get '/'
59 59 assert_select "#top-menu > ul"
60 60 assert_select "#quick-search"
61 61 end
62 62 end
63 63
64 64 def test_wiki_formatter_header_tags
65 65 Role.anonymous.add_permission! :add_issues
66 66
67 67 get '/projects/ecookbook/issues/new'
68 68 assert_tag :script,
69 69 :attributes => {:src => %r{^/javascripts/jstoolbar/jstoolbar-textile.min.js}},
70 70 :parent => {:tag => 'head'}
71 71 end
72 72
73 73 def test_calendar_header_tags
74 74 with_settings :default_language => 'fr' do
75 75 get '/issues'
76 76 assert_include "/javascripts/i18n/jquery.ui.datepicker-fr.js", response.body
77 77 end
78 78
79 79 with_settings :default_language => 'en-GB' do
80 80 get '/issues'
81 81 assert_include "/javascripts/i18n/jquery.ui.datepicker-en-GB.js", response.body
82 82 end
83 83
84 84 with_settings :default_language => 'en' do
85 85 get '/issues'
86 86 assert_not_include "/javascripts/i18n/jquery.ui.datepicker", response.body
87 87 end
88 88
89 89 with_settings :default_language => 'zh' do
90 90 get '/issues'
91 91 assert_include "/javascripts/i18n/jquery.ui.datepicker-zh-CN.js", response.body
92 92 end
93 93
94 94 with_settings :default_language => 'zh-TW' do
95 95 get '/issues'
96 96 assert_include "/javascripts/i18n/jquery.ui.datepicker-zh-TW.js", response.body
97 97 end
98
99 with_settings :default_language => 'pt' do
100 get '/issues'
101 assert_include "/javascripts/i18n/jquery.ui.datepicker-pt.js", response.body
102 end
103
104 with_settings :default_language => 'pt-BR' do
105 get '/issues'
106 assert_include "/javascripts/i18n/jquery.ui.datepicker-pt-BR.js", response.body
107 end
98 108 end
99 109
100 110 def test_search_field_outside_project_should_link_to_global_search
101 111 get '/'
102 112 assert_select 'div#quick-search form[action=/search]'
103 113 end
104 114
105 115 def test_search_field_inside_project_should_link_to_project_search
106 116 get '/projects/ecookbook'
107 117 assert_select 'div#quick-search form[action=/projects/ecookbook/search]'
108 118 end
109 119 end
General Comments 0
You need to be logged in to leave comments. Login now