-
Notifications
You must be signed in to change notification settings - Fork 5
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
Made it possible to switch UI to english in development #384
Conversation
@@ -0,0 +1 @@ | |||
BY_LANGUAGE=he |
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.
provided as an example for dotenv config. To override it locally create a new file .env.development.local (should not be committed to git)
@@ -68,16 +68,11 @@ | |||
# Enable threaded mode | |||
# config.threadsafe! | |||
|
|||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to | |||
# the I18n.default_locale when a translation can not be found) | |||
config.i18n.fallbacks = true |
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.
already specified in application.rb
# Send deprecation notices to registered listeners | ||
config.active_support.deprecation = :notify | ||
|
||
config.action_mailer.delivery_method = :sendmail # let's start sending mail :) | ||
config.eager_load = true | ||
config.i18n.available_locales = :he |
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.
already specified in application.rb
@@ -102,10 +97,6 @@ | |||
# Set this to true and configure the email server for immediate delivery to raise delivery errors. | |||
# config.action_mailer.raise_delivery_errors = false | |||
|
|||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to | |||
# the I18n.default_locale when a translation cannot be found). | |||
config.i18n.fallbacks = true |
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.
was a duplicate line and now specified in application.rb
…sing BY_LANGUAGE env variable. Added dotenv gem to easily manage env variables in development
f45ee51
to
0a7163d
Compare
@@ -54,7 +55,6 @@ | |||
#config.assets.debug = true | |||
config.eager_load = false | |||
# config.public_file_server.enabled = true # Rails 5.x? | |||
config.i18n.available_locales = :he |
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.
defined in application.rb
@@ -1,4 +1,5 @@ | |||
en: | |||
edit_metadata: Edit metadata |
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.
added for tests
If BY_LANGUAGE env variable is provided it will try to use given locale as default.
For now only en or he locale is accepted (and only in dev environment)
I've added dotenv gem to simply manage env variables in development and test. I plan to use it also in #166
You can create
.env.development.local
file and override BY_LANGUAGE value there instead of overwriting.env.development