Skip to content

Commit 0183a3b

Browse files
Add in-context translations (#600)
Supports ?flag=translate https://microbit-global.monday.com/boards/1125389526/pulses/2013067342 (private)
1 parent c43739e commit 0183a3b

File tree

12 files changed

+4577
-17
lines changed

12 files changed

+4577
-17
lines changed

bin/update-translations.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const fs = require("fs");
2020
const okExitStatus = 0;
2121
const errExitStatus = 2;
2222

23-
const languages = ["ca", "en", "es-ES", "ja", "ko", "nl", "pl", "pt-br", "zh-tw"];
23+
const languages = ["ca", "en", "es-ES", "ja", "ko", "nl", "pl", "pt-br", "zh-tw", "lol"];
2424
const enMessagesToAdd = {
2525
"ml.onStart|block": {
2626
defaultMessage: "on ML $event start",

index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@
4242
window.dataLayer.push(arguments);
4343
};
4444
</script>
45+
<script type="text/javascript" id="crowdin-jipt-config">
46+
(function () {
47+
function escape() {
48+
window.location.href = "%VITE_FULL_URL%";
49+
}
50+
window._jipt = [
51+
["project", "microbitorg"],
52+
["escape", escape],
53+
];
54+
})();
55+
</script>
4556
<script type="module" src="/src/main.tsx"></script>
4657
</head>
4758

0 commit comments

Comments
 (0)