From 032a89f051a86a9cb3eee23363eb76eddb26fcc4 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Wed, 11 Sep 2024 05:58:16 -0600 Subject: [PATCH 1/4] spelling fix --- src/components/Markdown/Markdown.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/Markdown/Markdown.tsx b/src/components/Markdown/Markdown.tsx index 7cb7c1f4d4..52ab065655 100644 --- a/src/components/Markdown/Markdown.tsx +++ b/src/components/Markdown/Markdown.tsx @@ -16,7 +16,7 @@ */ import * as React from "react"; -import markdownit from "markdown-it"; // cspell:disable-line +import markdown_it from "markdown-it"; import sanitizeHtml from "sanitize-html"; //import moment from "moment"; import { profanity_filter } from "@/lib/profanity_filter"; @@ -29,8 +29,7 @@ interface MarkdownProps { interface MarkdownState {} -// cspell:disable-next-line -const md = markdownit({ +const md = markdown_it({ html: true, linkify: true, typographer: true, From 78cda656c9710afed760d3e2cdbeffc5708f4202 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Wed, 11 Sep 2024 06:02:08 -0600 Subject: [PATCH 2/4] Change i18n scripts to use ES modules as is now required --- i18n/audit-translations.js | 12 +++++++----- i18n/create-unified-pot.js | 8 ++++---- i18n/jsonify-po-files.js | 4 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/i18n/audit-translations.js b/i18n/audit-translations.js index 5e3340f2da..382fdbd776 100644 --- a/i18n/audit-translations.js +++ b/i18n/audit-translations.js @@ -2,11 +2,13 @@ // cspell: words autotranslations conv "Türkçe" "hwat" "עִבְרִית" autotranslated autotranslation autotranslate -const deepl = require("deepl-node"); -const fs = require("fs"); -const PO = require("pofile"); -const GoogleTranslate = require("@google-cloud/translate").v3.TranslationServiceClient; -const OpenAI = require("openai"); +import fs from "fs"; +import PO from "pofile"; +import deepl from "deepl-node"; +import GoogleTranslateModule from "@google-cloud/translate"; +import OpenAI from "openai"; + +const GoogleTranslate = GoogleTranslateModule.v3.TranslationServiceClient; let keys = fs.existsSync("./keys.json") ? JSON.parse(fs.readFileSync("./keys.json")) : null; diff --git a/i18n/create-unified-pot.js b/i18n/create-unified-pot.js index 662f3c3089..d4ab535b89 100644 --- a/i18n/create-unified-pot.js +++ b/i18n/create-unified-pot.js @@ -10,10 +10,10 @@ performs the automatic translation of strings. "use strict"; -const fs = require("fs"); -const XGettext = require("xgettext-js"); -const SourceMapConsumer = require("source-map").SourceMapConsumer; -const PO = require("pofile"); +import fs from "fs"; +import XGettext from "xgettext-js"; +import { SourceMapConsumer } from "source-map"; +import PO from "pofile"; const MODE = process.argv[2] || "full"; diff --git a/i18n/jsonify-po-files.js b/i18n/jsonify-po-files.js index e61929373c..0775108af1 100644 --- a/i18n/jsonify-po-files.js +++ b/i18n/jsonify-po-files.js @@ -2,8 +2,8 @@ // cspell: words autotranslations conv -const fs = require("fs"); -const PO = require("pofile"); +import fs from "fs"; +import PO from "pofile"; async function main() { const countries = JSON.parse(await fs.promises.readFile("./build/countries.json", "utf-8")); From 5ba6ebf5268f9591ebf7c507fb47e63ddd00b1f8 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Wed, 11 Sep 2024 06:14:07 -0600 Subject: [PATCH 3/4] Fix removed PNG files --- src/views/Game/tree-lastnode.png | Bin 0 -> 144 bytes src/views/Game/tree-node.png | Bin 0 -> 145 bytes src/views/Game/tree-vline.png | Bin 0 -> 123 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/src/views/Game/tree-lastnode.png b/src/views/Game/tree-lastnode.png index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f8809f80226b5b355de607adab481e0d2a98833f 100644 GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^96&6>$P6UAuD;U%QfvV}A+8L}3>_UEvNtA_0Yw-~ zg8YIR9G=}s19CVEJR*x37`TN&n2}-D90{Nxdx@v7EBiGLHW3abX}iYrKp_E77sn8e j>&Y1j4(gTe~DWM4fSK1-d literal 0 HcmV?d00001 diff --git a/src/views/Game/tree-node.png b/src/views/Game/tree-node.png index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..29f6c446045ada93d886de10a85dcbf7c686cc48 100644 GIT binary patch literal 145 zcmeAS@N?(olHy`uVBq!ia0vp^96&6>$P6UAuD;U%QfvV}A+8L}3>_UEvNtA_0Yw-~ zg8YIR9G=}s19CVEJR*x37`TN&n2}-D90{Nxdx@v7EBiGLHW3ch)+mu2ppc-ai(?4K k_2i5MhxY%H21lhBE=}fY@LT011C(U&boFyt=akR{0Bd3)YXATM literal 0 HcmV?d00001 diff --git a/src/views/Game/tree-vline.png b/src/views/Game/tree-vline.png index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4c9bc6d749a5c5d6b34202e17dd06f1d790d024c 100644 GIT binary patch literal 123 zcmeAS@N?(olHy`uVBq!ia0vp^j6lrA$P6U?WtMRQDdqs55Z8{5j)>H}%|I?^fk$L9 z0|U1(2s1Lwnj--eWH0gbb!ETC!6qy$$>y{53s8vL)5S4_<9c$!0Tu=Z5eCMmZ5zCR O!VI3SelF{r5}E))DH%rq literal 0 HcmV?d00001 From 6a6ade82822b250e539e0e915bf66cac8e608c56 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Wed, 11 Sep 2024 06:18:25 -0600 Subject: [PATCH 4/4] Re-un-debug line and translation fix --- src/views/Play/Play.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Play/Play.tsx b/src/views/Play/Play.tsx index 043cb03f44..8913e9198f 100644 --- a/src/views/Play/Play.tsx +++ b/src/views/Play/Play.tsx @@ -225,7 +225,7 @@ export class Play extends React.Component<{}, PlayState> { C.handicap_text = C.handicap; } - console.log(C); + // console.log(C); if (C.komi === null) { C.komi_text = _("Auto"); @@ -763,7 +763,7 @@ export class Play extends React.Component<{}, PlayState> { return (
-
{_("Automatch Finder")}
+
{_("Automatch finder")}