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