[sword-svn] r491 - in trunk/modules: . locales.d python

refdoc at crosswire.org refdoc at crosswire.org
Wed Feb 18 01:27:48 MST 2015


Author: refdoc
Date: 2015-02-18 01:27:48 -0700 (Wed, 18 Feb 2015)
New Revision: 491

Added:
   trunk/modules/locales.d/
   trunk/modules/locales.d/README
   trunk/modules/locales.d/ro-utf8.conf
Modified:
   trunk/modules/python/usfm2osis.py
Log:
created directory for locales necessary for some module making, but unsuitable for general consumption. They may well be toxic. 
corrected typo in usfm2osis.py- missing "


Added: trunk/modules/locales.d/README
===================================================================
--- trunk/modules/locales.d/README	                        (rev 0)
+++ trunk/modules/locales.d/README	2015-02-18 08:27:48 UTC (rev 491)
@@ -0,0 +1,14 @@
+The locales files in this section are for one reason or other not suitable
+for public consumption. They may well be toxic.
+
+They may abuse existing bugs or undefined behaviour in the engine or have other features
+which make them not suitable. If they damage your computer, or do other
+horrid things, you were warned.
+
+If you add any locales files, please add below a short explanation why it is
+here and not n the usual place.
+
+ro-utf8 : added here due to use of full stops in abbreviations - can cause
+acc Troy undefined begaviour, but was needed during module making in
+romcor.
+

Added: trunk/modules/locales.d/ro-utf8.conf
===================================================================
--- trunk/modules/locales.d/ro-utf8.conf	                        (rev 0)
+++ trunk/modules/locales.d/ro-utf8.conf	2015-02-18 08:27:48 UTC (rev 491)
@@ -0,0 +1,348 @@
+#
+#     Numele cartilor Bibliei in versiunea Cornilescu
+#
+#        Artemis State arty at home.ro
+#   multumiri lui  Martin Gruner mg.pub at gmx.net
+#
+#   2015-02-16 Updated by Peter von Kaehne & David Haslam
+#   Uses names and abbreviations for Revised Cornilescu 2014
+
+[Meta]
+Name=ro
+Description=Romanian (Unicode)
+Encoding=UTF-8
+
+[Text]
+# Spellings now conform to those found in the 2014 Edition
+# Book names mostly as found in the \toc2 entries in the USFM files
+# Localised book names are now without Roman numerals.
+
+Genesis=Geneza
+Exodus=Exodul
+Leviticus=Leviticul
+Numbers=Numeri
+Deuteronomy=Deuteronom
+Joshua=Iosua
+Judges=Judecătorii
+Ruth=Rut
+I Samuel=1 Samuel
+II Samuel=2 Samuel
+I Kings=1 Împăraţilor
+II Kings=2 Împăraţilor
+I Chronicles=1 Cronicilor
+II Chronicles=2 Cronicilor
+Ezra=Ezra
+Nehemiah=Neemia
+Esther=Estera
+Job=Iov
+Psalms=Psalmii
+Proverbs=Proverbele
+Ecclesiastes=Eclesiastul
+Song of Solomon=Cântarea Cântărilor
+Isaiah=Isaia
+Jeremiah=Ieremia
+Lamentations=Plângerile
+Ezekiel=Ezechiel
+Daniel=Daniel
+Hosea=Osea
+Joel=Ioel
+Amos=Amos
+Obadiah=Obadia
+Jonah=Iona
+Micah=Mica
+Nahum=Naum
+Habakkuk=Habacuc
+Zephaniah=Ţefania
+Haggai=Hagai
+Zechariah=Zaharia
+Malachi=Maleahi
+Matthew=Matei
+Mark=Marcu
+Luke=Luca
+John=Ioan
+Acts=Faptele Apostolilor
+Romans=Romani
+I Corinthians=1 Corinteni
+II Corinthians=2 Corinteni
+Galatians=Galateni
+Ephesians=Efeseni
+Philippians=Filipeni
+Colossians=Coloseni
+I Thessalonians=1 Tesaloniceni
+II Thessalonians=2 Tesaloniceni
+I Timothy=1 Timotei
+II Timothy=2 Timotei
+Titus=Tit
+Philemon=Filimon
+Hebrews=Evrei
+James=Iacov
+I Peter=1 Petru
+II Peter=2 Petru
+I John=1 Ioan
+II John=2 Ioan
+III John=3 Ioan
+Jude=Iuda
+Revelation of John=Apocalipsa
+
+[Book Abbrevs]
+# Abbreviations with full-stops added by David Haslam
+# Copied from the \toc3 entries in the USFM files and augmented by some 
+# whole booknames with an unnecessary full-stop as encountered in a few cross-references.
+# Those with Roman numerals are retained for other translations.
+# Older spellings also retained to cover earlier translations.
+# Unaccented versions retained just in case any references were mistyped.
+
+GEN.=Gen
+GENESA=Gen
+GENEZA=Gen
+
+EXOD.=Exod
+EXODUL=Exod
+
+LEV.=Lev
+LEVITICUL=Lev
+
+NUM.=Num
+NUMERI=Num
+
+DEUT.=Deut
+DEUTERONOM=Deut
+
+IOS.=Josh
+IOSUA=Josh
+
+# Two entries commented out. Revert if unsuccessful.
+# J=Judg
+# JU=Judg
+JUD.=Judg
+# The next entry prevents override by the English bookname Jude.
+# In theory, this should not be necessary, as JUDE=LEFT(JUDECĂTORII,4)
+JUDE=Judg
+JUDECĂTORII=Judg
+JUDECATORII=Judg
+
+RUT=Ruth
+
+1 SAM.=1Sam
+I SAMUEL=1Sam
+1 SAMUEL=1Sam
+1SAMUEL=1Sam
+
+2 SAM.=2Sam
+II SAMUEL=2Sam
+2 SAMUEL=2Sam
+2SAMUEL=2Sam
+
+I REGI=1Kgs
+1 REGI=1Kgs
+1REGI=1Kgs
+1 ÎMP.=1Kgs
+1 ÎMPĂRAŢILOR=1Kgs
+1ÎMPĂRAŢILOR=1Kgs
+# Add unaccented versions if required
+
+II REGI=2Kgs
+2 REGI=2Kgs
+2REGI=2Kgs
+2 ÎMP.=2Kgs
+2 ÎMPĂRAŢILOR=2Kgs
+2ÎMPĂRAŢILOR=2Kgs
+# Add unaccented versions if required
+
+I CRONICILOR=1Chr
+1 CRON.=1Chr
+1 CRONICILOR=1Chr
+1CRONICILOR=1Chr
+
+II CRONICILOR=2Chr
+2 CRON.=2Chr
+2 CRONICILOR=2Chr
+2CRONICILOR=2Chr
+
+# Unnecessary full-stop can occur
+EZRA.=Ezra
+EZRA=Ezra
+
+NEEM.=Neh
+NEEMIA=Neh
+
+ESTERA=Esth
+
+# Unnecessary full-stop can occur
+IOV.=Job
+IOV=Job
+
+Ps.=Ps
+PSALMII=Ps
+
+PROV.=Prov
+PROVERBELE=Prov
+
+ECL.=Eccl
+ECLESIASTUL=Eccl
+
+CANTAREA CANTARILOR=Song
+CÂNT.=Song
+CÂNTAREA CÂNTARILOR=Song
+
+ISA.=Isa
+ISAIA=Isa
+
+IER.=Jer
+IEREMIA=Jer
+
+PLANGERILE=Lam
+PLÂNG.=Lam
+PLÂNGERILE=Lam
+# Add unaccented versions if required
+
+EZEC.=Ezek
+EZECHIEL=Ezek
+
+DAN.=Dan
+DANIEL=Dan
+
+OSEA=Hos
+
+# Unnecessary full-stop can occur
+IOEL.=Joel
+IOEL=Joel
+
+AMOS=Amos
+
+# This is a single chapter book
+OBAD.=Obad
+OBADIA=Obad
+
+IONA=Jonah
+MICA=Mic
+
+# Unnecessary full-stop can occur
+NAUM.=Nah
+NAUM=Nah
+
+HAB.=Hab
+HABACUC=Hab
+
+TEFANIA=Zeph
+ŢEF.=Zeph
+ŢEFANIA=Zeph
+
+HAG.=Hag
+HAGAI=Hag
+
+ZAH.=Zech
+ZAHARIA=Zech
+
+MAL.=Mal
+MALEAHI=Mal
+MALEACHI=Mal
+
+MAT.=Matt
+MATEI=Matt
+
+MARC.=Mark
+MARCU=Mark
+
+LUCA=Luke
+
+# Unnecessary full-stop can occur
+IOAN.=John
+IOAN=John
+
+FAPTE.=Acts
+FAPTELE APOSTOLILOR=Acts
+
+ROM.=Rom
+ROMANI=Rom
+
+I CORINTENI=1Cor
+1 COR.=1Cor
+1 CORINTENI=1Cor
+1CORINTENI=1Cor
+
+II CORINTENI=2Cor
+2 COR.=2Cor
+2 CORINTENI=2Cor
+2CORINTENI=2Cor
+
+GAL.=Gal
+GALATENI=Gal
+
+EFES.=Eph
+EFESENI=Eph
+
+# Beware confusion with the abbreviations for Philemon
+FIL.=Phil
+FILIPENI=Phil
+
+COL.=Col
+COLOSENI=Col
+
+I TESALONICENI=1Thess
+1 TES.=1Thess
+1 TESALONICENI=1Thess
+1TESALONICENI=1Thess
+
+II TESALONICENI=2Thess
+2 TES.=2Thess
+2 TESALONICENI=2Thess
+2TESALONICENI=2Thess
+
+I TIMOTEI=1Tim
+1 TIM.=1Tim
+1 TIMOTEI=1Tim
+1TIMOTEI=1Tim
+
+II TIMOTEI=2Tim
+2 TIM.=2Tim
+2 TIMOTEI=2Tim
+2TIMOTEI=2Tim
+
+TIT=Titus
+
+# This is a single chapter book
+# Beware confusion with the abbreviations for Philippians
+FILIM.=Phlm
+FILIMON=Phlm
+
+EVR.=Heb
+EVREI=Heb
+
+IAC.=Jas
+IACOV=Jas
+
+I PETRU=1Pet
+1 PET.=1Pet
+1 PETRU=1Pet
+1PETRU=1Pet
+
+II PETRU=2Pet
+2 PET.=2Pet
+2 PETRU=2Pet
+2PETRU=2Pet
+
+# Unnecessary full-stop can occur
+I IOAN=1John
+1 IOAN.=1John
+1 IOAN=1John
+1IOAN=1John
+
+# This is a single chapter book
+II IOAN=2John
+2 IOAN.=2John
+2 IOAN=2John
+2IOAN=2John
+
+# This is a single chapter book
+III IOAN=3John
+3 IOAN.=3John
+3 IOAN=3John
+3IOAN=3John
+
+# This is a single chapter book
+IUDA.=Jude
+IUDA=Jude
+
+APOC.=Rev
+APOCALIPSA=Rev

Modified: trunk/modules/python/usfm2osis.py
===================================================================
--- trunk/modules/python/usfm2osis.py	2014-12-29 17:19:47 UTC (rev 490)
+++ trunk/modules/python/usfm2osis.py	2015-02-18 08:27:48 UTC (rev 491)
@@ -782,7 +782,7 @@
         # \thr#_text...
         # \tc#_text...
         # \tcr#_text...
-        tType = {'th':' role="label"', 'thr':' role="label" type="x-right"', 'tc':'', 'tcr':' type="x-right'}
+        tType = {'th':' role="label"', 'thr':' role="label" type="x-right"', 'tc':'', 'tcr':' type="x-right"'}
         osis = re.sub(r'\\(thr?|tcr?)\d*\b\s*(.*?)(?=(\\t[hc]|</row))', lambda m: '<cell' + tType[m.group(1)] + '>' + m.group(2) + '</cell>', osis, flags=re.DOTALL)
 
         osis = re.sub(r'(<row>.*?</row>)(?=(['+'\uFDD0\uFDD1\uFDD3\uFDD4'+r']|\\tr\s|<(lb|title)\b))', r'<table>\1</table>', osis, flags=re.DOTALL)




More information about the sword-cvs mailing list