[kdelibs] fix kjs to return valid lang (RFC 1766)

Than Ngo than at fedoraproject.org
Thu Jul 12 12:33:41 UTC 2012


commit 40c0864bf76e14aa0f5b7c9e39f49e9383863e97
Author: Than Ngo <than at redhat.com>
Date:   Thu Jul 12 14:33:20 2012 +0200

    fix kjs to return valid lang (RFC 1766)

 kdelibs-4.8.4-kjs-locale.patch |   12 ++++++++++++
 kdelibs.spec                   |    9 ++++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/kdelibs-4.8.4-kjs-locale.patch b/kdelibs-4.8.4-kjs-locale.patch
new file mode 100644
index 0000000..cc60981
--- /dev/null
+++ b/kdelibs-4.8.4-kjs-locale.patch
@@ -0,0 +1,12 @@
+diff -up kdelibs-4.8.4/khtml/ecma/kjs_navigator.cpp.kjs-locale kdelibs-4.8.4/khtml/ecma/kjs_navigator.cpp
+--- kdelibs-4.8.4/khtml/ecma/kjs_navigator.cpp.kjs-locale	2012-06-06 22:49:52.542044112 +0200
++++ kdelibs-4.8.4/khtml/ecma/kjs_navigator.cpp	2012-07-10 23:39:17.508405723 +0200
+@@ -261,7 +261,7 @@ JSValue *Navigator::getValueProperty(Exe
+   case BrowserLanguage:
+   case Language:
+   case UserLanguage:
+-    return jsString(KGlobal::locale()->language());
++    return jsString(KGlobal::locale()->language().replace(QLatin1Char('_'), QLatin1Char('-')));
+   case UserAgent:
+     return jsString(userAgent);
+   case Platform:
diff --git a/kdelibs.spec b/kdelibs.spec
index 68751e1..b543cfe 100644
--- a/kdelibs.spec
+++ b/kdelibs.spec
@@ -25,7 +25,7 @@
 
 Summary: KDE Libraries
 Version: 4.8.97
-Release: 1%{?dist}
+Release: 2%{?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
@@ -352,6 +355,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
@@ -610,6 +614,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Thu Jul 12 2012 Than Ngo <than at redhat.com> - 6:4.8.97-2
+- fix kjs to return valid lang (RFC 1766)
+
 * Wed Jul 11 2012 Rex Dieter <rdieter at fedoraproject.org> - 6:4.8.97-1
 - 4.8.97
 


More information about the scm-commits mailing list