Class: SiSU_Translate::Source

Inherits:
Object
  • Object
show all
Defined in:
lib/sisu/prog_text_translation.rb

Instance Method Summary collapse

Constructor Details

#initialize(md, doc_lang, trans_str = '') ⇒ Source

Returns a new instance of Source.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/sisu/prog_text_translation.rb', line 61

def initialize(md,doc_lang,trans_str='')
  @md,@doc_lang,@trans_str=md,doc_lang,trans_str
  @lang_class=case @doc_lang
  when /American/i       then English.new(md,doc_lang,trans_str)    # tag depreciated, see iso 639-2
  when /English/i        then English.new(md,doc_lang,trans_str)
  when /French/i         then French.new(md,doc_lang,trans_str)
  when /German/i         then German.new(md,doc_lang,trans_str)
  when /Italian/i        then Italian.new(md,doc_lang,trans_str)
  when /Spanish/i        then Spanish.new(md,doc_lang,trans_str)
  when /Portuguese Brazil|Brazilian(?: Portuguese)?/i
                              Portuguese.new(md,doc_lang,trans_str) # tag depreciated, see iso 639-2
  when /Portuguese/i     then Portuguese.new(md,doc_lang,trans_str)
  when /Swedish/i        then Swedish.new(md,doc_lang,trans_str)
  when /Danish/i         then Danish.new(md,doc_lang,trans_str)
  when /Finnish/i        then Finnish.new(md,doc_lang,trans_str)
  when /Norwegian/i      then Norwegian.new(md,doc_lang,trans_str)
  when /Icelandic/i      then Icelandic.new(md,doc_lang,trans_str)
  when /Dutch/i          then Dutch.new(md,doc_lang,trans_str)
  when /Estonian/i       then Estonian.new(md,doc_lang,trans_str)
  when /Hungarian/i      then Hungarian.new(md,doc_lang,trans_str)
  when /Polish/i         then Polish.new(md,doc_lang,trans_str)
  when /Romanian/i       then Romanian.new(md,doc_lang,trans_str)
  when /Russian/i        then Russian.new(md,doc_lang,trans_str)
  when /Greek/i          then Greek.new(md,doc_lang,trans_str)
  when /Ukranian/i       then Ukranian.new(md,doc_lang,trans_str)
  when /Turkish/i        then Turkish.new(md,doc_lang,trans_str)
  when /Slovenian/i      then Slovenian.new(md,doc_lang,trans_str)
  when /Croatian/i       then Croatian.new(md,doc_lang,trans_str)
  when /Slovak(?:ian)?/i then Slovak.new(md,doc_lang,trans_str)
  when /Czech/i          then Czech.new(md,doc_lang,trans_str)
  when /Bulgarian/i      then Bulgarian.new(md,doc_lang,trans_str)
  else                        English.new(md,doc_lang,trans_str)
  end
end

Instance Method Details

#abstractObject



152
153
154
# File 'lib/sisu/prog_text_translation.rb', line 152

def abstract
  @lang_class.abstract
end

#authorObject



122
123
124
# File 'lib/sisu/prog_text_translation.rb', line 122

def author
  @lang_class.author
end

#cls_deweyObject



209
210
211
# File 'lib/sisu/prog_text_translation.rb', line 209

def cls_dewey
  @lang_class.cls_dewey
end

#cls_gutenbergObject



215
216
217
# File 'lib/sisu/prog_text_translation.rb', line 215

def cls_gutenberg
  @lang_class.cls_gutenberg
end

#cls_isbnObject



218
219
220
# File 'lib/sisu/prog_text_translation.rb', line 218

def cls_isbn
  @lang_class.cls_isbn
end

#cls_locObject



206
207
208
# File 'lib/sisu/prog_text_translation.rb', line 206

def cls_loc
  @lang_class.cls_loc
end

#cls_oclcObject



212
213
214
# File 'lib/sisu/prog_text_translation.rb', line 212

def cls_oclc
  @lang_class.cls_oclc
end

#commentsObject



203
204
205
# File 'lib/sisu/prog_text_translation.rb', line 203

def comments
  @lang_class.comments
end

#contentsObject



143
144
145
# File 'lib/sisu/prog_text_translation.rb', line 143

def contents
  @lang_class.contents
end

#contributorObject



125
126
127
# File 'lib/sisu/prog_text_translation.rb', line 125

def contributor
  @lang_class.contributor
end

#coverageObject



197
198
199
# File 'lib/sisu/prog_text_translation.rb', line 197

