Skip to content

Commit 48c2584

Browse files
committed
Met a jour les docs de config avancee et i18n plugins
Ajoute la section sur l'editeur avance Documente .ark/pref.json pour le venv par workspace Precise la propagation i18n universelle des plugins
1 parent 427b09a commit 48c2584

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

docs/ark_main_config.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,35 @@ GUI shortcut:
5858
- Keep paths relative (ex: `"src/main.py"`).
5959
- Entrypoint is stored in `ARK_Main_Config.yml` and can be edited manually.
6060
- This file is separate from `bcasl.yml` (which is only for BCASL plugins).
61+
62+
## Advanced Config Editor (GUI)
63+
64+
The main GUI has a **Configurations avancées** button that opens a dedicated
65+
editor for:
66+
- `ARK_Main_Config.yml`
67+
- `bcasl.yml`
68+
- `.ark/pref.json` (workspace‑specific preferences)
69+
70+
Features (lightweight by design):
71+
- Monospace editor
72+
- Simple YAML/JSON syntax highlighting
73+
- Diff view before saving
74+
- Basic validation on save (YAML/JSON)
75+
76+
## Workspace Prefs (.ark/pref.json)
77+
78+
Per‑workspace preferences are stored in:
79+
```
80+
<workspace>/.ark/pref.json
81+
```
82+
83+
Currently used keys:
84+
```json
85+
{
86+
"venv_mode": "venv" | "system",
87+
"venv_path": "/abs/path/to/venv" | null
88+
}
89+
```
90+
91+
These values are updated when you select a venv or System Python, and are
92+
re‑applied automatically when the workspace is loaded.

docs/how_to_create_a_bc_plugin.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ Notes.
173173

174174
**Plugin i18n (GeneralContext)**
175175
Plugins can use the SDK i18n system with a `languages/` folder in the plugin package.
176+
The Core now propagates language changes to the Plugin SDK automatically, and the
177+
SDK loads translations for all plugins found in `Plugins/` (by folder name).
176178

177179
Example layout:
178180
```
@@ -200,6 +202,10 @@ register_i18n_handler(lambda gui, tr: _load_i18n())
200202
label = translate("my.plugin.id", "ui_title", "Default title")
201203
```
202204

205+
Notes.
206+
- The SDK also accepts the plugin folder name as ID (case‑insensitive).
207+
- If a key is missing, `translate()` falls back to the default you pass in.
208+
203209
**Sandbox, Timeout, Parallelism**
204210
- If `options.sandbox` is `true`, plugins can run in isolated processes.
205211
- Timeout via `options.plugin_timeout_s` or `PYCOMPILER_BCASL_PLUGIN_TIMEOUT`.

0 commit comments

Comments
 (0)