From 9101705656a1967ecdfa62cf8f5777f5d190f361 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 15 Feb 2023 16:47:02 +0000 Subject: [PATCH] Remove html from translations for the welcome page This also refactors the "any questions" section, which is shared with the fixthemap page. --- app/views/site/_any_questions.html.erb | 4 ++ app/views/site/fixthemap.html.erb | 6 +-- app/views/site/welcome.html.erb | 28 +++++------ config/locales/en.yml | 66 +++++++++++++++----------- 4 files changed, 57 insertions(+), 47 deletions(-) create mode 100644 app/views/site/_any_questions.html.erb diff --git a/app/views/site/_any_questions.html.erb b/app/views/site/_any_questions.html.erb new file mode 100644 index 000000000..b330d8035 --- /dev/null +++ b/app/views/site/_any_questions.html.erb @@ -0,0 +1,4 @@ +

<%= t ".title" %>

+ +

<%= t ".paragraph_1_html", :help_link => link_to(t(".get_help_here"), help_path), + :welcome_mat_link => link_to(t(".welcome_mat"), t(".welcome_mat_url")) %>

diff --git a/app/views/site/fixthemap.html.erb b/app/views/site/fixthemap.html.erb index 70118b980..fe6cf22c5 100644 --- a/app/views/site/fixthemap.html.erb +++ b/app/views/site/fixthemap.html.erb @@ -21,7 +21,7 @@
<%= t "site.welcome.add_a_note.title" %>
-

<%= t "site.welcome.add_a_note.paragraph_1_html" %>

+

<%= t "site.welcome.add_a_note.para_1" %>

<%= t ".how_to_help.add_a_note.instructions_html", :map_url => root_path %>

@@ -29,6 +29,4 @@

<%= t ".other_concerns.title" %>

<%= t ".other_concerns.explanation_html" %>

-

<%= t "site.welcome.questions.title" %>

- -

<%= t "site.welcome.questions.paragraph_1_html", :help_url => help_path %>

+<%= render "any_questions" %> diff --git a/app/views/site/welcome.html.erb b/app/views/site/welcome.html.erb index 7c1ee38ab..b05620f59 100644 --- a/app/views/site/welcome.html.erb +++ b/app/views/site/welcome.html.erb @@ -6,7 +6,7 @@

<%= t ".title" %>

<% end %> -

<%= t ".introduction_html" %>

+

<%= t ".introduction" %>

<%= t ".whats_on_the_map.title" %>

@@ -15,49 +15,48 @@
-

<%= t ".whats_on_the_map.on_html" %>

+

<%= t ".whats_on_the_map.on_the_map_html", :real_and_current => tag.em(t(".whats_on_the_map.real_and_current")) %>

-

<%= t ".whats_on_the_map.off_html" %>

+

<%= t ".whats_on_the_map.off_the_map_html", :doesnt => tag.em(t(".whats_on_the_map.doesnt")) %>

<%= t ".basic_terms.title" %>

-

<%= t ".basic_terms.paragraph_1_html" %>

+

<%= t ".basic_terms.paragraph_1" %>

-

<%= t ".basic_terms.editor_html" %>

+

<%= t ".basic_terms.an_editor_html", :editor => tag.strong(t(".basic_terms.editor")) %>

-

<%= t ".basic_terms.node_html" %>

+

<%= t ".basic_terms.a_node_html", :node => tag.strong(t(".basic_terms.node")) %>

-

<%= t ".basic_terms.way_html" %>

+

<%= t ".basic_terms.a_way_html", :way => tag.strong(t(".basic_terms.way")) %>

-

<%= t ".basic_terms.tag_html" %>

+

<%= t ".basic_terms.a_tag_html", :tag => tag.strong(t(".basic_terms.tag")) %>

<%= t ".rules.title" %>

-

<%= t ".rules.paragraph_1_html" %>

+

<%= t ".rules.para_1_html", :imports_link => link_to(t(".rules.imports"), t(".rules.imports_url")), + :automated_edits_link => link_to(t(".rules.automated_edits"), t(".rules.automated_edits_url")) %>

-

<%= t ".questions.title" %>

- -

<%= t ".questions.paragraph_1_html", :help_url => help_path %>

+ <%= render "any_questions" %>
@@ -66,6 +65,7 @@

<%= t ".add_a_note.title" %>

-

<%= t ".add_a_note.paragraph_1_html" %>

-

