diff --git a/kdelibs-4.8.4-kjs-locale.patch b/kdelibs-4.8.4-kjs-locale.patch new file mode 100644 index 0000000..74ba0f9 --- /dev/null +++ b/kdelibs-4.8.4-kjs-locale.patch @@ -0,0 +1,18 @@ +diff -up kdelibs-4.8.4/khtml/ecma/kjs_navigator.cpp.me kdelibs-4.8.4/khtml/ecma/kjs_navigator.cpp +--- kdelibs-4.8.4/khtml/ecma/kjs_navigator.cpp.me 2012-06-06 22:49:52.542044112 +0200 ++++ kdelibs-4.8.4/khtml/ecma/kjs_navigator.cpp 2012-07-12 11:52:50.973049316 +0200 +@@ -261,7 +261,13 @@ JSValue *Navigator::getValueProperty(Exe + case BrowserLanguage: + case Language: + case UserLanguage: +- return jsString(KGlobal::locale()->language()); ++ { ++ QString l = KGlobal::locale()->language(); ++ if ( l.contains(QLatin1Char('_')) ) ++ return jsString(l.replace(QLatin1Char('_'), QLatin1Char('-'))); ++ else ++ return jsString(l + QLatin1Char('-') + KGlobal::locale()->country().toUpper()); ++ } + case UserAgent: + return jsString(userAgent); + case Platform: diff --git a/kdelibs.spec b/kdelibs.spec index 633fec0..81f42c0 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -25,7 +25,7 @@ Summary: KDE Libraries Version: 4.8.4 -Release: 6%{?dist} +Release: 7%{?dist} Name: kdelibs Epoch: 6 @@ -142,6 +142,9 @@ Patch52: kdelibs-4.7.4-SOLID_UPNP.patch # add s390/s390x support in kjs Patch53: kdelibs-4.7.2-kjs-s390.patch +# return valid locale (RFC 1766) +Patch54: kdelibs-4.8.4-kjs-locale.patch + ## upstream # fix kdeclarative install location (by wstephenson as found in kde-packager list) Patch100: kdelibs-4.8.3-kdeclarative-install-location.patch @@ -356,6 +359,7 @@ popd %patch51 -p1 -b .uri_mimetypes %patch52 -p1 -b .SOLID_UPNP %patch53 -p1 -b .kjs-s390 +%patch54 -p1 -b .kjs-locale # upstream patches %patch100 -p1 -b .kdeclarative-install-location @@ -615,6 +619,9 @@ rm -rf %{buildroot} %changelog +* Thu Jul 12 2012 Than Ngo - 6:4.8.4-7 +- fix kjs to return valid lang (RFC 1766) + * Fri Jun 29 2012 Lukáš Tinkl - 6:4.8.4-6 - sync the udisks2 backend patch