Updated issue templates

This commit is contained in:
squidfunk 2023-09-21 15:33:49 +02:00
parent 96d845fc15
commit f4e4d71343
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
3 changed files with 58 additions and 56 deletions

View File

@ -20,61 +20,61 @@ body:
description: >- description: >-
Please translate the labels on the right. For new languages, translate Please translate the labels on the right. For new languages, translate
each line. For existing languages, only translate lines containing the each line. For existing languages, only translate lines containing the
icon :arrow_left: and remove the icon before submitting. :arrow_left: icon and remove the icon before submitting.
[More](https://squidfunk.github.io/mkdocs-material/contributing/adding-translations/#translations_1) [More](https://squidfunk.github.io/mkdocs-material/contributing/adding-translations/#translations_1)
value: |- value: |-
{% macro t(key) %}{{ { {% macro t(key) %}{{ {
"language": "en", "language": "en ⬅️",
"direction": "ltr", "direction": "ltr ⬅️",
"action.edit": "Edit this page", "action.edit": "Edit this page ⬅️",
"action.skip": "Skip to content", "action.skip": "Skip to content ⬅️",
"action.view": "View source of this page", "action.view": "View source of this page ⬅️",
"announce.dismiss": "Don't show this again", "announce.dismiss": "Don't show this again ⬅️",
"blog.archive": "Archive", "blog.archive": "Archive ⬅️",
"blog.categories": "Categories", "blog.categories": "Categories ⬅️",
"blog.categories.in": "in", "blog.categories.in": "in ⬅️",
"blog.continue": "Continue reading", "blog.continue": "Continue reading ⬅️",
"blog.draft": "Draft", "blog.draft": "Draft ⬅️",
"blog.index": "Back to index", "blog.index": "Back to index ⬅️",
"blog.meta": "Metadata", "blog.meta": "Metadata ⬅️",
"blog.references": "Related links", "blog.references": "Related links ⬅️",
"clipboard.copy": "Copy to clipboard", "clipboard.copy": "Copy to clipboard ⬅️",
"clipboard.copied": "Copied to clipboard", "clipboard.copied": "Copied to clipboard ⬅️",
"consent.accept": "Accept", "consent.accept": "Accept ⬅️",
"consent.manage": "Manage settings", "consent.manage": "Manage settings ⬅️",
"consent.reject": "Reject", "consent.reject": "Reject ⬅️",
"footer": "Footer", "footer": "Footer ⬅️",
"footer.next": "Next", "footer.next": "Next ⬅️",
"footer.previous": "Previous", "footer.previous": "Previous ⬅️",
"header": "Header", "header": "Header ⬅️",
"meta.comments": "Comments", "meta.comments": "Comments ⬅️",
"meta.source": "Source", "meta.source": "Source ⬅️",
"nav": "Navigation", "nav": "Navigation ⬅️",
"readtime.one": "1 min read", "readtime.one": "1 min read ⬅️",
"readtime.other": "# min read", "readtime.other": "# min read ⬅️",
"rss.created": "RSS feed", "rss.created": "RSS feed ⬅️",
"rss.updated": "RSS feed of updated content", "rss.updated": "RSS feed of updated content ⬅️",
"search": "Search", "search": "Search ⬅️",
"search.placeholder": "Search", "search.placeholder": "Search ⬅️",
"search.share": "Share", "search.share": "Share ⬅️",
"search.reset": "Clear", "search.reset": "Clear ⬅️",
"search.result.initializer": "Initializing search", "search.result.initializer": "Initializing search ⬅️",
"search.result.placeholder": "Type to start searching", "search.result.placeholder": "Type to start searching ⬅️",
"search.result.none": "No matching documents", "search.result.none": "No matching documents ⬅️",
"search.result.one": "1 matching document", "search.result.one": "1 matching document ⬅️",
"search.result.other": "# matching documents", "search.result.other": "# matching documents ⬅️",
"search.result.more.one": "1 more on this page", "search.result.more.one": "1 more on this page ⬅️",
"search.result.more.other": "# more on this page", "search.result.more.other": "# more on this page ⬅️",
"search.result.term.missing": "Missing", "search.result.term.missing": "Missing ⬅️",
"select.language": "Select language", "select.language": "Select language ⬅️",
"select.version": "Select version", "select.version": "Select version ⬅️",
"source": "Go to repository", "source": "Go to repository ⬅️",
"source.file.contributors": "Contributors", "source.file.contributors": "Contributors ⬅️",
"source.file.date.created": "Created", "source.file.date.created": "Created ⬅️",
"source.file.date.updated": "Last update", "source.file.date.updated": "Last update ⬅️",
"tabs": "Tabs", "tabs": "Tabs ⬅️",
"toc": "Table of contents", "toc": "Table of contents ⬅️",
"top": "Back to top" "top": "Back to top ⬅️"
}[key] }}{% endmacro %} }[key] }}{% endmacro %}
render: Jinja render: Jinja
validations: validations:

View File

@ -86,13 +86,14 @@ def on_page_markdown(markdown: str, *, page: Page, config: MkDocsConfig, files):
# Assemble GitHub issue URL # Assemble GitHub issue URL
link = urlparse(issue_url) link = urlparse(issue_url)
link = link._replace(query = urlencode({ link = link._replace(query = urlencode({
"template": "04-add-a-translation.yml", "template": "04-add-translations.yml",
"title": f"Update {name} translations", "title": f"Update {name} translations",
"translations": "\n".join([ "translations": "\n".join([
"{% macro t(key) %}{{ {", "{% macro t(key) %}{{ {",
",\n".join(translations), ",\n".join(translations),
"}[key] }}{% endmacro %}" "}[key] }}{% endmacro %}"
]) ]),
"country-flag": f":flag_{countries[code]}:"
})) }))
# Add translation # Add translation

View File

@ -86,13 +86,14 @@ def on_page_markdown(markdown: str, *, page: Page, config: MkDocsConfig, files):
# Assemble GitHub issue URL # Assemble GitHub issue URL
link = urlparse(issue_url) link = urlparse(issue_url)
link = link._replace(query = urlencode({ link = link._replace(query = urlencode({
"template": "04-add-a-translation.yml", "template": "04-add-translations.yml",
"title": f"Update {name} translations", "title": f"Update {name} translations",
"translations": "\n".join([ "translations": "\n".join([
"{% macro t(key) %}{{ {", "{% macro t(key) %}{{ {",
",\n".join(translations), ",\n".join(translations),
"}[key] }}{% endmacro %}" "}[key] }}{% endmacro %}"
]) ]),
"country-flag": f":flag_{countries[code]}:"
})) }))
# Add translation # Add translation