diff options
| -rw-r--r-- | app/views/errors/not_found.html.haml | 6 | ||||
| -rw-r--r-- | app/views/errors/server_error.html.haml | 6 | ||||
| -rw-r--r-- | config/locales/en.yml | 30 | ||||
| -rw-r--r-- | config/locales/errors.en.yml | 11 | ||||
| -rw-r--r-- | config/locales/generic.en.yml | 21 | ||||
| -rw-r--r-- | config/locales/home.en.yml | 1 | ||||
| -rw-r--r-- | config/locales/simple_form.en.yml | 4 | ||||
| -rw-r--r-- | config/locales/users.en.yml | 4 | ||||
| -rw-r--r-- | test/integration/browser/account_test.rb | 6 | ||||
| -rw-r--r-- | test/integration/browser/session_test.rb | 2 | 
10 files changed, 47 insertions, 44 deletions
| diff --git a/app/views/errors/not_found.html.haml b/app/views/errors/not_found.html.haml index 75cb889..c7fec22 100644 --- a/app/views/errors/not_found.html.haml +++ b/app/views/errors/not_found.html.haml @@ -1,7 +1,7 @@  .hero-unit -  %h1=t :not_found_title -  %h2=t :not_found_subtitle -  %p.lead=t :not_found_lead +  %h1=t 'errors.title.page_not_found' +  %h2=t 'errors.subtitle.page_not_found', default: '' +  %p.lead=t 'errors.text.page_not_found', default: ''    %a.btn.btn-primary.btn-large{href:'/'}      %i.icon-home.icon-white      =t :home diff --git a/app/views/errors/server_error.html.haml b/app/views/errors/server_error.html.haml index 68baf20..a4133da 100644 --- a/app/views/errors/server_error.html.haml +++ b/app/views/errors/server_error.html.haml @@ -1,7 +1,7 @@  .hero-unit -  %h1=t :server_error_title -  %h2=t :server_error_subtitle -  %p.lead=t :server_error_lead +  %h1=t 'errors.title.server_error' +  %h2=t 'errors.subtitle.server_error', default: '' +  %p.lead=t 'errors.text.server_error', default: ''    %a.btn.btn-primary.btn-large{href:'/'}      %i.icon-home.icon-white      =t :home diff --git a/config/locales/en.yml b/config/locales/en.yml deleted file mode 100644 index feac53b..0000000 --- a/config/locales/en.yml +++ /dev/null @@ -1,30 +0,0 @@ -en: -  home: Home - -  example_email: 'user@domain.org' -  not_found_title: Page not found. -  not_found_subtitle: "The page you were looking for doesn't exist." -  not_found_lead: "You may have mistyped the address or the page may have moved." -  server_error_title: Ouch! -  server_error_subtitle: We ran into a server error. -  server_error_lead: The problem has been logged and we will look into it. -  no_such_thing: "No such %{thing}." -  create_thing: "Create %{thing}" - -  overview: "Overview" -  user_control_panel: "user control panel" - -  created: "Created" -  created_by_on: "Created by %{user} on %{time}" -  updated: "Updated" - -  none: "None" -  unknown: "Unknown" -  admin: "Admin" -  anonymous: "Anonymous" -  save: "Save" -  add: "Add" -  remove: "Remove" -  changes_saved: "Changes saved successfully." -  are_you_sure: "Are you sure? This change cannot be undone." - diff --git a/config/locales/errors.en.yml b/config/locales/errors.en.yml new file mode 100644 index 0000000..93feab1 --- /dev/null +++ b/config/locales/errors.en.yml @@ -0,0 +1,11 @@ +en: +  errors: +    title: +      not_found: Page not found. +      server_error: Ouch! +    subtitle: +      not_found: "The page you were looking for doesn't exist." +      server_error: We ran into a server error. +    text: +      not_found: "You may have mistyped the address or the page may have moved." +      server_error: The problem has been logged and we will look into it. diff --git a/config/locales/generic.en.yml b/config/locales/generic.en.yml index dce6d93..14dafac 100644 --- a/config/locales/generic.en.yml +++ b/config/locales/generic.en.yml @@ -1,4 +1,25 @@  en:    signup: "Sign Up"    login: "Log In" +  logout: "Log Out" +      cancel: "Cancel" +   +  created: "Created" +  created_by_on: "Created by %{user} on %{time}" +  updated: "Updated" + +  none: "None" +  unknown: "Unknown" +  admin: "Admin" +  anonymous: "Anonymous" +  save: "Save" +  add: "Add" +  remove: "Remove" +  changes_saved: "Changes saved successfully." +  are_you_sure: "Are you sure? This change cannot be undone." + +  example_email: 'user@domain.org' + +  no_such_thing: "No such %{thing}." +  create_thing: "Create %{thing}" diff --git a/config/locales/home.en.yml b/config/locales/home.en.yml index 4fdbfc2..c3cdfb1 100644 --- a/config/locales/home.en.yml +++ b/config/locales/home.en.yml @@ -1,4 +1,5 @@  en: +  home: Home    welcome: "Welcome to %{provider}."    download_bitmask: "Download Bitmask" diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index 5d0c675..4b35883 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -29,8 +29,8 @@ en:    helpers:      submit:        user: -        create: "Sign up" +        create: "Sign Up"          update: "Save"        session: -        create: "Log in" +        create: "Log In" diff --git a/config/locales/users.en.yml b/config/locales/users.en.yml index 3f4fbed..0375174 100644 --- a/config/locales/users.en.yml +++ b/config/locales/users.en.yml @@ -1,7 +1,7 @@  en: +  overview: "Overview" +  user_control_panel: "user control panel"    account_settings: "Account Settings" -  logout: "Logout" -  none: "None"    username: "Username"    password: "Password"    change_password: "Change Password" diff --git a/test/integration/browser/account_test.rb b/test/integration/browser/account_test.rb index 491a9e1..8dc3043 100644 --- a/test/integration/browser/account_test.rb +++ b/test/integration/browser/account_test.rb @@ -9,7 +9,7 @@ class AccountTest < BrowserIntegrationTest    test "signup successfully" do      username, password = submit_signup      assert page.has_content?("Welcome #{username}") -    click_on 'Logout' +    click_on 'Log Out'      assert page.has_content?("Log In")      assert_equal '/', current_path      assert user = User.find_by_login(username) @@ -24,7 +24,7 @@ class AccountTest < BrowserIntegrationTest    test "successful login" do      username, password = submit_signup -    click_on 'Logout' +    click_on 'Log Out'      attempt_login(username, password)      assert page.has_content?("Welcome #{username}")      within('.sidenav li.active') do @@ -83,7 +83,7 @@ class AccountTest < BrowserIntegrationTest          fill_in 'Password confirmation', with: "other password"          click_on 'Save'        end -      click_on 'Logout' +      click_on 'Log Out'        attempt_login(@user.login, "other password")        assert page.has_content?("Welcome #{@user.login}")      end diff --git a/test/integration/browser/session_test.rb b/test/integration/browser/session_test.rb index fb20847..d52508a 100644 --- a/test/integration/browser/session_test.rb +++ b/test/integration/browser/session_test.rb @@ -4,7 +4,7 @@ class SessionTest < BrowserIntegrationTest    test "valid session" do      login -    assert page.has_content?("Logout") +    assert page.has_content?("Log Out")    end    test "expired session" do | 
