Skip to content

Commit

Permalink
make things prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-hub committed Oct 2, 2023
1 parent ae811bf commit 4ea4c34
Show file tree
Hide file tree
Showing 12 changed files with 287 additions and 214 deletions.
150 changes: 87 additions & 63 deletions src/data/BibleVersionCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,180 +18,201 @@ export const BibleVersionCollection: IBibleVersion[] = [
{
key: 'clementine',
versionName: 'Clementine Latin Vulgate',
language: 'Latin', code: 'la',
language: 'Latin',
code: 'la',
apiSource: BibleAPISourceCollection.bibleApi,
},
{
key: 'kjv',
versionName: 'King James Version',
language: 'English', code: 'en',
language: 'English',
code: 'en',
apiSource: BibleAPISourceCollection.bibleApi,
},
{
key: 'bbe',
versionName: 'Bible in Basic English',
language: 'English', code: 'en',
language: 'English',
code: 'en',
apiSource: BibleAPISourceCollection.bibleApi,
},
{
key: 'oeb-us',
versionName: 'Open English Bible, US Edition',
language: 'English', code: 'en',
language: 'English',
code: 'en',
apiSource: BibleAPISourceCollection.bibleApi,
},
{
key: 'almeida',
versionName: 'João Ferreira de Almeida',
language: 'Portuguese', code: 'pt',
language: 'Portuguese',
code: 'pt',
apiSource: BibleAPISourceCollection.bibleApi,
},
{
key: 'rccv',
versionName: 'Romanian Corrected Cornilescu Version',
language: 'Romanian', code: 'ro',
language: 'Romanian',
code: 'ro',
apiSource: BibleAPISourceCollection.bibleApi,
},
{
key: 'cherokee',
versionName: 'Cherokee New Testament',
language: 'Cherokee', code: 'cu',
language: 'Cherokee',
code: 'cu',
apiSource: BibleAPISourceCollection.bibleApi,
},
{
key: 'oeb-cw',
versionName: 'Open English Bible, Commonwealth Edition',
language: 'English (UK)', code: 'en',
language: 'English (UK)',
code: 'en',
apiSource: BibleAPISourceCollection.bibleApi,
},
{
key: 'webbe',
versionName: 'World English Bible, British Edition',
language: 'English (UK)', code: 'en',
language: 'English (UK)',
code: 'en',
apiSource: BibleAPISourceCollection.bibleApi,
},
// bolls life
{
key: 'nkjv',
versionName: 'New King James Version',
language: 'English', code: 'en',
language: 'English',
code: 'en',
apiSource: BibleAPISourceCollection.bollsLife,
infoUrl: 'https://wikipedia.org/wiki/New_King_James_Version',
},
{
key: 'niv',
versionName: 'New International Version, 1984',
language: 'English', code: 'en',
language: 'English',
code: 'en',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: 'nrsvce',
versionName: 'New Revised Standard Version Catholic Edition (NRSVCE)',
language: 'English', code: 'en',
language: 'English',
code: 'en',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: 'esv',
versionName: 'English Standard Version',
language: 'English', code: 'en',
language: 'English',
code: 'en',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: "nasb",
versionName: "New American Standard Bible (1995)",
language: "English",
key: 'nasb',
versionName: 'New American Standard Bible (1995)',
language: 'English',
code: 'en',
apiSource: BibleAPISourceCollection.bollsLife
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: "elb",
versionName: "Elberfelder Bibel (1871)",
language: "German Deutsch",
key: 'elb',
versionName: 'Elberfelder Bibel (1871)',
language: 'German Deutsch',
code: 'de',
apiSource: BibleAPISourceCollection.bollsLife
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: "lut",
versionName: "Luther (1912)",
language: "German Deutsch",
key: 'lut',
versionName: 'Luther (1912)',
language: 'German Deutsch',
code: 'de',
apiSource: BibleAPISourceCollection.bollsLife
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: "ntgt",
versionName: "Greek NT: Tischendorf 8th Ed.",
language: "Greek Ελληνικά",
apiSource: BibleAPISourceCollection.bollsLife
key: 'ntgt',
versionName: 'Greek NT: Tischendorf 8th Ed.',
language: 'Greek Ελληνικά',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: "tr",
versionName: "Elzevir Textus Receptus (1624)",
language: "Greek Ελληνικά",
apiSource: BibleAPISourceCollection.bollsLife
key: 'tr',
versionName: 'Elzevir Textus Receptus (1624)',
language: 'Greek Ελληνικά',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: "lxx",
versionName: "Septuagint",
language: "Greek Ελληνικά",
apiSource: BibleAPISourceCollection.bollsLife
key: 'lxx',
versionName: 'Septuagint',
language: 'Greek Ελληνικά',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: "wlc",
versionName: "Westminster Leningrad Codex (with Vowels)",
language: "Hebrew עברית",
apiSource: BibleAPISourceCollection.bollsLife
key: 'wlc',
versionName: 'Westminster Leningrad Codex (with Vowels)',
language: 'Hebrew עברית',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: "dhnt",
key: 'dhnt',
versionName: "Delitzsch's Hebrew New Testament 1877, 1998 (with Vowels)",
language: "Hebrew עברית",
apiSource: BibleAPISourceCollection.bollsLife
language: 'Hebrew עברית',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: 'cuv',
versionName: 'Chinese Union Version (Traditional)',
language: 'Chinese', code: 'cn',
language: 'Chinese',
code: 'cn',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: 'nr06',
versionName: 'Nuova Riveduta, 2006',
language: 'Latin / Italian', code: 'it',
language: 'Latin / Italian',
code: 'it',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: 'svd',
versionName: 'Smith and Van Dyke',
language: 'Arabic العربية', code: 'ar',
language: 'Arabic العربية',
code: 'ar',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: 'btx3',
versionName: 'La Biblia Textual 3ra Edicion',
language: 'Spanish', code: 'sp',
language: 'Spanish',
code: 'sp',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: 'rv1960',
versionName: 'Reina Valera 1960',
language: 'Spanish', code: 'sp',
language: 'Spanish',
code: 'sp',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: 'rv2004',
versionName: 'Reina Valera Gomez 2004',
language: 'Spanish', code: 'sp',
language: 'Spanish',
code: 'sp',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: 'pdt',
versionName: 'Palabra de Dios para Todos',
language: 'Spanish', code: 'sp',
language: 'Spanish',
code: 'sp',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
key: 'nvi',
versionName: 'Nueva Version Internacional',
language: 'Spanish', code: 'sp',
language: 'Spanish',
code: 'sp',
apiSource: BibleAPISourceCollection.bollsLife,
},
{
Expand Down Expand Up @@ -243,17 +264,20 @@ export const BibleVersionCollection: IBibleVersion[] = [

export const DEFAULT_BIBLE_VERSION = BibleVersionCollection[11]


export const getBibleVersion = (key: string): IBibleVersion => {
return BibleVersionCollection.find(bibleVersion => bibleVersion.key === key) ?? DEFAULT_BIBLE_VERSION
return (
BibleVersionCollection.find((bibleVersion) => bibleVersion.key === key) ??
DEFAULT_BIBLE_VERSION
)
}

export const allBibleVersionsWithLanguageNameAlphabetically: IBibleVersion[] = BibleVersionCollection.sort((a, b) => {
// sort by language and versionName alphabetically
const languageCompare = a.language.localeCompare(b.language)
if (languageCompare === 0) {
return a.versionName.localeCompare(b.versionName)
} else {
return languageCompare
}
})
export const allBibleVersionsWithLanguageNameAlphabetically: IBibleVersion[] =
BibleVersionCollection.sort((a, b) => {
// sort by language and versionName alphabetically
const languageCompare = a.language.localeCompare(b.language)
if (languageCompare === 0) {
return a.versionName.localeCompare(b.versionName)
} else {
return languageCompare
}
})
2 changes: 1 addition & 1 deletion src/data/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface BibleReferencePluginSettings {
enableBibleVerseLookupRibbon?: boolean
optOutToEvents?: boolean

advancedSettings?: boolean;
advancedSettings?: boolean
}

export const DEFAULT_SETTINGS: BibleReferencePluginSettings = {
Expand Down
Loading

0 comments on commit 4ea4c34

Please sign in to comment.