alexandria-book-collection-manager 0.7.9 → 0.7.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +5 -1
  3. data/.github/workflows/ruby.yml +36 -22
  4. data/.rubocop.yml +12 -3
  5. data/.rubocop_todo.yml +35 -47
  6. data/.simplecov +2 -2
  7. data/CHANGELOG.md +71 -24
  8. data/Gemfile +0 -6
  9. data/Rakefile +5 -5
  10. data/alexandria-book-collection-manager.gemspec +24 -21
  11. data/bin/rake +28 -0
  12. data/bin/rspec +28 -0
  13. data/doc/dependency_decisions.yml +32 -26
  14. data/{bin → exe}/alexandria +1 -3
  15. data/lib/alexandria/about.rb +1 -0
  16. data/lib/alexandria/book_providers/bl_provider.rb +4 -6
  17. data/lib/alexandria/book_providers/{douban.rb → douban_provider.rb} +1 -1
  18. data/lib/alexandria/book_providers/loc_provider.rb +2 -6
  19. data/lib/alexandria/book_providers/sbn_provider.rb +2 -12
  20. data/lib/alexandria/book_providers/thalia_provider.rb +5 -6
  21. data/lib/alexandria/book_providers/{web.rb → website_based_provider.rb} +20 -1
  22. data/lib/alexandria/book_providers/{worldcat.rb → world_cat_provider.rb} +3 -4
  23. data/lib/alexandria/book_providers/z3950_provider.rb +25 -27
  24. data/lib/alexandria/book_providers.rb +14 -10
  25. data/lib/alexandria/config.rb +2 -2
  26. data/lib/alexandria/console.rb +12 -10
  27. data/lib/alexandria/export_format.rb +3 -2
  28. data/lib/alexandria/export_library.rb +35 -40
  29. data/lib/alexandria/import_library.rb +3 -4
  30. data/lib/alexandria/import_library_csv.rb +2 -2
  31. data/lib/alexandria/library_collection.rb +1 -1
  32. data/lib/alexandria/library_store.rb +20 -15
  33. data/lib/alexandria/logging.rb +22 -21
  34. data/lib/alexandria/models/book.rb +1 -2
  35. data/lib/alexandria/models/library.rb +7 -8
  36. data/lib/alexandria/preferences.rb +7 -19
  37. data/lib/alexandria/{book_providers/pseudomarc.rb → pseudo_marc_parser.rb} +2 -2
  38. data/lib/alexandria/scanners/cue_cat.rb +5 -9
  39. data/lib/alexandria/scanners/{keyboard.rb → keyboard_wedge.rb} +3 -3
  40. data/lib/alexandria/scanners.rb +2 -2
  41. data/lib/alexandria/smart_library.rb +9 -5
  42. data/lib/alexandria/ui/acquire_dialog.rb +42 -45
  43. data/lib/alexandria/ui/alert_dialog.rb +3 -3
  44. data/lib/alexandria/ui/barcode_animation.rb +3 -3
  45. data/lib/alexandria/ui/book_properties_dialog.rb +9 -9
  46. data/lib/alexandria/ui/book_properties_dialog_base.rb +13 -14
  47. data/lib/alexandria/ui/builder_base.rb +1 -1
  48. data/lib/alexandria/ui/callbacks.rb +8 -7
  49. data/lib/alexandria/ui/confirm_erase_dialog.rb +1 -0
  50. data/lib/alexandria/ui/conflict_while_copying_dialog.rb +1 -0
  51. data/lib/alexandria/ui/export_dialog.rb +1 -0
  52. data/lib/alexandria/ui/{iconview.rb → icon_view_manager.rb} +1 -0
  53. data/lib/alexandria/ui/icons.rb +2 -2
  54. data/lib/alexandria/ui/iconview_tooltips.rb +1 -1
  55. data/lib/alexandria/ui/init.rb +10 -4
  56. data/lib/alexandria/ui/keep_bad_isbn_dialog.rb +1 -0
  57. data/lib/alexandria/ui/libraries_combo.rb +1 -0
  58. data/lib/alexandria/ui/listview.rb +2 -0
  59. data/lib/alexandria/ui/main_app.rb +3 -1
  60. data/lib/alexandria/ui/multi_drag_treeview.rb +0 -2
  61. data/lib/alexandria/ui/new_book_dialog.rb +15 -20
  62. data/lib/alexandria/ui/new_book_dialog_manual.rb +7 -7
  63. data/lib/alexandria/ui/new_provider_dialog.rb +1 -0
  64. data/lib/alexandria/ui/new_smart_library_dialog.rb +2 -1
  65. data/lib/alexandria/ui/preferences_dialog.rb +4 -4
  66. data/lib/alexandria/ui/provider_preferences_dialog.rb +1 -0
  67. data/lib/alexandria/ui/really_delete_dialog.rb +1 -0
  68. data/lib/alexandria/ui/sidepane_manager.rb +49 -48
  69. data/lib/alexandria/ui/skip_entry_dialog.rb +1 -0
  70. data/lib/alexandria/ui/smart_library_properties_dialog.rb +1 -0
  71. data/lib/alexandria/ui/smart_library_properties_dialog_base.rb +2 -1
  72. data/lib/alexandria/ui/{sound.rb → sound_effects_player.rb} +3 -0
  73. data/lib/alexandria/ui/ui_manager.rb +194 -143
  74. data/lib/alexandria/ui.rb +1 -0
  75. data/lib/alexandria/version.rb +1 -1
  76. data/lib/alexandria/web_themes.rb +1 -1
  77. data/lib/alexandria.rb +6 -5
  78. data/po/Makefile +1 -1
  79. data/po/it.po +64 -82
  80. data/spec/alexandria/book_providers/bl_provider_spec.rb +11 -2
  81. data/spec/alexandria/book_providers/douban_provider_spec.rb +17 -0
  82. data/spec/alexandria/book_providers/loc_provider_spec.rb +10 -2
  83. data/spec/alexandria/book_providers/sbn_provider_spec.rb +10 -2
  84. data/spec/alexandria/book_providers/thalia_provider_spec.rb +9 -1
  85. data/spec/alexandria/book_providers/world_cat_provider_spec.rb +30 -10
  86. data/spec/alexandria/book_providers/z3950_provider_spec.rb +22 -0
  87. data/spec/alexandria/book_spec.rb +5 -3
  88. data/spec/alexandria/console_spec.rb +1 -1
  89. data/spec/alexandria/export_library_spec.rb +65 -19
  90. data/spec/alexandria/library_collection_spec.rb +24 -0
  91. data/spec/alexandria/library_spec.rb +68 -53
  92. data/spec/alexandria/library_store_spec.rb +33 -1
  93. data/spec/alexandria/preferences_spec.rb +7 -7
  94. data/spec/alexandria/pseudo_marc_parser_spec.rb +71 -0
  95. data/spec/alexandria/scanners/cue_cat_spec.rb +11 -4
  96. data/spec/alexandria/scanners/keyboard_wedge_spec.rb +47 -0
  97. data/spec/alexandria/smart_library_spec.rb +7 -5
  98. data/spec/alexandria/ui/about_dialog_spec.rb +2 -2
  99. data/spec/alexandria/ui/acquire_dialog_spec.rb +8 -3
  100. data/spec/alexandria/ui/alert_dialog_spec.rb +6 -4
  101. data/spec/alexandria/ui/bad_isbns_dialog_spec.rb +2 -2
  102. data/spec/alexandria/ui/book_properties_dialog_spec.rb +5 -5
  103. data/spec/alexandria/ui/confirm_erase_dialog_spec.rb +19 -3
  104. data/spec/alexandria/ui/conflict_while_copying_dialog_spec.rb +2 -2
  105. data/spec/alexandria/ui/error_dialog_spec.rb +14 -3
  106. data/spec/alexandria/ui/export_dialog_spec.rb +6 -6
  107. data/spec/alexandria/ui/{iconview_spec.rb → icon_view_manager_spec.rb} +2 -2
  108. data/spec/alexandria/ui/import_dialog_spec.rb +3 -3
  109. data/spec/alexandria/ui/keep_bad_isbn_dialog_spec.rb +2 -2
  110. data/spec/alexandria/ui/main_app_spec.rb +0 -2
  111. data/spec/alexandria/ui/new_book_dialog_manual_spec.rb +5 -5
  112. data/spec/alexandria/ui/new_book_dialog_spec.rb +7 -4
  113. data/spec/alexandria/ui/new_provider_dialog_spec.rb +3 -3
  114. data/spec/alexandria/ui/new_smart_library_dialog_spec.rb +9 -7
  115. data/spec/alexandria/ui/preferences_dialog_spec.rb +2 -2
  116. data/spec/alexandria/ui/provider_preferences_dialog_spec.rb +22 -7
  117. data/spec/alexandria/ui/really_delete_dialog_spec.rb +2 -2
  118. data/spec/alexandria/ui/sidepane_manager_spec.rb +2 -2
  119. data/spec/alexandria/ui/skip_entry_dialog_spec.rb +19 -3
  120. data/spec/alexandria/ui/smart_library_properties_dialog_spec.rb +2 -2
  121. data/spec/alexandria/ui/ui_manager_spec.rb +7 -5
  122. data/spec/end_to_end/basic_run_spec.rb +2 -1
  123. data/spec/spec_helper.rb +26 -33
  124. data/tasks/setup.rb +1 -1
  125. data/util/rake/fileinstall.rb +12 -13
  126. data/util/rake/gettextgenerate.rb +1 -1
  127. data/util/rake/omfgenerate.rb +1 -1
  128. metadata +97 -64
  129. /data/spec/alexandria/ui/{sound_spec.rb → sound_effects_player_spec.rb} +0 -0
