Commit 37e8b37
authored
Docs pre-release cleanup + fix documentation translation pipeline (#1963)
* docs: remove the pre-release banner and --beta build flag entirely
The in-app and website docs carried a 'Pre-release — subject to change'
banner injected by build-docs.sh's --beta flag, mirrored by a runtime banner
in MarkdownConverter for translated pages, and guarded at release time by a
dedicated cut-release/release-gate dance. The banner is no longer wanted.
- build-docs.sh: drop the --beta flag and banner injection
- MarkdownConverter: drop the runtime banner from wrapInHTMLDocument /
wrapInHTMLDocumentForFile / rewrapForFile (callers passed no banner arg)
- docs.css: remove the now-unused .pre-release-banner class
- docs-deploy.yml: build without --beta; delete the obsolete
docs-release-gate.yml (its only job was blocking a banner leak)
- cut-release-docs.sh / RELEASING / contributing / copilot-instructions /
constitution: drop --beta references and the release-gate workflow row
- specs: fix --beta build commands; mark specs/013 (the banner release-
versioning feature) Superseded and note the removal in specs/003 FRs
- remove an orphaned built page (adding-locale-translations.html) that had
no source markdown and still carried the banner
- rebuild the in-app HTML bundle
Build succeeds for the iOS simulator.
* fix: docs translation language detection and stop caching untranslated English
Two related docs-translation bugs:
1. Language detection used Locale.current, which reflects the device REGION
locale, not the app's display language. With a per-app language override
(iOS Settings > App > Language) the UI localizes via preferredLocalizations
while Locale.current stays on the device region — so the app could be fully
Spanish yet the docs pipeline saw "en" and never translated. Detect the
docs language from Bundle.main.documentationLanguageCode (the resolved
display localization) instead, across all call sites.
2. translateMarkdown silently fell back to the English source per segment when
no translation backend was available (Apple Translation language pack not
installed AND FoundationModels unavailable), then cached and even uploaded
that English as a completed translation — polluting the on-device cache and
the community translations repo. Gate translateMarkdown on a real backend
being available up front; return nil (skip) otherwise so nothing fake is
cached or uploaded. The HTML path already behaved correctly.
* feat: prompt to download the language pack when docs translation is unavailable
When the docs language is supported by Apple Translation but the on-device
language pack isn't installed (and FoundationModels isn't available), the docs
previously just stayed English with no explanation. Add an in-context prompt:
- DocTranslationService.translationBackendStatus(for:) reports available /
needsLanguagePack / unavailable.
- DocBrowserView shows a 'Translate Documentation' banner with a Download button
when the pack is needed; tapping it runs a Translation framework
prepareTranslation() download (LanguagePackDownloadModifier), then re-runs the
pipeline so the docs translate in-session.
- kickoffTranslation() also reloads DocBundle after on-device prefetch builds the
rendered folder, so on-device translations appear without a cold relaunch.
Compiled to a no-op on Mac Catalyst / pre-iOS 26 where the Translation framework
is unavailable.1 parent 22c9690 commit 37e8b37
33 files changed
Lines changed: 241 additions & 694 deletions
File tree
- .github
- workflows
- .specify/memory
- Meshtastic
- Extensions
- Resources/docs
- assets
- developer
- markdown/developer
- Services
- Views/Settings/HelpAndDocumentation
- docs/developer
- scripts
- specs
- 003-app-docs-markdown
- contracts
- 008-docs-auto-translation
- 009-docs-translation-pipeline
- 010-device-mshto-links
- 013-docs-release-versioning
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
224 | | - | |
| 222 | + | |
| 223 | + | |
225 | 224 | | |
226 | 225 | | |
227 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
34 | 47 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
Lines changed: 0 additions & 255 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments