summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-08-03 14:44:24 -0700
committerelijah <elijah@riseup.net>2015-08-03 14:44:24 -0700
commit738e77a729813901db8725cacfb15f4150fd49d2 (patch)
tree93e4ac7097c88a20c8c8d01df4413fe2f2483a0f
parent8684aa38ece3271a0eb0f8a1751f6c3297025afa (diff)
webapp: add support for customizing locales
-rw-r--r--provider_base/services/webapp.json4
-rw-r--r--puppet/modules/site_webapp/templates/config.yml.erb5
2 files changed, 8 insertions, 1 deletions
diff --git a/provider_base/services/webapp.json b/provider_base/services/webapp.json
index 941f4f61..081b3718 100644
--- a/provider_base/services/webapp.json
+++ b/provider_base/services/webapp.json
@@ -31,7 +31,9 @@
},
"engines": [
"support"
- ]
+ ],
+ "locales": "= provider.languages",
+ "default_locale": "= provider.default_language"
},
"stunnel": {
"clients": {
diff --git a/puppet/modules/site_webapp/templates/config.yml.erb b/puppet/modules/site_webapp/templates/config.yml.erb
index ccde2d2e..e8853ade 100644
--- a/puppet/modules/site_webapp/templates/config.yml.erb
+++ b/puppet/modules/site_webapp/templates/config.yml.erb
@@ -2,6 +2,11 @@
<%- cert_options = @webapp['client_certificates'] -%>
production:
admins: <%= @webapp['admins'].inspect %>
+ default_locale: :<%= @webapp['default_locale'] %>
+ available_locales:
+<%- @webapp['locales'].each do |locale| -%>
+ - :<%= locale %>
+<%- end -%>
domain: <%= @provider_domain %>
force_ssl: <%= @webapp['secure'] %>
client_ca_key: <%= scope.lookupvar('x509::variables::keys') %>/<%= scope.lookupvar('site_config::params::client_ca_name') %>.key