Skip to content

Commit

Permalink
Compute Hebrew names for loading pageS
Browse files Browse the repository at this point in the history
  • Loading branch information
ronshapiro committed Mar 1, 2024
1 parent 0b5b84d commit 3be9272
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 17 deletions.
8 changes: 3 additions & 5 deletions api_request_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {Book, books, internalLinkableRef} from "./books";
import {ALL_COMMENTARIES, CommentaryType} from "./commentaries";
import {readUtf8} from "./files";
import {hadranSegments, isHadran} from "./hadran";
import {stripHebrewNonlettersOrVowels, intToHebrewNumeral, ALEPH, BET, TAV} from "./hebrew";
import {stripHebrewNonlettersOrVowels, intToHebrewNumeral, ALEPH, TAV} from "./hebrew";
import {Logger, consoleLogger} from "./logger";
import {mergeRefs} from "./ref_merging";
import {refSorter} from "./js/google_drive/ref_sorter";
Expand Down Expand Up @@ -72,6 +72,7 @@ import {SectionSymbolRemover} from "./source_formatting/section_symbol";
import {SefariaLinkSanitizer} from "./source_formatting/sefaria_link_sanitizer";
import {ShulchanArukhHeaderRemover} from "./source_formatting/shulchan_arukh_remove_header";
import {isPehSectionEnding, transformTanakhSpacing} from "./source_formatting/tanakh_spacing";
import {formatDafInHebrew} from "./talmud";
import {hasMatchingProperty} from "./util/objects";
import {checkNotUndefined} from "./js/undefined";
import {getWeekdayReading} from "./weekday_parshiot";
Expand Down Expand Up @@ -1104,10 +1105,7 @@ class TalmudApiRequestHandler extends AbstractApiRequestHandler {
}

protected makeTitleHebrew(): string {
const {hebrewName} = this.book();
const dafNumber = intToHebrewNumeral(parseInt(this.page));
const suffix = this.page.endsWith("a") ? ALEPH : BET;
return `${hebrewName} ${dafNumber},${suffix}`;
return formatDafInHebrew(this.book().hebrewName, this.page);
}

protected extraPromises(): Promise<any>[] {
Expand Down
2 changes: 1 addition & 1 deletion app.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
runtime: nodejs21
runtime: nodejs20
Loading

0 comments on commit 3be9272

Please sign in to comment.