Commit Graph

65 Commits

Author SHA1 Message Date
Maikel Linke
3743cf1bc3 Use I18nConfig for application defaults 2018-03-09 17:45:03 +11:00
Pau Perez
a7dcaf15fa Enable Skylight in staging
This is a follow-up of
https://github.com/openfoodfoundation/openfoodnetwork/pull/2070.

When running the production API key in staging, the `log/skylight.log`
showed:

```
[SKYLIGHT] [1.5.0] You are running in the staging environment but
haven't added it to config.skylight.environments, so no data will be
sent to skylight.io.
```

According to
https://www.skylight.io/support/advanced-setup#setting-up-multiple-environments
it turns out we need to create a new app for staging and use its API
key.
2018-02-14 14:46:10 +01:00
Saimon Moore
05d757e7c4 Ensure we have min i18n fallbacks
This setting defines which locales will be exported to the frontend.
In general, ofn currently functions under a single locale
(which is also the default locale) but all translations are made from
the `en` locale.

The current process of ensuring translations are translated and make
their way into code is manual and prone to issues so occasionally
translations for keys in the default locale of a particular instance
are not deployed and the UI displays `missing translation` messages.

In these cases, it is far friendlier for the user to see fallbacks to
`en` rather than these errors so this commit ensure that at the very
least apart from the current default locale, `en` is also made available
and as such will be exported to the frontend so that it's translations
are available as a fallback in JS land.

I18n fallback config was already enabled in both frontend and backend.
Until now, available locales may not have been set (determined by the
`AVAILABLE_LOCALES` env var) and the translations for `en` not therefore
be present in the frontend for fallback to actually work.

This commit will ensure that a fallback to `en` is always possible in the
case of missing translations.
2017-11-10 12:30:24 +11:00
Rob Harrington
d500c20d3f Adding new StripeConnect payment gateway 2017-09-23 14:57:02 +10:00
Enrico Stano
5a2c3f5c5c Set Spree configuration related to locales before the promo environment gets initialized 2017-09-08 23:55:50 +10:00
enricostano
23585e6ea8 Initialize custom calculators using Spree API
Freely inspired by https://github.com/coopdevs/spree/blob/2-0-stable/core/lib/spree/core/engine.rb#L78
2017-09-08 23:55:49 +10:00
Maikel Linke
686a8f3af9 Add legacy and default values for LOCALE
This makes sure there is a value in `config.i18n.available_locales` so
that i18n-js doesn't crash.
2017-08-02 10:44:55 +10:00
Julius Pabrinkis
5166a3d958 Add available_locales config feature 2017-08-02 09:57:33 +10:00
Pierre de Lacroix
268bea25d0 add qz/ folder from ofn-qz gem to list of assets 2017-03-30 20:37:20 +02:00
Rohan Mitchell
509564819a Remove FlatPercentPerItem calculator for shipping methods and payment methods to reduce confusion 2016-08-26 10:26:50 +10:00
Rohan Mitchell
308c24caf4 Add FlatPercentPerItem calculator for shipping methods, remove FlatPercentItemTotal for enterprise fees (causes shopfront cart discrepencies). 2016-08-26 09:29:09 +10:00
Rohan Mitchell
701c047a0a Move our customisations of FlatPercentItemTotal calculator to a new calc: FlatPercentPerItem 2016-08-26 09:28:29 +10:00
Rohan Mitchell
932edeb1c1 Remove CMS style shim - Spree/CMS compatibility 2016-07-29 09:18:30 +10:00
Rohan Mitchell
d3ad823d97 Remove CMS configuration, gem. Fix permalink check dependent on CMS glob path. 2016-07-29 09:18:30 +10:00
Maikel Linke
e57c06c610 Use require_relative introduced in Ruby 1.9.2
The new `require_relative` command is much shorter and easier to read
then the previous:

    -require File.expand_path('../config/application', __FILE__)
    +require_relative 'config/application'
2016-07-20 16:07:35 +10:00
Maikel Linke
e4f855b64a Display calculator in payment method edit form 2016-05-25 14:56:52 +10:00
Rohan Mitchell
d79a6d7e19 Escape HTML entities in JSON 2016-02-24 11:26:37 +11:00
Maikel Linke
c33835e751 fixup whitespace 2016-01-13 16:23:14 +11:00
Christian
01bf64e6b0 Allow delayed_job to use the locale defined for application
delayed_job requires a different configuration variable for locale than
the application.

