From de5056c440a670f70182b4106efc4675088c6a40 Mon Sep 17 00:00:00 2001 From: Kevin Kandlbinder Date: Sun, 7 Nov 2021 00:46:06 +0000 Subject: [PATCH] Rework translations --- .eslintcache | 1 - locales/de/translation.json | 106 ++++++++++++++++------------- locales/en/translation.json | 106 ++++++++++++++++------------- src/components/languageSwitcher.js | 2 +- src/components/navigation.js | 6 +- src/components/offscreenNav.js | 4 +- src/components/seo.js | 2 +- src/layouts/default.js | 6 +- src/pages/about.js | 12 ++-- src/pages/donate.js | 19 ++++-- src/pages/friends.js | 9 ++- src/pages/index.js | 24 +++---- src/pages/projects.js | 8 +-- src/pages/social.js | 6 +- src/templates/project.js | 8 +-- 15 files changed, 171 insertions(+), 148 deletions(-) delete mode 100644 .eslintcache diff --git a/.eslintcache b/.eslintcache deleted file mode 100644 index 309a358..0000000 --- a/.eslintcache +++ /dev/null @@ -1 +0,0 @@ -[{"/workspaces/KevinK.dev.js/gatsby-config.js":"1","/workspaces/KevinK.dev.js/gatsby-node.js":"2","/workspaces/KevinK.dev.js/src/components/navigation.js":"3","/workspaces/KevinK.dev.js/src/components/offscreenNav.js":"4","/workspaces/KevinK.dev.js/src/templates/blogListing.js":"5","/workspaces/KevinK.dev.js/src/templates/blogPost.js":"6"},{"size":4779,"mtime":1636241579421,"results":"7","hashOfConfig":"8"},{"size":10589,"mtime":1636241579573,"results":"9","hashOfConfig":"8"},{"size":4215,"mtime":1636240147782,"results":"10","hashOfConfig":"8"},{"size":2072,"mtime":1636240157250,"results":"11","hashOfConfig":"8"},{"size":5807,"mtime":1636241180559,"results":"12","hashOfConfig":"8"},{"size":4539,"mtime":1636240809658,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1eb7dm3",{"filePath":"16","messages":"17","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"18","messages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"22","messages":"23","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/workspaces/KevinK.dev.js/gatsby-config.js",[],"/workspaces/KevinK.dev.js/gatsby-node.js",[],"/workspaces/KevinK.dev.js/src/components/navigation.js",[],"/workspaces/KevinK.dev.js/src/components/offscreenNav.js",[],"/workspaces/KevinK.dev.js/src/templates/blogListing.js",[],"/workspaces/KevinK.dev.js/src/templates/blogPost.js",[]] \ No newline at end of file diff --git a/locales/de/translation.json b/locales/de/translation.json index 2b7af28..b4d920b 100644 --- a/locales/de/translation.json +++ b/locales/de/translation.json @@ -1,54 +1,62 @@ { - "siteDescription": "Hallo, ich bin Kevin Kandlbinder, ein Entwickler und Hobby-Fotograf aus Norddeutschland.", - "imprint": "Impressum", - "datasec": "Datenschutz", - "disclaimer": "Disclaimer", - "projects": "Projekte", - "project": "Projekt", - "social": "Soziales", - "homeHello": "Hallo, ich bin", - "homeMe": "Ich bin", - "homeWebDeveloper": "Web Developer", - "homeMyLocation": "Quickborn, Schleswig-Holstein, Deutschland", - "donationCatchphrase": "Gefällt dir was du siehst? Spende doch etwas.", - "homeImageCredit": "Portrait aufgenommen von Jannik Kiel", - "de": "Deutsch", - "en": "Englisch", - "projectAboutHeader": "Über {{projectName}}", - "projectViewGitHub": "Auf GitHub anschauen", - "projectViewWebsite": "Projekt-Website anschauen", - "projectsDescription": "Das ist woran ich grade arbeite oder woran ich gearbeitet habe.", - "projectView": "Anschauen", - "socialDescriptionWithLink": "Finde mich auf anderen Plattformen oder <1>besuche meine Freunde!", - "socialDescription": "Finde mich auf anderen Plattformen!", - "friends": "Freunde", - "friendsDescription": "In dieser Liste stehen Freunde von mir und meiner Seite. Schau doch bei ihnen mal rein, wenn du mehr interessante Projekte sehen willst.", - "donateThanksText": "Ich finde es schön, dass du meine Arbeit schön findest und das zeigst! Sende mir gerne eine E-Mail an <1>{{contactEmail}} wenn du mit mir über irgendwas reden möchtest!", - "donateThanks": "Danke für die Spende!", - "donateDescription": "Hey! Es sieht so aus als würdest du über eine Spende nachdenken. Das ist nett! Wenn du ein bestimmtes Projekt unterstützen willst, schreibe deine Wünsche gerne in den Spendenkommentar.", - "donate": "Spenden", - "featuredProjects": "Vorgestellte Projekte", - "seeMore": "Mehr Projekte erkunden", - "donateGitHub": "Du kannst mich mit dem folgenden Button ganz einfach über GitHub Sponsors unterstützen!", - "donatePayPal": "Wenn du mich lieber über PayPal unterstützen willst ist hier der Button für dich:", - "sponsorGitHub": "Über GitHub unterstützen", - "mySkills": "Meine Fähigkeiten", - "about": "Über", - "explore": "Erkunde", - "myProjects": "meine Projekte", - "discover": "Entdecke", - "mySocials": "meine Accounts", - "learn": "Erfahre", - "moreAboutMe": "mehr über mich", - "home": "Home", + "site": { + "description": "Hallo, ich bin Kevin Kandlbinder, ein Entwickler und Hobby-Fotograf aus Norddeutschland." + }, + "layout": { + "imprint": "Impressum", + "datasec": "Datenschutz", + "disclaimer": "Disclaimer" + }, + "project": { + "title": "Projekt", + "plural": "Projekte", + "aboutHeader": "Über {{projectName}}", + "viewGitHub": "Auf GitHub anschauen", + "viewWebsite": "Projekt-Website anschauen", + "description": "Das ist woran ich grade arbeite oder woran ich gearbeitet habe.", + "view": "Anschauen" + }, + "home": { + "title": "Home", + "hello": "Hallo, ich bin", + "me": "Ich bin", + "webDeveloper": "Web Developer", + "imageCredit": "Portrait aufgenommen von Jannik Kiel", + "myLocation": "Quickborn, Schleswig-Holstein, Deutschland", + "explore": "Erkunde", + "myProjects": "meine Projekte", + "discover": "Entdecke", + "mySocials": "meine Accounts", + "learn": "Erfahre", + "moreAboutMe": "mehr über mich" + }, + "about": { + "title": "Über", + "donationCatchphrase": "Gefällt dir was du siehst? Spende doch etwas.", + "moreProjects": "Mehr Projekte erkunden", + "featuredProjects": "Vorgestellte Projekte", + "mySkills": "Meine Fähigkeiten" + }, + "social": { + "title": "Soziales", + "descriptionWithLink": "Finde mich auf anderen Plattformen oder <1>besuche meine Freunde!", + "description": "Finde mich auf anderen Plattformen!" + }, + "friends": { + "title": "Freunde", + "description": "In dieser Liste stehen Freunde von mir und meiner Seite. Schau doch bei ihnen mal rein, wenn du mehr interessante Projekte sehen willst." + }, + "donate": { + "title": "Spenden", + "description": "Hey! Es sieht so aus als würdest du über eine Spende nachdenken. Das ist nett! Wenn du ein bestimmtes Projekt unterstützen willst, schreibe deine Wünsche gerne in den Spendenkommentar.", + "thanks": "Danke für die Spende!", + "thanksText": "Ich finde es schön, dass du meine Arbeit schön findest und das zeigst! Sende mir gerne eine E-Mail an <1>{{contactEmail}} wenn du mit mir über irgendwas reden möchtest!", + "gitHub": "Du kannst mich mit dem folgenden Button ganz einfach über GitHub Sponsors unterstützen!", + "payPal": "Wenn du mich lieber über PayPal unterstützen willst ist hier der Button für dich:", + "sponsorGitHub": "Über GitHub unterstützen", + "donatePayPal": "Über PayPal spenden" + }, "menu": "Menü", - "scambox": "Scambox", - "scamboxNotice": "Hinweis", - "scamboxLanguage": "Scambox ist nicht auf Deutsch verfügbar und wird auf Englisch angezeigt.", - "scamboxDescription": "Tauche mit mir ein in die Welt der Scams, die ich tagtäglich so bekomme, und lach ein bisschen mit mir!", - "scamboxReadFull": "Ganzen Post lesen »", - "scamboxPosted": "Gepostet am {{date}}", - "moreSoon": "Bald an dieser Stelle mehr", "language": { "en": { "name": "Englisch" diff --git a/locales/en/translation.json b/locales/en/translation.json index a604363..20ef4cf 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -1,54 +1,62 @@ { - "siteDescription": "Hello, I am Kevin Kandlbinder, a developer and hobby photographer from northern Germany.", - "imprint": "Imprint", - "datasec": "Data Protection", - "disclaimer": "Disclaimer", - "projects": "Projects", - "project": "Project", - "social": "Social", - "homeHello": "Hello, I am", - "homeMe": "I am", - "homeWebDeveloper": "a web developer", - "homeMyLocation": "Quickborn, Schleswig-Holstein, Germany", - "donationCatchphrase": "Like what you're seeing? Consider donating.", - "homeImageCredit": "Portrait taken by Jannik Kiel", - "de": "German", - "en": "English", - "projectAboutHeader": "About {{projectName}}", - "projectViewGitHub": "View on GitHub", - "projectViewWebsite": "View Project-Website", - "projectsDescription": "This is what I am working on or have worked on.", - "projectView": "View", - "socialDescriptionWithLink": "Find me on other platforms or <1>visit my friends!", - "socialDescription": "Find me on other platforms!", - "friends": "Friends", - "friendsDescription": "In this list you can find friends of mine and this site. Feel free to check them out for more interesting projects.", - "donate": "Donate", - "donateDescription": "Hey! It looks like you're thinking about donating to me. That's nice of you! If you want your donation to go towards a specific project, feel free to write your wishes into the donation comment.", - "donateThanks": "Thanks for donating!", - "donateThanksText": "I really appreciate you appreciating my work and showing it! Feel free to mail me at <1>{{contactEmail}} if you have anything you want to talk about!", - "featuredProjects": "Featured Projects", - "seeMore": "Explore more Projects", - "donateGitHub": "You can very easily support me via GitHub Sponsors using the following button!", - "donatePayPal": "If you'd rather support me via PayPal the following button is for you:", - "sponsorGitHub": "Sponsor using GitHub", - "mySkills": "My Skills", - "about": "About", - "explore": "Explore", - "myProjects": "my projects", - "discover": "Discover", - "mySocials": "my socials", - "learn": "Learn", - "moreAboutMe": "more about me", - "home": "Home", + "site": { + "description": "Hello, I am Kevin Kandlbinder, a developer and hobby photographer from northern Germany." + }, + "layout": { + "imprint": "Imprint", + "datasec": "Data Protection", + "disclaimer": "Disclaimer" + }, + "project": { + "title": "Project", + "plural": "Projects", + "aboutHeader": "About {{projectName}}", + "viewGitHub": "View on GitHub", + "viewWebsite": "View Project-Website", + "description": "This is what I am working on or have worked on.", + "view": "View" + }, + "home": { + "title": "Home", + "hello": "Hello, I am", + "me": "I am", + "webDeveloper": "a web developer", + "imageCredit": "Portrait taken by Jannik Kiel", + "myLocation": "Quickborn, Schleswig-Holstein, Germany", + "explore": "Explore", + "myProjects": "my projects", + "discover": "Discover", + "mySocials": "my socials", + "learn": "Learn", + "moreAboutMe": "more about me" + }, + "about": { + "title": "About", + "donationCatchphrase": "Like what you're seeing? Consider donating.", + "moreProjects": "Explore more Projects", + "featuredProjects": "Featured Projects", + "mySkills": "My Skills" + }, + "social": { + "title": "Social", + "descriptionWithLink": "Find me on other platforms or <1>visit my friends!", + "description": "Find me on other platforms!" + }, + "friends": { + "title": "Friends", + "description": "In this list you can find friends of mine and this site. Feel free to check them out for more interesting projects." + }, + "donate": { + "title": "Donate", + "description": "Hey! It looks like you're thinking about donating to me. That's nice of you! If you want your donation to go towards a specific project, feel free to write your wishes into the donation comment.", + "thanks": "Thanks for donating!", + "thanksText": "I really appreciate you appreciating my work and showing it! Feel free to mail me at <1>{{contactEmail}} if you have anything you want to talk about!", + "gitHub": "You can very easily support me via GitHub Sponsors using the following button!", + "payPal": "If you'd rather support me via PayPal the following button is for you:", + "sponsorGitHub": "Sponsor using GitHub", + "donatePayPal": "Donate using PayPal" + }, "menu": "Menu", - "scambox": "Scambox", - "scamboxNotice": "Notice", - "scamboxLanguage": "Scambox is only available in English.", - "scamboxDescription": "Take a dive with me into all of the scams I get on the daily, and maybe laugh at them a little!", - "scamboxReadFull": "Read full post »", - "scamboxPosted": "Posted on {{date}}", - "moreSoon": "More to come", "language": { "en": { "name": "English" diff --git a/src/components/languageSwitcher.js b/src/components/languageSwitcher.js index 9bb5673..97ee803 100644 --- a/src/components/languageSwitcher.js +++ b/src/components/languageSwitcher.js @@ -24,7 +24,7 @@ export default function LanguageSwitcher() { {languages.map((lng) => (
  • - {lng} + language.{lng}.name
  • ))} diff --git a/src/components/navigation.js b/src/components/navigation.js index 67f3734..4c437a1 100644 --- a/src/components/navigation.js +++ b/src/components/navigation.js @@ -88,21 +88,21 @@ const Navigation = ({ isHome }) => { to="/about" activeClassName={styles.active} > - about + about.title - projects + project.plural - social + social.title { menu - home + home.title - about + about.title CC-BY 4.0 Kevin Kandlbinder,{" "} - Imprint + Imprint {" "} |{" "} - Data Protection + Data Protection {" "} |{" "} - Disclaimer + Disclaimer {" "} | Language diff --git a/src/pages/about.js b/src/pages/about.js index 9664e0c..3e421ef 100644 --- a/src/pages/about.js +++ b/src/pages/about.js @@ -103,8 +103,8 @@ const AboutPage = (props) => { return ( {

    - mySkills + about.mySkills

    {props.data.allSkillsJson.nodes.map((skill) => { @@ -154,7 +154,7 @@ const AboutPage = (props) => {

    - featuredProjects + about.featuredProjects

    {props.data.allProjectsJson.nodes.map((project) => { @@ -206,14 +206,14 @@ const AboutPage = (props) => { })}
    - seeMore + about.moreProjects
    - donationCatchphrase + about.donationCatchphrase
    diff --git a/src/pages/donate.js b/src/pages/donate.js index 6af0a73..59eecd5 100644 --- a/src/pages/donate.js +++ b/src/pages/donate.js @@ -45,19 +45,22 @@ const DonatePage = (props) => { const { site, file } = props.data; return ( - +

    - donate + donate.title

    - donateDescription + donate.description

    - donateGitHub + donate.gitHub

    @@ -71,12 +74,12 @@ const DonatePage = (props) => { data-size="large" aria-label="Sponsor @Unkn0wnCat on GitHub" > - sponsorGitHub + donate.sponsorGitHub

    - donatePayPal + donate.payPal

    @@ -127,7 +130,9 @@ const DonatePage = (props) => { amount } > - Donate using PayPal + + donate.donatePayPal +
    diff --git a/src/pages/friends.js b/src/pages/friends.js index 903177c..b811475 100644 --- a/src/pages/friends.js +++ b/src/pages/friends.js @@ -50,15 +50,18 @@ const FriendsPage = ({ data }) => { }*/ return ( - +

    - social + friends.title

    - friendsDescription + friends.description

    diff --git a/src/pages/index.js b/src/pages/index.js index 68e65f0..1c66807 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -85,7 +85,7 @@ const IndexPage = (props) => { {
    - homeHello + home.hello Kevin Kandlbinder - homeMe{" "} + home.me{" "} - homeWebDeveloper + home.webDeveloper . @@ -147,7 +147,7 @@ const IndexPage = (props) => { target="_blank" > - homeMyLocation + home.myLocation {
    - {t("explore")} + {t("home.explore")} {" "} - {t("myProjects")} + {t("home.myProjects")}
    - {t("discover")} + {t("home.discover")} {" "} - {t("mySocials")} + {t("home.mySocials")}
    - {t("learn")} + {t("home.learn")} {" "} - {t("moreAboutMe")} + {t("home.moreAboutMe")}
    @@ -211,7 +211,7 @@ const IndexPage = (props) => { >
    - homeImageCredit + home.imageCredit
    diff --git a/src/pages/projects.js b/src/pages/projects.js index 84e1bfe..d7215b7 100644 --- a/src/pages/projects.js +++ b/src/pages/projects.js @@ -47,8 +47,8 @@ const ProjectsPage = ({ data }) => { const meta = useSiteMetadata(); return ( {JSON.stringify({ @@ -76,11 +76,11 @@ const ProjectsPage = ({ data }) => {

    - projects + project.plural

    - projectsDescription + project.description

    diff --git a/src/pages/social.js b/src/pages/social.js index 5a98804..9efa62a 100644 --- a/src/pages/social.js +++ b/src/pages/social.js @@ -36,15 +36,15 @@ export const query = graphql` const SocialPage = ({ data }) => { const { t } = useI18next(); return ( - +

    - social + social.title

    - + socialDescriptionWithLink

    diff --git a/src/templates/project.js b/src/templates/project.js index dd862d5..948e996 100644 --- a/src/templates/project.js +++ b/src/templates/project.js @@ -66,7 +66,7 @@ const ProjectTemplate = ({ data }) => { return ( @@ -84,7 +84,7 @@ const ProjectTemplate = ({ data }) => {

    - project: {projectName} + project.title: {projectName}

    {project.shortDescription}
    @@ -111,7 +111,7 @@ const ProjectTemplate = ({ data }) => { rel="noreferrer" > {" "} - projectViewGitHub + project.viewGitHub
    ) : null} {project.links.website !== null ? ( @@ -121,7 +121,7 @@ const ProjectTemplate = ({ data }) => { rel="noreferrer" > {" "} - projectViewWebsite + project.viewWebsite ) : null}