Details

      Description

      Here is an example
      Locale.setDefault(Locale.GERMAN);
      System.out.println(BibleBook.getBook("Mr")); //returns PrAzar instead of Mark

      The foreign language versions of BibleNames.properties mainly have blank entries for the new book names e.g.
      Tob.Full=
      Tob.Short=
      Tob.Alt=

      This means the following code in BookName.java
      if (normalizedShortName.startsWith(normalizedName) || normalizedName.startsWith(normalizedShortName)) {
      must be changed to:
      if (normalizedShortName.startsWith(normalizedName) || (normalizedShortName.length()>0 && normalizedName.startsWith(normalizedShortName))) {

      On a related note I do not think we should have blank property file entries for the new books in any file other than the single default BibleName.properties because this will prevent anything being displayed and prevent correct display of the default property value. A German speaker would rather see 'Tobit' than ''.

      I have patched this in And Bible so even though it is a Blocker it is not critical for me at the moment.

      I have attached a patch file.

        Attachments

          Activity

          Hide
          chrisburrell Chris Burrell added a comment -

          Pull request has been +1ed.

          Show
          chrisburrell Chris Burrell added a comment - Pull request has been +1ed.
          Show
          chrisburrell Chris Burrell added a comment - https://github.com/crosswire/jsword/pull/28
          Hide
          dmsmith DM Smith added a comment -

          I've just put up a pull request https://github.com/crosswire/jsword/pull/35
          The third commit solves this problem more fully.

          Previously the logic was to look for a matching Bible book name across all defined Bible books. This is silly as there is no reason to search for names that are not in the Bible that the user is using.

          Also the lookup regarded all book names as fairly equal, but favored the OT over the NT as the final look was to iterate over the names in the order listed in BibleBook. I've changed this to look for NT, then OT then Bible Intro, OT Intro, NT Intro and then non-canonical books.

          Show
          dmsmith DM Smith added a comment - I've just put up a pull request https://github.com/crosswire/jsword/pull/35 The third commit solves this problem more fully. Previously the logic was to look for a matching Bible book name across all defined Bible books. This is silly as there is no reason to search for names that are not in the Bible that the user is using. Also the lookup regarded all book names as fairly equal, but favored the OT over the NT as the final look was to iterate over the names in the order listed in BibleBook. I've changed this to look for NT, then OT then Bible Intro, OT Intro, NT Intro and then non-canonical books.

            People

            • Assignee:
              dmsmith DM Smith
              Reporter:
              mjdenham Martin Denham
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: