Loading browser/installer/package-manifest.in +1 −0 Original line number Diff line number Diff line Loading @@ -313,6 +313,7 @@ @RESPATH@/res/locale/layout/HtmlForm.properties @RESPATH@/res/locale/layout/MediaDocument.properties @RESPATH@/res/locale/layout/xmlparser.properties @RESPATH@/res/locale/xslt/xslt.properties @RESPATH@/res/locale/dom/dom.properties #ifdef XP_MACOSX @RESPATH@/res/MainMenu.nib/ Loading dom/locales/moz.build +4 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,10 @@ RESOURCE_FILES.locale.layout += [ "en-US/chrome/layout/xmlparser.properties", ] RESOURCE_FILES.locale.xslt += [ "en-US/chrome/xslt/xslt.properties", ] RESOURCE_FILES.locale.dom += [ "en-US/chrome/dom/dom.properties", ] dom/xslt/xslt/txMozillaXSLTProcessor.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -942,11 +942,17 @@ void txMozillaXSLTProcessor::reportError(nsresult aResult, mozilla::components::StringBundle::Service(); if (sbs) { nsString errorText; sbs->FormatStatusMessage(aResult, u"", errorText); bool spoofLocale = nsContentUtils::SpoofLocaleEnglish(); if (spoofLocale && mSource) { Document* sourceDoc = mSource->OwnerDoc(); spoofLocale = !(sourceDoc && sourceDoc->AllowsL10n()); } sbs->FormatStatusMessage(aResult, u"", spoofLocale, errorText); nsAutoString errorMessage; nsCOMPtr<nsIStringBundle> bundle; sbs->CreateBundle(XSLT_MSGS_URL, getter_AddRefs(bundle)); sbs->CreateBundle(spoofLocale ? XSLT_MSGS_URL_en_US : XSLT_MSGS_URL, getter_AddRefs(bundle)); if (bundle) { AutoTArray<nsString, 1> error = {errorText}; Loading dom/xslt/xslt/txXSLTMsgsURL.h +1 −0 Original line number Diff line number Diff line Loading @@ -7,5 +7,6 @@ #define DOM_XSLT_XSLT_TXXSLTMSGSURL_H_ #define XSLT_MSGS_URL "chrome://global/locale/xslt/xslt.properties" #define XSLT_MSGS_URL_en_US "resource://gre/res/locale/xslt/xslt.properties" #endif // DOM_XSLT_XSLT_TXXSLTMSGSURL_H_ intl/strres/nsIStringBundle.idl +5 −1 Original line number Diff line number Diff line Loading @@ -86,9 +86,13 @@ interface nsIStringBundleService : nsISupports * used in the string lookup process. * @param aStatusArg - The status message argument(s). Multiple arguments * can be separated by newline ('\n') characters. * @param aSpoofLocale - If true (default is false), forces the en-US locale on content-accessible messages (XSLT errors so far). * @return the formatted message */ AString formatStatusMessage(in nsresult aStatus, in wstring aStatusArg); AString formatStatusMessage(in nsresult aStatus, in wstring aStatusArg, [optional] in boolean aSpoofLocale); /** * flushes the string bundle cache - useful when the locale changes or Loading Loading
browser/installer/package-manifest.in +1 −0 Original line number Diff line number Diff line Loading @@ -313,6 +313,7 @@ @RESPATH@/res/locale/layout/HtmlForm.properties @RESPATH@/res/locale/layout/MediaDocument.properties @RESPATH@/res/locale/layout/xmlparser.properties @RESPATH@/res/locale/xslt/xslt.properties @RESPATH@/res/locale/dom/dom.properties #ifdef XP_MACOSX @RESPATH@/res/MainMenu.nib/ Loading
dom/locales/moz.build +4 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,10 @@ RESOURCE_FILES.locale.layout += [ "en-US/chrome/layout/xmlparser.properties", ] RESOURCE_FILES.locale.xslt += [ "en-US/chrome/xslt/xslt.properties", ] RESOURCE_FILES.locale.dom += [ "en-US/chrome/dom/dom.properties", ]
dom/xslt/xslt/txMozillaXSLTProcessor.cpp +8 −2 Original line number Diff line number Diff line Loading @@ -942,11 +942,17 @@ void txMozillaXSLTProcessor::reportError(nsresult aResult, mozilla::components::StringBundle::Service(); if (sbs) { nsString errorText; sbs->FormatStatusMessage(aResult, u"", errorText); bool spoofLocale = nsContentUtils::SpoofLocaleEnglish(); if (spoofLocale && mSource) { Document* sourceDoc = mSource->OwnerDoc(); spoofLocale = !(sourceDoc && sourceDoc->AllowsL10n()); } sbs->FormatStatusMessage(aResult, u"", spoofLocale, errorText); nsAutoString errorMessage; nsCOMPtr<nsIStringBundle> bundle; sbs->CreateBundle(XSLT_MSGS_URL, getter_AddRefs(bundle)); sbs->CreateBundle(spoofLocale ? XSLT_MSGS_URL_en_US : XSLT_MSGS_URL, getter_AddRefs(bundle)); if (bundle) { AutoTArray<nsString, 1> error = {errorText}; Loading
dom/xslt/xslt/txXSLTMsgsURL.h +1 −0 Original line number Diff line number Diff line Loading @@ -7,5 +7,6 @@ #define DOM_XSLT_XSLT_TXXSLTMSGSURL_H_ #define XSLT_MSGS_URL "chrome://global/locale/xslt/xslt.properties" #define XSLT_MSGS_URL_en_US "resource://gre/res/locale/xslt/xslt.properties" #endif // DOM_XSLT_XSLT_TXXSLTMSGSURL_H_
intl/strres/nsIStringBundle.idl +5 −1 Original line number Diff line number Diff line Loading @@ -86,9 +86,13 @@ interface nsIStringBundleService : nsISupports * used in the string lookup process. * @param aStatusArg - The status message argument(s). Multiple arguments * can be separated by newline ('\n') characters. * @param aSpoofLocale - If true (default is false), forces the en-US locale on content-accessible messages (XSLT errors so far). * @return the formatted message */ AString formatStatusMessage(in nsresult aStatus, in wstring aStatusArg); AString formatStatusMessage(in nsresult aStatus, in wstring aStatusArg, [optional] in boolean aSpoofLocale); /** * flushes the string bundle cache - useful when the locale changes or Loading