Commit Graph
15 Commits
Author SHA1 Message Date
chrisgarrity 1083b6241a Added automatic detection of locale from browser langauge
Locale detection function that checks browser setting and lets URL parameter (locale= or lang=) override the browser setting.
2018-06-24 13:07:56 -04:00
chrisgarrity a04554229f Initial version of loading or switching language.
Add `?locale=<localecode>` to load in a new langage.
Add `?enable=language` to enable the language selector
Or combine the two: `?enable=language&locale=<localecode>`
Still accepts a hash, but requires that the hash be a sequence of digits.

Added new locales reducer to gui:
- initializes default  react-intl/localeData
- initializes default locale messages for all locales
- default locale is ‘en’ (can be overridden by URL)

Removed dependency on react-intl-redux, added ConnectedIntlProvider (uses correct locale messages from redux based on current locale)
2018-06-19 15:40:47 -04:00
Paul Kaplan 98b0765051 Make costume and sound tabs sortable 2018-06-13 11:07:25 -04:00
chrisgarrity 37f98f6099 Fix up comments
- better split of hash-parser/project-loader unit tests.
2018-05-14 17:17:39 -04:00
chrisgarrity 0fa62fc05c Split project-loader-hoc
The project loader that is exported with GUI just expects to be passed projectId as a prop, and it manages loading project data.

The part of the project loader that watches for URL hash changes for the playground is a new HOC that is only used in the various playground examples.
2018-05-10 09:31:50 -04:00
Andrew Sliwinski 443966ec0d Add mock from 'react-ga' to unit tests 2018-01-12 15:51:59 -05:00
Ray Schamp c3ebfa5c6d Mock responsibly
/ht @paulkaplan
2017-11-03 09:28:56 -04:00
Ray Schamp 0e0c689e22 Fix tests
Previously we tested the ProjectLoader helper object, but now all loading is confined to storage. Unfortunately I wasn't able to get enzyme to wait for the storage promise to resolve within componentDidUpdate, so I can't test the actual results of storage.load, just what it was called with.
2017-11-03 09:28:56 -04:00
Ray Schamp c5404bffa7 Update enzyme usage for 3.1.0
Add a setup file that configures the React adapter. Fix one deprecated usage for ProjectLoaderHOC tests.

There are some tests still broken, but these weren't called out by Enzyme.
2017-10-13 12:56:44 -04:00
Ray Schamp 4ac3dd68f0 Add tests for the ProjectLoaderHOC 2017-08-17 10:12:56 -04:00
Ray Schamp 7fc0858dcc Update linting for tests to match src 2017-08-17 10:12:43 -04:00
Paul Kaplan 4fe264e924 Fix all lint warnings except todo comments (including a bug!) 2017-08-13 12:59:41 -04:00
Paul Kaplan c6cf17d0e1 Fix test to not be so specific 2017-08-10 10:29:45 -04:00
Paul Kaplan e356c17315 Add tests for the audio effects 2017-08-04 13:54:13 -04:00
Paul Kaplan a5587a9258 Add tests for audio utils 2017-07-21 10:08:33 -04:00