refactor(wordlens): rename "Word Wise" to "Word Lens" (#4633)
"Word Wise" is a Kindle trademark, so rename the inline-gloss feature to
"Word Lens" throughout the product.
- User-facing strings → "Word Lens" across all 34 locales; brand translated
for Chinese (zh-CN 单词透镜, zh-TW 單詞透鏡) and German (Word-Lens-Daten).
- Code identifiers: WordWise→WordLens, wordWise→wordLens, WORD_WISE→WORD_LENS.
- Files/dirs: src/services/wordwise→wordlens, WordWisePanel→WordLensPanel,
wordwise{Ruby,Section}.ts, build/sync scripts, test dirs/fixtures,
data/wordwise→data/wordlens.
- Storage paths: CDN base, R2 key, on-device cache dir, WORDLENS_R2_BUCKET env,
pnpm wordlens:{manifest,sync}. manifest.json is path-agnostic so its
sha256/bytes stay valid (verified).
- biome.json: point the formatter-ignore at data/wordlens so the generated
one-line gloss packs aren't pretty-printed on commit.
Migration notes:
- Re-run `pnpm wordlens:sync` to upload packs to cdn.readest.com/wordlens/.
- Persisted view-settings keys renamed (wordWiseEnabled/Level/HintLang and
wordWiseAutoDownload) — saved values reset to defaults once on upgrade.
- Cached packs under the old Data/wordwise/ orphan (harmless re-download).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -17,8 +17,8 @@ import {
|
||||
inflectionMapFromPack as inflectionMapFromPackUntyped,
|
||||
parseLemmatizationList as parseLemmatizationListUntyped,
|
||||
buildPack as buildPackUntyped,
|
||||
} from '../../../scripts/build-wordwise-data.mjs';
|
||||
import type { GlossIndexData } from '@/services/wordwise/types';
|
||||
} from '../../../scripts/build-wordlens-data.mjs';
|
||||
import type { GlossIndexData } from '@/services/wordlens/types';
|
||||
|
||||
// The .mjs script has no type annotations; pin the builders' returns to the
|
||||
// real GlossIndexData shape so the assertions are type-checked.
|
||||
Reference in New Issue
Block a user