Fix documentation: translate doc not translated:
The example of livechatnotranslation usage in the page was triggering the doc-translate script... So the page was marked as "don't translate".
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: peertube-plugin-livechat-documentation VERSION\n"
|
||||
"POT-Creation-Date: 2023-07-17 16:56+0200\n"
|
||||
"POT-Creation-Date: 2023-07-17 17:09+0200\n"
|
||||
"PO-Revision-Date: 2023-07-17 10:52+0000\n"
|
||||
"Last-Translator: Anonymous <noreply@weblate.org>\n"
|
||||
"Language-Team: Swedish <https://weblate.framasoft.org/projects/peertube-livechat/peertube-plugin-livechat-documentation/sv/>\n"
|
||||
@ -571,6 +571,229 @@ msgstr ""
|
||||
msgid "Interested in contributing? Awesome!"
|
||||
msgstr ""
|
||||
|
||||
#. type: Yaml Front Matter Hash Value: description
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
#, no-wrap
|
||||
msgid "Translate the plugin"
|
||||
msgstr ""
|
||||
|
||||
#. type: Yaml Front Matter Hash Value: title
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
#, no-wrap
|
||||
msgid "Translate"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "You can contribute to this plugin translation. Translations are handled using the [Weblate](https://weblate.org/) software, using [Framasoft Weblate instance](https://weblate.framasoft.org/)."
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "Never modify directly files in the `languages` folder, this could lead to conflicts."
|
||||
msgstr ""
|
||||
|
||||
#. type: Title ##
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
#, no-wrap
|
||||
msgid "How to"
|
||||
msgstr ""
|
||||
|
||||
#. type: Bullet: '* '
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "Create an account: https://weblate.framasoft.org/accounts/register/"
|
||||
msgstr ""
|
||||
|
||||
#. type: Bullet: '* '
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "Validate your email and follow the link sent"
|
||||
msgstr ""
|
||||
|
||||
#. type: Bullet: '* '
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "Create your password and setup your account"
|
||||
msgstr ""
|
||||
|
||||
#. type: Bullet: '* '
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "Go to the plugin project page: https://weblate.framasoft.org/projects/peertube-livechat/peertube-plugin-livechat/"
|
||||
msgstr ""
|
||||
|
||||
#. type: Bullet: '* '
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "Choose the locale you want to translate"
|
||||
msgstr ""
|
||||
|
||||
#. type: Bullet: '* '
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "Just translate missing sentences, or correct the ones that seems incorrect to you."
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "There might be some «very technical» strings. If you are not 100% sure of the meaning, or of your translation, you better not translate it, so it will display in english."
|
||||
msgstr ""
|
||||
|
||||
#. type: Title ##
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
#, no-wrap
|
||||
msgid "Adding a new locale"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "If you think there is a missing locale, please check first if it is handled in Peertube. If so, you can [open an issue](https://github.com/JohnXLivingston/peertube-plugin-livechat/issues) to ask for it."
|
||||
msgstr ""
|
||||
|
||||
#. type: Title ##
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
#, no-wrap
|
||||
msgid "Adding new strings / use translations in the code"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "If you are working on new features, and need new strings, you can create them directly in Weblate. The english version is mandatory. Start with it."
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "Each string is linked to a key (for example `use_chat`). Choose an explicit key in english, lower case."
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "If you have to test new strings without waiting for a Weblate merge, you can modify `languages/*.yml` files, but avoid to commit these changes (to minimize conflict risks)."
|
||||
msgstr ""
|
||||
|
||||
#. type: Title ###
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
#, no-wrap
|
||||
msgid "Use translations in front-end code"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "Before using a string in front-end, you need to declare a new constant in `client/@types/global.d.ts`. The constant name must:"
|
||||
msgstr ""
|
||||
|
||||
#. type: Bullet: '* '
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "start with the prefix \"LOC_\""
|
||||
msgstr ""
|
||||
|
||||
#. type: Bullet: '* '
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "use the string key, upper cased"
|
||||
msgstr ""
|
||||
|
||||
#. type: Bullet: '* '
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "you just have to declare its type, not its value"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "For example, to use \"use_chat\", you have to declare:"
|
||||
msgstr ""
|
||||
|
||||
#. type: Fenced code block (typescript)
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
#, no-wrap
|
||||
msgid "declare const LOC_USE_CHAT: string\n"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "The `build-client.js` script will read the `client/@types/global.d.ts`, search for such constants, and load their values from the languages files."
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "Now, you can simply call `peertubeHelpers.translate(LOC_USE_CHAT)` in your code."
|
||||
msgstr ""
|
||||
|
||||
#. type: Title ###
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
#, no-wrap
|
||||
msgid "Use translations in back-end code"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "In theory, the only parts of the backend code where you need localization is the settings declaration and standardized data (ActivityPub, RSS, ...). Here we need to get english strings from the translation key."
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "Note: you should never need another language translation from backend code. Localization must be done on front-end."
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "There is a `lib/loc.ts` module providing a `loc()` function. Just pass it the key to have the english string: `loc('diagnostic')`'."
|
||||
msgstr ""
|
||||
|
||||
#. type: Title ##
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
#, no-wrap
|
||||
msgid "Documentation translation"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "The documentation translation is done using the corresponding Weblate component."
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "There is a specific \"Hugo shortcodes\" you can use to display an application string. Saying you want to display the name of the button \"open_chat_new_window\", you can use this in the documentation markdown file:"
|
||||
msgstr ""
|
||||
|
||||
#. type: Fenced code block (hugo)
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
#, no-wrap
|
||||
msgid "{{%/* livechat_label open_chat_new_window */%}}\n"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "You can also prevent a whole page from being translating by adding `livechatnotranslation: true` in the Yaml Font Matter section:"
|
||||
msgstr ""
|
||||
|
||||
#. type: Fenced code block (yaml)
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
" ---\n"
|
||||
" title: \"Third party\"\n"
|
||||
" description: \"Displaying the livechat with 3rd party software.\"\n"
|
||||
" weight: 20\n"
|
||||
" chapter: false\n"
|
||||
" livechatnotranslation: true\n"
|
||||
" ---\n"
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "Never translate a string in the `livechat.en.pot` file, it would be ignored. Instead, edit directly the markdown files."
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "If a string contains a link, you can change it for the correct link in the translated language. For example, for a link to this documentation, you can add the language code in the url."
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "Some strings are block of code. Don't translate code. But you can translate comments, or parameters if relevant."
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
#: support/documentation/content/en/contributing/translate/_index.md
|
||||
msgid "If you are not sure, just don't translate, and ask what to do."
|
||||
msgstr ""
|
||||
|
||||
#. type: Yaml Front Matter Hash Value: description
|
||||
#: support/documentation/content/en/credits/_index.md
|
||||
#, no-wrap
|
||||
|
Reference in New Issue
Block a user