fix kjs to return valid lang (RFC 1766)
This commit is contained in:
parent
ed3f432ac5
commit
ca34a44235
18
kdelibs-4.8.4-kjs-locale.patch
Normal file
18
kdelibs-4.8.4-kjs-locale.patch
Normal file
@ -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:
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
Summary: KDE Libraries
|
Summary: KDE Libraries
|
||||||
Version: 4.8.4
|
Version: 4.8.4
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
|
|
||||||
Name: kdelibs
|
Name: kdelibs
|
||||||
Epoch: 6
|
Epoch: 6
|
||||||
@ -142,6 +142,9 @@ Patch52: kdelibs-4.7.4-SOLID_UPNP.patch
|
|||||||
# add s390/s390x support in kjs
|
# add s390/s390x support in kjs
|
||||||
Patch53: kdelibs-4.7.2-kjs-s390.patch
|
Patch53: kdelibs-4.7.2-kjs-s390.patch
|
||||||
|
|
||||||
|
# return valid locale (RFC 1766)
|
||||||
|
Patch54: kdelibs-4.8.4-kjs-locale.patch
|
||||||
|
|
||||||
## upstream
|
## upstream
|
||||||
# fix kdeclarative install location (by wstephenson as found in kde-packager list)
|
# fix kdeclarative install location (by wstephenson as found in kde-packager list)
|
||||||
Patch100: kdelibs-4.8.3-kdeclarative-install-location.patch
|
Patch100: kdelibs-4.8.3-kdeclarative-install-location.patch
|
||||||
@ -356,6 +359,7 @@ popd
|
|||||||
%patch51 -p1 -b .uri_mimetypes
|
%patch51 -p1 -b .uri_mimetypes
|
||||||
%patch52 -p1 -b .SOLID_UPNP
|
%patch52 -p1 -b .SOLID_UPNP
|
||||||
%patch53 -p1 -b .kjs-s390
|
%patch53 -p1 -b .kjs-s390
|
||||||
|
%patch54 -p1 -b .kjs-locale
|
||||||
|
|
||||||
# upstream patches
|
# upstream patches
|
||||||
%patch100 -p1 -b .kdeclarative-install-location
|
%patch100 -p1 -b .kdeclarative-install-location
|
||||||
@ -615,6 +619,9 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 12 2012 Than Ngo <than@redhat.com> - 6:4.8.4-7
|
||||||
|
- fix kjs to return valid lang (RFC 1766)
|
||||||
|
|
||||||
* Fri Jun 29 2012 Lukáš Tinkl <ltinkl@redhat.com> - 6:4.8.4-6
|
* Fri Jun 29 2012 Lukáš Tinkl <ltinkl@redhat.com> - 6:4.8.4-6
|
||||||
- sync the udisks2 backend patch
|
- sync the udisks2 backend patch
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user