data/po/it.po CHANGED
@@ -2,6 +2,7 @@
2
2
  # Copyright (C) 2005 Mirko Maischberger <mirko@lilik.it>
3
3
  # Copyright (C) 2007 Marco Costantini <costanti@science.unitn.it>
4
4
  # Copyright (C) 2008 Giacomo Margarito <giacomomargarito@gmail.com>
5
+ # Copyright (C) 2025 Albano Battistella <albanobattistella@gmail.com>
5
6
  # This file is distributed under the same license as the Alexandria package.
6
7
  #
7
8
  msgid ""
@@ -9,10 +10,10 @@ msgstr ""
9
10
  "Project-Id-Version: 0.6.3\n"
10
11
  "Report-Msgid-Bugs-To: \n"
11
12
  "POT-Creation-Date: 2020-12-26 12:17+0100\n"
12
- "PO-Revision-Date: 2008-11-04 23:32+0100\n"
13
- "Last-Translator: Giacomo Margarito <giacomomargarito@gmail.com>\n"
13
+ "PO-Revision-Date: 2025-04-30 19:32+0100\n"
14
+ "Last-Translator: Albano Battistella <albanobattistella@gmail.com>\n"
14
15
  "Language-Team: Alexandria\n"
15
- "Language: \n"
16
+ "Language: it\n"
16
17
  "MIME-Version: 1.0\n"
