This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You need to have the following gems: | |
- spree_multi_lingual | |
- spree_pages | |
( In my case I'm using these ones) | |
gem 'spree_multi_lingual' , :git => '[email protected]:davidslvto/spree_multi_lingual.git', :branch => 'new_features' | |
gem 'spree_pages' , :git => '[email protected]:davidslvto/spree_pages.git' | |
After that you probably are ready to translate some pages! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% | |
# app/views/spree/shared/_lang_choice.html.erb | |
# Deface + I18n.with_locale do not play well together, implementing it manually | |
saved_locale = I18n.locale | |
I18n.locale = I18n.locale == :fr ? :en : :fr | |
%> | |
<li class="lang-swich"><%= lang_switch_url %></li> | |
<% I18n.locale = saved_locale %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
// Adding upload button to Trix toolbar on initialization | |
document.addEventListener('trix-initialize', function(e) { | |
trix = e.target; | |
toolBar = trix.toolbarElement; | |
// Creation of the button | |
button = document.createElement("button"); | |
button.setAttribute("type", "button"); | |
button.setAttribute("class", "attach"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.6.5-alpine | |
RUN apk add --update --no-cache bash build-base nodejs sqlite-dev tzdata postgresql-dev yarn | |
RUN gem install bundler:2.1.4 | |
WORKDIR /usr/src/app | |
COPY package.json yarn.lock ./ | |
RUN yarn install --check-files |