-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix broken tests caused by locale configuration #1875
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
fe15479
Fix broken tests caused by locale configuration
Bodacious 7ffebc3
Fix FastGettext initializer loader
Bodacious 366c1a7
Add Amazon S3 creds for Travis
Bodacious 753a2e9
Revert "Add Amazon S3 creds for Travis"
Bodacious 0ef9a80
Fix Faker localization for rake tasks
Bodacious File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a clean way of managing the fastGettext vs I18n expectations.