Fix syntax error for pt-BR and ajust unit test
This commit is contained in:
@@ -5,6 +5,7 @@ Changelog
|
||||
-----
|
||||
|
||||
- Drop testing with travis - we use github actions
|
||||
- Add translation pt-BR - thanks to @lucianocosta
|
||||
|
||||
1.0.7
|
||||
-----
|
||||
|
||||
72
Gemfile.lock
Normal file
72
Gemfile.lock
Normal file
@@ -0,0 +1,72 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actionpack (5.2.4.2)
|
||||
actionview (= 5.2.4.2)
|
||||
activesupport (= 5.2.4.2)
|
||||
rack (~> 2.0, >= 2.0.8)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||
actionview (5.2.4.2)
|
||||
activesupport (= 5.2.4.2)
|
||||
builder (~> 3.1)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||
activesupport (5.2.4.2)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
builder (3.2.4)
|
||||
concurrent-ruby (1.1.8)
|
||||
crass (1.0.6)
|
||||
erubi (1.10.0)
|
||||
i18n (1.8.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
loofah (2.9.0)
|
||||
crass (~> 1.0.2)
|
||||
nokogiri (>= 1.5.9)
|
||||
method_source (1.0.0)
|
||||
minitest (5.14.4)
|
||||
nokogiri (1.11.2-x86_64-darwin)
|
||||
racc (~> 1.4)
|
||||
racc (1.5.2)
|
||||
rack (2.2.3)
|
||||
rack-test (1.1.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rails-dom-testing (2.0.3)
|
||||
activesupport (>= 4.2.0)
|
||||
nokogiri (>= 1.6)
|
||||
rails-html-sanitizer (1.3.0)
|
||||
loofah (~> 2.3)
|
||||
railties (5.2.4.2)
|
||||
actionpack (= 5.2.4.2)
|
||||
activesupport (= 5.2.4.2)
|
||||
method_source
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.19.0, < 2.0)
|
||||
rake (13.0.3)
|
||||
slim (4.1.0)
|
||||
temple (>= 0.7.6, < 0.9)
|
||||
tilt (>= 2.0.6, < 2.1)
|
||||
slim-rails (3.2.0)
|
||||
actionpack (>= 3.1)
|
||||
railties (>= 3.1)
|
||||
slim (>= 3.0, < 5.0)
|
||||
temple (0.8.2)
|
||||
thor (1.1.0)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.0.10)
|
||||
tzinfo (1.2.9)
|
||||
thread_safe (~> 0.1)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
slim-rails
|
||||
|
||||
BUNDLED WITH
|
||||
2.1.4
|
||||
@@ -1,6 +1,6 @@
|
||||
# Brazilian Portuguese strings
|
||||
pt-BR:
|
||||
default_mentionsl_info: Pessoas a notificar, separadas por vírgula (ex: @all, @here)
|
||||
default_mentionsl_info: "Pessoas a notificar, separadas por vírgula (ex: @all, @here)"
|
||||
label_messenger_contact_created: "%{project_url} - Contato %{url} criado por *%{user}*"
|
||||
label_messenger_contact_updated: "%{project_url} - Contato %{url} atualizado por *%{user}*"
|
||||
label_messenger_db_entry_created: "%{project_url} - Entrada de dado %{url} criada por *%{user}*"
|
||||
|
||||
@@ -18,17 +18,18 @@ class I18nTest < ActiveSupport::TestCase
|
||||
|
||||
def test_locales_validness
|
||||
lang_files_count = Dir[Rails.root.join('plugins/redmine_messenger/config/locales/*.yml')].size
|
||||
assert_equal lang_files_count, 5
|
||||
|
||||
assert_equal 6, lang_files_count
|
||||
valid_languages.each do |lang|
|
||||
assert set_language_if_valid(lang)
|
||||
case lang.to_s
|
||||
when 'en'
|
||||
assert_equal 'Messenger username', l(:label_settings_messenger_username)
|
||||
when 'de', 'fr', 'ja', 'ko', 'pt-BR'
|
||||
assert_not l(:label_settings_messenger_username) == 'Messenger username', lang
|
||||
end
|
||||
end
|
||||
# check if parse error exists
|
||||
::I18n.locale = 'de'
|
||||
assert_equal 'Messenger Benutzer', l(:label_settings_messenger_username)
|
||||
::I18n.locale = 'en'
|
||||
assert_equal 'Messenger username', l(:label_settings_messenger_username)
|
||||
::I18n.locale = 'ja'
|
||||
assert_equal 'メッセンジャーのユーザー名', l(:label_settings_messenger_username)
|
||||
set_language_if_valid('en')
|
||||
|
||||
set_language_if_valid 'en'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user