fixed format of json (#5992)

* fixed format of json

* fixed link for language codes
pull/5995/head
najanajana 2023-10-19 21:33:12 +02:00 committed by GitHub
parent 226dff6600
commit eddaa83912
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 11 deletions

View File

@ -20,12 +20,13 @@ Translations will be send back to us regularly and will eventually appear in the
[source,json] [source,json]
---- ----
{ "pad.modals.connected": "Connecté." {
, "pad.modals.uderdup": "Ouvrir dans une nouvelle fenêtre." "pad.modals.connected": "Connecté.",
, "pad.toolbar.unindent.title": "Dèsindenter" "pad.modals.uderdup": "Ouvrir dans une nouvelle fenêtre.",
, "pad.toolbar.undo.title": "Annuler (Ctrl-Z)" "pad.toolbar.unindent.title": "Dèsindenter",
, "timeslider.pageTitle": "{{appTitle}} Curseur temporel", "pad.toolbar.undo.title": "Annuler (Ctrl-Z)",
, ... "timeslider.pageTitle": "{{appTitle}} Curseur temporel",
...
} }
---- ----
@ -71,7 +72,7 @@ alert(window._('pad.chat'));
---- ----
==== 2. Create translate files in the locales directory of your plugin ==== 2. Create translate files in the locales directory of your plugin
* The name of the file must be the language code of the language it contains translations for (see https://joker-x.github.com/languages4translatewiki/test/[supported lang codes]; e.g. en ? English, es ? Spanish...) * The name of the file must be the language code of the language it contains translations for (see https://joker-x.github.io/languages4translatewiki/test/[supported lang codes]; e.g. en ? English, es ? Spanish...)
* The extension of the file must be `.json` * The extension of the file must be `.json`
* The default language is English, so your plugin should always provide `en.json` * The default language is English, so your plugin should always provide `en.json`
* In order to avoid naming conflicts, your message keys should start with the name of your plugin followed by a dot (see below) * In order to avoid naming conflicts, your message keys should start with the name of your plugin followed by a dot (see below)
@ -80,7 +81,8 @@ alert(window._('pad.chat'));
[source, json] [source, json]
---- ----
{ "ep_your-plugin.h1": "Heading 1" {
"ep_your-plugin.h1": "Heading 1"
} }
---- ----
@ -88,7 +90,8 @@ alert(window._('pad.chat'));
[source, json] [source, json]
---- ----
{ "ep_your-plugin.h1": "Título 1" {
"ep_your-plugin.h1": "Título 1"
} }
---- ----
@ -103,8 +106,9 @@ For example, if you want to replace `Chat` with `Notes`, simply add...
[source,json] [source,json]
---- ----
{ "ep_your-plugin.h1": "Heading 1" {
, "pad.chat": "Notes" "ep_your-plugin.h1": "Heading 1",
"pad.chat": "Notes"
} }
---- ----