We've got an issue with translations in production mode.
Our translations works and loads correctly in developer mode with MaterializationStrategy set to Copy.
When we deploy to production we run the following:
bin/magento maintenance:enable
composer install
bin/magento cache:clean
bin/magento cache:flush
bin/magento setup:upgrade --keep-generated
bin/magento setup:di:compile
bin/magento setup:static-content:deploy da_DK de_DE en_US es_ES fr_FR it_IT nl_NL nb_NO sv_SE fi_FI
bin/magento cache:clean
bin/magento cache:flush
bin/magento maintenance:disable
The problem is that translations aren't working in the Minicart and during checkout. The danish translations are loaded on all locales.
Try adding af product to the cart on https://floatinggrip.com
Found this issue : https://github.com/magento/magento2/issues/7862
Bug from Magento static content deployment optimization on js translations generations.
Here is the workaround :
php bin/magento setup:static-content:deploy --theme=Magento/luma en_US
php bin/magento setup:static-content:deploy --theme=Magento/luma nl_NL
php bin/magento setup:static-content:deploy --theme=Magento/luma fr_FR
Replace by your theme, and dont forget the backend theme :
php bin/magento setup:static-content:deploy --theme=Magento/backend en_US
Related
Is it possible to have asdf and rvm coexist? If so, how do you set it up? I made a test project to try out asdf but it seems that's affecting another existing project that's managed by rvm. When I run rails I'm getting:
asdf: No version set for command ruby
you might want to add one of the following in your .tool-versions file:
ruby 2.6.1
I've came across the same issue while installing asdf in macOS. I was able resolve it by creating .tool-versions file and adding the ruby version entry. You can do the same by running following command in the terminal.
$ echo 'ruby 2.6.1' >> .tool-versions
more information can be found here in this blog post
This is the hack I currently use. Running use-rvm or use-asdf uncomments the respective line in my ~/.bash_profile, and comments the unwanted line.
# RVM
# source $HOME/.rvm/scripts/rvm
# ASDF
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
# Add Visual Studio Code (code)
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
use-rvm () {
sed -i "" 's|^# source $HOME/.rvm/scripts/rvm|source $HOME/.rvm/scripts/rvm|' ~/.bash_profile
sed -i "" 's|^. $HOME/.asdf/asdf.sh|# . $HOME/.asdf/asdf.sh|' ~/.bash_profile
bash --login
}
use-asdf () {
sed -i "" 's|^source $HOME/.rvm/scripts/rvm|# source $HOME/.rvm/scripts/rvm|' ~/.bash_profile
sed -i "" 's|^# . $HOME/.asdf/asdf.sh|. $HOME/.asdf/asdf.sh|' ~/.bash_profile
bash --login
}
And here's the gist
I have strange issue with my locale
except printing symbols like [] i have got ÆÅ | i have gotø and many more others
i have tried to reconfigure locales in ubuntu with sudo dpkg-reconfigure locales it did't help
also tried to set up LANG env variable, nothing works for me
in terminal
locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
also inside files all special symbols broken
How to fix it?
I'm using the Sublime Text 3 with Ruby On Rails projects.
Some time ago, I setup CTags using this tutorial.
It was fine, but suddenly stopped to work. I'm getting the following error when try to rebuild the tags of project.
/bin/sh: ctags_for_ruby: command not found
These are my files:
/usr/local/bin/ctags_for_ruby:
#!/usr/bin/env ruby
system "find . -name '*.rb' | ctags -f .tags -L -"
if File.exist? './Gemfile'
require 'bundler'
paths = Bundler.load.specs.map(&:full_gem_path).join(' ')
system "ctags -R -f .gemtags #{paths}"
end
~/Library/Application Support/Sublime Text 3/Packages/User/CTags.sublime-settings
{
"debug" : false,
"autocomplete": false,
"command" : "ctags_for_ruby",
"filters" : {
"source.python": {"type":"^i$"}
},
"definition_filters": {
"source.php": {"type":"^v$"}
},
"definition_current_first": true,
"show_context_menus": true,
"extra_tag_paths" : [ [["source.python", "windows"], "C:\\Python27\\Lib\\tags"]],
"extra_tag_files" : [".gemtags", ".tags"]
}
And the $PATH variable includes /usr/local/bin directory.
Why Sublime can't find/execute the ctags_for_ruby file?
/usr/local/bin may be in your shell's $PATH, but it is not getting picked up by Sublime. To fix this, edit ~/Library/Application Support/Sublime Text 3/Packages/User/CTags.sublime-settings and change the "command" setting to "/usr/local/bin/ctags_for_ruby". Also, unless you are using the system Ruby in /usr/bin, you might want to edit the first line of /usr/local/bin/ctags_for_ruby from #/usr/bin/env ruby to the direct path of your Ruby interpreter - you can find this by running which ruby on the command line.
I need to remove Mozilla Firefox / Google Chrome which comes at the end of title of my website.For Example : music.Google.com website in which browser name is not available after title name. I tried
document.title="ABC";
So I want only ABC in my title bar. But, currently it shows
ABC -Google Chrome
and in firefox
ABC- MOZILLA Firefox
This is not possible for a page to change. Browsers add this text after whatever title the page sets.
The universal solution is to use your OS to change the titles of windows. On Linux (Debian) I remove the browser name from the window title using wmctrl and a simple script that goes over all window titles every second and modifies them.
This is the script:
#!/bin/sh
function remove_chrome_suffix {
WINDOWS=$(wmctrl -l | grep " - Google Chrome$")
IFS=$'\n'
for W in $WINDOWS; do
CMD="wmctrl -i -r "$(echo "$W" | grep -o "^[^ ]\+")" "
CMD=$(printf "%s-T %q" $CMD $(echo "$W" | grep -oP "^[^ ]+ +[^ ]+ +[^ ]+ +\\K.*(?= - Google Chrome$)"))
eval "$CMD"
done
unset IFS
}
while true; do
remove_chrome_suffix
sleep 1
done
I launch it as follows:
nohup <script file> &>/dev/null &
Sqlalchemy is throwing me error messages in french On my french-configured linux (ubuntu) lappy. What do I have to do to have those error messages in english ?
PS :
(my-coriolis)chaouche#jogger:~/$ echo $LANG
en_US.utf8
(my-coriolis)chaouche#jogger:~/$
LC_ALL should be set to en_US.UTF-8 too.