void-packages/srcpkgs/chromium/patches/chromium-fix-print-preview-on-en_GB-locale.patch
Juan RP 6a1c0332b4 chromium: update to 47.0.2526.73.
Adapted Alpine patches for musl support, to not break glibc.

Close #3064
2015-12-05 11:03:02 +01:00

14 lines
805 B
Diff

--- chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -1222,7 +1222,10 @@ void PrintPreviewHandler::GetNumberFormatAndMeasurementSystem(
UErrorCode errorCode = U_ZERO_ERROR;
const char* locale = g_browser_process->GetApplicationLocale().c_str();
UMeasurementSystem system = ulocdata_getMeasurementSystem(locale, &errorCode);
- if (errorCode > U_ZERO_ERROR || system == UMS_LIMIT)
+ // On error, assume the units are SI.
+ // Since the only measurement units print preview's WebUI cares about are
+ // those for measuring distance, assume anything non-US is SI.
+ if (errorCode > U_ZERO_ERROR || system != UMS_US)
system = UMS_SI;
// Getting the number formatting based on the locale and writing to