More progress on ticket:1919

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
This commit is contained in:
Ævar Arnfjörð Bjarmason 2009-06-06 19:22:39 +00:00
parent f9e5cdbb93
commit cc5694da1c
12 changed files with 37 additions and 48 deletions

View file

@ -421,7 +421,7 @@ page << <<EOJ
table.appendChild(tr); table.appendChild(tr);
var heading = document.createElement("td"); 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); tr.appendChild(heading);
var td = document.createElement("td"); 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 user = nodes[i].getAttribute("user") || "#{I18n.t('browse.start_rjs.private_user')}";
var timestamp = nodes[i].getAttribute("timestamp"); var timestamp = nodes[i].getAttribute("timestamp");
var item = document.createElement("li"); 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); history.appendChild(item);
} }
div.appendChild(history); div.appendChild(history);
@ -470,9 +470,9 @@ page << <<EOJ
if (feature.attributes.name) { if (feature.attributes.name) {
return feature.attributes.name; return feature.attributes.name;
} else if (featureType(feature) == "node") { } 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") { } 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) { if (feature.attributes.name) {
return feature.attributes.name; return feature.attributes.name;
} else if (featureType(feature) == "node") { } 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") { } 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 });
} }
} }

View file

@ -155,11 +155,10 @@ de:
loading: "Laden..." loading: "Laden..."
show_history: "Chronik" show_history: "Chronik"
wait: "Verarbeiten..." wait: "Verarbeiten..."
history_for: "Chronik für" history_for_feature: "Chronik für {{feature}}"
details: "Details" details: "Details"
private_user: "Anonymer Benutzer" private_user: "Anonymer Benutzer"
edited_by: "Bearbeitet von" edited_by_user_at_timestamp: "Bearbeitet von {{user}} am {{timestamp}}"
at_timestamp: "am"
tag_details: tag_details:
tags: "Tags:" tags: "Tags:"
way_details: way_details:

View file

@ -155,11 +155,10 @@ en:
loading: "Loading..." loading: "Loading..."
show_history: "Show History" show_history: "Show History"
wait: "Wait..." wait: "Wait..."
history_for: "History for" history_for_feature: "History for {{feature}}"
details: "Details" details: "Details"
private_user: "private user" private_user: "private user"
edited_by: "Edited by" edited_by_user_at_timestamp: "Edited by {{user}} at {{timestamp}}"
at_timestamp: "at"
object_list: object_list:
heading: "Object list" heading: "Object list"
back: "Display object list" back: "Display object list"
@ -171,13 +170,13 @@ en:
details: "Details" details: "Details"
selected: selected:
type: type:
node: "Node" node: "Node {{id}}"
way: "Way" way: "Way {{id}}"
# There's no 'relation' type because it isn't represented in OpenLayers # There's no 'relation' type because it isn't represented in OpenLayers
history: history:
type: type:
node: "Node" node: "Node {{id}}"
way: "Way" way: "Way {{id}}"
# There's no 'relation' type because it isn't represented in OpenLayers # There's no 'relation' type because it isn't represented in OpenLayers
tag_details: tag_details:
tags: "Tags:" tags: "Tags:"

View file

@ -70,11 +70,10 @@ fr:
loading: "Chargement..." loading: "Chargement..."
show_history: "Montrer l'historique" show_history: "Montrer l'historique"
wait: "Patienter..." wait: "Patienter..."
history_for: "Historique pour" history_for_feature: "Historique pour {{feature}}"
details: "Détails" details: "Détails"
private_user: "utilisateur privé" private_user: "utilisateur privé"
edited_by: "Édité par" edited_by_user_at_timestamp: "Édité par {{user}} le {{timestamp}}"
at_timestamp: "le"
diary_entry: diary_entry:
new: new:
title: "Nouvelle entrée du journal" title: "Nouvelle entrée du journal"

View file

@ -151,11 +151,10 @@ he:
loading: "Loading..." loading: "Loading..."
show_history: "Show History" show_history: "Show History"
wait: "Wait..." wait: "Wait..."
history_for: "History for" history_for_feature: "History for {{feature}}"
details: "Details" details: "Details"
private_user: "private user" private_user: "private user"
edited_by: "Edited by" edited_by_user_at_timestamp: "Edited by {{user}} at {{timestamp}}"
at_timestamp: "at"
tag_details: tag_details:
tags: "Tags:" tags: "Tags:"
way_details: way_details:

View file

@ -155,11 +155,10 @@ is:
loading: "Hleð inn gögnum..." loading: "Hleð inn gögnum..."
show_history: "Sýna breytingarsögu" show_history: "Sýna breytingarsögu"
wait: "Augnablik..." wait: "Augnablik..."
history_for: "Breytingarskrá fyrir" history_for_feature: "Breytingarskrá fyrir {{feature}}"
details: "Nánar" details: "Nánar"
private_user: "private user" private_user: "ónafngreindum"
edited_by: "Breytt af" edited_by_user_at_timestamp: "Breytt af {{user}} klukkan {{timestamp}}"
at_timestamp: "klukkan"
object_list: object_list:
heading: "Hlutir" heading: "Hlutir"
back: "Aftur á listann yfir hluti á þessu svæði" back: "Aftur á listann yfir hluti á þessu svæði"
@ -170,13 +169,13 @@ is:
details: "Nánar" details: "Nánar"
selected: selected:
type: type:
node: "Hnútur" node: "Hnútur {{id}}"
way: "Vegur" way: "Vegur {{id}}"
# There's no 'relation' type because it isn't represented in OpenLayers # There's no 'relation' type because it isn't represented in OpenLayers
history: history:
type: type:
node: "hnút" node: "hnút {{id}}"
way: "veg" way: "veg {{id}}"
# There's no 'relation' type because it isn't represented in OpenLayers # There's no 'relation' type because it isn't represented in OpenLayers
tag_details: tag_details:
tags: "Eigindi:" tags: "Eigindi:"

View file

@ -151,11 +151,10 @@ it:
loading: "Caricamento in corso..." loading: "Caricamento in corso..."
show_history: "Visualizza storico" show_history: "Visualizza storico"
wait: "Attendere..." wait: "Attendere..."
history_for: "Storico per" history_for_feature: "Storico per {{feature}}"
details: "Dettagli" details: "Dettagli"
private_user: "utente privato" private_user: "utente privato"
edited_by: "Modificato da" edited_by_user_at_timestamp: "Modificato da {{user}} il {{timestamp}}"
at_timestamp: "il"
tag_details: tag_details:
tags: "Etichette:" tags: "Etichette:"
way_details: way_details:

View file

@ -151,11 +151,10 @@ nl:
loading: "Laden..." loading: "Laden..."
show_history: "Geschiedenis weergeven" show_history: "Geschiedenis weergeven"
wait: "Een ogenblik geduld a.u.b..." wait: "Een ogenblik geduld a.u.b..."
history_for: "Geschiedenis voor" history_for_feature: "Geschiedenis voor {{feature}}"
details: "Details" details: "Details"
private_user: "private user" #to be translated private_user: "private user" #to be translated
edited_by: "Bewerkt door" edited_by_user_at_timestamp: "Bewerkt door {{user}} op {{timestamp}}"
at_timestamp: "op"
tag_details: tag_details:
tags: "Tags:" tags: "Tags:"
way_details: way_details:

View file

@ -151,11 +151,10 @@ pl:
loading: "Wczytywanie..." loading: "Wczytywanie..."
show_history: "Pokaż zmiany" show_history: "Pokaż zmiany"
wait: "Moment..." wait: "Moment..."
history_for: "Historia zmian dla" history_for_feature: "Historia zmian dla {{feature}}"
details: "Szczegóły" details: "Szczegóły"
private_user: "prywatny użytkownika" private_user: "prywatny użytkownika"
edited_by: "Edytowany przez" edited_by_user_at_timestamp: "Edytowany przez {{user}} ostatni raz {{timestamp}}"
at_timestamp: "ostatni raz"
tag_details: tag_details:
tags: "Tagi:" tags: "Tagi:"
way_details: way_details:

View file

@ -151,11 +151,10 @@ ru:
loading: "Загрузка..." loading: "Загрузка..."
show_history: "Показать историю" show_history: "Показать историю"
wait: "Подождите..." wait: "Подождите..."
history_for: "История" history_for_feature: "История {{feature}}"
details: "Детали" details: "Детали"
private_user: "частный пользователь" private_user: "частный пользователь"
edited_by: "Изменен" edited_by_user_at_timestamp: "Изменен {{user}} в {{timestamp}}"
at_timestamp: "в"
tag_details: tag_details:
tags: "Теги:" tags: "Теги:"
way_details: way_details:

View file

@ -151,11 +151,10 @@ sl:
loading: "Nalaganje..." loading: "Nalaganje..."
show_history: "Prikaži zgodovino" show_history: "Prikaži zgodovino"
wait: "Počakajte..." wait: "Počakajte..."
history_for: "Zgodovina" history_for_feature: "Zgodovina {{feature}}"
details: "Podrobnosti" details: "Podrobnosti"
private_user: "anonimni uporabnik" private_user: "anonimni uporabnik"
edited_by: "Uredil" edited_by_user_at_timestamp: "Uredil {{user}} ob {{timestamp}}"
at_timestamp: "ob"
tag_details: tag_details:
tags: "Oznake:" tags: "Oznake:"
way_details: way_details:

View file

@ -151,11 +151,10 @@
loading: "读取中" loading: "读取中"
show_history: "显示历史" show_history: "显示历史"
wait: "等待中..." wait: "等待中..."
history_for: "历史" history_for_feature: "历史 {{feature}}"
details: "细节" details: "细节"
private_user: "个人用户" private_user: "个人用户"
edited_by: "Edited by" edited_by_user_at_timestamp: "Edited by {{user}} at {{timestamp}}"
at_timestamp: "at"
tag_details: tag_details:
tags: "标签:" tags: "标签:"
way_details: way_details: