shopify_app 7.2.7 → 7.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f713d95ff6dc0893127eb63073b613788d7754d3
4
- data.tar.gz: 3558a5c9c95aa561c32ee4b67f04f05832a3a911
3
+ metadata.gz: da5334ef600cd3a2b85e2d563063c4971f9c4216
4
+ data.tar.gz: 80ff75561b661796dd57950ce1e1f2772d848bff
5
5
  SHA512:
6
- metadata.gz: 02b5223eebfbcd825b025266a6a64847f8fe6246d3b27d3698ca7e8ffdc2e60df6432dcee05930ec938a0424daf5c590ef37ea69a734a18096a6a4d48e6b6ebd
7
- data.tar.gz: b743970932f0672b161b152606cbe35a9660d34124fdcd51e14583a79cb01c79479a07569d190b0927c67aa9214311abf216e64e9f9a2675494edb9a7510eaa0
6
+ metadata.gz: 00b236462b953a09ebf7cf48a02d0124ff1b1e3d1baa08b2965119e114802a77794f945a3941d2910891f1fb4d93be615ea77c03b967da57de8bec589e33f66e
7
+ data.tar.gz: 35ef4a7b8a5a42b17160f7b275dbabce8e00f5ec79458c83bc90b9b147e8e378be987464e85140afb1de3c44b9148f2fe4cda6fd689cda9ec278d1762c746269
@@ -1,3 +1,9 @@
1
+ 7.2.8
2
+ -----
3
+ * Add i18n locale param support
4
+ [[#409]](https://github.com/Shopify/shopify_app/pull/409)
5
+
6
+
1
7
  7.2.7
2
8
  -----
3
9
  * Require `shopify_app` `>= 4.3.2`. This version relaxes the ruby version requirement from `>= 2.3.0` to `>= 2.0`
@@ -1,8 +1,12 @@
1
1
  module ShopifyApp
2
2
  class AuthenticatedController < ApplicationController
3
+ include ShopifyApp::Localization
3
4
  include ShopifyApp::LoginProtection
5
+
6
+ before_action :set_locale
4
7
  before_action :login_again_if_different_shop
5
8
  around_action :shopify_session
9
+
6
10
  layout ShopifyApp.configuration.embedded_app? ? 'embedded_app' : 'application'
7
11
  end
8
12
  end
@@ -0,0 +1,4 @@
1
+ de:
2
+ logged_in: 'Eingeloggt'
3
+ logged_out: 'Erfolgreich ausgelogt'
4
+ could_not_log_in: 'Shopify Store Login fehlgeschlagen'
@@ -0,0 +1,4 @@
1
+ ja:
2
+ logged_in: 'ログイン'
3
+ logged_out: 'ログインに成功しました'
4
+ could_not_log_in: 'Shopifyストアにログインできませんでした'
@@ -18,6 +18,7 @@ require 'shopify_app/scripttags_manager_job'
18
18
  require 'shopify_app/shop'
19
19
  require 'shopify_app/session_storage'
20
20
  require 'shopify_app/sessions_concern'
21
+ require 'shopify_app/localization'
21
22
  require 'shopify_app/login_protection'
22
23
  require 'shopify_app/webhooks_manager'
23
24
  require 'shopify_app/scripttags_manager'
@@ -0,0 +1,16 @@
1
+ module ShopifyApp
2
+ module Localization
3
+ extend ActiveSupport::Concern
4
+
5
+ def set_locale
6
+ if params[:locale]
7
+ session[:locale] = params[:locale]
8
+ else
9
+ session[:locale] ||= I18n.default_locale
10
+ end
11
+ I18n.locale = session[:locale]
12
+ rescue I18n::InvalidLocale
13
+ I18n.locale = I18n.default_locale
14
+ end
15
+ end
16
+ end
@@ -1,3 +1,3 @@
1
1
  module ShopifyApp
2
- VERSION = '7.2.7'
2
+ VERSION = '7.2.8'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.7
4
+ version: 7.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-05 00:00:00.000000000 Z
11
+ date: 2017-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -145,9 +145,11 @@ files:
145
145
  - app/controllers/shopify_app/sessions_controller.rb
146
146
  - app/controllers/shopify_app/webhooks_controller.rb
147
147
  - app/views/shopify_app/sessions/new.html.erb
148
+ - config/locales/de.yml
148
149
  - config/locales/en.yml
149
150
  - config/locales/es.yml
150
151
  - config/locales/fr.yml
152
+ - config/locales/ja.yml
151
153
  - config/routes.rb
152
154
  - images/app-proxy-screenshot.png
153
155
  - lib/generators/shopify_app/add_webhook/add_webhook_generator.rb
@@ -182,6 +184,7 @@ files:
182
184
  - lib/shopify_app/configuration.rb
183
185
  - lib/shopify_app/engine.rb
184
186
  - lib/shopify_app/in_memory_session_store.rb
187
+ - lib/shopify_app/localization.rb
185
188
  - lib/shopify_app/login_protection.rb
186
189
  - lib/shopify_app/scripttags_manager.rb
187
190
  - lib/shopify_app/scripttags_manager_job.rb