forked from External/greenlight
GRN2-112: Default language fallback fails with a 500 error (#469)
* GRN2-112: Default language fallback fails with a 500 error * Updates for passing rspec tests * Added cache for gitlab ci * Updated cache for gitlab * Restored Dockerfile * Fixed glitch in filter for build and deployment
This commit is contained in:
parent
c8a799bce8
commit
9b2424cde0
|
@ -3,6 +3,10 @@ stages:
|
||||||
- build
|
- build
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- /cache
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
|
|
@ -44,11 +44,12 @@ class ApplicationController < ActionController::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_locale(user)
|
def update_locale(user)
|
||||||
I18n.locale = if user && user.language != 'default'
|
locale = if user && user.language != 'default'
|
||||||
user.language.tr('-', '_')
|
user.language
|
||||||
else
|
else
|
||||||
http_accept_language.language_region_compatible_from(I18n.available_locales)
|
http_accept_language.language_region_compatible_from(I18n.available_locales)
|
||||||
end
|
end
|
||||||
|
I18n.locale = locale.tr('-', '_') unless locale.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
def meeting_name_limit
|
def meeting_name_limit
|
||||||
|
|
|
@ -68,7 +68,7 @@ es:
|
||||||
go_back: Atrás
|
go_back: Atrás
|
||||||
greenlight: Greenlight
|
greenlight: Greenlight
|
||||||
header:
|
header:
|
||||||
create_room: Creat sala
|
create_room: Crear sala
|
||||||
dropdown:
|
dropdown:
|
||||||
help: "¿Necesitas ayuda?"
|
help: "¿Necesitas ayuda?"
|
||||||
home: Sala principal
|
home: Sala principal
|
||||||
|
|
|
@ -68,7 +68,7 @@ es_MX:
|
||||||
go_back: Atrás
|
go_back: Atrás
|
||||||
greenlight: Greenlight
|
greenlight: Greenlight
|
||||||
header:
|
header:
|
||||||
create_room: Creat sala
|
create_room: Crear sala
|
||||||
dropdown:
|
dropdown:
|
||||||
help: "¿Necesitas ayuda?"
|
help: "¿Necesitas ayuda?"
|
||||||
home: Sala principal
|
home: Sala principal
|
||||||
|
|
|
@ -53,7 +53,7 @@ if [ -z $CD_DOCKER_REPO ]; then
|
||||||
export CD_DOCKER_REPO=$CD_REF_SLUG
|
export CD_DOCKER_REPO=$CD_REF_SLUG
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$CD_REF_NAME" != "master" ] && [[ "$CD_REF_NAME" != *"release"* ]] && [ -z $CD_BUILD_ALL ];then
|
if [ "$CD_REF_NAME" != "master" ] && [[ "$CD_REF_NAME" != *"release"* ]] && ( -z $CD_BUILD_ALL ] || [ "$CD_BUILD_ALL" != "true" ] ); then
|
||||||
echo "#### Docker image for $CD_REF_SLUG won't be built"
|
echo "#### Docker image for $CD_REF_SLUG won't be built"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -69,7 +69,7 @@ if [ -z $CD_DOCKER_REPO ]; then
|
||||||
export CD_DOCKER_REPO=$CD_REF_SLUG
|
export CD_DOCKER_REPO=$CD_REF_SLUG
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$CD_REF_NAME" != "master" ] && [[ "$CD_REF_NAME" != *"release"* ]] && [ -z $CD_DEPLOY_ALL ];then
|
if [ "$CD_REF_NAME" != "master" ] && [[ "$CD_REF_NAME" != *"release"* ]] && ( [ -z $CD_DEPLOY_ALL ] || [ "$CD_DEPLOY_ALL" != "true" ] ); then
|
||||||
echo "#### Docker image for $CD_DOCKER_REPO won't be deployed. The conditions for running this build were not met."
|
echo "#### Docker image for $CD_DOCKER_REPO won't be deployed. The conditions for running this build were not met."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue