From 1fea79bbbd7a660fe791dac3f801354fff3a4b50 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 28 Jun 2009 18:25:21 +0000 Subject: [PATCH] The relation browser used the translated nominative model names of Node/Way/Relation in /browse/relation/:id. And used the bad practice of concating things together to translate them. Fixed it to use translation variables. --- app/views/browse/_relation_member.html.erb | 18 ++++++++++-------- config/locales/be.yml | 2 -- config/locales/ca.yml | 2 -- config/locales/de.yml | 2 -- config/locales/el.yml | 2 -- config/locales/en.yml | 7 ++++++- config/locales/es.yml | 2 -- config/locales/he.yml | 2 -- config/locales/hi.yml | 2 -- config/locales/is.yml | 7 ++++++- config/locales/it.yml | 2 -- config/locales/ja.yml | 2 -- config/locales/ko.yml | 2 -- config/locales/nl.yml | 2 -- config/locales/pl.yml | 2 -- config/locales/pt-BR.yml | 2 -- config/locales/ru.yml | 2 -- config/locales/sl.yml | 2 -- config/locales/yo.yml | 2 -- config/locales/zh-CN.yml | 2 -- config/locales/zh-TW.yml | 2 -- 21 files changed, 22 insertions(+), 46 deletions(-) diff --git a/app/views/browse/_relation_member.html.erb b/app/views/browse/_relation_member.html.erb index ead58490c..cee2e0e75 100644 --- a/app/views/browse/_relation_member.html.erb +++ b/app/views/browse/_relation_member.html.erb @@ -1,10 +1,12 @@ - - <%= t 'activerecord.models.'+relation_member.member_type.downcase %> - <%= link_to h(printable_name(relation_member.member)), :action => relation_member.member_type.downcase, :id => relation_member.member_id.to_s %> - <% unless relation_member.member_role.blank? %> - <%= t'browse.relation_member.as' %> - <%= h(relation_member.member_role) %> - <% end %> - + <%= + linked_name = link_to h(printable_name(relation_member.member)), :action => relation_member.member_type.downcase, :id => relation_member.member_id.to_s + type_str = t'browse.relation_member.type.' + relation_member.member_type.downcase + + if relation_member.member_role.blank? + t'browse.relation_member.entry', :type => type_str, :name => linked_name + else + t'browse.relation_member.entry_role', :type => type_str, :name => linked_name, :role => h(relation_member.member_role) + end + %> diff --git a/config/locales/be.yml b/config/locales/be.yml index 03e983b3c..88b6047e2 100644 --- a/config/locales/be.yml +++ b/config/locales/be.yml @@ -128,8 +128,6 @@ be: relation_history: relation_history: "Гісторыя сувязі" relation_history_title: "Гісторыя сувязі: {{relation_name}}" - relation_member: - as: "як" relation: relation: "Сувязь" relation_title: "Сувязь: {{relation_name}}" diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 3440e84b6..26a31456e 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -129,8 +129,6 @@ ca: relation_history: relation_history: "Historial de la relació" relation_history_title: "Historial de la relació: {{relation_name}}" - relation_member: - as: "com a" relation: relation: "Relació" relation_title: "Relació: {{relation_name}}" diff --git a/config/locales/de.yml b/config/locales/de.yml index ecb9de47b..5a19ccd6d 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -135,8 +135,6 @@ de: relation_history: relation_history: "Relations-Chronik" relation_history_title: "Relations-Chronik: {{relation_name}}" - relation_member: - as: "des Typs" relation: relation: "Relation" relation_title: "Relation: {{relation_name}}" diff --git a/config/locales/el.yml b/config/locales/el.yml index 5b1e986fa..0e98f4f55 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -134,8 +134,6 @@ el: relation_history: relation_history: "Ιστορια σχέσης" relation_history_title: "Ιστορια σχέσης: {{relation_name}}" - relation_member: - as: "as" relation: relation: "Σχέση" relation_title: "Σχέση: {{relation_name}}" diff --git a/config/locales/en.yml b/config/locales/en.yml index 1bd6ab532..0c77fd6c7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -142,7 +142,12 @@ en: relation_history: "Relation History" relation_history_title: "Relation History: {{relation_name}}" relation_member: - as: "as" + entry: "{{type}} {{name}}" + entry_role: "{{type}} {{name}} as {{role}}" + type: + node: "Node" + way: "Way" + relation: "Relation" relation: relation: "Relation" relation_title: "Relation: {{relation_name}}" diff --git a/config/locales/es.yml b/config/locales/es.yml index b3928cfa0..e8b5f63d5 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -130,8 +130,6 @@ es: relation_history: relation_history: "Historial de la relación" relation_history_title: "Historial de la relación {{relation_name}}:" - relation_member: - as: "como" relation: relation: "Relación" relation_title: "Relación {{relation_name}}:" diff --git a/config/locales/he.yml b/config/locales/he.yml index 055f050bb..1bb4b8e80 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -128,8 +128,6 @@ he: relation_history: relation_history: "Relation History" relation_history_title: "Relation History: {{relation_name}}" - relation_member: - as: "as" relation: relation: "Relation" relation_title: "Relation: {{relation_name}}" diff --git a/config/locales/hi.yml b/config/locales/hi.yml index 458633a44..33f937b5f 100644 --- a/config/locales/hi.yml +++ b/config/locales/hi.yml @@ -132,8 +132,6 @@ hi: relation_history: relation_history: "संबंध का इतिहास" relation_history_title: "इस संबंध का इतिहास: {{relation_name}}" - relation_member: - as: "जैसे" relation: relation: "संबंध" relation_title: "संबंध: {{relation_name}}" diff --git a/config/locales/is.yml b/config/locales/is.yml index 677b76939..239d53578 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -141,7 +141,12 @@ is: relation_history: "Breytingarskrá vensla " relation_history_title: "Breytingarskrá vensla: {{relation_name}}" relation_member: - as: "sem" + entry: "{{type}} {{name}}" + entry_role: "{{type}} {{name}} sem „{{role}}“" + type: + node: "Hnúturinn" + way: "Vegurinn" + relation: "Venslin" relation: relation: "Vensl" relation_title: "Vensl: {{relation_name}}" diff --git a/config/locales/it.yml b/config/locales/it.yml index b48f37848..dafcc628b 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -128,8 +128,6 @@ it: relation_history: relation_history: "Storico della relazione" relation_history_title: "Storico della relazione: {{relation_name}}" - relation_member: - as: "come" relation: relation: "Relazione" relation_title: "Relazione: {{relation_name}}" diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 3914d06a9..90ecb6f57 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -134,8 +134,6 @@ ja: relation_history: relation_history: "関連の履歴" relation_history_title: "関連の履歴: {{relation_name}}" - relation_member: - as: "as" relation: relation: "関連" relation_title: "関連: {{relation_name}}" diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 5130c006e..803a8915d 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -134,8 +134,6 @@ ko: relation_history: relation_history: "관계 이력" relation_history_title: "관계 이력: {{relation_name}}" - relation_member: - as: "as" relation: relation: "관계" relation_title: "관계: {{relation_name}}" diff --git a/config/locales/nl.yml b/config/locales/nl.yml index e32d38203..7df253dc1 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -128,8 +128,6 @@ nl: relation_history: relation_history: "Relatie-geschiedenis" relation_history_title: "Relatie-geschiedenis: {{relation_name}}" - relation_member: - as: "als" relation: relation: "Relatie" relation_title: "Relatie: {{relation_name}}" diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 1cf36ab7e..5958a4dcc 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -128,8 +128,6 @@ pl: relation_history: relation_history: "Historia zmian relacji" relation_history_title: "Historia relacji: {{relation_name}}" - relation_member: - as: "jako" relation: relation: "Relacja" relation_title: "Relacja: {{relation_name}}" diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 6c5590df7..eeb4fa1a0 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -134,8 +134,6 @@ pt-BR: relation_history: relation_history: "Histórico de Relação" relation_history_title: "Histórico da Relação: {{relation_name}}" - relation_member: - as: "como" relation: relation: "Relação" relation_title: "Relação: {{relation_name}}" diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 5aeb63806..1e56b1411 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -128,8 +128,6 @@ ru: relation_history: relation_history: "История отношения" relation_history_title: "История отношения {{relation_name}}" - relation_member: - as: "в роли" relation: relation: "Отношение" relation_title: "Отношение: {{relation_name}}" diff --git a/config/locales/sl.yml b/config/locales/sl.yml index cafa4c222..6516938fc 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -141,8 +141,6 @@ sl: relation_history: relation_history: "Zgodovina relacije" relation_history_title: "Zgodovina relacije: {{relation_name}}" - relation_member: - as: "kot" relation: relation: "Relacija" relation_title: "Relacija: {{relation_name}}" diff --git a/config/locales/yo.yml b/config/locales/yo.yml index 9a0e7019e..cc08c3807 100644 --- a/config/locales/yo.yml +++ b/config/locales/yo.yml @@ -134,8 +134,6 @@ yo: relation_history: relation_history: "Relation History" relation_history_title: "Relation History: {{relation_name}}" - relation_member: - as: "as" relation: relation: "Relation" relation_title: "Relation: {{relation_name}}" diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index e13ebcbe9..be0c7bca6 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -132,8 +132,6 @@ zh-CN: relation_history: relation_history: "关系历史" relation_history_title: "关系历史: {{relation_name}}" - relation_member: - as: "as" relation: relation: "关系" relation_title: "关系: {{relation_name}}" diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 39f79a935..cbbbc6825 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -134,8 +134,6 @@ zh-TW: relation_history: relation_history: "關係歷史紀錄" relation_history_title: "關係歷史紀錄: {{relation_name}}" - relation_member: - as: "為" relation: relation: "關係" relation_title: "關係: {{relation_name}}" -- 2.39.5