add patch to fix bug 6718848
authorjerrytan
Thu, 20 Nov 2008 09:15:34 +0000
changeset 14632 8a432c931203
parent 14631 089735d1c073
child 14633 ea1313e12387
add patch to fix bug 6718848
ChangeLog
base-specs/gthumb.spec
patches/gthumb-04-zh-ja-locale.diff
--- a/ChangeLog	Thu Nov 20 08:39:26 2008 +0000
+++ b/ChangeLog	Thu Nov 20 09:15:34 2008 +0000
@@ -1,3 +1,9 @@
+2008-11-20  Jerry Tan <[email protected]>
+
+        * base-specs/gthumb.spec:
+        * patches/gthumb-04-zh-ja-locale.diff
+        add patch to fix bug 6718848 
+  
 2008-11-20  Takao Fujiwara  <[email protected]>
 
 	* SUNWprint-monitor.spec: Updated to fix pkgmap.
--- a/base-specs/gthumb.spec	Thu Nov 20 08:39:26 2008 +0000
+++ b/base-specs/gthumb.spec	Thu Nov 20 09:15:34 2008 +0000
@@ -27,6 +27,8 @@
 Patch2:         gthumb-02-man.diff
 #owner:fujiwara date:2008-08-26 type:bug bugster:6738015 bugzilla:489922 state:upsteam
 Patch3:         gthumb-03-g11n-locale-dir.diff
+#owner:xinlai   date:2008-11-20 type:bug bugster:6718848 bugzilla:561632 
+Patch4:         gthumb-04-zh-ja-locale.diff 
 URL:		http://gthumb.sourceforge.net/
 BuildRoot:	%{_tmppath}/%{name}-%{version}-build
 Docdir:		%{_docdir}/doc
@@ -72,6 +74,7 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 %ifos linux
@@ -156,6 +159,8 @@
 %doc %{_datadir}/gnome/help/gthumb
 
 %changelog
+* Thu Nov 20 2008 [email protected]
+- Add gthumb-04-zh-ja-locale.diff to fix the core dumped bug 6718848
 * Tue Aug 26 2008 - [email protected]
 - Add gthumb-03-g11n-locale-dir.diff to show none UTF-8 filenames.
 * Tue Aug 05 2008 - [email protected]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gthumb-04-zh-ja-locale.diff	Thu Nov 20 09:15:34 2008 +0000
@@ -0,0 +1,49 @@
+--- gthumb-2.10.9/src/gth-viewer.c.orig	2008-11-20 14:29:52.706574000 +0800
++++ gthumb-2.10.9/src/gth-viewer.c	2008-11-20 14:31:08.395439000 +0800
+@@ -568,6 +568,7 @@
+ 	GthViewerPrivateData *priv = viewer->priv;
+ 	char                 *text;
+ 	char                  time_txt[50], *utf8_time_txt;
++	char		     *format_locale;
+ 	char                 *size_txt;
+ 	char                 *file_size_txt;
+ 	int                   width, height;
+@@ -596,7 +597,9 @@
+ 	if (timer == 0)
+ 		timer = priv->image->mtime;
+ 	tm = localtime (&timer);
+-	strftime (time_txt, 50, _("%d %B %Y, %H:%M"), tm);
++	format_locale = g_locale_from_utf8(_("%d %B %Y, %H:%M"),-1,NULL,NULL,NULL);
++	strftime(time_txt,50,format_locale,tm); 
++	g_free(format_locale);
+ 	utf8_time_txt = g_locale_to_utf8 (time_txt, -1, 0, 0, 0);
+ 
+ 	size_txt = g_strdup_printf (_("%d x %d pixels"), width, height);
+--- gthumb-2.10.9/po/zh_CN.po.orig	2008-11-20 14:08:36.282451000 +0800
++++ gthumb-2.10.9/po/zh_CN.po	2008-11-20 14:07:37.574653000 +0800
+@@ -172,7 +172,7 @@
+ 
+ #: ../components/image-viewer/viewer-stream.c:90 ../src/dlg-file-utils.c:555
+ msgid "%d %b %Y, %H:%M"
+-msgstr "%Y年%-m月%-d日 %H:%M"
++msgstr "%Y年%m月%d日 %H:%M"
+ 
+ #: ../components/image-viewer/viewer-stream.c:99
+ #: ../src/catalog-png-exporter.c:815 ../src/dlg-image-prop.c:425
+@@ -2091,14 +2091,14 @@
+ 
+ #: ../libgthumb/comments.c:1249
+ msgid "%d %B %Y"
+-msgstr "%Y年%-m月%-d日"
++msgstr "%Y年%m月%d日"
+ 
+ #: ../libgthumb/comments.c:1251 ../src/catalog-web-exporter.c:52
+ #: ../src/dlg-duplicates.c:553 ../src/dlg-image-prop.c:445
+ #: ../src/gth-browser.c:498 ../src/gth-exif-data-viewer.c:485
+ #: ../src/gth-fullscreen.c:857 ../src/gth-viewer.c:583
+ msgid "%d %B %Y, %H:%M"
+-msgstr "%Y年%-m月%-d日 %H:%M"
++msgstr "%Y年%m月%d日 %H:%M"
+ 
+ #: ../libgthumb/comments.c:1261 ../libgthumb/comments.c:1263
+ msgid "(No Comment)"