mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-17 03:16:21 +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
|
||||
success: Success!
|
||||
error: Error
|
||||
deploy_localized_domain:
|
||||
title: Domain name by language
|
||||
success: Success!
|
||||
error: Error
|
||||
deploy_rsync:
|
||||
title: Synchronize to backup server
|
||||
success: Success!
|
||||
|
|
|
@ -102,6 +102,10 @@ es:
|
|||
title: Dominio alternativo
|
||||
success: ¡Éxito!
|
||||
error: Hubo un error
|
||||
deploy_localized_domain:
|
||||
title: Dominio según idioma
|
||||
success: ¡Éxito!
|
||||
error: Hubo un error
|
||||
deploy_rsync:
|
||||
title: Sincronizar al servidor alternativo
|
||||
success: ¡Éxito!
|
||||
|
|
Loading…
Reference in a new issue