17
18
  "Content-Type: text/plain; charset=UTF-8\n"
18
19
  "Content-Transfer-Encoding: 8bit\n"
@@ -48,7 +49,7 @@ msgstr "Tipo di ricerca non valido."
48
49
 
49
50
  #: ../lib/alexandria/book_providers.rb:205
50
51
  msgid "Enabled"
51
- msgstr ""
52
+ msgstr "Abilitato"
52
53
 
53
54
  #: ../lib/alexandria/book_providers/z3950.rb:22
54
55
  msgid "Hostname"
@@ -87,9 +88,8 @@ msgid "British Library"
87
88
  msgstr "British Library"
88
89
 
89
90
  #: ../lib/alexandria/book_providers/z3950.rb:374
90
- #, fuzzy
91
91
  msgid "Invalid ISBN"
92
- msgstr "Codice ISBN '%s' non valido"
92
+ msgstr "ISBN non valido"
93
93
 
94
94
  #: ../lib/alexandria/export_format.rb:18
95
95
  msgid "Archived ONIX XML"
@@ -133,15 +133,15 @@ msgstr "Elenco di ISBN (*.txt)"
133
133
 
134
134
  #: ../lib/alexandria/import_library.rb:25
135
135
  msgid "GoodReads CSV"
136
- msgstr ""
136
+ msgstr "CSV di GoodReads"
137
137
 
138
138
  #: ../lib/alexandria/import_library.rb:65
139
139
  msgid "Unsupported type"
140
- msgstr ""
140
+ msgstr "Tipo non supportato"
141
141
 
142
142
  #: ../lib/alexandria/import_library_csv.rb:199
143
143
  msgid "Not Recognized"
144
- msgstr ""
144
+ msgstr "Non riconosciuto"
145
145
 
146
146
  #: ../lib/alexandria/library_store.rb:37
147
147
  msgid "My Library"
@@ -149,19 +149,19 @@ msgstr "Biblioteca personale"
149
149
 
150
150
  #: ../lib/alexandria/library_store.rb:67
151
151
  msgid "Not a book: %<book>s"
152
- msgstr ""
152
+ msgstr "Non è un libro: %<book>"
153
153
 
154
154
  #: ../lib/alexandria/library_store.rb:78
155
155
  msgid "%<file>s isbn is not okay"
156
- msgstr ""
156
+ msgstr "L'ISBN di %<file> non è corretto"
157
157
 
158
158
  #: ../lib/alexandria/library_store.rb:83
159
159
  msgid "%<file>s version is not okay"
160
- msgstr ""
160
+ msgstr "La versione di %<file> non è corretta"
161
161
 
162
162
  #: ../lib/alexandria/library_store.rb:88
163
163
  msgid "%<file>s pub year is not okay"
164
- msgstr ""
164
+ msgstr "L'anno di pubblicazione di %<file> non è corretto"
165
165
 
166
166
  #: ../lib/alexandria/models/library.rb:42
167
167
  msgid "Untitled"
@@ -169,19 +169,19 @@ msgstr "Senza titolo"
169
169
 
170
170
  #: ../lib/alexandria/models/library.rb:284
171
171
  msgid "Book %<isbn>s was already deleted"
172
- msgstr ""
172
+ msgstr "Il libro %<isbn> è già stato eliminato"
173
173
 
174
174
  #: ../lib/alexandria/scanners/cue_cat.rb:75
175
175
  msgid "Don't know how to handle type %<type>s (barcode: %<code>s)"
176
- msgstr ""
176
+ msgstr "Non so come gestire il tipo %<tipo>s (codice a barre: %<codice>s)"
177
177
 
178
178
  #: ../lib/alexandria/scanners/cue_cat.rb:109
179
179
  msgid "Error parsing CueCat input"
180
- msgstr ""
180
+ msgstr "Errore durante l'analisi dell'input di CueCat"
181
181
 
182
182
  #: ../lib/alexandria/scanners/keyboard.rb:51
183
183
  msgid "Unknown scan data %s<data>"
184
- msgstr ""
184
+ msgstr "Dati di scansione sconosciuti %s<dati>"
185
185
 
186
186
  #: ../lib/alexandria/smart_library.rb:49
187
187
  msgid "Favorite"
@@ -240,7 +240,7 @@ msgstr "Note"
240
240
  #: ../lib/alexandria/smart_library.rb:303 ../lib/alexandria/ui/listview.rb:86
241
241
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:230
242
242
  msgid "Tags"
243
- msgstr "Tags"
243
+ msgstr "Tag"
244
244
 
245
245
  #: ../lib/alexandria/smart_library.rb:304
246
246
  msgid "Loaning State"
@@ -328,44 +328,43 @@ msgstr "non è nell'ultimo"
328
328
 
329
329
  #: ../lib/alexandria/smart_library.rb:465
330
330
  msgid "invalid operand klass %<klass>s"
331
- msgstr ""
331
+ msgstr "classe operando non valida %<klass>s"
332
332
 
333
333
  #: ../lib/alexandria/ui/acquire_dialog.rb:206
334
334
  msgid "There was %d duplicate"
335
335
  msgid_plural "There were %d duplicates"
336
- msgstr[0] ""
337
- msgstr[1] ""
336
+ msgstr[0] "C'era %d duplicato"
337
+ msgstr[1] "C'erano %d duplicati"
338
338
 
339
339
  #: ../lib/alexandria/ui/acquire_dialog.rb:209
340
- #, fuzzy
341
340
  msgid "Couldn't add this book"
342
341
  msgid_plural "Couldn't add these books"
343
342
  msgstr[0] "Impossibile aggiungere il libro"
344
- msgstr[1] "Impossibile aggiungere il libro"
343
+ msgstr[1] "Impossibile aggiungere i libri"
345
344
 
346
345
  #: ../lib/alexandria/ui/acquire_dialog.rb:288
347
346
  #: ../lib/alexandria/ui/new_book_dialog.rb:498
348
347
  msgid "Searching Provider '%s'..."
349
- msgstr ""
348
+ msgstr "Ricerca del provider '%s'..."
350
349
 
351
350
  #: ../lib/alexandria/ui/acquire_dialog.rb:289
352
351
  #: ../lib/alexandria/ui/new_book_dialog.rb:499
353
352
  msgid "Error while Searching Provider '%s'"
354
- msgstr ""
353
+ msgstr "Errore durante la ricerca del provider '%s'"
355
354
 
356
355
  #: ../lib/alexandria/ui/acquire_dialog.rb:290
357
356
  #: ../lib/alexandria/ui/new_book_dialog.rb:500
358
357
  msgid "Not Found at Provider '%s'"
359
- msgstr ""
358
+ msgstr "Non trovato presso il provider '%s'"
360
359
 
361
360
  #: ../lib/alexandria/ui/acquire_dialog.rb:291
362
361
  #: ../lib/alexandria/ui/new_book_dialog.rb:501
363
362
  msgid "Found at Provider '%s'"
364
- msgstr ""
363
+ msgstr "Trovato presso il fornitore '%s'"
365
364
 
366
365
  #: ../lib/alexandria/ui/acquire_dialog.rb:403
367
366
  msgid "Ready to use %s barcode scanner"
368
- msgstr ""
367
+ msgstr "Scanner di codici a barre %s pronto all'uso"
369
368
 
370
369
  #: ../lib/alexandria/ui/acquire_dialog.rb:427
371
370
  msgid "Click below to scan _barcodes"
@@ -419,7 +418,7 @@ msgstr[1] "%d giorni"
419
418
 
420
419
  #: ../lib/alexandria/ui/book_properties_dialog_base.rb:268
421
420
  msgid "out of range"
422
- msgstr ""
421
+ msgstr "fuori portata"
423
422
 
424
423
  #: ../lib/alexandria/ui/callbacks.rb:57
425
424
  msgid "The following lines are not valid ISBNs and were not imported:"
@@ -428,7 +427,7 @@ msgstr ""
428
427
 
429
428
  #: ../lib/alexandria/ui/callbacks.rb:62
430
429
  msgid "Books could not be found for the following ISBNs:"
431
- msgstr ""
430
+ msgstr "Non è stato possibile trovare libri con i seguenti ISBN:"
432
431
 
433
432
  #: ../lib/alexandria/ui/callbacks.rb:362
434
433
  msgid "_Library"
@@ -483,9 +482,8 @@ msgid "Export the selected library"
483
482
  msgstr "Esporta la biblioteca selezionata"
484
483
 
485
484
  #: ../lib/alexandria/ui/callbacks.rb:369
486
- #, fuzzy
487
485
  msgid "A_cquire from Scanner..."
488
- msgstr "_Acquisici con lo scanner..."
486
+ msgstr "_Acquisici da scanner..."
489
487
 
490
488
  #: ../lib/alexandria/ui/callbacks.rb:369
491
489
  msgid "Acquire books from a scanner"
@@ -806,15 +804,14 @@ msgid "Invalid ISBN '%s'"
806
804
  msgstr "Codice ISBN '%s' non valido"
807
805
 
808
806
  #: ../lib/alexandria/ui/keep_bad_isbn_dialog.rb:18
