Class: SiSU_Translate::Source
- Inherits:
-
Object
- Object
- SiSU_Translate::Source
- Defined in:
- lib/sisu/prog_text_translation.rb
Instance Method Summary collapse
- #abstract ⇒ Object
- #author ⇒ Object
- #cls_dewey ⇒ Object
- #cls_gutenberg ⇒ Object
- #cls_isbn ⇒ Object
- #cls_loc ⇒ Object
- #cls_oclc ⇒ Object
- #comments ⇒ Object
- #contents ⇒ Object
- #contributor ⇒ Object
- #coverage ⇒ Object
- #date ⇒ Object
- #date_available ⇒ Object
- #date_created ⇒ Object
- #date_issued ⇒ Object
- #date_modified ⇒ Object
- #date_valid ⇒ Object
-
#description ⇒ Object
dc (watch).
- #dgst ⇒ Object
- #digitized_by ⇒ Object
- #file_size ⇒ Object
- #filename ⇒ Object
- #filetype_description ⇒ Object
- #fns ⇒ Object
- #format ⇒ Object
-
#full_title ⇒ Object
dc.
- #identifier ⇒ Object
- #illustrator ⇒ Object
-
#initialize(md, doc_lang, trans_str = '') ⇒ Source
constructor
A new instance of Source.
- #keywords ⇒ Object
- #language ⇒ Object
- #language_list ⇒ Object
- #language_list_translated ⇒ Object
- #language_original ⇒ Object
- #language_version_list ⇒ Object
- #last_generated ⇒ Object
- #manifest_description ⇒ Object
- #manifest_description_metadata ⇒ Object
- #manifest_description_output ⇒ Object
- #metadata ⇒ Object
- #prefix_a ⇒ Object
- #prefix_b ⇒ Object
- #prepared_by ⇒ Object
- #publisher ⇒ Object
- #relation ⇒ Object
- #rights ⇒ Object
- #ruby_version ⇒ Object
- #sc_date ⇒ Object
- #sc_number ⇒ Object
- #sisu_version ⇒ Object
- #source ⇒ Object
- #sourcefile ⇒ Object
- #sourcefile_digest ⇒ Object
- #subject ⇒ Object
- #subtitle ⇒ Object
- #suggested_links ⇒ Object
- #title ⇒ Object
- #topic_register ⇒ Object
- #translator ⇒ Object
- #type ⇒ Object
- #word_count ⇒ Object
Constructor Details
#initialize(md, doc_lang, trans_str = '') ⇒ Source
Returns a new instance of Source.
59 60 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 |
# File 'lib/sisu/prog_text_translation.rb', line 59 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
#abstract ⇒ Object
150 151 152 |
# File 'lib/sisu/prog_text_translation.rb', line 150 def abstract @lang_class.abstract end |
#author ⇒ Object
120 121 122 |
# File 'lib/sisu/prog_text_translation.rb', line 120 def @lang_class. end |
#cls_dewey ⇒ Object
207 208 209 |
# File 'lib/sisu/prog_text_translation.rb', line 207 def cls_dewey @lang_class.cls_dewey end |
#cls_gutenberg ⇒ Object
213 214 215 |
# File 'lib/sisu/prog_text_translation.rb', line 213 def cls_gutenberg @lang_class.cls_gutenberg end |
#cls_isbn ⇒ Object
216 217 218 |
# File 'lib/sisu/prog_text_translation.rb', line 216 def cls_isbn @lang_class.cls_isbn end |
#cls_loc ⇒ Object
204 205 206 |
# File 'lib/sisu/prog_text_translation.rb', line 204 def cls_loc @lang_class.cls_loc end |
#cls_oclc ⇒ Object
210 211 212 |
# File 'lib/sisu/prog_text_translation.rb', line 210 def cls_oclc @lang_class.cls_oclc end |
#comments ⇒ Object
201 202 203 |
# File 'lib/sisu/prog_text_translation.rb', line 201 def comments @lang_class.comments end |
#contents ⇒ Object
141 142 143 |
# File 'lib/sisu/prog_text_translation.rb', line 141 def contents @lang_class.contents end |
#contributor ⇒ Object
123 124 125 |
# File 'lib/sisu/prog_text_translation.rb', line 123 def contributor @lang_class.contributor end |
#coverage ⇒ Object
195 196 197 |
# File 'lib/sisu/prog_text_translation.rb', line 195 def coverage @lang_class.coverage end |
#date ⇒ Object
159 160 161 |
# File 'lib/sisu/prog_text_translation.rb', line 159 def date @lang_class.date end |
#date_available ⇒ Object
165 166 167 |
# File 'lib/sisu/prog_text_translation.rb', line 165 def date_available @lang_class.date_available end |
#date_created ⇒ Object
162 163 164 |
# File 'lib/sisu/prog_text_translation.rb', line 162 def date_created @lang_class.date_created end |
#date_issued ⇒ Object
174 175 176 |
# File 'lib/sisu/prog_text_translation.rb', line 174 def date_issued @lang_class.date_issued end |
#date_modified ⇒ Object
171 172 173 |
# File 'lib/sisu/prog_text_translation.rb', line 171 def date_modified @lang_class.date_modified end |
#date_valid ⇒ Object
168 169 170 |
# File 'lib/sisu/prog_text_translation.rb', line 168 def date_valid @lang_class.date_valid end |
#description ⇒ Object
dc (watch)
147 148 149 |
# File 'lib/sisu/prog_text_translation.rb', line 147 def description #dc (watch) @lang_class.description end |
#dgst ⇒ Object
234 235 236 |
# File 'lib/sisu/prog_text_translation.rb', line 234 def dgst @lang_class.dgst end |
#digitized_by ⇒ Object
138 139 140 |
# File 'lib/sisu/prog_text_translation.rb', line 138 def digitized_by @lang_class.digitized_by end |
#file_size ⇒ Object
102 103 104 |
# File 'lib/sisu/prog_text_translation.rb', line 102 def file_size @lang_class.file_size end |
#filename ⇒ Object
93 94 95 |
# File 'lib/sisu/prog_text_translation.rb', line 93 def filename @lang_class.filename end |
#filetype_description ⇒ Object
99 100 101 |
# File 'lib/sisu/prog_text_translation.rb', line 99 def filetype_description @lang_class.filetype_description end |
#fns ⇒ Object
228 229 230 |
# File 'lib/sisu/prog_text_translation.rb', line 228 def fns @lang_class.fns end |
#format ⇒ Object
183 184 185 |
# File 'lib/sisu/prog_text_translation.rb', line 183 def format @lang_class.format end |
#full_title ⇒ Object
dc
111 112 113 |
# File 'lib/sisu/prog_text_translation.rb', line 111 def full_title #dc @lang_class.full_title end |
#identifier ⇒ Object
186 187 188 |
# File 'lib/sisu/prog_text_translation.rb', line 186 def identifier @lang_class.identifier end |
#illustrator ⇒ Object
129 130 131 |
# File 'lib/sisu/prog_text_translation.rb', line 129 def illustrator @lang_class.illustrator end |
#keywords ⇒ Object
198 199 200 |
# File 'lib/sisu/prog_text_translation.rb', line 198 def keywords @lang_class.keywords end |
#language ⇒ Object
177 178 179 |
# File 'lib/sisu/prog_text_translation.rb', line 177 def language @lang_class.language end |
#language_list ⇒ Object
273 274 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 |
# File 'lib/sisu/prog_text_translation.rb', line 273 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_translated ⇒ Object
270 271 272 |
# File 'lib/sisu/prog_text_translation.rb', line 270 def language_list_translated @lang_class.language_list end |
#language_original ⇒ Object
180 181 182 |
# File 'lib/sisu/prog_text_translation.rb', line 180 def language_original @lang_class.language_original end |
#language_version_list ⇒ Object
255 256 257 |
# File 'lib/sisu/prog_text_translation.rb', line 255 def language_version_list @lang_class.language_version_list end |
#last_generated ⇒ Object
243 244 245 |
# File 'lib/sisu/prog_text_translation.rb', line 243 def last_generated @lang_class.last_generated end |
#manifest_description ⇒ Object
261 262 263 |
# File 'lib/sisu/prog_text_translation.rb', line 261 def manifest_description @lang_class.manifest_description end |
#manifest_description_metadata ⇒ Object
267 268 269 |
# File 'lib/sisu/prog_text_translation.rb', line 267 def @lang_class. end |
#manifest_description_output ⇒ Object
264 265 266 |
# File 'lib/sisu/prog_text_translation.rb', line 264 def manifest_description_output @lang_class.manifest_description_output end |
#metadata ⇒ Object
96 97 98 |
# File 'lib/sisu/prog_text_translation.rb', line 96 def @lang_class. end |
#prefix_a ⇒ Object
219 220 221 |
# File 'lib/sisu/prog_text_translation.rb', line 219 def prefix_a @lang_class.prefix_a end |
#prefix_b ⇒ Object
222 223 224 |
# File 'lib/sisu/prog_text_translation.rb', line 222 def prefix_b @lang_class.prefix_b end |
#prepared_by ⇒ Object
135 136 137 |
# File 'lib/sisu/prog_text_translation.rb', line 135 def prepared_by @lang_class.prepared_by end |
#publisher ⇒ Object
132 133 134 |
# File 'lib/sisu/prog_text_translation.rb', line 132 def publisher @lang_class.publisher end |
#relation ⇒ Object
192 193 194 |
# File 'lib/sisu/prog_text_translation.rb', line 192 def relation @lang_class.relation end |
#rights ⇒ Object
156 157 158 |
# File 'lib/sisu/prog_text_translation.rb', line 156 def rights @lang_class.rights end |
#ruby_version ⇒ Object
249 250 251 |
# File 'lib/sisu/prog_text_translation.rb', line 249 def ruby_version @lang_class.ruby_version end |
#sc_date ⇒ Object
240 241 242 |
# File 'lib/sisu/prog_text_translation.rb', line 240 def sc_date @lang_class.sc_date end |
#sc_number ⇒ Object
237 238 239 |
# File 'lib/sisu/prog_text_translation.rb', line 237 def sc_number @lang_class.sc_number end |
#sisu_version ⇒ Object
246 247 248 |
# File 'lib/sisu/prog_text_translation.rb', line 246 def sisu_version @lang_class.sisu_version end |
#source ⇒ Object
189 190 191 |
# File 'lib/sisu/prog_text_translation.rb', line 189 def source @lang_class.source end |
#sourcefile ⇒ Object
105 106 107 |
# File 'lib/sisu/prog_text_translation.rb', line 105 def sourcefile @lang_class.sourcefile end |
#sourcefile_digest ⇒ Object
108 109 110 |
# File 'lib/sisu/prog_text_translation.rb', line 108 def sourcefile_digest @lang_class.sourcefile_digest end |
#subject ⇒ Object
144 145 146 |
# File 'lib/sisu/prog_text_translation.rb', line 144 def subject @lang_class.subject end |
#subtitle ⇒ Object
117 118 119 |
# File 'lib/sisu/prog_text_translation.rb', line 117 def subtitle @lang_class.subtitle end |
#suggested_links ⇒ Object
252 253 254 |
# File 'lib/sisu/prog_text_translation.rb', line 252 def suggested_links @lang_class.suggested_links end |
#title ⇒ Object
114 115 116 |
# File 'lib/sisu/prog_text_translation.rb', line 114 def title @lang_class.title end |
#topic_register ⇒ Object
225 226 227 |
# File 'lib/sisu/prog_text_translation.rb', line 225 def topic_register @lang_class.topic_register end |
#translator ⇒ Object
126 127 128 |
# File 'lib/sisu/prog_text_translation.rb', line 126 def translator @lang_class.translator end |
#type ⇒ Object
153 154 155 |
# File 'lib/sisu/prog_text_translation.rb', line 153 def type @lang_class.type end |
#word_count ⇒ Object
231 232 233 |
# File 'lib/sisu/prog_text_translation.rb', line 231 def word_count @lang_class.word_count end |