Skip to content

Commit

Permalink
Added new translations, simplified read links
Browse files Browse the repository at this point in the history
  • Loading branch information
yclicc committed Dec 29, 2023
1 parent c91b583 commit 884921e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 14 deletions.
44 changes: 32 additions & 12 deletions data/bibletranslations.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,52 @@
{
"NIVUK": {
"label": "NIVUK - David Suchet",
"read": "?search=$&version=NIVUK",
"listen": "suchet/nivuk/$"
"read": "NIVUK",
"listen": "suchet/nivuk/"
},
"ESV": {
"label": "ESV - Max McLean",
"read": "?search=$&version=ESV",
"listen": "mclean/esv/$"
"read": "ESV",
"listen": "mclean/esv/"
},
"CCB": {
"label": "CCB / 当代圣经",
"read": "?search=$&version=CCB",
"listen": "biblica/ccb/$"
"read": "CCB",
"listen": "biblica/ccb/"
},
"NVI": {
"label": "NVI (Español) - Rafael Cruz",
"read": "?search=$&version=NVI",
"listen": "single/nvi/$"
"read": "NVI",
"listen": "single/nvi/"
},
"NVI-PT": {
"label": "NVI-PT (Português)",
"read": "NVI-PT",
"listen": "biblica/nvi-pt/"
},
"BDS": {
"label": "BDS (Français)",
"read": "BDS",
"listen": "biblica/bds/"
},
"NAV": {
"label": "NAV / العربية: كتاب الحياة",
"read": "?search=$&version=NAV",
"listen": "biblica/nav/$"
"read": "NAV",
"listen": "biblica/nav/"
},
"NTLR": {
"label": "NTLR (Română)",
"read": "?search=$&version=NTLR",
"listen": "biblica/ntlr/$"
"read": "NTLR",
"listen": "biblica/ntlr/"
},
"NRT": {
"label": "NRT (Русский)",
"read": "NRT",
"listen": "biblica/nrt/"
},
"TNCV": {
"label": "TNCV (ภาษาไทย)",
"read": "TNCV",
"listen": "biblica/tncv/"
}
}
4 changes: 2 additions & 2 deletions js/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,10 @@ function verseCountToAudioDuration(verseCount) {
function calculateReadings() {
const readingsLists = plan.map(listOfInts => listOfInts.flatMap(bookIndexToListOfChapters));
const todaysReadings = readingsLists.flatMap(listOfChaptersToReadings);
const linkWithoutReadings = `https://www.biblegateway.com/passage/${bibleTranslations[translation]['read']}`
const linkWithoutReadings = `https://www.biblegateway.com/passage/?search=$&version=${bibleTranslations[translation]['read']}`
const link = linkWithoutReadings.replace('$', todaysReadings.join(','));
const todaysListenings = readingsLists.flatMap(listOfChaptersToListenings);
const audioLinkWithoutListenings = `https://www.biblegateway.com/audio/${bibleTranslations[translation]['listen']}`
const audioLinkWithoutListenings = `https://www.biblegateway.com/audio/${bibleTranslations[translation]['listen']}$`
const audioLink = audioLinkWithoutListenings.replace('$', todaysListenings.join(','));
const verseCount = readingsLists.flatMap(listOfChaptersToVerseCount).reduce(function(prev,curr){
return prev + curr;
Expand Down

0 comments on commit 884921e

Please sign in to comment.