Repository: getnikola/nikola

Issue:
CATEGORY_PAGES_DESCRIPTIONS is hierarchical, but CATEGORY_PAGES_TITLES is not
In a fresh site, I modified `conf.py` like this:

```
CATEGORY_ALLOW_HIERARCHIES = True
#...
# Set descriptions for category pages to make them more interesting. The
# default is no description. The value is used in the meta description
# and displayed underneath the category list or index page’s title.
CATEGORY_PAGES_DESCRIPTIONS = {
   DEFAULT_LANG: {
       "blogging": "Meta-blog posts about blogging about blogging.",
       "open source": "My contributions to my many, varied, ever-changing, and eternal libre software projects.",
       "open source/nikola" : "My contributions to Nikola"
   },
}

# Set special titles for category pages. The default is "Posts about CATEGORY".
CATEGORY_PAGES_TITLES = {
   DEFAULT_LANG: {
       "blogging": "Meta-posts about blogging",
       "open source": "Posts about open source software",
       "open source/nikola" : "Nikola posts",
       "nikola" : "Famous Nikolas"
   },
}
```

After building The category page for `open source/nikola` has the description "My contributions to Nikola" and title  "Famous Nikolas".

[niktest.zip](https://github.com/getnikola/nikola/files/337029/niktest.zip)



Discussion:

Resolving patch:
diff --git a/nikola/plugins/task/tags.py b/nikola/plugins/task/tags.py
--- a/nikola/plugins/task/tags.py
+++ b/nikola/plugins/task/tags.py
@@ -253,9 +253,9 @@ def _get_title(self, tag, is_category):
         else:
             return tag
 
-    def _get_indexes_title(self, tag, is_category, lang, messages):
+    def _get_indexes_title(self, tag, nice_tag, is_category, lang, messages):
         titles = self.site.config['CATEGORY_PAGES_TITLES'] if is_category else self.site.config['TAG_PAGES_TITLES']
-        return titles[lang][tag] if lang in titles and tag in titles[lang] else messages[lang]["Posts about %s"] % tag
+        return titles[lang][tag] if lang in titles and tag in titles[lang] else messages[lang]["Posts about %s"] % nice_tag
 
     def _get_description(self, tag, is_category, lang):
         descriptions = self.site.config['CATEGORY_PAGES_DESCRIPTIONS'] if is_category else self.site.config['TAG_PAGES_DESCRIPTIONS']
@@ -290,7 +290,7 @@ def page_path(i, displayed_i, num_pages, force_addition, extension=None):
             context_source["category"] = tag
             context_source["category_path"] = self.site.parse_category_name(tag)
         context_source["tag"] = title
-        indexes_title = self._get_indexes_title(title, is_category, lang, kw["messages"])
+        indexes_title = self._get_indexes_title(tag, title, is_category, lang, kw["messages"])
         context_source["description"] = self._get_description(tag, is_category, lang)
         if is_category:
             context_source["subcategories"] = self._get_subcategories(tag)
@@ -312,7 +312,7 @@ def tag_page_as_list(self, tag, lang, post_list, kw, is_category):
             context["category"] = tag
             context["category_path"] = self.site.parse_category_name(tag)
         context["tag"] = title
-        context["title"] = self._get_indexes_title(title, is_category, lang, kw["messages"])
+        context["title"] = self._get_indexes_title(tag, title, is_category, lang, kw["messages"])
         context["posts"] = post_list
         context["permalink"] = self.site.link(kind, tag, lang)
         context["kind"] = kind


Test patch: