diff --git a/static/js/BookPage.jsx b/static/js/BookPage.jsx
index f3e867ed2e..301b22a478 100644
--- a/static/js/BookPage.jsx
+++ b/static/js/BookPage.jsx
@@ -66,11 +66,17 @@ class BookPage extends Component {
}
}
- handleCheckVisibility(value) {
- if("nodes" in value) {
+ handleCheckVisibility(schema) {
+ if(!("nodes" in schema)) {
+ if(schema.content_counts.length > 1) {
+ this.state.isContentVisible = true
+ }
+ else {
+ this.state.isContentVisible = false
+ }
+
+ } else{
this.state.isContentVisible = true
- } else {
- this.state.isContentVisible = false
}
}
@@ -198,7 +204,6 @@ class BookPage extends Component {
if (this.state.isContentVisible || this.props.isNarrowColumn) {
tabs.push({id: "contents", title: {en: Sefaria._("text.contents"), he: Sefaria._("text.contents")}});
}
-
if (this.isBookToc()){
tabs.push({id: "versions", title: {en: Sefaria._("text.versions"), he: Sefaria._("text.versions")}});
}
@@ -756,7 +761,9 @@ SchemaNode.propTypes = {
class JaggedArrayNode extends Component {
+
render() {
+
const offset = this.props.schema?.index_offsets_by_depth?.['1'] || 0;
if ("toc_zoom" in this.props.schema) {
let zoom = this.props.schema.toc_zoom - 1;
@@ -774,10 +781,11 @@ class JaggedArrayNode extends Component {
const specialHeaderText = this.props.topLevelHeader || this.props.schema?.sectionNames[0] || "Chapters";
let topLevelHeader = !this.props.topToggleTitles.includes(specialHeaderText) && (this.props.topLevel && (this.props.schema?.depth <= 2 || this.props.topLevelHeader)) ? (
-
+ }}/> */}
+ text.content.section.sabche
) : null;
return (
@@ -830,11 +838,12 @@ class JaggedArrayNodeSection extends Component {
let content = [];
for (let i = 0; i < this.props.contentCounts.length; i++) {
if (this.contentCountIsEmpty(this.props.contentCounts[i])) { continue; }
- let [enSection, heSection] = Sefaria.getSectionStringByAddressType(this.props.addressTypes[0], i);
+ let [enSection, heSection, sectionString] = Sefaria.getSectionStringByAddressType(this.props.addressTypes[0], i);
content.push(
-
+ text.content.section.sabche
+ {/* */}
-
+ {/* */}
+ {sectionString}
);
sectionLinks.push(link);
diff --git a/static/js/sefaria/localizationLanguage/chinese.json b/static/js/sefaria/localizationLanguage/chinese.json
index f68c912aa9..04c1daa0a5 100644
--- a/static/js/sefaria/localizationLanguage/chinese.json
+++ b/static/js/sefaria/localizationLanguage/chinese.json
@@ -268,6 +268,7 @@
"text.reference": "参考",
"text.related Passage": "相关段落",
"text.no_connection": "无",
+ "text.content.section.sabche": "科判 {{segmentNumber}}",
"text.version_open": "版本开放",
"text.web_pages": "网页",
"text.author": "作者",
diff --git a/static/js/sefaria/localizationLanguage/english.json b/static/js/sefaria/localizationLanguage/english.json
index f8c7fe7b0d..7007eb5f7a 100644
--- a/static/js/sefaria/localizationLanguage/english.json
+++ b/static/js/sefaria/localizationLanguage/english.json
@@ -267,6 +267,7 @@
"panel.resources": "Resources",
"text.related_texts": "Related Texts",
"text.commentary": "Commentary",
+ "text.content.section.sabche": "Sapche {{segmentNumber}}",
"text.quotation": "Quotation",
"text.reference": "Reference",
"text.related Passage": "Related Passage",
diff --git a/static/js/sefaria/localizationLanguage/tibetan.json b/static/js/sefaria/localizationLanguage/tibetan.json
index 8ffc0f105d..ff3b7dc628 100644
--- a/static/js/sefaria/localizationLanguage/tibetan.json
+++ b/static/js/sefaria/localizationLanguage/tibetan.json
@@ -267,6 +267,7 @@
"text.related_texts": "འབྲེལ་ཡོད་ཡིག་ཆ།",
"text.commentary": "འགྲེལ་བ།",
"text.quotation": "ལུང་ཚིག",
+ "text.content.section.sabche": "ས་བཅད། {{segmentNumber}}",
"text.reference": "དཔྱད་གཞི།",
"text.related Passage": "འབྲེལ་ཡོད་རྩོམ་ཡིག",
"text.no_connection": "མི་འདུག",
diff --git a/static/js/sefaria/sefaria.js b/static/js/sefaria/sefaria.js
index 2bd42bd6e8..e29402c93d 100644
--- a/static/js/sefaria/sefaria.js
+++ b/static/js/sefaria/sefaria.js
@@ -331,8 +331,9 @@ Sefaria = extend(Sefaria, {
* @param {number} offset - If needed, an offest to allow section addresses that do not start counting with 0
* @returns {[string,string]} Section string in both languages.
*/
- getSectionStringByAddressType: function(addressType, i, offset=0) {
+ getSectionStringByAddressType: function(addressType, i, offset=0) {
let section = i + offset;
+ let sectionString = "";
let enSection, heSection;
if (addressType === 'Talmud') {
enSection = Sefaria.hebrew.intToDaf(section);
@@ -348,7 +349,14 @@ Sefaria = extend(Sefaria, {
enSection = section + 1;
heSection = Sefaria.hebrew.tibetanNumeral(section + 1);
}
- return [enSection, heSection];
+
+ if(Sefaria.interfaceLang == "hebrew") {
+ sectionString = heSection
+ } else {
+ sectionString = enSection
+ }
+
+ return [enSection, heSection, sectionString];
},
titlesInText: function(text) {
// Returns an array of the known book titles that appear in text.