polish(v2): Add more tags translations (#4275)

* Add blog tags translations

* Improve Ru translation

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
This commit is contained in:
Sébastien Lorber 2021-02-23 16:44:14 +01:00 committed by GitHub
parent 0e1d1ce310
commit 2788efc799
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 30 additions and 8 deletions

View file

@ -10,7 +10,9 @@
"theme.blog.post.paginator.newerPost": "Newer Post", "theme.blog.post.paginator.newerPost": "Newer Post",
"theme.blog.post.paginator.olderPost": "Older Post", "theme.blog.post.paginator.olderPost": "Older Post",
"theme.blog.post.readMore": "Read More", "theme.blog.post.readMore": "Read More",
"theme.blog.tags": "Tags:", "theme.tags.tagsPageLink": "View All Tags",
"theme.tags.tagsPageTitle": "Tags",
"theme.tags.tagsListLabel": "Tags:",
"theme.CodeBlock.copyButtonAriaLabel": "Copy code to clipboard", "theme.CodeBlock.copyButtonAriaLabel": "Copy code to clipboard",
"theme.CodeBlock.copied": "Copied", "theme.CodeBlock.copied": "Copied",
"theme.CodeBlock.copy": "Copy", "theme.CodeBlock.copy": "Copy",

View file

@ -10,7 +10,9 @@
"theme.blog.post.paginator.newerPost": "پست های جدید تر", "theme.blog.post.paginator.newerPost": "پست های جدید تر",
"theme.blog.post.paginator.olderPost": "پست های قدیمی تر", "theme.blog.post.paginator.olderPost": "پست های قدیمی تر",
"theme.blog.post.readMore": "ادامه مطلب", "theme.blog.post.readMore": "ادامه مطلب",
"theme.blog.tags": "برچسب ها:", "theme.tags.tagsPageLink": "مشاهده تمام برچسب ها",
"theme.tags.tagsPageTitle": "برچسب ها",
"theme.tags.tagsListLabel": ":برچسب ها",
"theme.CodeBlock.copyButtonAriaLabel": "کپی کردن کد به کلیپ بورد", "theme.CodeBlock.copyButtonAriaLabel": "کپی کردن کد به کلیپ بورد",
"theme.CodeBlock.copied": "کپی شد", "theme.CodeBlock.copied": "کپی شد",
"theme.CodeBlock.copy": "کپی کردن", "theme.CodeBlock.copy": "کپی کردن",

View file

@ -10,7 +10,9 @@
"theme.blog.post.paginator.newerPost": "Article plus récent", "theme.blog.post.paginator.newerPost": "Article plus récent",
"theme.blog.post.paginator.olderPost": "Article plus ancien", "theme.blog.post.paginator.olderPost": "Article plus ancien",
"theme.blog.post.readMore": "Lire plus", "theme.blog.post.readMore": "Lire plus",
"theme.blog.tags": "Tags:", "theme.tags.tagsPageLink": "Voir tous les tags",
"theme.tags.tagsPageTitle": "Tags",
"theme.tags.tagsListLabel": "Tags:",
"theme.CodeBlock.copyButtonAriaLabel": "Copier le code", "theme.CodeBlock.copyButtonAriaLabel": "Copier le code",
"theme.CodeBlock.copied": "Copié", "theme.CodeBlock.copied": "Copié",
"theme.CodeBlock.copy": "Copier", "theme.CodeBlock.copy": "Copier",

View file

@ -10,7 +10,9 @@
"theme.blog.post.paginator.newerPost": "Следующий пост", "theme.blog.post.paginator.newerPost": "Следующий пост",
"theme.blog.post.paginator.olderPost": "Предыдущий пост", "theme.blog.post.paginator.olderPost": "Предыдущий пост",
"theme.blog.post.readMore": "Читать дальше", "theme.blog.post.readMore": "Читать дальше",
"theme.blog.tags": "Теги:", "theme.tags.tagsPageLink": "Посмотреть все теги",
"theme.tags.tagsPageTitle": "Теги",
"theme.tags.tagsListLabel": "Теги:",
"theme.CodeBlock.copyButtonAriaLabel": "Скопировать в буфер обмена", "theme.CodeBlock.copyButtonAriaLabel": "Скопировать в буфер обмена",
"theme.CodeBlock.copied": "Скопировано", "theme.CodeBlock.copied": "Скопировано",
"theme.CodeBlock.copy": "Скопировать", "theme.CodeBlock.copy": "Скопировать",

View file

@ -102,8 +102,8 @@ function BlogPostItem(props: Props): JSX.Element {
<div className="col"> <div className="col">
<strong> <strong>
<Translate <Translate
id="theme.blog.tags" id="theme.tags.tagsListLabel"
description="The label used during output tags list"> description="The label alongside a tag list">
Tags: Tags:
</Translate> </Translate>
</strong> </strong>

View file

@ -11,6 +11,7 @@ import Layout from '@theme/Layout';
import Link from '@docusaurus/Link'; import Link from '@docusaurus/Link';
import type {Props} from '@theme/BlogTagsListPage'; import type {Props} from '@theme/BlogTagsListPage';
import BlogSidebar from '@theme/BlogSidebar'; import BlogSidebar from '@theme/BlogSidebar';
import Translate from '@docusaurus/Translate';
function getCategoryOfTag(tag: string) { function getCategoryOfTag(tag: string) {
// tag's category should be customizable // tag's category should be customizable
@ -61,7 +62,13 @@ function BlogTagsListPage(props: Props): JSX.Element {
<BlogSidebar sidebar={sidebar} /> <BlogSidebar sidebar={sidebar} />
</div> </div>
<main className="col col--8"> <main className="col col--8">
<h1>Tags</h1> <h1>
<Translate
id="theme.tags.tagsPageTitle"
description="The title of the tag list page">
Tags
</Translate>
</h1>
<div className="margin-vert--lg">{tagsSection}</div> <div className="margin-vert--lg">{tagsSection}</div>
</main> </main>
</div> </div>

View file

@ -12,6 +12,7 @@ import BlogPostItem from '@theme/BlogPostItem';
import Link from '@docusaurus/Link'; import Link from '@docusaurus/Link';
import type {Props} from '@theme/BlogTagsPostsPage'; import type {Props} from '@theme/BlogTagsPostsPage';
import BlogSidebar from '@theme/BlogSidebar'; import BlogSidebar from '@theme/BlogSidebar';
import Translate from '@docusaurus/Translate';
function pluralize(count: number, word: string) { function pluralize(count: number, word: string) {
return count > 1 ? `${word}s` : word; return count > 1 ? `${word}s` : word;
@ -37,7 +38,13 @@ function BlogTagsPostPage(props: Props): JSX.Element {
{count} {pluralize(count, 'post')} tagged with &quot;{tagName} {count} {pluralize(count, 'post')} tagged with &quot;{tagName}
&quot; &quot;
</h1> </h1>
<Link href={allTagsPath}>View All Tags</Link> <Link href={allTagsPath}>
<Translate
id="theme.tags.tagsPageLink"
description="The label of the link targeting the tag list page">
View All Tags
</Translate>
</Link>
<div className="margin-vert--xl"> <div className="margin-vert--xl">
{items.map(({content: BlogPostContent}) => ( {items.map(({content: BlogPostContent}) => (
<BlogPostItem <BlogPostItem