From 7f8b3cb5d24cd33db8c890403ac80157c6c7e34b Mon Sep 17 00:00:00 2001 From: Rene Date: Mon, 26 Jul 2021 02:54:22 -0600 Subject: [PATCH] Update latin.rb Added match patterns to respective books. Also included roman numerals with corresponding modern numbering system. @seven1m What other changes are necessary to get this version going? I'm rather new to this platform so let me know if I need to go about this some other way as I was hoping to contribute to https://github.com/seven1m/bible_api/issues/37. --- lib/bible_ref/languages/latin.rb | 132 +++++++++++++++---------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/lib/bible_ref/languages/latin.rb b/lib/bible_ref/languages/latin.rb index 161d77b..54850a7 100644 --- a/lib/bible_ref/languages/latin.rb +++ b/lib/bible_ref/languages/latin.rb @@ -12,72 +12,72 @@ def has_single_chapter?(reference) def books { - 'GEN' => { name: 'Genesis' }, - 'EXO' => { name: 'Exodus' }, - 'LEV' => { name: 'Leviticus' }, - 'NUM' => { name: 'Numeri' }, - 'DEU' => { name: 'Deuteronomium' }, - 'JOS' => { name: 'Josue' }, - 'JDG' => { name: 'Judicum' }, - 'RUT' => { name: 'Ruth' }, - '1SA' => { name: 'Regum I' }, - '2SA' => { name: 'Regum II' }, - '1KI' => { name: 'Regum III' }, - '2KI' => { name: 'Regum IV' }, - '1CH' => { name: 'Paralipomenon I' }, - '2CH' => { name: 'Paralipomenon II' }, - 'EZR' => { name: 'Esdræ' }, - 'NEH' => { name: 'Nehemiæ' }, - 'EST' => { name: 'Tobiæ' }, - 'JOB' => { name: 'Job' }, - 'PSA' => { name: 'Psalmi' }, - 'PRO' => { name: 'Proverbia' }, - 'ECC' => { name: 'Ecclesiastes' }, - 'SNG' => { name: 'Canticum Canticorum' }, - 'ISA' => { name: 'Isaias' }, - 'JER' => { name: 'Jeremias' }, - 'LAM' => { name: 'Lamentationes' }, - 'EZK' => { name: 'Ezechiel' }, - 'DAN' => { name: 'Daniel' }, - 'HOS' => { name: 'Osee' }, - 'JOL' => { name: 'Joël' }, - 'AMO' => { name: 'Amos' }, - 'OBA' => { name: 'Abdias' }, - 'JON' => { name: 'Jonas' }, - 'MIC' => { name: 'Michæa' }, - 'NAM' => { name: 'Nahum' }, - 'HAB' => { name: 'Habacuc' }, - 'ZEP' => { name: 'Sophonias' }, - 'HAG' => { name: 'Aggæus' }, - 'ZEC' => { name: 'Zacharias' }, - 'MAL' => { name: 'Malachias' }, - 'MAT' => { name: 'Matthæus' }, - 'MRK' => { name: 'Marcus' }, - 'LUK' => { name: 'Lucas' }, - 'JHN' => { name: 'Joannes' }, - 'ACT' => { name: 'Actus Apostolorum' }, - 'ROM' => { name: 'ad Romanos' }, - '1CO' => { name: 'ad Corinthios I' }, - '2CO' => { name: 'ad Corinthios II' }, - 'GAL' => { name: 'ad Galatas' }, - 'EPH' => { name: 'ad Ephesios' }, - 'PHP' => { name: 'ad Philippenses' }, - 'COL' => { name: 'ad Colossenses' }, - '1TH' => { name: 'ad Thessalonicenses I' }, - '2TH' => { name: 'ad Thessalonicenses II' }, - '1TI' => { name: 'ad Timotheum I' }, - '2TI' => { name: 'ad Timotheum II' }, - 'TIT' => { name: 'ad Titum' }, - 'PHM' => { name: 'ad Philemonem' }, - 'HEB' => { name: 'ad Hebræos' }, - 'JAS' => { name: 'Jacobi' }, - '1PE' => { name: 'Petri I' }, - '2PE' => { name: 'Petri II' }, - '1JN' => { name: 'Joannis I' }, - '2JN' => { name: 'Joannis II' }, - '3JN' => { name: 'Joannis III' }, - 'JUD' => { name: 'Judæ' }, - 'REV' => { name: 'Apocalypsis' } + 'GEN' => { match: /^gen/, name: 'Genesis' }, + 'EXO' => { match: /^exo/, name: 'Exodus' }, + 'LEV' => { match: /^lev/, name: 'Leviticus' }, + 'NUM' => { match: /^num/, name: 'Numeri' }, + 'DEU' => { match: /^deu/, name: 'Deuteronomium' }, + 'JOS' => { match: /^jos/, name: 'Josue' }, + 'JDG' => { match: /^jud/, name: 'Judicum' }, + 'RUT' => { match: /^rut/, name: 'Ruth' }, + '1SA' => { match: /^reg i|1/, name: 'Regum I' }, + '2SA' => { match: /^reg ii|2/, name: 'Regum II' }, + '1KI' => { match: /^reg iii|3/, name: 'Regum III' }, + '2KI' => { match: /^reg iv|4/, name: 'Regum IV' }, + '1CH' => { match: /^par i|1/, name: 'Paralipomenon I' }, + '2CH' => { match: /^par ii|2/, name: 'Paralipomenon II' }, + 'EZR' => { match: /^esd/, name: 'Esdræ' }, + 'NEH' => { match: /^neh/, name: 'Nehemiæ' }, + 'EST' => { match: /^tob/, name: 'Tobiæ' }, + 'JOB' => { match: /^job/, name: 'Job' }, + 'PSA' => { match: /^psa/, name: 'Psalmi' }, + 'PRO' => { match: /^pro/, name: 'Proverbia' }, + 'ECC' => { match: /^ecc/, name: 'Ecclesiastes' }, + 'SNG' => { match: /^can/, name: 'Canticum Canticorum' }, + 'ISA' => { match: /^isa/, name: 'Isaias' }, + 'JER' => { match: /^jer/, name: 'Jeremias' }, + 'LAM' => { match: /^lam/, name: 'Lamentationes' }, + 'EZK' => { match: /^eze/, name: 'Ezechiel' }, + 'DAN' => { match: /^dan/, name: 'Daniel' }, + 'HOS' => { match: /^ose/, name: 'Osee' }, + 'JOL' => { match: /^jo[eë]/, name: 'Joël' }, + 'AMO' => { match: /^amo/, name: 'Amos' }, + 'OBA' => { match: /^abd/, name: 'Abdias' }, + 'JON' => { match: /^jon/, name: 'Jonas' }, + 'MIC' => { match: /^mic/, name: 'Michæa' }, + 'NAM' => { match: /^nah/, name: 'Nahum' }, + 'HAB' => { match: /^hab/, name: 'Habacuc' }, + 'ZEP' => { match: /^sop/, name: 'Sophonias' }, + 'HAG' => { match: /^agg/, name: 'Aggæus' }, + 'ZEC' => { match: /^zac/, name: 'Zacharias' }, + 'MAL' => { match: /^mal/, name: 'Malachias' }, + 'MAT' => { match: /^mat/, name: 'Matthæus' }, + 'MRK' => { match: /^mar/, name: 'Marcus' }, + 'LUK' => { match: /^luc/, name: 'Lucas' }, + 'JHN' => { match: /^joa/, name: 'Joannes' }, + 'ACT' => { match: /^act/, name: 'Actus Apostolorum' }, + 'ROM' => { match: /^rom/, name: 'ad Romanos' }, + '1CO' => { match: /^cor i|1/, name: 'ad Corinthios I' }, + '2CO' => { match: /^cor ii|2/, name: 'ad Corinthios II' }, + 'GAL' => { match: /^gal/, name: 'ad Galatas' }, + 'EPH' => { match: /^eph/, name: 'ad Ephesios' }, + 'PHP' => { match: /^phi/, name: 'ad Philippenses' }, + 'COL' => { match: /^col/, name: 'ad Colossenses' }, + '1TH' => { match: /^the i|1/, name: 'ad Thessalonicenses I' }, + '2TH' => { match: /^the ii|2/, name: 'ad Thessalonicenses II' }, + '1TI' => { match: /^tim i|1/, name: 'ad Timotheum I' }, + '2TI' => { match: /^tim ii|2/, name: 'ad Timotheum II' }, + 'TIT' => { match: /^tit/, name: 'ad Titum' }, + 'PHM' => { match: /^phi/, name: 'ad Philemonem' }, + 'HEB' => { match: /^heb/, name: 'ad Hebræos' }, + 'JAS' => { match: /^jac/, name: 'Jacobi' }, + '1PE' => { match: /^pet i|1/, name: 'Petri I' }, + '2PE' => { match: /^pet ii|2/, name: 'Petri II' }, + '1JN' => { match: /^joa i|1/, name: 'Joannis I' }, + '2JN' => { match: /^joa ii|2/, name: 'Joannis II' }, + '3JN' => { match: /^joa iii|3/, name: 'Joannis III' }, + 'JUD' => { match: /^jud/, name: 'Judæ' }, + 'REV' => { match: /^apo/, name: 'Apocalypsis' } } end end