From 63e297da167713e17fd271958b4109ea44e7075a Mon Sep 17 00:00:00 2001 From: ache Date: Fri, 9 Aug 2024 04:12:37 +0200 Subject: Lint JavaScript --- src/build/i18n.mjs | 94 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 42 deletions(-) (limited to 'src/build/i18n.mjs') diff --git a/src/build/i18n.mjs b/src/build/i18n.mjs index d1cebe6..b348c09 100644 --- a/src/build/i18n.mjs +++ b/src/build/i18n.mjs @@ -1,76 +1,85 @@ - const i18n = { fr: { intro: { - 'description': 'Éternel étudiant en Math-Info.', - 'about': 'Autodidacte passionné,
désormais ingénieur.', - 'about_tags': 'GNU\\Linux, C, C++, Python, Math, autohébergement, décentralisation, P2P, commun, ...
', + description: "Éternel étudiant en Math-Info.", + about: + 'Autodidacte passionné,
désormais ingénieur.', + about_tags: + "GNU\\Linux, C, C++, Python, Math, autohébergement, décentralisation, P2P, commun, ...
", }, title: { - 'main': 'ache: Blog personnel', - 'home': 'L\'accueil', - 'git': 'Dépôt git personnel', - 'mastodon': 'Mon mastodon', + main: "ache: Blog personnel", + home: "L'accueil", + git: "Dépôt git personnel", + mastodon: "Mon mastodon", }, articles: [ - 'framasoft-et-les-mascottes-du-libre.md', - 'les-trains-et-la-publicité.md', - 'formats-images-web.md', - 'bizarreries-du-langage-c.md', - 'retour-sur-laoc-2021-semaine-1.md', - '2FA-discord-sur-pc.md', - 'duckduckgo-google-en-mieux.md', + "framasoft-et-les-mascottes-du-libre.md", + "les-trains-et-la-publicité.md", + "formats-images-web.md", + "bizarreries-du-langage-c.md", + "retour-sur-laoc-2021-semaine-1.md", + "2FA-discord-sur-pc.md", + "duckduckgo-google-en-mieux.md", ], rss: { - 'title': 'ache: Blog personnel', - 'quick_description': 'Programmation, Algorithmique, Système, *pick you poison*', - 'description': `Ceci est un flux RSS à destination des agrégateurs de contenu.
\nEn tant qu'être humain vous cherchez certainement mon site web.` + title: "ache: Blog personnel", + quick_description: + "Programmation, Algorithmique, Système, *pick you poison*", + description: `Ceci est un flux RSS à destination des agrégateurs de contenu.
\nEn tant qu'être humain vous cherchez certainement mon site web.`, }, toc_keyword: "Sommaire", tag_desc: "Liste des articles ayant le tag", - index_desc: "Blog personnel à propos de programmation, logiciel libre et autohébergement. Essayons de rendre le monde meilleur.", + index_desc: + "Blog personnel à propos de programmation, logiciel libre et autohébergement. Essayons de rendre le monde meilleur.", like_title: "Si vous avez aimez cet article cliquez sur le cœur !", - like_text: "Vous pouvez même envoyez plusieurs cœurs !
Le délais d'attente entre deux cœurs double à chaque fois.", + like_text: + 'Vous pouvez même envoyez plusieurs cœurs !
Le délais d\'attente entre deux cœurs double à chaque fois.', }, en: { intro: { - 'description': 'Eternal student in computer science.', - 'quick_description': 'Programmation, Algorithmique, Système, *pick you poison*', - 'about': 'Self-taught developper,
now engineer.', - 'about_tags': 'GNU\\Linux, C, C++, Python, Math, self-hosted, dececntralisation, P2P, ...
', + description: "Eternal student in computer science.", + quick_description: + "Programmation, Algorithmique, Système, *pick you poison*", + about: + 'Self-taught developper,
now engineer.', + about_tags: + "GNU\\Linux, C, C++, Python, Math, self-hosted, dececntralisation, P2P, ...
", }, title: { - 'main': 'ache: Personal blog', - 'home': 'Home', - 'git': 'Personnel git repository', - 'mastodon': 'Mastodon account', + main: "ache: Personal blog", + home: "Home", + git: "Personnel git repository", + mastodon: "Mastodon account", }, articles: [ - 'rail-and-advertising.md', - 'web-image-formats.md', - 'c-language-quirks.md', + "rail-and-advertising.md", + "web-image-formats.md", + "c-language-quirks.md", ], rss: { - 'title': 'ache: Personal blog', - 'description': `This is a RSS feed for content agreagator.
\nAs a human being, you are certainly looking for my website.` + title: "ache: Personal blog", + description: `This is a RSS feed for content agreagator.
\nAs a human being, you are certainly looking for my website.`, }, toc_keyword: "Table of contents", tag_desc: "List of articles with the tag", - index_desc: "Personal blog about programming, free software and self-hosting. Let's try to make the world a better place.", + index_desc: + "Personal blog about programming, free software and self-hosting. Let's try to make the world a better place.", like_title: "If you liked this article click on the heart!", - like_text: "You can even send multiple hearts!
The waiting time between two hearts doubles each time.", - } -} + like_text: + 'You can even send multiple hearts!
The waiting time between two hearts doubles each time.', + }, +}; const lang_desc = { fr: "Version Française", en: "English version", -} +}; export function addDescription(alt_lang) { if (alt_lang) { - alt_lang.forEach(e => { - e.description = lang_desc[e.lang] + alt_lang.forEach((e) => { + e.description = lang_desc[e.lang]; }); } @@ -78,8 +87,9 @@ export function addDescription(alt_lang) { } export function getTocHeading() { - return Object.entries(i18n).map(([_, v]) => v.toc_keyword).join('|'); + return Object.entries(i18n) + .map(([_, v]) => v.toc_keyword) + .join("|"); } - export default i18n; -- cgit v1.2.3-70-g09d2