Translation files: area files in place and the common texts for shared labels

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 17:36:38 +01:00
co-authored by Claude Sonnet 5.5
parent 246ebe5fd6
commit ab33e1fc83
13 changed files with 55 additions and 2 deletions
+10
View File
@@ -47,6 +47,16 @@ export default tseslint.config(
],
plugins: { react },
rules: {
// Text in attributes that people read or hear (labels, alt text)
'no-restricted-syntax': [
'warn',
{
selector:
"JSXAttribute[name.name=/^(aria-label|aria-description|alt|title|placeholder|label)$/][value.type='Literal']",
message:
'Put the text in a language file (src/i18n) and use t().',
},
],
'react/jsx-no-literals': [
'warn',
{
+21 -1
View File
@@ -1,4 +1,13 @@
import about from './nl/about.json';
import common from './nl/common.json';
import contact from './nl/contact.json';
import home from './nl/home.json';
import instagram from './nl/instagram.json';
import portfolio from './nl/portfolio.json';
import seo from './nl/seo.json';
import shoots from './nl/shoots.json';
import site from './nl/site.json';
import testimonials from './nl/testimonials.json';
// The texts of the site, per language, as JSON per area (src/i18n/<locale>/*.json).
// Only Dutch exists now. The types come from the Dutch files: a second language
@@ -9,7 +18,18 @@ import common from './nl/common.json';
// No library: the files are imported as modules, so prerendering, hydrating
// and the host injection all see the same text without a loading step.
export const nl = { common };
export const nl = {
common,
site,
home,
about,
contact,
shoots,
portfolio,
instagram,
testimonials,
seo,
};
export type Messages = typeof nl;
+1
View File
@@ -0,0 +1 @@
{}
+9 -1
View File
@@ -1,5 +1,13 @@
{
"aria": {
"backToTop": "Terug naar boven"
"backToTop": "Terug naar boven",
"skipToContent": "Direct naar de inhoud"
},
"site": {
"name": "Andrea Slop Fotografie"
},
"newTab": {
"short": "(opent in nieuw tabblad)",
"instagram": "(Instagram, opent in nieuw tabblad)"
}
}
+1
View File
@@ -0,0 +1 @@
{}
+1
View File
@@ -0,0 +1 @@
{}
+1
View File
@@ -0,0 +1 @@
{}
+1
View File
@@ -0,0 +1 @@
{}
+1
View File
@@ -0,0 +1 @@
{}
+1
View File
@@ -0,0 +1 @@
{}
+1
View File
@@ -0,0 +1 @@
{}
+1
View File
@@ -0,0 +1 @@
{}