From 2c18c1418e2b1674fd5c34680d37da47dcae812a Mon Sep 17 00:00:00 2001 From: Ilya Khait Date: Fri, 6 Oct 2023 15:53:44 +0200 Subject: [PATCH] About routes & date display fix (#397) * Add routes & breadcrumbs to About section * Add routes to About * Implement broken date display * Update snapshot & clean up * Update snapshot --- .../ui/__snapshots__/about.test.tsx.snap | 1819 ++++------------- src/about/ui/about.test.tsx | 33 +- src/about/ui/about.tsx | 42 +- src/fragmentarium/domain/Date.test.ts | 17 +- src/fragmentarium/domain/Date.ts | 10 +- src/router/aboutRoutes.tsx | 20 +- 6 files changed, 537 insertions(+), 1404 deletions(-) diff --git a/src/about/ui/__snapshots__/about.test.tsx.snap b/src/about/ui/__snapshots__/about.test.tsx.snap index 175efd561..c19e71402 100644 --- a/src/about/ui/__snapshots__/about.test.tsx.snap +++ b/src/about/ui/__snapshots__/about.test.tsx.snap @@ -1,1080 +1,334 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Snapshot 1`] = ` - - +
- - -

- History of the Project -

- +
+ +

+ About +

+
+ +
+
+
+ + Ohne feste kritische Grundlage wird das philologische Gebäude auf Sand aufgeführt und die philologische Wissenschaft gestaltet sich zum bloßen Dilettantismus. + +

+ + W. Freund, + + + Triennium philologicum oder Grundzüge der philologischen Wissenschaften + + + . Leipzig, 1874. + +

+

- [… who s]aw the Deep, […] the country, + The eBL editions aim to present the best text that can be reconstructed at present. The editions prepared in the course of the project include all previous scholarship on the texts, and in particular all new manuscripts identified after the last printed editions. The eBL edition of the + + + Cuthaean Legend of Narām-Sîn + + + , for instance, almost doubles the manuscript basis of the text available to its last editor; that of the + + + Counsels of Wisdom + + + includes over twenty new manuscripts that were absent from the most recent printed edition. Most of the new manuscripts used have been identified by the eBL team, and are currently being published in the series of articles + + From the Electronic Babylonian Literature Lab + + that appear in the journal + + Kaskal + + . Moreover, the eBL editions are constantly updated, and the editors will incorporate new discoveries as they appear. -
- + I. Corpus + +

+ + This tablet is a one columned chronicle-fragment, telling about the faulty reignship of king Šulgi, who committed sins against Babylon and Uruk. The text is written in an accusatory tone, stressed by the repetition of exclamatory sentences about Šulgis sinfull deeds. It was discussed in lenghth by + + + , : 63-72 + + (D) + + + + , who pointed out its inspiration trough the Sumerian Kinglist as well as anachronistic allusions to Nabonid. The tablet is part of a series, as can be seen from the existence of the catchline and a “specular catchline” as it is called by Hunger, ( + + + SpTU + + + 1, 20 n. 2), that seems to resume the content of the preceding chapter. About one half or even two thirds of the composition is missing. This is underlined by the colophon, that takes almost all of the space on the reverse but in many other cases covers only about a third and occasionally half of a tablet. The tablet stems from the 27. campaign in Uruk 1969 of the residential area U XVIII and was published first by Hunger 1976 in SpTU 1, 2. + +

+

+ II. Translations +

+
- [who] knew […], […] all […] - -
+ + Foster, Before the Muses + +
+ Foster, + + Before the Muses + +
+
+

+ + This tablet is a one columned chronicle-fragment, telling about the faulty reignship of king Šulgi, who committed sins against Babylon and Uruk. The text is written in an accusatory tone, stressed by the repetition of exclamatory sentences about Šulgis sinfull deeds. It was discussed in lenghth by + + + , : 63-72 + + (D) + + + + , who pointed out its inspiration trough the Sumerian Kinglist as well as anachronistic allusions to Nabonid. The tablet is part of a series, as can be seen from the existence of the catchline and a “specular catchline” as it is called by Hunger, ( + + + SpTU + + + 1, 20 n. 2), that seems to resume the content of the preceding chapter. About one half or even two thirds of the composition is missing. This is underlined by the colophon, that takes almost all of the space on the reverse but in many other cases covers only about a third and occasionally half of a tablet. The tablet stems from the 27. campaign in Uruk 1969 of the residential area U XVIII and was published first by Hunger 1976 in SpTU 1, 2. + +

- [… who] saw the Deep, […] the country, - -
- - [who] knew […], […] all […] - - - - He who saw the Deep, the foundation of the country, -
- - who knew the proper ways, was wise in all matters! - -
- Gilgamesh, who saw the Deep, the foundation of the country, -
- - who knew the proper ways, was wise in all matters! - -
- - -

- List of Participants -

-
- The eBL Team in 2020 -
- The eBL Team in 2020 -
-
-

- Project’s Staff (Cuneiformists) -

-
    -
  • - Enrique Jiménez, Principal Investigator -
  • -
  • - Zsombor Földi, Editor -
  • -
  • - Aino Hätinen, Editor -
  • -
  • - Adrian Heinrich, Editor (until 03.2022) -
  • -
  • - Tonio Mitto, Editor (PhD student, until 10.2022) -
  • -
  • - Geraldina Rozzi, Editor (since 01.2021) -
  • -
-

- Project’s Staff (Developers) -

-
    -
  • - Ilya Khait (since 03.2022) -
  • -
  • - Jussi Laasonen (until 04.2022) -
  • -
  • - Fabian Simonjetz (since 04.2022) -
  • -
-
- The eBL Team in 2023 -
- The eBL Team in 2023 -
-
-

- Student Assistants -

-
    -
  • - Yunus Cobanoglu (Computer Science) -
  • -
  • - Cyril Dankwardt -
  • -
  • - Ekaterine Gogokhia -
  • -
  • - Louisa Grill -
  • -
  • - Wasim Khatabe -
  • -
  • - Alexander Kudriavtcev (until 2021) -
  • -
  • - Daniel López-Kuczmik -
  • -
  • - Mays Al-Rawi -
  • -
  • - Wadieh Zerkly -
  • -
-

- External Collaborators -

-
    -
  • - Anmar A. Fadhil (University of Baghdad) -
  • -
  • - Benjamin R. Foster (Yale University) -
  • -
  • - Alberto Giannese (British Museum) -
  • -
  • - Carmen Gütschow -
  • -
  • - Ivor Kerslake (British Museum) -
  • -
  • - Felix Müller (Universität Göttingen) -
  • -
  • - Jeremiah Peterson -
  • -
  • - Luis Sáenz (Universität Heidelberg) -
  • -
  • - Henry Stadhouders -
  • -
  • - Junko Taniguchi -
  • -
  • - Abraham Winitzer (University of Notre Dame) -
  • -
-

- Participating Institutions -

- - - - - - -

- - -

- I. How to Cite -

- -

- - - - - 1/1/2023 - - - -

- - Creative Commons License - -

-

- II. Sources of the Catalogue -

- -

- -

- -

- III. Photographs -

- The photographs of tablets from The British Museum’s Kuyunjik collection were produced in 2009-2013, as part of the on-going “Ashurbanipal Library Project” (2002–present), thanks to funding provided by The Townley Group and The Andrew Mellon Foundation. The photographs were produced by Marieka Arksey, Kristin A. Phelps, Sarah Readings, and Ana Tam; with the assistance of Alberto Giannese, Gina Konstantopoulos, Chiara Salvador, and Mathilde Touillon-Ricci. They are displayed on the eBL website courtesy of Dr. Jon Taylor, director of the “Ashurbanipal Library Project.” -

-

- I. Kerslake in the British Museum -
- I. Kerslake photographs tablets in the British Museum, 2019 -
-
- The photographs of the The British Museum’s Babylon collection are taken by Alberto Giannese and Ivor Kerslake (2019–present) in the framework of the “electronic Babylonian Literature” project, funded by a Sofia Kovalevskaja Award (Alexander von Humboldt Stiftung). -

- The photographs of the tablets in the Iraq Museum have been produced by Anmar A. Fadhil (University of Baghdad – eBL Project), and displayed by permission of the State Board of Antiquities and Heritage and The Iraq Museum. -

- The photographs of the tablets in the Yale Babylonian Collection are being produced by Klaus Wagensonner (Yale University), and used with the kind permission of the Agnete W. Lassen (Associate Curator of the Yale Babylonian Collection, Yale Peabody Museum). -

- The images cannot be reproduced without the explicit consent of the funding projects and institutions, as well as the institutions in which the cuneiform tablets are kept. Users are referred to the conditions for reproducing the images in the links shown in the captions under the images. -

-

- IV. Editions in the Fragmentarium -

-
- List of fragments to revise -
- List of texts to revise, eBL team -
-
- The editions in the Fragmentarium have been produced by the entire eBL Team, starting in 2018. Thousands of them were produced on the basis of photographs and have not been collated in the museum. Although the speed at which fragments have been transliterated has been necessarily fast, the quality control measurements adopted, and in particular the policy to have each edition revised by a scholar different from the original editor, means that they are normally reliable. Each member of the team has produced some 40 editions and revised some 60 editions a month on average. -

- In addition, the - - - BabMed team - - - has kindly made acessible its large collections of transliterations of Mesopotamian medicine for their use on the Fragmentarium. They have been imported by the eBL team using the importer developed by T. Englmeier (see - - - here - - - and - - - here - - ), and thoroughly revised and lemmatized chiefly by H. Stadhouders. The transliterations of the BabMed team were originally produced by Markham J. Geller, J. Cale Johnson, Ulrike Steinert, Stravil V. Panayotov, Eric Schmidtchen, Krisztián Simkó, Marius Hoppe, Marie Lorenz, John Schlesinger, Till Kappus, and Agnes Kloocke (at FU Berlin), as well as Annie Attia, Sona Eypper, and Henry Stadhouders (as external collaborators). -

-

- V. Folios -

- The electronic Babylonian Literature (eBL) project, and in particular its Fragmentarium, continues the efforts of generations of Assyriologists to rescue the literature of Ancient Mesopotamia from the hands of oblivion. The Fragmentarium stands on the shoulders of previous scholars, and has used extensively their unpublished, unfinished work, for compiling its database of transliterations. It is a pleasure to acknowledge our gratitude to the following scholars: -

- V.1. George Smith (26 March 1840 – 19 August 1876) -

- -
- G. Smith’s draft copy of DT.1 -
- G. Smith’s draft copy of DT.1 -
-
- -

- V.2. Johann Strassmaier, S.J. (15 May 1846 – 11 January 1920) -

-
- Johann Strassmaier, S.J. (courtesy of W. R. Mayer) -
- Johann Strassmaier, S.J. (courtesy of W. R. Mayer) -
-
- -
- Collection of Strassmaier’s copies at the Pontifical Biblical Institute -
- Collection of Strassmaier’s copies at the Pontifical Biblical Institute -
-
- -

- V.3. Carl Bezold (18 May 1859 – 21 November 1922) -

-
- Carte de visite of Bezold at the British Museum (courtesy J. Taylor) -
- Carte de visite of Bezold at the British Museum (courtesy J. Taylor) -
-
- -

- -

- V.4. Friedrich W. Geers (24 January 1885 – 29 January 1955) -

-
- Collection of Geers’s copies once at the Oriental Institute -
- Collection of Geers’s copies once at the Oriental Institute -
-
- -

- -

- V.5. Erica Reiner (4 August 1924 – 31 December 2005) -

-
- Notebooks by E. Reiner -
- Notebooks by E. Reiner -
-
- -

- -

- V.6. W. G. Lambert (26 February 1926 – 9 November 2011) -

- -
- W. G. Lambert in Wassenaar, 1990 (courtesy U. Kasten) -
- W. G. Lambert in Wassenaar, 1990 (courtesy U. Kasten) -
-
- - -

- V.7. Riekele Borger (24 May 1929 – 27 December 2010) -

-
- R. Borger and W. G. Lambert in the British Museum (courtesy J. Taylor) -
- R. Borger and W. G. Lambert in the British Museum (courtesy J. Taylor) -
-
- - -

- V.8. Aaron Shaffer (2 January 1933 – 5 April 2004) -

-
- Aaron Shaffer in Chicago (courtesy N. Wasserman) -
- Aaron Shaffer working in Chicago (courtesy N. Wasserman) -
-
- - -

-

- V.9. Erle Leichty (7 August 1933 – 19 September 2016) -

- -

- -

- E. Leichty’s note on notebook NB 911 -
- E. Leichty’s note on notebook NB 911 -
-
- -

- - -

- V.10. Stephen J. Lieberman (1943 – 1992) -

- -

- -

- V.11. A. Kirk Grayson -

- -

- V.12. Werner R. Mayer, S.J. -

-
- Transliteration by W. R. Mayer -
- Transliteration by W. R. Mayer -
-
- -

- V.13. Markham J. Geller -

- -

- V.14. Simo Parpola -

-
- Parpola’s transliteration and identification of Rm.468 -
- Parpola’s transliteration and identification of - + and - Rm.468 + Hymn to Ninurta as Savior -
-
- -

- V.15. Irving L. Finkel -

-
- List of “joins” in a notebook by I. L. Finkel -
- List of “joins” in a notebook by I. L. Finkel -
-
- -

- V.16. Andrew R. George -

-
- Transliteration by A. R. George -
- Transliteration by A. R. George -
-
- -

- V.17. Ulla Koch -

- -

- V.18. Jeremiah L. Peterson -

- -

- V.19. Uri Gabbay -

- -
-
- - -
- - Ohne feste kritische Grundlage wird das philologische Gebäude auf Sand aufgeführt und die philologische Wissenschaft gestaltet sich zum bloßen Dilettantismus. - + ) and E. Jiménez. +

