import customDateFormat from "../custom-date-format.js";
const dateFormatParts = {
texts: {
era: {
long: ["Before Common Era", "Common Era"],
short: ["BCE", "CE"],
narrow: ["B", "C"]
},
month: {
long: [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
short: [
"Jan.",
"Feb.",
"Mar.",
"Apr.",
"May",
"Jun.",
"Jul.",
"Aug.",
"Sep.",
"Oct.",
"Nov.",
"Dec."
],
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]
},
weekday: {
long: [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
short: ["Sun.", "Mon.", "Tue.", "Wed.", "Thu.", "Fri.", "Sat."],
narrow: ["Su", "M", "T", "W", "Th", "F", "Sa"]
},
hour12: ["a.m.", "p.m."]
},
joiner: {
full: "{1} at {0}",
long: "{1} at {0}",
medium: "{1}, {0}",
short: "{1}, {0}"
},
date: {
G: "{G}",
Gy: "{y} {G}",
GyM: "{L} {y} {G}",
GyMd: "{y} {G} {M} {d}",
GyMdE: "{E}, {y} {G} {M} {d}",
y: "{y}",
yM: "{L} {y}",
yMd: "{y} {M} {d}",
yMdE: "{E}, {y} {M} {d}",
M: "{L}",
Md: "{M} {d}",
MdE: "{E}, {M} {d}",
d: "{d}",
dE: "{E} {d}"
},
time: {
h: "{h}",
hB: "{H} {B}",
hv: "{h} ({v})",
hBv: "{H} {B} ({v})",
hm: "{h}.{m}",
hmB: "{H}.{m} {B}",
hmv: "{h}.{m} ({v})",
hmBv: "{H}.{m} {B} ({v})",
hms: "{h}.{m}.{s}",
hmsB: "{H}.{m}.{s} {B}",
hmsv: "{h}.{m}.{s} ({v})",
hmsBv: "{H}.{m}.{s} {B} ({v})"
}
};
const help = {
countRaw: new Intl.PluralRules("en-GB"),
numRaw: new Intl.NumberFormat("en-GB"),
verbalNum: n => {
const units = [
"zero",
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
"nine",
"ten",
"eleven",
"twelve",
"thirteen",
"fourteen",
"fifteen",
"sixteen",
"seventeen",
"eighteen",
"nineteen"
];
const tens = [
null,
null,
"twenty",
"thirty",
"forty",
"fifty",
"sixty",
"seventy",
"eighty",
"ninety"
];
if (n % 1 || n < 0 || n > 99) {
return help.num(n);
}
if (n < 20) {
return units[n];
}
if (n % 10 == 0) {
return tens[Math.floor(n / 10)];
}
return `${tens[Math.floor(n / 10)]}-${units[Math.floor(n % 10)]}`;
},
CustomDate: customDateFormat(dateFormatParts, ["en-GB", "en"]),
sentenceCase: x => `${x[0].toUpperCase()}${x.slice(1)}`
};
help.count = help.countRaw.select.bind(help.countRaw);
help.num = help.numRaw.format.bind(help.numRaw);
const locale = grimm => ({
meta: {
id: "en",
code: "en-GB",
name: "English",
sort: "aaa english",
flag: "gb",
fallback: [],
intlFallback: ["en-GB"]
},
help: help,
pan: {
indexLink: "Back to home",
baseSiteName: "The Satyrs’ Forest 🍇",
circa: x => `c. ${x}`,
dateSep: " / ",
licence: {
pd: '<a href="/licence"><span class="all-sc">CC0</span> public domain.</a> No rights reserved — do what thou wilt.',
mixed: 'All original contributions by the webmaster are <a href="/licence"><span class="all-sc">CC0</span> public domain</a>.'
},
pageHistory: {
added: date => `Page added to site: ${grimm.date.dual("en", date)}`,
created: date => `Page created: ${grimm.date.dual("en", date)}`,
published: date =>
`First published: ${grimm.date.dual("en", date)}`,
translated: date =>
`Page translated: ${grimm.date.dual("en", date)}`,
updated: date => `Page updated: ${grimm.date.dual("en", date)}`
}
},
attic: {
moons: ["☾", "ε.κ.ν.", ""],
months: {
long: [
"Hecatombæon",
"Metageitnion",
"Boedromion",
"Pyanepsion",
"Mæmacterion",
"Poseideon",
"Poseideon II",
"Gamelion",
"Anthesterion",
"Elaphebolion",
"Mounychion",
"Thargelion",
"Scirophorion"
],
short: [
"Heca.",
"Met.",
"Boe.",
"Pya.",
"Mæ.",
"Pos.",
"Pos. II",
"Gam.",
"Anth.",
"Ela.",
"Mou.",
"Thar.",
"Sci."
]
},
template: {
long: (ol, y, m, d) => `${d} ${m} ${ol}.${y}`,
short: (ol, y, m, d) => `${d} ${m} ${ol}.${y}`
}
},
comments: {
header: n =>
`${help.sentenceCase(help.verbalNum(n))} ${
{ one: "comment", other: "comments" }[help.count(n)]
}`,
headerNone: "Leave a comment",
saysBefore: "",
saysAfter: " says…",
reply: "Reply to this comment",
name: "Name",
namePlaceholder: "Alan Smithee",
email: "Email (<i>Spam trap — don’t fill this in if you’re a real person!</i>)",
website: "Website",
websitePlaceholder: "https://smithee.co.uk",
tripcode: "Secret word",
optional: " (<i>optional</i>)",
textarea: "Leave your comment",
textareaPlaceholder: "Right! We Spear-Danes in days gone by…",
textareaRules:
"Please be nice. Comments may be edited for proper spelling and capitalisation, because i’m a pedant. Basic formatting: <code><b>*bold*</b></code>, <code><i>/italics/</i></code>, <code>[//satyrs.eu links]</code>… <a href='/comments'>→ More</a>",
select: "(Anti-spam) Which planet do you live on?",
selectDefault: "Select…",
selectBellerophon: "Bellerophon",
selectEarth: "Earth",
selectMercury: "Mercury",
selectOmicron: "Omicron-5",
selectVulcan: "Vulcan",
submit: "Submit",
confirmed: "Your comment has been submitted!",
closed: "Comments on this post are now closed."
},
codex: {
siteName: "Codex Satyrorum",
codexIndex: "Codex index",
authorYear: (author, year, locale) =>
`${author}, ${grimm.date.ce(locale, year, 1)}`,
buy: "Buy the original!",
visit: "Visit the original!",
watch: "Watch the original!",
read: "Read the original!"
},
garden: {
siteName: "The Garden 🌿",
header: {
title: "The Garden",
subtitle: "Despatches from <i>The Satyrs’ Forest</i>"
},
sidebar: {
aboutHead: "About",
about: "<i>The Garden</i> is the domain of one Xanthe Tynehorne, a wandering satyr and aspiring eccentric living in the woods of green and pleasant England. You can read more about me on <a href='/about'>my site’s about page</a>.",
aboutAlt: "A satyr chilling in the grass and annoying a crow",
themeHead: "Settings: Theme",
theme: {
gaea: "Gæa",
pan: "Pan",
oceanos: "Oceanos",
demeter: "Demeter",
salmacis: "Salmacis",
dionysos: "Dionysos",
hemera: "Hemera",
chaos: "Chaos",
jason: "Jason"
},
notestyleHead: "Settings: Sidenotes",
notestyle: {
hellenic: "α, β, γ…",
footnotes: "*, †, ‡…",
numerals: "1, 2, 3…",
alphabetic: "a, b, c…",
roman: "i, ii, iii…"
},
bloggersInArmsHead: "Bloggers-in-arms",
bloggersInArmsLegend: {
daily: "Daily",
weekly: "Weekly",
monthly: "Monthly",
infrequently: "Infrequently",
hibernating: "Hibernating"
},
recentCommentsHead: "Recent comments",
recentCommentsUntitledPost: "an untitled post",
recentComment: (user, link) => `${user} on ${link}`,
feedHead: "Feed",
feed: "This garden has an <a href='/garden/feed'><span class='all-sc'>RSS</span> feed.</a>",
archivesHead: "Archives",
viewAll: "View all",
tagsHead: "Tags",
languagesHead: "Languages",
backToMain: "Back to main site"
},
post: {
untitled: "Untitled",
taggedAs: tags => `Tagged as ${tags.join(", ")}`,
edit: "Edit"
},
collation: {
pageNo: num => `Page ${help.num(num)}`,
chronYear: date => `Posts from ${grimm.date.ce("en", date, 1)}`,
chronMonth: date => `Posts from ${grimm.date.ce("en", date, 2)}`,
tagged: tag => `Posts tagged as “${tag}”`,
language: "Posts in English",
older: "Older posts",
newer: "Newer posts"
}
},
latbs: {
header: {
startYear: "1980",
endYear: "2558",
menu: "Menu",
translation: "To the stars so we might prosper",
siteName: {
title: "Looking at the Big Sky",
desktop: "Looking at the Big Sky",
mobile: "Looking at<br>the Big Sky"
}
},
category: {
meta: "Meta",
astrography: "Astrography",
geography: "Geography",
history: "History",
sapiens: "Sapiens",
culture: "Society & Culture",
science: "Science & Tech",
index: "Index",
maps: "Maps",
skipToContent: "Skip to content"
},
timeRange: (created, updated) => `${created} — ${updated}`,
publicDomain:
'<a href="/licence"><span class="all-sc">CC0</span> public domain.</a> No rights reserved — do what thou wilt.'
},
misrule: {
siteName: "Lords of Misrule",
indexLink: "More Lords of Misrule"
},
shrines: {
blessed: date =>
`Bleſsed ${grimm.date.attic("en", date).replace("s", "ſ")}`,
refreshed: date =>
`refreſhed ${grimm.date.attic("en", date).replace("s", "ſ")}`,
joiner: `; `
},
vinyl: {
na: '<span class="all-sc">N/A</span>',
gender: {
m: "Male",
mm: "All-male band",
mx: "Male-led band",
xx: "Mixed band",
x: "Other",
f: "Female",
ff: "All-female band",
fx: "Female-led band"
},
source: {
online: "Online purchase",
secondHand: "Second-hand",
reflex: '<a href="https://reflexrecordshop.com/">Reflex</a>, Newcastle',
amazon: "Amazon",
hmv: '<span class="all-sc">HMV</span> Newcastle',
beatdown:
'<a href="https://beatdownrecords.org/">Beatdown Records</a>, Newcastle',
gift: "Gift"
},
format: {
lp: '<span class="all-sc">LP</span>',
"12in": '12″ <span class="all-sc">EP</span>',
"10in": '10″ <span class="all-sc">EP</span>',
cd: '<span class="all-sc">CD</span>',
"2lp": '2×<span class="all-sc">LP</span>',
"3lp": '2×<span class="all-sc">LP</span>',
"2lp1ep":
'2×<span class="all-sc">LP</span> + 10″ <span class="all-sc">EP</span>'
},
colour: {
clear: "Clear",
black: "Black",
white: "White",
"translucent azure": "Translucent azure",
"translucent blue": "Translucent blue",
"translucent green": "Translucent green",
"translucent gold": "Translucent gold",
"translucent copper": "Translucent copper",
copper: "Copper",
pink: "Pink",
"demon eyes": "Red and black “demon eyes”",
purple: "Purple",
orange: "Orange",
floral: "Floral splatter",
"mountain dew": "Mountain Dew",
"red": "Red",
},
case: {
normal: "Normal",
gatefold: "Gatefold",
jewel: "Jewel case",
book: "Book"
},
feelies: {
lyricSheet: "lyric sheet",
LyricSheet: "Lyric sheet",
cdCopy: '<span class="all-sc">CD</span> copy of album',
CdCopy: '<span class="all-sc">CD</span> copy of album',
Poster: "Poster"
},
notes: {
DieCut: "Die-cut cover"
}
},
auth: {
logIn: "Log in",
signUp: "Sign up",
logOut: "Log out",
username: "Username",
password: "Password",
signupKey: "Signup key",
rememberMe: "Stay logged in",
rememberMeNote:
"Don’t check this box if you’re on a shared or public computer.",
message: {
signedUp: "You’ve successfully registered!",
loggedIn: un =>
`You are logged in as <strong>${grimm.escape(un)}</strong>.`,
noLogin: "You shall not pass!",
invalidSignupKey: "Your signup key is invalid.",
missingFields: "Please make sure to fill in every field."
}
},
moonPhases: [
"New moon",
"Waxing crescent",
"First quarter",
"Waxing gibbous",
"Full moon",
"Waning gibbous",
"Last quarter",
"Waning crescent"
],
planter: {
editor: {
creating: "Creating new post",
editing: title => `Editing post “${title}”`,
translating: title => `Translating post “${title}”`,
savePost: "Save",
previewPost: "Preview",
viewPost: "View",
publishPost: "Publish",
retractPost: "Retract",
titlePlaceholder: "Post title",
contentsPlaceholder: "Write your post here…",
slug: "Post <span class='all-sc'>URL</span>",
pageCreated: "Published (<span class='all-sc'>UTC</span>)",
lang: "Language",
translates: "Translates",
format: "Post format",
formatArticle: "Article",
formatNote: "Note",
tags: "Tags",
commentStatus: "Allow comments",
markup: "Markup language",
markupRubric: "Rubric",
markupHtml: "HTML",
thumbnail: "Thumbnail <span class='all-sc'>URL</span>",
thumbnailAlt: "Thumbnail alt text",
mediaNewFile: "New file",
tabWrite: "Write",
tabTag: "Tag",
tabMedia: "Add media"
},
message: {
postSaved: time => `Post saved on ${grimm.date.ce("en", time, 6)}.`,
postPublished: url =>
`Post published — <a href="${url}">click here to read it</a>!`,
slugTaken:
"That post <span class='all-sc'>URL</span> is already taken.",
missingThumbnailAltText: "Please specify some thumbnail alt text.",
alreadyTranslated: (post, lang) =>
`The post at <span class="mono">${post}</span> has already been translated into ${grimm.translate(
"en",
`loc.language.${lang}`
)}.`,
savedPreferences: "Preferences successfully saved!"
},
nav: {
posts: "Posts",
comments: "Comments",
tags: "Tags",
prefs: "Preferences",
avatars: "User avatars",
stats: "Stats"
},
posts: {
pageHeader: "Posts on <a href='/garden'><i>The Garden</i></a>",
pageTitle: "Posts on “The Garden”",
drafts: n =>
`${n ? help.num(n) : "No"} ${
{ one: "draft", other: "drafts" }[help.count(n)]
}`,
publishedPosts: n =>
`${n ? help.num(n) : "No"} ${
{ one: "published post", other: "published posts" }[
help.count(n)
]
}`,
compose: "New post",
edit: "Edit",
read: "Read",
preview: "Preview",
translate: "Translate",
th: {
title: "Title",
tags: "Tags",
language: "Language",
datePublished: "Date published",
dateEdited: "Date edited"
}
},
tags: {
pageHeader: "Manage tags",
tagID: "Tag <span class='all-sc'>ID</span>",
displayName: "Display name",
lang: "Language",
count: "Count",
edit: "Edit",
saveChanges: "Save changes"
},
comments: {
pageHeader: "Moderate comments",
shown: "Shown",
id: "ID",
from: "From",
comment: "Comment",
commentOn: page => `On ${page}`,
date: "Date"
},
prefs: {
pageHeader: user => `${user}’s preferences`,
uiLang: "Interface language",
save: "Save"
}
},
loc: {
country: {
ad: "Andorra",
ae: "the United Arab Emirates",
af: "Afghanistan",
ag: "Antigua and Barbuda",
ai: "Anguilla",
al: "Albania",
am: "Armenia",
ao: "Angola",
aq: "Antarctica",
ar: "Argentina",
as: "American Samoa",
at: "Austria",
au: "Australia",
aw: "Aruba",
ax: "Åland",
az: "Azerbaijan",
ba: "Bosnia",
bb: "Barbados",
bd: "Bangladesh",
be: "Belgium",
bf: "Burkina Faso",
bg: "Bulgaria",
bh: "Bahrain",
bi: "Burundi",
bj: "Benin",
bl: "Saint Barthélemy",
bm: "Bermuda",
bn: "Brunei",
bo: "Bolivia",
br: "Brazil",
bs: "the Bahamas",
bt: "Bhutan",
bw: "Botswana",
by: "Belarus",
bz: "Belize",
ca: "Canada",
cc: "the Cocos Islands",
cd: "Congo-Kinshasa",
cf: "the Central African Republic",
cg: "Congo-Brazzaville",
ch: "Switzerland",
ci: "Côte d’Ivoire",
ck: "the Cook Islands",
cl: "Chile",
cm: "Cameroon",
cn: "China",
co: "Colombia",
cr: "Costa Rica",
cu: "Cuba",
cv: "Cape Verde",
cw: "Curaçao",
cx: "Christmas Island",
cy: "Cyprus",
cz: "Czechia",
de: "Germany",
dj: "Djibouti",
dk: "Denmark",
dm: "Dominica",
do: "the Dominican Republic",
dz: "Algeria",
ec: "Ecuador",
ee: "Estonia",
eg: "Egypt",
eh: "Western Sahara",
er: "Eritrea",
es: "Spain",
et: "Ethiopia",
fi: "Finland",
fj: "Fiji",
fk: "the Falklands",
fm: "Micronesia",
fo: "the Færoe Islands",
fr: "France",
ga: "Gabon",
gb: "the United Kingdom",
"gb/eng": "England",
"gb/nir": "Northern Ireland",
"gb/sco": "Scotland",
"gb/wls": "Wales",
gd: "Grenada",
ge: "Georgia",
gg: "Guernsey",
gh: "Ghana",
gi: "Gibraltar",
gl: "Greenland",
gm: "the Gambia",
gn: "Guinea",
gq: "Equatorial Guinea",
gr: "Greece",
gt: "Guatemala",
gu: "Guam",
gw: "Guinea-Bissau",
gy: "Guyana",
hk: "Hong Kong",
hn: "Honduras",
hr: "Croatia",
ht: "Haiti",
hu: "Hungary",
id: "Indonesia",
ie: "Ireland",
il: "Israel",
im: "the Isle of Man",
in: "India",
io: "the Chagos Islands",
iq: "Iraq",
ir: "Iran",
is: "Iceland",
it: "Italy",
je: "Jersey",
jm: "Jamaica",
jo: "Jordan",
jp: "Japan",
ke: "Kenya",
kg: "Kyrgyzstan",
kh: "Cambodia",
ki: "Kiribati",
km: "the Comoros",
kn: "Saint Kitts and Nevis",
kp: "North Korea",
kr: "South Korea",
kw: "Kuwait",
ky: "the Cayman Islands",
kz: "Kazakhstan",
la: "Laos",
lb: "Lebanon",
lc: "Saint Lucia",
li: "Liechtenstein",
lk: "Sri Lanka",
lr: "Liberia",
ls: "Lesotho",
lt: "Lithuania",
lu: "Luxembourg",
lv: "Latvia",
ly: "Libya",
ma: "Morocco",
mc: "Monaco",
md: "Moldova",
me: "Montenegro",
mf: "Saint Martin",
mg: "Madagascar",
mh: "the Marshall Islands",
mk: "North Macedonia",
ml: "Mali",
mm: "Myanmar",
mn: "Mongolia",
mo: "Macao",
mp: "the Northern Mariana Islands",
mr: "Mauritania",
ms: "Montserrat",
mt: "Malta",
mu: "Mauritius",
mv: "the Maldives",
mw: "Malawi",
mx: "Mexico",
my: "Malaysia",
mz: "Mozambique",
na: "Namibia",
nc: "New Caledonia",
ne: "Niger",
nf: "Norfolk Island",
ng: "Nigeria",
ni: "Nicaragua",
nl: "the Netherlands",
no: "Norway",
np: "Nepal",
nr: "Nauru",
nu: "Niue",
nz: "New Zealand",
om: "Oman",
pa: "Panama",
pe: "Peru",
pf: "French Polynesia",
pg: "Papua New Guinea",
ph: "the Philippines",
pk: "Pakistan",
pl: "Poland",
pm: "Saint Pierre and Miquelon",
pn: "the Pitcairn Islands",
pr: "Puerto Rico",
ps: "Palestine",
pt: "Portugal",
pw: "Palau",
py: "Paraguay",
qa: "Qatar",
ro: "Romania",
rs: "Serbia",
ru: "Russia",
rw: "Rwanda",
sa: "Saudi Arabia",
sb: "Solomon Islands",
sc: "Seychelles",
sd: "Sudan",
se: "Sweden",
sg: "Singapore",
sh: "Saint Helena",
si: "Slovenia",
sj: "Svalbard",
sk: "Slovakia",
sl: "Sierra Leone",
sm: "San Marino",
sn: "Senegal",
so: "Somalia",
sr: "Suriname",
ss: "South Sudan",
st: "São Tomé and Príncipe",
suhh: "the Soviet Union",
sv: "El Salvador",
sx: "Sint Maarten",
sy: "Syria",
sz: "Eswatini",
ta: "Tristan da Cunha",
tc: "the Turks and Caicos Islands",
td: "Chad",
tg: "Togo",
th: "Thailand",
tj: "Tajikistan",
tk: "Tokelau",
tl: "East Timor",
tm: "Turkmenistan",
tn: "Tunisia",
to: "Tonga",
tr: "Turkey",
tt: "Trinidad and Tobago",
tv: "Tuvalu",
tw: "Taiwan",
tz: "Tanzania",
ua: "Ukraine",
ug: "Uganda",
us: "the United States",
uy: "Uruguay",
uz: "Uzbekistan",
va: "Vatican City",
vc: "Saint Vincent and the Grenadines",
ve: "Venezuela",
vg: "the British Virgin Islands",
vi: "the U.S. Virgin Islands",
vn: "Vietnam",
vu: "Vanuatu",
wf: "Wallis and Futuna",
ws: "Samoa",
xa: "Abkhazia",
xc: "Northern Cyprus",
xk: "Kosovo",
xn: "Artsakh",
xo: "South Ossetia",
xs: "Somaliland",
xt: "Transnistria",
ye: "Yemen",
za: "South Africa",
zm: "Zambia",
zw: "Zimbabwe"
},
city: {
"nl spi": "Spijkenisse, S.Holl."
}
}
});
export default locale;