]> git.openstreetmap.org Git - rails.git/commitdiff
More progress on ticket:1919
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 6 Jun 2009 19:22:39 +0000 (19:22 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 6 Jun 2009 19:22:39 +0000 (19:22 +0000)
These messages now don't use JavaScript string concatenation but
variable interpolation:

 * browse.start_rjs.history_for_feature
 * browse.start_rjs.edited_by_user_at_timestamp
 * browse.start_rjs.object_list.selected.type.node
 * browse.start_rjs.object_list.selected.type.way
 * browse.start_rjs.object_list.history.type.node
 * browse.start_rjs.object_list.history.type.way

These previously extant messages have been deleted, merged, and given
more descriptive names:

 * browse.start_rjs.history_for
 * browse.start_rjs.edited_by
 * browse.start_rjs.at_timestamp

12 files changed:
app/views/browse/start.rjs
config/locales/de.yml
config/locales/en.yml
config/locales/fr.yml
config/locales/he.yml
config/locales/is.yml
config/locales/it.yml
config/locales/nl.yml
config/locales/pl.yml
config/locales/ru.yml
config/locales/sl.yml
config/locales/zh-CN.yml

index 4df6148473b72d71fa747eea3018d07e099129c1..64e4431a4c4aee9e175506a22abf5661dd4e7d3b 100644 (file)
@@ -421,7 +421,7 @@ page << <<EOJ
     table.appendChild(tr);
 
     var heading = document.createElement("td");
-    heading.appendChild(document.createTextNode("#{I18n.t('browse.start_rjs.history_for')} " + featureNameHistory(this.feature)));
+    heading.appendChild(document.createTextNode(i18n_js("#{I18n.t('browse.start_rjs.history_for_feature', :feature => '{{feature}}')}", { feature: featureNameHistory(this.feature) })));
     tr.appendChild(heading);
 
     var td = document.createElement("td");
@@ -442,7 +442,7 @@ page << <<EOJ
       var user = nodes[i].getAttribute("user") || "#{I18n.t('browse.start_rjs.private_user')}";
       var timestamp = nodes[i].getAttribute("timestamp");
       var item = document.createElement("li");
-      item.appendChild(document.createTextNode("#{I18n.t('browse.start_rjs.edited_by')} " + user + " #{I18n.t('browse.start_rjs.at_timestamp')} " + timestamp));
+      item.appendChild(document.createTextNode(i18n_js("#{I18n.t('browse.start_rjs.edited_by_user_at_timestamp', :user => '{{user}}', :timestamp => '{{timestamp}}')}", { user: user, timestamp: timestamp })));
       history.appendChild(item);
     }
     div.appendChild(history);
@@ -470,9 +470,9 @@ page << <<EOJ
     if (feature.attributes.name) {
       return feature.attributes.name;
     } else if (featureType(feature) == "node") {
-      return "#{I18n.t('browse.start_rjs.object_list.selected.type.node')} " + feature.osm_id;
+      return i18n_js("#{I18n.t('browse.start_rjs.object_list.selected.type.node', :id => '{{id}}')}", { id: feature.osm_id });
     } else if (featureType(feature) == "way") {
-      return "#{I18n.t('browse.start_rjs.object_list.selected.type.way')} " + feature.osm_id;
+      return i18n_js("#{I18n.t('browse.start_rjs.object_list.selected.type.way',  :id => '{{id}}')}", { id: feature.osm_id });
     }
   }
 
@@ -480,9 +480,9 @@ page << <<EOJ
     if (feature.attributes.name) {
       return feature.attributes.name;
     } else if (featureType(feature) == "node") {
-      return "#{I18n.t('browse.start_rjs.object_list.history.type.node')} " + feature.osm_id;
+      return i18n_js("#{I18n.t('browse.start_rjs.object_list.history.type.node', :id => '{{id}}')}", { id: feature.osm_id });
     } else if (featureType(feature) == "way") {
-      return "#{I18n.t('browse.start_rjs.object_list.history.type.way')} " + feature.osm_id;
+      return i18n_js("#{I18n.t('browse.start_rjs.object_list.history.type.way',  :id => '{{id}}')}", { id: feature.osm_id });
     }
   }
 
