Commit Graph

92 Commits

Author SHA1 Message Date
Régis Hanol a2c04be718 FIX: eradicate I18n fallback issues 💣
FIX: client's translation overrides were not working when the current locale was missing a key
FIX: ExtraLocalesController.show was not properly handling multiple translations
FIX: JsLocaleHelper#output_locale was not properly handling multiple translations

FIX: ExtraLocalesController.show's spec which was randomly failing
FIX: JsLocaleHelper#output_locale was muting cached translations hashes

REFACTOR: move 'enableVerboseLocalization' to the 'localization' initializer
REFACTOR: remove unused I18n.js methods (getFallbacks, localize, parseDate, toTime, strftime, toCurrency, toPercentage)
REFACTOR: remove all I18n.pluralizationRules and instead use MessageFormat's pluralization rules

TEST: add tests for localization initializer
TEST: add tests for I18n.js
2017-02-24 11:31:21 +01:00
Robin Ward e03d5e2140 Reapply Ember 2.10 for good this time!
This reverts commit ddd299f4aa.
2016-12-19 11:19:10 -05:00
Robin Ward ddd299f4aa Revert "Revert "Revert Ember 2.10+ for a short while""
This reverts commit 76bbc481cb.
2016-12-16 10:29:30 -05:00
Robin Ward 76bbc481cb Revert "Revert Ember 2.10+ for a short while"
This reverts commit 21682fd60b.
2016-12-16 09:52:29 -05:00
Robin Ward 21682fd60b Revert Ember 2.10+ for a short while 2016-12-15 16:43:38 -05:00
Robin Ward 28699e66d8 Revert "REVERT: Ember 2.10 -- it's not building properly"
This reverts commit 600541c623.
2016-12-15 10:28:15 -05:00
Robin Ward 600541c623 REVERT: Ember 2.10 -- it's not building properly 2016-12-12 16:19:05 -05:00
Robin Ward 9a7998a930 Various fixes for Ember 2.10 2016-12-12 14:44:29 -05:00
Robin Ward 2567fdc402 FIX: Wrong path to loader 2016-11-15 12:41:20 -05:00
Sam 7d531910a4 fix tests 2016-11-15 13:30:03 +11:00
Robin Ward be1d74d207 Split out common functions into `discourse-common` module 2016-09-22 09:52:19 -04:00
Robin Ward bba0fd0654 REFACTOR: PreloadStore to ES6 2016-07-11 12:57:05 -04:00
Robin Ward 25d6915cac Migrate discourse.js to ES6 2016-07-11 12:57:05 -04:00
Robin Ward a546395397 REFACTOR: Migrate markdown functionality in ES6 2016-07-11 12:57:05 -04:00
Robin Ward 400c061046
`Ember.keys` is deprected in favor of `Object.keys` 2016-04-28 16:37:20 -04:00
Guo Xiang Tan 256d7a00e9 Update sprockets. (#4167)
* Update sass-rails.

* FIX: Tilt dependency has been removed from Ember::Handlebars::Template.

* Update `DiscourseIIFE` to new Sprockets API.

* `Rails.application.assets` returns `nil` in production.

* Move sprockets-rails out of the assets group.

* Pin ember-rails to 0.18.5 which works with Sprockets 3.x.

* Update sprockets to 3.6.0.

* Make `DiscourseSassCompiler` work with Sprockets 3.

* Use `Sass::Rails::SassImporterGlobbing` instead of haxxing our own.

* Moneky patch so that we don't add dependencies for our custom css.

* FIX: Missing class.

* Upgrade ember-handlebars-template.

* FIX: require path needs to share the same root as the folder's path.

* Bump discourse-qunit-rails.

* Update ember-template-compiler.js to 1.12.2.

* `prepend` is private in Ruby 2.0.0.
2016-04-18 10:47:52 +08:00
Robin Ward 6b46092aa2 FIX: Disable cloaking in the test environment 2016-02-24 17:44:01 -05:00
Robin Ward d1e85bdd8b FEATURE: Use virtual dom framework for faster post rendering 2016-02-11 11:00:40 -05:00
Sam 0844350308 correct production mode due to ember loading changes 2015-11-25 13:57:10 +11:00
Robin Ward 8ba7c06b7d Merge pull request #3735 from riking/patch-4
FIX: Discourse.BaseUri should not default to /
2015-11-06 14:52:19 -05:00
Robin Ward 47495a5713 FEATURE: Replace composer editor with ember version 2015-11-06 09:49:16 -05:00
Robin Ward 94b60e62a2 FEATURE: New markdown editor re-written in Ember
Note this commit leaves out the biggest occurrence of the editor
which is the post/topic composer.

To avoid major breakage, this replaces it everywhere else it was
used:

* User preferences (About Me)
* Admin Customizations > Text Content
* Category Templates
* Editing Queued Posts

A future commit will replace the main composer with this editor
and will remove the unused pagedown code.
2015-10-19 11:01:20 -04:00
Kane York aca70805f1 FIX: Discourse.BaseUri should not default to / 2015-09-10 17:34:08 -07:00
Robin Ward 3ceadbd5b8 FIX: Allow qunit tests to run in browser by stubbing new functionality 2015-09-09 16:20:36 -04:00
Robin Ward 42e510753d Support for Acceptance tests in plugins 2015-08-27 17:07:11 -04:00
Robin Ward c5460b7d3f FEATURE: Full height hamburger menu
- Rename `site-map` to `hamburger-menu`
- Includes acceptance tests
2015-08-25 16:48:43 -04:00
Robin Ward 22844b9e46 Ember 1.12 support 2015-08-13 11:14:16 -04:00
Robin Ward e2e3e7c0e0 Add ES6 support to more files 2015-08-13 10:49:08 -04:00
Robin Ward b7e6eaa961 ES6ify some of the remaining files 2015-08-10 10:21:05 -04:00
Robin Ward db75774440 UX: Move likes into drop down instead of its own status line 2015-07-03 17:15:20 -04:00
Robin Ward 23daa9d8ce Refactor and add tests for category editing 2015-07-03 10:01:46 -04:00
Robin Ward 01d4085125 Removed bad JS tests, upgrade QUnit + ember-qunit 2015-05-13 14:13:37 -04:00
Robin Ward fa69d4cec5 FIX: Missing `colspan` on raw topic list 2015-05-11 11:20:46 -04:00
Robin Ward 8294205f7c Ember 1.11 broken WIP 2015-05-11 11:18:37 -04:00
Robin Ward c216b3affe FIX: Don't cloak in test mode. Should help with intermittant failures 2015-04-16 11:47:37 -04:00
Régis Hanol 295eebddc3 less noise in JS specs 2015-04-16 10:15:06 +02:00
Robin Ward d4a05825da Convert `Composer` to use Store
- Uses store for `PostStream`, `TopicList` too
2015-04-15 14:54:36 -04:00
Robin Ward 22ffcba8e6 Convert `Discourse.Post` to ES6 and use Store model
- Includes acceptance tests for composer (post, edit)
- Supports acceptance testing of bootbox
2015-04-15 14:54:36 -04:00
Robin Ward ee3442e562 Also rename the `integration` directory to be `acceptance` 2015-04-06 15:47:39 -04:00
Robin Ward 77f9d1e223 Use pretender's passthrough for dynamically loaded scripts 2015-03-13 12:14:22 -04:00
Sam 01fcc7503a big hacks to get tests to pass 2015-03-13 17:45:55 +11:00
Sam a82530012a FEATURE: Allow selection of highlight js languages
PERF: stop loading highlight js on load

To get latest highlight js run bin/rake highlightjs:update
2015-03-13 16:18:59 +11:00
Robin Ward 69851bc6cf Deprecates global use of `Discourse.MessageBus`
We can use DI for this, which makes it easier for plugins to subscribe
to the message bus.
2015-03-12 12:27:30 -04:00
Robin Ward 7aaf2fcb65 Fix broken qunit tests in 1.9.0 2014-12-17 09:31:41 -05:00
Robin Ward edb34c178a FEATURE: Show user fields when the user is signing up 2014-09-30 10:45:18 -04:00
Robin Ward d3cc85c784 TESTS: Use Pretender in test mode for more flexible server responses 2014-07-31 16:49:30 -04:00
Robin Ward bf16ff275a TESTS: Sign in tests 2014-07-31 14:17:18 -04:00
Robin Ward c5b5db48cf TESTS: Reset the preload store for testing 2014-07-31 13:25:40 -04:00
Robin Ward b8bfbcb3cb ES6: Tests 2014-07-31 13:25:39 -04:00
Robin Ward 6f36d5996d Lots of work on tests 2014-07-30 20:09:45 -04:00