Skip to content

Commit

Permalink
Initial files for Japanese translations (#1242)
Browse files Browse the repository at this point in the history
* Copy en files to ja

* Add ja to languages list

* Add tests for japanese locale files

* Add ja to available locales
  • Loading branch information
toryalsip authored Nov 4, 2018
1 parent 72df263 commit 27f316e
Show file tree
Hide file tree
Showing 17 changed files with 795 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Application < Rails::Application
config.middleware.use Rack::Deflater,
include: %w[text/html application/json image/svg+xml]

config.i18n.available_locales = ['en', 'es', 'de', 'it', 'nb', 'nl', 'pt-BR', 'sv', 'vi', 'fr'].sort_by(&:swapcase).map &:to_sym
config.i18n.available_locales = ['en', 'es', 'de', 'it', 'nb', 'nl', 'pt-BR', 'sv', 'vi', 'fr', 'ja'].sort_by(&:swapcase).map &:to_sym
config.i18n.default_locale = :en
end
end
1 change: 1 addition & 0 deletions config/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ de:
nb: Norsk
de: Deutsch
fr: Français
ja: 日本語
navigation:
about: 'Über uns'
blog: Blog
Expand Down
60 changes: 60 additions & 0 deletions config/locales/devise.ja.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
ja:
devise:
confirmations:
confirmed: 'Your email address has been successfully confirmed.'
send_instructions: 'You will receive an email with instructions for how to confirm your email address in a few minutes.'
send_paranoid_instructions: 'If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes.'
failure:
already_authenticated: 'You are already signed in.'
inactive: 'Your account is not activated yet.'
invalid: 'Invalid %{authentication_keys} or password.'
locked: 'Your account is locked.'
last_attempt: 'You have one more attempt before your account is locked.'
not_found_in_database: 'Invalid %{authentication_keys} or password.'
timeout: 'Your session expired. Please sign in again to continue.'
unauthenticated: 'You need to sign in or sign up before continuing.'
unconfirmed: 'You have to confirm your email address before continuing.'
mailer:
confirmation_instructions:
subject: 'Confirmation instructions'
reset_password_instructions:
subject: 'Reset password instructions'
unlock_instructions:
subject: 'Unlock instructions'
password_change:
subject: 'Password Changed'
omniauth_callbacks:
failure: 'Could not authenticate you from %{kind} because "%{reason}".'
success: 'Successfully authenticated from %{kind} account.'
passwords:
no_token: 'You can''t access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided.'
send_instructions: 'You will receive an email with instructions on how to reset your password in a few minutes.'
send_paranoid_instructions: 'If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes.'
updated: 'Your password has been changed successfully. You are now signed in.'
updated_not_active: 'Your password has been changed successfully.'
registrations:
destroyed: 'Bye! Your account has been successfully cancelled. We hope to see you again soon.'
signed_up: 'Welcome! You have signed up successfully.'
signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'
signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please follow the link to activate your account.'
update_needs_confirmation: 'You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address.'
updated: 'Your account has been updated successfully.'
sessions:
signed_in: 'Signed in successfully.'
signed_out: 'Signed out successfully.'
already_signed_out: 'Signed out successfully.'
unlocks:
send_instructions: 'You will receive an email with instructions for how to unlock your account in a few minutes.'
send_paranoid_instructions: 'If your account exists, you will receive an email with instructions for how to unlock it in a few minutes.'
unlocked: 'Your account has been unlocked successfully. Please sign in to continue.'
errors:
messages:
already_confirmed: 'was already confirmed, please try signing in'
confirmation_period_expired: 'needs to be confirmed within %{period}, please request a new one'
expired: 'has expired, please request a new one'
not_found: 'not found'
not_locked: 'was not locked'
not_saved:
one: '1 error prohibited this %{resource} from being saved:'
other: '%{count} errors prohibited this %{resource} from being saved:'
27 changes: 27 additions & 0 deletions config/locales/devise_invitable.ja.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ja:
devise:
failure:
invited: 'You have a pending invitation, accept it to finish creating your account.'
invitations:
send_instructions: 'An invitation email has been sent to %{email}.'
failed_send: 'An error occurred. %{email} could not be invited.'
invitation_token_invalid: 'The invitation token provided is not valid!'
updated: 'Your password was set successfully. You are now signed in.'
updated_not_active: 'Your password was set successfully.'
no_invitations_remaining: 'No invitations remaining'
invitation_removed: 'Your invitation was removed.'
new:
header: 'Send an ally invitation'
submit_button: 'Send an invitation'
edit:
header: 'Set your password'
submit_button: 'Set my password'
mailer:
invitation_instructions:
subject: '%{name} invited you to join if me!'
subject_nameless: 'Someone invited you to join if me!'
hello: 'Hey %{email}!'
someone_invited_you: '%{name} has invited you to join http://www.if-me.org, a community to share mental health experiences with your loved ones and keep track of your moods, medications, and self-care. You can accept the invite through the link below.'
accept: 'Accept invitation!'
accept_until: 'This invitation will expire on %{due_date}.'
ignore: 'If you don''t want to accept the invitation, please ignore this email.<br />Your account won''t be created until you access the link above and set your password.'
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ en:
nb: Norsk
de: Deutsch
fr: Français
ja: 日本語
navigation:
about: About
blog: Blog
Expand Down
1 change: 1 addition & 0 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ es:
nb: Norsk
de: Deutsch
fr: Français
ja: 日本語
navigation:
about: 'Acerca de '
blog: Blog
Expand Down
1 change: 1 addition & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ fr:
nb: Norsk
de: Deutsch
fr: Français
ja: 日本語
navigation:
about: 'À notre propos'
blog: Blog
Expand Down
1 change: 1 addition & 0 deletions config/locales/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ it:
nb: Norsk
de: Deutsch
fr: Français
ja: 日本語
navigation:
about: Cos’è
blog: Blog
Expand Down
Loading

0 comments on commit 27f316e

Please sign in to comment.