def coverage
  @lang_class.coverage
end

#dateObject



161
162
163
# File 'lib/sisu/prog_text_translation.rb', line 161

def date
  @lang_class.date
end

#date_availableObject



167
168
169
# File 'lib/sisu/prog_text_translation.rb', line 167

def date_available
  @lang_class.date_available
end

#date_createdObject



164
165
166
# File 'lib/sisu/prog_text_translation.rb', line 164

def date_created
  @lang_class.date_created
end

#date_issuedObject



176
177
178
# File 'lib/sisu/prog_text_translation.rb', line 176

def date_issued
  @lang_class.date_issued
end

#date_modifiedObject



173
174
175
# File 'lib/sisu/prog_text_translation.rb', line 173

def date_modified
  @lang_class.date_modified
end

#date_validObject



170
171
172
# File 'lib/sisu/prog_text_translation.rb', line 170

def date_valid
  @lang_class.date_valid
end

#descriptionObject

dc (watch)



149
150
151
# File 'lib/sisu/prog_text_translation.rb', line 149

def description #dc (watch)
  @lang_class.description
end

#dgstObject



236
237
238
# File 'lib/sisu/prog_text_translation.rb', line 236

def dgst
  @lang_class.dgst
end

#digitized_byObject



140
141
142
# File 'lib/sisu/prog_text_translation.rb', line 140

def digitized_by
  @lang_class.digitized_by
end

#file_sizeObject



104
105
106
# File 'lib/sisu/prog_text_translation.rb', line 104

def file_size
  @lang_class.file_size
end

#filenameObject



95
96
97
# File 'lib/sisu/prog_text_translation.rb', line 95

def filename
  @lang_class.filename
end

#filetype_descriptionObject



101
102
103
# File 'lib/sisu/prog_text_translation.rb', line 101

def filetype_description
  @lang_class.filetype_description
end

#fnsObject



230
231
232
# File 'lib/sisu/prog_text_translation.rb', line 230

def fns
  @lang_class.fns
end

#formatObject



185
186
187
# File 'lib/sisu/prog_text_translation.rb', line 185

def format
  @lang_class.format
end

#full_titleObject

dc



113
114
115
# File 'lib/sisu/prog_text_translation.rb', line 113

def full_title #dc
  @lang_class.full_title
end

#identifierObject



188
189
190
# File 'lib/sisu/prog_text_translation.rb', line 188

def identifier
  @lang_class.identifier
end

#illustratorObject



131
132
133
# File 'lib/sisu/prog_text_translation.rb', line 131

def illustrator
  @lang_class.illustrator
end

#keywordsObject



200
201
202
# File 'lib/sisu/prog_text_translation.rb', line 200

def keywords
  @lang_class.keywords
end

#languageObject



179
180
181
# File 'lib/sisu/prog_text_translation.rb', line 179

def language
  @lang_class.language
end

#language_listObject



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
# File 'lib/sisu/prog_text_translation.rb', line 275

def language_list
  case @trans_str
  when /American/i       then 'American English'                    # tag depreciated, see iso 639-2
  when /English/i        then 'English'
  when /French/i         then 'français'
  when /German/i         then 'Deutsch'
  when /Italian/i        then 'Italiano'
  when /Spanish/i        then 'español'
  when /Portuguese Brazil|Brazilian(?: Portuguese)?/i
                              'Brazilian Português'                 # tag depreciated, see iso 639-2
  when /Portuguese/i     then 'Português'
  when /Swedish/i        then 'svenska'
  when /Danish/i         then 'dansk'
  when /Finnish/i        then 'suomi'
  when /Norwegian/i      then 'norsk'
  when /Icelandic/i      then 'Icelandic'
  when /Dutch/i          then 'Nederlands'
  when /Estonian/i       then 'Estonian'
  when /Hungarian/i      then 'Hungarian'
  when /Polish/i         then 'polski'
  when /Romanian/i       then 'română'
  when /Russian/i        then 'Русский (Russkij)'
  when /Greek/i          then 'Ελληνικά (Ellinika)'
  when /Ukranian/i       then 'українська (ukrajins\'ka)'
  when /Turkish/i        then 'Türkçe'
  when /Slovenian/i      then 'Slovenian'
  when /Croatian/i       then 'Croatian'
  when /Slovak(?:ian)?/i then 'slovensky'            #slovensky ?
  when /Czech/i          then 'česky'
  when /Bulgarian/i      then 'Български (Bəlgarski)'
  when /Japanese/i       then '日本語 (Nihongo)'
  when /Korean/i         then '한국어 (Hangul)'
 #when /Catalan/i        then 'català'
  else                         'English'
  end
  #check on 中文  and عربي