<%= t ".add_a_note.paragraph_2_html", :map_url => root_path %>

+

<%= t ".add_a_note.para_1" %>

+

<%= t ".add_a_note.para_2_html", :map_link => link_to(t(".add_a_note.the_map"), root_path), + :note_icon => tag.span(:class => "icon note") %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 025f24fb0..f78d447cf 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2160,6 +2160,15 @@ en: removed: Your default OpenStreetMap editor is set as Potlatch. Because Adobe Flash Player has been withdrawn, Potlatch is no longer available to use in a web browser. desktop_html: You can still use Potlatch by downloading the desktop application for Mac and Windows. id_html: Alternatively, you can set your default editor to iD, which runs in your web browser as Potlatch formerly did. Change your preferences here. + any_questions: + title: Any questions? + paragraph_1_html: | + OpenStreetMap has several resources for learning about the project, asking and answering + questions, and collaboratively discussing and documenting mapping topics. + %{help_link}. With an organization making plans for OpenStreetMap? %{welcome_mat_link}. + get_help_here: Get help here + welcome_mat: Check out the Welcome Mat + welcome_mat_url: https://welcome.openstreetmap.org/ sidebar: search_results: Search Results close: Close @@ -2246,57 +2255,56 @@ en: toilets: "Toilets" welcome: title: Welcome! - introduction_html: | + introduction: | Welcome to OpenStreetMap, the free and editable map of the world. Now that you're signed up, you're all set to get started mapping. Here's a quick guide with the most important things you need to know. whats_on_the_map: title: What's on the Map - on_html: | - OpenStreetMap is a place for mapping things that are both real and current - + on_the_map_html: | + OpenStreetMap is a place for mapping things that are both %{real_and_current} - it includes millions of buildings, roads, and other details about places. You can map whatever real-world features are interesting to you. - off_html: | - What it doesn't include is opinionated data like ratings, historical or + real_and_current: real and current + off_the_map_html: | + What it %{doesnt} include is opinionated data like ratings, historical or hypothetical features, and data from copyrighted sources. Unless you have special permission, don't copy from online or paper maps. + doesnt: doesn't basic_terms: title: Basic Terms For Mapping - paragraph_1_html: | + paragraph_1: | OpenStreetMap has some of its own lingo. Here are a few key words that'll come in handy. - editor_html: | - An editor is a program or website you can use to edit the map. - node_html: | - A node is a point on the map, like a single restaurant or a tree. - way_html: | - A way is a line or area, like a road, stream, lake or building. - tag_html: | - A tag is a bit of data about a node or way, like a - restaurant's name or a road's speed limit. + an_editor_html: An %{editor} is a program or website you can use to edit the map. + a_node_html: A %{node} is a point on the map, like a single restaurant or a tree. + a_way_html: A %{way} is a line or area, like a road, stream, lake or building. + a_tag_html: A %{tag} is a bit of data about a node or way, like a restaurant's name or a road's speed limit. + editor: editor + node: node + way: way + tag: tag rules: title: Rules! - paragraph_1_html: | + para_1_html: | OpenStreetMap has few formal rules but we expect all participants to collaborate with, and communicate with, the community. If you are considering any activities other than editing by hand, please read and follow the guidelines on - Imports and - Automated Edits. - questions: - title: Any questions? - paragraph_1_html: | - OpenStreetMap has several resources for learning about the project, asking and answering - questions, and collaboratively discussing and documenting mapping topics. - Get help here. With an organization making plans for OpenStreetMap? Check out the Welcome Mat. + %{imports_link} and %{automated_edits_link}. + imports: Imports + imports_url: https://wiki.openstreetmap.org/wiki/Import/Guidelines + automated_edits: Automated Edits + automated_edits_url: https://wiki.openstreetmap.org/wiki/Automated_Edits_code_of_conduct start_mapping: Start Mapping add_a_note: title: No Time To Edit? Add a Note! - paragraph_1_html: | + para_1: | If you just want something small fixed and don't have the time to sign up and learn how to edit, it's easy to add a note. - paragraph_2_html: | - Just go to the map and click the note icon: - . This will add a marker to the map, which you can move - by dragging. Add your message, then click save, and other mappers will investigate. + para_2_html: | + Just go to %{map_link} and click the note icon: %{note_icon}. + This will add a marker to the map, which you can move by dragging. + Add your message, then click save, and other mappers will investigate. + the_map: the map communities: title: Communities lede_text: | -- 2.39.5