Skip to content

Commit 9fd6736

Browse files
GarboMuffinjexjws
authored andcommitted
Update translation workflows (TurboWarp#1866)
- update upload translations sanity checks to be more strict - schedule download translations workflow to run twice per week
1 parent a741015 commit 9fd6736

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/download-translations.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Download translations
22

33
on:
44
workflow_dispatch:
5+
schedule:
6+
# Time 10:44 was chosen at random to avoid periods of high load.
7+
- cron: "44 10 * * WED,SAT"
58

69
concurrency:
710
group: "download-translations"

development/upload-translations.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ const Builder = require("./builder");
99

1010
const uploadRuntimeStrings = async (strings) => {
1111
if (
12-
typeof strings["lab/text@_Animated Text"].string !== "string" ||
13-
typeof strings["lab/text@_Animated Text"].developer_comment !== "string" ||
14-
Object.keys(strings).length < 500
12+
strings["lab/text@_Animated Text"].string !== "Animated Text" ||
13+
strings["lab/text@_Animated Text"].developer_comment !==
14+
"Part of the 'Animated Text' extension." ||
15+
Object.keys(strings).length < 1500
1516
) {
1617
throw new Error("Sanity check failed.");
1718
}
@@ -29,9 +30,10 @@ const uploadRuntimeStrings = async (strings) => {
2930

3031
const uploadMetadataStrings = async (strings) => {
3132
if (
32-
typeof strings["lab/text@name"].string !== "string" ||
33-
typeof strings["lab/text@name"].developer_comment !== "string" ||
34-
Object.keys(strings).length < 100
33+
strings["lab/text@name"].string !== "Animated Text" ||
34+
strings["lab/text@name"].developer_comment !==
35+
"Name of the 'Animated Text' extension in the extension gallery." ||
36+
Object.keys(strings).length < 150
3537
) {
3638
throw new Error("Sanity check failed.");
3739
}

0 commit comments

Comments
 (0)