From b653ace377aa47d2b0eba08e5c6f0dcd7622f00b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sat, 6 Jun 2009 17:57:08 +0000 Subject: [PATCH] Implement a hack so that we can interpolate JavaScript variables in translation strings from Ruby, doing the string replacement lient-side instead of on the server. This partially solves ticket:1919. I still have to move the rest of the JS functions over to the new system. --- app/views/browse/start.rjs | 18 +++++++++++++++++- config/locales/de.yml | 3 +-- config/locales/en.yml | 3 +-- config/locales/fr.yml | 3 +-- config/locales/he.yml | 3 +-- config/locales/is.yml | 3 +-- config/locales/it.yml | 3 +-- config/locales/nl.yml | 3 +-- config/locales/pl.yml | 3 +-- config/locales/ru.yml | 3 +-- config/locales/sl.yml | 3 +-- config/locales/zh-CN.yml | 3 +-- 12 files changed, 28 insertions(+), 23 deletions(-) diff --git a/app/views/browse/start.rjs b/app/views/browse/start.rjs index c5247066e..244456f11 100644 --- a/app/views/browse/start.rjs +++ b/app/views/browse/start.rjs @@ -131,7 +131,7 @@ page << < '{{num_features}}')}", { num_features: browseFeatureList.length }))); div.appendChild(p); var input = document.createElement("input"); @@ -486,6 +486,22 @@ page << <