809
- #, fuzzy
810
807
  msgid ""
811
808
  "The book titled '%s' has an invalid ISBN, but still exists in the providers "
812
809
  "libraries. Do you want to keep the book but change the ISBN or cancel the "
813
810
  "addition?"
814
811
  msgstr ""
815
- "Il libro dal titolo '%s' ha un codice ISBN non valido, ma esiste ancora "
816
- "nella biblioteca del provider. Si desidera mantenere il libro, ma cambiare "
817
- "il codice ISBN o cancellare l'operazione di aggiunta?"
812
+ "Il libro intitolato '%s' ha un ISBN non valido, ma è ancora presente nelle biblioteche "
813
+ "del fornitore. Vuoi conservare il libro ma modificare l'ISBN o annullare "
814
+ "l'aggiunta?"
818
815
 
819
816
  #: ../lib/alexandria/ui/keep_bad_isbn_dialog.rb:24
820
817
  msgid "_Keep"
@@ -825,9 +822,8 @@ msgid "New Library"
825
822
  msgstr "Nuova Biblioteca"
826
823
 
827
824
  #: ../lib/alexandria/ui/listview.rb:56
828
- #, fuzzy
829
825
  msgid "Loaned To"
830
- msgstr "Prestato"
826
+ msgstr "Prestato a"
831
827
 
832
828
  #: ../lib/alexandria/ui/new_book_dialog.rb:155
833
829
  msgid "A problem occurred while downloading images"
@@ -835,7 +831,7 @@ msgstr "Ci sono stati problemi durante lo scaricamento delle immagini"
835
831
 
836
832
  #: ../lib/alexandria/ui/new_book_dialog.rb:194
837
833
  msgid "Iter is invalid! %s"
838
- msgstr ""
834
+ msgstr "Iter non valido! %s"
839
835
 
840
836
  #: ../lib/alexandria/ui/new_book_dialog.rb:266
841
837
  msgid "Unable to find matches for your search"
@@ -847,7 +843,7 @@ msgstr "%s, di %s"
847
843
 
848
844
  #: ../lib/alexandria/ui/new_book_dialog.rb:308
849
845
  msgid "Copying %s into tree view."
850
- msgstr ""
846
+ msgstr "Copia di %s nella vista ad albero."
851
847
 
852
848
  #: ../lib/alexandria/ui/new_book_dialog.rb:336
853
849
  msgid ""
@@ -950,19 +946,16 @@ msgid "Invalid library name '%s'"
950
946
  msgstr "Nome della biblioteca '%s' non valido"
951
947
 
952
948
  #: ../lib/alexandria/ui/sidepane_manager.rb:55
953
- #, fuzzy
954
949
  msgid "The name provided contains the disallowed character <b>%s</b>"
955
- msgstr "Il nome fornito contiene il carattere non legale '<i>%s</i>'."
950
+ msgstr "Il nome fornito contiene il carattere non consentito <b>%s</b>."
956
951
 
957
952
  #: ../lib/alexandria/ui/sidepane_manager.rb:58
958
- #, fuzzy
959
953
  msgid "Invalid library name"
960
- msgstr "Nome della biblioteca '%s' non valido"
954
+ msgstr "Nome della biblioteca non valido"
961
955
 
962
956
  #: ../lib/alexandria/ui/sidepane_manager.rb:59
963
- #, fuzzy
964
957
  msgid "The name provided contains invalid characters."
965
- msgstr "Il nome fornito contiene il carattere non legale '<i>%s</i>'."
958
+ msgstr "Il nome fornito contiene caratteri non validi."
966
959
 
967
960
  #: ../lib/alexandria/ui/sidepane_manager.rb:65
968
961
  msgid "The library name can not be empty"
@@ -1108,12 +1101,11 @@ msgstr[1] "%d libri selezionati"
1108
1101
 
1109
1102
  #: ../lib/alexandria/ui/ui_manager.rb:552
1110
1103
  msgid "unrecognized update event"
1111
- msgstr ""
1104
+ msgstr "evento di aggiornamento non riconosciuto"
1112
1105
 
1113
1106
  #: ../lib/alexandria/ui/ui_manager.rb:597
1114
- #, fuzzy
1115
1107
  msgid "Loading libraries..."
1116
- msgstr "Caricamento di '%s'..."
1108
+ msgstr "Caricamento librerie..."
1117
1109
 
1118
1110
  #: ../lib/alexandria/ui/ui_manager.rb:614
1119
1111
  msgid ""
@@ -1139,7 +1131,7 @@ msgstr "In '_%s'"
1139
1131
 
1140
1132
  #: ../lib/alexandria/web_themes.rb:64
1141
1133
  msgid "File %<file>s not found"
1142
- msgstr ""
1134
+ msgstr "File %<file>s non trovato"
1143
1135
 
1144
1136
  #: ../share/alexandria/glade/acquire_dialog__builder.glade:9
1145
1137
  msgid "Acquire from Scanner"
@@ -1168,7 +1160,7 @@ msgstr "per parola chiave"
1168
1160
 
