summaryrefslogtreecommitdiff
path: root/src/i18n/translations/components
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-13 19:03:03 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-13 19:10:06 +0100
commit8c1fff45fb5340a338416586162ac247b2b190c0 (patch)
tree849ae072e8efc8652d3045ae4ab3db30798f1a9b /src/i18n/translations/components
parent1118c377e32940ada179bfcde1549b73d8948626 (diff)
Uses TSConfig paths
Diffstat (limited to 'src/i18n/translations/components')
-rw-r--r--src/i18n/translations/components/breadcrumbs.ts22
-rw-r--r--src/i18n/translations/components/languageLinks.ts2
2 files changed, 22 insertions, 2 deletions
diff --git a/src/i18n/translations/components/breadcrumbs.ts b/src/i18n/translations/components/breadcrumbs.ts
index a0af6f9..3db3f2f 100644
--- a/src/i18n/translations/components/breadcrumbs.ts
+++ b/src/i18n/translations/components/breadcrumbs.ts
@@ -1,4 +1,6 @@
-import type { TranslationsDictionary } from '../../../types/TranslationsDictionary';
+import { getLallansIssue } from '$data/lallans';
+import { getScotsoun } from '$data/scotsoun';
+import type { TranslationsDictionary } from '$types/TranslationsDictionary';
// This maun be kept up til date bi haund. There is
// nae compile-time check that aw routes hae been
@@ -16,6 +18,24 @@ const breadcrumbsTranslations = {
sco: () => 'Lallans',
'en-GB': () => 'Lallans',
},
+ ...Object.fromEntries(
+ Object.keys(getLallansIssue).map((lallansIssueNumber) => [
+ `/furthsettins/lallans/${lallansIssueNumber}/`,
+ {
+ sco: () => `Lallans ${lallansIssueNumber}`,
+ 'en-GB': () => `Lallans ${lallansIssueNumber}`,
+ },
+ ])
+ ),
+ ...Object.fromEntries(
+ Object.keys(getScotsoun).map((scotsounId) => [
+ `/furthsettins/scotsoun/${scotsounId}/`,
+ {
+ sco: () => `Scotsoun ${scotsounId}`,
+ 'en-GB': () => `Scotsoun ${scotsounId}`,
+ },
+ ])
+ ),
};
type Raw = typeof breadcrumbsTranslations;
diff --git a/src/i18n/translations/components/languageLinks.ts b/src/i18n/translations/components/languageLinks.ts
index d3db24a..2a18448 100644
--- a/src/i18n/translations/components/languageLinks.ts
+++ b/src/i18n/translations/components/languageLinks.ts
@@ -1,4 +1,4 @@
-import type { TranslationsDictionary } from '../../../types/TranslationsDictionary';
+import type { TranslationsDictionary } from '$types/TranslationsDictionary';
const languageLinksTranslations = {
'language-link-text': {