Merge pull request #190 from opf/feature/rails3_drop_translations_we_cannot_support_at_the_moment

Feature/rails3 drop translations we cannot support at the moment
pull/193/merge
sschu 12 years ago
commit 61bbe3f0e0
  1. 1026
      config/locales/bg.yml
  2. 1039
      config/locales/bs.yml
  3. 1028
      config/locales/ca.yml
  4. 1245
      config/locales/cs.yml
  5. 1041
      config/locales/da.yml
  6. 1025
      config/locales/el.yml
  7. 1035
      config/locales/en-GB.yml
  8. 1062
      config/locales/es.yml
  9. 1029
      config/locales/eu.yml
  10. 1028
      config/locales/fa.yml
  11. 1046
      config/locales/fi.yml
  12. 1043
      config/locales/fr.yml
  13. 1035
      config/locales/gl.yml
  14. 1030
      config/locales/he.yml
  15. 1032
      config/locales/hr.yml
  16. 1046
      config/locales/hu.yml
  17. 1033
      config/locales/id.yml
  18. 1026
      config/locales/it.yml
  19. 1047
      config/locales/ja.yml
  20. 1077
      config/locales/ko.yml
  21. 1085
      config/locales/lt.yml
  22. 1020
      config/locales/lv.yml
  23. 1025
      config/locales/mk.yml
  24. 1026
      config/locales/mn.yml
  25. 1005
      config/locales/nl.yml
  26. 1012
      config/locales/no.yml
  27. 1040
      config/locales/pl.yml
  28. 1049
      config/locales/pt-BR.yml
  29. 1029
      config/locales/pt.yml
  30. 1018
      config/locales/ro.yml
  31. 1138
      config/locales/ru.yml
  32. 1020
      config/locales/sk.yml
  33. 1021
      config/locales/sl.yml
  34. 1025
      config/locales/sr-YU.yml
  35. 1026
      config/locales/sr.yml
  36. 1067
      config/locales/sv.yml
  37. 1022
      config/locales/th.yml
  38. 1044
      config/locales/tr.yml
  39. 1021
      config/locales/uk.yml
  40. 1076
      config/locales/vi.yml
  41. 1107
      config/locales/zh-TW.yml
  42. 1039
      config/locales/zh.yml
  43. 4
      features/custom_fields/create_text.feature
  44. 3
      features/custom_fields/edit_bool.feature
  45. 9
      features/custom_fields/edit_bool_delete_localizations.feature
  46. 6
      test/functional/admin_controller_test.rb
  47. 20
      test/functional/user_mailer_test.rb
  48. 14
      test/functional/welcome_controller_test.rb
  49. 14
      test/integration/application_test.rb
  50. 12
      test/unit/lib/redmine/helpers/calendar_test.rb
  51. 21
      test/unit/lib/redmine/i18n_test.rb

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -16,7 +16,6 @@ Feature: Text custom fields can be created
And the following languages are active:
| en |
| de |
| fr |
When I go to the custom fields page
When I follow "New custom field" within "#tab-content-IssueCustomField"
@ -25,17 +24,14 @@ Feature: Text custom fields can be created
When I select "Text" from "custom_field_field_format"
And I set the english localization of the "name" attribute to "New Field"
And I add the german localization of the "name" attribute as "Neues Feld"
And I add the french localization of the "name" attribute as "Lorem ipsum"
And I set the english localization of the "default_value" attribute to "default"
And I add the german localization of the "default_value" attribute as "Standard"
And I add the french localization of the "default_value" attribute as "Lorem"
And I press "Save"
And I follow "New Field"
Then there should be the following localizations:
| locale | name | default_value |
| en | New Field | default |
| de | Neues Feld | Standard |
| fr | Lorem ipsum | Lorem |
Scenario: Creating a custom field with one name
And I set the english localization of the "name" attribute to "Issue Field"

@ -16,7 +16,6 @@ Feature: Editing a bool custom field
And the following languages are active:
| en |
| de |
| fr |
And the following issue custom fields are defined:
| name | type |
| IssueCustomField | bool |
@ -27,7 +26,6 @@ Feature: Editing a bool custom field
When I follow "IssueCustomField"
And I set the english localization of the "name" attribute to "Issue Field"
And I add the german localization of the "name" attribute as "Ticket Feld"
And I add the french localization of the "name" attribute as "Lorem"
And I press "Save"
Then I should be on the custom fields page
When I follow "Issue Field"
@ -35,7 +33,6 @@ Feature: Editing a bool custom field
| locale | name | default_value |
| en | Issue Field | 0 |
| de | Ticket Feld | nil |
| fr | Lorem | nil |
And I should not see "Add" within "#custom_field_name_attributes"
Scenario: Entering a long name displays an error

