Move apihelp messages to a separate file

This is one of the last extensions to be converted to having
the API messages in a separate file (at least out of the extensions
that are used be Wikimedia).

This one is a bit different from the others because it actually as several
extensions with separate i18n files, so it requires extra-careful review,
especially in Gruntfile and the extension.json files.

Bug: T189982
Change-Id: I66faae6fd4ff447327587c89ad2a1704edd1b356
This commit is contained in:
Amir Aharoni 2019-08-31 22:49:57 +03:00
parent 8d288162db
commit a42d5d4adf
16 changed files with 69 additions and 20 deletions

View file

@ -13,7 +13,8 @@
},
"MessagesDirs": {
"FancyCaptcha": [
"i18n"
"i18n",
"i18n/api"
]
},
"AutoloadClasses": {

View file

@ -0,0 +1,10 @@
{
"@metadata": {
"authors": [
"Brad Jorsch"
]
},
"apihelp-fancycaptchareload-description": "Get a new FancyCaptcha.",
"apihelp-fancycaptchareload-summary": "Get a new FancyCaptcha.",
"apihelp-fancycaptchareload-example-1": "Get a new FancyCaptcha"
}

View file

@ -0,0 +1,10 @@
{
"@metadata": {
"authors": [
"Brad Jorsch"
]
},
"apihelp-fancycaptchareload-description": "{{doc-apihelp-description|fancycaptchareload}}",
"apihelp-fancycaptchareload-summary": "{{doc-apihelp-summary|fancycaptchareload}}",
"apihelp-fancycaptchareload-example-1": "{{doc-apihelp-example|fancycaptchareload}}"
}

View file

@ -11,8 +11,5 @@
"fancycaptcha-edit": "To edit this page, please enter the words that appear below in the box ([[Special:Captcha/help|more info]]):",
"fancycaptcha-imgcaptcha-ph": "Enter the text you see on the image",
"fancycaptcha-sendemail": "To protect the wiki against automated spamming, we kindly ask you to enter the words that appear below in the box ([[Special:Captcha/help|more info]]):",
"fancycaptcha-reload-text": "Refresh",
"apihelp-fancycaptchareload-description": "Get a new FancyCaptcha.",
"apihelp-fancycaptchareload-summary": "Get a new FancyCaptcha.",
"apihelp-fancycaptchareload-example-1": "Get a new FancyCaptcha"
"fancycaptcha-reload-text": "Refresh"
}

View file

@ -18,8 +18,5 @@
"fancycaptcha-edit": "{{Related|ConfirmEdit-edit}}",
"fancycaptcha-imgcaptcha-ph": "Placeholder text for image CAPTCHA input field.",
"fancycaptcha-sendemail": "{{Related|ConfirmEdit-sendemail}}",
"fancycaptcha-reload-text": "Prompts a click to get a new FancyCaptcha image.\n{{Identical|Refresh}}",
"apihelp-fancycaptchareload-description": "{{doc-apihelp-description|fancycaptchareload}}",
"apihelp-fancycaptchareload-summary": "{{doc-apihelp-summary|fancycaptchareload}}",
"apihelp-fancycaptchareload-example-1": "{{doc-apihelp-example|fancycaptchareload}}"
"fancycaptcha-reload-text": "Prompts a click to get a new FancyCaptcha image.\n{{Identical|Refresh}}"
}

View file

@ -27,7 +27,9 @@ module.exports = function ( grunt ) {
banana: {
all: [
'i18n/',
'**/i18n/'
'i18n/api/',
'**/i18n/',
'**/i18n/api/'
]
}
} );

View file

@ -9,7 +9,8 @@
"type": "antispam",
"MessagesDirs": {
"ReCaptchaNoCaptcha": [
"i18n"
"i18n",
"i18n/api"
]
},
"AutoloadClasses": {

View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Brad Jorsch"
]
},
"renocaptcha-apihelp-param-g-recaptcha-response": "Field from the ReCaptcha widget."
}

View file

@ -0,0 +1,8 @@
{
"@metadata": {
"authors": [
"Brad Jorsch"
]
},
"renocaptcha-apihelp-param-g-recaptcha-response": "{{doc-apihelp-param|description=the \"g-recaptcha-response\" parameter added by [[mw:Extension:ConfirmEdit]]|noseealso=1}}"
}

View file

@ -10,6 +10,5 @@
"renocaptcha-createaccount-fail": "It seems you haven't solved the CAPTCHA.",
"renocaptcha-create": "To protect the wiki against automated page creation, we kindly ask you to solve the following CAPTCHA:",
"renocaptcha-noscript": "Unhappily you have disabled JavaScript, so we can't recognize automatically, if you're a human or not. Please solve the CAPTCHA above and copy the resulting text into the following textarea:",
"renocaptcha-help": "Please solve a ReCaptcha NoCaptcha challenge and return the response value as captchaWord.",
"renocaptcha-apihelp-param-g-recaptcha-response": "Field from the ReCaptcha widget."
"renocaptcha-help": "Please solve a ReCaptcha NoCaptcha challenge and return the response value as captchaWord."
}

View file

@ -12,6 +12,5 @@
"renocaptcha-createaccount-fail": "Error message, when the CAPTCHA isn't solved correctly.\n{{related|ConfirmEdit-createaccount-fail}}",
"renocaptcha-create": "Message above the CAPTCHA for create (user creates a new page) action.\n{{related|ConfirmEdit-create}}",
"renocaptcha-noscript": "This messages is warning you have javascript disabled so you have to manualy input the text into the textbox.",
"renocaptcha-help": "Explanation of how to solve the CAPTCHA for API clients.",
"renocaptcha-apihelp-param-g-recaptcha-response": "{{doc-apihelp-param|description=the \"g-recaptcha-response\" parameter added by [[mw:Extension:ConfirmEdit]]|noseealso=1}}"
"renocaptcha-help": "Explanation of how to solve the CAPTCHA for API clients."
}

View file

@ -43,7 +43,8 @@
},
"MessagesDirs": {
"ConfirmEdit": [
"i18n"
"i18n",
"i18n/api"
]
},
"ExtensionMessagesFiles": {

10
i18n/api/en.json Normal file
View file

@ -0,0 +1,10 @@
{
"@metadata": {
"authors": [
"Brad Jorsch",
"Florian Schmidt"
]
},
"captcha-apihelp-param-captchaword": "Answer to the CAPTCHA",
"captcha-apihelp-param-captchaid": "CAPTCHA ID from previous request"
}

10
i18n/api/qqq.json Normal file
View file

@ -0,0 +1,10 @@
{
"@metadata": {
"authors": [
"Brad Jorsch",
"Florian Schmidt"
]
},
"captcha-apihelp-param-captchaword": "{{doc-apihelp-param|description=the \"captchaword\" parameter added by [[mw:Extension:ConfirmEdit]]|noseealso=1}}\nSee also {{msg-mw|captcha-apihelp-param-captchaid}}",
"captcha-apihelp-param-captchaid": "{{doc-apihelp-param|description=the \"captchaid\" parameter added by [[mw:Extension:ConfirmEdit]]|noseealso=1}}\nSee also {{msg-mw|captcha-apihelp-param-captchaword}}"
}

View file

@ -26,8 +26,6 @@
"captcha-addurl-whitelist": " #<!-- leave this line exactly as it is --> <pre>\n# Syntax is as follows:\n# * Everything from a \"#\" character to the end of the line is a comment\n# * Every non-blank line is a regex fragment which will only match hosts inside URLs\n #</pre> <!-- leave this line exactly as it is -->",
"right-skipcaptcha": "Perform CAPTCHA-triggering actions without having to go through the CAPTCHA",
"action-skipcaptcha": "perform CAPTCHA-triggering actions without having to go through the CAPTCHA",
"captcha-apihelp-param-captchaword": "Answer to the CAPTCHA",
"captcha-apihelp-param-captchaid": "CAPTCHA ID from previous request",
"confirmedit-preview-line": "Line number",
"confirmedit-preview-content": "Content",
"confirmedit-preview-validity": "Validity",

View file

@ -40,8 +40,6 @@
"captcha-addurl-whitelist": "See also: [[MediaWiki:Spam-blacklist]] and [[MediaWiki:Spam-whitelist]].\n\nLeave all the wiki markup, including the spaces, as is.\nYou can translate the text, including 'Leave this line exactly as it is'.\nThe first line of this messages has one (1) leading space.\n\n\"regex\" stands for \"regular expression\".",
"right-skipcaptcha": "{{doc-right|skipcaptcha}}",
"action-skipcaptcha": "{{doc-action|skipcaptcha}}",
"captcha-apihelp-param-captchaword": "{{doc-apihelp-param|description=the \"captchaword\" parameter added by [[mw:Extension:ConfirmEdit]]|noseealso=1}}\nSee also {{msg-mw|captcha-apihelp-param-captchaid}}",
"captcha-apihelp-param-captchaid": "{{doc-apihelp-param|description=the \"captchaid\" parameter added by [[mw:Extension:ConfirmEdit]]|noseealso=1}}\nSee also {{msg-mw|captcha-apihelp-param-captchaword}}",
"confirmedit-preview-line": "Used as a table heading for the edit preview of [[MediaWiki:Captcha-ip-whitelist]] to indicate the line number (1, 2, 3, ...).",
"confirmedit-preview-content": "Used as a table heading for the edit preview of [[MediaWiki:Captcha-ip-whitelist]] to indicate the content of a line.\n{{Identical|Content}}",
"confirmedit-preview-validity": "Used as a table heading for the edit preview of [[MediaWiki:Captcha-ip-whitelist]] to indicate the validity of a content of a line (if it's an IP address or not).\n{{Identical|Validity}}",