[jsword-svn] r1402 - in trunk: bibledesktop/src/main/java/org/crosswire/bibledesktop/book bibledesktop/src/main/java/org/crosswire/bibledesktop/passage biblemapper/src/main/java/org/crosswire/biblemapper/model biblemapper/src/main/java/org/crosswire/biblemapper/swing common/src/main/java/org/crosswire/common/diff jsword/src/main/java/org/crosswire/jsword/examples jsword/src/main/java/org/crosswire/jsword/passage jsword/src/main/java/org/crosswire/jsword/versification jsword-limbo/src/main/java/org/crosswire/bibledesktop/passage
dmsmith at www.crosswire.org
dmsmith at www.crosswire.org
Wed Jun 13 15:33:30 MST 2007
Author: dmsmith
Date: 2007-06-13 15:33:29 -0700 (Wed, 13 Jun 2007)
New Revision: 1402
Added:
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleNameCellRenderer.java
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BookName.java
Modified:
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BookListCellRenderer.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg.properties
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/WholeBibleTreeNode.java
trunk/biblemapper/src/main/java/org/crosswire/biblemapper/model/LinkArray.java
trunk/biblemapper/src/main/java/org/crosswire/biblemapper/model/Map.java
trunk/biblemapper/src/main/java/org/crosswire/biblemapper/model/VBAExport.java
trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/BookVerseColor.java
trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/CliMapper.java
trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/MapperPane.java
trunk/common/src/main/java/org/crosswire/common/diff/Distance.java
trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/passage/BookTreeNode.java
trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java
trunk/jsword/src/main/java/org/crosswire/jsword/passage/Verse.java
trunk/jsword/src/main/java/org/crosswire/jsword/passage/VerseRange.java
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleInfo.java
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames.java
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_af.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_ar_EG.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_bg.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_cs.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_da.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_de.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_es.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_et.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_fa.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_fi.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_fr.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_he.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_hu.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_id.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_it.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_ko.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_la.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_lt.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_nl.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_no.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_pl.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_pt.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_pt_BR.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_ro.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_ru.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_sk.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_sl.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_sv.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_th.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_uk.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_zh_CN.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_zh_TW.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/Msg.java
trunk/jsword/src/main/java/org/crosswire/jsword/versification/Msg.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/OSISNames.java
trunk/jsword/src/main/java/org/crosswire/jsword/versification/SectionNames.java
trunk/jsword/src/main/java/org/crosswire/jsword/versification/SectionNames.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/SectionNames_zh_CN.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/package.html
Log:
Made the Bible book name drop down, by creating a BookName class.
Refactored some methods to make their purpose clearer.
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModel.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -28,6 +28,7 @@
import org.crosswire.jsword.passage.NoSuchVerseException;
import org.crosswire.jsword.passage.Verse;
import org.crosswire.jsword.versification.BibleInfo;
+import org.crosswire.jsword.versification.BookName;
/**
* A ComboBoxModel for selecting book/chapter/verse.
@@ -82,8 +83,8 @@
switch (level)
{
case LEVEL_BOOK:
- String bsel = (String) selected;
- int book = BibleInfo.getBookNumber(bsel);
+ BookName bsel = (BookName) selected;
+ int book = bsel.getNumber();
assert book > 0;
setBook(book);
break;
@@ -184,7 +185,7 @@
verse = Math.min(verse, BibleInfo.versesInChapter(book, chapter));
Verse update = new Verse(book, chapter, verse);
- set.setViewedVerse(update);
+ set.setVerse(update);
}
catch (NoSuchVerseException ex)
{
@@ -208,7 +209,7 @@
verse = Math.min(verse, BibleInfo.versesInChapter(book, chapter));
Verse update = new Verse(book, chapter, verse);
- set.setViewedVerse(update);
+ set.setVerse(update);
}
catch (NoSuchVerseException ex)
{
@@ -225,7 +226,7 @@
{
Verse old = set.getVerse();
Verse update = new Verse(old.getBook(), old.getChapter(), verse);
- set.setViewedVerse(update);
+ set.setVerse(update);
}
catch (NoSuchVerseException ex)
{
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleComboBoxModelSet.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -32,6 +32,7 @@
import org.crosswire.jsword.passage.NoSuchVerseException;
import org.crosswire.jsword.passage.Verse;
import org.crosswire.jsword.versification.BibleInfo;
+import org.crosswire.jsword.versification.BookName;
/**
* A set of correctly constructed and linked BibleComboBoxModels.
@@ -39,14 +40,26 @@
* @see gnu.gpl.License for license details.
* The copyright to this program is held by it's authors.
* @author Joe Walker [joe at eireneh dot com]
+ * @author DM Smith [dmsmith555 at yahoo dot com]
*/
public class BibleComboBoxModelSet
{
public BibleComboBoxModelSet(JComboBox books, JComboBox chapters, JComboBox verses)
{
+ listeners = new EventListenerList();
+ cil = new CustomItemListener();
+
+ mdlBook = new BibleComboBoxModel(this, BibleComboBoxModel.LEVEL_BOOK);
setBookComboBox(books);
+
+ mdlChapter = new BibleComboBoxModel(this, BibleComboBoxModel.LEVEL_CHAPTER);
setChapterComboBox(chapters);
- setVerseComboBox(verses);
+
+ if (verses != null)
+ {
+ mdlVerse = new BibleComboBoxModel(this, BibleComboBoxModel.LEVEL_VERSE);
+ setVerseComboBox(verses);
+ }
}
/**
@@ -58,6 +71,16 @@
cboBook.setModel(mdlBook);
cboBook.addItemListener(cil);
+ cboBook.setRenderer(new BibleNameCellRenderer(true));
+
+ try
+ {
+ cboBook.setToolTipText(BibleInfo.getLongBookName(verse.getBook()));
+ }
+ catch (NoSuchVerseException ex)
+ {
+ assert false : ex;
+ }
}
/**
@@ -82,7 +105,7 @@
cboVerse.setModel(mdlVerse);
// There are over 100 verses in some chapters
- cboChapter.setPrototypeDisplayValue(new Integer(999));
+ cboVerse.setPrototypeDisplayValue(new Integer(999));
cboVerse.addItemListener(cil);
}
@@ -95,15 +118,6 @@
}
/**
- * Sets the verse.
- * @param newverse The verse to set
- */
- protected void setViewedVerse(Verse newverse)
- {
- setVerse(newverse);
- }
-
- /**
* Set the combo-boxes to a new verse
*/
public void setVerse(Verse newverse)
@@ -118,10 +132,11 @@
Verse oldverse = verse;
verse = newverse;
int bookval = newverse.getBook();
- String book = BibleInfo.getBookName(bookval);
- if (oldverse.getBook() != bookval || !cboBook.getSelectedItem().equals(book))
+ BookName bookName = BibleInfo.getBookName(bookval);
+ if (oldverse.getBook() != bookval || !cboBook.getSelectedItem().equals(bookName))
{
- cboBook.setSelectedItem(book);
+ cboBook.setSelectedItem(bookName);
+ cboBook.setToolTipText(bookName.getLongName());
}
int chapterval = newverse.getChapter();
@@ -131,11 +146,14 @@
cboChapter.setSelectedItem(chapternum);
}
- int verseval = newverse.getVerse();
- Integer versenum = new Integer(verseval);
- if (oldverse.getVerse() != verseval || !cboVerse.getSelectedItem().equals(versenum))
+ if (cboVerse != null)
{
- cboVerse.setSelectedItem(versenum);
+ int verseval = newverse.getVerse();
+ Integer versenum = new Integer(verseval);
+ if (oldverse.getVerse() != verseval || !cboVerse.getSelectedItem().equals(versenum))
+ {
+ cboVerse.setSelectedItem(versenum);
+ }
}
fireContentsChanged();
@@ -146,19 +164,6 @@
}
}
- private Verse verse = Verse.DEFAULT;
-
- protected JComboBox cboBook;
- protected JComboBox cboChapter;
- private JComboBox cboVerse;
-
- protected BibleComboBoxModel mdlBook = new BibleComboBoxModel(this, BibleComboBoxModel.LEVEL_BOOK);
- protected BibleComboBoxModel mdlChapter = new BibleComboBoxModel(this, BibleComboBoxModel.LEVEL_CHAPTER);
- protected BibleComboBoxModel mdlVerse = new BibleComboBoxModel(this, BibleComboBoxModel.LEVEL_VERSE);
-
- protected EventListenerList listeners = new EventListenerList();
- private ItemListener cil = new CustomItemListener();
-
/**
* Add a listener to the list that's notified each time a change
* to the data model occurs.
@@ -220,11 +225,24 @@
mdlChapter.fireContentsChanged(this, 0, mdlChapter.getSize());
}
- if (source.equals(cboBook) || source.equals(cboChapter))
+ if (mdlVerse != null && (source.equals(cboBook) || source.equals(cboChapter)))
{
mdlVerse.fireContentsChanged(this, 0, mdlVerse.getSize());
}
}
}
}
+
+ private Verse verse = Verse.DEFAULT;
+
+ protected JComboBox cboBook;
+ protected JComboBox cboChapter;
+ private JComboBox cboVerse;
+
+ protected BibleComboBoxModel mdlBook;
+ protected BibleComboBoxModel mdlChapter;
+ protected BibleComboBoxModel mdlVerse;
+
+ protected EventListenerList listeners;
+ private ItemListener cil;
}
Added: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleNameCellRenderer.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleNameCellRenderer.java (rev 0)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleNameCellRenderer.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -0,0 +1,121 @@
+/**
+ * Distribution License:
+ * BibleDesktop is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, version 2 as published by
+ * the Free Software Foundation. This program is distributed in the hope
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * The License is available on the internet at:
+ * http://www.gnu.org/copyleft/gpl.html
+ * or by writing to:
+ * Free Software Foundation, Inc.
+ * 59 Temple Place - Suite 330
+ * Boston, MA 02111-1307, USA
+ *
+ * Copyright: 2005
+ * The copyright to this program is held by it's authors.
+ *
+ * ID: $Id$
+ */
+package org.crosswire.bibledesktop.book;
+
+import java.awt.Component;
+
+import javax.swing.DefaultListCellRenderer;
+import javax.swing.JList;
+
+import org.crosswire.jsword.versification.BookName;
+
+/**
+ * Render a list of Bible Book names with their full name as a tooltip
+ *
+ * @see gnu.gpl.License for license details.
+ * The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
+public class BibleNameCellRenderer extends DefaultListCellRenderer
+{
+ /**
+ * Constructs a default renderer object for an item in a list,
+ * using full names.
+ */
+ public BibleNameCellRenderer()
+ {
+ this(false);
+ }
+
+ /**
+ * Constructs a renderer object for an item in a list,
+ * using abbreviated names if desired.
+ *
+ * @param abbreviated use the initials in the list.
+ */
+ public BibleNameCellRenderer(boolean abbreviated)
+ {
+ super();
+ this.abbreviated = abbreviated;
+ }
+
+ /**
+ * @return the abbreviated
+ */
+ public boolean isAbbreviated()
+ {
+ return abbreviated;
+ }
+
+ /**
+ * @param newAbbreviated the abbreviated to set
+ */
+ public void setAbbreviated(boolean newAbbreviated)
+ {
+ this.abbreviated = newAbbreviated;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.swing.DefaultListCellRenderer#getListCellRendererComponent(javax.swing.JList, java.lang.Object, int, boolean, boolean)
+ */
+ public Component getListCellRendererComponent(JList list, Object value, int index, boolean selected, boolean focus)
+ {
+ // Do the default rendering
+ Component comp = super.getListCellRendererComponent(list, value, index, selected, focus);
+
+ // Do our rendering
+ setToolTipText(null);
+
+ if (value == null)
+ {
+ setText(Msg.NONE.toString());
+ setEnabled(false);
+ }
+
+ // Hack to allow us to use PROTOTYPE_BOOK_NAME as a prototype value
+ if (value instanceof BookName)
+ {
+ BookName bookName = (BookName) value;
+ String name = bookName.getLongName();
+
+ setText(abbreviated ? bookName.getShortName() : name);
+ setToolTipText(name);
+ }
+
+ return comp;
+ }
+
+ /**
+ * If true then the initials of a book are shown, otherwise the full name.
+ */
+ private boolean abbreviated;
+
+ /**
+ * Make sure that book names are not too wide
+ */
+ public static final String PROTOTYPE_BOOK_NAME = "0123456789"; //$NON-NLS-1$
+
+ /**
+ * Serialization ID
+ */
+ private static final long serialVersionUID = 3978138859576308017L;
+}
Property changes on: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BibleNameCellRenderer.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BookListCellRenderer.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BookListCellRenderer.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/BookListCellRenderer.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -23,26 +23,22 @@
import java.awt.Component;
-import javax.swing.BorderFactory;
-import javax.swing.JLabel;
+import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;
-import javax.swing.ListCellRenderer;
-import javax.swing.UIManager;
-import javax.swing.border.Border;
import org.crosswire.bibledesktop.book.install.BookIcon;
import org.crosswire.jsword.book.Book;
/**
- * A custom list view that paints icons alongside the words.
- * This was a simple modification of DefaultListCellRenderer however something
- * has made us implement ListCellRenderer directory and I'm not sure what.
+ * A custom list view that paints icons alongside the words, with a ToolTip
+ * of the name of the Book.
*
* @see gnu.gpl.License for license details.
* The copyright to this program is held by it's authors.
* @author Joe Walker [joe at eireneh dot com]
+ * @author DM Smith [dmsmith555 at yahoo dot com]
*/
-public class BookListCellRenderer extends JLabel implements ListCellRenderer
+public class BookListCellRenderer extends DefaultListCellRenderer
{
/**
* Constructs a default renderer object for an item in a list,
@@ -61,9 +57,8 @@
*/
public BookListCellRenderer(boolean abbreviated)
{
+ super();
this.abbreviated = abbreviated;
- setOpaque(true);
- setBorder(noFocus);
}
/**
@@ -82,73 +77,35 @@
this.abbreviated = newAbbreviated;
}
- /**
- * This is the only method defined by ListCellRenderer. We just
- * reconfigure the Jlabel each time we're called.
- * @param list The JLists that we are part of
- * @param value Value to display
- * @param index Cell index
- * @param selected Is the cell selected
- * @param focus Does the list and the cell have the focus
+ /* (non-Javadoc)
+ * @see javax.swing.DefaultListCellRenderer#getListCellRendererComponent(javax.swing.JList, java.lang.Object, int, boolean, boolean)
*/
public Component getListCellRendererComponent(JList list, Object value, int index, boolean selected, boolean focus)
{
- if (selected)
- {
- setBackground(list.getSelectionBackground());
- setForeground(list.getSelectionForeground());
- }
- else
- {
- setBackground(list.getBackground());
- setForeground(list.getForeground());
- }
+ // Do the default rendering
+ Component comp = super.getListCellRendererComponent(list, value, index, selected, focus);
+ // Do our rendering
+ setToolTipText(null);
+
if (value == null)
{
setText(Msg.NONE.toString());
- setToolTipText(null);
- setIcon(null);
setEnabled(false);
}
// Hack to allow us to use PROTOTYPE_BOOK_NAME as a prototype value
- if (value instanceof String)
- {
- String str = (String) value;
-
- setText(str);
- setToolTipText(null);
- setIcon(null);
-
- setEnabled(list.isEnabled());
- setFont(list.getFont());
- setBorder(focus ? UIManager.getBorder("List.focusCellHighlightBorder") : noFocus); //$NON-NLS-1$
- }
-
if (value instanceof Book)
{
Book book = (Book) value;
+ String name = book.getName();
- if (abbreviated)
- {
- setText(book.getInitials());
- setToolTipText(book.getName());
- }
- else
- {
- String displayName = book.getName();
- setText(displayName);
- setToolTipText(displayName);
- }
-
+ setText(abbreviated ? book.getInitials() : name);
+ setToolTipText(name);
setIcon(BookIcon.getIcon(book));
- setEnabled(list.isEnabled());
- setFont(list.getFont());
- setBorder(focus ? UIManager.getBorder("List.focusCellHighlightBorder") : noFocus); //$NON-NLS-1$
}
- return this;
+ return comp;
}
/**
@@ -157,14 +114,9 @@
private boolean abbreviated;
/**
- * border if we do not have focus
- */
- private static Border noFocus = BorderFactory.createEmptyBorder(1, 1, 1, 1);
-
- /**
* Make sure that book names are not too wide
*/
- public static final String PROTOTYPE_BOOK_NAME = "012345678901234567890123456789"; //$NON-NLS-1$
+ public static final String PROTOTYPE_BOOK_NAME = "0123456789"; //$NON-NLS-1$
/**
* Serialization ID
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg.properties
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg.properties 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/Msg.properties 2007-06-13 22:33:29 UTC (rev 1402)
@@ -32,7 +32,8 @@
Using && requires both words, e.g. "<code>aaron && moses</code>" finds passages containing both Aaron AND Moses<br\>\
Using a ! removes words from the result e.g. "<code>lord ! jesus</code>" is passages containing Lord BUT NOT Jesus<br\>\
Using ~2 widens the passage by 2 verses either side on any match. So "<code>amminadab ~1 perez</code>" finds<br\>\
- verses containting Amminadab within 1 verse of mention of Perez.
+ verses containting Amminadab within 1 verse of mention of Perez.<br\>\
+ Using +[Gen-Exo] at the beginning will restrict a search to that range of verses.
DisplaySelectPane.Bible=Bible:
DisplaySelectPane.AdvancedTitle=Advanced Search
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/book/MultiBookPane.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -324,10 +324,6 @@
}
});
- cboBooks.setToolTipText(Msg.SELECT_BOOK.toString());
- cboChaps.setToolTipText(Msg.SELECT_CHAPTER.toString());
- cboVerse.setToolTipText(Msg.SELECT_VERSE.toString());
-
JPanel panel = new JPanel();
panel.setLayout(new FlowLayout());
panel.add(cboBooks, null);
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/WholeBibleTreeNode.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/WholeBibleTreeNode.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/passage/WholeBibleTreeNode.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -158,7 +158,7 @@
return Msg.WHOLE.toString();
case LEVEL_BOOK:
- return BibleInfo.getBookName(range.getStart().getBook());
+ return BibleInfo.getPreferredBookName(range.getStart().getBook());
case LEVEL_CHAPTER:
return Integer.toString(range.getStart().getChapter());
Modified: trunk/biblemapper/src/main/java/org/crosswire/biblemapper/model/LinkArray.java
===================================================================
--- trunk/biblemapper/src/main/java/org/crosswire/biblemapper/model/LinkArray.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/biblemapper/src/main/java/org/crosswire/biblemapper/model/LinkArray.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -160,7 +160,7 @@
{
Element eb = new Element("book");
eb.setAttribute("num", ""+b);
- eb.setAttribute("name", BibleInfo.getBookName(b));
+ eb.setAttribute("name", BibleInfo.getPreferredBookName(b));
elinks.addContent(eb);
for (int c=1; c<=BibleInfo.chaptersInBook(b); c++)
Modified: trunk/biblemapper/src/main/java/org/crosswire/biblemapper/model/Map.java
===================================================================
--- trunk/biblemapper/src/main/java/org/crosswire/biblemapper/model/Map.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/biblemapper/src/main/java/org/crosswire/biblemapper/model/Map.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -506,7 +506,7 @@
{
Element eb = new Element("book");
eb.setAttribute("num", ""+b);
- eb.setAttribute("name", BibleInfo.getBookName(b));
+ eb.setAttribute("name", BibleInfo.getPreferredBookName(b));
epos.addContent(eb);
for (int c=1; c<=BibleInfo.chaptersInBook(b); c++)
Modified: trunk/biblemapper/src/main/java/org/crosswire/biblemapper/model/VBAExport.java
===================================================================
--- trunk/biblemapper/src/main/java/org/crosswire/biblemapper/model/VBAExport.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/biblemapper/src/main/java/org/crosswire/biblemapper/model/VBAExport.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -229,7 +229,7 @@
x = (int) (map.getPositionDimension(b, 1, 0) * x_mag);
y = (int) (map.getPositionDimension(b, 1, 1) * y_mag);
- out.println(" RouteStart "+x+"#, "+y+"#, \""+BibleInfo.getBookName(b)+"\"");
+ out.println(" RouteStart "+x+"#, "+y+"#, \""+BibleInfo.getPreferredBookName(b)+"\"");
int cib = BibleInfo.chaptersInBook(b);
for (int c=2; c<=cib; c++)
Modified: trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/BookVerseColor.java
===================================================================
--- trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/BookVerseColor.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/BookVerseColor.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -104,7 +104,7 @@
{
try
{
- return "Book - "+BibleInfo.getBookName(book);
+ return "Book - "+BibleInfo.getPreferredBookName(book);
}
catch (NoSuchVerseException ex)
{
Modified: trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/CliMapper.java
===================================================================
--- trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/CliMapper.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/CliMapper.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -81,7 +81,7 @@
{
Element eb = new Element("book");
eb.setAttribute("num", ""+b);
- eb.setAttribute("name", BibleInfo.getBookName(b));
+ eb.setAttribute("name", BibleInfo.getPreferredBookName(b));
links.addContent(eb);
int chff = BibleInfo.chaptersInBook(b);
Modified: trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/MapperPane.java
===================================================================
--- trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/MapperPane.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/biblemapper/src/main/java/org/crosswire/biblemapper/swing/MapperPane.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -163,7 +163,7 @@
Color col = versecolor.getForeground();
g.setColor(col);
- g.drawString(BibleInfo.getBookName(b), pos[X], pos[Y]);
+ g.drawString(BibleInfo.getPreferredBookName(b), pos[X], pos[Y]);
col = versecolor.getColor(b, 1, 1);
g.setColor(col);
Modified: trunk/common/src/main/java/org/crosswire/common/diff/Distance.java
===================================================================
--- trunk/common/src/main/java/org/crosswire/common/diff/Distance.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/common/src/main/java/org/crosswire/common/diff/Distance.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -38,7 +38,7 @@
* @param target the changed text
* @return the distance
*/
- public static int getLevenshteinDistance (String source, String target)
+ public static int getLevenshteinDistance(String source, String target)
{
if (source == null || target == null)
{
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/examples/APIExamples.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -249,7 +249,7 @@
{
Verse verse = (Verse) iter.next();
BookData data = new BookData(bible, verse);
- System.out.println('|' + BibleInfo.getBookName(verse.getBook()) + '|' + verse.getChapter() + '|' + verse.getVerse() + '|' + OSISUtil.getCanonicalText(data.getOsisFragment()));
+ System.out.println('|' + BibleInfo.getPreferredBookName(verse.getBook()) + '|' + verse.getChapter() + '|' + verse.getVerse() + '|' + OSISUtil.getCanonicalText(data.getOsisFragment()));
}
}
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/Verse.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/Verse.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/Verse.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -167,11 +167,11 @@
// To cope with thing like Jude 2...
if (BibleInfo.chaptersInBook(book) == 1)
{
- return BibleInfo.getBookName(book)
+ return BibleInfo.getPreferredBookName(book)
+ Verse.VERSE_PREF_DELIM1
+ verse;
}
- return BibleInfo.getBookName(book)
+ return BibleInfo.getPreferredBookName(book)
+ Verse.VERSE_PREF_DELIM1
+ chapter
+ Verse.VERSE_PREF_DELIM2
@@ -207,7 +207,7 @@
{
if (verseBase.book != book)
{
- return BibleInfo.getBookName(book)
+ return BibleInfo.getPreferredBookName(book)
+ Verse.VERSE_PREF_DELIM1
+ verse;
}
@@ -217,7 +217,7 @@
if (verseBase.book != book)
{
- return BibleInfo.getBookName(book)
+ return BibleInfo.getPreferredBookName(book)
+ Verse.VERSE_PREF_DELIM1
+ chapter
+ Verse.VERSE_PREF_DELIM2
@@ -247,7 +247,7 @@
{
try
{
- return BibleInfo.getBookName(book);
+ return BibleInfo.getPreferredBookName(book);
}
catch (NoSuchKeyException ex)
{
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/passage/VerseRange.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/passage/VerseRange.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/passage/VerseRange.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -164,18 +164,18 @@
// Just report the name of the book, we don't need to worry about the
// base since we start at the start of a book, and should have been
// recently normalized()
- return BibleInfo.getBookName(startBook)
+ return BibleInfo.getPreferredBookName(startBook)
+ VerseRange.RANGE_PREF_DELIM
- + BibleInfo.getBookName(endBook);
+ + BibleInfo.getPreferredBookName(endBook);
}
// If this range is exactly a whole chapter
if (isWholeChapters())
{
// Just report book and chapter names
- return BibleInfo.getBookName(startBook)
+ return BibleInfo.getPreferredBookName(startBook)
+ Verse.VERSE_PREF_DELIM1 + startChapter
- + VerseRange.RANGE_PREF_DELIM + BibleInfo.getBookName(endBook)
+ + VerseRange.RANGE_PREF_DELIM + BibleInfo.getPreferredBookName(endBook)
+ Verse.VERSE_PREF_DELIM1 + endChapter;
}
@@ -188,7 +188,7 @@
// Just report the name of the book, we don't need to worry about the
// base since we start at the start of a book, and should have been
// recently normalized()
- return BibleInfo.getBookName(startBook);
+ return BibleInfo.getPreferredBookName(startBook);
}
// If this is 2 separate chapters
@@ -198,7 +198,7 @@
if (isWholeChapters())
{
// Just report the name of the book and the chapters
- return BibleInfo.getBookName(startBook)
+ return BibleInfo.getPreferredBookName(startBook)
+ Verse.VERSE_PREF_DELIM1 + startChapter
+ VerseRange.RANGE_PREF_DELIM + endChapter;
}
@@ -212,7 +212,7 @@
if (isWholeChapter())
{
// Just report the name of the book and the chapter
- return BibleInfo.getBookName(startBook)
+ return BibleInfo.getPreferredBookName(startBook)
+ Verse.VERSE_PREF_DELIM1 + startChapter;
}
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleInfo.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleInfo.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleInfo.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -117,15 +117,26 @@
}
/**
+ * Get the BookName.
+ * @param book The book number (1-66)
+ * @return The requested BookName
+ * @exception NoSuchVerseException If the book number is not valid
+ */
+ public static BookName getBookName(int book) throws NoSuchVerseException
+ {
+ return bibleNames.getName(book);
+ }
+
+ /**
* Get the preferred name of a book.
* Altered by the case setting (see setBookCase() and isLongBookName())
* @param book The book number (1-66)
* @return The full name of the book
* @exception NoSuchVerseException If the book number is not valid
*/
- public static String getBookName(int book) throws NoSuchVerseException
+ public static String getPreferredBookName(int book) throws NoSuchVerseException
{
- return bibleNames.getBookName(book);
+ return bibleNames.getPreferredName(book);
}
/**
@@ -137,7 +148,7 @@
*/
public static String getLongBookName(int book) throws NoSuchVerseException
{
- return bibleNames.getLongBookName(book);
+ return bibleNames.getLongName(book);
}
/**
@@ -149,7 +160,7 @@
*/
public static String getShortBookName(int book) throws NoSuchVerseException
{
- return bibleNames.getShortBookName(book);
+ return bibleNames.getShortName(book);
}
/**
@@ -173,16 +184,16 @@
int bookNum = -1;
if (containsLetter(find))
{
- bookNum = OSISNames.getBookNumber(find);
+ bookNum = OSISNames.getNumber(find);
if (bookNum == -1)
{
- bookNum = bibleNames.getBookNumber(find);
+ bookNum = bibleNames.getNumber(find);
}
if (bookNum == -1 && englishBibleNames != null)
{
- bookNum = englishBibleNames.getBookNumber(find);
+ bookNum = englishBibleNames.getNumber(find);
}
}
return bookNum;
@@ -387,7 +398,7 @@
Object[] params = new Object[]
{
new Integer(chaptersInBook(book)),
- getBookName(book), new Integer(chapter),
+ getPreferredBookName(book), new Integer(chapter),
};
throw new NoSuchVerseException(Msg.BOOKS_CHAPTER, params);
}
@@ -398,7 +409,7 @@
Object[] params = new Object[]
{
new Integer(versesInChapter(book, chapter)),
- getBookName(book),
+ getPreferredBookName(book),
new Integer(chapter),
new Integer(verse),
};
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -26,11 +26,9 @@
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-import java.util.regex.Pattern;
import org.crosswire.common.util.CWClassLoader;
import org.crosswire.common.util.StringUtil;
-import org.crosswire.jsword.book.CaseType;
import org.crosswire.jsword.passage.NoSuchVerseException;
/**
@@ -46,7 +44,7 @@
public final class BibleNames
{
/**
- * Ensure that we can not be instantiated
+ * Create BibleNames for the given locale
*/
public BibleNames(Locale locale)
{
@@ -54,6 +52,21 @@
initialize();
}
+ public BookName getName(int book) throws NoSuchVerseException
+ {
+ try
+ {
+ return books[book - 1];
+ }
+ catch (ArrayIndexOutOfBoundsException ex)
+ {
+ // This is faster than doing the check explicitly, unless
+ // The exception is actually thrown, then it is a lot slower
+ // I'd like to think that the norm is to get it right
+ throw new NoSuchVerseException(Msg.BOOKS_BOOK, new Object[] { new Integer(book) });
+ }
+ }
+
/**
* Get the preferred name of a book.
* Altered by the case setting (see setBookCase() and isLongBookName())
@@ -61,13 +74,9 @@
* @return The full name of the book
* @exception NoSuchVerseException If the book number is not valid
*/
- public String getBookName(int book) throws NoSuchVerseException
+ public String getPreferredName(int book) throws NoSuchVerseException
{
- if (BibleInfo.isFullBookName())
- {
- return getLongBookName(book);
- }
- return getShortBookName(book);
+ return getName(book).getPreferredName();
}
/**
@@ -77,31 +86,9 @@
* @return The full name of the book
* @exception NoSuchVerseException If the book number is not valid
*/
- public String getLongBookName(int book) throws NoSuchVerseException
+ public String getLongName(int book) throws NoSuchVerseException
{
- try
- {
- CaseType bookCase = BibleInfo.getDefaultCase();
-
- if (bookCase == CaseType.LOWER)
- {
- return fullBooks[book - 1].toLowerCase(locale);
- }
-
- if (bookCase == CaseType.UPPER)
- {
- return fullBooks[book - 1].toUpperCase(locale);
- }
-
- return fullBooks[book - 1];
- }
- catch (ArrayIndexOutOfBoundsException ex)
- {
- // This is faster than doing the check explicitly, unless
- // The exception is actually thrown, then it is a lot slower
- // I'd like to think that the norm is to get it right
- throw new NoSuchVerseException(Msg.BOOKS_BOOK, new Object[] { new Integer(book) });
- }
+ return getName(book).getLongName();
}
/**
@@ -111,31 +98,9 @@
* @return The short name of the book
* @exception NoSuchVerseException If the book number is not valid
*/
- public String getShortBookName(int book) throws NoSuchVerseException
+ public String getShortName(int book) throws NoSuchVerseException
{
- try
- {
- CaseType bookCase = BibleInfo.getDefaultCase();
-
- if (bookCase.equals(CaseType.LOWER))
- {
- return shortBooks[book - 1].toLowerCase(locale);
- }
-
- if (bookCase.equals(CaseType.UPPER))
- {
- return shortBooks[book - 1].toUpperCase(locale);
- }
-
- return shortBooks[book - 1];
- }
- catch (ArrayIndexOutOfBoundsException ex)
- {
- // This is faster than doing the check explicitly, unless
- // The exception is actually thrown, then it is a lot slower
- // I'd like to think that the norm is to get it right
- throw new NoSuchVerseException(Msg.BOOKS_BOOK, new Object[] { new Integer(book) });
- }
+ return getName(book).getShortName();
}
/**
@@ -143,57 +108,37 @@
* @param find The string to identify
* @return The book number (1 to 66) On error -1
*/
- public int getBookNumber(String find)
+ public int getNumber(String find)
{
- String match = normalize(find);
+ String match = BookName.normalize(find, locale);
- Integer bookNum = (Integer) fullBooksMap.get(match);
- if (bookNum != null)
+ BookName bookName = (BookName) fullBooksMap.get(match);
+ if (bookName != null)
{
- return bookNum.intValue();
+ return bookName.getNumber();
}
- bookNum = (Integer) shortBooksMap.get(match);
- if (bookNum != null)
+ bookName = (BookName) shortBooksMap.get(match);
+ if (bookName != null)
{
- return bookNum.intValue();
+ return bookName.getNumber();
}
- bookNum = (Integer) altBooksMap.get(match);
- if (bookNum != null)
+ bookName = (BookName) altBooksMap.get(match);
+ if (bookName != null)
{
- return bookNum.intValue();
+ return bookName.getNumber();
}
- // Or does it match one of the alternative versions
- for (int i = 0; i < altBooks.length; i++)
+ for (int i = 0; i < books.length; i++)
{
- for (int j = 0; j < altBooks[i].length; j++)
+ bookName = books[i];
+ if (bookName.match(match))
{
- String targetBookName = altBooks[i][j];
- if (targetBookName.startsWith(match) || match.startsWith(targetBookName))
- {
- return i + 1;
- }
+ return bookName.getNumber();
}
}
- // Does it match a long version of the book or a short version
- for (int i = 0; i < fullBooksSearch.length; i++)
- {
- String targetBookName = fullBooksSearch[i];
- if (targetBookName.startsWith(match))
- {
- return i + 1;
- }
-
- targetBookName = shortBooksSearch[i];
- if (targetBookName.startsWith(match) || match.startsWith(targetBookName))
- {
- return i + 1;
- }
- }
-
return -1;
}
@@ -205,20 +150,10 @@
*/
public boolean isBookName(String find)
{
- return getBookNumber(find) != -1;
+ return getNumber(find) != -1;
}
/**
- * Normalize by stripping punctuation and whitespace.
- * @param str the string to normalize
- * @return the normalized string
- */
- private String normalize(String str)
- {
- return normPattern.matcher(str).replaceAll("").toLowerCase(locale); //$NON-NLS-1$
- }
-
- /**
* Load up the resources for Bible book and section names,
* and cache the upper and lower versions of them.
*/
@@ -226,23 +161,18 @@
{
int booksInBible = BibleInfo.booksInBible();
- // Create the book name arrays
- fullBooks = new String[booksInBible];
- fullBooksSearch = new String[booksInBible];
- fullBooksMap = new HashMap(booksInBible);
+ books = new BookName[booksInBible];
- shortBooks = new String[booksInBible];
- shortBooksSearch = new String[booksInBible];
+ // Create the book name maps
+ fullBooksMap = new HashMap(booksInBible);
shortBooksMap = new HashMap(booksInBible);
- altBooks = new String[booksInBible][];
altBooksMap = new HashMap(booksInBible);
ResourceBundle resources = ResourceBundle.getBundle(BibleNames.class.getName(), locale, CWClassLoader.instance(BibleNames.class));
for (int i = 0; i < booksInBible; i++)
{
- Integer bookNum = new Integer(i + 1);
String osisName = ""; //$NON-NLS-1$
try
{
@@ -254,29 +184,29 @@
}
String fullBook = getString(resources, osisName + FULL_KEY);
- String normalized = normalize(fullBook);
- fullBooks[i] = fullBook;
- fullBooksSearch[i] = normalized;
- fullBooksMap.put(normalized, bookNum);
String shortBook = getString(resources, osisName + SHORT_KEY);
if (shortBook.length() == 0)
{
shortBook = fullBook;
}
- normalized = normalize(shortBook);
- shortBooks[i] = shortBook;
- shortBooksSearch[i] = normalized;
- shortBooksMap.put(normalized, bookNum);
String altBook = getString(resources, osisName + ALT_KEY);
+
+ BookName bookName = new BookName(locale, i + 1, fullBook, shortBook, altBook);
+ books[i] = bookName;
+
+ fullBooksMap.put(bookName.getNormalizedLongName(), bookName);
+
+ shortBooksMap.put(bookName.getNormalizedShortName(), bookName);
+
String[] alternates = StringUtil.split(altBook, ',');
- altBooks[i] = alternates;
for (int j = 0; j < alternates.length; j++)
{
- altBooksMap.put(alternates[j], bookNum);
+ altBooksMap.put(alternates[j], bookName);
}
+
}
}
@@ -370,43 +300,21 @@
public static final byte JUDE = 65;
public static final byte REVELATION = 66;
- /** remove spaces and punctuation in Bible Names */
- private static Pattern normPattern = Pattern.compile("[. ]"); //$NON-NLS-1$
+ private BookName[] books;
/** The locale for the Bible Names */
private Locale locale;
- /** The full names of the book of the Bible, in mixed case */
- private String[] fullBooks;
-
/** The full names of the book of the Bible, normalized, generated at runtime */
- private String[] fullBooksSearch;
-
- /** The full names of the book of the Bible, normalized, generated at runtime */
private Map fullBooksMap;
- /** Standard shortened names for the book of the Bible, in mixed case */
- private String[] shortBooks;
-
/**
* Standard shortened names for the book of the Bible, normalized, generated
* at runtime.
*/
- private String[] shortBooksSearch;
-
- /**
- * Standard shortened names for the book of the Bible, normalized, generated
- * at runtime.
- */
private Map shortBooksMap;
/**
- * Alternative shortened names for the book of the Bible, expected to be
- * normalized
- */
- private String[][] altBooks;
-
- /**
* Alternative shortened names for the book of the Bible, normalized,
* generated at runtime
*/
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_af.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_ar_EG.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_bg.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_cs.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_da.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_de.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_es.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_et.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_fa.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_fi.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_fr.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_he.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_hu.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_id.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_it.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_ko.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_la.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_lt.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_nl.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_no.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_pl.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_pt.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_pt_BR.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_ro.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_ru.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_sk.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_sl.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_sv.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_th.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_uk.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_zh_CN.properties
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_zh_CN.properties 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_zh_CN.properties 2007-06-13 22:33:29 UTC (rev 1402)
@@ -1,200 +1,200 @@
-#Created by JInto - www.guh-software.de
-#Tue Jan 23 14:20:16 EST 2007
-1Chr.Alt=
-1Chr.Full=\u5386\u4EE3\u5FD7\u4E0A
-1Chr.Short=\u4EE3\u4E0A
-1Cor.Alt=
-1Cor.Full=\u6B4C\u6797\u591A\u524D\u4E66
-1Cor.Short=\u6797\u524D
-1John.Alt=
-1John.Full=\u7EA6\u7FF0\u4E00\u4E66
-1John.Short=\u7EA6\u58F9
-1Kgs.Alt=
-1Kgs.Full=\u5217\u738B\u8BB0\u4E0A
-1Kgs.Short=\u738B\u4E0A
-1Pet.Alt=
-1Pet.Full=\u5F7C\u5F97\u524D\u4E66
-1Pet.Short=\u5F7C\u524D
-1Sam.Alt=
-1Sam.Full=\u6492\u6BCD\u8033\u8BB0\u4E0A
-1Sam.Short=\u6492\u4E0A
-1Thess.Alt=
-1Thess.Full=\u5E16\u6492\u7F57\u5C3C\u8FE6\u524D\u4E66
-1Thess.Short=\u5E16\u524D
-1Tim.Alt=
-1Tim.Full=\u63D0\u6469\u592A\u524D\u4E66
-1Tim.Short=\u63D0\u524D
-2Chr.Alt=
-2Chr.Full=\u5386\u4EE3\u5FD7\u4E0B
-2Chr.Short=\u4EE3\u4E0B
-2Cor.Alt=
-2Cor.Full=\u6B4C\u6797\u591A\u540E\u4E66
-2Cor.Short=\u6797\u540E
-2John.Alt=
-2John.Full=\u7EA6 \u7FF0\u4E8C\u4E66
-2John.Short=\u7EA6\u8D30
-2Kgs.Alt=
-2Kgs.Full=\u5217\u738B\u8BB0\u4E0B
-2Kgs.Short=\u738B\u4E0B
-2Pet.Alt=
-2Pet.Full=\u5F7C\u5F97\u540E\u4E66
-2Pet.Short=\u5F7C\u540E
-2Sam.Alt=
-2Sam.Full=\u6492\u6BCD\u8033\u8BB0\u4E0B
-2Sam.Short=\u6492\u4E0B
-2Thess.Alt=
-2Thess.Full=\u5E16\u6492\u7F57\u5C3C\u8FE6\u540E\u4E66
-2Thess.Short=\u5E16\u540E
-2Tim.Alt=
-2Tim.Full=\u63D0\u6469\u592A\u540E\u4E66
-2Tim.Short=\u63D0\u540E
-3John.Alt=
-3John.Full=\u7EA6\u7FF0\u4E09\u4E66
-3John.Short=\u7EA6\u53C1
-Acts.Alt=
-Acts.Full=\u4F7F\u5F92\u884C\u4F20
-Acts.Short=\u5F92
-Amos.Alt=
-Amos.Full=\u963F\u6469\u53F8\u4E66
-Amos.Short=\u6469
-Col.Alt=
-Col.Full=\u6B4C\u7F57\u897F\u4E66
-Col.Short=\u897F
-Dan.Alt=
-Dan.Full=\u4F46\u4EE5\u7406\u4E66
-Dan.Short=\u4F46
-Deut.Alt=
-Deut.Full=\u7533\u547D\u8BB0
-Deut.Short=\u7533
-Eccl.Alt=
-Eccl.Full=\u4F20\u9053\u4E66
-Eccl.Short=\u4F20
-Eph.Alt=
-Eph.Full=\u4EE5\u5F17\u6240\u4E66
-Eph.Short=\u5F17
-Esth.Alt=
-Esth.Full=\u4EE5\u65AF\u5E16\u8BB0
-Esth.Short=\u65AF
-Exod.Alt=
-Exod.Full=\u51FA\u57C3\u53CA\u8BB0
-Exod.Short=\u51FA
-Ezek.Alt=
-Ezek.Full=\u4EE5\u897F\u7ED3\u4E66
-Ezek.Short=\u7ED3
-Ezra.Alt=
-Ezra.Full=\u4EE5\u65AF\u62C9\u8BB0
-Ezra.Short=\u62C9
-Gal.Alt=
-Gal.Full=\u52A0\u62C9\u592A\u4E66
-Gal.Short=\u52A0
-Gen.Alt=
-Gen.Full=\u521B\u4E16\u7EAA
-Gen.Short=\u521B
-Hab.Alt=
-Hab.Full=\u54C8\u5DF4\u8C37\u4E66
-Hab.Short=\u54C8
-Hag.Alt=
-Hag.Full=\u54C8\u8BE5\u4E66
-Hag.Short=\u8BE5
-Heb.Alt=
-Heb.Full=\u5E0C\u4F2F\u6765\u4E66
-Heb.Short=\u6765
-Hos.Alt=
-Hos.Full=\u4F55\u897F\u963F\u4E66
-Hos.Short=\u4F55
-Isa.Alt=
-Isa.Full=\u4EE5\u8D5B\u4E9A\u4E66
-Isa.Short=\u8D5B
-Jas.Alt=
-Jas.Full=\u96C5\u5404\u4E66
-Jas.Short=\u96C5
-Jer.Alt=
-Jer.Full=\u8036\u5229\u7C73\u4E66
-Jer.Short=\u8036
-Job.Alt=
-Job.Full=\u7EA6\u4F2F\u8BB0
-Job.Short=\u4F2F
-Joel.Alt=
-Joel.Full=\u7EA6\u73E5\u4E66
-Joel.Short=\u73E5
-John.Alt=
-John.Full=\u7EA6\u7FF0\u798F\u97F3
-John.Short=\u7EA6
-Jonah.Alt=
-Jonah.Full=\u7EA6\u62FF\u4E66
-Jonah.Short=\u62FF
-Josh.Alt=
-Josh.Full=\u7EA6\u4E66\u4E9A\u8BB0
-Josh.Short=\u4E66
-Jude.Alt=
-Jude.Full=\u72B9\u5927\u4E66
-Jude.Short=\u72B9
-Judg.Alt=
-Judg.Full=\u58EB\u5E08\u8BB0
-Judg.Short=\u58EB
-Lam.Alt=
-Lam.Full=\u8036\u5229\u7C73\u54C0\u6B4C
-Lam.Short=\u54C0
-Lev.Alt=
-Lev.Full=\u5229\u672A\u8BB0
-Lev.Short=\u5229
-Luke.Alt=
-Luke.Full=\u8DEF\u52A0\u798F\u97F3
-Luke.Short=\u8DEF
-Mal.Alt=
-Mal.Full=\u739B\u62C9\u57FA\u4E66
-Mal.Short=\u739B
-Mark.Alt=
-Mark.Full=\u9A6C\u53EF\u798F\u97F3
-Mark.Short=\u53EF
-Matt.Alt=
-Matt.Full=\u9A6C\u592A\u798F\u97F3
-Matt.Short=\u592A
-Mic.Alt=
-Mic.Full=\u5F25\u8FE6\u4E66
-Mic.Short=\u5F25
-Nah.Alt=
-Nah.Full=\u90A3\u9E3F\u4E66
-Nah.Short=\u9E3F
-Neh.Alt=
-Neh.Full=\u5C3C\u5E0C\u7C73\u8BB0
-Neh.Short=\u5C3C
-Num.Alt=
-Num.Full=\u6C11\u6570\u8BB0
-Num.Short=\u6C11
-Obad.Alt=
-Obad.Full=\u4FC4\u5DF4\u5E95\u4E9A\u4E66
-Obad.Short=\u4FC4
-Phil.Alt=
-Phil.Full=\u8153\u5229\u6BD4\u4E66
-Phil.Short=\u8153
-Phlm.Alt=
-Phlm.Full=\u8153\u5229\u95E8\u4E66
-Phlm.Short=\u95E8
-Prov.Alt=
-Prov.Full=\u7BB4\u8A00
-Prov.Short=\u7BB4
-Ps.Alt=
-Ps.Full=\u8BD7\u7BC7
-Ps.Short=\u8BD7
-Rev.Alt=
-Rev.Full=\u542F\u793A\u5F55
-Rev.Short=\u542F
-Rom.Alt=
-Rom.Full=\u7F57\u9A6C\u4E66
-Rom.Short=\u7F57
-Ruth.Alt=
-Ruth.Full=\u8DEF\u5F97\u8BB0
-Ruth.Short=\u5F97
-Song.Alt=
-Song.Full=\u96C5\u6B4C
-Song.Short=\u6B4C
-Titus.Alt=
-Titus.Full=\u63D0\u591A\u4E66
-Titus.Short=\u591A
-Zech.Alt=
-Zech.Full=\u6492\u8FE6\u5229\u4E9A
-Zech.Short=\u4E9A
-Zeph.Alt=
-Zeph.Full=\u897F\u756A\u96C5\u4E66
-Zeph.Short=\u756A
+#Created by JInto - www.guh-software.de
+#Tue Jan 23 14:20:16 EST 2007
+1Chr.Alt=
+1Chr.Full=\u5386\u4EE3\u5FD7\u4E0A
+1Chr.Short=\u4EE3\u4E0A
+1Cor.Alt=
+1Cor.Full=\u6B4C\u6797\u591A\u524D\u4E66
+1Cor.Short=\u6797\u524D
+1John.Alt=
+1John.Full=\u7EA6\u7FF0\u4E00\u4E66
+1John.Short=\u7EA6\u58F9
+1Kgs.Alt=
+1Kgs.Full=\u5217\u738B\u8BB0\u4E0A
+1Kgs.Short=\u738B\u4E0A
+1Pet.Alt=
+1Pet.Full=\u5F7C\u5F97\u524D\u4E66
+1Pet.Short=\u5F7C\u524D
+1Sam.Alt=
+1Sam.Full=\u6492\u6BCD\u8033\u8BB0\u4E0A
+1Sam.Short=\u6492\u4E0A
+1Thess.Alt=
+1Thess.Full=\u5E16\u6492\u7F57\u5C3C\u8FE6\u524D\u4E66
+1Thess.Short=\u5E16\u524D
+1Tim.Alt=
+1Tim.Full=\u63D0\u6469\u592A\u524D\u4E66
+1Tim.Short=\u63D0\u524D
+2Chr.Alt=
+2Chr.Full=\u5386\u4EE3\u5FD7\u4E0B
+2Chr.Short=\u4EE3\u4E0B
+2Cor.Alt=
+2Cor.Full=\u6B4C\u6797\u591A\u540E\u4E66
+2Cor.Short=\u6797\u540E
+2John.Alt=
+2John.Full=\u7EA6 \u7FF0\u4E8C\u4E66
+2John.Short=\u7EA6\u8D30
+2Kgs.Alt=
+2Kgs.Full=\u5217\u738B\u8BB0\u4E0B
+2Kgs.Short=\u738B\u4E0B
+2Pet.Alt=
+2Pet.Full=\u5F7C\u5F97\u540E\u4E66
+2Pet.Short=\u5F7C\u540E
+2Sam.Alt=
+2Sam.Full=\u6492\u6BCD\u8033\u8BB0\u4E0B
+2Sam.Short=\u6492\u4E0B
+2Thess.Alt=
+2Thess.Full=\u5E16\u6492\u7F57\u5C3C\u8FE6\u540E\u4E66
+2Thess.Short=\u5E16\u540E
+2Tim.Alt=
+2Tim.Full=\u63D0\u6469\u592A\u540E\u4E66
+2Tim.Short=\u63D0\u540E
+3John.Alt=
+3John.Full=\u7EA6\u7FF0\u4E09\u4E66
+3John.Short=\u7EA6\u53C1
+Acts.Alt=
+Acts.Full=\u4F7F\u5F92\u884C\u4F20
+Acts.Short=\u5F92
+Amos.Alt=
+Amos.Full=\u963F\u6469\u53F8\u4E66
+Amos.Short=\u6469
+Col.Alt=
+Col.Full=\u6B4C\u7F57\u897F\u4E66
+Col.Short=\u897F
+Dan.Alt=
+Dan.Full=\u4F46\u4EE5\u7406\u4E66
+Dan.Short=\u4F46
+Deut.Alt=
+Deut.Full=\u7533\u547D\u8BB0
+Deut.Short=\u7533
+Eccl.Alt=
+Eccl.Full=\u4F20\u9053\u4E66
+Eccl.Short=\u4F20
+Eph.Alt=
+Eph.Full=\u4EE5\u5F17\u6240\u4E66
+Eph.Short=\u5F17
+Esth.Alt=
+Esth.Full=\u4EE5\u65AF\u5E16\u8BB0
+Esth.Short=\u65AF
+Exod.Alt=
+Exod.Full=\u51FA\u57C3\u53CA\u8BB0
+Exod.Short=\u51FA
+Ezek.Alt=
+Ezek.Full=\u4EE5\u897F\u7ED3\u4E66
+Ezek.Short=\u7ED3
+Ezra.Alt=
+Ezra.Full=\u4EE5\u65AF\u62C9\u8BB0
+Ezra.Short=\u62C9
+Gal.Alt=
+Gal.Full=\u52A0\u62C9\u592A\u4E66
+Gal.Short=\u52A0
+Gen.Alt=
+Gen.Full=\u521B\u4E16\u7EAA
+Gen.Short=\u521B
+Hab.Alt=
+Hab.Full=\u54C8\u5DF4\u8C37\u4E66
+Hab.Short=\u54C8
+Hag.Alt=
+Hag.Full=\u54C8\u8BE5\u4E66
+Hag.Short=\u8BE5
+Heb.Alt=
+Heb.Full=\u5E0C\u4F2F\u6765\u4E66
+Heb.Short=\u6765
+Hos.Alt=
+Hos.Full=\u4F55\u897F\u963F\u4E66
+Hos.Short=\u4F55
+Isa.Alt=
+Isa.Full=\u4EE5\u8D5B\u4E9A\u4E66
+Isa.Short=\u8D5B
+Jas.Alt=
+Jas.Full=\u96C5\u5404\u4E66
+Jas.Short=\u96C5
+Jer.Alt=
+Jer.Full=\u8036\u5229\u7C73\u4E66
+Jer.Short=\u8036
+Job.Alt=
+Job.Full=\u7EA6\u4F2F\u8BB0
+Job.Short=\u4F2F
+Joel.Alt=
+Joel.Full=\u7EA6\u73E5\u4E66
+Joel.Short=\u73E5
+John.Alt=
+John.Full=\u7EA6\u7FF0\u798F\u97F3
+John.Short=\u7EA6
+Jonah.Alt=
+Jonah.Full=\u7EA6\u62FF\u4E66
+Jonah.Short=\u62FF
+Josh.Alt=
+Josh.Full=\u7EA6\u4E66\u4E9A\u8BB0
+Josh.Short=\u4E66
+Jude.Alt=
+Jude.Full=\u72B9\u5927\u4E66
+Jude.Short=\u72B9
+Judg.Alt=
+Judg.Full=\u58EB\u5E08\u8BB0
+Judg.Short=\u58EB
+Lam.Alt=
+Lam.Full=\u8036\u5229\u7C73\u54C0\u6B4C
+Lam.Short=\u54C0
+Lev.Alt=
+Lev.Full=\u5229\u672A\u8BB0
+Lev.Short=\u5229
+Luke.Alt=
+Luke.Full=\u8DEF\u52A0\u798F\u97F3
+Luke.Short=\u8DEF
+Mal.Alt=
+Mal.Full=\u739B\u62C9\u57FA\u4E66
+Mal.Short=\u739B
+Mark.Alt=
+Mark.Full=\u9A6C\u53EF\u798F\u97F3
+Mark.Short=\u53EF
+Matt.Alt=
+Matt.Full=\u9A6C\u592A\u798F\u97F3
+Matt.Short=\u592A
+Mic.Alt=
+Mic.Full=\u5F25\u8FE6\u4E66
+Mic.Short=\u5F25
+Nah.Alt=
+Nah.Full=\u90A3\u9E3F\u4E66
+Nah.Short=\u9E3F
+Neh.Alt=
+Neh.Full=\u5C3C\u5E0C\u7C73\u8BB0
+Neh.Short=\u5C3C
+Num.Alt=
+Num.Full=\u6C11\u6570\u8BB0
+Num.Short=\u6C11
+Obad.Alt=
+Obad.Full=\u4FC4\u5DF4\u5E95\u4E9A\u4E66
+Obad.Short=\u4FC4
+Phil.Alt=
+Phil.Full=\u8153\u5229\u6BD4\u4E66
+Phil.Short=\u8153
+Phlm.Alt=
+Phlm.Full=\u8153\u5229\u95E8\u4E66
+Phlm.Short=\u95E8
+Prov.Alt=
+Prov.Full=\u7BB4\u8A00
+Prov.Short=\u7BB4
+Ps.Alt=
+Ps.Full=\u8BD7\u7BC7
+Ps.Short=\u8BD7
+Rev.Alt=
+Rev.Full=\u542F\u793A\u5F55
+Rev.Short=\u542F
+Rom.Alt=
+Rom.Full=\u7F57\u9A6C\u4E66
+Rom.Short=\u7F57
+Ruth.Alt=
+Ruth.Full=\u8DEF\u5F97\u8BB0
+Ruth.Short=\u5F97
+Song.Alt=
+Song.Full=\u96C5\u6B4C
+Song.Short=\u6B4C
+Titus.Alt=
+Titus.Full=\u63D0\u591A\u4E66
+Titus.Short=\u591A
+Zech.Alt=
+Zech.Full=\u6492\u8FE6\u5229\u4E9A
+Zech.Short=\u4E9A
+Zeph.Alt=
+Zeph.Full=\u897F\u756A\u96C5\u4E66
+Zeph.Short=\u756A
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_zh_CN.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_zh_TW.properties
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_zh_TW.properties 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_zh_TW.properties 2007-06-13 22:33:29 UTC (rev 1402)
@@ -1,200 +1,200 @@
-#Created by JInto - www.guh-software.de
-#Tue Jan 23 14:20:16 EST 2007
-1Chr.Alt=
-1Chr.Full=\u5386\u4EE3\u5FD7\u4E0A
-1Chr.Short=\u4EE3\u4E0A
-1Cor.Alt=
-1Cor.Full=\u6B4C\u6797\u591A\u524D\u4E66
-1Cor.Short=\u6797\u524D
-1John.Alt=
-1John.Full=\u7EA6\u7FF0\u4E00\u4E66
-1John.Short=\u7EA6\u58F9
-1Kgs.Alt=
-1Kgs.Full=\u5217\u738B\u8BB0\u4E0A
-1Kgs.Short=\u738B\u4E0A
-1Pet.Alt=
-1Pet.Full=\u5F7C\u5F97\u524D\u4E66
-1Pet.Short=\u5F7C\u524D
-1Sam.Alt=
-1Sam.Full=\u6492\u6BCD\u8033\u8BB0\u4E0A
-1Sam.Short=\u6492\u4E0A
-1Thess.Alt=
-1Thess.Full=\u5E16\u6492\u7F57\u5C3C\u8FE6\u524D\u4E66
-1Thess.Short=\u5E16\u524D
-1Tim.Alt=
-1Tim.Full=\u63D0\u6469\u592A\u524D\u4E66
-1Tim.Short=\u63D0\u524D
-2Chr.Alt=
-2Chr.Full=\u5386\u4EE3\u5FD7\u4E0B
-2Chr.Short=\u4EE3\u4E0B
-2Cor.Alt=
-2Cor.Full=\u6B4C\u6797\u591A\u540E\u4E66
-2Cor.Short=\u6797\u540E
-2John.Alt=
-2John.Full=\u7EA6 \u7FF0\u4E8C\u4E66
-2John.Short=\u7EA6\u8D30
-2Kgs.Alt=
-2Kgs.Full=\u5217\u738B\u8BB0\u4E0B
-2Kgs.Short=\u738B\u4E0B
-2Pet.Alt=
-2Pet.Full=\u5F7C\u5F97\u540E\u4E66
-2Pet.Short=\u5F7C\u540E
-2Sam.Alt=
-2Sam.Full=\u6492\u6BCD\u8033\u8BB0\u4E0B
-2Sam.Short=\u6492\u4E0B
-2Thess.Alt=
-2Thess.Full=\u5E16\u6492\u7F57\u5C3C\u8FE6\u540E\u4E66
-2Thess.Short=\u5E16\u540E
-2Tim.Alt=
-2Tim.Full=\u63D0\u6469\u592A\u540E\u4E66
-2Tim.Short=\u63D0\u540E
-3John.Alt=
-3John.Full=\u7EA6\u7FF0\u4E09\u4E66
-3John.Short=\u7EA6\u53C1
-Acts.Alt=
-Acts.Full=\u4F7F\u5F92\u884C\u4F20
-Acts.Short=\u5F92
-Amos.Alt=
-Amos.Full=\u963F\u6469\u53F8\u4E66
-Amos.Short=\u6469
-Col.Alt=
-Col.Full=\u6B4C\u7F57\u897F\u4E66
-Col.Short=\u897F
-Dan.Alt=
-Dan.Full=\u4F46\u4EE5\u7406\u4E66
-Dan.Short=\u4F46
-Deut.Alt=
-Deut.Full=\u7533\u547D\u8BB0
-Deut.Short=\u7533
-Eccl.Alt=
-Eccl.Full=\u4F20\u9053\u4E66
-Eccl.Short=\u4F20
-Eph.Alt=
-Eph.Full=\u4EE5\u5F17\u6240\u4E66
-Eph.Short=\u5F17
-Esth.Alt=
-Esth.Full=\u4EE5\u65AF\u5E16\u8BB0
-Esth.Short=\u65AF
-Exod.Alt=
-Exod.Full=\u51FA\u57C3\u53CA\u8BB0
-Exod.Short=\u51FA
-Ezek.Alt=
-Ezek.Full=\u4EE5\u897F\u7ED3\u4E66
-Ezek.Short=\u7ED3
-Ezra.Alt=
-Ezra.Full=\u4EE5\u65AF\u62C9\u8BB0
-Ezra.Short=\u62C9
-Gal.Alt=
-Gal.Full=\u52A0\u62C9\u592A\u4E66
-Gal.Short=\u52A0
-Gen.Alt=
-Gen.Full=\u521B\u4E16\u7EAA
-Gen.Short=\u521B
-Hab.Alt=
-Hab.Full=\u54C8\u5DF4\u8C37\u4E66
-Hab.Short=\u54C8
-Hag.Alt=
-Hag.Full=\u54C8\u8BE5\u4E66
-Hag.Short=\u8BE5
-Heb.Alt=
-Heb.Full=\u5E0C\u4F2F\u6765\u4E66
-Heb.Short=\u6765
-Hos.Alt=
-Hos.Full=\u4F55\u897F\u963F\u4E66
-Hos.Short=\u4F55
-Isa.Alt=
-Isa.Full=\u4EE5\u8D5B\u4E9A\u4E66
-Isa.Short=\u8D5B
-Jas.Alt=
-Jas.Full=\u96C5\u5404\u4E66
-Jas.Short=\u96C5
-Jer.Alt=
-Jer.Full=\u8036\u5229\u7C73\u4E66
-Jer.Short=\u8036
-Job.Alt=
-Job.Full=\u7EA6\u4F2F\u8BB0
-Job.Short=\u4F2F
-Joel.Alt=
-Joel.Full=\u7EA6\u73E5\u4E66
-Joel.Short=\u73E5
-John.Alt=
-John.Full=\u7EA6\u7FF0\u798F\u97F3
-John.Short=\u7EA6
-Jonah.Alt=
-Jonah.Full=\u7EA6\u62FF\u4E66
-Jonah.Short=\u62FF
-Josh.Alt=
-Josh.Full=\u7EA6\u4E66\u4E9A\u8BB0
-Josh.Short=\u4E66
-Jude.Alt=
-Jude.Full=\u72B9\u5927\u4E66
-Jude.Short=\u72B9
-Judg.Alt=
-Judg.Full=\u58EB\u5E08\u8BB0
-Judg.Short=\u58EB
-Lam.Alt=
-Lam.Full=\u8036\u5229\u7C73\u54C0\u6B4C
-Lam.Short=\u54C0
-Lev.Alt=
-Lev.Full=\u5229\u672A\u8BB0
-Lev.Short=\u5229
-Luke.Alt=
-Luke.Full=\u8DEF\u52A0\u798F\u97F3
-Luke.Short=\u8DEF
-Mal.Alt=
-Mal.Full=\u739B\u62C9\u57FA\u4E66
-Mal.Short=\u739B
-Mark.Alt=
-Mark.Full=\u9A6C\u53EF\u798F\u97F3
-Mark.Short=\u53EF
-Matt.Alt=
-Matt.Full=\u9A6C\u592A\u798F\u97F3
-Matt.Short=\u592A
-Mic.Alt=
-Mic.Full=\u5F25\u8FE6\u4E66
-Mic.Short=\u5F25
-Nah.Alt=
-Nah.Full=\u90A3\u9E3F\u4E66
-Nah.Short=\u9E3F
-Neh.Alt=
-Neh.Full=\u5C3C\u5E0C\u7C73\u8BB0
-Neh.Short=\u5C3C
-Num.Alt=
-Num.Full=\u6C11\u6570\u8BB0
-Num.Short=\u6C11
-Obad.Alt=
-Obad.Full=\u4FC4\u5DF4\u5E95\u4E9A\u4E66
-Obad.Short=\u4FC4
-Phil.Alt=
-Phil.Full=\u8153\u5229\u6BD4\u4E66
-Phil.Short=\u8153
-Phlm.Alt=
-Phlm.Full=\u8153\u5229\u95E8\u4E66
-Phlm.Short=\u95E8
-Prov.Alt=
-Prov.Full=\u7BB4\u8A00
-Prov.Short=\u7BB4
-Ps.Alt=
-Ps.Full=\u8BD7\u7BC7
-Ps.Short=\u8BD7
-Rev.Alt=
-Rev.Full=\u542F\u793A\u5F55
-Rev.Short=\u542F
-Rom.Alt=
-Rom.Full=\u7F57\u9A6C\u4E66
-Rom.Short=\u7F57
-Ruth.Alt=
-Ruth.Full=\u8DEF\u5F97\u8BB0
-Ruth.Short=\u5F97
-Song.Alt=
-Song.Full=\u96C5\u6B4C
-Song.Short=\u6B4C
-Titus.Alt=
-Titus.Full=\u63D0\u591A\u4E66
-Titus.Short=\u591A
-Zech.Alt=
-Zech.Full=\u6492\u8FE6\u5229\u4E9A
-Zech.Short=\u4E9A
-Zeph.Alt=
-Zeph.Full=\u897F\u756A\u96C5\u4E66
-Zeph.Short=\u756A
+#Created by JInto - www.guh-software.de
+#Tue Jan 23 14:20:16 EST 2007
+1Chr.Alt=
+1Chr.Full=\u5386\u4EE3\u5FD7\u4E0A
+1Chr.Short=\u4EE3\u4E0A
+1Cor.Alt=
+1Cor.Full=\u6B4C\u6797\u591A\u524D\u4E66
+1Cor.Short=\u6797\u524D
+1John.Alt=
+1John.Full=\u7EA6\u7FF0\u4E00\u4E66
+1John.Short=\u7EA6\u58F9
+1Kgs.Alt=
+1Kgs.Full=\u5217\u738B\u8BB0\u4E0A
+1Kgs.Short=\u738B\u4E0A
+1Pet.Alt=
+1Pet.Full=\u5F7C\u5F97\u524D\u4E66
+1Pet.Short=\u5F7C\u524D
+1Sam.Alt=
+1Sam.Full=\u6492\u6BCD\u8033\u8BB0\u4E0A
+1Sam.Short=\u6492\u4E0A
+1Thess.Alt=
+1Thess.Full=\u5E16\u6492\u7F57\u5C3C\u8FE6\u524D\u4E66
+1Thess.Short=\u5E16\u524D
+1Tim.Alt=
+1Tim.Full=\u63D0\u6469\u592A\u524D\u4E66
+1Tim.Short=\u63D0\u524D
+2Chr.Alt=
+2Chr.Full=\u5386\u4EE3\u5FD7\u4E0B
+2Chr.Short=\u4EE3\u4E0B
+2Cor.Alt=
+2Cor.Full=\u6B4C\u6797\u591A\u540E\u4E66
+2Cor.Short=\u6797\u540E
+2John.Alt=
+2John.Full=\u7EA6 \u7FF0\u4E8C\u4E66
+2John.Short=\u7EA6\u8D30
+2Kgs.Alt=
+2Kgs.Full=\u5217\u738B\u8BB0\u4E0B
+2Kgs.Short=\u738B\u4E0B
+2Pet.Alt=
+2Pet.Full=\u5F7C\u5F97\u540E\u4E66
+2Pet.Short=\u5F7C\u540E
+2Sam.Alt=
+2Sam.Full=\u6492\u6BCD\u8033\u8BB0\u4E0B
+2Sam.Short=\u6492\u4E0B
+2Thess.Alt=
+2Thess.Full=\u5E16\u6492\u7F57\u5C3C\u8FE6\u540E\u4E66
+2Thess.Short=\u5E16\u540E
+2Tim.Alt=
+2Tim.Full=\u63D0\u6469\u592A\u540E\u4E66
+2Tim.Short=\u63D0\u540E
+3John.Alt=
+3John.Full=\u7EA6\u7FF0\u4E09\u4E66
+3John.Short=\u7EA6\u53C1
+Acts.Alt=
+Acts.Full=\u4F7F\u5F92\u884C\u4F20
+Acts.Short=\u5F92
+Amos.Alt=
+Amos.Full=\u963F\u6469\u53F8\u4E66
+Amos.Short=\u6469
+Col.Alt=
+Col.Full=\u6B4C\u7F57\u897F\u4E66
+Col.Short=\u897F
+Dan.Alt=
+Dan.Full=\u4F46\u4EE5\u7406\u4E66
+Dan.Short=\u4F46
+Deut.Alt=
+Deut.Full=\u7533\u547D\u8BB0
+Deut.Short=\u7533
+Eccl.Alt=
+Eccl.Full=\u4F20\u9053\u4E66
+Eccl.Short=\u4F20
+Eph.Alt=
+Eph.Full=\u4EE5\u5F17\u6240\u4E66
+Eph.Short=\u5F17
+Esth.Alt=
+Esth.Full=\u4EE5\u65AF\u5E16\u8BB0
+Esth.Short=\u65AF
+Exod.Alt=
+Exod.Full=\u51FA\u57C3\u53CA\u8BB0
+Exod.Short=\u51FA
+Ezek.Alt=
+Ezek.Full=\u4EE5\u897F\u7ED3\u4E66
+Ezek.Short=\u7ED3
+Ezra.Alt=
+Ezra.Full=\u4EE5\u65AF\u62C9\u8BB0
+Ezra.Short=\u62C9
+Gal.Alt=
+Gal.Full=\u52A0\u62C9\u592A\u4E66
+Gal.Short=\u52A0
+Gen.Alt=
+Gen.Full=\u521B\u4E16\u7EAA
+Gen.Short=\u521B
+Hab.Alt=
+Hab.Full=\u54C8\u5DF4\u8C37\u4E66
+Hab.Short=\u54C8
+Hag.Alt=
+Hag.Full=\u54C8\u8BE5\u4E66
+Hag.Short=\u8BE5
+Heb.Alt=
+Heb.Full=\u5E0C\u4F2F\u6765\u4E66
+Heb.Short=\u6765
+Hos.Alt=
+Hos.Full=\u4F55\u897F\u963F\u4E66
+Hos.Short=\u4F55
+Isa.Alt=
+Isa.Full=\u4EE5\u8D5B\u4E9A\u4E66
+Isa.Short=\u8D5B
+Jas.Alt=
+Jas.Full=\u96C5\u5404\u4E66
+Jas.Short=\u96C5
+Jer.Alt=
+Jer.Full=\u8036\u5229\u7C73\u4E66
+Jer.Short=\u8036
+Job.Alt=
+Job.Full=\u7EA6\u4F2F\u8BB0
+Job.Short=\u4F2F
+Joel.Alt=
+Joel.Full=\u7EA6\u73E5\u4E66
+Joel.Short=\u73E5
+John.Alt=
+John.Full=\u7EA6\u7FF0\u798F\u97F3
+John.Short=\u7EA6
+Jonah.Alt=
+Jonah.Full=\u7EA6\u62FF\u4E66
+Jonah.Short=\u62FF
+Josh.Alt=
+Josh.Full=\u7EA6\u4E66\u4E9A\u8BB0
+Josh.Short=\u4E66
+Jude.Alt=
+Jude.Full=\u72B9\u5927\u4E66
+Jude.Short=\u72B9
+Judg.Alt=
+Judg.Full=\u58EB\u5E08\u8BB0
+Judg.Short=\u58EB
+Lam.Alt=
+Lam.Full=\u8036\u5229\u7C73\u54C0\u6B4C
+Lam.Short=\u54C0
+Lev.Alt=
+Lev.Full=\u5229\u672A\u8BB0
+Lev.Short=\u5229
+Luke.Alt=
+Luke.Full=\u8DEF\u52A0\u798F\u97F3
+Luke.Short=\u8DEF
+Mal.Alt=
+Mal.Full=\u739B\u62C9\u57FA\u4E66
+Mal.Short=\u739B
+Mark.Alt=
+Mark.Full=\u9A6C\u53EF\u798F\u97F3
+Mark.Short=\u53EF
+Matt.Alt=
+Matt.Full=\u9A6C\u592A\u798F\u97F3
+Matt.Short=\u592A
+Mic.Alt=
+Mic.Full=\u5F25\u8FE6\u4E66
+Mic.Short=\u5F25
+Nah.Alt=
+Nah.Full=\u90A3\u9E3F\u4E66
+Nah.Short=\u9E3F
+Neh.Alt=
+Neh.Full=\u5C3C\u5E0C\u7C73\u8BB0
+Neh.Short=\u5C3C
+Num.Alt=
+Num.Full=\u6C11\u6570\u8BB0
+Num.Short=\u6C11
+Obad.Alt=
+Obad.Full=\u4FC4\u5DF4\u5E95\u4E9A\u4E66
+Obad.Short=\u4FC4
+Phil.Alt=
+Phil.Full=\u8153\u5229\u6BD4\u4E66
+Phil.Short=\u8153
+Phlm.Alt=
+Phlm.Full=\u8153\u5229\u95E8\u4E66
+Phlm.Short=\u95E8
+Prov.Alt=
+Prov.Full=\u7BB4\u8A00
+Prov.Short=\u7BB4
+Ps.Alt=
+Ps.Full=\u8BD7\u7BC7
+Ps.Short=\u8BD7
+Rev.Alt=
+Rev.Full=\u542F\u793A\u5F55
+Rev.Short=\u542F
+Rom.Alt=
+Rom.Full=\u7F57\u9A6C\u4E66
+Rom.Short=\u7F57
+Ruth.Alt=
+Ruth.Full=\u8DEF\u5F97\u8BB0
+Ruth.Short=\u5F97
+Song.Alt=
+Song.Full=\u96C5\u6B4C
+Song.Short=\u6B4C
+Titus.Alt=
+Titus.Full=\u63D0\u591A\u4E66
+Titus.Short=\u591A
+Zech.Alt=
+Zech.Full=\u6492\u8FE6\u5229\u4E9A
+Zech.Short=\u4E9A
+Zeph.Alt=
+Zeph.Full=\u897F\u756A\u96C5\u4E66
+Zeph.Short=\u756A
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BibleNames_zh_TW.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BookName.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/versification/BookName.java (rev 0)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/versification/BookName.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -0,0 +1,250 @@
+/**
+ * Distribution License:
+ * JSword is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License, version 2.1 as published by
+ * the Free Software Foundation. This program is distributed in the hope
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * The License is available on the internet at:
+ * http://www.gnu.org/copyleft/lgpl.html
+ * or by writing to:
+ * Free Software Foundation, Inc.
+ * 59 Temple Place - Suite 330
+ * Boston, MA 02111-1307, USA
+ *
+ * Copyright: 2007
+ * The copyright to this program is held by it's authors.
+ *
+ * ID: $Id$
+ */
+package org.crosswire.jsword.versification;
+
+import java.util.Locale;
+import java.util.regex.Pattern;
+
+import org.crosswire.common.util.StringUtil;
+import org.crosswire.jsword.book.CaseType;
+import org.crosswire.jsword.passage.NoSuchVerseException;
+
+/**
+ * BookName represents the different ways a book of the bible is named.
+ *
+ * @see gnu.lgpl.License for license details.
+ * The copyright to this program is held by it's authors.
+ * @author DM Smith [dmsmith555 at yahoo dot com]
+ */
+public final class BookName
+{
+ /**
+ * Create a BookName for a Book of the Bible in a given language.
+ *
+ * @param locale the language of this BookName
+ * @param bookNumber the Book's canonical number
+ * @param longName the Book's long name
+ * @param shortName the Book's short name, if any
+ * @param alternateNames optional alternates for the Book
+ */
+ public BookName(Locale locale, int bookNumber, String longName, String shortName, String alternateNames)
+ {
+ this.locale = locale;
+ this.bookNumber = bookNumber;
+ this.longName = longName;
+ this.normalizedLongName = normalize(longName, locale);
+ this.shortName = shortName;
+ this.normalizedShortName = normalize(shortName, locale);
+
+ if (alternateNames != null)
+ {
+ this.alternateNames = StringUtil.split(normalize(alternateNames, locale), ',');
+ }
+ }
+
+ /**
+ * Get canonical number of a book.
+ * @return The book number (1 to 66)
+ */
+ public int getNumber()
+ {
+ return bookNumber;
+ }
+
+ /**
+ * Get the preferred name of a book.
+ * Altered by the case setting (see setBookCase() and isLongBookName())
+ * @param book The book number (1-66)
+ * @return The full name of the book
+ * @exception NoSuchVerseException If the book number is not valid
+ */
+ public String getPreferredName()
+ {
+ if (BibleInfo.isFullBookName())
+ {
+ return getLongName();
+ }
+ return getShortName();
+ }
+
+ /**
+ * Get the full name of a book (e.g. "Genesis").
+ * Altered by the case setting (see setBookCase())
+ * @return The full name of the book
+ */
+ public String getLongName()
+ {
+ CaseType bookCase = BibleInfo.getDefaultCase();
+
+ if (bookCase == CaseType.LOWER)
+ {
+ return longName.toLowerCase(locale);
+ }
+
+ if (bookCase == CaseType.UPPER)
+ {
+ return longName.toUpperCase(locale);
+ }
+
+ return longName;
+ }
+
+ /**
+ * Get the short name of a book (e.g. "Gen").
+ * Altered by the case setting (see setBookCase())
+ * @return The short name of the book
+ */
+ public String getShortName()
+ {
+ CaseType bookCase = BibleInfo.getDefaultCase();
+
+ if (bookCase == CaseType.LOWER)
+ {
+ return shortName.toLowerCase(locale);
+ }
+
+ if (bookCase == CaseType.UPPER)
+ {
+ return shortName.toUpperCase(locale);
+ }
+
+ return shortName;
+ }
+
+ /**
+ * @return the normalizedLongName
+ */
+ public String getNormalizedLongName()
+ {
+ return normalizedLongName;
+ }
+
+ /**
+ * @return the normalizedShortName
+ */
+ public String getNormalizedShortName()
+ {
+ return normalizedShortName;
+ }
+
+ /**
+ * Match the normalized name as closely as possible. It will match if:
+ * <ol>
+ * <li>it is a prefix of a normalized alternate name</li>
+ * <li>a normalized alternate name is a prefix of it</li>
+ * <li>it is a prefix of a normalized long name</li>
+ * <li>it is a prefix of a normalized short name</li>
+ * <li>a normalized short name is a prefix of it</li>
+ * @param normalizedName the already normalized name to match against.
+ * @return true of false
+ */
+ public boolean match(String normalizedName)
+ {
+
+ // Does it match one of the alternative versions
+ for (int j = 0; j < alternateNames.length; j++)
+ {
+ String targetBookName = alternateNames[j];
+ if (targetBookName.startsWith(normalizedName) || normalizedName.startsWith(targetBookName))
+ {
+ return true;
+ }
+ }
+
+ // Does it match a long version of the book
+ if (normalizedLongName.startsWith(normalizedName))
+ {
+ return true;
+ }
+
+ // or a short version
+ if (normalizedShortName.startsWith(normalizedName) || normalizedName.startsWith(normalizedShortName))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode()
+ {
+ return bookNumber;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+
+ if (obj == null)
+ {
+ return false;
+ }
+
+ if (getClass() != obj.getClass())
+ {
+ return false;
+ }
+
+ final BookName other = (BookName) obj;
+ return bookNumber == other.bookNumber;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ public String toString()
+ {
+ return getPreferredName();
+ }
+
+ /**
+ * Normalize by stripping punctuation and whitespace and lowercasing.
+ * @param str the string to normalize
+ * @return the normalized string
+ */
+ public static String normalize(String str, Locale locale)
+ {
+ return normPattern.matcher(str).replaceAll("").toLowerCase(locale); //$NON-NLS-1$
+ }
+
+ /** remove spaces and some punctuation in Book Name (make sure , is allowed) */
+ private static Pattern normPattern = Pattern.compile("[. ]"); //$NON-NLS-1$
+
+ private int bookNumber;
+ private String longName;
+ private String normalizedLongName;
+ private String shortName;
+ private String normalizedShortName;
+ private String[] alternateNames;
+
+ /** The locale for the Book Name */
+ private Locale locale;
+}
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/BookName.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/Msg.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/Msg.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/versification/OSISNames.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/versification/OSISNames.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/versification/OSISNames.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -26,7 +26,6 @@
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-import java.util.regex.Pattern;
import org.crosswire.common.util.CWClassLoader;
import org.crosswire.jsword.passage.NoSuchVerseException;
@@ -77,11 +76,10 @@
* @param find The string to identify
* @return The book number (1 to 66) On error -1
*/
- public static int getBookNumber(String find)
+ public static int getNumber(String find)
{
- String match = normalize(find);
+ String match = BookName.normalize(find, OSIS_LOCALE);
- // Favor OSIS names.
Integer bookNum = (Integer) osisMap.get(match);
if (bookNum != null)
{
@@ -99,20 +97,10 @@
*/
public static boolean isBookName(String find)
{
- return getBookNumber(find) != -1;
+ return getNumber(find) != -1;
}
/**
- * Normalize by stripping punctuation and whitespace.
- * @param str the string to normalize
- * @return the normalized string
- */
- private static String normalize(String str)
- {
- return normPattern.matcher(str).replaceAll("").toLowerCase(OSIS_LOCALE); //$NON-NLS-1$
- }
-
- /**
* Load up the resources for Bible book and section names,
* and cache the upper and lower versions of them.
*/
@@ -128,7 +116,7 @@
for (int i = 0; i < osisBooks.length; i++)
{
osisBooks[i] = getString(resources, OSIS_KEY + (i + 1));
- osisMap.put(normalize(osisBooks[i]), new Integer(i + 1));
+ osisMap.put(BookName.normalize(osisBooks[i], OSIS_LOCALE), new Integer(i + 1));
}
}
@@ -148,9 +136,6 @@
return null;
}
- /** remove spaces and punctuation in Bible Names */
- private static Pattern normPattern = Pattern.compile("[. ]"); //$NON-NLS-1$
-
/** The Locale of OSIS Names */
private static final Locale OSIS_LOCALE = new Locale("en"); //$NON-NLS-1$
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/OSISNames.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/SectionNames.java
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/SectionNames.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/versification/SectionNames_zh_CN.properties
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/versification/SectionNames_zh_CN.properties 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/versification/SectionNames_zh_CN.properties 2007-06-13 22:33:29 UTC (rev 1402)
@@ -1,10 +1,10 @@
-#Created by JInto - www.guh-software.de
-#Tue Jan 23 14:51:31 EST 2007
-Sections.1=\u6469\u897F\u4E94\u7ECF
-Sections.2=\u5386\u53F2\u4E66
-Sections.3=\u8BD7\u6B4C\u4E66
-Sections.4=\u5927\u5148\u77E5\u4E66
-Sections.5=\u5C0F\u5148\u77E5\u4E66
-Sections.6=\u798F\u97F3\u4E66
-Sections.7=\u4F7F\u5F92\u4E66\u4FE1
-Sections.8=\u542F\u793A\u5F55
+#Created by JInto - www.guh-software.de
+#Tue Jan 23 14:51:31 EST 2007
+Sections.1=\u6469\u897F\u4E94\u7ECF
+Sections.2=\u5386\u53F2\u4E66
+Sections.3=\u8BD7\u6B4C\u4E66
+Sections.4=\u5927\u5148\u77E5\u4E66
+Sections.5=\u5C0F\u5148\u77E5\u4E66
+Sections.6=\u798F\u97F3\u4E66
+Sections.7=\u4F7F\u5F92\u4E66\u4FE1
+Sections.8=\u542F\u793A\u5F55
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/SectionNames_zh_CN.properties
___________________________________________________________________
Name: svn:eol-style
+ native
Property changes on: trunk/jsword/src/main/java/org/crosswire/jsword/versification/package.html
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/passage/BookTreeNode.java
===================================================================
--- trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/passage/BookTreeNode.java 2007-06-13 16:15:10 UTC (rev 1401)
+++ trunk/jsword-limbo/src/main/java/org/crosswire/bibledesktop/passage/BookTreeNode.java 2007-06-13 22:33:29 UTC (rev 1402)
@@ -145,7 +145,7 @@
{
try
{
- String bookName = BibleInfo.getBookName(book);
+ String bookName = BibleInfo.getPreferredBookName(book);
if (ref == null)
{
return bookName;
More information about the jsword-svn
mailing list