diff options
| author | Joe Carstairs <65492573+joeacarstairs@users.noreply.github.com> | 2025-04-15 07:54:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-15 07:54:03 +0100 |
| commit | 5690af11311840fb6cac5625868533b575712432 (patch) | |
| tree | 7e8ee0d2a42d110ca5a8e1618668186075842b47 | |
| parent | 0dd5226bb52773f0f034f31f68f2439ae2f18fe3 (diff) | |
| parent | fd5998240f65e3bc3a94e4045f8f5c286a755b1c (diff) | |
Merge pull request #123 from joeacarstairs/staging
linguatext
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | src/components/NewsIndex/NewsPreviewLink.astro | 13 | ||||
| -rw-r--r-- | src/content/news/en-GB/2025-04-15-linguatext.mdx | 24 | ||||
| -rw-r--r-- | src/content/news/sco/2025-04-15-linguatext.mdx | 24 | ||||
| -rw-r--r-- | src/i18n/translations/pages/home.ts | 8 | ||||
| -rw-r--r-- | src/pages/[locale]/index.astro | 27 | ||||
| -rw-r--r-- | src/pages/[locale]/news/[...slug].astro | 13 |
7 files changed, 105 insertions, 5 deletions
@@ -9,3 +9,4 @@ dist/ .vercel public/css/ scss-build/ +.zed diff --git a/src/components/NewsIndex/NewsPreviewLink.astro b/src/components/NewsIndex/NewsPreviewLink.astro index fa01d8d..5b8153c 100644 --- a/src/components/NewsIndex/NewsPreviewLink.astro +++ b/src/components/NewsIndex/NewsPreviewLink.astro @@ -2,7 +2,7 @@ import translate from '$i18n/translate'; import tComponent from '$i18n/translations/components/newsIndex'; import { getLocaleFromPathOrThrow } from '$lib/getLocaleFromPath'; -import { getHref } from '$lib/newsUtils'; +import { getDate, getHref } from '$lib/newsUtils'; import type { CollectionEntry } from 'astro:content'; interface Props { @@ -13,6 +13,8 @@ interface Props { const { headingLevel, newsItem } = Astro.props; const locale = getLocaleFromPathOrThrow(Astro.url.pathname); const t = translate(locale); + +const publicationDate = getDate(newsItem); --- <a class="news-index__item group-hover" href={getHref(newsItem)}> @@ -22,5 +24,14 @@ const t = translate(locale); `} /> <p>{newsItem.data.summary}</p> + <time datetime={publicationDate?.toISOString()}> + { + publicationDate?.toLocaleDateString('en-GB', { + day: 'numeric', + month: 'short', + year: 'numeric', + }) + } + </time> <p class="link">{t(tComponent, { key: 'read-article' })}</p> </a> diff --git a/src/content/news/en-GB/2025-04-15-linguatext.mdx b/src/content/news/en-GB/2025-04-15-linguatext.mdx new file mode 100644 index 0000000..a9f0694 --- /dev/null +++ b/src/content/news/en-GB/2025-04-15-linguatext.mdx @@ -0,0 +1,24 @@ +--- +title: Opportunity for Scots Language translator and proofreader +summary: Opportunity for Scots Language translator and proofreader +--- + +An Edinburgh based firm is looking for a person suitably qualified and experienced to translate +documents from English into Scots, with a second position available for proofreading. + +Linguatext Ltd, an employee-owned company that specialises in German to English translation, have in +recent years, been supplying translations from English into community languages, primarily for the +public sector in Scotland. + +Commenting, Andrew Wood, Director of Linguatext said: "We’ve been asked to translate some documents +into Scots and are trying to find experienced and professional translators who could take on the +work – ideally one translator and one proofreader." + +Andrew has asked the Scots Leid Associe to signpost him to people who can provide Scots +translations. + +"Any help or advice you could offer would be very much appreciated,” he said, “many thanks in +advance and best regards.” + +If you are qualified yourself, or know anyone, please contact +[info@linguatext.com](mailto:info@linguatext.com). diff --git a/src/content/news/sco/2025-04-15-linguatext.mdx b/src/content/news/sco/2025-04-15-linguatext.mdx new file mode 100644 index 0000000..ea3557c --- /dev/null +++ b/src/content/news/sco/2025-04-15-linguatext.mdx @@ -0,0 +1,24 @@ +--- +title: Owersettin an pruifreadin opportunity +summary: Opportunity fur a Scots leid owersetter an pruifreader +--- + +An Edinbro’ based firm is lukin fur a boady suitably qualified an experienced tae owersett documents +frae English tae Scots, wi a second poseetion available fur pruifreading. + +Linguatext Ltd, an employee-owned company that specialises in German tae English owersettin, heise, +this last wheen o year, been daen owersettins frae English intae community leids, maistly for the +publik sector in Scotland. + +Commenting, Andrew Wood, Director of Linguatext said: "We’ve been asked to translate some documents +into Scots and are trying to find experienced and professional translators who could take on the +work – ideally one translator and one proofreader." + +Andrew heise axed the Scots Leid Associe tae signpost him tae people wha can provide Scots +owersettins. + +"Any help or advice you could offer would be very much appreciated,” he says, “many thanks in +advance and best regards.” + +If yer qualified yersell, or ken onyboady wha is, please contact +[info@linguatext.com](mailto:info@linguatext.com). diff --git a/src/i18n/translations/pages/home.ts b/src/i18n/translations/pages/home.ts index bb2f86d..c440365 100644 --- a/src/i18n/translations/pages/home.ts +++ b/src/i18n/translations/pages/home.ts @@ -5,6 +5,14 @@ const tPage = { sco: () => 'Hame', 'en-GB': () => 'Home', }, + news: { + sco: () => 'News', + 'en-GB': () => 'News', + }, + 'aw-news': { + sco: () => 'Aa news', + 'en-GB': () => 'All news', + }, sangschaw: { sco: () => 'Sangschaw open for entries', 'en-GB': () => 'Sangschaw open for entries', diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro index 7846fd8..15b4005 100644 --- a/src/pages/[locale]/index.astro +++ b/src/pages/[locale]/index.astro @@ -1,10 +1,14 @@ --- -import Page from '$layouts/Page.astro'; -import localeStaticPaths from '$lib/localeStaticPaths'; +import Button from '$components/Button.astro'; +import CommitteeList from '$components/CommitteeList/CommitteeList.astro'; +import NewsIndex from '$components/NewsIndex/NewsIndex.astro'; import translate from '$i18n/translate'; import tPage from '$i18n/translations/pages/home'; +import Page from '$layouts/Page.astro'; +import localeStaticPaths from '$lib/localeStaticPaths'; +import { isBefore, isNewsItemInLocale } from '$lib/newsUtils'; import type Locale from '$types/Locale'; -import CommitteeList from '$components/CommitteeList/CommitteeList.astro'; +import { getCollection } from 'astro:content'; export async function getStaticPaths() { return localeStaticPaths; @@ -12,9 +16,26 @@ export async function getStaticPaths() { const locale = Astro.params.locale as Locale; const t = translate(locale); + +const allNewsItemsInLocale = await getCollection('news', (item) => + isNewsItemInLocale(item, locale) +); +const firstNewsItem = allNewsItemsInLocale.find( + (item) => !allNewsItemsInLocale.some((otherItem) => isBefore(item, otherItem)) +); +if (!firstNewsItem) { + throw new Error('No first news item.'); +} --- <Page title={t(tPage, { key: 'title' })}> + <section id="news"> + <h2 set:html={t(tPage, { key: 'news' })} /> + <NewsIndex headingLevel="h3" newsItems={[firstNewsItem]} /> + <Button classNames="grid-span-3 grid-prose-end" href={`/${locale}/news`}> + {t(tPage, { key: 'aw-news' })} ▶ + </Button> + </section> <section id="about"> <h2 set:html={t(tPage, { key: 'about-us' })} /> <p set:html={t(tPage, { key: 'about-us-para-1' })} /> diff --git a/src/pages/[locale]/news/[...slug].astro b/src/pages/[locale]/news/[...slug].astro index 4585cf2..580f4a3 100644 --- a/src/pages/[locale]/news/[...slug].astro +++ b/src/pages/[locale]/news/[...slug].astro @@ -1,7 +1,7 @@ --- import Article from '$layouts/Article.astro'; import { getCollection, render } from 'astro:content'; -import { getLocale, getSlug } from '$lib/newsUtils'; +import { getDate, getLocale, getSlug } from '$lib/newsUtils'; export async function getStaticPaths() { return (await getCollection('news')).map((entry) => ({ @@ -15,11 +15,22 @@ export async function getStaticPaths() { const { entry } = Astro.props; const { Content } = await render(entry); + +const publicationDate = getDate(entry); --- <Article title={entry.data.title}> <section> <h1>{entry.data.title}</h1> + <time datetime={publicationDate?.toISOString()}> + { + publicationDate?.toLocaleDateString('en-GB', { + day: 'numeric', + month: 'short', + year: 'numeric', + }) + } + </time> <Content /> </section> </Article> |
