mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-17 05:46:23 +00:00
Merge branch 'deploy-locales' into 'rails'
vincular a un idioma según el dominio Closes #4545 See merge request sutty/sutty!76
This commit is contained in:
commit
0d4a0e1dc3
3 changed files with 20 additions and 0 deletions
12
app/models/deploy_localized_domain.rb
Normal file
12
app/models/deploy_localized_domain.rb
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
# Soportar dominios localizados
|
||||||
|
class DeployLocalizedDomain < DeployAlternativeDomain
|
||||||
|
store :values, accessors: %i[hostname locale], coder: JSON
|
||||||
|
|
||||||
|
# Generar un link simbólico del sitio principal al alternativo
|
||||||
|
def deploy
|
||||||
|
File.symlink?(destination) ||
|
||||||
|
File.symlink(File.join(site.hostname, locale), destination).zero?
|
||||||
|
end
|
||||||
|
end
|
|
@ -102,6 +102,10 @@ en:
|
||||||
title: Alternative domain name
|
title: Alternative domain name
|
||||||
success: Success!
|
success: Success!
|
||||||
error: Error
|
error: Error
|
||||||
|
deploy_localized_domain:
|
||||||
|
title: Domain name by language
|
||||||
|
success: Success!
|
||||||
|
error: Error
|
||||||
deploy_rsync:
|
deploy_rsync:
|
||||||
title: Synchronize to backup server
|
title: Synchronize to backup server
|
||||||
success: Success!
|
success: Success!
|
||||||
|
|
|
@ -102,6 +102,10 @@ es:
|
||||||
title: Dominio alternativo
|
title: Dominio alternativo
|
||||||
success: ¡Éxito!
|
success: ¡Éxito!
|
||||||
error: Hubo un error
|
error: Hubo un error
|
||||||
|
deploy_localized_domain:
|
||||||
|
title: Dominio según idioma
|
||||||
|
success: ¡Éxito!
|
||||||
|
error: Hubo un error
|
||||||
deploy_rsync:
|
deploy_rsync:
|
||||||
title: Sincronizar al servidor alternativo
|
title: Sincronizar al servidor alternativo
|
||||||
success: ¡Éxito!
|
success: ¡Éxito!
|
||||||
|
|
Loading…
Reference in a new issue