You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/backend.ai-webui-docs/SCREENSHOT-GUIDELINES.md
+41-5Lines changed: 41 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,12 +29,48 @@ Standards for capturing, naming, and maintaining screenshots in the Backend.AI W
29
29
- Avoid abbreviations unless they are standard (e.g., `ssh`, `sftp`)
30
30
- Acronyms in lowercase: `ssh_sftp_connection.png`, `llm_chat.png`
31
31
32
-
## File Location
32
+
## File Location and Localization
33
33
34
34
- All screenshots go in `src/{lang}/images/`
35
-
- Images are shared across languages (same filenames, same directory structure per language)
36
-
-**Language-specific captures**: Each language directory should contain screenshots captured in that language's UI locale. Switch the app language before capturing so that UI labels (buttons, menus, headers) appear in the correct language for each version
37
-
- When UI is purely visual with no text (e.g., diagrams), one capture can be shared across all directories
35
+
- All four language directories (`en/`, `ko/`, `ja/`, `th/`) use **identical filenames** for the same screen — the filename is the contract; only the rendered UI language differs.
36
+
-**Each language directory MUST contain screenshots captured in that language's UI locale.** Switch the UI language before capturing so that labels (sidebar menus, buttons, dialog titles, table headers, breadcrumbs, etc.) appear in the correct language for each version.
37
+
* Korean docs (`src/ko/images/`) → capture with UI language set to **한국어**
38
+
* Japanese docs (`src/ja/images/`) → capture with UI language set to **日本語**
39
+
* Thai docs (`src/th/images/`) → capture with UI language set to **ภาษาไทย**
40
+
* English docs (`src/en/images/`) → capture with UI language set to **English**
41
+
-**Single-language exceptions** (one capture shared across all 4 directories) are allowed only when the image is purely visual with no UI text — e.g., architecture diagrams, terminal/CLI output, third-party tool screenshots (VS Code, MLflow, etc.), version-print outputs.
42
+
- For all other screenshots (any image showing Backend.AI WebUI chrome — sidebar, header, modals, forms, tables), the file in each language directory **must be a separate capture in that language**, even if the underlying screen layout is identical.
43
+
44
+
### Switching Languages In-Place
45
+
46
+
The WebUI exposes a global function `window.switchLanguage(lang)` that updates the UI language **without reloading the page** (added in PR #5796 / FR-2230). Use this for screenshot capture instead of navigating to `/usersettings` each time — it preserves the current page state (open modals, populated forms, applied filters, etc.) and lets you capture the **same screen** in all four languages from a single setup.
47
+
48
+
Available locale codes: `'en'`, `'ko'`, `'ja'`, `'th'`.
49
+
50
+
**Recommended capture pattern (4 languages from one page state):**
3. Loop through the 4 languages: `switchLanguage(lang)` → take screenshot → save to `src/{lang}/images/<file>.png`.
71
+
4. Move to the next screen.
72
+
73
+
This pattern is ~4× faster than re-navigating to `/usersettings` for each language and avoids repeating the page setup four times.
38
74
39
75
## Capture Standards
40
76
@@ -51,7 +87,7 @@ Standards for capturing, naming, and maintaining screenshots in the Backend.AI W
51
87
- Avoid showing personal information, real email addresses, or API keys
52
88
- Clear the browser address bar of internal/development URLs if visible
53
89
- Use light theme as the default (unless documenting dark mode features)
54
-
-**Always capture in English** regardless of which language directory the screenshot will be saved to. Switch the UI language to English before capturing, then copy the same screenshot to all language directories (`en/`, `ko/`, `ja/`, `th/`)
90
+
-For UI language, see **[File Location and Localization](#file-location-and-localization)** — capture in the locale that matches the destination directory (do not capture in English and copy across all languages)
0 commit comments