_includes/feedback-box.html in wai-website-theme-1.2 vs _includes/feedback-box.html in wai-website-theme-1.3

- old
+ new

@@ -1,13 +1,14 @@ {%- if page.collection -%}{%- assign col = site.collections | where: "label", page.collection | first -%}{%- endif- %} -{%- assign helptitle = "Help improve this page" -%} +{%- capture helptitle -%}{% include t.html t="Help improve this page" %}{%- endcapture -%} {%- if page.feedbackmail -%} {%- assign feedbackmail = page.feedbackmail -%} {%- else -%} {%- assign feedbackmail = "wai-eo-editors@w3.org" -%} {%- endif -%} -{%- capture helpdesc -%}Please share your ideas, suggestions, or comments via e-mail to the publicly-archived list [{{feedbackmail}}](mailto:{{feedbackmail}}?subject=%s) or via GitHub.{%- endcapture -%} +{% assign reppattern = "$1|" | append: feedbackmail%} +{%- capture helpdesc -%}{% include t.html t="Please share your ideas, suggestions, or comments via e-mail to the publicly-archived list [$1](mailto:$1?subject=%s) or via GitHub." replace=reppattern %}{%- endcapture -%} {%- unless page.github.hide -%} {%- if page.github.repository -%}{%- assign repo = page.github.repository -%}{%endif%} {%- if site.repository -%} @@ -40,23 +41,25 @@ {%- if page.github.path -%} {%- assign path = page.github.path -%} {%- endif- %} {%- include box.html type="start" title=helptitle h=2 class="icon space-above" icon="comments" id="helpimprove" -%} -{%- assign url_title = page.title | uri_escape -%} +{%- if page.lang -%} + {%- assign url_title = "[" | append: page.lang | append: "] " | append: page.title | uri_escape -%} +{%- else -%} + {%- assign url_title = page.title | uri_escape -%} +{%- endif -%} {% unless feedbackmail == "wai@w3.org" %} -{%- capture mailbody -%}[put comment here...]{%- endcapture -%} +{%- capture mailbody -%}{% include t.html t="[put comment here...]" %}{%- endcapture -%} {% else %} -{%- capture mailbody -%}[put comment here...] - -I give permission to share this to a publicly-archived e-mail list.{%- endcapture -%} +{%- capture mailbody -%}{% include t.html t="[put comment here...]\n\nI give permission to share this to a publicly-archived e-mail list." %}"}{%- endcapture -%} {% endunless %} {%- assign mailbody = mailbody | uri_escape -%} {{- helpdesc | replace: "%s", url_title | markdownify -}} <div class="button-group"> - <a href="{{ "mailto:" | append: feedbackmail | append: "?subject=%s" | replace: "%s", url_title | append: "&body=" | append: mailbody }}" class="button"><span>E-mail</span></a> - <a href="https://github.com/{{repo}}/edit/{{branch}}/{{path}}" class="button"><span>Fork &amp; Edit on GitHub</span></a> + <a href="{{ "mailto:" | append: feedbackmail | append: "?subject=%s" | replace: "%s", url_title | append: "&body=" | append: mailbody }}" class="button"><span>{% include t.html t="E-mail" %}</span></a> + <a href="https://github.com/{{repo}}/edit/{{branch}}/{{path}}" class="button"><span>{% include t.html t="Fork &amp; Edit on GitHub" %}</span></a> {%- comment -%}<a href="https://github.com/{{repo}}/issues" class="button"><span>List of GitHub Issues</span></a>{%- endcomment -%} - <a href="https://github.com/{{repo}}/issues/new" class="button"><span>New GitHub Issue</span></a> + <a href="https://github.com/{{repo}}/issues/new{%- unless page.lang == 'en' -%}?title={{ "[" | append: page.lang | append: "] " | uri_escape }}{%- endunless -%}" class="button"><span>{% include t.html t="New GitHub Issue" %}</span></a> </div> {%- include box.html type="end" -%} {%- endunless -%} \ No newline at end of file