See
https://stackoverflow.com/questions/8478597/rails-3-set-i18n-locale-is-not-working
for reference
2016-01-07 07:15:18 +01:00
Rohan Mitchell
ecc3bad8c8 Merge branch 'master' into folklabs-producer-emails 2015-10-16 12:38:54 +11:00
Rohan Mitchell
bf953f8987 Undo last change, it broke asset precompilation. Rename style.css to scss for inclusion and force recompilation of all assets. 2015-06-16 18:25:44 +10:00
Continuous Integration
c76021462c Auto-merge from CI [skip ci] 2015-06-16 14:12:16 +10:00
Rohan Mitchell
b540f645c3 Split CSS to overcome IE9's 4096 rule limit 2015-06-16 11:57:50 +10:00
Rohan Mitchell
d908701b59 Merge branch 'master' into folklabs-producer-emails
Conflicts:
	Gemfile
2015-06-11 17:02:34 +10:00
Maikel Linke
a8b6f2942a Releasing Assets Version 1.1
The uglifier update affects only re-compiled assets. In order to replace
the broken assets (e.g. #396) with re-compiled assets, we change the
assets version number.
2015-06-11 10:54:30 +10:00
Paul Mackay
ca665dc6bc Merge master into producer-emails. 2015-03-04 19:09:43 +00:00
Paul Mackay
67b17de695 #275: Add receival time and instructions to order cycle for incoming exchanges. Fix issues from feedback. 2014-12-30 11:33:13 +00:00
Rohan Mitchell
e607c9855f Add Pin Payments gateway 2014-12-12 10:59:23 +11:00
Rob Harrington
2f83d71931 Adding mail/all.css to assets precompile list 2014-12-10 09:56:33 +11:00
Rafael Schouten
9448e1cbe4 add figaro env config 2014-09-16 00:13:43 +10:00
Will Marshall
c97fa711b7 Adding config changes to app.rb, fixing mixing producers links 2014-06-20 10:47:46 +10:00
Rohan Mitchell
8bf9921eef Turn off enforce_available_locales, working around performance regression https://github.com/svenfuchs/i18n/issues/230 2014-05-09 14:39:12 +10:00
Rohan Mitchell
d707624525 Fix warnings - faker clash with ffaker, i18n enforce_available_locales 2014-05-02 14:25:32 +10:00
Will Marshall
a89de9a80f Patching our patch 2014-03-27 13:01:04 +11:00
Rohan Mitchell
a67cea3fcd Precompile darkswarm css and js 2014-01-08 15:59:09 +11:00
Rohan Mitchell
72efb2096b Remove comment - everything makes sense now 2013-11-06 11:26:10 +11:00
Rohan Mitchell
fd43227921 Explicitly precompile style needed 2013-11-06 10:42:39 +11:00
Rohan Mitchell
bacd8401b4 Compile all admin css files for manual inclusion (fixes BugHerd #126) 2013-11-06 10:18:45 +11:00
Rohan Mitchell
25b0306a93 Ensure css is precompiled, reformat configs 2013-11-01 16:22:54 +11:00
Rohan Mitchell
e47fa0edfd Rename application from Openfoodweb to Openfoodnetwork 2013-10-18 17:32:22 +11:00
Rohan Mitchell
57f7d489ff Rename OpenFoodWeb namespace to OpenFoodNetwork 2013-10-18 17:29:55 +11:00
Rohan Mitchell
54d95d304f Convert to Melbourne time zone 2013-09-30 11:25:26 +10:00
Rohan Mitchell
99e12afd04 Explicitly compile store/shop_front.js, which is used on the temp landing page in isolation from all.js 2013-09-23 16:47:03 +10:00
Rohan Mitchell
91550ac82f Move distributor config to its own file, re-enable pry for tests 2013-09-10 09:50:16 +10:00
alexs
f160e051e5 Added new temporary landing page. 2013-08-19 17:37:22 +10:00
Rohan Mitchell
5f4313b588 Remove itemwise shipping calculator 2013-08-13 10:14:39 +10:00
alexs
44e06fe7fc Added search stuff to the least of assets to precompile. 2013-08-08 10:43:21 +10:00
Rohan Mitchell
234b2d26e9 Add MiGS payment gateway 2013-04-29 15:37:48 +10:00
Rohan Mitchell
139188e021 Turn on asset init on precompile - now precompile can find assets stored in engines (lib/chili/...), but this breaks Heroku deployment 2013-04-22 17:37:02 +10:00
Rohan Mitchell
2a645d04ae Move presentation to presenter, display calculator fields 2012-11-22 14:37:38 +11:00