From fdf2c71bb7535a3c92b367755d0eb650b6422735 Mon Sep 17 00:00:00 2001 From: Hatem Hosny Date: Thu, 1 Oct 2026 00:25:35 +0300 Subject: [PATCH 1/3] feat(Compilers): add Pascal language support --- README.md | 2 +- docs/docs/languages/pascal.mdx | 104 ++++++++++++++++++ docs/src/components/LanguageSliders.tsx | 1 + docs/src/components/TemplateList.tsx | 1 + e2e/specs/starter.spec.ts | 27 +++++ functions/vendors/templates.js | 1 + server/php/inc/starter-templates.json | 1 + src/livecodes/UI/command-menu-actions.ts | 1 + src/livecodes/assets/templates/pascal.png | Bin 0 -> 9668 bytes src/livecodes/html/language-info.html | 30 +++++ .../locales/en/language-info.lokalise.json | 12 ++ .../i18n/locales/en/language-info.ts | 5 + .../i18n/locales/en/translation.lokalise.json | 4 + src/livecodes/i18n/locales/en/translation.ts | 1 + src/livecodes/languages/languages.ts | 2 + src/livecodes/languages/pascal/index.ts | 1 + src/livecodes/languages/pascal/lang-pascal.ts | 55 +++++++++ src/livecodes/templates/starter/index.ts | 2 + .../templates/starter/pascal-starter.ts | 71 ++++++++++++ src/livecodes/vendors.ts | 8 ++ src/sdk/models.ts | 5 + vendor-licenses.md | 2 + 22 files changed, 335 insertions(+), 1 deletion(-) create mode 100644 docs/docs/languages/pascal.mdx create mode 100644 src/livecodes/assets/templates/pascal.png create mode 100644 src/livecodes/languages/pascal/index.ts create mode 100644 src/livecodes/languages/pascal/lang-pascal.ts create mode 100644 src/livecodes/templates/starter/pascal-starter.ts diff --git a/README.md b/README.md index 22186ae7a2..29b061bfdb 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A [feature-rich](https://livecodes.io/docs/features/), open-source, **client-sid [![LiveCodes: npm version](https://img.shields.io/npm/v/livecodes)](https://www.npmjs.com/package/livecodes) [![LiveCodes: npm downloads](https://img.shields.io/npm/dm/livecodes)](https://www.npmjs.com/package/livecodes) [![LiveCodes: jsdelivr downloads](https://data.jsdelivr.com/v1/package/npm/livecodes/badge?style=rounded)](https://www.jsdelivr.com/package/npm/livecodes) -[![LiveCodes: languages](https://img.shields.io/badge/languages-110-blue)](https://livecodes.io/docs/languages/) +[![LiveCodes: languages](https://img.shields.io/badge/languages-111-blue)](https://livecodes.io/docs/languages/) [![LiveCodes: docs](https://img.shields.io/badge/Documentation-575757?logo=gitbook&logoColor=white)](https://livecodes.io/docs/) [![LiveCodes: llms.txt](https://img.shields.io/badge/llms.txt-575757?logo=googledocs&logoColor=white)](https://livecodes.io/docs/llms.txt) [![LiveCodes: llms-full.txt](https://img.shields.io/badge/llms--full.txt-575757?logo=googledocs&logoColor=white)](https://livecodes.io/docs/llms-full.txt) diff --git a/docs/docs/languages/pascal.mdx b/docs/docs/languages/pascal.mdx new file mode 100644 index 0000000000..1885bba122 --- /dev/null +++ b/docs/docs/languages/pascal.mdx @@ -0,0 +1,104 @@ +# Pascal + +[Pascal](https://www.freepascal.org/) is a procedural and object-oriented programming +language, designed by Niklaus Wirth in 1970 and still widely used for teaching and for +building native applications. + +LiveCodes runs Pascal in the browser using the [Free Pascal](https://www.freepascal.org/) +team's [pas2js](https://www.freepascal.org/_new/docs/tools/pas2js/) transpiler, compiled +to [WebAssembly](https://webassembly.org/). It transpiles Object Pascal to JavaScript, +which then runs in the result page. No server is involved. + +## Usage + +Write a Pascal program in the script editor and press **Run**. Anything written with +`Writeln` appears in the console. + +Because the compiled output is plain JavaScript, the program can use the DOM and other +browser APIs. `uses web` brings the browser API into scope: + +```pascal +program app; + +{$mode objfpc}{$H+} + +uses + web, sysutils; + +var + Count: Integer = 0; + +function HandleClick(Event: TJSEvent): boolean; +var + Counter: TJSElement; +begin + Count := Count + 1; + Counter := document.getElementById('counter'); + if (Counter <> nil) then + Counter.innerHTML := 'You clicked ' + IntToStr(Count) + ' times.'; +end; + +var + Title: TJSElement; + Button: TJSElement; +begin + Writeln('Hello from Pascal!'); + + Title := document.getElementById('title'); + if (Title <> nil) then + Title.innerHTML := 'Pascal'; + + Button := document.getElementById('counter-button'); + if (Button <> nil) then + Button.addEventListener('click', @HandleClick); +end. +``` + +That is the starter template: + +import LiveCodes from '../../src/components/LiveCodes.tsx'; + + + +Uncaught exceptions are reported in the console; `ExitCode` may be set to signal a +non-zero exit code. + +## Language Info + +### Name + +`pascal` + +### Aliases + +`pas`, `pp`, `pas2js` + +### Extension + +`.pas`, `.pp` + +### Editor + +`script` + +## Compiler + +[pas2js](https://www.freepascal.org/_new/docs/tools/pas2js/), the Free Pascal compiler +targeting JavaScript. + +### Version + +pas2js 3.3.1 + +## Limitations + +- There is no `Readln` in the pas2js runtime, so programs cannot read from standard + input. + +## Links + +- [Pascal](https://www.freepascal.org/) +- [Free Pascal documentation](https://www.freepascal.org/docs.html) +- [pas2js documentation](https://www.freepascal.org/_new/docs/tools/pas2js/) +- [pas2js wiki](https://wiki.freepascal.org/pas2js) +- [WebAssembly](https://webassembly.org/) in LiveCodes diff --git a/docs/src/components/LanguageSliders.tsx b/docs/src/components/LanguageSliders.tsx index 3ba35444b0..150452ef88 100644 --- a/docs/src/components/LanguageSliders.tsx +++ b/docs/src/components/LanguageSliders.tsx @@ -97,6 +97,7 @@ export default function Sliders() { { name: 'haskell', title: 'Haskell' }, { name: 'haskell-wasm', title: 'Haskell (Wasm)' }, { name: 'zig-wasm', title: 'Zig (Wasm)' }, + { name: 'pascal', title: 'Pascal' }, { name: 'java', title: 'Java' }, { name: 'csharp-wasm', title: 'C# (Wasm)' }, { name: 'vb-wasm', title: 'VB.NET (Wasm)' }, diff --git a/docs/src/components/TemplateList.tsx b/docs/src/components/TemplateList.tsx index f6a6501883..88d88851a4 100644 --- a/docs/src/components/TemplateList.tsx +++ b/docs/src/components/TemplateList.tsx @@ -55,6 +55,7 @@ const templates = [ { name: 'haskell', title: 'Haskell Starter', thumbnail: 'haskell.svg' }, { name: 'haskell-wasm', title: 'Haskell (Wasm) Starter', thumbnail: 'haskell.svg' }, { name: 'zig-wasm', title: 'Zig (Wasm) Starter', thumbnail: 'zig.svg' }, + { name: 'pascal', title: 'Pascal Starter', thumbnail: 'pascal.png' }, { name: 'java', title: 'Java Starter', thumbnail: 'java.svg' }, { name: 'csharp-wasm', title: 'C# (Wasm)', thumbnail: 'csharp.svg' }, { name: 'vb-wasm', title: 'VB.NET (Wasm)', thumbnail: 'vb.svg' }, diff --git a/e2e/specs/starter.spec.ts b/e2e/specs/starter.spec.ts index 95db9067cf..593807883f 100644 --- a/e2e/specs/starter.spec.ts +++ b/e2e/specs/starter.spec.ts @@ -296,6 +296,33 @@ test.describe('Starter Templates from UI', () => { expect(counterText).toBe('You clicked 3 times.'); }); + test('Pascal Starter', async ({ page, getTestUrl, editor }) => { + // the ~9 MB compiler is downloaded on the first run + test.slow(); + + await page.goto(getTestUrl()); + + const { app, getResult, waitForResultUpdate } = await getLoadedApp(page); + + await app.click('[aria-label="Project"]'); + await app.click('text=New'); + await app.click('text=Pascal Starter'); + + await waitForEditorFocus(app); + await waitForResultUpdate(); + await app.waitForTimeout(30_000); + + await getResult().click('text=Click me'); + await getResult().click('text=Click me'); + await getResult().click('text=Click me'); + + const titleText = await getResult().innerText('h1'); + expect(titleText).toBe('Hello, Pascal!'); + + const counterText = await getResult().innerText('text=You clicked'); + expect(counterText).toBe('You clicked 3 times.'); + }); + test('rust-wasm Starter', async ({ page, getTestUrl, editor }) => { // the interpreter and the stdlib sysroot are downloaded on the first run test.slow(); diff --git a/functions/vendors/templates.js b/functions/vendors/templates.js index 4e9c320618..cafa8b2250 100644 --- a/functions/vendors/templates.js +++ b/functions/vendors/templates.js @@ -53,6 +53,7 @@ export const starterTemplates = { "rust-wasm": "Rust (Wasm) Starter", "swift-wasm": "Swift (Wasm) Starter", "zig-wasm": "Zig (Wasm) Starter", + "pascal": "Pascal Starter", "java": "Java Starter", "csharp-wasm": "C# (Wasm) Starter", "vb-wasm": "VB.NET (Wasm) Starter", diff --git a/server/php/inc/starter-templates.json b/server/php/inc/starter-templates.json index 984a4497a0..7a46f58825 100644 --- a/server/php/inc/starter-templates.json +++ b/server/php/inc/starter-templates.json @@ -53,6 +53,7 @@ "rust-wasm": "Rust (Wasm) Starter", "swift-wasm": "Swift (Wasm) Starter", "zig-wasm": "Zig (Wasm) Starter", + "pascal": "Pascal Starter", "java": "Java Starter", "csharp-wasm": "C# (Wasm) Starter", "vb-wasm": "VB.NET (Wasm) Starter", diff --git a/src/livecodes/UI/command-menu-actions.ts b/src/livecodes/UI/command-menu-actions.ts index 091bc04112..d5c0abc1e1 100644 --- a/src/livecodes/UI/command-menu-actions.ts +++ b/src/livecodes/UI/command-menu-actions.ts @@ -309,6 +309,7 @@ export const getCommandMenuActions = ({ 'rust-wasm', 'swift-wasm', 'zig-wasm', + 'pascal', 'java', 'csharp-wasm', 'vb-wasm', diff --git a/src/livecodes/assets/templates/pascal.png b/src/livecodes/assets/templates/pascal.png new file mode 100644 index 0000000000000000000000000000000000000000..a3f1e2c6f940eb886fa920803f52aeb455953d99 GIT binary patch literal 9668 zcmV;#B|F-QP)HG0008|P)t-s0001v zj*SEZ0|*8NSyoj80s;sJ1{)X_e|~)h1O!k`Oa}!8V_{$*85Y97zE3_dMnXYEKRje% zVKFT%Z*FXkj*S!%58T_*5Jo;ZNI^S&TKA4q~Yh_-Yn3ZE;UJeWkcWz{wl8T3bdY6%k000020RjU91_l8E0RaTd zn`F$HV9T0a3IhVonOw@7V4G_^#hYl!oM+9PV9S_U$(m#i1OmsKVwY<{$DM1>nqJJC zT1hr1$eLXc2nFN6k;R#0m25_wZ9v4GaKV^q8Vv{MzKOt^ZP1!qyOn9kms`k~V9J#X;ZzNcCC?du!~`u zbx^W`PO5uJ(4Ap`WlAg~9OT5Bi(fT7Gb_ukin)kViDW^1TRYaTf4GZUs(@6#sEyUL ziol|OH7g|0rgYGvY}>(~%eI^4x`WrMbia~cv4&R2sDRzEc#L&ihi_QbrfkrlXPA9r zXIxUCgl5E&TI$iVu9kbFjdQl2grav#yRDqn#jpBw0j>Z50AzGhPE!B}_~i`y-=`Au zAM6?Z68*s>;hY3-h!TTn3l@5F&$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wa|&hz z?LU0z;l1tK7XJfR%=|X`;P%y%=U=?o|MckF!zWH(+^{J>IX_)(-L>~Oj=+4#6Zh|( zKltF~#x-+t6R47|mMc59EV^{<`15xM&OSMJSSuY^b~kVSRHj;iSkt;l60 z4&xDG+;xlL|0XWWuw7?Fg?gjfuoD^?G`(77(?XD9fe4dM*k@v8*hsBS#yQ7sAD63wtRG9ab`5C_@DYhuC?p6}rZdX-xT`m?`HW?avRY!nT zeEb^Ns%x`xhaHMd^wdff z1{Blrg^*#A;RAzoIhG_eO4mLKZbVClQ*SE8>~wsw+%}g{EM4ur;~hl1l)yV>ll5(L2@;ETrQ9a=z*xEbBfaLj`;E%@R@hxHu zn{B)|if82BlayRv#3M}5gV+{X>T`R84XZRwVX&9xzRd`ygA;j@2Y^P#Aw=32|HY?H zh>~Xa`Q;ONPrNPpM5>;X2L9}viKlASknCMaV7!}j=!kTE8c$g(^1FaEdL%Ixlw#c0 zf*{#zSSs=HtrH8_WQPg@C{Mw#1`+}^!Exlzf+-ndjt;e%o1(*Nu?w9o+w<|%5gbFS zK+r|wdfQgz0wnVTAiY9C2D+{)Wv$(>J7L;;z}`$zx~^r^oBC|*fs+NMnHCyBI@!E3 z5s?KnQ^D+Lidy)ETPm>aK&jPKRWB7jTCiX?Q_AW!`%cIpIy-g%OhYMIg4wSOXQI8& zkYcU7epT%ILc;fBXZ?<@D&`jv=W@ARE|<&Ya=BdYuk`^y4}>c;z)n2?0000Zig (Wasm) +
+

Pascal

+
+ Pascal running in the browser using pas2js (by the Free Pascal team) compiled to WebAssembly. +
+ +
+

Diagrams

(Experimental)
diff --git a/src/livecodes/i18n/locales/en/language-info.lokalise.json b/src/livecodes/i18n/locales/en/language-info.lokalise.json index cfc122c7aa..662f0dde4d 100644 --- a/src/livecodes/i18n/locales/en/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/en/language-info.lokalise.json @@ -680,6 +680,18 @@ "notes": "", "translation": "OCaml" }, + "pascal.desc": { + "notes": "", + "translation": "Pascal running in the browser using pas2js (by the Free Pascal team) compiled to WebAssembly." + }, + "pascal.link": { + "notes": "### ###\n
  • \n\n### ###\n\n\n### ###\n
  • \n\n### ###\n\n\n### ###\n
  • \n\n### ###\n\n\n### ###\n
  • \n\n### ###\n\n\n### ###\n
  • \n\n### ###\n\n\n", + "translation": " Free Pascal website pas2js documentation pas2js wiki LiveCodes Documentation Load starter template " + }, + "pascal.name": { + "notes": "", + "translation": "Pascal" + }, "perl.desc": { "notes": "", "translation": "Perl running in the browser using Perlito." diff --git a/src/livecodes/i18n/locales/en/language-info.ts b/src/livecodes/i18n/locales/en/language-info.ts index 1c5e4eb021..1c1e8508ef 100644 --- a/src/livecodes/i18n/locales/en/language-info.ts +++ b/src/livecodes/i18n/locales/en/language-info.ts @@ -297,6 +297,11 @@ const languageInfo = { link: '<1><2>OCaml website <3> <4>OCaml documentation <5> <6>ReScript website <7> <8>Learn X in Y minutes, where X=OCaml <9> <10>Load starter template ', name: 'OCaml', }, + pascal: { + desc: 'Pascal running in the browser using pas2js (by the Free Pascal team) compiled to WebAssembly.', + link: '<1> <2>Free Pascal website <3> <4>pas2js documentation <5> <6>pas2js wiki <7> <8>LiveCodes Documentation <9> <10>Load starter template ', + name: 'Pascal', + }, perl: { desc: 'Perl running in the browser using Perlito.', link: '<1> <2>Perl official website <3> <4>Perl documentation <5> <6>Perlito5 Readme <7> <8>Learn X in Y minutes, where X=perl <9> <10>Load starter template ', diff --git a/src/livecodes/i18n/locales/en/translation.lokalise.json b/src/livecodes/i18n/locales/en/translation.lokalise.json index 482321065f..60b319d619 100644 --- a/src/livecodes/i18n/locales/en/translation.lokalise.json +++ b/src/livecodes/i18n/locales/en/translation.lokalise.json @@ -2740,6 +2740,10 @@ "notes": "", "translation": "Ocaml Starter" }, + "templates.starter.pascal": { + "notes": "", + "translation": "Pascal Starter" + }, "templates.starter.perl": { "notes": "", "translation": "Perl Starter" diff --git a/src/livecodes/i18n/locales/en/translation.ts b/src/livecodes/i18n/locales/en/translation.ts index d80bc7f6ec..43afaf6147 100644 --- a/src/livecodes/i18n/locales/en/translation.ts +++ b/src/livecodes/i18n/locales/en/translation.ts @@ -1031,6 +1031,7 @@ const translation = { minizinc: 'MiniZinc Starter', 'objc-wasm': 'Objective-C (Wasm) Starter', ocaml: 'Ocaml Starter', + pascal: 'Pascal Starter', perl: 'Perl Starter', phaser: 'Phaser Starter', php: 'PHP Starter', diff --git a/src/livecodes/languages/languages.ts b/src/livecodes/languages/languages.ts index c065a0b354..0fa6c642b4 100644 --- a/src/livecodes/languages/languages.ts +++ b/src/livecodes/languages/languages.ts @@ -52,6 +52,7 @@ import { mjml } from './mjml'; import { mustache } from './mustache'; import { nunjucks } from './nunjucks'; import { ocaml } from './ocaml'; +import { pascal } from './pascal'; import { perl } from './perl'; import { php } from './php'; import { phpWasm } from './php-wasm'; @@ -167,6 +168,7 @@ export const languages: LanguageSpecs[] = [ rustWasm, swiftWasm, zigWasm, + pascal, java, csharpWasm, vbWasm, diff --git a/src/livecodes/languages/pascal/index.ts b/src/livecodes/languages/pascal/index.ts new file mode 100644 index 0000000000..565445b731 --- /dev/null +++ b/src/livecodes/languages/pascal/index.ts @@ -0,0 +1 @@ +export * from './lang-pascal'; diff --git a/src/livecodes/languages/pascal/lang-pascal.ts b/src/livecodes/languages/pascal/lang-pascal.ts new file mode 100644 index 0000000000..cc46a0a86e --- /dev/null +++ b/src/livecodes/languages/pascal/lang-pascal.ts @@ -0,0 +1,55 @@ +import type { LanguageSpecs } from '../../models'; +import { pascalWasmBaseUrl, pascalWasmScriptUrl } from '../../vendors'; + +interface DiagnosticMessage { + file: string | null; + line: number | null; + column: number | null; + severity: string; + message: string; +} + +declare const pascalWasm: { + createCompiler: (options: { baseUrl: string }) => Promise<{ + compile: (code: string) => Promise<{ js: string | null; diagnostics: string }>; + }>; + parseDiagnostics: (diagnostics: string) => DiagnosticMessage[]; +}; + +const formatDiagnostics = (diagnostics: string) => { + const messages = pascalWasm.parseDiagnostics(diagnostics).map((message) => { + if (message.file === null || message.line === null) { + return `${message.severity}: ${message.message}`; + } + const file = message.file.replace(/^.*\//, ''); + return `${file} (${message.line},${message.column}) ${message.severity}: ${message.message}`; + }); + return messages.length ? messages : ['Pascal compilation failed']; +}; + +export const pascal: LanguageSpecs = { + name: 'pascal', + title: 'Pascal', + compiler: { + url: pascalWasmScriptUrl, + factory: () => { + let compilerPromise: ReturnType | undefined; + return async (code) => { + compilerPromise ??= pascalWasm.createCompiler({ baseUrl: pascalWasmBaseUrl }); + const compiler = await compilerPromise; + const { js, diagnostics } = await compiler.compile(code); + if (!js) { + return { code: '', info: { errors: formatDiagnostics(diagnostics) } }; + } + return `${js}\nrtl.run();\n`; + }; + }, + }, + extensions: ['pascal', 'pas', 'pp', 'pas2js'], + editor: 'script', + editorLanguage: 'pascal', + editorSupport: { + codejar: { language: 'pascal' }, + }, + largeDownload: true, +}; diff --git a/src/livecodes/templates/starter/index.ts b/src/livecodes/templates/starter/index.ts index fb6ac41bf8..308c1f4b2a 100644 --- a/src/livecodes/templates/starter/index.ts +++ b/src/livecodes/templates/starter/index.ts @@ -45,6 +45,7 @@ import { markdownStarter } from './markdown-starter'; import { mdxStarter } from './mdx-starter'; import { minizincStarter } from './minizinc-starter'; import { ocamlStarter } from './ocaml-starter'; +import { pascalStarter } from './pascal-starter'; import { perlStarter } from './perl-starter'; import { phaserStarter } from './phaser-starter'; import { phpStarter } from './php-starter'; @@ -135,6 +136,7 @@ export const starterTemplates = [ rustWasmStarter, swiftWasmStarter, zigWasmStarter, + pascalStarter, javaStarter, csharpWasmStarter, vbWasmStarter, diff --git a/src/livecodes/templates/starter/pascal-starter.ts b/src/livecodes/templates/starter/pascal-starter.ts new file mode 100644 index 0000000000..31590b19ed --- /dev/null +++ b/src/livecodes/templates/starter/pascal-starter.ts @@ -0,0 +1,71 @@ +import type { Template } from '../../models'; + +export const pascalStarter: Template = { + name: 'pascal', + title: window.deps.translateString('templates.starter.pascal', 'Pascal Starter'), + thumbnail: 'assets/templates/pascal.png', + activeEditor: 'script', + markup: { + language: 'html', + content: ` +
    +

    Hello, World!

    + +

    You clicked 0 times.

    + +
    +`.trimStart(), + }, + style: { + language: 'css', + content: ` +.container, +.container button { + text-align: center; + font: 1em sans-serif; +} +.logo { + width: 150px; +} +`.trimStart(), + }, + script: { + language: 'pascal', + content: ` +program app; + +{$mode objfpc}{$H+} + +uses + web, sysutils; + +var + Count: Integer = 0; + +function HandleClick(Event: TJSEvent): boolean; +var + Counter: TJSElement; +begin + Count := Count + 1; + Counter := document.getElementById('counter'); + if (Counter <> nil) then + Counter.innerHTML := 'You clicked ' + IntToStr(Count) + ' times.'; +end; + +var + Title: TJSElement; + Button: TJSElement; +begin + Writeln('Hello from Pascal!'); + + Title := document.getElementById('title'); + if (Title <> nil) then + Title.innerHTML := 'Pascal'; + + Button := document.getElementById('counter-button'); + if (Button <> nil) then + Button.addEventListener('click', @HandleClick); +end. +`.trimStart(), + }, +}; diff --git a/src/livecodes/vendors.ts b/src/livecodes/vendors.ts index ab2e3163d5..97abc8f082 100644 --- a/src/livecodes/vendors.ts +++ b/src/livecodes/vendors.ts @@ -365,6 +365,14 @@ export const opalBaseUrl = /* @__PURE__ */ getUrl('https://cdn.opalrb.com/opal/1 export const parinferUrl = /* @__PURE__ */ getUrl('parinfer@3.13.1/parinfer.js'); +export const pascalWasmScriptUrl = /* @__PURE__ */ getUrl( + '@live-codes/pascal-wasm@0.1.0/dist/pascal-wasm.iife.min.js', +); + +// The classic-script build has no module URL, so it cannot find `assets/` on its +// own and needs to be told where they are. +export const pascalWasmBaseUrl = /* @__PURE__ */ getUrl('@live-codes/pascal-wasm@0.1.0/assets/'); + export const pathBrowserifyUrl = /* @__PURE__ */ getModuleUrl('path-browserify@1.0.1'); export const pgliteUrl = /* @__PURE__ */ getUrl('@electric-sql/pglite@0.1.5/dist/index.js'); diff --git a/src/sdk/models.ts b/src/sdk/models.ts index c67357382b..5e3dc22f96 100644 --- a/src/sdk/models.ts +++ b/src/sdk/models.ts @@ -218,6 +218,10 @@ export type Language = | 'rust-wasm' | 'rs-wasm' | 'wasm.rs' + | 'pascal' + | 'pas' + | 'pp' + | 'pas2js' | 'perl' | 'pl' | 'pm' @@ -456,6 +460,7 @@ export type TemplateName = | 'rust-wasm' | 'swift-wasm' | 'zig-wasm' + | 'pascal' | 'perl' | 'lua' | 'lua-wasm' diff --git a/vendor-licenses.md b/vendor-licenses.md index 9f69e8528a..da3ee4619b 100644 --- a/vendor-licenses.md +++ b/vendor-licenses.md @@ -194,6 +194,8 @@ Parinfer.js: [MIT License](https://github.com/parinfer/parinfer.js/blob/cddc36ac path-browserify: [MIT License](https://github.com/browserify/path-browserify/blob/872fec31a8bac7b9b43be0e54ef3037e0202c5fb/LICENSE) +pas2js (Free Pascal): [LGPL-2.1 License](https://github.com/fpc/pas2js/blob/main/LICENSE) + Perlito5: [Artistic License 2.0](https://github.com/fglock/Perlito/blob/f217cdac3771de31e009d4e099bac7013a619987/LICENSE.md) PGlite: [Apache License 2.0](https://github.com/electric-sql/pglite/blob/4da200e634f417fca2a8c17a3b0bae70cc2fe5af/LICENSE) From 9fdbdde0faed6471cb72da345c23e15564df0c61 Mon Sep 17 00:00:00 2001 From: Hatem Hosny Date: Thu, 1 Oct 2026 08:06:45 +0300 Subject: [PATCH 2/3] fixes --- scripts/build.js | 1 + .../languages/pascal/lang-pascal-compiler.ts | 41 +++++++++++++++ src/livecodes/languages/pascal/lang-pascal.ts | 50 ++++--------------- .../templates/starter/pascal-starter.ts | 2 - src/livecodes/vendors.ts | 2 +- typos.toml | 1 + 6 files changed, 54 insertions(+), 43 deletions(-) create mode 100644 src/livecodes/languages/pascal/lang-pascal-compiler.ts diff --git a/scripts/build.js b/scripts/build.js index 175b06a45e..807861dac9 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -253,6 +253,7 @@ const iifeBuild = () => 'languages/minizinc/lang-minizinc-script.ts', 'languages/mustache/lang-mustache-compiler.ts', 'languages/nunjucks/lang-nunjucks-compiler.ts', + 'languages/pascal/lang-pascal-compiler.ts', 'languages/perl/lang-perl-script.ts', 'languages/php-wasm/lang-php-wasm-script.ts', 'languages/prolog/lang-prolog-script.ts', diff --git a/src/livecodes/languages/pascal/lang-pascal-compiler.ts b/src/livecodes/languages/pascal/lang-pascal-compiler.ts new file mode 100644 index 0000000000..240c067dae --- /dev/null +++ b/src/livecodes/languages/pascal/lang-pascal-compiler.ts @@ -0,0 +1,41 @@ +import type { CompilerFunction } from '../../models'; +import { pascalWasmBaseUrl } from '../../vendors'; + +interface DiagnosticMessage { + file: string | null; + line: number | null; + column: number | null; + severity: string; + message: string; +} + +declare const pascalWasm: { + createCompiler: (options: { baseUrl: string }) => Promise<{ + compile: (code: string) => Promise<{ js: string | null; diagnostics: string }>; + }>; + parseDiagnostics: (diagnostics: string) => DiagnosticMessage[]; +}; + +const formatDiagnostics = (diagnostics: string) => { + const messages = pascalWasm.parseDiagnostics(diagnostics).map((message) => { + if (message.file === null || message.line === null) { + return `${message.severity}: ${message.message}`; + } + const file = message.file.replace(/^.*\//, ''); + return `${file} (${message.line},${message.column}) ${message.severity}: ${message.message}`; + }); + return messages.length ? messages : ['Pascal compilation failed']; +}; + +(self as any).createPascalCompiler = (): CompilerFunction => { + const compilerPromise = pascalWasm.createCompiler({ baseUrl: pascalWasmBaseUrl }); + return async (code) => { + if (!code.trim()) return ''; + const compiler = await compilerPromise; + const { js, diagnostics } = await compiler.compile(code); + if (!js) { + return { code: '', info: { errors: formatDiagnostics(diagnostics) } }; + } + return `${js}\nrtl.run();\n`; + }; +}; diff --git a/src/livecodes/languages/pascal/lang-pascal.ts b/src/livecodes/languages/pascal/lang-pascal.ts index cc46a0a86e..9923b30e23 100644 --- a/src/livecodes/languages/pascal/lang-pascal.ts +++ b/src/livecodes/languages/pascal/lang-pascal.ts @@ -1,55 +1,25 @@ +import { codemirrorLegacy } from '../../editor/codemirror/utils'; import type { LanguageSpecs } from '../../models'; -import { pascalWasmBaseUrl, pascalWasmScriptUrl } from '../../vendors'; - -interface DiagnosticMessage { - file: string | null; - line: number | null; - column: number | null; - severity: string; - message: string; -} - -declare const pascalWasm: { - createCompiler: (options: { baseUrl: string }) => Promise<{ - compile: (code: string) => Promise<{ js: string | null; diagnostics: string }>; - }>; - parseDiagnostics: (diagnostics: string) => DiagnosticMessage[]; -}; - -const formatDiagnostics = (diagnostics: string) => { - const messages = pascalWasm.parseDiagnostics(diagnostics).map((message) => { - if (message.file === null || message.line === null) { - return `${message.severity}: ${message.message}`; - } - const file = message.file.replace(/^.*\//, ''); - return `${file} (${message.line},${message.column}) ${message.severity}: ${message.message}`; - }); - return messages.length ? messages : ['Pascal compilation failed']; -}; +import { codeMirrorBaseUrl, monacoLanguagesBaseUrl, pascalWasmScriptUrl } from '../../vendors'; export const pascal: LanguageSpecs = { name: 'pascal', title: 'Pascal', compiler: { url: pascalWasmScriptUrl, - factory: () => { - let compilerPromise: ReturnType | undefined; - return async (code) => { - compilerPromise ??= pascalWasm.createCompiler({ baseUrl: pascalWasmBaseUrl }); - const compiler = await compilerPromise; - const { js, diagnostics } = await compiler.compile(code); - if (!js) { - return { code: '', info: { errors: formatDiagnostics(diagnostics) } }; - } - return `${js}\nrtl.run();\n`; - }; + factory: (_config, baseUrl) => { + (self as any).importScripts(baseUrl + '{{hash:lang-pascal-compiler.js}}'); + return (self as any).createPascalCompiler(); }, }, extensions: ['pascal', 'pas', 'pp', 'pas2js'], editor: 'script', - editorLanguage: 'pascal', editorSupport: { - codejar: { language: 'pascal' }, + monaco: { languageSupport: monacoLanguagesBaseUrl + 'pascal.js' }, + codemirror: { + languageSupport: async () => + codemirrorLegacy((await import(codeMirrorBaseUrl + 'codemirror-lang-pascal.js')).pascal), + }, }, largeDownload: true, }; diff --git a/src/livecodes/templates/starter/pascal-starter.ts b/src/livecodes/templates/starter/pascal-starter.ts index 31590b19ed..ac4515d4ad 100644 --- a/src/livecodes/templates/starter/pascal-starter.ts +++ b/src/livecodes/templates/starter/pascal-starter.ts @@ -34,8 +34,6 @@ export const pascalStarter: Template = { content: ` program app; -{$mode objfpc}{$H+} - uses web, sysutils; diff --git a/src/livecodes/vendors.ts b/src/livecodes/vendors.ts index 97abc8f082..5b106767f3 100644 --- a/src/livecodes/vendors.ts +++ b/src/livecodes/vendors.ts @@ -100,7 +100,7 @@ export const codeiumProviderUrl = /* @__PURE__ */ getUrl( '@live-codes/monaco-codeium-provider@0.2.2/dist/index.js', ); -export const codeMirrorBaseUrl = /* @__PURE__ */ getUrl('@live-codes/codemirror@0.4.2/build/'); +export const codeMirrorBaseUrl = /* @__PURE__ */ getUrl('@live-codes/codemirror@0.4.3/build/'); export const codemirrorMinimapUrl = /* @__PURE__ */ getUrl( '@replit/codemirror-minimap@0.5.2/dist/index.js', diff --git a/typos.toml b/typos.toml index 629bd22d2b..755cdc31ca 100644 --- a/typos.toml +++ b/typos.toml @@ -26,6 +26,7 @@ xdescribe = "xdescribe" arange = "arange" touchs = "touchs" decid = "decid" +Wirth = "Wirth" [type.svg] # Skip check contents for svg files From 4aee757306c65b54201d95037919f49d15888044 Mon Sep 17 00:00:00 2001 From: "pullfrog[bot]" <226033991+pullfrog[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2026 05:18:40 +0000 Subject: [PATCH 3/3] fix(Pascal): retry compiler init, add translations and reference entries --- .../language-support/references/languages.md | 7 +++++++ .../locales/ar/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/ar/language-info.ts | 5 +++++ .../i18n/locales/ar/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/ar/translation.ts | 1 + .../locales/bn/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/bn/language-info.ts | 5 +++++ .../i18n/locales/bn/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/bn/translation.ts | 1 + .../locales/de/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/de/language-info.ts | 5 +++++ .../i18n/locales/de/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/de/translation.ts | 1 + .../locales/es/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/es/language-info.ts | 5 +++++ .../i18n/locales/es/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/es/translation.ts | 1 + .../locales/fa/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/fa/language-info.ts | 5 +++++ .../i18n/locales/fa/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/fa/translation.ts | 1 + .../locales/fr/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/fr/language-info.ts | 5 +++++ .../i18n/locales/fr/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/fr/translation.ts | 1 + .../locales/hi/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/hi/language-info.ts | 5 +++++ .../i18n/locales/hi/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/hi/translation.ts | 1 + .../locales/hu/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/hu/language-info.ts | 5 +++++ .../i18n/locales/hu/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/hu/translation.ts | 1 + .../locales/id/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/id/language-info.ts | 5 +++++ .../i18n/locales/id/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/id/translation.ts | 1 + .../locales/it/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/it/language-info.ts | 5 +++++ .../i18n/locales/it/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/it/translation.ts | 1 + .../locales/ja/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/ja/language-info.ts | 5 +++++ .../i18n/locales/ja/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/ja/translation.ts | 1 + .../locales/nl/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/nl/language-info.ts | 5 +++++ .../i18n/locales/nl/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/nl/translation.ts | 1 + .../locales/pt/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/pt/language-info.ts | 5 +++++ .../i18n/locales/pt/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/pt/translation.ts | 1 + .../locales/ru/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/ru/language-info.ts | 5 +++++ .../i18n/locales/ru/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/ru/translation.ts | 1 + .../locales/tr/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/tr/language-info.ts | 5 +++++ .../i18n/locales/tr/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/tr/translation.ts | 1 + .../locales/ur/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/ur/language-info.ts | 5 +++++ .../i18n/locales/ur/translation.lokalise.json | 3 +++ src/livecodes/i18n/locales/ur/translation.ts | 1 + .../locales/zh-CN/language-info.lokalise.json | 9 +++++++++ .../i18n/locales/zh-CN/language-info.ts | 5 +++++ .../locales/zh-CN/translation.lokalise.json | 3 +++ .../i18n/locales/zh-CN/translation.ts | 1 + .../languages/pascal/lang-pascal-compiler.ts | 20 ++++++++++++++++--- 70 files changed, 330 insertions(+), 3 deletions(-) diff --git a/.agents/skills/livecodes/language-support/references/languages.md b/.agents/skills/livecodes/language-support/references/languages.md index daf91a99f0..12df9d3b6d 100644 --- a/.agents/skills/livecodes/language-support/references/languages.md +++ b/.agents/skills/livecodes/language-support/references/languages.md @@ -126,6 +126,8 @@ Enabled via `processors` config: | Java | `java` | Java runtime | | C# | `csharp-wasm`, `cs`, `cs-wasm`, `wasm.cs` | C# WASM | | VB.NET | `vb-wasm`, `vb`, `vbnet`, `wasm.vb` | VB.NET WASM | +| F# | `fsharp`, `fs`, `fsx` | Fable (F# -> JS) | +| F# (Wasm) | `fsharp-wasm`, `fs-wasm`, `wasm.fs` | .NET WASM | | R | `r`, `rlang`, `rstats`, `r-wasm` | R WASM | | Lua | `lua`, `lua-wasm`, `luawasm`, `wasm.lua` | Lua WASM | | Teal | `teal`, `tl` | Typed Lua | @@ -136,10 +138,14 @@ Enabled via `processors` config: | ClojureScript (Cherry) | `clojurescript-cherry`, `cljs-cherry` | Cherry transpiler; imports npm packages as ES modules | | ClojureScript (self-hosted) | `clojurescript-selfhosted`, `cljs-selfhosted` | Official ClojureScript compiler; no npm imports | | Perl | `perl`, `pl`, `pm` | Perl runtime | +| Pascal | `pascal`, `pas`, `pp`, `pas2js` | pas2js (Pascal -> JS, WASM) | | Gleam | `gleam` | Gleam language | | Elm | `elm` | Elm compiler (WASM) | | Haskell | `haskell`, `hs`, `lhs` | MicroHs (not GHC) | | Haskell (Wasm) | `haskell-wasm`, `hs-wasm`, `wasm.hs`, `hswasm` | GHC WASM | +| Rust (Wasm) | `rust-wasm`, `rs-wasm`, `wasm.rs` | Rust WASM | +| Swift (Wasm) | `swift-wasm`, `swift`, `wasm.swift` | Swift WASM | +| Zig (Wasm) | `zig-wasm`, `zig` | Zig WASM | | Tcl | `tcl` | Tcl interpreter | | WebAssembly | `wat`, `wast`, `wasm`, `webassembly` | WAT format | @@ -237,3 +243,4 @@ When loading files, extensions map to languages: | `.go` | Go | | `.php` | PHP | | `.java` | Java | +| `.pas`, `.pp` | Pascal | diff --git a/src/livecodes/i18n/locales/ar/language-info.lokalise.json b/src/livecodes/i18n/locales/ar/language-info.lokalise.json index 2a2565f934..741c911384 100644 --- a/src/livecodes/i18n/locales/ar/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/ar/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "Pascal يعمل في المتصفح باستخدام pas2js (من فريق Free Pascal) ومُجمَّع إلى WebAssembly." + }, + "pascal.link": { + "translation": " الموقع الرسمي لـ Free Pascal وثائق pas2js pas2js wiki وثائق LiveCodes تحميل القالب الأولي " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "بيرل تعمل في المتصفح باستخدام Perlito." }, diff --git a/src/livecodes/i18n/locales/ar/language-info.ts b/src/livecodes/i18n/locales/ar/language-info.ts index f9db2261f8..742780d07f 100644 --- a/src/livecodes/i18n/locales/ar/language-info.ts +++ b/src/livecodes/i18n/locales/ar/language-info.ts @@ -287,6 +287,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>موقع OCaml <3> <4>وثائق OCaml <5> <6>موقع ReScript <7> <8>تعلم X في Y دقائق، حيث X=OCaml <9> <10>تحميل القالب الأولي ', name: 'OCaml', }, + pascal: { + desc: 'Pascal يعمل في المتصفح باستخدام pas2js (من فريق Free Pascal) ومُجمَّع إلى WebAssembly.', + link: '<1> <2>الموقع الرسمي لـ Free Pascal <3> <4>وثائق pas2js <5> <6>pas2js wiki <7> <8>وثائق LiveCodes <9> <10>تحميل القالب الأولي ', + name: 'Pascal', + }, perl: { desc: 'بيرل تعمل في المتصفح باستخدام Perlito.', link: '<1> <2>الموقع الرسمي لـ Perl <3> <4>وثائق Perl <5> <6>ملف README لـ Perlito5 <7> <8>تعلم X في Y دقائق، حيث X=perl <9> <10>تحميل القالب الأولي ', diff --git a/src/livecodes/i18n/locales/ar/translation.lokalise.json b/src/livecodes/i18n/locales/ar/translation.lokalise.json index f2feafe7c6..1673803535 100644 --- a/src/livecodes/i18n/locales/ar/translation.lokalise.json +++ b/src/livecodes/i18n/locales/ar/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "قالب Ocaml" }, + "templates.starter.pascal": { + "translation": "قالب Pascal" + }, "templates.starter.perl": { "translation": "قالب Perl" }, diff --git a/src/livecodes/i18n/locales/ar/translation.ts b/src/livecodes/i18n/locales/ar/translation.ts index 54eb34f467..499713cae8 100644 --- a/src/livecodes/i18n/locales/ar/translation.ts +++ b/src/livecodes/i18n/locales/ar/translation.ts @@ -1024,6 +1024,7 @@ const translation: I18nTranslation = { minizinc: 'قالب MiniZinc', 'objc-wasm': 'قالب Objective-C (Wasm)', ocaml: 'قالب Ocaml', + pascal: 'قالب Pascal', perl: 'قالب Perl', phaser: 'قالب Phaser', php: 'قالب PHP', diff --git a/src/livecodes/i18n/locales/bn/language-info.lokalise.json b/src/livecodes/i18n/locales/bn/language-info.lokalise.json index 5946bb66a4..9f482658b7 100644 --- a/src/livecodes/i18n/locales/bn/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/bn/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "Free Pascal দলের pas2js ব্যবহার করে ব্রাউজারে Pascal চলছে, যা WebAssembly-তে কম্পাইল করা।" + }, + "pascal.link": { + "translation": " Free Pascal অফিসিয়াল ওয়েবসাইট pas2js ডকুমেন্টেশন pas2js wiki LiveCodes ডকুমেন্টেশন স্টার্টার টেমপ্লেট লোড করুন " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perlito ব্যবহার করে ব্রাউজারে চলমান Perl।" }, diff --git a/src/livecodes/i18n/locales/bn/language-info.ts b/src/livecodes/i18n/locales/bn/language-info.ts index 40afdc745c..e4092024bf 100644 --- a/src/livecodes/i18n/locales/bn/language-info.ts +++ b/src/livecodes/i18n/locales/bn/language-info.ts @@ -289,6 +289,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>OCaml ওয়েবসাইট <3> <4>OCaml ডকুমেন্টেশন <5> <6>ReScript ওয়েবসাইট <7> <8>Y মিনিটে X শিখুন, যেখানে X=OCaml <9> <10>স্টার্টার টেমপ্লেট লোড করুন ', name: 'OCaml', }, + pascal: { + desc: 'Free Pascal দলের pas2js ব্যবহার করে ব্রাউজারে Pascal চলছে, যা WebAssembly-তে কম্পাইল করা।', + link: '<1> <2>Free Pascal অফিসিয়াল ওয়েবসাইট <3> <4>pas2js ডকুমেন্টেশন <5> <6>pas2js wiki <7> <8>LiveCodes ডকুমেন্টেশন <9> <10>স্টার্টার টেমপ্লেট লোড করুন ', + name: 'Pascal', + }, perl: { desc: 'Perlito ব্যবহার করে ব্রাউজারে চলমান Perl।', link: '<1> <2>Perl অফিসিয়াল ওয়েবসাইট <3> <4>Perl ডকুমেন্টেশন <5> <6>Perlito5 Readme <7> <8>Y মিনিটে X শিখুন, যেখানে X=perl <9> <10>স্টার্টার টেমপ্লেট লোড করুন ', diff --git a/src/livecodes/i18n/locales/bn/translation.lokalise.json b/src/livecodes/i18n/locales/bn/translation.lokalise.json index 914792bd9b..88f47cad86 100644 --- a/src/livecodes/i18n/locales/bn/translation.lokalise.json +++ b/src/livecodes/i18n/locales/bn/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "Ocaml স্টার্টার" }, + "templates.starter.pascal": { + "translation": "Pascal স্টার্টার" + }, "templates.starter.perl": { "translation": "Perl স্টার্টার" }, diff --git a/src/livecodes/i18n/locales/bn/translation.ts b/src/livecodes/i18n/locales/bn/translation.ts index c677bfcc35..eb147fed14 100644 --- a/src/livecodes/i18n/locales/bn/translation.ts +++ b/src/livecodes/i18n/locales/bn/translation.ts @@ -1024,6 +1024,7 @@ const translation: I18nTranslation = { minizinc: 'MiniZinc স্টার্টার', 'objc-wasm': 'Objective-C (Wasm) স্টার্টার', ocaml: 'Ocaml স্টার্টার', + pascal: 'Pascal স্টার্টার', perl: 'Perl স্টার্টার', phaser: 'Phaser স্টার্টার', php: 'PHP স্টার্টার', diff --git a/src/livecodes/i18n/locales/de/language-info.lokalise.json b/src/livecodes/i18n/locales/de/language-info.lokalise.json index 0fbdaf2e0c..481a98eea0 100644 --- a/src/livecodes/i18n/locales/de/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/de/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "Pascal läuft im Browser mit pas2js (vom Free Pascal-Team) und wird zu WebAssembly kompiliert." + }, + "pascal.link": { + "translation": " Offizielle Free Pascal-Website pas2js-Dokumentation pas2js wiki LiveCodes-Dokumentationen Starter-Vorlage laden " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perl läuft im Browser mit Perlito." }, diff --git a/src/livecodes/i18n/locales/de/language-info.ts b/src/livecodes/i18n/locales/de/language-info.ts index f5e540a135..2a0478e53f 100644 --- a/src/livecodes/i18n/locales/de/language-info.ts +++ b/src/livecodes/i18n/locales/de/language-info.ts @@ -291,6 +291,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>OCaml Website <3> <4>OCaml Dokumentation <5> <6>ReScript Website <7> <8>Lerne X in Y Minuten, wobei X=OCaml <9> <10>Starter-Vorlage laden ', name: 'OCaml', }, + pascal: { + desc: 'Pascal läuft im Browser mit pas2js (vom Free Pascal-Team) und wird zu WebAssembly kompiliert.', + link: '<1> <2>Offizielle Free Pascal-Website <3> <4>pas2js-Dokumentation <5> <6>pas2js wiki <7> <8>LiveCodes-Dokumentationen <9> <10>Starter-Vorlage laden ', + name: 'Pascal', + }, perl: { desc: 'Perl läuft im Browser mit Perlito.', link: '<1> <2>Perl offizielle Website <3> <4>Perl Dokumentation <5> <6>Perlito5 Readme <7> <8>Lerne X in Y Minuten, wobei X=Perl <9> <10>Starter-Vorlage laden ', diff --git a/src/livecodes/i18n/locales/de/translation.lokalise.json b/src/livecodes/i18n/locales/de/translation.lokalise.json index be9f2e91a9..9674d0c940 100644 --- a/src/livecodes/i18n/locales/de/translation.lokalise.json +++ b/src/livecodes/i18n/locales/de/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "OCaml-Starter" }, + "templates.starter.pascal": { + "translation": "Pascal-Starter" + }, "templates.starter.perl": { "translation": "Perl-Starter" }, diff --git a/src/livecodes/i18n/locales/de/translation.ts b/src/livecodes/i18n/locales/de/translation.ts index 501fbf92ad..e80f5dab12 100644 --- a/src/livecodes/i18n/locales/de/translation.ts +++ b/src/livecodes/i18n/locales/de/translation.ts @@ -1026,6 +1026,7 @@ const translation: I18nTranslation = { minizinc: 'MiniZink-Starter', 'objc-wasm': 'Objective-C (Wasm)-Starter', ocaml: 'OCaml-Starter', + pascal: 'Pascal-Starter', perl: 'Perl-Starter', phaser: 'Phaser-Starter', php: 'PHP-Starter', diff --git a/src/livecodes/i18n/locales/es/language-info.lokalise.json b/src/livecodes/i18n/locales/es/language-info.lokalise.json index 4ff33090fa..58e185086a 100644 --- a/src/livecodes/i18n/locales/es/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/es/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "Pascal ejecutándose en el navegador usando pas2js (por el equipo de Free Pascal), compilado a WebAssembly." + }, + "pascal.link": { + "translation": " Sitio web oficial de Free Pascal Documentación de pas2js pas2js wiki Documentación de LiveCodes Cargar plantilla inicial " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perl ejecutándose en el navegador usando Perlito." }, diff --git a/src/livecodes/i18n/locales/es/language-info.ts b/src/livecodes/i18n/locales/es/language-info.ts index 49d5ecdfbc..ef9fd64dac 100644 --- a/src/livecodes/i18n/locales/es/language-info.ts +++ b/src/livecodes/i18n/locales/es/language-info.ts @@ -291,6 +291,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>Sitio web de OCaml <3> <4>Documentación de OCaml <5> <6>Sitio web de ReScript <7> <8>Aprende X en Y minutos, donde X=OCaml <9> <10>Cargar plantilla inicial ', name: 'OCaml', }, + pascal: { + desc: 'Pascal ejecutándose en el navegador usando pas2js (por el equipo de Free Pascal), compilado a WebAssembly.', + link: '<1> <2>Sitio web oficial de Free Pascal <3> <4>Documentación de pas2js <5> <6>pas2js wiki <7> <8>Documentación de LiveCodes <9> <10>Cargar plantilla inicial ', + name: 'Pascal', + }, perl: { desc: 'Perl ejecutándose en el navegador usando Perlito.', link: '<1> <2>Sitio web oficial de Perl <3> <4>Documentación de Perl <5> <6>Readme de Perlito5 <7> <8>Aprende X en Y minutos, donde X=perl <9> <10>Cargar plantilla inicial ', diff --git a/src/livecodes/i18n/locales/es/translation.lokalise.json b/src/livecodes/i18n/locales/es/translation.lokalise.json index e694648254..6802002ede 100644 --- a/src/livecodes/i18n/locales/es/translation.lokalise.json +++ b/src/livecodes/i18n/locales/es/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "Inicio Ocaml" }, + "templates.starter.pascal": { + "translation": "Inicio Pascal" + }, "templates.starter.perl": { "translation": "Inicio Perl" }, diff --git a/src/livecodes/i18n/locales/es/translation.ts b/src/livecodes/i18n/locales/es/translation.ts index c943ad56f7..6038137768 100644 --- a/src/livecodes/i18n/locales/es/translation.ts +++ b/src/livecodes/i18n/locales/es/translation.ts @@ -1024,6 +1024,7 @@ const translation: I18nTranslation = { minizinc: 'Inicio MiniZinc', 'objc-wasm': 'Inicio Objective-C (Wasm)', ocaml: 'Inicio Ocaml', + pascal: 'Inicio Pascal', perl: 'Inicio Perl', phaser: 'Inicio Phaser', php: 'Inicio PHP', diff --git a/src/livecodes/i18n/locales/fa/language-info.lokalise.json b/src/livecodes/i18n/locales/fa/language-info.lokalise.json index fc3245b201..cea5d71f47 100644 --- a/src/livecodes/i18n/locales/fa/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/fa/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "Pascal با استفاده از pas2js (توسط تیم Free Pascal) در مرورگر اجرا می‌شود و به WebAssembly کامپایل شده است." + }, + "pascal.link": { + "translation": " وب‌سایت رسمی Free Pascal مستندات pas2js pas2js wiki مستندات LiveCodes بارگذاری قالب شروع کننده " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perl که با استفاده از Perlito در مرورگر اجرا می‌شود." }, diff --git a/src/livecodes/i18n/locales/fa/language-info.ts b/src/livecodes/i18n/locales/fa/language-info.ts index 0d394b3eb9..e49db7e401 100644 --- a/src/livecodes/i18n/locales/fa/language-info.ts +++ b/src/livecodes/i18n/locales/fa/language-info.ts @@ -290,6 +290,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>وب‌سایت OCaml <3> <4>مستندات OCaml <5> <6>وب‌سایت ReScript <7> <8>یادگیری X در Y دقیقه، جایی که X=OCaml <9> <10>بارگذاری قالب شروع کننده ', name: 'OCaml', }, + pascal: { + desc: 'Pascal با استفاده از pas2js (توسط تیم Free Pascal) در مرورگر اجرا می‌شود و به WebAssembly کامپایل شده است.', + link: '<1> <2>وب‌سایت رسمی Free Pascal <3> <4>مستندات pas2js <5> <6>pas2js wiki <7> <8>مستندات LiveCodes <9> <10>بارگذاری قالب شروع کننده ', + name: 'Pascal', + }, perl: { desc: 'Perl که با استفاده از Perlito در مرورگر اجرا می‌شود.', link: '<1> <2>وب‌سایت رسمی Perl <3> <4>مستندات Perl <5> <6>فایل Readme پرلیتو5 <7> <8>یادگیری X در Y دقیقه، جایی که X=perl <9> <10>بارگذاری قالب شروع کننده ', diff --git a/src/livecodes/i18n/locales/fa/translation.lokalise.json b/src/livecodes/i18n/locales/fa/translation.lokalise.json index ec20a37980..f27523d5eb 100644 --- a/src/livecodes/i18n/locales/fa/translation.lokalise.json +++ b/src/livecodes/i18n/locales/fa/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "شروع کننده Ocaml" }, + "templates.starter.pascal": { + "translation": "شروع کننده Pascal" + }, "templates.starter.perl": { "translation": "شروع کننده Perl" }, diff --git a/src/livecodes/i18n/locales/fa/translation.ts b/src/livecodes/i18n/locales/fa/translation.ts index 55163f22b0..613867738b 100644 --- a/src/livecodes/i18n/locales/fa/translation.ts +++ b/src/livecodes/i18n/locales/fa/translation.ts @@ -1025,6 +1025,7 @@ const translation: I18nTranslation = { minizinc: 'شروع کننده MiniZinc', 'objc-wasm': 'شروع کننده Objective-C (Wasm)', ocaml: 'شروع کننده Ocaml', + pascal: 'شروع کننده Pascal', perl: 'شروع کننده Perl', phaser: 'شروع کننده Phaser', php: 'شروع کننده PHP', diff --git a/src/livecodes/i18n/locales/fr/language-info.lokalise.json b/src/livecodes/i18n/locales/fr/language-info.lokalise.json index 30547f00c1..724f624d31 100644 --- a/src/livecodes/i18n/locales/fr/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/fr/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "Pascal s'exécutant dans le navigateur en utilisant pas2js (par l'équipe Free Pascal), compilé en WebAssembly." + }, + "pascal.link": { + "translation": " Site officiel de Free Pascal Documentation pas2js pas2js wiki Documentations LiveCodes Charger le modèle de démarrage " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perl s'exécutant dans le navigateur en utilisant Perlito." }, diff --git a/src/livecodes/i18n/locales/fr/language-info.ts b/src/livecodes/i18n/locales/fr/language-info.ts index 753745d587..47c5a3f2e7 100644 --- a/src/livecodes/i18n/locales/fr/language-info.ts +++ b/src/livecodes/i18n/locales/fr/language-info.ts @@ -291,6 +291,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>Site web OCaml <3> <4>Documentation OCaml <5> <6>Site web ReScript <7> <8>Apprenez X en Y minutes, où X=OCaml <9> <10>Charger le modèle de démarrage ', name: 'OCaml', }, + pascal: { + desc: "Pascal s'exécutant dans le navigateur en utilisant pas2js (par l'équipe Free Pascal), compilé en WebAssembly.", + link: '<1> <2>Site officiel de Free Pascal <3> <4>Documentation pas2js <5> <6>pas2js wiki <7> <8>Documentations LiveCodes <9> <10>Charger le modèle de démarrage ', + name: 'Pascal', + }, perl: { desc: "Perl s'exécutant dans le navigateur en utilisant Perlito.", link: '<1> <2>Site officiel de Perl <3> <4>Documentation Perl <5> <6>Readme de Perlito5 <7> <8>Apprenez X en Y minutes, où X=perl <9> <10>Charger le modèle de démarrage ', diff --git a/src/livecodes/i18n/locales/fr/translation.lokalise.json b/src/livecodes/i18n/locales/fr/translation.lokalise.json index ecf3a38156..4486e59dcc 100644 --- a/src/livecodes/i18n/locales/fr/translation.lokalise.json +++ b/src/livecodes/i18n/locales/fr/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "Démarrage OCaml" }, + "templates.starter.pascal": { + "translation": "Démarrage Pascal" + }, "templates.starter.perl": { "translation": "Démarrage Perl" }, diff --git a/src/livecodes/i18n/locales/fr/translation.ts b/src/livecodes/i18n/locales/fr/translation.ts index 88b5d1df05..e48a77e1cb 100644 --- a/src/livecodes/i18n/locales/fr/translation.ts +++ b/src/livecodes/i18n/locales/fr/translation.ts @@ -1026,6 +1026,7 @@ const translation: I18nTranslation = { minizinc: 'Démarrage MiniZinc', 'objc-wasm': 'Démarrage Objective-C (Wasm)', ocaml: 'Démarrage OCaml', + pascal: 'Démarrage Pascal', perl: 'Démarrage Perl', phaser: 'Démarrage Phaser', php: 'Démarrage PHP', diff --git a/src/livecodes/i18n/locales/hi/language-info.lokalise.json b/src/livecodes/i18n/locales/hi/language-info.lokalise.json index beabd6f8ec..b149c41ef4 100644 --- a/src/livecodes/i18n/locales/hi/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/hi/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "Free Pascal टीम द्वारा pas2js का उपयोग करके ब्राउज़र में चलने वाला Pascal, जो WebAssembly में संकलित है।" + }, + "pascal.link": { + "translation": " Free Pascal आधिकारिक वेबसाइट pas2js दस्तावेज़ीकरण pas2js wiki लाइवकोड्स (LiveCodes) दस्तावेज़ स्टार्टर टेम्पलेट लोड करें " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perlito का उपयोग करके ब्राउज़र में चलने वाला Perl।" }, diff --git a/src/livecodes/i18n/locales/hi/language-info.ts b/src/livecodes/i18n/locales/hi/language-info.ts index c1cbc04830..eb8356b2c3 100644 --- a/src/livecodes/i18n/locales/hi/language-info.ts +++ b/src/livecodes/i18n/locales/hi/language-info.ts @@ -291,6 +291,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>OCaml वेबसाइट <3> <4>OCaml दस्तावेज़ीकरण <5> <6>ReScript वेबसाइट <7> <8>X को Y मिनटों में सीखें, जहां X=OCaml <9> <10>स्टार्टर टेम्पलेट लोड करें ', name: 'OCaml', }, + pascal: { + desc: 'Free Pascal टीम द्वारा pas2js का उपयोग करके ब्राउज़र में चलने वाला Pascal, जो WebAssembly में संकलित है।', + link: '<1> <2>Free Pascal आधिकारिक वेबसाइट <3> <4>pas2js दस्तावेज़ीकरण <5> <6>pas2js wiki <7> <8>लाइवकोड्स (LiveCodes) दस्तावेज़ <9> <10>स्टार्टर टेम्पलेट लोड करें ', + name: 'Pascal', + }, perl: { desc: 'Perlito का उपयोग करके ब्राउज़र में चलने वाला Perl।', link: '<1> <2>Perl आधिकारिक वेबसाइट <3> <4>Perl दस्तावेज़ीकरण <5> <6>Perlito5 रीडमी <7> <8>X को Y मिनटों में सीखें, जहां X=perl <9> <10>स्टार्टर टेम्पलेट लोड करें ', diff --git a/src/livecodes/i18n/locales/hi/translation.lokalise.json b/src/livecodes/i18n/locales/hi/translation.lokalise.json index ff6dc55e66..d3e68da583 100644 --- a/src/livecodes/i18n/locales/hi/translation.lokalise.json +++ b/src/livecodes/i18n/locales/hi/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "OCaml स्टार्टर" }, + "templates.starter.pascal": { + "translation": "Pascal स्टार्टर" + }, "templates.starter.perl": { "translation": "Perl स्टार्टर" }, diff --git a/src/livecodes/i18n/locales/hi/translation.ts b/src/livecodes/i18n/locales/hi/translation.ts index a815bfa6a4..ad533c80e1 100644 --- a/src/livecodes/i18n/locales/hi/translation.ts +++ b/src/livecodes/i18n/locales/hi/translation.ts @@ -1024,6 +1024,7 @@ const translation: I18nTranslation = { minizinc: 'MiniZinc स्टार्टर', 'objc-wasm': 'Objective-C (Wasm) स्टार्टर', ocaml: 'OCaml स्टार्टर', + pascal: 'Pascal स्टार्टर', perl: 'Perl स्टार्टर', phaser: 'Phaser स्टार्टर', php: 'PHP स्टार्टर', diff --git a/src/livecodes/i18n/locales/hu/language-info.lokalise.json b/src/livecodes/i18n/locales/hu/language-info.lokalise.json index e44f08e61d..8b16b5fbc8 100644 --- a/src/livecodes/i18n/locales/hu/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/hu/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "A Pascal a pas2js (a Free Pascal csapatától) segítségével fut a böngészőben, WebAssembly-re fordítva." + }, + "pascal.link": { + "translation": " Free Pascal hivatalos weboldal pas2js dokumentáció pas2js wiki LiveCodes dokumentációk Kezdő sablon betöltése " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perl fut a böngészőben a Perlito használatával." }, diff --git a/src/livecodes/i18n/locales/hu/language-info.ts b/src/livecodes/i18n/locales/hu/language-info.ts index d2306d8a53..89a67c23a6 100644 --- a/src/livecodes/i18n/locales/hu/language-info.ts +++ b/src/livecodes/i18n/locales/hu/language-info.ts @@ -291,6 +291,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>OCaml weboldal <3> <4>OCaml dokumentáció <5> <6>ReScript weboldal <7> <8>Tanulj X-et Y perc alatt, ahol X=OCaml <9> <10>Kezdő sablon betöltése ', name: 'OCaml', }, + pascal: { + desc: 'A Pascal a pas2js (a Free Pascal csapatától) segítségével fut a böngészőben, WebAssembly-re fordítva.', + link: '<1> <2>Free Pascal hivatalos weboldal <3> <4>pas2js dokumentáció <5> <6>pas2js wiki <7> <8>LiveCodes dokumentációk <9> <10>Kezdő sablon betöltése ', + name: 'Pascal', + }, perl: { desc: 'Perl fut a böngészőben a Perlito használatával.', link: '<1> <2>Perl hivatalos weboldal <3> <4>Perl dokumentáció <5> <6>Perlito5 Readme <7> <8>Tanulj X-et Y perc alatt, ahol X=perl <9> <10>Kezdő sablon betöltése ', diff --git a/src/livecodes/i18n/locales/hu/translation.lokalise.json b/src/livecodes/i18n/locales/hu/translation.lokalise.json index 104635491a..458c3480c6 100644 --- a/src/livecodes/i18n/locales/hu/translation.lokalise.json +++ b/src/livecodes/i18n/locales/hu/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "OCaml kezdő" }, + "templates.starter.pascal": { + "translation": "Pascal kezdő" + }, "templates.starter.perl": { "translation": "Perl kezdő" }, diff --git a/src/livecodes/i18n/locales/hu/translation.ts b/src/livecodes/i18n/locales/hu/translation.ts index 2211b85db4..670648f016 100644 --- a/src/livecodes/i18n/locales/hu/translation.ts +++ b/src/livecodes/i18n/locales/hu/translation.ts @@ -1025,6 +1025,7 @@ const translation: I18nTranslation = { minizinc: 'MiniZinc kezdő', 'objc-wasm': 'Objective-C (Wasm) kezdő', ocaml: 'OCaml kezdő', + pascal: 'Pascal kezdő', perl: 'Perl kezdő', phaser: 'Phaser kezdő', php: 'PHP kezdő', diff --git a/src/livecodes/i18n/locales/id/language-info.lokalise.json b/src/livecodes/i18n/locales/id/language-info.lokalise.json index c16b14315e..0237223eb5 100644 --- a/src/livecodes/i18n/locales/id/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/id/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "Pascal berjalan di browser menggunakan pas2js (oleh tim Free Pascal), dikompilasi ke WebAssembly." + }, + "pascal.link": { + "translation": " Situs web resmi Free Pascal Dokumentasi pas2js pas2js wiki Dokumentasi LiveCodes Muat template pemula " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perl berjalan di browser menggunakan Perlito." }, diff --git a/src/livecodes/i18n/locales/id/language-info.ts b/src/livecodes/i18n/locales/id/language-info.ts index 29d6af08b0..8cf8ddcd60 100644 --- a/src/livecodes/i18n/locales/id/language-info.ts +++ b/src/livecodes/i18n/locales/id/language-info.ts @@ -291,6 +291,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>Situs web OCaml <3> <4>Dokumentasi OCaml <5> <6>Situs web ReScript <7> <8>Pelajari X dalam Y menit, dengan X=OCaml <9> <10>Muat template pemula ', name: 'OCaml', }, + pascal: { + desc: 'Pascal berjalan di browser menggunakan pas2js (oleh tim Free Pascal), dikompilasi ke WebAssembly.', + link: '<1> <2>Situs web resmi Free Pascal <3> <4>Dokumentasi pas2js <5> <6>pas2js wiki <7> <8>Dokumentasi LiveCodes <9> <10>Muat template pemula ', + name: 'Pascal', + }, perl: { desc: 'Perl berjalan di browser menggunakan Perlito.', link: '<1> <2>Situs web resmi Perl <3> <4>Dokumentasi Perl <5> <6>Readme Perlito5 <7> <8>Pelajari X dalam Y menit, dengan X=perl <9> <10>Muat template pemula ', diff --git a/src/livecodes/i18n/locales/id/translation.lokalise.json b/src/livecodes/i18n/locales/id/translation.lokalise.json index 88ff86c599..a68183eef4 100644 --- a/src/livecodes/i18n/locales/id/translation.lokalise.json +++ b/src/livecodes/i18n/locales/id/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "Pemula Ocaml" }, + "templates.starter.pascal": { + "translation": "Pemula Pascal" + }, "templates.starter.perl": { "translation": "Pemula Perl" }, diff --git a/src/livecodes/i18n/locales/id/translation.ts b/src/livecodes/i18n/locales/id/translation.ts index fb8b322120..b41e05ed88 100644 --- a/src/livecodes/i18n/locales/id/translation.ts +++ b/src/livecodes/i18n/locales/id/translation.ts @@ -1024,6 +1024,7 @@ const translation: I18nTranslation = { minizinc: 'Pemula MiniZinc', 'objc-wasm': 'Pemula Objective-C (Wasm)', ocaml: 'Pemula Ocaml', + pascal: 'Pemula Pascal', perl: 'Pemula Perl', phaser: 'Pemula Phaser', php: 'Pemula PHP', diff --git a/src/livecodes/i18n/locales/it/language-info.lokalise.json b/src/livecodes/i18n/locales/it/language-info.lokalise.json index e87184820a..3f59d997bd 100644 --- a/src/livecodes/i18n/locales/it/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/it/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "Pascal in esecuzione nel browser utilizzando pas2js (del team Free Pascal), compilato in WebAssembly." + }, + "pascal.link": { + "translation": " Sito ufficiale di Free Pascal Documentazione di pas2js pas2js wiki Documentazione LiveCodes Carica modello di partenza " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perl in esecuzione nel browser utilizzando Perlito." }, diff --git a/src/livecodes/i18n/locales/it/language-info.ts b/src/livecodes/i18n/locales/it/language-info.ts index 946954ff46..7dd41519a8 100644 --- a/src/livecodes/i18n/locales/it/language-info.ts +++ b/src/livecodes/i18n/locales/it/language-info.ts @@ -290,6 +290,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>Sito web di OCaml <3> <4>Documentazione di OCaml <5> <6>Sito web di ReScript <7> <8>Impara X in Y minuti, dove X=OCaml <9> <10>Carica modello di partenza ', name: 'OCaml', }, + pascal: { + desc: 'Pascal in esecuzione nel browser utilizzando pas2js (del team Free Pascal), compilato in WebAssembly.', + link: '<1> <2>Sito ufficiale di Free Pascal <3> <4>Documentazione di pas2js <5> <6>pas2js wiki <7> <8>Documentazione LiveCodes <9> <10>Carica modello di partenza ', + name: 'Pascal', + }, perl: { desc: 'Perl in esecuzione nel browser utilizzando Perlito.', link: '<1> <2>Sito ufficiale di Perl <3> <4>Documentazione di Perl <5> <6>Readme di Perlito5 <7> <8>Impara X in Y minuti, dove X=perl <9> <10>Carica modello di partenza ', diff --git a/src/livecodes/i18n/locales/it/translation.lokalise.json b/src/livecodes/i18n/locales/it/translation.lokalise.json index c8c7981ddd..f1089ecb6c 100644 --- a/src/livecodes/i18n/locales/it/translation.lokalise.json +++ b/src/livecodes/i18n/locales/it/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "Starter OCaml" }, + "templates.starter.pascal": { + "translation": "Starter Pascal" + }, "templates.starter.perl": { "translation": "Starter Perl" }, diff --git a/src/livecodes/i18n/locales/it/translation.ts b/src/livecodes/i18n/locales/it/translation.ts index af608f2a13..0fa3198ecf 100644 --- a/src/livecodes/i18n/locales/it/translation.ts +++ b/src/livecodes/i18n/locales/it/translation.ts @@ -1025,6 +1025,7 @@ const translation: I18nTranslation = { minizinc: 'Starter MiniZinc', 'objc-wasm': 'Starter Objective-C (Wasm)', ocaml: 'Starter OCaml', + pascal: 'Starter Pascal', perl: 'Starter Perl', phaser: 'Starter Phaser', php: 'Starter PHP', diff --git a/src/livecodes/i18n/locales/ja/language-info.lokalise.json b/src/livecodes/i18n/locales/ja/language-info.lokalise.json index d510b784d6..b22e3b6c95 100644 --- a/src/livecodes/i18n/locales/ja/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/ja/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "pas2js(Free Pascal チームによる)を使用してブラウザで動作する Pascal。WebAssembly にコンパイルされます。" + }, + "pascal.link": { + "translation": " Free Pascal 公式ウェブサイト pas2js ドキュメント pas2js wiki LiveCodes ドキュメント スターターテンプレートを読み込む " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perlito を使用してブラウザで動作する Perl。" }, diff --git a/src/livecodes/i18n/locales/ja/language-info.ts b/src/livecodes/i18n/locales/ja/language-info.ts index 2c4fa14c44..5c8add15d6 100644 --- a/src/livecodes/i18n/locales/ja/language-info.ts +++ b/src/livecodes/i18n/locales/ja/language-info.ts @@ -291,6 +291,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>OCaml ウェブサイト <3> <4>OCaml ドキュメント <5> <6>ReScript ウェブサイト <7> <8>X分でYを学ぶ、X=OCaml <9> <10>スターターテンプレートを読み込む ', name: 'OCaml', }, + pascal: { + desc: 'pas2js(Free Pascal チームによる)を使用してブラウザで動作する Pascal。WebAssembly にコンパイルされます。', + link: '<1> <2>Free Pascal 公式ウェブサイト <3> <4>pas2js ドキュメント <5> <6>pas2js wiki <7> <8>LiveCodes ドキュメント <9> <10>スターターテンプレートを読み込む ', + name: 'Pascal', + }, perl: { desc: 'Perlito を使用してブラウザで動作する Perl。', link: '<1> <2>Perl 公式ウェブサイト <3> <4>Perl ドキュメント <5> <6>Perlito5 Readme <7> <8>X分でYを学ぶ、X=perl <9> <10>スターターテンプレートを読み込む ', diff --git a/src/livecodes/i18n/locales/ja/translation.lokalise.json b/src/livecodes/i18n/locales/ja/translation.lokalise.json index 01185a398e..7cd7e6a7ec 100644 --- a/src/livecodes/i18n/locales/ja/translation.lokalise.json +++ b/src/livecodes/i18n/locales/ja/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "OCamlスターター" }, + "templates.starter.pascal": { + "translation": "Pascalスターター" + }, "templates.starter.perl": { "translation": "Perlスターター" }, diff --git a/src/livecodes/i18n/locales/ja/translation.ts b/src/livecodes/i18n/locales/ja/translation.ts index 000e5cf657..330405b3cc 100644 --- a/src/livecodes/i18n/locales/ja/translation.ts +++ b/src/livecodes/i18n/locales/ja/translation.ts @@ -1025,6 +1025,7 @@ const translation: I18nTranslation = { minizinc: 'MiniZincスターター', 'objc-wasm': 'Objective-C(Wasm)スターター', ocaml: 'OCamlスターター', + pascal: 'Pascalスターター', perl: 'Perlスターター', phaser: 'Phaserスターター', php: 'PHPスターター', diff --git a/src/livecodes/i18n/locales/nl/language-info.lokalise.json b/src/livecodes/i18n/locales/nl/language-info.lokalise.json index f962a695b8..9c5f416ed2 100644 --- a/src/livecodes/i18n/locales/nl/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/nl/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "Pascal draaiend in de browser met pas2js (van het Free Pascal-team), gecompileerd naar WebAssembly." + }, + "pascal.link": { + "translation": " Free Pascal officiële website pas2js-documentatie pas2js wiki LiveCodes-documentatie Startsjabloon laden " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perl draaiend in de browser met Perlito." }, diff --git a/src/livecodes/i18n/locales/nl/language-info.ts b/src/livecodes/i18n/locales/nl/language-info.ts index d355a2d516..fdd30ec70a 100644 --- a/src/livecodes/i18n/locales/nl/language-info.ts +++ b/src/livecodes/i18n/locales/nl/language-info.ts @@ -290,6 +290,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>OCaml website <3> <4>OCaml documentatie <5> <6>ReScript website <7> <8>Leer X in Y minuten, waarbij X=OCaml <9> <10>Startsjabloon laden ', name: 'OCaml', }, + pascal: { + desc: 'Pascal draaiend in de browser met pas2js (van het Free Pascal-team), gecompileerd naar WebAssembly.', + link: '<1> <2>Free Pascal officiële website <3> <4>pas2js-documentatie <5> <6>pas2js wiki <7> <8>LiveCodes-documentatie <9> <10>Startsjabloon laden ', + name: 'Pascal', + }, perl: { desc: 'Perl draaiend in de browser met Perlito.', link: '<1> <2>Perl officiële website <3> <4>Perl documentatie <5> <6>Perlito5 Readme <7> <8>Leer X in Y minuten, waarbij X=perl <9> <10>Startsjabloon laden ', diff --git a/src/livecodes/i18n/locales/nl/translation.lokalise.json b/src/livecodes/i18n/locales/nl/translation.lokalise.json index 28bad6fb4e..460dc14611 100644 --- a/src/livecodes/i18n/locales/nl/translation.lokalise.json +++ b/src/livecodes/i18n/locales/nl/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "Ocaml-starter" }, + "templates.starter.pascal": { + "translation": "Pascal-starter" + }, "templates.starter.perl": { "translation": "Perl-starter" }, diff --git a/src/livecodes/i18n/locales/nl/translation.ts b/src/livecodes/i18n/locales/nl/translation.ts index eae95d3766..e460b10a01 100644 --- a/src/livecodes/i18n/locales/nl/translation.ts +++ b/src/livecodes/i18n/locales/nl/translation.ts @@ -1025,6 +1025,7 @@ const translation: I18nTranslation = { minizinc: 'MiniZinc Starter', 'objc-wasm': 'Objective-C (Wasm)-starter', ocaml: 'Ocaml-starter', + pascal: 'Pascal-starter', perl: 'Perl-starter', phaser: 'Phaser-starter', php: 'PHP-starter', diff --git a/src/livecodes/i18n/locales/pt/language-info.lokalise.json b/src/livecodes/i18n/locales/pt/language-info.lokalise.json index 527e405db1..a9e9a97962 100644 --- a/src/livecodes/i18n/locales/pt/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/pt/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "Pascal rodando no navegador usando pas2js (pela equipe do Free Pascal), compilado para WebAssembly." + }, + "pascal.link": { + "translation": " Site oficial do Free Pascal Documentação do pas2js pas2js wiki Documentação do LiveCodes Carregar modelo inicial " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perl rodando no navegador usando Perlito." }, diff --git a/src/livecodes/i18n/locales/pt/language-info.ts b/src/livecodes/i18n/locales/pt/language-info.ts index c30c4689e1..6e148d7c0c 100644 --- a/src/livecodes/i18n/locales/pt/language-info.ts +++ b/src/livecodes/i18n/locales/pt/language-info.ts @@ -290,6 +290,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>Site do OCaml <3> <4>Documentação do OCaml <5> <6>Site do ReScript <7> <8>Aprenda X em Y minutos, onde X=OCaml <9> <10>Carregar modelo inicial ', name: 'OCaml', }, + pascal: { + desc: 'Pascal rodando no navegador usando pas2js (pela equipe do Free Pascal), compilado para WebAssembly.', + link: '<1> <2>Site oficial do Free Pascal <3> <4>Documentação do pas2js <5> <6>pas2js wiki <7> <8>Documentação do LiveCodes <9> <10>Carregar modelo inicial ', + name: 'Pascal', + }, perl: { desc: 'Perl rodando no navegador usando Perlito.', link: '<1> <2>Site oficial do Perl <3> <4>Documentação do Perl <5> <6>Readme do Perlito5 <7> <8>Aprenda X em Y minutos, onde X=perl <9> <10>Carregar modelo inicial ', diff --git a/src/livecodes/i18n/locales/pt/translation.lokalise.json b/src/livecodes/i18n/locales/pt/translation.lokalise.json index a9f4e98a9f..f4c800a9b9 100644 --- a/src/livecodes/i18n/locales/pt/translation.lokalise.json +++ b/src/livecodes/i18n/locales/pt/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "Iniciante OCaml" }, + "templates.starter.pascal": { + "translation": "Iniciante Pascal" + }, "templates.starter.perl": { "translation": "Iniciante Perl" }, diff --git a/src/livecodes/i18n/locales/pt/translation.ts b/src/livecodes/i18n/locales/pt/translation.ts index b08a6eb025..326d71cdcc 100644 --- a/src/livecodes/i18n/locales/pt/translation.ts +++ b/src/livecodes/i18n/locales/pt/translation.ts @@ -1025,6 +1025,7 @@ const translation: I18nTranslation = { minizinc: 'Iniciante MiniZinc', 'objc-wasm': 'Iniciante Objective-C (Wasm)', ocaml: 'Iniciante OCaml', + pascal: 'Iniciante Pascal', perl: 'Iniciante Perl', phaser: 'Iniciante Phaser', php: 'Iniciante PHP', diff --git a/src/livecodes/i18n/locales/ru/language-info.lokalise.json b/src/livecodes/i18n/locales/ru/language-info.lokalise.json index 76c5c5f4fc..ab0992be50 100644 --- a/src/livecodes/i18n/locales/ru/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/ru/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "Pascal, работающий в браузере с использованием pas2js (от команды Free Pascal), скомпилирован в WebAssembly." + }, + "pascal.link": { + "translation": " Официальный сайт Free Pascal Документация pas2js pas2js wiki Документация LiveCodes Загрузить стартовый шаблон " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perl, работающий в браузере с использованием Perlito." }, diff --git a/src/livecodes/i18n/locales/ru/language-info.ts b/src/livecodes/i18n/locales/ru/language-info.ts index 791f0d80b4..706656b352 100644 --- a/src/livecodes/i18n/locales/ru/language-info.ts +++ b/src/livecodes/i18n/locales/ru/language-info.ts @@ -292,6 +292,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>Сайт OCaml <3> <4>Документация OCaml <5> <6>Сайт ReScript <7> <8>Изучите X за Y минут, где X=OCaml <9> <10>Загрузить стартовый шаблон ', name: 'OCaml', }, + pascal: { + desc: 'Pascal, работающий в браузере с использованием pas2js (от команды Free Pascal), скомпилирован в WebAssembly.', + link: '<1> <2>Официальный сайт Free Pascal <3> <4>Документация pas2js <5> <6>pas2js wiki <7> <8>Документация LiveCodes <9> <10>Загрузить стартовый шаблон ', + name: 'Pascal', + }, perl: { desc: 'Perl, работающий в браузере с использованием Perlito.', link: '<1> <2>Официальный сайт Perl <3> <4>Документация Perl <5> <6>Readme Perlito5 <7> <8>Изучите X за Y минут, где X=perl <9> <10>Загрузить стартовый шаблон ', diff --git a/src/livecodes/i18n/locales/ru/translation.lokalise.json b/src/livecodes/i18n/locales/ru/translation.lokalise.json index 555a504e14..2c7429fe19 100644 --- a/src/livecodes/i18n/locales/ru/translation.lokalise.json +++ b/src/livecodes/i18n/locales/ru/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "Стартер OCaml" }, + "templates.starter.pascal": { + "translation": "Стартер Pascal" + }, "templates.starter.perl": { "translation": "Стартер Perl" }, diff --git a/src/livecodes/i18n/locales/ru/translation.ts b/src/livecodes/i18n/locales/ru/translation.ts index 37c1cde383..00e58229f1 100644 --- a/src/livecodes/i18n/locales/ru/translation.ts +++ b/src/livecodes/i18n/locales/ru/translation.ts @@ -1024,6 +1024,7 @@ const translation: I18nTranslation = { minizinc: 'Стартер MiniZinc', 'objc-wasm': 'Стартер Objective-C (Wasm)', ocaml: 'Стартер OCaml', + pascal: 'Стартер Pascal', perl: 'Стартер Perl', phaser: 'Стартер Phaser', php: 'Стартер PHP', diff --git a/src/livecodes/i18n/locales/tr/language-info.lokalise.json b/src/livecodes/i18n/locales/tr/language-info.lokalise.json index 78771904f1..a92dd359de 100644 --- a/src/livecodes/i18n/locales/tr/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/tr/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "Pascal, Free Pascal ekibi tarafından pas2js kullanılarak tarayıcıda çalışır ve WebAssembly'ye derlenir." + }, + "pascal.link": { + "translation": " Free Pascal resmi web sitesi pas2js dokümantasyonu pas2js wiki LiveCodes Belgeleri Başlangıç şablonunu yükle " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "Perlito kullanılarak tarayıcıda çalışan Perl." }, diff --git a/src/livecodes/i18n/locales/tr/language-info.ts b/src/livecodes/i18n/locales/tr/language-info.ts index 81a269936b..60e65f8b7d 100644 --- a/src/livecodes/i18n/locales/tr/language-info.ts +++ b/src/livecodes/i18n/locales/tr/language-info.ts @@ -291,6 +291,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>OCaml web sitesi <3> <4>OCaml dokümantasyonu <5> <6>ReScript web sitesi <7> <8>Y Dakikada X Öğrenin, X=OCaml <9> <10>Başlangıç şablonunu yükle ', name: 'OCaml', }, + pascal: { + desc: "Pascal, Free Pascal ekibi tarafından pas2js kullanılarak tarayıcıda çalışır ve WebAssembly'ye derlenir.", + link: '<1> <2>Free Pascal resmi web sitesi <3> <4>pas2js dokümantasyonu <5> <6>pas2js wiki <7> <8>LiveCodes Belgeleri <9> <10>Başlangıç şablonunu yükle ', + name: 'Pascal', + }, perl: { desc: 'Perlito kullanılarak tarayıcıda çalışan Perl.', link: '<1> <2>Perl resmi web sitesi <3> <4>Perl dokümantasyonu <5> <6>Perlito5 Benioku <7> <8>Y Dakikada X Öğrenin, X=perl <9> <10>Başlangıç şablonunu yükle ', diff --git a/src/livecodes/i18n/locales/tr/translation.lokalise.json b/src/livecodes/i18n/locales/tr/translation.lokalise.json index 48f581a7e0..e4b851c669 100644 --- a/src/livecodes/i18n/locales/tr/translation.lokalise.json +++ b/src/livecodes/i18n/locales/tr/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "Ocaml Başlangıç" }, + "templates.starter.pascal": { + "translation": "Pascal Başlangıç" + }, "templates.starter.perl": { "translation": "Perl Başlangıç" }, diff --git a/src/livecodes/i18n/locales/tr/translation.ts b/src/livecodes/i18n/locales/tr/translation.ts index 77025c5968..6595ad3ae5 100644 --- a/src/livecodes/i18n/locales/tr/translation.ts +++ b/src/livecodes/i18n/locales/tr/translation.ts @@ -1025,6 +1025,7 @@ const translation: I18nTranslation = { minizinc: 'MiniZinc Başlangıç', 'objc-wasm': 'Objective-C (Wasm) Başlangıç', ocaml: 'Ocaml Başlangıç', + pascal: 'Pascal Başlangıç', perl: 'Perl Başlangıç', phaser: 'Phaser Başlangıç', php: 'PHP Başlangıç', diff --git a/src/livecodes/i18n/locales/ur/language-info.lokalise.json b/src/livecodes/i18n/locales/ur/language-info.lokalise.json index e836b2d5b2..965564310c 100644 --- a/src/livecodes/i18n/locales/ur/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/ur/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "او کیمل" }, + "pascal.desc": { + "translation": "Free Pascal ٹیم کے pas2js کا استعمال کرتے ہوئے براؤزر میں چلنے والا Pascal، جو WebAssembly میں مرتب کیا گیا ہے۔" + }, + "pascal.link": { + "translation": " Free Pascal کی سرکاری ویب سائٹ pas2js دستاویزات pas2js wiki لائیو کوڈز دستاویزات ابتدائی سانچہ لوڈ کریں " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "پرلیٹو کا استعمال کرتے ہوئے براؤزر میں چلنے والا پرل۔" }, diff --git a/src/livecodes/i18n/locales/ur/language-info.ts b/src/livecodes/i18n/locales/ur/language-info.ts index 894a3292c1..7f914cfa0a 100644 --- a/src/livecodes/i18n/locales/ur/language-info.ts +++ b/src/livecodes/i18n/locales/ur/language-info.ts @@ -292,6 +292,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>او کیمل ویب سائٹ <3> <4>او کیمل دستاویزات <5> <6>ری اسکرپٹ ویب سائٹ <7> <8>X کو Y منٹ میں سیکھیں، جہاں X=او کیمل <9> <10>ابتدائی سانچہ لوڈ کریں ', name: 'او کیمل', }, + pascal: { + desc: 'Free Pascal ٹیم کے pas2js کا استعمال کرتے ہوئے براؤزر میں چلنے والا Pascal، جو WebAssembly میں مرتب کیا گیا ہے۔', + link: '<1> <2>Free Pascal کی سرکاری ویب سائٹ <3> <4>pas2js دستاویزات <5> <6>pas2js wiki <7> <8>لائیو کوڈز دستاویزات <9> <10>ابتدائی سانچہ لوڈ کریں ', + name: 'Pascal', + }, perl: { desc: 'پرلیٹو کا استعمال کرتے ہوئے براؤزر میں چلنے والا پرل۔', link: '<1> <2>پرل کی سرکاری ویب سائٹ <3> <4>پرل دستاویزات <5> <6>پرلیٹو5 ریڈمی <7> <8>X کو Y منٹ میں سیکھیں، جہاں X=پرل <9> <10>ابتدائی سانچہ لوڈ کریں ', diff --git a/src/livecodes/i18n/locales/ur/translation.lokalise.json b/src/livecodes/i18n/locales/ur/translation.lokalise.json index e3c100f646..e7f0b4f6db 100644 --- a/src/livecodes/i18n/locales/ur/translation.lokalise.json +++ b/src/livecodes/i18n/locales/ur/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "اوکامل شروعاتی" }, + "templates.starter.pascal": { + "translation": "پاسکل شروعاتی" + }, "templates.starter.perl": { "translation": "پرل شروعاتی" }, diff --git a/src/livecodes/i18n/locales/ur/translation.ts b/src/livecodes/i18n/locales/ur/translation.ts index de0e09e88a..9400e4c0eb 100644 --- a/src/livecodes/i18n/locales/ur/translation.ts +++ b/src/livecodes/i18n/locales/ur/translation.ts @@ -1024,6 +1024,7 @@ const translation: I18nTranslation = { minizinc: 'MiniZinc شروعاتی', 'objc-wasm': 'Objective-C (واسم) شروعاتی', ocaml: 'اوکامل شروعاتی', + pascal: 'پاسکل شروعاتی', perl: 'پرل شروعاتی', phaser: 'فیزر شروعاتی', php: 'پی ایچ پی شروعاتی', diff --git a/src/livecodes/i18n/locales/zh-CN/language-info.lokalise.json b/src/livecodes/i18n/locales/zh-CN/language-info.lokalise.json index 21618b6c8f..242b7e7b7e 100644 --- a/src/livecodes/i18n/locales/zh-CN/language-info.lokalise.json +++ b/src/livecodes/i18n/locales/zh-CN/language-info.lokalise.json @@ -510,6 +510,15 @@ "ocaml.name": { "translation": "OCaml" }, + "pascal.desc": { + "translation": "使用 Free Pascal 团队的 pas2js 在浏览器中运行的 Pascal,并编译为 WebAssembly。" + }, + "pascal.link": { + "translation": " Free Pascal 官网 pas2js 文档 pas2js wiki LiveCodes 文档 加载启动模板 " + }, + "pascal.name": { + "translation": "Pascal" + }, "perl.desc": { "translation": "使用 Perlito 在浏览器中运行的 Perl。" }, diff --git a/src/livecodes/i18n/locales/zh-CN/language-info.ts b/src/livecodes/i18n/locales/zh-CN/language-info.ts index 5673a2f181..d7d3a42ddf 100644 --- a/src/livecodes/i18n/locales/zh-CN/language-info.ts +++ b/src/livecodes/i18n/locales/zh-CN/language-info.ts @@ -285,6 +285,11 @@ const languageInfo: I18nLangInfoTranslation = { link: '<1><2>OCaml 官方网站 <3> <4>OCaml 文档 <5> <6>ReScript 网站 <7> <8>在 Y 分钟内学习 X,其中 X=OCaml <9> <10>加载启动模板 ', name: 'OCaml', }, + pascal: { + desc: '使用 Free Pascal 团队的 pas2js 在浏览器中运行的 Pascal,并编译为 WebAssembly。', + link: '<1> <2>Free Pascal 官网 <3> <4>pas2js 文档 <5> <6>pas2js wiki <7> <8>LiveCodes 文档 <9> <10>加载启动模板 ', + name: 'Pascal', + }, perl: { desc: '使用 Perlito 在浏览器中运行的 Perl。', link: '<1> <2>Perl 官网 <3> <4>Perl 文档 <5> <6>Perlito5 自述文件 <7> <8>在 Y 分钟内学习 X,其中 X=Perl <9> <10>加载启动模板 ', diff --git a/src/livecodes/i18n/locales/zh-CN/translation.lokalise.json b/src/livecodes/i18n/locales/zh-CN/translation.lokalise.json index 8baeaa45d1..b978e4da81 100644 --- a/src/livecodes/i18n/locales/zh-CN/translation.lokalise.json +++ b/src/livecodes/i18n/locales/zh-CN/translation.lokalise.json @@ -2055,6 +2055,9 @@ "templates.starter.ocaml": { "translation": "Ocaml 启动模板" }, + "templates.starter.pascal": { + "translation": "Pascal 启动模板" + }, "templates.starter.perl": { "translation": "Perl 启动模板" }, diff --git a/src/livecodes/i18n/locales/zh-CN/translation.ts b/src/livecodes/i18n/locales/zh-CN/translation.ts index c90e5e0ce6..b7fca254ae 100644 --- a/src/livecodes/i18n/locales/zh-CN/translation.ts +++ b/src/livecodes/i18n/locales/zh-CN/translation.ts @@ -1022,6 +1022,7 @@ const translation: I18nTranslation = { minizinc: 'MiniZinc 启动模板', 'objc-wasm': 'Objective-C(WASM)启动模板', ocaml: 'Ocaml 启动模板', + pascal: 'Pascal 启动模板', perl: 'Perl 启动模板', phaser: 'Phaser 启动模板', php: 'PHP 启动模板', diff --git a/src/livecodes/languages/pascal/lang-pascal-compiler.ts b/src/livecodes/languages/pascal/lang-pascal-compiler.ts index 240c067dae..fbe41c6d43 100644 --- a/src/livecodes/languages/pascal/lang-pascal-compiler.ts +++ b/src/livecodes/languages/pascal/lang-pascal-compiler.ts @@ -28,11 +28,25 @@ const formatDiagnostics = (diagnostics: string) => { }; (self as any).createPascalCompiler = (): CompilerFunction => { - const compilerPromise = pascalWasm.createCompiler({ baseUrl: pascalWasmBaseUrl }); + let compiler: ReturnType | undefined; + + const getCompiler = () => { + if (!compiler) { + compiler = pascalWasm.createCompiler({ baseUrl: pascalWasmBaseUrl }); + // do not keep a failed boot (e.g. a transient network error) + compiler.catch(() => { + compiler = undefined; + }); + } + return compiler; + }; + + // the compiler (a ~9 MB WASM module) is loaded once and kept warm + getCompiler().catch(() => undefined); + return async (code) => { if (!code.trim()) return ''; - const compiler = await compilerPromise; - const { js, diagnostics } = await compiler.compile(code); + const { js, diagnostics } = await (await getCompiler()).compile(code); if (!js) { return { code: '', info: { errors: formatDiagnostics(diagnostics) } }; }