@ -16,7 +16,6 @@ Feature: Name localizations of bool custom fields can be deleted
And the following languages are active:
| en |
| de |
| fr |
And the following issue custom fields are defined:
| name | type |
| My Custom Field | bool |
@ -62,14 +61,16 @@ Feature: Name localizations of bool custom fields can be deleted
@javascript
Scenario: Deleting a newly added localization
When I follow "My Custom Field"
And I add the french localization of the "name" attribute as "To delete"
And I delete the french localization of the "name" attribute
And I delete the german localization of the "name" attribute
And I press "Save"
And I follow "My Custom Field"
And I add the german localization of the "name" attribute as "To delete"
And I delete the german localization of the "name" attribute
And I press "Save"
And I follow "My Custom Field"
Then there should be the following localizations:
| locale | name | default_value |
| en | My Custom Field | 0 |
| de | Mein Benutzerdefiniertes Feld | nil |
@javascript
Scenario: Deletion link is hidden when only one localization exists

@ -60,12 +60,12 @@ class AdminControllerTest < ActionController::TestCase
end
def test_load_default_configuration_data
Setting.available_languages = [:fr]
Setting.available_languages = [:de]
delete_configuration_data
post :default_configuration, :lang => 'fr'
post :default_configuration, :lang => 'de'
assert_response :redirect
assert_nil flash[:error]
assert IssueStatus.find_by_name('Nouveau')
assert IssueStatus.find_by_name('Neu')
end
def test_test_email

@ -327,16 +327,16 @@ class UserMailerTest < ActionMailer::TestCase
issue = FactoryGirl.create(:issue)
user = FactoryGirl.create(:user, :mail => 'foo@bar.de', :language => '') # (auto)
ActionMailer::Base.deliveries.clear
with_settings :available_languages => ['en', 'de', 'fr'],
with_settings :available_languages => ['en', 'de'],
:default_language => 'de' do
I18n.locale = 'fr'
I18n.locale = 'de'
assert UserMailer.issue_added(user, issue).deliver
assert_equal 1, ActionMailer::Base.deliveries.size
mail = last_email
assert_equal ['foo@bar.de'], mail.to
assert !mail.body.encoded.include?('reported')
assert mail.body.encoded.include?('erstellt')
assert_equal :fr, I18n.locale
assert_equal :de, I18n.locale
end
end
end
@ -466,16 +466,16 @@ class UserMailerTest < ActionMailer::TestCase
end
def test_mailer_should_not_change_locale
with_settings :available_languages => ['en', 'it', 'fr'],
with_settings :available_languages => ['en', 'de'],
:default_language => 'en' do
# Set current language to italian
I18n.locale = :it
# Send an email to a french user
user = FactoryGirl.create(:user, :language => 'fr')
# Set current language to english
I18n.locale = :en
# Send an email to a german user
user = FactoryGirl.create(:user, :language => 'de')
UserMailer.account_activated(user).deliver
mail = ActionMailer::Base.deliveries.last
assert mail.body.encoded.include?('Votre compte')
assert_equal :it, I18n.locale
assert mail.body.encoded.include?('aktiviert')
assert_equal :en, I18n.locale
end
end

@ -23,7 +23,7 @@ class WelcomeControllerTest < ActionController::TestCase
@controller = WelcomeController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
Setting.available_languages = [:en, :fr, :"zh-TW"]
Setting.available_languages = [:en, :de]
User.current = nil
end
@ -38,23 +38,23 @@ class WelcomeControllerTest < ActionController::TestCase
def test_browser_language
Setting.default_language = 'en'
@request.env['HTTP_ACCEPT_LANGUAGE'] = 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3'
@request.env['HTTP_ACCEPT_LANGUAGE'] = 'de,de-de;q=0.8,en-us;q=0.5,en;q=0.3'
get :index
assert_equal :fr, @controller.current_language
assert_equal :de, @controller.current_language
end
def test_browser_language_alternate
Setting.default_language = 'en'
@request.env['HTTP_ACCEPT_LANGUAGE'] = 'zh-TW'
@request.env['HTTP_ACCEPT_LANGUAGE'] = 'de'
get :index
assert_equal :"zh-TW", @controller.current_language
assert_equal :"de", @controller.current_language
end
def test_browser_language_alternate_not_valid
Setting.default_language = 'en'
@request.env['HTTP_ACCEPT_LANGUAGE'] = 'fr-CA'
@request.env['HTTP_ACCEPT_LANGUAGE'] = 'de-CA'
get :index
assert_equal :fr, @controller.current_language
assert_equal :de, @controller.current_language
end
def test_robots