index 279ae8eb00b12595fd477bdc907ae36eb76c94cd..9d3ebed0a7140970b21830bc1a903e780da18308 100644 (file)
@@ -155,11 +155,10 @@ de:
       loading: "Laden..."
       show_history: "Chronik"
       wait: "Verarbeiten..."
-      history_for: "Chronik für"
+      history_for_feature: "Chronik für {{feature}}"
       details: "Details"
       private_user: "Anonymer Benutzer"
-      edited_by: "Bearbeitet von"
-      at_timestamp: "am"    
+      edited_by_user_at_timestamp: "Bearbeitet von {{user}} am {{timestamp}}"
     tag_details:
       tags: "Tags:"
     way_details:
index 7fe8b60ff9c804874e8a7677e76e0550fce57b06..1635f6b6721302c9eafc219871f5674cdcc7d39c 100644 (file)
@@ -155,11 +155,10 @@ en:
       loading: "Loading..."
       show_history: "Show History"
       wait: "Wait..."
-      history_for: "History for"
+      history_for_feature: "History for {{feature}}"
       details: "Details"
       private_user: "private user"
-      edited_by: "Edited by"
-      at_timestamp: "at"
+      edited_by_user_at_timestamp: "Edited by {{user}} at {{timestamp}}"
       object_list:
         heading: "Object list"
         back: "Display object list"
@@ -171,13 +170,13 @@ en:
         details: "Details"
         selected:
           type:
-            node: "Node"
-            way: "Way"
+            node: "Node {{id}}"
+            way: "Way {{id}}"
             # There's no 'relation' type because it isn't represented in OpenLayers
         history:
           type:
-            node: "Node"
-            way: "Way"
+            node: "Node {{id}}"
+            way: "Way {{id}}"
             # There's no 'relation' type because it isn't represented in OpenLayers
     tag_details:
       tags: "Tags:"
index be9417793ca0adfdfcf7eee4021cb148620bf564..e844d028c9db81cd77283166f2dba1ad71de6a08 100644 (file)
@@ -70,11 +70,10 @@ fr:
       loading: "Chargement..."
       show_history: "Montrer l'historique"
       wait: "Patienter..."
-      history_for: "Historique pour"
+      history_for_feature: "Historique pour {{feature}}"
       details: "Détails"
       private_user: "utilisateur privé"
-      edited_by: "Édité par"
-      at_timestamp: "le"
+      edited_by_user_at_timestamp: "Édité par {{user}} le {{timestamp}}"
   diary_entry:
     new:
       title: "Nouvelle entrée du journal"
index d340d37b42038746423f98e088d04a8e380ef586..886ed19eed9c5dc2c63e11a248c51c0dbdc6aba2 100644 (file)
@@ -151,11 +151,10 @@ he:
       loading: "Loading..."
       show_history: "Show History"
       wait: "Wait..."
-      history_for: "History for"
+      history_for_feature: "History for {{feature}}"
       details: "Details"
       private_user: "private user"
-      edited_by: "Edited by"
-      at_timestamp: "at"
+      edited_by_user_at_timestamp: "Edited by {{user}} at {{timestamp}}"
     tag_details:
       tags: "Tags:"
     way_details:
index 032e48e72a3b2159e18b05e76089674f30814386..189f44963e00077b9d5e0a3cea4347d5d8168a61 100644 (file)
@@ -155,11 +155,10 @@ is:
       loading: "Hleð inn gögnum..."
       show_history: "Sýna breytingarsögu"
       wait: "Augnablik..."
-      history_for: "Breytingarskrá fyrir"
+      history_for_feature: "Breytingarskrá fyrir {{feature}}"
       details: "Nánar"
-      private_user: "private user"
-      edited_by: "Breytt af"
-      at_timestamp: "klukkan"
+      private_user: "ónafngreindum"
+      edited_by_user_at_timestamp: "Breytt af {{user}} klukkan {{timestamp}}"
       object_list:
         heading: "Hlutir"
         back: "Aftur á listann yfir hluti á þessu svæði"
@@ -170,13 +169,13 @@ is:
         details: "Nánar"
         selected:
           type:
-            node: "Hnútur"
-            way: "Vegur"
+            node: "Hnútur {{id}}"
+            way: "Vegur {{id}}"
             # There's no 'relation' type because it isn't represented in OpenLayers
         history:
           type:
