Skip to content

Commit fc8b9fa

Browse files
committed
Fix support for guidata v3.10 (new translation feature)
1 parent 111f92c commit fc8b9fa

File tree

7 files changed

+440
-777
lines changed

7 files changed

+440
-777
lines changed

.vscode/tasks.json

Lines changed: 141 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,61 +4,174 @@
44
"version": "2.0.0",
55
"tasks": [
66
{
7-
"label": "gettext - Scan",
8-
"type": "shell",
9-
"command": "cmd",
7+
"label": "sphinx-build",
8+
"command": "${command:python.interpreterPath}",
109
"args": [
11-
"/c",
12-
"gettext_scan.bat"
10+
"-m",
11+
"sphinx",
12+
"build",
13+
"doc",
14+
"build/gettext",
15+
"-b",
16+
"gettext",
17+
"-W"
1318
],
1419
"options": {
15-
"cwd": "scripts",
16-
"env": {
17-
"PYTHON": "${env:CDL_PYTHONEXE}",
18-
"UNATTENDED": "1"
20+
"cwd": "${workspaceFolder}",
21+
"statusbar": {
22+
"hide": true
1923
}
2024
},
2125
"group": {
2226
"kind": "build",
23-
"isDefault": true
27+
"isDefault": false
2428
},
2529
"presentation": {
30+
"clear": true,
2631
"echo": true,
27-
"reveal": "always",
2832
"focus": false,
29-
"panel": "shared",
33+
"panel": "dedicated",
34+
"reveal": "always",
3035
"showReuseMessage": true,
31-
"clear": false
32-
}
36+
},
37+
"type": "shell"
3338
},
3439
{
35-
"label": "gettext - Compile",
40+
"label": "sphinx-intl update",
41+
"command": "${command:python.interpreterPath}",
42+
"args": [
43+
"-m",
44+
"sphinx_intl",
45+
"update",
46+
"-d",
47+
"doc/locale",
48+
"-p",
49+
"build/gettext",
50+
"-l",
51+
"fr",
52+
"--no-obsolete",
53+
"-w",
54+
"0",
55+
],
56+
"options": {
57+
"cwd": "${workspaceFolder}",
58+
"statusbar": {
59+
"hide": true
60+
}
61+
},
62+
"group": {
63+
"kind": "build",
64+
"isDefault": false
65+
},
66+
"presentation": {
67+
"clear": true,
68+
"echo": true,
69+
"focus": false,
70+
"panel": "dedicated",
71+
"reveal": "always",
72+
"showReuseMessage": true,
73+
},
3674
"type": "shell",
37-
"command": "cmd",
75+
"dependsOrder": "sequence",
76+
"dependsOn": [
77+
"sphinx-build"
78+
]
79+
},
80+
{
81+
"label": "sphinx-intl build",
82+
"command": "${command:python.interpreterPath}",
3883
"args": [
39-
"/c",
40-
"gettext.bat",
41-
"compile"
84+
"-m",
85+
"sphinx_intl",
86+
"build",
4287
],
4388
"options": {
44-
"cwd": "scripts",
45-
"env": {
46-
"PYTHON": "${env:CDL_PYTHONEXE}",
47-
"UNATTENDED": "1"
89+
"cwd": "${workspaceFolder}/doc",
90+
"statusbar": {
91+
"hide": true
4892
}
4993
},
5094
"group": {
5195
"kind": "build",
52-
"isDefault": true
96+
"isDefault": false
5397
},
5498
"presentation": {
99+
"clear": true,
55100
"echo": true,
101+
"focus": false,
102+
"panel": "dedicated",
56103
"reveal": "always",
104+
"showReuseMessage": true
105+
},
106+
"type": "shell"
107+
},
108+
{
109+
"label": "🔎 Scan translations",
110+
"command": "${command:python.interpreterPath}",
111+
"args": [
112+
"-m",
113+
"guidata.utils.translations",
114+
"scan",
115+
"--name",
116+
"cdl",
117+
"--directory",
118+
".",
119+
"--copyright-holder",
120+
"DataLab Platform Developers"
121+
],
122+
"group": {
123+
"kind": "build",
124+
"isDefault": false
125+
},
126+
"options": {
127+
"cwd": "${workspaceFolder}"
128+
},
129+
"presentation": {
130+
"clear": false,
131+
"echo": true,
57132
"focus": false,
58133
"panel": "shared",
59-
"showReuseMessage": true,
60-
"clear": false
61-
}
134+
"reveal": "always",
135+
"showReuseMessage": true
136+
},
137+
"type": "shell",
138+
"dependsOrder": "sequence",
139+
"dependsOn": [
140+
"sphinx-intl update"
141+
]
142+
},
143+
{
144+
"label": "📚 Compile translations",
145+
"command": "${command:python.interpreterPath}",
146+
"args": [
147+
"-m",
148+
"guidata.utils.translations",
149+
"compile",
150+
"--name",
151+
"cdl",
152+
"--directory",
153+
"."
154+
],
155+
"group": {
156+
"kind": "build",
157+
"isDefault": false
158+
},
159+
"options": {
160+
"cwd": "${workspaceFolder}"
161+
},
162+
"presentation": {
163+
"clear": false,
164+
"echo": true,
165+
"focus": false,
166+
"panel": "shared",
167+
"reveal": "always",
168+
"showReuseMessage": true
169+
},
170+
"type": "shell",
171+
"dependsOrder": "sequence",
172+
"dependsOn": [
173+
"sphinx-intl build",
174+
]
62175
},
63176
{
64177
"label": "Run Pylint",
@@ -600,7 +713,7 @@
600713
"dependsOn": [
601714
"Clean Up",
602715
"Upgrade PlotPyStack packages",
603-
"gettext - Compile",
716+
"📚 Compile translations",
604717
"Build Python packages",
605718
"Create executable",
606719
"Create installer"

babel.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# This file is used to configure Babel for the project.
2+
3+
[python: **.py]
4+
encoding = utf-8

0 commit comments

Comments
 (0)