From 738a21d1d55bc9855be2066c7e21fafa1e0fb144 Mon Sep 17 00:00:00 2001 From: joostdecock Date: Sun, 2 Jul 2023 11:48:42 +0200 Subject: [PATCH] feat: Added i18n tests for designs --- config/templates/design.test.mjs.mustache | 6 +- designs/aaron/tests/shared.test.mjs | 6 +- designs/albert/tests/shared.test.mjs | 6 +- designs/bee/tests/shared.test.mjs | 6 +- designs/bella/tests/shared.test.mjs | 6 +- designs/benjamin/tests/shared.test.mjs | 6 +- designs/bent/tests/shared.test.mjs | 6 +- designs/bob/tests/shared.test.mjs | 6 +- designs/breanna/tests/shared.test.mjs | 6 +- designs/brian/tests/shared.test.mjs | 6 +- designs/bruce/tests/shared.test.mjs | 6 +- designs/carlita/tests/shared.test.mjs | 6 +- designs/carlton/tests/shared.test.mjs | 6 +- designs/cathrin/tests/shared.test.mjs | 6 +- designs/charlie/tests/shared.test.mjs | 6 +- designs/cornelius/tests/shared.test.mjs | 6 +- designs/diana/tests/shared.test.mjs | 6 +- designs/examples/tests/shared.test.mjs | 6 +- designs/florence/tests/shared.test.mjs | 6 +- designs/florent/tests/shared.test.mjs | 6 +- designs/hi/tests/shared.test.mjs | 6 +- designs/holmes/tests/shared.test.mjs | 6 +- designs/hortensia/tests/shared.test.mjs | 6 +- designs/huey/tests/shared.test.mjs | 6 +- designs/hugo/tests/shared.test.mjs | 6 +- designs/jaeger/tests/shared.test.mjs | 6 +- designs/legend/tests/shared.test.mjs | 6 +- designs/lucy/tests/shared.test.mjs | 6 +- designs/lunetius/tests/shared.test.mjs | 6 +- designs/magde/tests/shared.test.mjs | 6 +- designs/noble/tests/shared.test.mjs | 6 +- designs/octoplushy/tests/shared.test.mjs | 6 +- designs/paco/tests/shared.test.mjs | 6 +- designs/penelope/tests/shared.test.mjs | 6 +- designs/plugintest/tests/shared.test.mjs | 6 +- designs/rendertest/tests/shared.test.mjs | 6 +- designs/sandy/tests/shared.test.mjs | 6 +- designs/shin/tests/shared.test.mjs | 6 +- designs/simon/tests/shared.test.mjs | 6 +- designs/simone/tests/shared.test.mjs | 6 +- designs/sven/tests/shared.test.mjs | 6 +- designs/tamiko/tests/shared.test.mjs | 6 +- designs/teagan/tests/shared.test.mjs | 6 +- designs/tiberius/tests/shared.test.mjs | 6 +- designs/titan/tests/shared.test.mjs | 6 +- designs/trayvon/tests/shared.test.mjs | 6 +- designs/tutorial/tests/shared.test.mjs | 6 +- designs/unice/tests/shared.test.mjs | 6 +- designs/ursula/tests/shared.test.mjs | 6 +- designs/wahid/tests/shared.test.mjs | 6 +- designs/walburga/tests/shared.test.mjs | 6 +- designs/waralee/tests/shared.test.mjs | 6 +- designs/yuri/tests/shared.test.mjs | 6 +- tests/designs/config.mjs | 358 +++++++++++----------- tests/designs/i18n.mjs | 74 +++++ 55 files changed, 519 insertions(+), 231 deletions(-) create mode 100644 tests/designs/i18n.mjs diff --git a/config/templates/design.test.mjs.mustache b/config/templates/design.test.mjs.mustache index 36a5fdf0d47..7eb4a2e7f16 100644 --- a/config/templates/design.test.mjs.mustache +++ b/config/templates/design.test.mjs.mustache @@ -4,16 +4,20 @@ // Dollar signs are allowed in EcmaScript identifier names, // which is helpful when running unrendered Mustache templates through eslint. //}}{{=$$ $$=}} -import { $$Name$$ } from '../src/index.mjs' +import { $$Name$$, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig($$Name$$) +// Test translation +testPatternI18n($$Name$$, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting($$Name$$, false) diff --git a/designs/aaron/tests/shared.test.mjs b/designs/aaron/tests/shared.test.mjs index fb5a5b54881..c01c7865cf0 100644 --- a/designs/aaron/tests/shared.test.mjs +++ b/designs/aaron/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Aaron } from '../src/index.mjs' +import { Aaron, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Aaron) +// Test translation +testPatternI18n(Aaron, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Aaron, false) diff --git a/designs/albert/tests/shared.test.mjs b/designs/albert/tests/shared.test.mjs index bb9b9a3dc74..13f70c52092 100644 --- a/designs/albert/tests/shared.test.mjs +++ b/designs/albert/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Albert } from '../src/index.mjs' +import { Albert, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Albert) +// Test translation +testPatternI18n(Albert, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Albert, false) diff --git a/designs/bee/tests/shared.test.mjs b/designs/bee/tests/shared.test.mjs index ac47db8670b..a6377910d90 100644 --- a/designs/bee/tests/shared.test.mjs +++ b/designs/bee/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Bee } from '../src/index.mjs' +import { Bee, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Bee) +// Test translation +testPatternI18n(Bee, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Bee, false) diff --git a/designs/bella/tests/shared.test.mjs b/designs/bella/tests/shared.test.mjs index baffc2c367f..c681ef87c62 100644 --- a/designs/bella/tests/shared.test.mjs +++ b/designs/bella/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Bella } from '../src/index.mjs' +import { Bella, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Bella) +// Test translation +testPatternI18n(Bella, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Bella, false) diff --git a/designs/benjamin/tests/shared.test.mjs b/designs/benjamin/tests/shared.test.mjs index 15385d95dc8..722b2328af1 100644 --- a/designs/benjamin/tests/shared.test.mjs +++ b/designs/benjamin/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Benjamin } from '../src/index.mjs' +import { Benjamin, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Benjamin) +// Test translation +testPatternI18n(Benjamin, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Benjamin, false) diff --git a/designs/bent/tests/shared.test.mjs b/designs/bent/tests/shared.test.mjs index 4eb37b87695..90bfc253fa3 100644 --- a/designs/bent/tests/shared.test.mjs +++ b/designs/bent/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Bent } from '../src/index.mjs' +import { Bent, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Bent) +// Test translation +testPatternI18n(Bent, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Bent, false) diff --git a/designs/bob/tests/shared.test.mjs b/designs/bob/tests/shared.test.mjs index 3c001981858..e96fbb1a67d 100644 --- a/designs/bob/tests/shared.test.mjs +++ b/designs/bob/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Bob } from '../src/index.mjs' +import { Bob, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Bob) +// Test translation +testPatternI18n(Bob, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Bob, false) diff --git a/designs/breanna/tests/shared.test.mjs b/designs/breanna/tests/shared.test.mjs index 39d1dba8929..c15b4178525 100644 --- a/designs/breanna/tests/shared.test.mjs +++ b/designs/breanna/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Breanna } from '../src/index.mjs' +import { Breanna, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Breanna) +// Test translation +testPatternI18n(Breanna, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Breanna, false) diff --git a/designs/brian/tests/shared.test.mjs b/designs/brian/tests/shared.test.mjs index 45d7889c501..38c4b3188d5 100644 --- a/designs/brian/tests/shared.test.mjs +++ b/designs/brian/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Brian } from '../src/index.mjs' +import { Brian, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Brian) +// Test translation +testPatternI18n(Brian, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Brian, false) diff --git a/designs/bruce/tests/shared.test.mjs b/designs/bruce/tests/shared.test.mjs index b708e968f65..34dad324136 100644 --- a/designs/bruce/tests/shared.test.mjs +++ b/designs/bruce/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Bruce } from '../src/index.mjs' +import { Bruce, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Bruce) +// Test translation +testPatternI18n(Bruce, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Bruce, false) diff --git a/designs/carlita/tests/shared.test.mjs b/designs/carlita/tests/shared.test.mjs index 6e43510bd47..8235ca28566 100644 --- a/designs/carlita/tests/shared.test.mjs +++ b/designs/carlita/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Carlita } from '../src/index.mjs' +import { Carlita, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Carlita) +// Test translation +testPatternI18n(Carlita, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Carlita, false) diff --git a/designs/carlton/tests/shared.test.mjs b/designs/carlton/tests/shared.test.mjs index a741d2d7b12..8ea46fede64 100644 --- a/designs/carlton/tests/shared.test.mjs +++ b/designs/carlton/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Carlton } from '../src/index.mjs' +import { Carlton, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Carlton) +// Test translation +testPatternI18n(Carlton, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Carlton, false) diff --git a/designs/cathrin/tests/shared.test.mjs b/designs/cathrin/tests/shared.test.mjs index f3fd0224e6d..747985d256b 100644 --- a/designs/cathrin/tests/shared.test.mjs +++ b/designs/cathrin/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Cathrin } from '../src/index.mjs' +import { Cathrin, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Cathrin) +// Test translation +testPatternI18n(Cathrin, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Cathrin, false) diff --git a/designs/charlie/tests/shared.test.mjs b/designs/charlie/tests/shared.test.mjs index f33071f8dd5..193285bdfc5 100644 --- a/designs/charlie/tests/shared.test.mjs +++ b/designs/charlie/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Charlie } from '../src/index.mjs' +import { Charlie, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Charlie) +// Test translation +testPatternI18n(Charlie, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Charlie, false) diff --git a/designs/cornelius/tests/shared.test.mjs b/designs/cornelius/tests/shared.test.mjs index 79d29207e52..55e384e0ae5 100644 --- a/designs/cornelius/tests/shared.test.mjs +++ b/designs/cornelius/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Cornelius } from '../src/index.mjs' +import { Cornelius, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Cornelius) +// Test translation +testPatternI18n(Cornelius, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Cornelius, false) diff --git a/designs/diana/tests/shared.test.mjs b/designs/diana/tests/shared.test.mjs index be0d598d5ea..552b2d7dc32 100644 --- a/designs/diana/tests/shared.test.mjs +++ b/designs/diana/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Diana } from '../src/index.mjs' +import { Diana, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Diana) +// Test translation +testPatternI18n(Diana, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Diana, false) diff --git a/designs/examples/tests/shared.test.mjs b/designs/examples/tests/shared.test.mjs index e95a9ccb964..53517eca7cb 100644 --- a/designs/examples/tests/shared.test.mjs +++ b/designs/examples/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Examples } from '../src/index.mjs' +import { Examples, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Examples) +// Test translation +testPatternI18n(Examples, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Examples, false) diff --git a/designs/florence/tests/shared.test.mjs b/designs/florence/tests/shared.test.mjs index c64c6d7241d..83b8856f783 100644 --- a/designs/florence/tests/shared.test.mjs +++ b/designs/florence/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Florence } from '../src/index.mjs' +import { Florence, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Florence) +// Test translation +testPatternI18n(Florence, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Florence, false) diff --git a/designs/florent/tests/shared.test.mjs b/designs/florent/tests/shared.test.mjs index 4f37b6b1d02..549f1aab0b0 100644 --- a/designs/florent/tests/shared.test.mjs +++ b/designs/florent/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Florent } from '../src/index.mjs' +import { Florent, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Florent) +// Test translation +testPatternI18n(Florent, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Florent, false) diff --git a/designs/hi/tests/shared.test.mjs b/designs/hi/tests/shared.test.mjs index e38c46caf53..60cc9afc985 100644 --- a/designs/hi/tests/shared.test.mjs +++ b/designs/hi/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Hi } from '../src/index.mjs' +import { Hi, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Hi) +// Test translation +testPatternI18n(Hi, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Hi, false) diff --git a/designs/holmes/tests/shared.test.mjs b/designs/holmes/tests/shared.test.mjs index d11052169c4..3ba6f3cc3a8 100644 --- a/designs/holmes/tests/shared.test.mjs +++ b/designs/holmes/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Holmes } from '../src/index.mjs' +import { Holmes, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Holmes) +// Test translation +testPatternI18n(Holmes, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Holmes, false) diff --git a/designs/hortensia/tests/shared.test.mjs b/designs/hortensia/tests/shared.test.mjs index 63ee2f60713..cc20e4c843d 100644 --- a/designs/hortensia/tests/shared.test.mjs +++ b/designs/hortensia/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Hortensia } from '../src/index.mjs' +import { Hortensia, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Hortensia) +// Test translation +testPatternI18n(Hortensia, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Hortensia, false) diff --git a/designs/huey/tests/shared.test.mjs b/designs/huey/tests/shared.test.mjs index 0b2db6c05c9..7704b53efbe 100644 --- a/designs/huey/tests/shared.test.mjs +++ b/designs/huey/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Huey } from '../src/index.mjs' +import { Huey, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Huey) +// Test translation +testPatternI18n(Huey, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Huey, false) diff --git a/designs/hugo/tests/shared.test.mjs b/designs/hugo/tests/shared.test.mjs index a0b4dd6de3c..82efb50a139 100644 --- a/designs/hugo/tests/shared.test.mjs +++ b/designs/hugo/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Hugo } from '../src/index.mjs' +import { Hugo, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Hugo) +// Test translation +testPatternI18n(Hugo, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Hugo, false) diff --git a/designs/jaeger/tests/shared.test.mjs b/designs/jaeger/tests/shared.test.mjs index 1b2f47a0dd9..b9b99fc527b 100644 --- a/designs/jaeger/tests/shared.test.mjs +++ b/designs/jaeger/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Jaeger } from '../src/index.mjs' +import { Jaeger, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Jaeger) +// Test translation +testPatternI18n(Jaeger, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Jaeger, false) diff --git a/designs/legend/tests/shared.test.mjs b/designs/legend/tests/shared.test.mjs index 19d28670cd7..722c092e1f3 100644 --- a/designs/legend/tests/shared.test.mjs +++ b/designs/legend/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Legend } from '../src/index.mjs' +import { Legend, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Legend) +// Test translation +testPatternI18n(Legend, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Legend, false) diff --git a/designs/lucy/tests/shared.test.mjs b/designs/lucy/tests/shared.test.mjs index 3bc23c85fe7..c9c1ad22f24 100644 --- a/designs/lucy/tests/shared.test.mjs +++ b/designs/lucy/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Lucy } from '../src/index.mjs' +import { Lucy, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Lucy) +// Test translation +testPatternI18n(Lucy, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Lucy, false) diff --git a/designs/lunetius/tests/shared.test.mjs b/designs/lunetius/tests/shared.test.mjs index 6fb9f7ce3fe..1a935ff18b3 100644 --- a/designs/lunetius/tests/shared.test.mjs +++ b/designs/lunetius/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Lunetius } from '../src/index.mjs' +import { Lunetius, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Lunetius) +// Test translation +testPatternI18n(Lunetius, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Lunetius, false) diff --git a/designs/magde/tests/shared.test.mjs b/designs/magde/tests/shared.test.mjs index 1d7256bd762..e2040472aec 100644 --- a/designs/magde/tests/shared.test.mjs +++ b/designs/magde/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Magde } from '../src/index.mjs' +import { Magde, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Magde) +// Test translation +testPatternI18n(Magde, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Magde, false) diff --git a/designs/noble/tests/shared.test.mjs b/designs/noble/tests/shared.test.mjs index 6d3549ef24e..06bea70b951 100644 --- a/designs/noble/tests/shared.test.mjs +++ b/designs/noble/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Noble } from '../src/index.mjs' +import { Noble, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Noble) +// Test translation +testPatternI18n(Noble, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Noble, false) diff --git a/designs/octoplushy/tests/shared.test.mjs b/designs/octoplushy/tests/shared.test.mjs index 86ebb66d586..1e898c2cbf9 100644 --- a/designs/octoplushy/tests/shared.test.mjs +++ b/designs/octoplushy/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Octoplushy } from '../src/index.mjs' +import { Octoplushy, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Octoplushy) +// Test translation +testPatternI18n(Octoplushy, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Octoplushy, false) diff --git a/designs/paco/tests/shared.test.mjs b/designs/paco/tests/shared.test.mjs index 44fe4b62f51..5d8139e78d3 100644 --- a/designs/paco/tests/shared.test.mjs +++ b/designs/paco/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Paco } from '../src/index.mjs' +import { Paco, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Paco) +// Test translation +testPatternI18n(Paco, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Paco, false) diff --git a/designs/penelope/tests/shared.test.mjs b/designs/penelope/tests/shared.test.mjs index 61e1e08537f..11f624954d7 100644 --- a/designs/penelope/tests/shared.test.mjs +++ b/designs/penelope/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Penelope } from '../src/index.mjs' +import { Penelope, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Penelope) +// Test translation +testPatternI18n(Penelope, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Penelope, false) diff --git a/designs/plugintest/tests/shared.test.mjs b/designs/plugintest/tests/shared.test.mjs index 8c213872ff9..9270466593d 100644 --- a/designs/plugintest/tests/shared.test.mjs +++ b/designs/plugintest/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Plugintest } from '../src/index.mjs' +import { Plugintest, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Plugintest) +// Test translation +testPatternI18n(Plugintest, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Plugintest, false) diff --git a/designs/rendertest/tests/shared.test.mjs b/designs/rendertest/tests/shared.test.mjs index 2bbe85c2c40..40441170cd3 100644 --- a/designs/rendertest/tests/shared.test.mjs +++ b/designs/rendertest/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Rendertest } from '../src/index.mjs' +import { Rendertest, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Rendertest) +// Test translation +testPatternI18n(Rendertest, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Rendertest, false) diff --git a/designs/sandy/tests/shared.test.mjs b/designs/sandy/tests/shared.test.mjs index 314791cc3cc..b120cb3988d 100644 --- a/designs/sandy/tests/shared.test.mjs +++ b/designs/sandy/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Sandy } from '../src/index.mjs' +import { Sandy, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Sandy) +// Test translation +testPatternI18n(Sandy, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Sandy, false) diff --git a/designs/shin/tests/shared.test.mjs b/designs/shin/tests/shared.test.mjs index 7c30c8a4b41..bc4f0c8bea0 100644 --- a/designs/shin/tests/shared.test.mjs +++ b/designs/shin/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Shin } from '../src/index.mjs' +import { Shin, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Shin) +// Test translation +testPatternI18n(Shin, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Shin, false) diff --git a/designs/simon/tests/shared.test.mjs b/designs/simon/tests/shared.test.mjs index 137803d3758..2cd189fc185 100644 --- a/designs/simon/tests/shared.test.mjs +++ b/designs/simon/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Simon } from '../src/index.mjs' +import { Simon, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Simon) +// Test translation +testPatternI18n(Simon, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Simon, false) diff --git a/designs/simone/tests/shared.test.mjs b/designs/simone/tests/shared.test.mjs index b7a1f1a16e4..78ea338763c 100644 --- a/designs/simone/tests/shared.test.mjs +++ b/designs/simone/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Simone } from '../src/index.mjs' +import { Simone, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Simone) +// Test translation +testPatternI18n(Simone, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Simone, false) diff --git a/designs/sven/tests/shared.test.mjs b/designs/sven/tests/shared.test.mjs index c2c82fe36ec..ca6d885d50b 100644 --- a/designs/sven/tests/shared.test.mjs +++ b/designs/sven/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Sven } from '../src/index.mjs' +import { Sven, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Sven) +// Test translation +testPatternI18n(Sven, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Sven, false) diff --git a/designs/tamiko/tests/shared.test.mjs b/designs/tamiko/tests/shared.test.mjs index fa498547d85..82ed6070656 100644 --- a/designs/tamiko/tests/shared.test.mjs +++ b/designs/tamiko/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Tamiko } from '../src/index.mjs' +import { Tamiko, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Tamiko) +// Test translation +testPatternI18n(Tamiko, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Tamiko, false) diff --git a/designs/teagan/tests/shared.test.mjs b/designs/teagan/tests/shared.test.mjs index ec1b6498117..483740861e7 100644 --- a/designs/teagan/tests/shared.test.mjs +++ b/designs/teagan/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Teagan } from '../src/index.mjs' +import { Teagan, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Teagan) +// Test translation +testPatternI18n(Teagan, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Teagan, false) diff --git a/designs/tiberius/tests/shared.test.mjs b/designs/tiberius/tests/shared.test.mjs index 5e0b794bc2c..2c3d884f18b 100644 --- a/designs/tiberius/tests/shared.test.mjs +++ b/designs/tiberius/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Tiberius } from '../src/index.mjs' +import { Tiberius, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Tiberius) +// Test translation +testPatternI18n(Tiberius, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Tiberius, false) diff --git a/designs/titan/tests/shared.test.mjs b/designs/titan/tests/shared.test.mjs index ac015f8f083..777dc95e32f 100644 --- a/designs/titan/tests/shared.test.mjs +++ b/designs/titan/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Titan } from '../src/index.mjs' +import { Titan, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Titan) +// Test translation +testPatternI18n(Titan, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Titan, false) diff --git a/designs/trayvon/tests/shared.test.mjs b/designs/trayvon/tests/shared.test.mjs index 1876b7ddeed..f59e6301dad 100644 --- a/designs/trayvon/tests/shared.test.mjs +++ b/designs/trayvon/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Trayvon } from '../src/index.mjs' +import { Trayvon, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Trayvon) +// Test translation +testPatternI18n(Trayvon, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Trayvon, false) diff --git a/designs/tutorial/tests/shared.test.mjs b/designs/tutorial/tests/shared.test.mjs index 9bb20c88b8a..9a484bf8612 100644 --- a/designs/tutorial/tests/shared.test.mjs +++ b/designs/tutorial/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Tutorial } from '../src/index.mjs' +import { Tutorial, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Tutorial) +// Test translation +testPatternI18n(Tutorial, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Tutorial, false) diff --git a/designs/unice/tests/shared.test.mjs b/designs/unice/tests/shared.test.mjs index 21ec4354088..9d4667b0943 100644 --- a/designs/unice/tests/shared.test.mjs +++ b/designs/unice/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Unice } from '../src/index.mjs' +import { Unice, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Unice) +// Test translation +testPatternI18n(Unice, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Unice, false) diff --git a/designs/ursula/tests/shared.test.mjs b/designs/ursula/tests/shared.test.mjs index 16b4068bb6d..d8bec1a7cbe 100644 --- a/designs/ursula/tests/shared.test.mjs +++ b/designs/ursula/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Ursula } from '../src/index.mjs' +import { Ursula, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Ursula) +// Test translation +testPatternI18n(Ursula, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Ursula, false) diff --git a/designs/wahid/tests/shared.test.mjs b/designs/wahid/tests/shared.test.mjs index c7c6452fea5..7762191ccae 100644 --- a/designs/wahid/tests/shared.test.mjs +++ b/designs/wahid/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Wahid } from '../src/index.mjs' +import { Wahid, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Wahid) +// Test translation +testPatternI18n(Wahid, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Wahid, false) diff --git a/designs/walburga/tests/shared.test.mjs b/designs/walburga/tests/shared.test.mjs index 172fa1cb056..4473937c867 100644 --- a/designs/walburga/tests/shared.test.mjs +++ b/designs/walburga/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Walburga } from '../src/index.mjs' +import { Walburga, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Walburga) +// Test translation +testPatternI18n(Walburga, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Walburga, false) diff --git a/designs/waralee/tests/shared.test.mjs b/designs/waralee/tests/shared.test.mjs index d83ded6e83b..85ec2d1534b 100644 --- a/designs/waralee/tests/shared.test.mjs +++ b/designs/waralee/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Waralee } from '../src/index.mjs' +import { Waralee, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Waralee) +// Test translation +testPatternI18n(Waralee, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Waralee, false) diff --git a/designs/yuri/tests/shared.test.mjs b/designs/yuri/tests/shared.test.mjs index ba416f8ce50..4edf8bf2ef1 100644 --- a/designs/yuri/tests/shared.test.mjs +++ b/designs/yuri/tests/shared.test.mjs @@ -1,14 +1,18 @@ // This file is auto-generated | Any changes you make will be overwritten. -import { Yuri } from '../src/index.mjs' +import { Yuri, i18n } from '../src/index.mjs' // Shared tests import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' import { testPatternSampling } from '../../../tests/designs/sampling.mjs' // Test config testPatternConfig(Yuri) +// Test translation +testPatternI18n(Yuri, i18n) + // Test drafting - Change the second parameter to `true` to log errors testPatternDrafting(Yuri, false) diff --git a/tests/designs/config.mjs b/tests/designs/config.mjs index 84dab3aa393..63e089fa4bd 100644 --- a/tests/designs/config.mjs +++ b/tests/designs/config.mjs @@ -20,192 +20,194 @@ export const testPatternConfig = (Pattern) => { //const pattern = new Pattern() const designConfig = Pattern.designConfig const patternConfig = Pattern.patternConfig - it('Pattern data:', () => true) - it(` - 'name' should be set and be a non-empty string`, () => { - expect(typeof designConfig.data.name).to.equal('string') - expect(designConfig.data.name.length > 1).to.be.true - }) - // - it(` - 'version' should be set and be a non-empty string`, () => { - expect(typeof designConfig.data.version).to.equal('string') - expect(designConfig.data.version.length > 1).to.be.true - }) - it(` - 'version' should be a proper semantic version`, () => { - const chunks = designConfig.data.version.split('.') - if (chunks.length > 3) { - expect(designConfig.data.version.split('.').length).to.equal(4) - expect(chunks[2]).to.contain.oneOf(['-alpha', '-beta', '-rc']) - } else expect(designConfig.version.split('.').length).to.equal(3) - }) + describe('Pattern configuration:', function () { + it('Pattern data:', () => true) + it(` - 'name' should be set and be a non-empty string`, () => { + expect(typeof designConfig.data.name).to.equal('string') + expect(designConfig.data.name.length > 1).to.be.true + }) + // + it(` - 'version' should be set and be a non-empty string`, () => { + expect(typeof designConfig.data.version).to.equal('string') + expect(designConfig.data.version.length > 1).to.be.true + }) + it(` - 'version' should be a proper semantic version`, () => { + const chunks = designConfig.data.version.split('.') + if (chunks.length > 3) { + expect(designConfig.data.version.split('.').length).to.equal(4) + expect(chunks[2]).to.contain.oneOf(['-alpha', '-beta', '-rc']) + } else expect(designConfig.version.split('.').length).to.equal(3) + }) - it('Monorepo data:', () => true) - // Store these for re-use - const name = getShortName(designConfig.data.name) - it(` - 'name' should be resolvable to a short name`, () => { - expect(typeof name).to.equal('string') - expect(name.length > 1).to.be.true - }) - const meta = designs[name] - it(` - 'description' should be set and be a string of reasonable length`, () => { - expect(typeof meta.description).to.equal('string') - expect(meta.description.length > 15).to.be.true - expect(meta.description.length < 280).to.be.true - }) - // Config tests for non-utility patterns only - if (typeof designs[name].tags !== 'undefined') { - it(` - 'design' should be set and be a string of reasonable length`, () => { - const people = Array.isArray(meta.design) ? meta.design : [meta.design] - for (const person of people) { - expect(typeof person).to.equal('string') - expect(person.length > 2).to.be.true - expect(person.length < 80).to.be.true - } + it('Monorepo data:', () => true) + // Store these for re-use + const name = getShortName(designConfig.data.name) + it(` - 'name' should be resolvable to a short name`, () => { + expect(typeof name).to.equal('string') + expect(name.length > 1).to.be.true }) - it(` - 'code' should be set and be a string of reasonable length`, () => { - const people = Array.isArray(meta.code) ? meta.code : [meta.code] - for (const person of people) { - expect(typeof person).to.equal('string') - expect(person.length > 2).to.be.true - expect(person.length < 80).to.be.true - } + const meta = designs[name] + it(` - 'description' should be set and be a string of reasonable length`, () => { + expect(typeof meta.description).to.equal('string') + expect(meta.description.length > 15).to.be.true + expect(meta.description.length < 280).to.be.true }) - it(` - 'dfficulty' should be set and be a [1-5] number`, () => { - expect(typeof meta.difficulty).to.equal('number') - expect([1, 2, 3, 4, 5].indexOf(meta.difficulty) === -1).to.be.false - }) - } - - if (!isUtilityDesign(name)) { - // Ensure required measurements are known measurements - it('Required measurements:', () => true) - for (const measurement of patternConfig.measurements || []) { - it(` - '${measurement}' should be a known measurement`, () => { - expect(measurements.indexOf(measurement)).to.not.equal(-1) + // Config tests for non-utility patterns only + if (typeof designs[name].tags !== 'undefined') { + it(` - 'design' should be set and be a string of reasonable length`, () => { + const people = Array.isArray(meta.design) ? meta.design : [meta.design] + for (const person of people) { + expect(typeof person).to.equal('string') + expect(person.length > 2).to.be.true + expect(person.length < 80).to.be.true + } + }) + it(` - 'code' should be set and be a string of reasonable length`, () => { + const people = Array.isArray(meta.code) ? meta.code : [meta.code] + for (const person of people) { + expect(typeof person).to.equal('string') + expect(person.length > 2).to.be.true + expect(person.length < 80).to.be.true + } + }) + it(` - 'dfficulty' should be set and be a [1-5] number`, () => { + expect(typeof meta.difficulty).to.equal('number') + expect([1, 2, 3, 4, 5].indexOf(meta.difficulty) === -1).to.be.false }) } - it('Optional measurements:', () => true) - for (let measurement of patternConfig.optionalMeasurements || []) { - it(` - '${measurement}' should be a known measurement`, () => { - expect(measurements.indexOf(measurement)).to.not.equal(-1) - }) - } - it('Requests all measurements it uses', () => { - const requested = {} - const patternMeasies = patternConfig.measurements.concat(patternConfig.optionalMeasurements) - for (let measurement of patternMeasies) { - requested[measurement] = cisFemaleAdult28[measurement] - } - const draft = new Pattern({ - measurements: requested, - }).draft() - - const missWarnings = draft.setStores[0].logs.warning.filter((w, i, a) => { - return w.match(/tried to access \`measurements/) && a.indexOf(w) === i - }) - chai.assert( - missWarnings.length === 0, - `expected part to request all used measurements. \nThe following measurements were requested in the config: ${patternMeasies.join( - ', ' - )} \nbut got the following warnings: \n${missWarnings.join('\n')} - ` - ) - }) - } - - // Test validity of the pattern's options - it('Pattern options:', () => true) - for (const name in patternConfig.options) { - const option = patternConfig.options[name] - const type = typeof option - if (type === 'object' && typeof option.pct !== 'undefined') { - it(` - If it has a 'menu' property, it should be a string or method`, () => { - if (option.menu) - expect(['string', 'function'].indexOf(typeof option.menu) === -1).to.equal(false) - }) - // Percentage option - it(` - '${name}' is a percentage option`, () => true) - // Snapped options can just be hidden instead - if (option.hidden) { - if (option.snap) it(` - '${name}' is a hidden snap option`, () => true) - } - it(` - Should have a default value`, () => { - expect(typeof option.pct).to.equal('number') - }) - it(` - Should have a minimum <= the default value`, () => { - expect(option.min <= option.pct).to.be.true - }) - it(` - Should have a maximum >= the default value`, () => { - expect(option.max >= option.pct).to.be.true - }) - } else if (type === 'object' && typeof option.deg !== 'undefined') { - // Degree option - it(` - '${name}' is a degree option`, () => true) - it(` - Should have a default value`, () => { - expect(typeof option.deg).to.equal('number') - }) - it(` - Should have a minimum <= the default value`, () => { - expect(option.min <= option.deg).to.be.true - }) - it(` - Should have a maximum >= the default value`, () => { - expect(option.max >= option.deg).to.be.true - }) - } else if (type === 'object' && typeof option.mm !== 'undefined') { - // Millimeter option - it(` - '${name}' is a distance (mm) option`, () => true) - it(` - Should have a default value`, () => { - expect(typeof option.mm).to.equal('number') - }) - it(` - Should have a minimum <= the default value`, () => { - expect(option.min <= option.mm).to.be.true - }) - it(` - Should have a maximum >= the default value`, () => { - expect(option.max >= option.mm).to.be.true - }) - if (mmAllowed.indexOf(getShortName(designConfig.data.name)) === -1) { - it(` - Patterns should not use mm options`, () => { - expect('Does not use mm').to.be.true + if (!isUtilityDesign(name)) { + // Ensure required measurements are known measurements + it('Required measurements:', () => true) + for (const measurement of patternConfig.measurements || []) { + it(` - '${measurement}' should be a known measurement`, () => { + expect(measurements.indexOf(measurement)).to.not.equal(-1) }) } - } else if (type === 'object' && typeof option.bool !== 'undefined') { - // Boolean option - it(` - '${name}' is a boolean option`, () => true) - it(` - Should have a default value`, () => { - expect(typeof option.bool).to.equal('boolean') + it('Optional measurements:', () => true) + for (let measurement of patternConfig.optionalMeasurements || []) { + it(` - '${measurement}' should be a known measurement`, () => { + expect(measurements.indexOf(measurement)).to.not.equal(-1) + }) + } + it('Requests all measurements it uses', () => { + const requested = {} + const patternMeasies = patternConfig.measurements.concat(patternConfig.optionalMeasurements) + for (let measurement of patternMeasies) { + requested[measurement] = cisFemaleAdult28[measurement] + } + + const draft = new Pattern({ + measurements: requested, + }).draft() + + const missWarnings = draft.setStores[0].logs.warning.filter((w, i, a) => { + return w.match(/tried to access \`measurements/) && a.indexOf(w) === i + }) + chai.assert( + missWarnings.length === 0, + `expected part to request all used measurements. \nThe following measurements were requested in the config: ${patternMeasies.join( + ', ' + )} \nbut got the following warnings: \n${missWarnings.join('\n')} + ` + ) }) - it(` - Default value should be one of TRUE or FALSE`, () => { - expect([true, false].indexOf(option.bool)).to.not.equal(-1) - }) - } else if (type === 'object' && typeof option.count !== 'undefined') { - // Count option - it(` - '${name}' is a count option`, () => true) - it(` - Should have a default value`, () => { - expect(typeof option.count).to.equal('number') - }) - it(` - Should have a minimum <= the default value`, () => { - expect(option.min <= option.count).to.be.true - }) - it(` - Should have a maximum >= the default value`, () => { - expect(option.max >= option.count).to.be.true - }) - } else if (type === 'object' && typeof option.list !== 'undefined') { - // List option - it(` - '${name}' is a list option`, () => true) - it(` - Should have a default value`, () => { - expect(typeof option.dflt).to.not.equal('undefined') - }) - it(` - Its default value should be in the list of options`, () => { - expect(option.list.indexOf(option.dflt)).to.not.equal(-1) - }) - it(` - Its options should be an array of numbers or strings`, () => { - for (let o of option.list) expect(['number', 'string'].indexOf(typeof o)).to.not.equal(-1) - }) - } else if (type === 'number') { - // Static number - it(` - '${name}' is a static number`, () => true) - } else if (type === 'string') { - // Static string - it(` - '${name}' is a static string`, () => true) } - } + + // Test validity of the pattern's options + it('Pattern options:', () => true) + for (const name in patternConfig.options) { + const option = patternConfig.options[name] + const type = typeof option + if (type === 'object' && typeof option.pct !== 'undefined') { + it(` - If it has a 'menu' property, it should be a string or method`, () => { + if (option.menu) + expect(['string', 'function'].indexOf(typeof option.menu) === -1).to.equal(false) + }) + // Percentage option + it(` - '${name}' is a percentage option`, () => true) + // Snapped options can just be hidden instead + if (option.hidden) { + if (option.snap) it(` - '${name}' is a hidden snap option`, () => true) + } + it(` - Should have a default value`, () => { + expect(typeof option.pct).to.equal('number') + }) + it(` - Should have a minimum <= the default value`, () => { + expect(option.min <= option.pct).to.be.true + }) + it(` - Should have a maximum >= the default value`, () => { + expect(option.max >= option.pct).to.be.true + }) + } else if (type === 'object' && typeof option.deg !== 'undefined') { + // Degree option + it(` - '${name}' is a degree option`, () => true) + it(` - Should have a default value`, () => { + expect(typeof option.deg).to.equal('number') + }) + it(` - Should have a minimum <= the default value`, () => { + expect(option.min <= option.deg).to.be.true + }) + it(` - Should have a maximum >= the default value`, () => { + expect(option.max >= option.deg).to.be.true + }) + } else if (type === 'object' && typeof option.mm !== 'undefined') { + // Millimeter option + it(` - '${name}' is a distance (mm) option`, () => true) + it(` - Should have a default value`, () => { + expect(typeof option.mm).to.equal('number') + }) + it(` - Should have a minimum <= the default value`, () => { + expect(option.min <= option.mm).to.be.true + }) + it(` - Should have a maximum >= the default value`, () => { + expect(option.max >= option.mm).to.be.true + }) + if (mmAllowed.indexOf(getShortName(designConfig.data.name)) === -1) { + it(` - Patterns should not use mm options`, () => { + expect('Does not use mm').to.be.true + }) + } + } else if (type === 'object' && typeof option.bool !== 'undefined') { + // Boolean option + it(` - '${name}' is a boolean option`, () => true) + it(` - Should have a default value`, () => { + expect(typeof option.bool).to.equal('boolean') + }) + it(` - Default value should be one of TRUE or FALSE`, () => { + expect([true, false].indexOf(option.bool)).to.not.equal(-1) + }) + } else if (type === 'object' && typeof option.count !== 'undefined') { + // Count option + it(` - '${name}' is a count option`, () => true) + it(` - Should have a default value`, () => { + expect(typeof option.count).to.equal('number') + }) + it(` - Should have a minimum <= the default value`, () => { + expect(option.min <= option.count).to.be.true + }) + it(` - Should have a maximum >= the default value`, () => { + expect(option.max >= option.count).to.be.true + }) + } else if (type === 'object' && typeof option.list !== 'undefined') { + // List option + it(` - '${name}' is a list option`, () => true) + it(` - Should have a default value`, () => { + expect(typeof option.dflt).to.not.equal('undefined') + }) + it(` - Its default value should be in the list of options`, () => { + expect(option.list.indexOf(option.dflt)).to.not.equal(-1) + }) + it(` - Its options should be an array of numbers or strings`, () => { + for (let o of option.list) expect(['number', 'string'].indexOf(typeof o)).to.not.equal(-1) + }) + } else if (type === 'number') { + // Static number + it(` - '${name}' is a static number`, () => true) + } else if (type === 'string') { + // Static string + it(` - '${name}' is a static string`, () => true) + } + } + }) } diff --git a/tests/designs/i18n.mjs b/tests/designs/i18n.mjs new file mode 100644 index 00000000000..2fc76d3049c --- /dev/null +++ b/tests/designs/i18n.mjs @@ -0,0 +1,74 @@ +import designs from '../../config/software/designs.json' assert { type: 'json' } +import { isUtilityDesign, getShortName } from './config.mjs' +import chai from 'chai' + +const expect = chai.expect + +/* + * This runs unit tests for the pattern translation files + * It expects the following: + * + * @param string Pattern: The Pattern constructor + */ +export const testPatternI18n = (Pattern, i18n) => { + const name = getShortName(Pattern.designConfig.data.name) + const parts = Pattern.patternConfig.draftOrder + const options = Object.keys(Pattern.patternConfig.options) + describe('Pattern translation:', function () { + it(` - The design should have a translated title`, () => { + expect(typeof i18n.en.t).to.equal('string') + expect(i18n.en.t.length).to.be.above(4) + }) + it(` - The design should have a translated description`, () => { + expect(typeof i18n.en.d).to.equal('string') + expect(i18n.en.t.length).to.be.above(12) + }) + if (!isUtilityDesign(name)) { + it(` - The strings (s) object should exist`, () => { + expect(typeof i18n.en.s).to.equal('object') + }) + for (const [key, val] of Object.entries(i18n.en.s)) { + it(` - The translation of s.${key} should be a non-empty string`, () => { + expect(typeof i18n.en.s[key]).to.equal('string') + expect(i18n.en.s[key].length).to.be.above(1) + }) + } + it(` - The parts (p) object should exist`, () => { + expect(typeof i18n.en.p).to.equal('object') + }) + for (const [key, val] of Object.entries(i18n.en.p)) { + it(` - The translation of p.${key} should be a non-empty string`, () => { + expect(typeof i18n.en.p[key]).to.equal('string') + expect(i18n.en.p[key].length).to.be.above(1) + }) + } + for (const part of parts + .filter((p) => p.split('.')[0] === name) + .map((p) => p.split('.')[1])) { + it(` - The part name for the "${part}" part should be a non-empty string`, () => { + expect(typeof i18n.en.p[part]).to.equal('string') + expect(i18n.en.p[part].length).to.be.above(1) + }) + } + it(` - The options (o) object should exist`, () => { + expect(typeof i18n.en.o).to.equal('object') + }) + for (const [key, val] of Object.entries(i18n.en.o)) { + it(` - The translation of o.${key}.t should be a non-empty string`, () => { + expect(typeof i18n.en.o[key].t).to.equal('string') + expect(i18n.en.o[key].t.length).to.be.above(1) + }) + it(` - The translation of o.${key}.d should be a non-empty string`, () => { + expect(typeof i18n.en.o[key].d).to.equal('string') + expect(i18n.en.o[key].d.length).to.be.above(1) + }) + } + for (const option of options.filter((o) => typeof o === 'object')) { + it(` - The option title for the "${option}" option should be a non-empty string`, () => { + expect(typeof i18n.en.o[option].t).to.equal('string') + expect(i18n.en.o[option].t.length).to.be.above(1) + }) + } + } + }) +}