-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix broken tests caused by locale configuration (#1875)
* Fix broken tests caused by locale configuration - Add LocaleSet - Add LocaleFormatter to force proper string formats - Rename I18n formats to use hyphen - Add rake task for updating existing languages on DB - Fix instances of US english in the templates * Fix FastGettext initializer loader * Add Amazon S3 creds for Travis * Revert "Add Amazon S3 creds for Travis" This reverts commit 366c1a7. * Fix Faker localization for rake tasks Was breaking rake db:seed file
- Loading branch information
Showing
43 changed files
with
374 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,7 @@ | ||
# This initilializer should not be removed unless all internationalisation is handled by gettext_rails | ||
DMPRoadmap::Application.config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s] | ||
module I18n | ||
class Config | ||
def locale | ||
FastGettext.locale | ||
end | ||
def locale=(new_locale) | ||
FastGettext.locale = (new_locale) | ||
end | ||
def default_locale | ||
FastGettext.default_locale | ||
end | ||
def default_locale=(new_default_locale) | ||
FastGettext.default_locale = (new_default_locale) | ||
end | ||
def available_locales | ||
FastGettext.default_available_locales | ||
end | ||
def available_locales=(new_available_locales) | ||
FastGettext.default_available_locales = (new_available_locales) | ||
end | ||
end | ||
end | ||
# frozen_string_literal: true | ||
|
||
# This initilializer should not be removed unless all internationalisation is handled by | ||
# gettext_rails | ||
DMPRoadmap::Application.config.i18n.load_path += Dir[ | ||
Rails.root.join('config', 'locales', '**', '*.yml').to_s | ||
] |
2 changes: 1 addition & 1 deletion
2
config/locales/bootstrap/en_GB.bootstrap.yml → config/locales/bootstrap/en-GB.bootstrap.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
config/locales/bootstrap/en_US.bootstrap.yml → config/locales/bootstrap/en-US.bootstrap.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
config/locales/bootstrap/fr_FR.bootstrap.yml → config/locales/bootstrap/fr-FR.bootstrap.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
fr_FR: | ||
fr-FR: | ||
helpers: | ||
actions: "Actions" | ||
links: | ||
|
2 changes: 1 addition & 1 deletion
2
config/locales/bootstrap/pt_BR.bootstrap.yml → config/locales/bootstrap/pt-BR.bootstrap.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...g/locales/contact_us/contact_us.en_GB.yml → ...g/locales/contact_us/contact_us.en-GB.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...g/locales/contact_us/contact_us.en_US.yml → ...g/locales/contact_us/contact_us.en-US.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...g/locales/contact_us/contact_us.fr_FR.yml → ...g/locales/contact_us/contact_us.fr-FR.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
zh: | ||
zh-TW: | ||
contact_us: | ||
contact_mailer: | ||
contact_email: | ||
|
2 changes: 1 addition & 1 deletion
2
config/locales/devise/devise.en_GB.yml → config/locales/devise/devise.en-GB.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
config/locales/devise/devise.en_US.yml → config/locales/devise/devise.en-US.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
config/locales/devise/devise.pt_BR.yml → config/locales/devise/devise.pt-BR.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...locales/devise/devise_invitable.en_GB.yml → ...locales/devise/devise_invitable.en-GB.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
en_GB: | ||
en-GB: | ||
devise: | ||
invitations: | ||
send_instructions: 'An invitation email has been sent to %{email}.' | ||
|
2 changes: 1 addition & 1 deletion
2
...locales/devise/devise_invitable.en_US.yml → ...locales/devise/devise_invitable.en-US.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
en_US: | ||
en-US: | ||
devise: | ||
invitations: | ||
send_instructions: 'An invitation email has been sent to %{email}.' | ||
|
2 changes: 1 addition & 1 deletion
2
...locales/devise/devise_invitable.fr_FR.yml → ...locales/devise/devise_invitable.fr-FR.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
fr_FR: | ||
fr-FR: | ||
devise: | ||
invitations: | ||
send_instructions: "Un courriel d'invitation a été envoyé à %{email}." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
en_US: | ||
en-US: | ||
activerecord: | ||
errors: | ||
messages: | ||
|
2 changes: 1 addition & 1 deletion
2
config/locales/faker/faker.en_GB.yml → config/locales/faker/faker.en-GB.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
en_GB: | ||
en-GB: | ||
faker: | ||
language: | ||
names: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
fr_CA: | ||
fr-CA: | ||
activerecord: | ||
errors: | ||
messages: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
fr_FR: | ||
fr-FR: | ||
activerecord: | ||
errors: | ||
messages: | ||
|
Oops, something went wrong.