end

#language_list_translatedObject



272
273
274
# File 'lib/sisu/prog_text_translation.rb', line 272

def language_list_translated
  @lang_class.language_list
end

#language_originalObject



182
183
184
# File 'lib/sisu/prog_text_translation.rb', line 182

def language_original
  @lang_class.language_original
end

#language_version_listObject



257
258
259
# File 'lib/sisu/prog_text_translation.rb', line 257

def language_version_list
  @lang_class.language_version_list
end

#last_generatedObject



245
246
247
# File 'lib/sisu/prog_text_translation.rb', line 245

def last_generated
  @lang_class.last_generated
end

#manifest_descriptionObject



263
264
265
# File 'lib/sisu/prog_text_translation.rb', line 263

def manifest_description
  @lang_class.manifest_description
end

#manifest_description_metadataObject



269
270
271
# File 'lib/sisu/prog_text_translation.rb', line 269

def 
  @lang_class.
end

#manifest_description_outputObject



266
267
268
# File 'lib/sisu/prog_text_translation.rb', line 266

def manifest_description_output
  @lang_class.manifest_description_output
end

#metadataObject



98
99
100
# File 'lib/sisu/prog_text_translation.rb', line 98

def 
  @lang_class.
end

#prefix_aObject



221
222
223
# File 'lib/sisu/prog_text_translation.rb', line 221

def prefix_a
  @lang_class.prefix_a
end

#prefix_bObject



224
225
226
# File 'lib/sisu/prog_text_translation.rb', line 224

def prefix_b
  @lang_class.prefix_b
end

#prepared_byObject



137
138
139
# File 'lib/sisu/prog_text_translation.rb', line 137

def prepared_by
  @lang_class.prepared_by
end

#publisherObject



134
135
136
# File 'lib/sisu/prog_text_translation.rb', line 134

def publisher
  @lang_class.publisher
end

#relationObject



194
195
196
# File 'lib/sisu/prog_text_translation.rb', line 194

def relation
  @lang_class.relation
end

#rightsObject



158
159
160
# File 'lib/sisu/prog_text_translation.rb', line 158

def rights
  @lang_class.rights
end

#ruby_versionObject



251
252
253
# File 'lib/sisu/prog_text_translation.rb', line 251

def ruby_version
  @lang_class.ruby_version
end

#sc_dateObject



242
243
244
# File 'lib/sisu/prog_text_translation.rb', line 242

def sc_date
  @lang_class.sc_date
end

#sc_numberObject



239
240
241
# File 'lib/sisu/prog_text_translation.rb', line 239

def sc_number
  @lang_class.sc_number
end

#sisu_versionObject



248
249
250
# File 'lib/sisu/prog_text_translation.rb', line 248

def sisu_version
  @lang_class.sisu_version
end

#sourceObject



191
192
193
# File 'lib/sisu/prog_text_translation.rb', line 191

def source
  @lang_class.source
end

#sourcefileObject



107
108
109
# File 'lib/sisu/prog_text_translation.rb', line 107

def sourcefile
  @lang_class.sourcefile
end

#sourcefile_digestObject



110
111
112
# File 'lib/sisu/prog_text_translation.rb', line 110

def sourcefile_digest
  @lang_class.sourcefile_digest
end

#subjectObject



146
147
148
# File 'lib/sisu/prog_text_translation.rb', line 146

def subject
  @lang_class.subject
end

#subtitleObject



119
120
121
# File 'lib/sisu/prog_text_translation.rb', line 119

def subtitle
  @lang_class.subtitle
end


254
255
256
# File 'lib/sisu/prog_text_translation.rb', line 254

def suggested_links
  @lang_class.suggested_links
end

#titleObject



116
117
118
# File 'lib/sisu/prog_text_translation.rb', line 116

def title
  @lang_class.title
end

#topic_registerObject



227
228
229
# File 'lib/sisu/prog_text_translation.rb', line 227

def topic_register
  @lang_class.topic_register
end

#translatorObject



128
129
130
# File 'lib/sisu/prog_text_translation.rb', line 128

def translator
  @lang_class.translator
end

#typeObject



155
156
157
# File 'lib/sisu/prog_text_translation.rb', line 155

def type
  @lang_class.type
end

#word_countObject



233
234
235
# File 'lib/sisu/prog_text_translation.rb', line 233

def word_count
  @lang_class.word_count
end