|
Mamoru TASAKA |
337909d |
--- alexandria-0.6.8/lib/alexandria/ui/dialogs/misc_dialogs.rb.ruby19_utf8 2009-03-26 08:09:32.000000000 +0900
|
|
Mamoru TASAKA |
337909d |
+++ alexandria-0.6.8/lib/alexandria/ui/dialogs/misc_dialogs.rb 2012-04-13 12:38:05.065369194 +0900
|
|
Mamoru TASAKA |
337909d |
@@ -22,9 +22,11 @@
|
|
Mamoru TASAKA |
337909d |
GetText.bindtextdomain(Alexandria::TEXTDOMAIN, :charset => "UTF-8")
|
|
Mamoru TASAKA |
337909d |
|
|
Mamoru TASAKA |
337909d |
def initialize(parent, library, book)
|
|
Mamoru TASAKA |
337909d |
+ # Don't know why, however force_encoding seems needed here to
|
|
Mamoru TASAKA |
337909d |
+ # prevent crash...
|
|
Mamoru TASAKA |
337909d |
super(parent,
|
|
Mamoru TASAKA |
337909d |
_("The book '%s' already exists in '%s'. Would you like " +
|
|
Mamoru TASAKA |
337909d |
- "to replace it?") % [ book.title, library.name ],
|
|
Mamoru TASAKA |
337909d |
+ "to replace it?") % [ book.title, library.name ].dup.map!{|str| str.force_encoding("UTF-8")},
|
|
Mamoru TASAKA |
337909d |
Gtk::Stock::DIALOG_QUESTION,
|
|
Mamoru TASAKA |
337909d |
[[_("_Skip"), Gtk::Dialog::RESPONSE_CANCEL],
|
|
Mamoru TASAKA |
337909d |
[_("_Replace"), Gtk::Dialog::RESPONSE_OK]],
|
|
Mamoru TASAKA |
337909d |
--- alexandria-0.6.8/lib/alexandria/ui/ui_manager.rb.ruby19_utf8 2011-11-15 22:09:19.000000000 +0900
|
|
Mamoru TASAKA |
337909d |
+++ alexandria-0.6.8/lib/alexandria/ui/ui_manager.rb 2012-04-13 12:38:05.066369229 +0900
|
|
Mamoru TASAKA |
337909d |
@@ -825,7 +825,9 @@
|
|
Mamoru TASAKA |
337909d |
iter[Columns::TITLE] = book.title
|
|
Mamoru TASAKA |
337909d |
title = book.title.sub(REDUCE_TITLE_REGEX, '\1...')
|
|
Mamoru TASAKA |
337909d |
iter[Columns::TITLE_REDUCED] = title
|
|
Mamoru TASAKA |
337909d |
- iter[Columns::AUTHORS] = book.authors.join(', ')
|
|
Mamoru TASAKA |
337909d |
+ # Don't know why, however force_encoding seems needed here to
|
|
Mamoru TASAKA |
337909d |
+ # prevent crash...
|
|
Mamoru TASAKA |
337909d |
+ iter[Columns::AUTHORS] = book.authors.dup.map!{|str| str.force_encoding("UTF-8")}.join(', ')
|
|
Mamoru TASAKA |
337909d |
iter[Columns::ISBN] = book.isbn.to_s
|
|
Mamoru TASAKA |
337909d |
iter[Columns::PUBLISHER] = book.publisher
|
|
Mamoru TASAKA |
337909d |
iter[Columns::PUBLISH_DATE] = (book.publishing_year.to_s rescue "")
|