@ -17,20 +17,14 @@ class ApplicationTest < ActionDispatch::IntegrationTest
fixtures :all
def test_set_localization
Setting.available_languages = [:fr, :en, :it]
Setting.available_languages = [:de, :en]
Setting.default_language = 'en'
# a french user
get 'projects', { }, { 'HTTP_ACCEPT_LANGUAGE' => 'fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3'}
get 'projects', { }, { 'HTTP_ACCEPT_LANGUAGE' => 'de,de-de;q=0.8,en-us;q=0.5,en;q=0.3'}
assert_response :success
assert_tag :tag => 'h2', :content => 'Projets'
assert_equal :fr, current_language
# then an italien user
get 'projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'it;q=0.8,en-us;q=0.5,en;q=0.3'
assert_response :success
assert_tag :tag => 'h2', :content => 'Progetti'
assert_equal :it, current_language
assert_tag :tag => 'h2', :content => 'Projekte'
assert_equal :de, current_language
# not a supported language: default language should be used
get 'projects', { }, 'HTTP_ACCEPT_LANGUAGE' => 'zz'

@ -14,11 +14,11 @@ require File.expand_path('../../../../../test_helper', __FILE__)
class CalendarTest < ActiveSupport::TestCase
def test_monthly
Setting.available_languages = [:fr, :en]
c = Redmine::Helpers::Calendar.new(Date.today, :fr, :month)
Setting.available_languages = [:de, :en]
c = Redmine::Helpers::Calendar.new(Date.today, :de, :month)
assert_equal [1, 7], [c.startdt.cwday, c.enddt.cwday]
c = Redmine::Helpers::Calendar.new('2007-07-14'.to_date, :fr, :month)
c = Redmine::Helpers::Calendar.new('2007-07-14'.to_date, :de, :month)
assert_equal ['2007-06-25'.to_date, '2007-08-05'.to_date], [c.startdt, c.enddt]
c = Redmine::Helpers::Calendar.new(Date.today, :en, :month)
@ -26,11 +26,11 @@ class CalendarTest < ActiveSupport::TestCase
end
def test_weekly
Setting.available_languages = [:fr, :en]
c = Redmine::Helpers::Calendar.new(Date.today, :fr, :week)
Setting.available_languages = [:de, :en]
c = Redmine::Helpers::Calendar.new(Date.today, :de, :week)
assert_equal [1, 7], [c.startdt.cwday, c.enddt.cwday]
c = Redmine::Helpers::Calendar.new('2007-07-14'.to_date, :fr, :week)
c = Redmine::Helpers::Calendar.new('2007-07-14'.to_date, :de, :week)
assert_equal ['2007-07-09'.to_date, '2007-07-15'.to_date], [c.startdt, c.enddt]
c = Redmine::Helpers::Calendar.new(Date.today, :en, :week)

@ -118,14 +118,13 @@ class Redmine::I18nTest < ActiveSupport::TestCase
end
def test_valid_language
Setting.available_languages = [:fr, :zh, :"zh-TW"]
Setting.available_languages = [:de, :zh]
to_test = {'fr' => :fr,
'Fr' => :fr,
'zh' => :zh,
'zh-tw' => :"zh-TW",
'zh-TW' => :"zh-TW",
'zh-ZZ' => nil }
to_test = {'de' => :de,
'DE' => :de,
'De' => :de,
'de-ZZ' => nil,
'zh' => nil }
to_test.each {|lang, expected| assert_equal expected, find_language(lang)}
end
@ -134,13 +133,13 @@ class Redmine::I18nTest < ActiveSupport::TestCase
::I18n.backend.store_translations(:en, {:untranslated => "Untranslated string"})
::I18n.locale = 'en'
assert_equal "Untranslated string", l(:untranslated)
::I18n.locale = 'fr'
::I18n.locale = 'de'
assert_equal "Untranslated string", l(:untranslated)
::I18n.backend.store_translations(:fr, {:untranslated => "Pas de traduction"})
::I18n.backend.store_translations(:de, {:untranslated => "Keine Übersetzung"})
::I18n.locale = 'en'
assert_equal "Untranslated string", l(:untranslated)
::I18n.locale = 'fr'
assert_equal "Pas de traduction", l(:untranslated)
::I18n.locale = 'de'
assert_equal "Keine Übersetzung", l(:untranslated)
end
end

Loading…
Cancel
Save