Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: includes/meta/standard.tmpl

Issue 29630648: Issue 6013 - Add site name to document title in website-defaults standard metadata (Closed) Base URL: https://hg.adblockplus.org/website-defaults
Patch Set: Remove translation on get_string Created Dec. 11, 2017, 3:34 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pages/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: includes/meta/standard.tmpl
===================================================================
--- a/includes/meta/standard.tmpl
+++ b/includes/meta/standard.tmpl
@@ -1,14 +1,24 @@
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
-{% if title_exclude_sitename or not has_string("name", "site") %}
-<title>{{ title | translate("page-title", "Page title") }}</title>
-{% else %}
-<title>{{ title | translate("page-title", "Page title") }} | {{ get_string("name", "site") }}</title>
+{% if title_suffix == 'none' or (not title_suffix and not has_string("name", "site")) %}
juliandoucette 2017/12/12 16:52:45 suggest: <title> {{ title | translate("title",
ire 2017/12/12 18:37:13 Ack. I'm assuming you removed the `title_suffix ==
+<title>
juliandoucette 2017/12/12 16:38:32 There is no reason to repeat the opening and closi
ire 2017/12/12 18:37:13 Acknowledged. I did it this way because I think it
+ {{ title | translate("page-title", "Page title") }}
+</title>
+{% elif title_suffix %}
+<title>
+ {{ title | translate("page-title", "Page title") }} |
+ {{ title_suffix | translate("custom-page-title-suffix", "Page title suffix") }}
+</title>
+{% elif has_string("name", "site") %}
+<title>
+ {{ title | translate("page-title", "Page title") }} |
+ {{ get_string("name", "site") }}
+</title>
{% endif %}
{% if description %}
<meta name="description" content="{{ description | translate("page-description", "Page description") }}">
{% endif %}
<link rel="canonical" href="{{ get_canonical_url(page) }}">
« no previous file with comments | « no previous file | pages/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld