From 11d8dc90242c8de16090278eadc6cccee58dfe6e Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Fri, 4 Apr 2025 15:39:07 -0400 Subject: Add localized message for Parsoid asynchronous fallback content This is used by the Parsoid library when an asynchronous fragment is present in the wikitext content and it is not yet ready to render. Bug: T390341 Change-Id: Ic996f7b0c891338f8d4605a1789bf389e075e239 --- includes/parser/Parsoid/Config/SiteConfig.php | 8 ++++++++ languages/i18n/en.json | 1 + languages/i18n/qqq.json | 1 + 3 files changed, 10 insertions(+) diff --git a/includes/parser/Parsoid/Config/SiteConfig.php b/includes/parser/Parsoid/Config/SiteConfig.php index 4e91f19aa96d..8a61b61cde11 100644 --- a/includes/parser/Parsoid/Config/SiteConfig.php +++ b/includes/parser/Parsoid/Config/SiteConfig.php @@ -822,6 +822,14 @@ class SiteConfig extends ISiteConfig { return $this->config->get( MainConfigNames::ExternalLinkTarget ); } + /** + * Return the localization key we should use for asynchronous + * fallback content. + */ + public function getAsyncFallbackMessageKey(): string { + return 'parsoid-async-not-ready-fallback'; + } + // MW-specific helper /** diff --git a/languages/i18n/en.json b/languages/i18n/en.json index b75303234f09..87a36de267a8 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -4391,6 +4391,7 @@ "skin-json-warning": "@WARNING", "skin-json-warning-message": "This is not an API, it is only for debugging! Do not use in gadgets or production code.", "copyupload-allowed-domains": "", + "parsoid-async-not-ready-fallback": "Content not ready", "parsoid-stash-rate-limit-error": "Stashing failed because rate limit was exceeded. Please try again later.", "parsoid-resource-limit-exceeded": "Parsoid resources limit exceeded: $1", "parsoid-revision-access": "Parsoid can't access the revision: $1", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index ab1f44781fb6..002c0710efbb 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -4658,6 +4658,7 @@ "skin-json-warning": "Should be prefixed with '@' character. Shown in useskin=json response.", "skin-json-warning-message": "Shown in useskin=json response. Warns user that this is only intended for debugging.", "copyupload-allowed-domains": "{{notranslate}}", + "parsoid-async-not-ready-fallback": "Message shown in article contents when asynchronous content has been included but it is not yet available to be rendered. This is a fallback message only shown when the provider of the asynchronous content hasn't provided a more descriptive message.", "parsoid-stash-rate-limit-error": "Error message returned by parsoid REST endpoints when the rate limit for stashing has been exceeded.", "parsoid-resource-limit-exceeded": "Error message indicating that Parsoid exceeded resource limits. Parameters:\n* $1 - a non-translatable internal error message specifying the problem.", "parsoid-revision-access": "Error message indicating that Parsoid can't access the revision: Parameters:\n* $1 - a non-translatable internal error message specifying the problem.", -- cgit v1.2.3