@rr0/cms
Version:
RR0 Content Management System (CMS)
108 lines (107 loc) • 3.68 kB
JavaScript
import { placeMessages_en } from "@rr0/place";
import { MessageUtils } from "./RR0Messages.js";
import { countryMessageList_en } from "../org/CountryMessageList_en.js";
import { peopleMessages_en } from "../people/PeopleMessages_en.js";
import { orgMessages_en } from "../org/OrgRR0Messages_en.js";
const caseClassification_en = {
hynek: {
NL: {
short: "NL",
long: "Noctunal Light"
},
DD: {
short: "DD",
long: "Daylight Disc"
},
RV: {
short: "RV",
long: "Radar Visual"
},
CE1: {
short: "CE1",
long: "Close Encounter of the 1st kind"
},
CE2: {
short: "CE2",
long: "Close Encounter of the 2d kind"
},
CE3: {
short: "CE3",
long: "Close Encounter of the 3rd kind"
},
CE4: {
short: "CE4",
long: "Close Encounter of the 4th kind"
},
CE5: {
short: "CE5",
long: "Close Encounter of the 5th kind"
}
}
};
const caseConclusion_en = {
unknown: "unexplained",
misinterpretation: "misinterpretation",
hoax: "hoax"
};
export class RR0Messages_en {
constructor() {
this.nonSignificantWords = ["my", "the", "we", "they", "want", "she", "them"];
this.context = {
time: {
duration: {
days: (d) => MessageUtils.plural(d, "day"),
hours: (d) => MessageUtils.plural(d, "hour"),
minutes: (mn) => MessageUtils.plural(mn, "minute"),
seconds: (s) => MessageUtils.plural(s, "second"),
lastSeparator: " and ",
approximate: (txt) => `${txt} approximately`
},
relative: {
year: {
before: "the year before",
after: "the year after"
},
month: {
before: "le month before",
after: "the month after",
later: "a month later"
},
day: {
before: "the day before",
after: "the day after"
},
hour: {
before: "one hour before",
after: "one hour later"
}
},
on: (approximate) => (approximate ? "around " : "on "),
in: (approximate) => (approximate ? "around " : ""),
fromTo: (startReplacement, endReplacement) => startReplacement + " to " + endReplacement,
starting: (approximate) => "starting " + (approximate ? "" : "the ")
},
place: placeMessages_en
};
this.case = {
classification: caseClassification_en,
conclusion: caseConclusion_en
};
this.org = orgMessages_en;
this.people = peopleMessages_en;
this.place = placeMessages_en;
this.country = countryMessageList_en;
this.nav = {
start: "Start",
contents: "Contents",
prev: "Previous",
next: "Next"
};
this.unit = {
smi: (miles) => (miles * 1.60934).toFixed(0) + " km",
fot: (feet) => (feet * 0.3048).toFixed(0) + " m",
hm: (milesPerHour) => this.unit.smi(milesPerHour) + "/h",
inh: (inches) => (inches / 2.54).toFixed(0) + " cm"
};
}
}