Commit Graph

16 Commits

Author SHA1 Message Date
Gerhard Schlager ce060e2b86 FIX: Server didn't use default_locale as fallback locale 2018-01-25 14:57:41 +01:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Guo Xiang Tan 45f4ce379e Fix broken specs. 2017-07-11 13:16:48 +09:00
Guo Xiang Tan b605d5d61b FIX: Translation should return overrides first before attempting to fallback.
https://meta.discourse.org/t/errors-after-migrating-to-a-new-version-1-9-0-beta3/65709/14?u=tgxworld
2017-07-11 12:51:12 +09:00
Guo Xiang Tan 52e654b3ac FIX: Translation fallback was not using fallback's translation override.
https://meta.discourse.org/t/discobot-falling-back-to-site-locale-is-not-using-customized-copies/65140
2017-07-03 14:52:27 +09:00
Gerhard Schlager 80c9fa4dca FIX: Load translation overrides for more than one locale 2016-02-22 22:48:56 +01:00
Gerhard Schlager 2e875d3cca FIX: Use fallback locales when searching for translations 2016-02-22 22:48:55 +01:00
Guo Xiang Tan 556cd1e3f8 FIX: Do not override existing translations. 2015-12-31 23:20:19 +08:00
Guo Xiang Tan e89f29cca7 FIX: Pluralization error when overriding translations. 2015-12-29 10:31:23 +08:00
Robin Ward d1ebb9d0b5 FIX: I18n Fallbacks were not applying correctly 2015-12-23 12:09:18 -05:00
Andy Waite 3e50313fdc Prepare for separation of RSpec helper files
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`

`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).

For more information:

https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files

In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.

This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.

At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
Robin Ward 5e93140f85 FEATURE: Can override any translation via an admin interface 2015-11-27 11:35:19 -05:00
Robin Ward 1506eba28d Support for overriding client side translation keys 2015-11-20 17:14:01 -05:00
Robin Ward e168c5fde3 PERF: Much more performant, multisite aware I18n overrides 2015-11-19 16:36:59 -05:00
Robin Ward 060ce9bf2a FEATURE: Overwrite server side I18n keys with API 2015-11-13 16:35:02 -05:00
Robin Ward 3720783c1b Refactor to our own Discourse I18n backend
This removes some monkey patches and makes testing easier.
It will also support database backed I18n changes.
2015-11-13 16:35:02 -05:00