-            node: "hnút"
-            way: "veg"
+            node: "hnút {{id}}"
+            way: "veg {{id}}"
             # There's no 'relation' type because it isn't represented in OpenLayers
     tag_details:
       tags: "Eigindi:"
index 09edbcf40166c14f30237fb3a0657e07fb8a1ae6..2335a99fba98e26c66c0b56026a9b1091cad0e11 100644 (file)
@@ -151,11 +151,10 @@ it:
       loading: "Caricamento in corso..."
       show_history: "Visualizza storico"
       wait: "Attendere..."
-      history_for: "Storico per"
+      history_for_feature: "Storico per {{feature}}"
       details: "Dettagli"
       private_user: "utente privato"
-      edited_by: "Modificato da"
-      at_timestamp: "il"
+      edited_by_user_at_timestamp: "Modificato da {{user}} il {{timestamp}}"
     tag_details:
       tags: "Etichette:"
     way_details:
index a1bafbd6420639e6ef942a38605583122f3818a7..b9e9299c2bb4f77bcd3fae4a2e530b021a80a1ea 100644 (file)
@@ -151,11 +151,10 @@ nl:
       loading: "Laden..."
       show_history: "Geschiedenis weergeven"
       wait: "Een ogenblik geduld a.u.b..."
-      history_for: "Geschiedenis voor"
+      history_for_feature: "Geschiedenis voor {{feature}}"
       details: "Details"
       private_user: "private user" #to be translated
-      edited_by: "Bewerkt door"
-      at_timestamp: "op"
+      edited_by_user_at_timestamp: "Bewerkt door {{user}} op {{timestamp}}"
     tag_details:
       tags: "Tags:"
     way_details:
index ada4113ff1d7fd023d6f1f0e46ab53c85ec840f4..3903c6f0cb572aaad49ffc17f029a8e5441ac38f 100644 (file)
@@ -151,11 +151,10 @@ pl:
       loading: "Wczytywanie..."
       show_history: "Pokaż zmiany"
       wait: "Moment..."
-      history_for: "Historia zmian dla"
+      history_for_feature: "Historia zmian dla {{feature}}"
       details: "Szczegóły"
       private_user: "prywatny użytkownika"
-      edited_by: "Edytowany przez"
-      at_timestamp: "ostatni raz"
+      edited_by_user_at_timestamp: "Edytowany przez {{user}} ostatni raz {{timestamp}}"
     tag_details:
       tags: "Tagi:"
     way_details:
index dacecc4ec6008084a97e95ac61ea45a64ab8518a..8e643997a8091b0834cefad1037db818415d6e3e 100644 (file)
@@ -151,11 +151,10 @@ ru:
       loading: "Загрузка..."
       show_history: "Показать историю"
       wait: "Подождите..."
-      history_for: "История"
+      history_for_feature: "История {{feature}}"
       details: "Детали"
       private_user: "частный пользователь"
-      edited_by: "Изменен"
-      at_timestamp: "в"
+      edited_by_user_at_timestamp: "Изменен {{user}} в {{timestamp}}"
     tag_details:
       tags: "Теги:"
     way_details:
index 02707c18a790c1150873e4a662a11802b049b4b1..3962cae217e095e613393ef8033e4cf102835a6a 100644 (file)
@@ -151,11 +151,10 @@ sl:
       loading: "Nalaganje..."
       show_history: "Prikaži zgodovino"
       wait: "Počakajte..."
-      history_for: "Zgodovina"
+      history_for_feature: "Zgodovina {{feature}}"
       details: "Podrobnosti"
       private_user: "anonimni uporabnik"
-      edited_by: "Uredil"
-      at_timestamp: "ob"
+      edited_by_user_at_timestamp: "Uredil {{user}} ob {{timestamp}}"
     tag_details:
       tags: "Oznake:"
     way_details:
index 5ca8a4874e34d9435ffe551e16cfa0df885edc7c..1541e8d5ebc4c9dc219e85e0f547d084bef1e116 100644 (file)
       loading: "读取中"
       show_history: "显示历史"
       wait: "等待中..."
-      history_for: "历史"
+      history_for_feature: "历史 {{feature}}"
       details: "细节"
       private_user: "个人用户"
-      edited_by: "Edited by"
-      at_timestamp: "at"
+      edited_by_user_at_timestamp: "Edited by {{user}} at {{timestamp}}"
     tag_details:
       tags: "标签:"
     way_details: