[docs] initial support for article rating (#11033)

This commit is contained in:
Ivan Blinkov 2020-05-19 13:45:02 +03:00 committed by GitHub
parent a416813597
commit bc5f68f1ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 489 additions and 88 deletions

View File

@ -5,6 +5,7 @@
var selector = target.attr('href'); var selector = target.attr('href');
var is_tab = target.attr('role') === 'tab'; var is_tab = target.attr('role') === 'tab';
var is_collapse = target.attr('data-toggle') === 'collapse'; var is_collapse = target.attr('data-toggle') === 'collapse';
var is_rating = target.attr('role') === 'rating';
var navbar_toggle = $('#navbar-toggle'); var navbar_toggle = $('#navbar-toggle');
navbar_toggle.collapse('hide'); navbar_toggle.collapse('hide');
@ -14,7 +15,7 @@
selector = '#'; selector = '#';
} }
if (selector && selector.startsWith('#') && !is_tab && !is_collapse) { if (selector && selector.startsWith('#') && !is_tab && !is_collapse && !is_rating) {
event.preventDefault(); event.preventDefault();
var dst = window.location.href.replace(window.location.hash, ''); var dst = window.location.href.replace(window.location.hash, '');
var offset = 0; var offset = 0;

View File

@ -105,4 +105,64 @@ $(document).ready(function () {
debug: false debug: false
}); });
} }
var rating_stars = $('#rating-stars');
if (rating_stars.length) {
var key = '';
var stars_text = rating_stars.text().replace(/^\s+|\s+$/g, '');
var url_match = window.location.pathname.match(/^\/docs(?:\/v[0-9]+\.[0-9]+)?(?:\/[a-z]{2})(.*)/);
if (url_match && url_match.length > 1) {
key = url_match[1];
if (key.length > 2) {
key = key.replace(/^\/|\/$/g, '');
}
key = 'rating_' + key;
var local_stars = localStorage.getItem(key);
if (local_stars) {
stars_text = local_stars;
rating_stars.addClass('text-orange');
}
}
var titles = JSON.parse(rating_stars.attr('data-titles').replace(/'/g, '"'));
var documentation = rating_stars.attr('data-documentation');
var replacement = '';
for (var i = 0; i < 5; i++) {
var star = stars_text.charAt(i);
replacement += '<a href="#" title="' + titles[i] + ' ' + documentation +
'" data-toggle="tooltip" data-placement="bottom" role="rating" ' +
'class="rating-star text-reset text-decoration-none">' + star + '</a>';
}
rating_stars.html(replacement);
$('[data-toggle="tooltip"]').tooltip();
var rating_star_item = $('.rating-star');
rating_star_item.hover(function() {
var current = $(this);
current.text('★');
current.prevAll().text('★');
current.nextAll().text('☆');
});
rating_stars.mouseleave(function() {
for (var i = 0; i < 5; i++) {
rating_stars.children().eq(i).text(stars_text[i]);
}
});
rating_star_item.click(function(e) {
e.preventDefault();
rating_stars.addClass('text-orange');
stars_text = rating_stars.text();
localStorage.setItem(key, stars_text);
$.ajax({
url: window.location.pathname + 'rate/',
type: 'POST',
dataType: 'json',
data: {rating: $(this).prevAll().length + 1},
success: function () {
},
error: function () {
rating_stars.removeClass('text-orange');
localStorage.removeItem(key);
}
});
});
}
}); });

View File

@ -23,18 +23,17 @@ $(document).ready(function () {
}); });
if (valid) { if (valid) {
var data = JSON.stringify(serializeForm(meetup_form)); var data = JSON.stringify(serializeForm(meetup_form));
console.log(data);
$.ajax({ $.ajax({
url: '/meet-form/', url: '/meet-form/',
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
data: data, data: data,
success: function () { success: function () {
meetup_form.html('<div class="alert alert-success"><h2>Thanks!</h2><p class="lead">We\'ll be in touch soon.</p></div>') meetup_form.html('<div class="alert alert-success"><h2>Thanks!</h2><p class="lead">We\'ll be in touch soon.</p></div>');
$('#meetup-form-error').html(''); $('#meetup-form-error').html('');
}, },
error: function () { error: function () {
$('#meetup-form-error').html('<div class="alert alert-danger mt-3"><strong>Error!</strong> Unfortunately it didn\'t work for some reason, please try again or use the email address below.</div>') $('#meetup-form-error').html('<div class="alert alert-danger mt-3"><strong>Error!</strong> Unfortunately it didn\'t work for some reason, please try again or use the email address below.</div>');
} }
}); });
} }

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-08 17:57+0300\n" "POT-Creation-Date: 2020-05-19 11:11+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n" "Language: en\n"
@ -37,27 +37,27 @@ msgstr "ClickHouse - fast open-source OLAP DBMS"
msgid "ClickHouse DBMS" msgid "ClickHouse DBMS"
msgstr "ClickHouse DBMS" msgstr "ClickHouse DBMS"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "open-source" msgid "open-source"
msgstr "open-source" msgstr "open-source"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "relational" msgid "relational"
msgstr "relational" msgstr "relational"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytics" msgid "analytics"
msgstr "analytics" msgstr "analytics"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytical" msgid "analytical"
msgstr "analytical" msgstr "analytical"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "Big Data" msgid "Big Data"
msgstr "Big Data" msgstr "Big Data"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "web-analytics" msgid "web-analytics"
msgstr "web-analytics" msgstr "web-analytics"
@ -77,15 +77,51 @@ msgstr ""
msgid "Yandex LLC" msgid "Yandex LLC"
msgstr "Yandex LLC" msgstr "Yandex LLC"
#: templates/docs/footer.html:3
msgid "Rating"
msgstr "Rating"
#: templates/docs/footer.html:3
msgid "votes"
msgstr "votes"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:4
msgid "Article Rating"
msgstr "Article Rating"
#: templates/docs/footer.html:4
msgid "Was this content helpful?"
msgstr "Was this content helpful?"
#: templates/docs/footer.html:7
msgid "Unusable"
msgstr "Unusable"
#: templates/docs/footer.html:7
msgid "Poor"
msgstr "Poor"
#: templates/docs/footer.html:7
msgid "Good"
msgstr "Good"
#: templates/docs/footer.html:7
msgid "Excellent"
msgstr "Excellent"
#: templates/docs/footer.html:8
msgid "documentation"
msgstr "documentation"
#: templates/docs/footer.html:15
msgid "Built from" msgid "Built from"
msgstr "Built from" msgstr "Built from"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "published on" msgid "published on"
msgstr "published on" msgstr "published on"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "modified on" msgid "modified on"
msgstr "modified on" msgstr "modified on"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-08 17:57+0300\n" "POT-Creation-Date: 2020-05-19 11:11+0300\n"
"PO-Revision-Date: 2020-03-26 10:19+0300\n" "PO-Revision-Date: 2020-03-26 10:19+0300\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: es\n" "Language: es\n"
@ -36,27 +36,27 @@ msgstr "ClickHouse - DBMS OLAP de código abierto rápido"
msgid "ClickHouse DBMS" msgid "ClickHouse DBMS"
msgstr "Sistema abierto." msgstr "Sistema abierto."
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "open-source" msgid "open-source"
msgstr "de código abierto" msgstr "de código abierto"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "relational" msgid "relational"
msgstr "relacional" msgstr "relacional"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytics" msgid "analytics"
msgstr "analítica" msgstr "analítica"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytical" msgid "analytical"
msgstr "analítico" msgstr "analítico"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "Big Data" msgid "Big Data"
msgstr "Grandes Datos" msgstr "Grandes Datos"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "web-analytics" msgid "web-analytics"
msgstr "Sistema abierto." msgstr "Sistema abierto."
@ -76,15 +76,51 @@ msgstr ""
msgid "Yandex LLC" msgid "Yandex LLC"
msgstr "Sistema abierto." msgstr "Sistema abierto."
#: templates/docs/footer.html:3
msgid "Rating"
msgstr "Clasificación"
#: templates/docs/footer.html:3
msgid "votes"
msgstr "voto"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:4
msgid "Article Rating"
msgstr "Clasificación del artículo"
#: templates/docs/footer.html:4
msgid "Was this content helpful?"
msgstr "¿Este contenido fue útil?"
#: templates/docs/footer.html:7
msgid "Unusable"
msgstr "Inutilizable"
#: templates/docs/footer.html:7
msgid "Poor"
msgstr "Pobre"
#: templates/docs/footer.html:7
msgid "Good"
msgstr "Bien"
#: templates/docs/footer.html:7
msgid "Excellent"
msgstr "Excelente"
#: templates/docs/footer.html:8
msgid "documentation"
msgstr "documentación"
#: templates/docs/footer.html:15
msgid "Built from" msgid "Built from"
msgstr "Construido a partir de" msgstr "Construido a partir de"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "published on" msgid "published on"
msgstr "publicado en" msgstr "publicado en"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "modified on" msgid "modified on"
msgstr "modificado en" msgstr "modificado en"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-08 17:57+0300\n" "POT-Creation-Date: 2020-05-19 11:11+0300\n"
"PO-Revision-Date: 2020-03-26 10:19+0300\n" "PO-Revision-Date: 2020-03-26 10:19+0300\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: fa\n" "Language: fa\n"
@ -36,27 +36,27 @@ msgstr "ClickHouse - سریع باز-منبع OLAP DBMS"
msgid "ClickHouse DBMS" msgid "ClickHouse DBMS"
msgstr "خانه عروسکی" msgstr "خانه عروسکی"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "open-source" msgid "open-source"
msgstr "متن باز" msgstr "متن باز"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "relational" msgid "relational"
msgstr "رابطه" msgstr "رابطه"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytics" msgid "analytics"
msgstr "تجزیه و تحلیل" msgstr "تجزیه و تحلیل"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytical" msgid "analytical"
msgstr "تحلیلی" msgstr "تحلیلی"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "Big Data" msgid "Big Data"
msgstr "داده های بزرگ" msgstr "داده های بزرگ"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "web-analytics" msgid "web-analytics"
msgstr "تجزیه و تحلیل وب سایت" msgstr "تجزیه و تحلیل وب سایت"
@ -76,15 +76,51 @@ msgstr ""
msgid "Yandex LLC" msgid "Yandex LLC"
msgstr "Yandex, LLC" msgstr "Yandex, LLC"
#: templates/docs/footer.html:3
msgid "Rating"
msgstr "درجهبندی"
#: templates/docs/footer.html:3
msgid "votes"
msgstr "رای"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:4
msgid "Article Rating"
msgstr "رتبه مقاله"
#: templates/docs/footer.html:4
msgid "Was this content helpful?"
msgstr "این مطالب مفید بود?"
#: templates/docs/footer.html:7
msgid "Unusable"
msgstr "غیرقابل استفاده"
#: templates/docs/footer.html:7
msgid "Poor"
msgstr "فقیر"
#: templates/docs/footer.html:7
msgid "Good"
msgstr "خوبه"
#: templates/docs/footer.html:7
msgid "Excellent"
msgstr "عالیه"
#: templates/docs/footer.html:8
msgid "documentation"
msgstr "مستندات"
#: templates/docs/footer.html:15
msgid "Built from" msgid "Built from"
msgstr "ساخته شده از" msgstr "ساخته شده از"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "published on" msgid "published on"
msgstr "منتشر شده در" msgstr "منتشر شده در"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "modified on" msgid "modified on"
msgstr "تغییریافته" msgstr "تغییریافته"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-08 17:57+0300\n" "POT-Creation-Date: 2020-05-19 11:11+0300\n"
"PO-Revision-Date: 2020-03-30 15:12+0300\n" "PO-Revision-Date: 2020-03-30 15:12+0300\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: fr\n" "Language: fr\n"
@ -36,27 +36,27 @@ msgstr "ClickHouse-SGBD OLAP open-source rapide"
msgid "ClickHouse DBMS" msgid "ClickHouse DBMS"
msgstr "SGBD ClickHouse" msgstr "SGBD ClickHouse"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "open-source" msgid "open-source"
msgstr "open-source" msgstr "open-source"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "relational" msgid "relational"
msgstr "relationnel" msgstr "relationnel"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytics" msgid "analytics"
msgstr "Analytics" msgstr "Analytics"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytical" msgid "analytical"
msgstr "analytique" msgstr "analytique"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "Big Data" msgid "Big Data"
msgstr "Big Data" msgstr "Big Data"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "web-analytics" msgid "web-analytics"
msgstr "web-analytics" msgstr "web-analytics"
@ -76,15 +76,51 @@ msgstr ""
msgid "Yandex LLC" msgid "Yandex LLC"
msgstr "Yandex LLC" msgstr "Yandex LLC"
#: templates/docs/footer.html:3
msgid "Rating"
msgstr "Évaluation"
#: templates/docs/footer.html:3
msgid "votes"
msgstr "vote"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:4
msgid "Article Rating"
msgstr "L'Article De Notation"
#: templates/docs/footer.html:4
msgid "Was this content helpful?"
msgstr "Ce contenu a été utile?"
#: templates/docs/footer.html:7
msgid "Unusable"
msgstr "Inutilisable"
#: templates/docs/footer.html:7
msgid "Poor"
msgstr "Pauvre"
#: templates/docs/footer.html:7
msgid "Good"
msgstr "Bien"
#: templates/docs/footer.html:7
msgid "Excellent"
msgstr "Excellent"
#: templates/docs/footer.html:8
msgid "documentation"
msgstr "documentation"
#: templates/docs/footer.html:15
msgid "Built from" msgid "Built from"
msgstr "Construit à partir de" msgstr "Construit à partir de"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "published on" msgid "published on"
msgstr "publié le" msgstr "publié le"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "modified on" msgid "modified on"
msgstr "modifié sur" msgstr "modifié sur"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-08 17:57+0300\n" "POT-Creation-Date: 2020-05-19 11:11+0300\n"
"PO-Revision-Date: 2020-03-26 10:19+0300\n" "PO-Revision-Date: 2020-03-26 10:19+0300\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: ja\n" "Language: ja\n"
@ -33,27 +33,27 @@ msgstr "ツ環板篠ョツ嘉ッツ偲青エツδツ-ツエツスツ-ツシツ"
msgid "ClickHouse DBMS" msgid "ClickHouse DBMS"
msgstr "クリックハウスDBMS" msgstr "クリックハウスDBMS"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "open-source" msgid "open-source"
msgstr "オープンソース" msgstr "オープンソース"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "relational" msgid "relational"
msgstr "関係" msgstr "関係"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytics" msgid "analytics"
msgstr "analytics" msgstr "analytics"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytical" msgid "analytical"
msgstr "分析" msgstr "分析"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "Big Data" msgid "Big Data"
msgstr "ビッグデータ" msgstr "ビッグデータ"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "web-analytics" msgid "web-analytics"
msgstr "ウェブ分析" msgstr "ウェブ分析"
@ -71,15 +71,51 @@ msgstr "ソフトウェアは、明示または黙示を問わず、いかなる
msgid "Yandex LLC" msgid "Yandex LLC"
msgstr "Yandex LLC" msgstr "Yandex LLC"
#: templates/docs/footer.html:3
msgid "Rating"
msgstr "評価"
#: templates/docs/footer.html:3
msgid "votes"
msgstr "投票"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:4
msgid "Article Rating"
msgstr "記事の評価"
#: templates/docs/footer.html:4
msgid "Was this content helpful?"
msgstr "この内容は有用だったか。"
#: templates/docs/footer.html:7
msgid "Unusable"
msgstr "使用不可"
#: templates/docs/footer.html:7
msgid "Poor"
msgstr "貧しい"
#: templates/docs/footer.html:7
msgid "Good"
msgstr "よし"
#: templates/docs/footer.html:7
msgid "Excellent"
msgstr "優れた"
#: templates/docs/footer.html:8
msgid "documentation"
msgstr "文書"
#: templates/docs/footer.html:15
msgid "Built from" msgid "Built from"
msgstr "から構築" msgstr "から構築"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "published on" msgid "published on"
msgstr "掲載され" msgstr "掲載され"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "modified on" msgid "modified on"
msgstr "に変更" msgstr "に変更"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-08 17:57+0300\n" "POT-Creation-Date: 2020-05-19 11:11+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -32,27 +32,27 @@ msgstr ""
msgid "ClickHouse DBMS" msgid "ClickHouse DBMS"
msgstr "" msgstr ""
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "open-source" msgid "open-source"
msgstr "" msgstr ""
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "relational" msgid "relational"
msgstr "" msgstr ""
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytics" msgid "analytics"
msgstr "" msgstr ""
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytical" msgid "analytical"
msgstr "" msgstr ""
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "Big Data" msgid "Big Data"
msgstr "" msgstr ""
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "web-analytics" msgid "web-analytics"
msgstr "" msgstr ""
@ -70,15 +70,51 @@ msgstr ""
msgid "Yandex LLC" msgid "Yandex LLC"
msgstr "" msgstr ""
#: templates/docs/footer.html:3
msgid "Rating"
msgstr ""
#: templates/docs/footer.html:3
msgid "votes"
msgstr ""
#: templates/docs/footer.html:4 #: templates/docs/footer.html:4
msgid "Article Rating"
msgstr ""
#: templates/docs/footer.html:4
msgid "Was this content helpful?"
msgstr ""
#: templates/docs/footer.html:7
msgid "Unusable"
msgstr ""
#: templates/docs/footer.html:7
msgid "Poor"
msgstr ""
#: templates/docs/footer.html:7
msgid "Good"
msgstr ""
#: templates/docs/footer.html:7
msgid "Excellent"
msgstr ""
#: templates/docs/footer.html:8
msgid "documentation"
msgstr ""
#: templates/docs/footer.html:15
msgid "Built from" msgid "Built from"
msgstr "" msgstr ""
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "published on" msgid "published on"
msgstr "" msgstr ""
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "modified on" msgid "modified on"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-08 17:57+0300\n" "POT-Creation-Date: 2020-05-19 11:11+0300\n"
"PO-Revision-Date: 2020-03-26 10:19+0300\n" "PO-Revision-Date: 2020-03-26 10:19+0300\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: ru\n" "Language: ru\n"
@ -38,27 +38,27 @@ msgstr "ClickHouse-быстрая СУБД OLAP с открытым исходн
msgid "ClickHouse DBMS" msgid "ClickHouse DBMS"
msgstr "СУБД ClickHouse" msgstr "СУБД ClickHouse"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "open-source" msgid "open-source"
msgstr "открытый исходный код" msgstr "открытый исходный код"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "relational" msgid "relational"
msgstr "реляционный" msgstr "реляционный"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytics" msgid "analytics"
msgstr "аналитика" msgstr "аналитика"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytical" msgid "analytical"
msgstr "аналитический" msgstr "аналитический"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "Big Data" msgid "Big Data"
msgstr "большие данные" msgstr "большие данные"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "web-analytics" msgid "web-analytics"
msgstr "веб-аналитика" msgstr "веб-аналитика"
@ -78,15 +78,51 @@ msgstr ""
msgid "Yandex LLC" msgid "Yandex LLC"
msgstr "ООО «Яндекс»" msgstr "ООО «Яндекс»"
#: templates/docs/footer.html:3
msgid "Rating"
msgstr "Рейтинг"
#: templates/docs/footer.html:3
msgid "votes"
msgstr "голоса"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:4
msgid "Article Rating"
msgstr "Рейтинг Статей"
#: templates/docs/footer.html:4
msgid "Was this content helpful?"
msgstr "Был ли этот контент полезным?"
#: templates/docs/footer.html:7
msgid "Unusable"
msgstr "Непригодная"
#: templates/docs/footer.html:7
msgid "Poor"
msgstr "Плохая"
#: templates/docs/footer.html:7
msgid "Good"
msgstr "Хорошая"
#: templates/docs/footer.html:7
msgid "Excellent"
msgstr "Отличная"
#: templates/docs/footer.html:8
msgid "documentation"
msgstr "документация"
#: templates/docs/footer.html:15
msgid "Built from" msgid "Built from"
msgstr "Собрано из" msgstr "Собрано из"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "published on" msgid "published on"
msgstr "опубликовано" msgstr "опубликовано"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "modified on" msgid "modified on"
msgstr "изменено" msgstr "изменено"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-08 17:57+0300\n" "POT-Creation-Date: 2020-05-19 11:11+0300\n"
"PO-Revision-Date: 2020-04-15 13:17+0000\n" "PO-Revision-Date: 2020-04-15 13:17+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: tr\n" "Language: tr\n"
@ -36,27 +36,27 @@ msgstr "ClickHouse - hızlıık kaynak OLAP DBMS"
msgid "ClickHouse DBMS" msgid "ClickHouse DBMS"
msgstr "ClickHouse DBMS" msgstr "ClickHouse DBMS"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "open-source" msgid "open-source"
msgstr "açık kaynak" msgstr "açık kaynak"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "relational" msgid "relational"
msgstr "ilişkisel" msgstr "ilişkisel"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytics" msgid "analytics"
msgstr "analiz" msgstr "analiz"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytical" msgid "analytical"
msgstr "analitik" msgstr "analitik"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "Big Data" msgid "Big Data"
msgstr "Büyük Veri" msgstr "Büyük Veri"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "web-analytics" msgid "web-analytics"
msgstr "web-analyt -ics" msgstr "web-analyt -ics"
@ -76,15 +76,51 @@ msgstr ""
msgid "Yandex LLC" msgid "Yandex LLC"
msgstr "Yandex LLC" msgstr "Yandex LLC"
#: templates/docs/footer.html:3
msgid "Rating"
msgstr "Verim"
#: templates/docs/footer.html:3
msgid "votes"
msgstr "oylar"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:4
msgid "Article Rating"
msgstr "Makale Değerlendirme"
#: templates/docs/footer.html:4
msgid "Was this content helpful?"
msgstr "Bu içerik yararlı mıydı?"
#: templates/docs/footer.html:7
msgid "Unusable"
msgstr "Kullanışsız"
#: templates/docs/footer.html:7
msgid "Poor"
msgstr "Zavallı"
#: templates/docs/footer.html:7
msgid "Good"
msgstr "İyi"
#: templates/docs/footer.html:7
msgid "Excellent"
msgstr "Mükemmel"
#: templates/docs/footer.html:8
msgid "documentation"
msgstr "belge"
#: templates/docs/footer.html:15
msgid "Built from" msgid "Built from"
msgstr "Dahili" msgstr "Dahili"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "published on" msgid "published on"
msgstr "yayınlanan" msgstr "yayınlanan"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "modified on" msgid "modified on"
msgstr "modifiye on" msgstr "modifiye on"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2020-05-08 17:57+0300\n" "POT-Creation-Date: 2020-05-19 11:11+0300\n"
"PO-Revision-Date: 2020-03-26 10:19+0300\n" "PO-Revision-Date: 2020-03-26 10:19+0300\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh\n" "Language: zh\n"
@ -33,27 +33,27 @@ msgstr "ツ暗ェツ氾环催ツ団ツ法ツ人"
msgid "ClickHouse DBMS" msgid "ClickHouse DBMS"
msgstr "ツ环板msョツ嘉ッツ偲" msgstr "ツ环板msョツ嘉ッツ偲"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "open-source" msgid "open-source"
msgstr "开源" msgstr "开源"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "relational" msgid "relational"
msgstr "关系" msgstr "关系"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytics" msgid "analytics"
msgstr "分析" msgstr "分析"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "analytical" msgid "analytical"
msgstr "分析" msgstr "分析"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "Big Data" msgid "Big Data"
msgstr "大数据" msgstr "大数据"
#: templates/common_meta.html:21 #: templates/common_meta.html:24
msgid "web-analytics" msgid "web-analytics"
msgstr "网络分析" msgstr "网络分析"
@ -71,15 +71,51 @@ msgstr "软件按\"原样\"分发,不附带任何明示或暗示的担保或
msgid "Yandex LLC" msgid "Yandex LLC"
msgstr "Yandex LLC" msgstr "Yandex LLC"
#: templates/docs/footer.html:3
msgid "Rating"
msgstr "评分"
#: templates/docs/footer.html:3
msgid "votes"
msgstr "所得票数"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:4
msgid "Article Rating"
msgstr "文章评级"
#: templates/docs/footer.html:4
msgid "Was this content helpful?"
msgstr "这个内容有帮助?"
#: templates/docs/footer.html:7
msgid "Unusable"
msgstr "无法使用"
#: templates/docs/footer.html:7
msgid "Poor"
msgstr "差"
#: templates/docs/footer.html:7
msgid "Good"
msgstr "很好"
#: templates/docs/footer.html:7
msgid "Excellent"
msgstr "善乎哉!"
#: templates/docs/footer.html:8
msgid "documentation"
msgstr "文件"
#: templates/docs/footer.html:15
msgid "Built from" msgid "Built from"
msgstr "建于" msgstr "建于"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "published on" msgid "published on"
msgstr "发表于" msgstr "发表于"
#: templates/docs/footer.html:4 #: templates/docs/footer.html:15
msgid "modified on" msgid "modified on"
msgstr "修改于" msgstr "修改于"

View File

@ -24,6 +24,7 @@
{% else %} {% else %}
{% set title = config.site_name %} {% set title = config.site_name %}
{% endif %} {% endif %}
{% set title = title.strip() %}
{% if page and page.content and not single_page %} {% if page and page.content and not single_page %}
{% set description = page.content|striptags %} {% set description = page.content|striptags %}
{% set description = description.replace('¶','')[0:120] %} {% set description = description.replace('¶','')[0:120] %}

View File

@ -1,4 +1,15 @@
{% if not single_page %} {% if not single_page %}
<div class="alert alert-light">
<p class="float-right mb-0">{{ _('Rating') }}: RATING_VALUE - RATING_COUNT {{ _('votes') }}</p>
<h4 class="alert-heading">{% if is_amp %}{{ _('Article Rating') }}{% else %}{{ _('Was this content helpful?') }}{% endif %}</h4>
<div id="rating-stars" class="display-6 mb-0"
{% if not is_amp %}
data-titles="['{{ _('Unusable') }}', '{{ _('Poor') }}', 'OK', '{{ _('Good') }}', '{{ _('Excellent') }}']"
data-documentation="{{ _('documentation') }}"
{% endif %}
>RATING_STARS</div>
</div>
<div id="content-footer" class="text-muted pt-5 mb-5"> <div id="content-footer" class="text-muted pt-5 mb-5">
<div class="float-md-right">{{ config.copyright }}</div> <div class="float-md-right">{{ config.copyright }}</div>
<div>{{ _('Built from') }} <a href="{{ config.extra.rev_url }}" rel="external nofollow noreferrer" target="_blank" class="text-reset">{{ config.extra.rev_short }}</a>{% if page and page.meta %}{% if page.meta.published_date %}, {{ _('published on') }} <span title="{{ page.meta.published_date.isoformat() }}">{{ page.meta.published_date.date().isoformat() }}</span>{% endif %}{% if page.meta.modified_date %}, {{ _('modified on') }} <span title="{{ page.meta.modified_date.isoformat() }}">{{ page.meta.modified_date.date().isoformat() }}</span>{% endif %} <div>{{ _('Built from') }} <a href="{{ config.extra.rev_url }}" rel="external nofollow noreferrer" target="_blank" class="text-reset">{{ config.extra.rev_short }}</a>{% if page and page.meta %}{% if page.meta.published_date %}, {{ _('published on') }} <span title="{{ page.meta.published_date.isoformat() }}">{{ page.meta.published_date.date().isoformat() }}</span>{% endif %}{% if page.meta.modified_date %}, {{ _('modified on') }} <span title="{{ page.meta.modified_date.isoformat() }}">{{ page.meta.modified_date.date().isoformat() }}</span>{% endif %}

View File

@ -1,5 +1,5 @@
{% if page and page.meta %} {% if page and page.meta %}
<script type="application/ld+json">{ <script type="application/ld+json">[{
"@context": "http://schema.org", "@context": "http://schema.org",
"@type": "TechArticle", "@type": "TechArticle",
"headline": "{{ title }}", "headline": "{{ title }}",
@ -20,6 +20,11 @@
"width": 163, "width": 163,
"height": 60 "height": 60
} }
} }, {
}</script> "@context": "http://schema.org",
"@type": "Episode",
"name": "{{ title }}",
"ratingValue": RATING_VALUE,
"ratingCount": RATING_COUNT
}]</script>
{% endif %} {% endif %}