1169
1161
  #: ../share/alexandria/glade/new_book_dialog__builder.glade:115
1170
1162
  msgid "_Keep Dialog Open after Adding Book"
1171
- msgstr ""
1163
+ msgstr "Mantieni aperta la finestra di dialogo dopo aver aggiunto il libro"
1172
1164
 
1173
1165
  #: ../share/alexandria/glade/new_book_dialog__builder.glade:285
1174
1166
  msgid "_Search:"
@@ -1224,19 +1216,16 @@ msgid "Want?"
1224
1216
  msgstr "Vuoi?"
1225
1217
 
1226
1218
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:245
1227
- #, fuzzy
1228
1219
  msgid "Loaned to"
1229
- msgstr "Prestato"
1220
+ msgstr "Prestato a"
1230
1221
 
1231
1222
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:271
1232
- #, fuzzy
1233
1223
  msgid "_List View"
1234
- msgstr "Vista ad elenco"
1224
+ msgstr "_Vista ad elenco"
1235
1225
 
1236
1226
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:290
1237
- #, fuzzy
1238
1227
  msgid "<b>Book Data Providers</b>"
1239
- msgstr "<b>_Provider</b>"
1228
+ msgstr "Fornitori di dati di libri"
1240
1229
 
1241
1230
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:372
1242
1231
  msgid "_Setup"
@@ -1254,49 +1243,47 @@ msgstr ""
1254
1243
 
1255
1244
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:486
1256
1245
  msgid "Custom _Z39.50 Providers"
1257
- msgstr ""
1246
+ msgstr "Fornitori personalizzati _Z39.50"
1258
1247
 
1259
1248
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:490
1260
1249
  msgid ""
1261
1250
  "Add and remove your own Z39.50 providers.\n"
1262
1251
  "Requires the Ruby/ZOOM software library."
1263
1252
  msgstr ""
1253
+ "Aggiungi e rimuovi i tuoi provider Z39.50."
1254
+ "Richiede la libreria software Ruby/ZOOM."
1264
1255
 
1265
1256
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:511
1266
- #, fuzzy
1267
1257
  msgid "_Providers"
1268
- msgstr "Provider"
1258
+ msgstr "Provides"
1269
1259
 
1270
1260
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:537
1271
- #, fuzzy
1272
1261
  msgid "<b>Barcode Scanner Device</b>"
1273
- msgstr "_Lettore dei codici a barre pronto"
1262
+ msgstr "<b>Dispositivo scanner per codici a barre</b>"
1274
1263
 
1275
1264
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:556
1276
1265
  msgid "_Device type:"
1277
- msgstr ""
1266
+ msgstr "_Tipo di dispositivo:"
1278
1267
 
1279
1268
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:602
1280
1269
  msgid "<b>Sound Effects</b>"
1281
- msgstr ""
1270
+ msgstr "<b>Effetti sonori</b>"
1282
1271
 
1283
1272
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:618
1284
- #, fuzzy
1285
1273
  msgid "Scanning"
1286
- msgstr "Prestito"
1274
+ msgstr "Scansione"
1287
1275
 
1288
1276
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:632
1289
1277
  msgid "Good Scan / Bad Scan"
1290
- msgstr ""
1278
+ msgstr "Scansione buona / Scansione cattiva"
1291
1279
 
1292
1280
  #: ../share/alexandria/glade/preferences_dialog__builder.glade:667
1293
- #, fuzzy
1294
1281
  msgid "_Barcode Scanner"
1295
- msgstr "_Lettore dei codici a barre pronto"
1282
+ msgstr "_Scanner per codici a barre"
1296
1283
 
1297
1284
  #: ../share/alexandria/glade/main_app__builder.glade:48
1298
1285
  msgid "_Libraries:"
1299
- msgstr "Bib_lioteche:"
1286
+ msgstr "_Biblioteche:"
1300
1287
 
1301
1288
  #: ../share/alexandria/glade/book_properties_dialog__builder.glade:60
1302
1289
  msgid "_Title:"
@@ -1308,7 +1295,7 @@ msgstr "_Autori:"
1308
1295
 
1309
1296
  #: ../share/alexandria/glade/book_properties_dialog__builder.glade:213
1310
1297
  msgid "Tags:"
1311
- msgstr "Tags:"
1298
+ msgstr "Tag:"
1312
1299
 
1313
1300
  #: ../share/alexandria/glade/book_properties_dialog__builder.glade:245
1314
1301
  msgid "_Binding:"
@@ -1339,13 +1326,12 @@ msgid "Read it?"
1339
1326
  msgstr "Leggerlo?"
1340
1327
 
1341
1328
  #: ../share/alexandria/glade/book_properties_dialog__builder.glade:576
1342
- #, fuzzy
1343
1329
  msgid "Select Date"
1344
- msgstr "_Seleziona tutto"
1330
+ msgstr "_Seleziona data"
1345
1331
 
1346
1332
  #: ../share/alexandria/glade/book_properties_dialog__builder.glade:577
1347
1333
  msgid "Clear Date"
1348
- msgstr ""
1334
+ msgstr "Cancella data"
1349
1335
 