- -

-

- - -

- I. Corpus -

- -

- II. Translations -

-
- + In addition, a series of translations into Arabic are in preparation by A. A. Fadhil, W. Khatabe, and W. Zerkly (see for now A. A. Fadhil’s Arabic translation of + + + Enūma eliš + + I + + ) + +

+ III. Ideal Text +

+ + The main version displayed on the eBL Corpus is a phonetic transcription of the text, which has been adjusted according to the rules of Standard Babylonian grammar. This practice somewhat departs from the Assyriological tradition of editing “eclectic” texts, i.e. transliterations that combine the readings of various manuscripts. It has been adopted, however, in the conviction that Mesopotamian texts are also objects of art, and not just objects of scientific study, and as such convey their message only through the interplay of form and content. + +
Foster, Before the Muses - -
- Foster, - - Before the Muses - -
-
- - -

- -

- III. Ideal Text -

- -
- eBL edition of Enūma eliš I 49 -
- eBL edition of +
+ eBL edition of + + Enūma eliš + + + + I 49 + +
+
+

+ + The practice of using a phonetic transcription as the main text no doubt has disadvantages: for instance, it obscures the way in which the text is written in cuneiform, and it affords a sense of grammatical certainty that is absent from a regular transliteration. However, it also offers considerable advantages: in particular, it does not require the editor to adopt any particular spelling when no good criteria exist for preferring one over the other. In Enūma eliš @@ -1084,341 +338,158 @@ exports[`Snapshot 1`] = ` > I 49 - -

-

- -

- -

- IV. Score Edition -

-
- eBL edition of Šamaš Hymn 134 -
- eBL edition of + (see the adjoining image), for instance, the editor would have to choose between the accusative + + al-ka-ta + + , attested only in Assyrian manuscripts, or the normal Babylonian spelling - Šamaš Hymn + al-ka-tu + + ₄. In a transcription the editor can convey his interpretation of the text in a much more satisfactory manner than in a traditional transliteration. + +

+ + The transcription respects the ways in which the manuscripts are written as much as possible. For instance, + + Enūma eliš - 134 + VI 124 -

-
- -

- -

- V. Paratextual information -

- -

- -

- -

- VI. Šumma ālu -

- -
- - Université de Genève - - - Fonds national suisse de la recherche scientifique - -
-
-
- - - -

-

- I. Sign information -

- -

- -

- -

- II. Mesopotamisches Zeichenlexikon -

-
- - Borger, Mesopotamisches Zeichenlexikon - -
- Borger, + is transcribed as - Mesopotamisches Zeichenlexikon + muṭaḫḫidu urîšun -
-
- -

- - - - different color - - -

- -

- -

- III. Fossey, Manuel d’assyriologie II -

-
- Fossey, Manuel d’assyriologie II -
- Fossey, + , “who enriches their stables,” and thus assumes a hymno-epic ending - - Manuel d’assyriologie II + u -
-
- -

- -

- IV. Palaeography -

- -

- - - - - - -

- I. A Concise Dictionary of Akkadian -

-
- + nomen regens + + , instead of the normal bound form + + muṭaḫḫid + + , since + + mu-ṭaḫ-ḫi-du + + is the spelling of all manuscripts. + +

+ IV. Score Edition +

+
Black, George, Postgate, A Concise Dictionary of Akkadian - -
- Black, George, Postgate, +
+ eBL edition of + + Šamaš Hymn + + + + 134 + +
+
+ + Since the number of manuscripts of each text is constantly growing, cuneiform studies is reaching the point where it is no longer possible to print text editions in the score format. Just the eBL edition score of - A Concise Dictionary of Akkadian + Enūma eliš - -
- -

- -

-

- II. Akkadian-Arabic Reference Dictionary -

- - -

- III. Akkadische Logogramme -

- -

- IV. Akkadische Glossare und Indizes (AfO Register) -

- -

- -

- V. Supplement to the Akkadian Dictionaries -

- -
-
- - - - - - - - + , for example, would require some 300 pages in font size 10. Despite this technical limitation, scores are the fastest, most straightforward way of checking exactly how manuscripts write their texts. The eBL scores are, moreover, aligned with the ideal line, so that the reader can check the manuscript basis of the editor’s decisions at any time. + +

+ + All transliterations have been checked twice against the published copies and against photographs and in some cases the originals of the cuneiform tablets. + +

+ V. Paratextual information +

+ + Each text is furnished with an introduction, which discusses the content and structure of the text, its origins and transmission, its Sitz im Leben and the history of research concerning the text. + +

+ + The editions are fully lemmatized and annotated. The annotation includes indications of all parallel lines, so that the text can be studied as part of the intertextual network in which it belongs. In addition, the notes on individual lines endeavor to provide the reader with references to all previous bibliography, with particular emphasis on studies which have appeared in the last few years. The notes on the score edition discuss mostly philological issues pertaining to an individual manuscript. + +

+ + The colophons of the individual manuscripts are transliterated independently, and can be accessed on the homepage of any text (e.g. + + here + + ). In some cases, manuscripts include lines that, though clearly part of the composition in question, cannot yet be placed in it, and thus are transliterated independently, as Unplaced lines. + +

+ VI. Šumma ālu +

+ + The editions of + + Šumma ālu + + presented here were prepared in the context of the projects “Edition of the Omen Series Šumma Alu” (2017–2021; + + http://p3.snf.ch/project-175970 + + ) and “Typology and potential of the excerpt tablets of Šumma alu” (2022–2023; + + http://p3.snf.ch/project-205122 + + ), both directed by Prof. Catherine Mittermayer at the University of Geneva and funded by the Swiss National Science Foundation. The complete score editions can be downloaded (PDF) at the “Archive ouverte” of the University of Geneva ( + + https://archive-ouverte.unige.ch/ + + ; search for “Shumma alu”). + +
+ + Université de Genève + + + Fonds national suisse de la recherche scientifique + +
+
+
+ +
+ `; diff --git a/src/about/ui/about.test.tsx b/src/about/ui/about.test.tsx index 76897ab9b..266c06866 100644 --- a/src/about/ui/about.test.tsx +++ b/src/about/ui/about.test.tsx @@ -1,7 +1,12 @@ +import React from 'react' import About from 'about/ui/about' import Bluebird from 'bluebird' +import '@testing-library/jest-dom/extend-expect' import MarkupService from 'markup/application/MarkupService' import { markupDtoSerialized } from 'test-support/markup-fixtures' +import { act, render, screen, waitFor } from '@testing-library/react' +import { MemoryRouter } from 'react-router-dom' +import { waitForSpinnerToBeRemoved } from 'test-support/waitForSpinnerToBeRemoved' jest.mock('markup/application/MarkupService') @@ -15,14 +20,26 @@ afterAll(() => { mockDate.mockRestore() }) -const MockMarkupService = MarkupService as jest.Mock> -const markupServiceMock = new MockMarkupService() +const markupServiceMock = new (MarkupService as jest.Mock< + jest.Mocked +>)() -markupServiceMock.fromString.mockReturnValue( - Bluebird.resolve(markupDtoSerialized) -) - -test('Snapshot', () => { +test('Snapshot', async () => { mockDate.mockReturnValue('1/1/2023') - expect(About({ markupService: markupServiceMock })).toMatchSnapshot() + markupServiceMock.fromString.mockReturnValue( + Bluebird.resolve(markupDtoSerialized) + ) + + await act(async () => { + const { container } = await render( + + + + ) + await waitForSpinnerToBeRemoved(screen) + await waitFor(() => { + expect(screen.queryByText('Loading...')).not.toBeInTheDocument() + }) + expect(container).toMatchSnapshot() + }) }) diff --git a/src/about/ui/about.tsx b/src/about/ui/about.tsx index 390aee731..6f01d60e5 100644 --- a/src/about/ui/about.tsx +++ b/src/about/ui/about.tsx @@ -1,7 +1,8 @@ -import React from 'react' +import React, { useState } from 'react' import { Tabs, Tab } from 'react-bootstrap' +import { useHistory } from 'react-router-dom' import AppContent from 'common/AppContent' -import { SectionCrumb } from 'common/Breadcrumbs' +import { TextCrumb } from 'common/Breadcrumbs' import MarkupService from 'markup/application/MarkupService' import 'about/ui/about.sass' import AboutProject from 'about/ui/project' @@ -9,18 +10,45 @@ import AboutFragmentarium from 'about/ui/fragmentarium' import AboutCorpus from 'about/ui/corpus' import AboutSigns from 'about/ui/signs' import AboutDictionary from 'about/ui/dictionary' -import AboutChronology from 'about/ui/chronology' +import AboutListOfKings from 'about/ui/chronology' +import _ from 'lodash' + +export const tabIds = [ + 'project', + 'fragmentarium', + 'corpus', + 'signs', + 'dictionary', + 'date-converter', + 'list-of-kings', +] as const +export type TabId = typeof tabIds[number] export default function About({ markupService, + activeTab, }: { markupService: MarkupService + activeTab: TabId }): JSX.Element { + const history = useHistory() + const [selectedTab, setSelectedTab] = useState(activeTab) + const handleSelect = (selectedTab: TabId) => { + history.push(selectedTab) + setSelectedTab(selectedTab) + } return ( - + handleSelect(selectedTab as TabId)} mountOnEnter unmountOnExit > @@ -39,8 +67,8 @@ export default function About({ {AboutDictionary(markupService)} - - {AboutChronology()} + + {AboutListOfKings()} diff --git a/src/fragmentarium/domain/Date.test.ts b/src/fragmentarium/domain/Date.test.ts index cf508aed7..d2e34bb66 100644 --- a/src/fragmentarium/domain/Date.test.ts +++ b/src/fragmentarium/domain/Date.test.ts @@ -251,15 +251,24 @@ describe('MesopotamianDate', () => { expect(date.toString()).toBe('∅.∅.∅ Sargon (ca. 2334–2279 BCE)') }) - it('returns the correct string representation (broken)', () => { + it('returns the correct string representation (broken, missing)', () => { + const date = new MesopotamianDate( + { value: '', isBroken: true }, + { value: '', isBroken: true, isIntercalary: true }, + { value: '', isBroken: true }, + king + ) + expect(date.toString()).toBe('[x].[x]².[x] Sargon (ca. 2334–2279 BCE)') + }) + + it('returns the correct string representation (broken, reconstructed)', () => { const date = new MesopotamianDate( { value: '1', isBroken: true }, { value: '2', isBroken: true, isIntercalary: true }, { value: '3', isBroken: true }, king ) - - expect(date.toString()).toBe('[x].[x]².[x] Sargon (ca. 2334–2279 BCE)') + expect(date.toString()).toBe('[3].[II²].[1] Sargon (ca. 2334 BCE)') }) it('returns the correct string representation (uncertain)', () => { @@ -279,7 +288,7 @@ describe('MesopotamianDate', () => { { value: '3', isBroken: true, isUncertain: true }, king ) - expect(date.toString()).toBe('[x]?.[x]²?.[x]? Sargon (ca. 2334–2279 BCE)') + expect(date.toString()).toBe('[3]?.[II²]?.[1]? Sargon (ca. 2334 BCE)') }) describe('toModernDate branching', () => { diff --git a/src/fragmentarium/domain/Date.ts b/src/fragmentarium/domain/Date.ts index f39076a37..26aede440 100644 --- a/src/fragmentarium/domain/Date.ts +++ b/src/fragmentarium/domain/Date.ts @@ -109,9 +109,9 @@ export class MesopotamianDate { parameter: 'year' | 'day' | 'month', element: string ): string { - const { isBroken, isUncertain } = this[parameter] + const { isBroken, isUncertain, value } = this[parameter] let brokenIntercalary = '' - if (isBroken) { + if (isBroken && !value) { element = 'x' brokenIntercalary = parameter === 'month' && this.month.isIntercalary ? '²' : '' @@ -190,13 +190,13 @@ export class MesopotamianDate { let month = parseInt(this.month.value) let day = parseInt(this.day.value) const isApproximate = this.isApproximate() - if (isNaN(month) || this.month.isBroken) { + if (isNaN(month)) { month = 1 } - if (isNaN(day) || this.day.isBroken) { + if (isNaN(day)) { day = 1 } - if (isNaN(year) || this.year.isBroken) { + if (isNaN(year)) { year = -1 } return { diff --git a/src/router/aboutRoutes.tsx b/src/router/aboutRoutes.tsx index e689abe77..5de6741fa 100644 --- a/src/router/aboutRoutes.tsx +++ b/src/router/aboutRoutes.tsx @@ -1,6 +1,6 @@ import React, { ReactNode } from 'react' -import { Route } from 'react-router-dom' -import About from 'about/ui/about' +import { Redirect, Route, RouteComponentProps } from 'react-router-dom' +import About, { TabId, tabIds } from 'about/ui/about' import MarkupService from 'markup/application/MarkupService' import { sitemapDefaults } from 'router/sitemap' import { HeadTagsService } from 'router/head' @@ -14,18 +14,26 @@ export default function AboutRoutes({ }): JSX.Element[] { return [ ( + path={`/about/:id(${tabIds.join('|')})`} + render={(props: RouteComponentProps<{ id: string }>): ReactNode => ( - + )} {...(sitemap && sitemapDefaults)} />, + , ] }