1350
1336
  #: ../share/alexandria/glade/book_properties_dialog__builder.glade:587
1351
1337
  msgid "Own it?"
@@ -1386,9 +1372,8 @@ msgstr "Gestisce la vostra biblioteca"
1386
1372
  #~ msgid "Locale"
1387
1373
  #~ msgstr "Lingua"
1388
1374
 
1389
- #, fuzzy
1390
1375
  #~ msgid "Associate Tag"
1391
- #~ msgstr "ID associato"
1376
+ #~ msgstr "Tag associato"
1392
1377
 
1393
1378
  #~ msgid "Unable to launch the web browser"
1394
1379
  #~ msgstr "Impossibile avviare il navigatore web"
@@ -1418,13 +1403,11 @@ msgstr "Gestisce la vostra biblioteca"
1418
1403
  #~ msgid "There's a problem"
1419
1404
  #~ msgstr "Si è verificato un problema"
1420
1405
 
1421
- #, fuzzy
1422
1406
  #~ msgid "Disable Provider"
1423
- #~ msgstr "Nuovo Provider"
1407
+ #~ msgstr "Disabilita Provider"
1424
1408
 
1425
- #, fuzzy
1426
1409
  #~ msgid "Enable Provider"
1427
- #~ msgstr "Nuovo Provider"
1410
+ #~ msgstr "Abilita Provider"
1428
1411
 
1429
1412
  #~ msgid "Main Window"
1430
1413
  #~ msgstr "Finestra principale"
@@ -1459,9 +1442,8 @@ msgstr "Gestisce la vostra biblioteca"
1459
1442
  #~ msgid "Development token"
1460
1443
  #~ msgstr "Token di sviluppo"
1461
1444
 
1462
- #, fuzzy
1463
1445
  #~ msgid "Couldn't add these books"
1464
- #~ msgstr "Impossibile aggiungere il libro"
1446
+ #~ msgstr "Non è stato possibile aggiungere questi libri"
1465
1447
 
1466
1448
  #~ msgid "_Refresh"
1467
1449
  #~ msgstr "_Aggiorna"
@@ -7,7 +7,16 @@
7
7
  require "spec_helper"
8
8
 
9
9
  describe Alexandria::BookProviders::BLProvider do
10
- it "works" do
11
- assert_correct_search_result(described_class, "9781853260803")
10
+ it "produces a valid search result" do
11
+ skip "Search of the British Library is offline as per 4 February 2024"
12
+ expect(described_class).to have_correct_search_result_for "9781853260803"
13
+ end
14
+
15
+ describe "#url" do
16
+ it "returns nil" do
17
+ book = an_artist_of_the_floating_world
18
+ url = described_class.instance.url(book)
19
+ expect(url).to be_nil
20
+ end
12
21
  end
13
22
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is part of Alexandria.
4
+ #
5
+ # See the file README.md for authorship and licensing information.
6
+
7
+ require "spec_helper"
8
+
9
+ RSpec.describe Alexandria::BookProviders::DoubanProvider do
10
+ describe "#url" do
11
+ it "returns nil" do
12
+ book = an_artist_of_the_floating_world
13
+ url = described_class.instance.url(book)
14
+ expect(url).to be_nil
15
+ end
16
+ end
17
+ end
@@ -8,10 +8,18 @@ require "spec_helper"
8
8
 
9
9
  describe Alexandria::BookProviders::LOCProvider do
10
10
  it "works for a book with ASCII title" do
11
- assert_correct_search_result(described_class, "9780805335583")
11
+ expect(described_class).to have_correct_search_result_for "9780805335583"
12
12
  end
13
13
 
14
14
  it "works for a book with a title with non-ASCII letters" do
15
- assert_correct_search_result(described_class, "9782070379248")
15
+ expect(described_class).to have_correct_search_result_for "9782070379248"
16
+ end
17
+
18
+ describe "#url" do
19
+ it "returns nil" do
20
+ book = an_artist_of_the_floating_world
21
+ url = described_class.instance.url(book)
22
+ expect(url).to be_nil
23
+ end
16
24
  end
17
25
  end
@@ -7,7 +7,15 @@
7
7
  require "spec_helper"
8
8
 
9
9
  describe Alexandria::BookProviders::SBNProvider do
10
- it "works" do
11
- assert_correct_search_result(described_class, "9788835926436")
10
+ it "produces a valid search result" do
11
+ expect(described_class).to have_correct_search_result_for "9788835926436"
12
+ end
13
+
14
+ describe "#url" do
15
+ it "returns nil" do
16
+ book = an_artist_of_the_floating_world
17
+ url = described_class.instance.url(book)
18
+ expect(url).to be_nil
19
+ end
12
20
  end
13
21
  end
@@ -114,6 +114,14 @@ RSpec.describe Alexandria::BookProviders::ThaliaProvider do
114
114
  stub_request(:get, "https://www.thalia.de/shop/home/artikeldetails/ID134292338.html")
115
115
  .to_return(status: 200, body: normal_people_details, headers: {})
116
116
 
117
- assert_correct_search_result(described_class, "9780571334650")
117
+ expect(described_class).to have_correct_search_result_for "9780571334650"
118
+ end
119
+
120
+ describe "#url" do
121
+ it "returns an url with isbn" do
122
+ book = an_artist_of_the_floating_world
123
+ url = described_class.instance.url(book)
124
+ expect(url).to eq "https://www.thalia.de/shop/bde_bu_hg_startseite/suche/?sq=057114716X"
125
+ end
118
126
  end
119
127
  end
@@ -139,22 +139,42 @@ RSpec.describe Alexandria::BookProviders::WorldCatProvider do
139
139
  "sky-catalogue-20000-ed-by-alan-hirshfeld-and-roger-w-sinnott" \
140
140
  "/oclc/476534140&referer=brief_results")
141
141
  .to_return(status: 200, body: +sky_catalog_details, headers: {})
142
- assert_correct_search_result(described_class, "9780521247108")
142
+ expect(described_class).to have_correct_search_result_for "9780521247108"
143
143
  end
144
144
 
145
145
  it "works with vernacular" do
146
146
  stub_request(:get, "https://www.worldcat.org/search?q=isbn:9785941454136&qt=advanced")
147
147
  .to_return(status: 200, body: +florence_ru_details, headers: {})
148
- assert_correct_search_result(described_class, "9785941454136")
148
+ expect(described_class).to have_correct_search_result_for "9785941454136"
149
149
  end
150
150
 
151
- it "works with multiple authors" do
152
- stub_request(:get, "https://www.worldcat.org/search?q=isbn:9785941454136&qt=advanced")
153
- .to_return(status: 200, body: +florence_ru_details, headers: {})
154
- results = assert_correct_search_result(described_class,
155
- "9785941454136")
156
- this_book = results.first
157
- expect(this_book.authors).to be_instance_of(Array), "Not an array!"
158
- expect(this_book.authors.length).to eq(2), "Wrong number of authors for this book!"
151
+ context "when book has multiple authors" do
152
+ let(:search_result) do
153
+ described_class.instance.search("9785941454136",
154
+ Alexandria::BookProviders::SEARCH_BY_ISBN)
155
+ rescue SocketError
156
+ skip "Service is offline"
157
+ end
158
+
159
+ before do
160
+ stub_request(:get, "https://www.worldcat.org/search?q=isbn:9785941454136&qt=advanced")
161
+ .to_return(status: 200, body: +florence_ru_details, headers: {})
162
+ end
163
+
164
+ it "returns all authors" do
165
+ this_book, = search_result
166
+ aggregate_failures do
167
+ expect(this_book.authors).to be_instance_of(Array), "Not an array!"
168
+ expect(this_book.authors.length).to eq(2), "Wrong number of authors for this book!"
169
+ end
170
+ end
171
+ end
172
+
173
+ describe "#url" do
174
+ it "returns an url with isbn" do
175
+ book = an_artist_of_the_floating_world
176
+ url = described_class.instance.url(book)
177
+ expect(url).to eq "https://www.worldcat.org/search?q=isbn%3A9780571147168&qt=advanced"
178
+ end
159
179
  end
160
180
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is part of Alexandria.
4
+ #
5
+ # See the file README.md for authorship and licensing information.
6
+
7
+ require "spec_helper"
8
+
9
+ describe Alexandria::BookProviders::Z3950Provider do
10
+ let(:zoom_connection) { instance_double(ZOOM::Connection) }
11
+
12
+ before do
13
+ allow(ZOOM::Connection).to receive(:new).and_return zoom_connection
14
+ end
15
+
16
+ it "raises a custom error when a timeout occurs" do
17
+ allow(zoom_connection).to receive(:connect).and_raise RuntimeError, "Timeout (10007)"
18
+ expect do
19
+ described_class.new.search("9781853260803", Alexandria::BookProviders::SEARCH_BY_ISBN)
20
+ end.to raise_error Alexandria::BookProviders::ConnectionError
21
+ end
22
+ end
@@ -22,16 +22,18 @@ require "spec_helper"
22
22
 
23
23
  describe Alexandria::Book do
24
24
  it "is a thing" do
25
- an_artist_of_the_floating_world
25
+ expect(an_artist_of_the_floating_world).to be_a described_class
26
26
  end
27
27
 
28
28
  it "establishes equality only with books with the same identity" do
29
29
  book = an_artist_of_the_floating_world
30
30
  same_book = an_artist_of_the_floating_world
31
- expect(same_book).to eq book
32
31
  different_book = an_artist_of_the_floating_world
33
32
  different_book.isbn = "9780571147999"
34
- expect(different_book).not_to eq book
33
+ aggregate_failures do
34
+ expect(same_book).to eq book
35
+ expect(different_book).not_to eq book
36
+ end
35
37
  end
36
38
 
37
39
  describe "#rating" do
@@ -6,7 +6,7 @@
6
6
 
7
7
  require "spec_helper"
8
8
 
9
- RSpec.describe Alexandria do
9
+ RSpec.describe Alexandria::Console do
10
10
  let(:lib_version) { File.join(LIBDIR, "0.6.2") }
11
11
 
12
12
  before do