Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25f0d0705f | ||
|
|
3f0622ac23 | ||
|
|
fa4c0534f4 | ||
|
|
d94e6ac024 |
No files matched your search
@@ -2,6 +2,70 @@
|
||||
|
||||
All notable changes to YTDescGen ship as tagged releases on `main`.
|
||||
|
||||
## v0.12.1 — 2026-05-06
|
||||
|
||||
Hotfix for v0.12.0. Ticking a Tech Notes checkbox (or filling any of the new Playthrough Notes structured fields — Endings shown, Language patch, Game version) updated the editor state but never reached the description preview, because the editor → engine mapping in `useCurrentGeneratorInput` wasn't kept in sync when the new fields were added. The unit-test suite caught nothing because every v0.12 description-builder test passed `GeneratorInput` directly to the engine, bypassing the hook.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Editor → engine pipeline carries every v0.12 field** ([src/hooks/use-current-generator-input.ts](src/hooks/use-current-generator-input.ts)) — `endingsShown`, `languagePatch`, `languagePatchCustom`, `gameVersion`, `gameVersionCustom`, and `techNotes` are now forwarded into `GeneratorInput`. Symptom of the bug was that the description preview (and Output / Batch tabs) didn't change when the user ticked tech-note items or filled language-patch / game-version, even though the editor checkboxes / selects reflected the change correctly.
|
||||
- **Save-as-template captures every v0.12 field** ([src/components/templates/TemplateSaveForm.tsx](src/components/templates/TemplateSaveForm.tsx)) — the snapshot builder explicitly enumerates each editor field and was missing the same six fields. A v0.12.0 user saving a template lost their Tech Notes / Playthrough Notes selections; loading the template later didn't restore them.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Hook field-mapping extracted into a pure helper** — `buildGeneratorInputFromEditor(state, languageOverride?)` is now exported alongside the React hook. Pure function so it's directly unit-testable; the hook just wraps it in `useMemo`. Same change pattern used for `migrateEditorState` in v0.12.0 — pull the load-bearing logic out of React-coupled wrappers so tests can hit it without a render harness.
|
||||
- **Hook `useMemo` deps simplified** — the previous list enumerated every field individually (50+ entries); a missing field would silently freeze that field's value in the memoised output. Replaced with a single `[state, languageOverride]` since `useEditorStore()` returns a fresh state reference on every store update — equivalent invalidation, fewer footguns.
|
||||
- **`TemplateSnapshot` carries the v0.12 fields as optional** ([src/store/template-store.ts](src/store/template-store.ts)) — `endingsShown`, `languagePatch`, `languagePatchCustom`, `gameVersion`, `gameVersionCustom`, `techNotes` joined the snapshot type. Optional for back-compat with templates saved before this hotfix; the editor's `loadProfile` spread keeps existing values when the patch lacks them.
|
||||
- **`EditorData` is now `export interface`** in `src/store/editor-store.ts` so the shared snapshot helper can reference it.
|
||||
- **package-lock.json** synced to the v0.12 / v0.12.1 version line — was carrying a stale v0.11.0 root version since the v0.12.0 PR forgot it (the v0.9.0 lockfile-bump-miss memory note reminded us, but only after the v0.12.0 ship).
|
||||
|
||||
### Under the hood
|
||||
|
||||
- New `tests/hooks/generator-input-mapping.test.ts` (6 cases) — direct assertions that each v0.12 field reaches `GeneratorInput` (`endingsShown`, `languagePatch + custom`, `gameVersion + custom`, `techNotes` selection-order), plus a parity guard that walks every key of an `EditorData` instance and fails if any non-allowlisted field is dropped from the resulting `GeneratorInput`. The allowlist is exactly two keys (`thumbnailText`, `pinnedComment` — both feed the pinned-comment builder via a separate code path); anything else added in the future will trip the assertion immediately.
|
||||
- Test count: 335/335 (was 329/329). Bundle: 345.50 KB raw / 115.52 KB gzipped (essentially flat versus v0.12.0 — only swapped a deps array for a single ref).
|
||||
|
||||
### Migration notes
|
||||
|
||||
- No state migration needed. `loadProfile` / `loadPreset` continue to spread snapshots over current state, and the new fields are all optional on `TemplateSnapshot`. A v0.12.0 user with templates saved during the bug window will see those templates load with empty Tech Notes / Playthrough Notes — re-save the template after upgrading to capture the fields properly.
|
||||
|
||||
## v0.12.0 — 2026-05-06
|
||||
|
||||
A bug fix and a description overhaul. The Tauri desktop build picks up `tauri-plugin-single-instance` so launching the app twice no longer stacks tray icons / orphan processes — second launches refocus the existing window. The description's Playthrough block consolidates the v0.7 standalone "🎯 Playthrough" line and the standalone "🎮 DIFFICULTY" block into a unified `▸ 🎮 PLAYTHROUGH NOTES` section with three new structured fields (`endingsShown`, `languagePatch`, `gameVersion`), and a new `▸ 🛠 TECH NOTES` bilingual checklist (24 items across 5 groups) sits alongside Content Warnings for production / playstyle disclaimers.
|
||||
|
||||
### Added
|
||||
|
||||
- **Single-instance enforcement (desktop)** — `src-tauri/Cargo.toml` adds `tauri-plugin-single-instance = "2"`, registered first in the `Builder` chain in `src-tauri/src/lib.rs` with a `get_webview_window("main")` → show + unminimize + focus callback. Closing-to-tray then double-clicking the launcher / start-menu shortcut surfaces the existing window instead of spawning a fresh process with its own tray icon.
|
||||
- **Unified `▸ 🎮 PLAYTHROUGH NOTES` description block** — replaces the v0.7 standalone "🎯 Playthrough:" line and the v0.7 standalone "🎮 DIFFICULTY" block with one bulleted section that renders five fields: Run type (reads from existing `playthroughStatus`), Difficulty (reads from existing `difficulty` + `difficultyCustomLabel`), Endings shown (NEW free text), Language patch (NEW enum + custom slot), Game version (NEW enum + custom slot). Empty bullets are skipped; the whole block is skipped when every field is empty. Bilingual `EN · LOCAL` rendering for both label and value when `tEn` is provided and output language ≠ English. Section sits in slot 1.5 (right after the intro), matching the position of the pre-v0.12 standalone playthrough line.
|
||||
- **`▸ 🛠 TECH NOTES` checklist** — a 24-item, 5-group bilingual multi-select for production / playstyle disclaimers: audio (5: copyright muting, volume reduction, music replacement, cutscene-only mute, original-audio kept), video quality (3: low resolution, low graphics, FPS drops with FPS counter pointer), recording issues (4: bug-from-game, crash kept, loading cut, OBS artifacts), playstyle (8: not no-hit, not clean walkthrough, casual no-commentary, many deaths, slow exploration, puzzle-stuck, grinding cut, not speedrun), production (4: exploration-focused, edited-for-pacing, support-developers, online-connectivity-issues). Same render pattern as v0.11 Content Warnings — header / two-line intro / `EN · LOCAL` bullets with U+00B7 MIDDLE DOT separator. Section sits right after Content Warnings; both transparency blocks group together.
|
||||
- **`languagePatch` enum** with options `none / official_en / official_other / fan_translation / mtl / custom` and a paired free-form `languagePatchCustom` slot — covers the most common patch states (canonical EN release, official non-EN locale, fan TL, machine TL) plus an escape hatch for niche cases. `none` is the skip-bullet sentinel; `official_other` and `custom` both surface the free-form input under the Select.
|
||||
- **`gameVersion` enum** with options `full_release / demo / early_access / beta / prologue / pre_release / custom` and a paired `gameVersionCustom` slot — `full_release` is the implicit default (no bullet rendered) so creators recording the released game don't have to fill anything; "Steam Next Fest demo" / "Kickstarter backer build" / similar niche cases go through `custom`.
|
||||
- **Free-text `endingsShown` field** — captures values like "1 of 3", "True ending only", "All routes 100%", "Normal + True". Free text on purpose — the natural value space is too varied for an enum, and a `custom` escape hatch would catch 80% of selections anyway.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Editor store** v9 → v10 — additive only: `endingsShown: ""`, `languagePatch: "none"`, `languagePatchCustom: ""`, `gameVersion: "full_release"`, `gameVersionCustom: ""`, `techNotes: []` back-fills. Existing `playthroughStatus` / `difficulty` / `difficultyCustomLabel` values round-trip unchanged — only the description-builder render path moves them into the unified block. Invalid persisted enum values coerce to their skip-sentinel default; unknown `techNotes` ids are filtered out (defensive against hand-edited blobs). The `migrate` function is now extracted into a named `migrateEditorState` export so the v9→v10 path can be unit-tested without going through localStorage.
|
||||
- **`ContentDetailsForm.tsx`** is removed and replaced with the v0.12 `PlaythroughNotesForm.tsx` — the new component owns all five PN fields (Run type, Difficulty + custom, Endings shown, Language patch + custom, Game version + custom) in one block, with the custom-slot inputs only appearing when their parent enum carries one. The Editor page mounts `PlaythroughNotesForm` then `ContentWarningChecklist` then `TechNotesChecklist` inside the Content Details accordion.
|
||||
- **`description-builder.ts`** — the v0.7 standalone playthrough conditional (`if (input.playthroughStatus !== "none") sections.push(...)`) and the standalone difficulty conditional (`if (input.difficulty !== "none") sections.push(...)`) are gone; replaced with one call to a new `buildPlaythroughNotesSection(input, t, tEn)` helper at slot 1.5. A new `buildTechNotesSection(input, t, tEn)` helper at slot 7.5 mirrors the v0.11 content-warnings render pattern.
|
||||
|
||||
### Removed
|
||||
|
||||
- **`description.sections.playthrough` / `description.sections.difficulty`** template keys — section heading is now bullet-formatted inside the `▸ 🎮 PLAYTHROUGH NOTES` block via `description.playthroughNotes.labels.*`. The per-status / per-level value labels (`description.playthrough.{blind,replay,…}`, `description.difficulty.{easy,normal,…}`) are kept — the new block reads them for the "Run type" and "Difficulty" bullet values.
|
||||
- **`ContentDetailsForm.tsx`** — superseded by `PlaythroughNotesForm.tsx`.
|
||||
|
||||
### Under the hood
|
||||
|
||||
- New `src/config/tech-note-groups.ts` carries the 5-group UI structure (`audio` / `video_quality` / `recording_issues` / `playstyle` / `production`). Engine doesn't read groups — output follows selection order — but the editor uses them to render collapsible sections.
|
||||
- New `src/config/playthrough-options.ts` exports `LANGUAGE_PATCH_UI_OPTIONS` / `GAME_VERSION_UI_OPTIONS` (Select-friendly `{id, labelKey}` shapes) plus `languagePatchHasCustomSlot` / `gameVersionHasCustomSlot` predicates so the editor knows when to show the paired custom-text input.
|
||||
- `src/engine/types.ts` adds `LANGUAGE_PATCH_OPTIONS` / `LanguagePatch`, `GAME_VERSION_OPTIONS` / `GameVersion`, `TECH_NOTES` / `TechNote` const-and-type pairs, plus six new optional fields on `GeneratorInput`.
|
||||
- All 6 locales (en / vi / ja / es / ko / zh) updated with `description.playthroughNotes.{header,intro,labels,languagePatchOptions,gameVersionOptions}` + `description.techNotes.{header,intro,items}` (24 items) + matching editor short labels (`editor.playthroughNotes.*`, `editor.techNoteOptions.*`, `editor.techNoteGroups.*`). `validate:locales` clean at 585 ui + 316 templates per locale.
|
||||
- Engine tests grow by 14 cases: PN block bullet formatting (en single-language, all five filled), PN block omission when every field is empty, regression that the old standalone `🎯 Playthrough:` and `🎮 DIFFICULTY` lines no longer render, custom-difficulty label passthrough, custom-difficulty blank-label skip, PN bilingual VI mode, PN with `languagePatch: official_other` + custom slot, PN with `gameVersion: custom` + custom slot, TN selection-order preservation, TN bilingual VI / JA modes, TN single-language fallback when `tEn` omitted, TN block omission when list is empty. Plus a new `tests/store/editor-store.migrate.test.ts` with 9 cases covering the v9→v10 migration: default back-fills, preservation of existing playthrough / difficulty / contentWarnings, invalid enum coercion, unknown tech-note id filtering, idempotency on a v10 blob, and null / undefined handling. Full suite: 329 / 329 green.
|
||||
- Bundle: main chunk 345.85 KB raw / 115.78 KB gzipped (under the 500 KB constraint).
|
||||
|
||||
### Migration notes
|
||||
|
||||
- No manual action required. First launch after upgrade migrates state in place: pre-v0.12 drafts gain the new PN + TN field defaults; existing `playthroughStatus` / `difficulty` keep their values, the description just renders them under the unified PN header now.
|
||||
- The Tauri single-instance fix only takes effect after a fresh install of the v0.12 build; existing v0.11 desktop installs need to be uninstalled / replaced. Web builds are unaffected.
|
||||
|
||||
## v0.11.0 — 2026-05-06
|
||||
|
||||
Three independent features: vendor-aware graphics dropdowns (DLAA + XeSS Ultra Quality joined the ladder, multipliers cap per vendor), a third-party advertising block driven by a per-profile copy field, and a major content-warning overhaul — the v0.7 trio (`spoilerWarning` / `matureWarning` toggles + 3-item checklist) becomes a unified bilingual checklist of 44 items across 5 categories with `EN · output-language` rendering and asterisk-masked Vietnamese terms for YouTube ToS safety.
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "yt-desc-gen",
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "yt-desc-gen",
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.1",
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0",
|
||||
"@tauri-apps/plugin-dialog": "^2.0.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yt-desc-gen",
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
Generated
+17
-1
@@ -3898,6 +3898,21 @@ dependencies = [
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-plugin-single-instance"
|
||||
version = "2.4.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c8f29386f5e9fdc699182388a33ee80a56de436d91b67459e86afef426282af"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"tauri",
|
||||
"thiserror 2.0.18",
|
||||
"tracing",
|
||||
"windows-sys 0.60.2",
|
||||
"zbus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tauri-runtime"
|
||||
version = "2.10.1"
|
||||
@@ -5411,7 +5426,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "yt-desc-gen"
|
||||
version = "0.11.0"
|
||||
version = "0.12.1"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -5421,6 +5436,7 @@ dependencies = [
|
||||
"tauri-plugin-fs",
|
||||
"tauri-plugin-opener",
|
||||
"tauri-plugin-shell",
|
||||
"tauri-plugin-single-instance",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "yt-desc-gen"
|
||||
version = "0.11.0"
|
||||
version = "0.12.1"
|
||||
description = "YouTube Gameplay Description Generator"
|
||||
authors = ["poli0981"]
|
||||
edition = "2021"
|
||||
@@ -18,5 +18,6 @@ tauri-plugin-dialog = "2"
|
||||
tauri-plugin-fs = "2"
|
||||
tauri-plugin-opener = "2"
|
||||
tauri-plugin-shell = "2"
|
||||
tauri-plugin-single-instance = "2"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
@@ -31,6 +31,19 @@ pub fn run() {
|
||||
let quitting_run = quitting.clone();
|
||||
|
||||
tauri::Builder::default()
|
||||
// Single-instance MUST be the first plugin registered (v0.12). Without
|
||||
// it, every launch spawns a fresh process — which then builds its own
|
||||
// tray icon in `setup()`, stacking duplicates in the system tray and
|
||||
// leaving orphan processes in Task Manager. The callback runs in the
|
||||
// *first* (already-running) instance when a second launch is attempted:
|
||||
// we surface its window instead of letting the second process boot.
|
||||
.plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| {
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
let _ = window.show();
|
||||
let _ = window.unminimize();
|
||||
let _ = window.set_focus();
|
||||
}
|
||||
}))
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-cli/schema.json",
|
||||
"productName": "YTDescGen",
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.1",
|
||||
"identifier": "com.skullmute.ytdescgen",
|
||||
"build": {
|
||||
"beforeBuildCommand": "npm run build",
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Select } from "@components/ui/Select";
|
||||
import { Input } from "@components/ui/Input";
|
||||
import { useEditorStore } from "@store/editor-store";
|
||||
import {
|
||||
PLAYTHROUGH_STATUSES,
|
||||
DIFFICULTY_LEVELS,
|
||||
type PlaythroughStatus,
|
||||
type DifficultyLevel,
|
||||
} from "@engine/types";
|
||||
|
||||
/**
|
||||
* Metadata that tells viewers "what kind of run is this". Lives in the
|
||||
* Content Details accordion alongside timestamps. v0.11 moved the
|
||||
* content-warning checklist out into its own component
|
||||
* ({@link ContentWarningChecklist}) — 40+ items needed a searchable
|
||||
* grouped layout that didn't fit the generic ChipGroup primitive.
|
||||
*
|
||||
* Design notes:
|
||||
* - Playthrough + Difficulty default to `"none"`, which renders as "(no
|
||||
* value)" in the select and suppresses the section in the generated
|
||||
* description. Makes "no opinion" explicit rather than ambiguous.
|
||||
* - The custom-difficulty input only appears when the creator picks
|
||||
* `"custom"` — free-form text is intentionally not translated, so
|
||||
* game-specific names like "Lethal" or "Blueberry" survive a locale
|
||||
* switch unchanged.
|
||||
*/
|
||||
export function ContentDetailsForm() {
|
||||
const { t } = useTranslation("ui");
|
||||
const store = useEditorStore();
|
||||
|
||||
const playthroughOptions = PLAYTHROUGH_STATUSES.map((id) => ({
|
||||
value: id,
|
||||
label: t(`editor.playthroughOptions.${id}`),
|
||||
}));
|
||||
|
||||
const difficultyOptions = DIFFICULTY_LEVELS.map((id) => ({
|
||||
value: id,
|
||||
label: t(`editor.difficultyOptions.${id}`),
|
||||
}));
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-3">
|
||||
<Select
|
||||
label={t("editor.playthrough")}
|
||||
options={playthroughOptions}
|
||||
value={store.playthroughStatus}
|
||||
onChange={(v) => store.set("playthroughStatus", v as PlaythroughStatus)}
|
||||
/>
|
||||
<Select
|
||||
label={t("editor.difficulty")}
|
||||
options={difficultyOptions}
|
||||
value={store.difficulty}
|
||||
onChange={(v) => store.set("difficulty", v as DifficultyLevel)}
|
||||
/>
|
||||
{store.difficulty === "custom" && (
|
||||
<Input
|
||||
label={t("editor.difficultyCustomLabel")}
|
||||
placeholder={t("editor.difficultyCustomPlaceholder")}
|
||||
value={store.difficultyCustomLabel}
|
||||
onChange={(e) => store.set("difficultyCustomLabel", e.target.value)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Select } from "@components/ui/Select";
|
||||
import { Input } from "@components/ui/Input";
|
||||
import { useEditorStore } from "@store/editor-store";
|
||||
import {
|
||||
PLAYTHROUGH_STATUSES,
|
||||
DIFFICULTY_LEVELS,
|
||||
type PlaythroughStatus,
|
||||
type DifficultyLevel,
|
||||
type LanguagePatch,
|
||||
type GameVersion,
|
||||
} from "@engine/types";
|
||||
import {
|
||||
LANGUAGE_PATCH_UI_OPTIONS,
|
||||
GAME_VERSION_UI_OPTIONS,
|
||||
languagePatchHasCustomSlot,
|
||||
gameVersionHasCustomSlot,
|
||||
} from "@config/playthrough-options";
|
||||
|
||||
/**
|
||||
* v0.12 unified Playthrough Notes form. Replaces the v0.7
|
||||
* `ContentDetailsForm` (deleted in v0.12 — it only carried Playthrough
|
||||
* + Difficulty) with a 5-field block that maps 1:1 to the bullets of
|
||||
* the `▸ 🎮 PLAYTHROUGH NOTES` description section:
|
||||
*
|
||||
* • Run type ← `playthroughStatus` (existing)
|
||||
* • Difficulty ← `difficulty` (+ custom label, existing)
|
||||
* • Endings shown ← `endingsShown` (NEW free text)
|
||||
* • Language patch ← `languagePatch` (+ custom label, NEW)
|
||||
* • Game version ← `gameVersion` (+ custom label, NEW)
|
||||
*
|
||||
* Custom-text inputs only appear when their parent enum is set to a
|
||||
* custom-bearing value (`difficulty === "custom"`, language patch is
|
||||
* `"official_other"` or `"custom"`, etc.) — keeps the form compact in
|
||||
* the common path and surfaces the slot exactly when it's needed.
|
||||
*/
|
||||
export function PlaythroughNotesForm() {
|
||||
const { t } = useTranslation("ui");
|
||||
const store = useEditorStore();
|
||||
|
||||
const playthroughOptions = PLAYTHROUGH_STATUSES.map((id) => ({
|
||||
value: id,
|
||||
label: t(`editor.playthroughOptions.${id}`),
|
||||
}));
|
||||
|
||||
const difficultyOptions = DIFFICULTY_LEVELS.map((id) => ({
|
||||
value: id,
|
||||
label: t(`editor.difficultyOptions.${id}`),
|
||||
}));
|
||||
|
||||
const languagePatchOptions = LANGUAGE_PATCH_UI_OPTIONS.map((opt) => ({
|
||||
value: opt.id,
|
||||
label: t(opt.labelKey),
|
||||
}));
|
||||
|
||||
const gameVersionOptions = GAME_VERSION_UI_OPTIONS.map((opt) => ({
|
||||
value: opt.id,
|
||||
label: t(opt.labelKey),
|
||||
}));
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-3">
|
||||
<div className="flex items-baseline justify-between">
|
||||
<span className="text-sm font-medium text-text-secondary">
|
||||
{t("editor.playthroughNotes.title")}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<Select
|
||||
label={t("editor.playthroughNotes.runTypeLabel")}
|
||||
options={playthroughOptions}
|
||||
value={store.playthroughStatus}
|
||||
onChange={(v) => store.set("playthroughStatus", v as PlaythroughStatus)}
|
||||
/>
|
||||
|
||||
<Select
|
||||
label={t("editor.playthroughNotes.difficultyLabel")}
|
||||
options={difficultyOptions}
|
||||
value={store.difficulty}
|
||||
onChange={(v) => store.set("difficulty", v as DifficultyLevel)}
|
||||
/>
|
||||
{store.difficulty === "custom" && (
|
||||
<Input
|
||||
label={t("editor.difficultyCustomLabel")}
|
||||
placeholder={t("editor.difficultyCustomPlaceholder")}
|
||||
value={store.difficultyCustomLabel}
|
||||
onChange={(e) => store.set("difficultyCustomLabel", e.target.value)}
|
||||
/>
|
||||
)}
|
||||
|
||||
<Input
|
||||
label={t("editor.playthroughNotes.endingsLabel")}
|
||||
placeholder={t("editor.playthroughNotes.endingsPlaceholder")}
|
||||
value={store.endingsShown}
|
||||
onChange={(e) => store.set("endingsShown", e.target.value)}
|
||||
/>
|
||||
|
||||
<Select
|
||||
label={t("editor.playthroughNotes.languagePatchLabel")}
|
||||
options={languagePatchOptions}
|
||||
value={store.languagePatch}
|
||||
onChange={(v) => store.set("languagePatch", v as LanguagePatch)}
|
||||
/>
|
||||
{languagePatchHasCustomSlot(store.languagePatch) && (
|
||||
<Input
|
||||
label={t("editor.playthroughNotes.languagePatchCustomLabel")}
|
||||
placeholder={t("editor.playthroughNotes.languagePatchCustomPlaceholder")}
|
||||
value={store.languagePatchCustom}
|
||||
onChange={(e) => store.set("languagePatchCustom", e.target.value)}
|
||||
/>
|
||||
)}
|
||||
|
||||
<Select
|
||||
label={t("editor.playthroughNotes.gameVersionLabel")}
|
||||
options={gameVersionOptions}
|
||||
value={store.gameVersion}
|
||||
onChange={(v) => store.set("gameVersion", v as GameVersion)}
|
||||
/>
|
||||
{gameVersionHasCustomSlot(store.gameVersion) && (
|
||||
<Input
|
||||
label={t("editor.playthroughNotes.gameVersionCustomLabel")}
|
||||
placeholder={t("editor.playthroughNotes.gameVersionCustomPlaceholder")}
|
||||
value={store.gameVersionCustom}
|
||||
onChange={(e) => store.set("gameVersionCustom", e.target.value)}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
import { useMemo, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { ChevronDown, ChevronRight, Search, X } from "lucide-react";
|
||||
import clsx from "clsx";
|
||||
import { useEditorStore } from "@store/editor-store";
|
||||
import {
|
||||
TECH_NOTE_GROUPS,
|
||||
type TechNoteGroup,
|
||||
} from "@config/tech-note-groups";
|
||||
import type { TechNote } from "@engine/types";
|
||||
|
||||
/**
|
||||
* v0.12 Tech Notes checklist — searchable, collapsible, grouped
|
||||
* multi-select for the 24 production / playstyle disclaimers that feed
|
||||
* the `▸ 🛠 TECH NOTES` description block. Cloned 1:1 from
|
||||
* {@link ContentWarningChecklist} since both share the same UX shape;
|
||||
* only the data source (`techNotes` vs `contentWarnings`), groups,
|
||||
* and i18n namespace differ.
|
||||
*
|
||||
* Selection order is preserved so the description renders bullets in
|
||||
* the order the user picked them.
|
||||
*/
|
||||
export function TechNotesChecklist() {
|
||||
const { t } = useTranslation("ui");
|
||||
const selected = useEditorStore((s) => s.techNotes);
|
||||
const set = useEditorStore((s) => s.set);
|
||||
|
||||
const [query, setQuery] = useState("");
|
||||
// Default all groups closed — 24 items across 5 groups is too tall to
|
||||
// expand by default. Users with a specific note in mind use search;
|
||||
// users browsing pop open the group they care about.
|
||||
const [openGroups, setOpenGroups] = useState<Record<string, boolean>>(() => ({
|
||||
audio: false,
|
||||
video_quality: false,
|
||||
recording_issues: false,
|
||||
playstyle: false,
|
||||
production: false,
|
||||
}));
|
||||
|
||||
const trimmedQuery = query.trim().toLowerCase();
|
||||
const isFiltering = trimmedQuery.length > 0;
|
||||
|
||||
const filteredGroups = useMemo<TechNoteGroup[]>(() => {
|
||||
if (!isFiltering) return [...TECH_NOTE_GROUPS];
|
||||
return TECH_NOTE_GROUPS.map((group) => ({
|
||||
...group,
|
||||
items: group.items.filter((id) =>
|
||||
t(`editor.techNoteOptions.${id}`).toLowerCase().includes(trimmedQuery),
|
||||
),
|
||||
})).filter((group) => group.items.length > 0);
|
||||
}, [t, trimmedQuery, isFiltering]);
|
||||
|
||||
const totalMatching = filteredGroups.reduce((acc, g) => acc + g.items.length, 0);
|
||||
|
||||
function toggleItem(id: TechNote) {
|
||||
if (selected.includes(id)) {
|
||||
set(
|
||||
"techNotes",
|
||||
selected.filter((x) => x !== id),
|
||||
);
|
||||
} else {
|
||||
set("techNotes", [...selected, id]);
|
||||
}
|
||||
}
|
||||
|
||||
function toggleGroup(groupId: string) {
|
||||
setOpenGroups((prev) => ({ ...prev, [groupId]: !prev[groupId] }));
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="flex items-baseline justify-between">
|
||||
<span className="text-sm font-medium text-text-secondary">
|
||||
{t("editor.techNotes")}
|
||||
</span>
|
||||
{selected.length > 0 && (
|
||||
<span className="text-xs text-text-muted">
|
||||
{selected.length} selected
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="relative">
|
||||
<Search className="pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-text-muted" />
|
||||
<input
|
||||
type="text"
|
||||
value={query}
|
||||
onChange={(e) => setQuery(e.target.value)}
|
||||
placeholder={t("editor.techNoteSearchPlaceholder")}
|
||||
className="w-full rounded-md border border-border bg-surface-1 py-1.5 pl-8 pr-7 text-sm text-text-primary placeholder:text-text-muted focus:border-accent focus:outline-none"
|
||||
/>
|
||||
{query && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setQuery("")}
|
||||
className="absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-primary"
|
||||
aria-label="Clear search"
|
||||
>
|
||||
<X className="h-3.5 w-3.5" />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{isFiltering && totalMatching === 0 ? (
|
||||
<p className="py-2 text-center text-xs text-text-muted">
|
||||
{t("editor.techNoteEmpty")}
|
||||
</p>
|
||||
) : (
|
||||
<div className="flex flex-col gap-1">
|
||||
{filteredGroups.map((group) => {
|
||||
const isOpen = isFiltering || openGroups[group.id];
|
||||
const groupSelectedCount = group.items.filter((id) =>
|
||||
selected.includes(id),
|
||||
).length;
|
||||
return (
|
||||
<div
|
||||
key={group.id}
|
||||
className="overflow-hidden rounded-md border border-border bg-surface-1"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => toggleGroup(group.id)}
|
||||
className="flex w-full items-center justify-between px-3 py-2 text-left text-xs font-medium text-text-secondary hover:bg-surface-2"
|
||||
aria-expanded={isOpen}
|
||||
>
|
||||
<span className="flex items-center gap-1.5">
|
||||
{isOpen ? (
|
||||
<ChevronDown className="h-3.5 w-3.5" />
|
||||
) : (
|
||||
<ChevronRight className="h-3.5 w-3.5" />
|
||||
)}
|
||||
{t(group.labelKey)}
|
||||
</span>
|
||||
{groupSelectedCount > 0 && (
|
||||
<span className="rounded-full bg-accent/15 px-2 py-0.5 text-[10px] font-medium text-accent">
|
||||
{groupSelectedCount}
|
||||
</span>
|
||||
)}
|
||||
</button>
|
||||
{isOpen && (
|
||||
<div className="grid grid-cols-1 gap-x-3 gap-y-1 border-t border-border bg-surface-1 px-3 py-2 sm:grid-cols-2">
|
||||
{group.items.map((id) => {
|
||||
const checked = selected.includes(id);
|
||||
return (
|
||||
<label
|
||||
key={id}
|
||||
className={clsx(
|
||||
"flex cursor-pointer items-center gap-2 rounded px-1.5 py-1 text-xs transition-colors",
|
||||
checked
|
||||
? "text-text-primary"
|
||||
: "text-text-secondary hover:text-text-primary",
|
||||
)}
|
||||
>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={checked}
|
||||
onChange={() => toggleItem(id)}
|
||||
className="h-3.5 w-3.5 shrink-0 cursor-pointer rounded border-border text-accent focus:ring-1 focus:ring-accent/40"
|
||||
/>
|
||||
<span>{t(`editor.techNoteOptions.${id}`)}</span>
|
||||
</label>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -64,7 +64,13 @@ export function TemplateSaveForm({ open, onClose }: TemplateSaveFormProps) {
|
||||
playthroughStatus: editor.playthroughStatus,
|
||||
difficulty: editor.difficulty,
|
||||
difficultyCustomLabel: editor.difficultyCustomLabel,
|
||||
endingsShown: editor.endingsShown,
|
||||
languagePatch: editor.languagePatch,
|
||||
languagePatchCustom: editor.languagePatchCustom,
|
||||
gameVersion: editor.gameVersion,
|
||||
gameVersionCustom: editor.gameVersionCustom,
|
||||
contentWarnings: [...editor.contentWarnings],
|
||||
techNotes: [...editor.techNotes],
|
||||
storeLinks: { ...editor.storeLinks },
|
||||
storeLinkTypes: { ...editor.storeLinkTypes },
|
||||
social: { ...editor.social },
|
||||
|
||||
@@ -15,6 +15,9 @@ import type {
|
||||
PlaythroughStatus,
|
||||
DifficultyLevel,
|
||||
ContentWarning,
|
||||
LanguagePatch,
|
||||
GameVersion,
|
||||
TechNote,
|
||||
} from "@engine/types";
|
||||
|
||||
export interface EditorDefaults {
|
||||
@@ -84,7 +87,19 @@ export interface EditorDefaults {
|
||||
playthroughStatus: PlaythroughStatus;
|
||||
difficulty: DifficultyLevel;
|
||||
difficultyCustomLabel: string;
|
||||
/** Free-text endings descriptor for Playthrough Notes section (v0.12). */
|
||||
endingsShown: string;
|
||||
/** Language-patch enum for Playthrough Notes section (v0.12). */
|
||||
languagePatch: LanguagePatch;
|
||||
/** Free-form label when `languagePatch` is `"official_other"` or `"custom"`. */
|
||||
languagePatchCustom: string;
|
||||
/** Game-version enum for Playthrough Notes section (v0.12). */
|
||||
gameVersion: GameVersion;
|
||||
/** Free-form label when `gameVersion === "custom"`. */
|
||||
gameVersionCustom: string;
|
||||
contentWarnings: ContentWarning[];
|
||||
/** Tech / production / playstyle disclaimer checklist items (v0.12). */
|
||||
techNotes: TechNote[];
|
||||
storeLinks: Record<string, string>;
|
||||
storeLinkTypes: Record<string, StoreLinkType>;
|
||||
social: Record<string, string>;
|
||||
@@ -150,7 +165,13 @@ export const DEFAULTS = {
|
||||
playthroughStatus: "none",
|
||||
difficulty: "none",
|
||||
difficultyCustomLabel: "",
|
||||
endingsShown: "",
|
||||
languagePatch: "none",
|
||||
languagePatchCustom: "",
|
||||
gameVersion: "full_release",
|
||||
gameVersionCustom: "",
|
||||
contentWarnings: [],
|
||||
techNotes: [],
|
||||
storeLinks: {},
|
||||
storeLinkTypes: {},
|
||||
social: {},
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
import {
|
||||
LANGUAGE_PATCH_OPTIONS,
|
||||
GAME_VERSION_OPTIONS,
|
||||
type LanguagePatch,
|
||||
type GameVersion,
|
||||
} from "@engine/types";
|
||||
|
||||
/**
|
||||
* UI-friendly option lists for the Playthrough Notes form (v0.12).
|
||||
* Mirrors the const arrays from `@engine/types` but as `{ id, labelKey }`
|
||||
* objects so Select renders both an i18n key and a stable value. The
|
||||
* engine continues to read straight from the typed unions — these
|
||||
* helpers exist purely so the editor doesn't repeat the i18n-key
|
||||
* convention in every component.
|
||||
*/
|
||||
export interface PlaythroughOption<T extends string> {
|
||||
id: T;
|
||||
/** i18n key for the localised display label. */
|
||||
labelKey: string;
|
||||
}
|
||||
|
||||
export const LANGUAGE_PATCH_UI_OPTIONS: readonly PlaythroughOption<LanguagePatch>[] =
|
||||
LANGUAGE_PATCH_OPTIONS.map((id) => ({
|
||||
id,
|
||||
labelKey: `editor.playthroughNotes.languagePatchOptions.${id}`,
|
||||
}));
|
||||
|
||||
export const GAME_VERSION_UI_OPTIONS: readonly PlaythroughOption<GameVersion>[] =
|
||||
GAME_VERSION_OPTIONS.map((id) => ({
|
||||
id,
|
||||
labelKey: `editor.playthroughNotes.gameVersionOptions.${id}`,
|
||||
}));
|
||||
|
||||
/**
|
||||
* Whether the language-patch enum value pairs with a free-form custom
|
||||
* label slot (`languagePatchCustom`). True for `"official_other"` (e.g.
|
||||
* "Official KR") and `"custom"` (everything else); false for the
|
||||
* canonical EN / fan / MTL options whose labels come from i18n.
|
||||
*/
|
||||
export function languagePatchHasCustomSlot(value: LanguagePatch): boolean {
|
||||
return value === "official_other" || value === "custom";
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the game-version enum value pairs with a free-form custom
|
||||
* label slot (`gameVersionCustom`). Only `"custom"` does — used for
|
||||
* niche cases like "Steam Next Fest demo", "Kickstarter backer build".
|
||||
*/
|
||||
export function gameVersionHasCustomSlot(value: GameVersion): boolean {
|
||||
return value === "custom";
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
import type { TechNote } from "@engine/types";
|
||||
|
||||
/**
|
||||
* UI grouping for the Tech Notes checklist (v0.12). Mirrors the shape
|
||||
* of {@link CONTENT_WARNING_GROUPS} — flat array on the engine side,
|
||||
* grouped here so 24+ items stay scannable in a collapsible UI.
|
||||
*
|
||||
* Add a new tech note by:
|
||||
* 1. Appending the id to {@link TECH_NOTES} in `@engine/types`.
|
||||
* 2. Adding it to one of these groups (UI placement only — engine
|
||||
* renders bullets in the order the user picked them).
|
||||
* 3. Translating `description.techNotes.items.{id}` in all locales
|
||||
* + the editor's `editor.techNoteOptions.{id}` short label.
|
||||
*/
|
||||
export interface TechNoteGroup {
|
||||
id: string;
|
||||
/** i18n key for the group heading shown in the editor. */
|
||||
labelKey: string;
|
||||
items: TechNote[];
|
||||
}
|
||||
|
||||
export const TECH_NOTE_GROUPS: readonly TechNoteGroup[] = [
|
||||
{
|
||||
id: "audio",
|
||||
labelKey: "editor.techNoteGroups.audio",
|
||||
items: [
|
||||
"copyright_muted_sections",
|
||||
"volume_reduced_copyright",
|
||||
"music_replaced_copyright",
|
||||
"cutscene_audio_muted_only",
|
||||
"original_audio_kept",
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "video_quality",
|
||||
labelKey: "editor.techNoteGroups.video_quality",
|
||||
items: [
|
||||
"low_resolution_hardware",
|
||||
"low_graphics_performance",
|
||||
"fps_drops_hardware",
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "recording_issues",
|
||||
labelKey: "editor.techNoteGroups.recording_issues",
|
||||
items: [
|
||||
"bug_from_game",
|
||||
"crash_kept_transparency",
|
||||
"loading_cut",
|
||||
"obs_artifacts_possible",
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "playstyle",
|
||||
labelKey: "editor.techNoteGroups.playstyle",
|
||||
items: [
|
||||
"not_no_hit_run",
|
||||
"not_clean_walkthrough",
|
||||
"casual_no_commentary",
|
||||
"many_deaths_patience",
|
||||
"slow_exploration",
|
||||
"puzzle_stuck_possible",
|
||||
"grinding_cut",
|
||||
"not_speedrun_relaxed",
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "production",
|
||||
labelKey: "editor.techNoteGroups.production",
|
||||
items: [
|
||||
"exploration_focus_skip_combat",
|
||||
"edited_for_pacing",
|
||||
"support_developers",
|
||||
"online_connectivity_issues",
|
||||
],
|
||||
},
|
||||
] as const;
|
||||
@@ -257,13 +257,16 @@ export function buildDescription(
|
||||
if (lines.length > 0) sections.push(lines.join("\n"));
|
||||
}
|
||||
|
||||
// 1.5 Playthrough status — surfaces "is this a blind run / NG+ / …"
|
||||
// right after the intro because that context frames how viewers read
|
||||
// everything below. Skipped when creator hasn't picked a value.
|
||||
if (input.playthroughStatus && input.playthroughStatus !== "none") {
|
||||
const label = t(`description.playthrough.${input.playthroughStatus}`);
|
||||
sections.push(t("description.sections.playthrough", { value: label }));
|
||||
}
|
||||
// 1.5 Playthrough Notes — v0.12 unified block that consolidates the
|
||||
// pre-v0.12 standalone "🎯 Playthrough" line and the standalone
|
||||
// "🎮 DIFFICULTY" block, plus three new bullets (endings shown,
|
||||
// language patch, game version). Sits right after the intro because
|
||||
// these facts frame how viewers read everything below. Empty bullets
|
||||
// are skipped; if every bullet is empty the whole block is skipped.
|
||||
// Bilingual when `tEn` is provided AND output language ≠ English —
|
||||
// pattern mirrors the v0.11 content-warnings block.
|
||||
const pnBlock = buildPlaythroughNotesSection(input, t, tEn);
|
||||
if (pnBlock) sections.push(pnBlock);
|
||||
|
||||
// 2. No Commentary tagline
|
||||
sections.push(t("description.noCommentaryLine"));
|
||||
@@ -359,20 +362,9 @@ export function buildDescription(
|
||||
}
|
||||
}
|
||||
|
||||
// 5.5 Difficulty — sits with Video Settings because a difficulty
|
||||
// choice is another gameplay setting, not a content warning. For
|
||||
// `"custom"`, the user's free-form label is used verbatim (not
|
||||
// translated — intentional: lets creators use game-specific names
|
||||
// like "Lethal" without per-locale fallback friction).
|
||||
if (input.difficulty && input.difficulty !== "none") {
|
||||
const value =
|
||||
input.difficulty === "custom"
|
||||
? (input.difficultyCustomLabel ?? "").trim()
|
||||
: t(`description.difficulty.${input.difficulty}`);
|
||||
if (value) {
|
||||
sections.push(`${t("description.sections.difficulty")}\n${value}`);
|
||||
}
|
||||
}
|
||||
// 5.5 Difficulty — moved into the unified Playthrough Notes block
|
||||
// above (slot 1.5) in v0.12. Kept here as a no-op placeholder so the
|
||||
// numbering of subsequent comments stays stable.
|
||||
|
||||
// 6. Rig
|
||||
if (hasEntries(input.rig)) {
|
||||
@@ -440,6 +432,13 @@ export function buildDescription(
|
||||
}
|
||||
}
|
||||
|
||||
// 7.5 Tech Notes — v0.12 production / playstyle disclaimer checklist.
|
||||
// Sits next to Content Warnings because both are transparency blocks;
|
||||
// grouping them keeps disclaimers visually together. Same bilingual
|
||||
// render pattern as the content-warnings block above.
|
||||
const tnBlock = buildTechNotesSection(input, t, tEn);
|
||||
if (tnBlock) sections.push(tnBlock);
|
||||
|
||||
// 8.3. Sponsor credit — appears above the music / donate block so the
|
||||
// "thanks to X" line stands out. Only renders when both the toggle is
|
||||
// on AND the creator has filled in BOTH the sponsor name and the
|
||||
@@ -576,6 +575,239 @@ export function buildDescription(
|
||||
return sections.join("\n\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the unified `▸ 🎮 PLAYTHROUGH NOTES` block (v0.12). Combines
|
||||
* five bullets (run type, difficulty, endings, language patch, game
|
||||
* version) into one section. Each bullet's value is resolved through
|
||||
* `t` (localised) plus `tEn` (English fallback) so the rendered line
|
||||
* can be bilingual `EN · LOCAL` when the output language ≠ English.
|
||||
*
|
||||
* Returns "" when every bullet is empty / skipped — caller drops the
|
||||
* section entirely instead of emitting a header with no body.
|
||||
*
|
||||
* Custom string slots (`difficultyCustomLabel`, `languagePatchCustom`,
|
||||
* `gameVersionCustom`) are intentionally NOT translated: a creator who
|
||||
* types "Lethal" or "Steam Next Fest backer build" wants that label
|
||||
* preserved verbatim across locale switches, not run through a
|
||||
* non-existent translation key.
|
||||
*/
|
||||
function buildPlaythroughNotesSection(
|
||||
input: GeneratorInput,
|
||||
t: TranslationFn,
|
||||
tEn?: TranslationFn,
|
||||
): string {
|
||||
const isEn = input.language === "en";
|
||||
const renderBilingual = !isEn && Boolean(tEn);
|
||||
const tEnUse: TranslationFn = tEn ?? t;
|
||||
|
||||
/**
|
||||
* Resolve a key against both `t` and `tEnUse`, returning a single bullet
|
||||
* line. Bullets are formatted as `Label · NhãnLocal: ValueEn · ValueLocal`
|
||||
* in bilingual mode and `Label: Value` otherwise. Returns null when the
|
||||
* value is empty (caller filters these out).
|
||||
*/
|
||||
function bullet(
|
||||
labelKey: string,
|
||||
valueEn: string,
|
||||
valueLocal: string,
|
||||
): string | null {
|
||||
const trimmedEn = valueEn.trim();
|
||||
const trimmedLocal = valueLocal.trim();
|
||||
if (!trimmedEn && !trimmedLocal) return null;
|
||||
const labelEn = tEnUse(labelKey);
|
||||
const labelLocal = t(labelKey);
|
||||
const labelLine = renderBilingual
|
||||
? `${labelEn} · ${labelLocal}`
|
||||
: labelEn;
|
||||
const valueLine = renderBilingual
|
||||
? `${trimmedEn || trimmedLocal} · ${trimmedLocal || trimmedEn}`
|
||||
: trimmedEn || trimmedLocal;
|
||||
return `• ${labelLine}: ${valueLine}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve an enum value through i18n. Returns ["", ""] for the
|
||||
* skip-sentinel value (caller drops the bullet). Falls back to the raw
|
||||
* id if a locale hasn't translated the key — degraded but never
|
||||
* "[object Object]".
|
||||
*/
|
||||
function resolveEnum(
|
||||
namespace: string,
|
||||
value: string,
|
||||
skipSentinel: string,
|
||||
): { en: string; local: string } {
|
||||
if (!value || value === skipSentinel) return { en: "", local: "" };
|
||||
const key = `description.playthroughNotes.${namespace}.${value}`;
|
||||
const en = tEnUse(key);
|
||||
const local = t(key);
|
||||
return {
|
||||
en: en === key ? value : en,
|
||||
local: local === key ? value : local,
|
||||
};
|
||||
}
|
||||
|
||||
const bullets: string[] = [];
|
||||
|
||||
// Run type — reads from `playthroughStatus`, looks up the existing
|
||||
// v0.7 `description.playthrough.<status>` keys (kept in templates so
|
||||
// the migration stays purely about render shape, not value labels).
|
||||
if (input.playthroughStatus && input.playthroughStatus !== "none") {
|
||||
const key = `description.playthrough.${input.playthroughStatus}`;
|
||||
const valueEn = tEnUse(key);
|
||||
const valueLocal = t(key);
|
||||
const b = bullet(
|
||||
"description.playthroughNotes.labels.runType",
|
||||
valueEn === key ? input.playthroughStatus : valueEn,
|
||||
valueLocal === key ? input.playthroughStatus : valueLocal,
|
||||
);
|
||||
if (b) bullets.push(b);
|
||||
}
|
||||
|
||||
// Difficulty — reads from `difficulty`, with custom slot for
|
||||
// free-form labels. Custom labels are passed through verbatim
|
||||
// (no translation) on both sides of the bilingual separator.
|
||||
if (input.difficulty && input.difficulty !== "none") {
|
||||
let valueEn: string;
|
||||
let valueLocal: string;
|
||||
if (input.difficulty === "custom") {
|
||||
const custom = (input.difficultyCustomLabel ?? "").trim();
|
||||
valueEn = custom;
|
||||
valueLocal = custom;
|
||||
} else {
|
||||
const key = `description.difficulty.${input.difficulty}`;
|
||||
const en = tEnUse(key);
|
||||
const local = t(key);
|
||||
valueEn = en === key ? input.difficulty : en;
|
||||
valueLocal = local === key ? input.difficulty : local;
|
||||
}
|
||||
const b = bullet(
|
||||
"description.playthroughNotes.labels.difficulty",
|
||||
valueEn,
|
||||
valueLocal,
|
||||
);
|
||||
if (b) bullets.push(b);
|
||||
}
|
||||
|
||||
// Endings shown — free text, identical on both sides of the bilingual
|
||||
// separator (it's a creator-typed label, not localised content).
|
||||
const endings = (input.endingsShown ?? "").trim();
|
||||
if (endings) {
|
||||
const b = bullet(
|
||||
"description.playthroughNotes.labels.endings",
|
||||
endings,
|
||||
endings,
|
||||
);
|
||||
if (b) bullets.push(b);
|
||||
}
|
||||
|
||||
// Language patch — enum + custom slot. `official_other` and `custom`
|
||||
// both pull their value from `languagePatchCustom`; the enum-resolved
|
||||
// label is used otherwise. `none` is the skip sentinel.
|
||||
if (input.languagePatch && input.languagePatch !== "none") {
|
||||
let valueEn: string;
|
||||
let valueLocal: string;
|
||||
if (input.languagePatch === "official_other" || input.languagePatch === "custom") {
|
||||
const custom = (input.languagePatchCustom ?? "").trim();
|
||||
valueEn = custom;
|
||||
valueLocal = custom;
|
||||
} else {
|
||||
const resolved = resolveEnum("languagePatchOptions", input.languagePatch, "none");
|
||||
valueEn = resolved.en;
|
||||
valueLocal = resolved.local;
|
||||
}
|
||||
const b = bullet(
|
||||
"description.playthroughNotes.labels.languagePatch",
|
||||
valueEn,
|
||||
valueLocal,
|
||||
);
|
||||
if (b) bullets.push(b);
|
||||
}
|
||||
|
||||
// Game version — `full_release` is the implicit default and skips
|
||||
// the bullet entirely (no need to announce "this is the full game").
|
||||
if (input.gameVersion && input.gameVersion !== "full_release") {
|
||||
let valueEn: string;
|
||||
let valueLocal: string;
|
||||
if (input.gameVersion === "custom") {
|
||||
const custom = (input.gameVersionCustom ?? "").trim();
|
||||
valueEn = custom;
|
||||
valueLocal = custom;
|
||||
} else {
|
||||
const resolved = resolveEnum(
|
||||
"gameVersionOptions",
|
||||
input.gameVersion,
|
||||
"full_release",
|
||||
);
|
||||
valueEn = resolved.en;
|
||||
valueLocal = resolved.local;
|
||||
}
|
||||
const b = bullet(
|
||||
"description.playthroughNotes.labels.gameVersion",
|
||||
valueEn,
|
||||
valueLocal,
|
||||
);
|
||||
if (b) bullets.push(b);
|
||||
}
|
||||
|
||||
if (bullets.length === 0) return "";
|
||||
|
||||
const headerEn = tEnUse("description.playthroughNotes.header");
|
||||
const headerLocal = t("description.playthroughNotes.header");
|
||||
const introEn = tEnUse("description.playthroughNotes.intro");
|
||||
const introLocal = t("description.playthroughNotes.intro");
|
||||
|
||||
const headerLine = renderBilingual ? `${headerEn} / ${headerLocal}` : headerEn;
|
||||
const introLines = renderBilingual ? `${introEn}\n${introLocal}` : introEn;
|
||||
|
||||
return `${headerLine}\n${introLines}\n\n${bullets.join("\n")}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the `▸ 🛠 TECH NOTES` block (v0.12). Renders selected items
|
||||
* from {@link GeneratorInput.techNotes} as bulleted bilingual lines —
|
||||
* the rendering logic mirrors the v0.11 content-warnings block exactly,
|
||||
* just with a different header, intro, and items namespace.
|
||||
*
|
||||
* Returns "" when no items are selected. Items whose translation key
|
||||
* doesn't resolve are filtered out so a stale id from a hand-edited
|
||||
* persistent blob doesn't render as a bare key.
|
||||
*/
|
||||
function buildTechNotesSection(
|
||||
input: GeneratorInput,
|
||||
t: TranslationFn,
|
||||
tEn?: TranslationFn,
|
||||
): string {
|
||||
const tn = input.techNotes ?? [];
|
||||
if (tn.length === 0) return "";
|
||||
|
||||
const isEn = input.language === "en";
|
||||
const renderBilingual = !isEn && Boolean(tEn);
|
||||
const tEnUse: TranslationFn = tEn ?? t;
|
||||
|
||||
const headerEn = tEnUse("description.techNotes.header");
|
||||
const headerLocal = t("description.techNotes.header");
|
||||
const introEn = tEnUse("description.techNotes.intro");
|
||||
const introLocal = t("description.techNotes.intro");
|
||||
|
||||
const headerLine = renderBilingual ? `${headerEn} / ${headerLocal}` : headerEn;
|
||||
const introLines = renderBilingual ? `${introEn}\n${introLocal}` : introEn;
|
||||
|
||||
const bullets = tn
|
||||
.map((id) => {
|
||||
const key = `description.techNotes.items.${id}`;
|
||||
const enLabel = tEnUse(key);
|
||||
const localLabel = t(key);
|
||||
if (!enLabel || enLabel === key || !enLabel.trim()) return null;
|
||||
return renderBilingual ? `• ${enLabel} · ${localLabel}` : `• ${enLabel}`;
|
||||
})
|
||||
.filter((line): line is string => Boolean(line))
|
||||
.join("\n");
|
||||
|
||||
if (!bullets) return "";
|
||||
|
||||
return `${headerLine}\n${introLines}\n\n${bullets}`;
|
||||
}
|
||||
|
||||
export function checkDescriptionWarning(description: string): CharLimitWarning | null {
|
||||
if (description.length > YT_LIMITS.DESCRIPTION_MAX) {
|
||||
return {
|
||||
|
||||
+122
-5
@@ -124,6 +124,90 @@ export const DIFFICULTY_LEVELS = [
|
||||
] as const;
|
||||
export type DifficultyLevel = (typeof DIFFICULTY_LEVELS)[number];
|
||||
|
||||
/**
|
||||
* Language-patch state (v0.12). Distinguishes between an officially
|
||||
* shipped translation, a fan translation, machine translation, or no
|
||||
* patch at all. `"official_other"` covers official non-English releases
|
||||
* — pair with {@link languagePatchCustom} to surface the actual locale
|
||||
* (e.g. "Official KR"). `"none"` skips the bullet in the description.
|
||||
*/
|
||||
export const LANGUAGE_PATCH_OPTIONS = [
|
||||
"none",
|
||||
"official_en",
|
||||
"official_other",
|
||||
"fan_translation",
|
||||
"mtl",
|
||||
"custom",
|
||||
] as const;
|
||||
export type LanguagePatch = (typeof LANGUAGE_PATCH_OPTIONS)[number];
|
||||
|
||||
/**
|
||||
* Game-version state (v0.12). Lets viewers know if they're watching the
|
||||
* full release vs. a demo / EA / beta / prologue. `"custom"` is the
|
||||
* escape hatch for niche cases ("Steam Next Fest demo", "Kickstarter
|
||||
* backer build"); pair with {@link gameVersionCustom}. `"full_release"`
|
||||
* is the implicit default and skips the bullet (no need to announce
|
||||
* "this is the full game" — that's the assumed baseline).
|
||||
*/
|
||||
export const GAME_VERSION_OPTIONS = [
|
||||
"full_release",
|
||||
"demo",
|
||||
"early_access",
|
||||
"beta",
|
||||
"prologue",
|
||||
"pre_release",
|
||||
"custom",
|
||||
] as const;
|
||||
export type GameVersion = (typeof GAME_VERSION_OPTIONS)[number];
|
||||
|
||||
/**
|
||||
* Tech / production / playstyle disclaimer items (v0.12). One unified
|
||||
* checklist that consolidates "Technical issue", "Gameplay", and
|
||||
* "Game State" disclaimer pools. Items that overlap with structured
|
||||
* fields ({@link PlaythroughStatus}, {@link DifficultyLevel},
|
||||
* {@link LanguagePatch}, {@link GameVersion}, `endingsShown`) are
|
||||
* intentionally NOT in this list — the structured field renders that
|
||||
* data instead, so duplicating it here would surface the same fact
|
||||
* twice.
|
||||
*
|
||||
* Grouped semantically in the UI (see {@link TECH_NOTE_GROUPS} in
|
||||
* `@config/tech-note-groups`) but flat in the array — render order in
|
||||
* the description matches the user's selection order. Like content
|
||||
* warnings, the rendered block is bilingual when `tEn` is provided.
|
||||
*/
|
||||
export const TECH_NOTES = [
|
||||
// Audio
|
||||
"copyright_muted_sections",
|
||||
"volume_reduced_copyright",
|
||||
"music_replaced_copyright",
|
||||
"cutscene_audio_muted_only",
|
||||
"original_audio_kept",
|
||||
// Video quality
|
||||
"low_resolution_hardware",
|
||||
"low_graphics_performance",
|
||||
"fps_drops_hardware",
|
||||
// Recording issues
|
||||
"bug_from_game",
|
||||
"crash_kept_transparency",
|
||||
"loading_cut",
|
||||
"obs_artifacts_possible",
|
||||
// Playstyle disclaimers
|
||||
"not_no_hit_run",
|
||||
"not_clean_walkthrough",
|
||||
"casual_no_commentary",
|
||||
"many_deaths_patience",
|
||||
"slow_exploration",
|
||||
"puzzle_stuck_possible",
|
||||
"grinding_cut",
|
||||
"not_speedrun_relaxed",
|
||||
// Production / attribution
|
||||
"exploration_focus_skip_combat",
|
||||
"edited_for_pacing",
|
||||
"support_developers",
|
||||
"online_connectivity_issues",
|
||||
] as const;
|
||||
export type TechNote = (typeof TECH_NOTES)[number];
|
||||
|
||||
/**
|
||||
* Content warnings (v0.11 unified bilingual checklist). Replaces the
|
||||
* v0.7 trio (flashing_lights / loud_noises / jump_scares) plus the
|
||||
@@ -322,23 +406,56 @@ export interface GeneratorInput {
|
||||
*/
|
||||
matureWarning: boolean;
|
||||
/**
|
||||
* Playthrough state — renders a "🎯 Playthrough: …" block above
|
||||
* `noCommentaryLine`. Defaults to `"none"` (skipped).
|
||||
* Playthrough state — feeds the "Run type" bullet of the unified
|
||||
* `▸ 🎮 PLAYTHROUGH NOTES` block (v0.12). Defaults to `"none"` (bullet
|
||||
* is skipped). Pre-v0.12 this rendered as a standalone "🎯 Playthrough:"
|
||||
* line above `noCommentaryLine`.
|
||||
*/
|
||||
playthroughStatus?: PlaythroughStatus;
|
||||
/**
|
||||
* Preset / custom difficulty — renders a "🎮 DIFFICULTY" block after
|
||||
* the Video Settings section. When `"custom"`, the value is taken
|
||||
* from {@link difficultyCustomLabel} instead of the locale preset.
|
||||
* Preset / custom difficulty — feeds the "Difficulty" bullet of the
|
||||
* unified `▸ 🎮 PLAYTHROUGH NOTES` block (v0.12). When `"custom"`, the
|
||||
* value comes from {@link difficultyCustomLabel}. Pre-v0.12 this had
|
||||
* its own `🎮 DIFFICULTY` section after Video Settings.
|
||||
*/
|
||||
difficulty?: DifficultyLevel;
|
||||
/** Free-form label used when `difficulty === "custom"`. */
|
||||
difficultyCustomLabel?: string;
|
||||
/**
|
||||
* Free-text "endings shown" bullet for the `▸ 🎮 PLAYTHROUGH NOTES`
|
||||
* block (v0.12). Examples: "1 of 3", "True ending only", "All routes
|
||||
* 100%". Empty → bullet is skipped. Free-form on purpose: the natural
|
||||
* value space is too varied for an enum.
|
||||
*/
|
||||
endingsShown?: string;
|
||||
/**
|
||||
* Language-patch state for the `▸ 🎮 PLAYTHROUGH NOTES` block (v0.12).
|
||||
* `"none"` → skip the bullet. `"official_other"` and `"custom"` pair
|
||||
* with {@link languagePatchCustom} to surface a free-form value
|
||||
* ("Official KR", "VNI fan translation v2.1").
|
||||
*/
|
||||
languagePatch?: LanguagePatch;
|
||||
/** Free-form label for `languagePatch === "official_other"` or `"custom"`. */
|
||||
languagePatchCustom?: string;
|
||||
/**
|
||||
* Game-version state for the `▸ 🎮 PLAYTHROUGH NOTES` block (v0.12).
|
||||
* `"full_release"` → skip the bullet (it's the assumed baseline; no
|
||||
* need to announce). `"custom"` pairs with {@link gameVersionCustom}.
|
||||
*/
|
||||
gameVersion?: GameVersion;
|
||||
/** Free-form label for `gameVersion === "custom"`. */
|
||||
gameVersionCustom?: string;
|
||||
/**
|
||||
* Accessibility warnings — renders a "⚠️ CONTENT WARNINGS" bulleted
|
||||
* block after the spoiler section. Empty / missing → skipped.
|
||||
*/
|
||||
contentWarnings?: ContentWarning[];
|
||||
/**
|
||||
* Tech / production / playstyle disclaimers (v0.12) — renders a
|
||||
* "▸ 🛠 TECH NOTES" bulleted block after the content-warnings block.
|
||||
* Bilingual when `tEn` is provided. Empty / missing → skipped.
|
||||
*/
|
||||
techNotes?: TechNote[];
|
||||
storeLinks: Partial<Record<string, string>>;
|
||||
/**
|
||||
* Parallel map from the same platform id to a pricing category.
|
||||
|
||||
@@ -1,16 +1,91 @@
|
||||
import { useMemo } from "react";
|
||||
import { useEditorStore } from "@store/editor-store";
|
||||
import { useEditorStore, type EditorData } from "@store/editor-store";
|
||||
import type { GeneratorInput, SupportedLanguage } from "@engine/types";
|
||||
|
||||
/**
|
||||
* Shapes the editor-store state into a {@link GeneratorInput} — the
|
||||
* Shapes an editor-store snapshot into a {@link GeneratorInput} — the
|
||||
* exact blob that every engine function (title / description / tags /
|
||||
* pinned comment) consumes.
|
||||
* pinned comment) consumes. Pure function so it's directly testable
|
||||
* without React rendering; the hook below wraps it in `useMemo` for
|
||||
* referential stability.
|
||||
*
|
||||
* Why a hook: four call sites (two hooks + BatchPage + OutputExtras)
|
||||
* used to hand-roll the same 25-field object. Adding a new editor
|
||||
* field meant editing every site; drift was likely. Centralising here
|
||||
* means one place to update when v0.8 adds more input fields.
|
||||
* Why split: a v0.12.0 regression silently dropped the new Playthrough
|
||||
* Notes / Tech Notes fields here when the input shape gained them but
|
||||
* this mapping wasn't kept in sync — symptom was the editor's checkbox
|
||||
* state being correct but the description preview never reflecting it.
|
||||
* Pulling the mapping into a pure function lets tests assert parity
|
||||
* between {@link EditorData} fields and the resulting `GeneratorInput`,
|
||||
* so the next field add can't slip through unnoticed.
|
||||
*/
|
||||
export function buildGeneratorInputFromEditor(
|
||||
state: EditorData,
|
||||
languageOverride?: SupportedLanguage,
|
||||
): GeneratorInput {
|
||||
return {
|
||||
videoType: state.videoType,
|
||||
language: languageOverride ?? state.language,
|
||||
genres: state.genres,
|
||||
gameName: state.gameName,
|
||||
gameNameLocalized: state.gameNameLocalized,
|
||||
channelName: state.channelName,
|
||||
platform: state.platform,
|
||||
partNumber: state.partNumber,
|
||||
bossName: state.bossName,
|
||||
dlcName: state.dlcName,
|
||||
challengeName: state.challengeName,
|
||||
modName: state.modName,
|
||||
modList: state.modList,
|
||||
liveUrl: state.liveUrl,
|
||||
scheduledTime: state.scheduledTime,
|
||||
gachaQuestType: state.gachaQuestType,
|
||||
chapterName: state.chapterName,
|
||||
questName: state.questName,
|
||||
resolution: state.resolution,
|
||||
fps: state.fps,
|
||||
graphicsPreset: state.graphicsPreset,
|
||||
graphicsPresetCustom: state.graphicsPresetCustom,
|
||||
skipGraphicsSettings: state.skipGraphicsSettings,
|
||||
rayTracingModes: state.rayTracingModes,
|
||||
frameGenVendor: state.frameGenVendor,
|
||||
frameGenMultiplier: state.frameGenMultiplier,
|
||||
upscaleQuality: state.upscaleQuality,
|
||||
artStyle: state.artStyle,
|
||||
versionInfo: state.versionInfo,
|
||||
timestamps: state.timestamps,
|
||||
playlistLink: state.playlistLink,
|
||||
contactEmail: state.contactEmail,
|
||||
musicAttribution: state.musicAttribution,
|
||||
sponsorName: state.sponsorName,
|
||||
sponsorPlatform: state.sponsorPlatform,
|
||||
pubDevName: state.pubDevName,
|
||||
thirdPartyAdText: state.thirdPartyAdText,
|
||||
spoilerWarning: state.spoilerWarning,
|
||||
matureWarning: state.matureWarning,
|
||||
playthroughStatus: state.playthroughStatus,
|
||||
difficulty: state.difficulty,
|
||||
difficultyCustomLabel: state.difficultyCustomLabel,
|
||||
endingsShown: state.endingsShown,
|
||||
languagePatch: state.languagePatch,
|
||||
languagePatchCustom: state.languagePatchCustom,
|
||||
gameVersion: state.gameVersion,
|
||||
gameVersionCustom: state.gameVersionCustom,
|
||||
contentWarnings: state.contentWarnings,
|
||||
techNotes: state.techNotes,
|
||||
storeLinks: state.storeLinks,
|
||||
storeLinkTypes: state.storeLinkTypes,
|
||||
social: state.social,
|
||||
rig: state.rig,
|
||||
vnBankName: state.vnBankName,
|
||||
vnBankAccount: state.vnBankAccount,
|
||||
vnBankHolder: state.vnBankHolder,
|
||||
vnMomo: state.vnMomo,
|
||||
vnZalopay: state.vnZalopay,
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Memoised editor-state → GeneratorInput hook used by every engine
|
||||
* caller (description / title / tags / pinned-comment / batch).
|
||||
*
|
||||
* Takes an optional `language` override — BatchPage builds the same
|
||||
* input for multiple languages, so the hook supports passing a target
|
||||
@@ -20,114 +95,13 @@ export function useCurrentGeneratorInput(languageOverride?: SupportedLanguage):
|
||||
const state = useEditorStore();
|
||||
|
||||
return useMemo<GeneratorInput>(
|
||||
() => ({
|
||||
videoType: state.videoType,
|
||||
language: languageOverride ?? state.language,
|
||||
genres: state.genres,
|
||||
gameName: state.gameName,
|
||||
gameNameLocalized: state.gameNameLocalized,
|
||||
channelName: state.channelName,
|
||||
platform: state.platform,
|
||||
partNumber: state.partNumber,
|
||||
bossName: state.bossName,
|
||||
dlcName: state.dlcName,
|
||||
challengeName: state.challengeName,
|
||||
modName: state.modName,
|
||||
modList: state.modList,
|
||||
liveUrl: state.liveUrl,
|
||||
scheduledTime: state.scheduledTime,
|
||||
gachaQuestType: state.gachaQuestType,
|
||||
chapterName: state.chapterName,
|
||||
questName: state.questName,
|
||||
resolution: state.resolution,
|
||||
fps: state.fps,
|
||||
graphicsPreset: state.graphicsPreset,
|
||||
graphicsPresetCustom: state.graphicsPresetCustom,
|
||||
skipGraphicsSettings: state.skipGraphicsSettings,
|
||||
rayTracingModes: state.rayTracingModes,
|
||||
frameGenVendor: state.frameGenVendor,
|
||||
frameGenMultiplier: state.frameGenMultiplier,
|
||||
upscaleQuality: state.upscaleQuality,
|
||||
artStyle: state.artStyle,
|
||||
versionInfo: state.versionInfo,
|
||||
timestamps: state.timestamps,
|
||||
playlistLink: state.playlistLink,
|
||||
contactEmail: state.contactEmail,
|
||||
musicAttribution: state.musicAttribution,
|
||||
sponsorName: state.sponsorName,
|
||||
sponsorPlatform: state.sponsorPlatform,
|
||||
pubDevName: state.pubDevName,
|
||||
thirdPartyAdText: state.thirdPartyAdText,
|
||||
spoilerWarning: state.spoilerWarning,
|
||||
matureWarning: state.matureWarning,
|
||||
playthroughStatus: state.playthroughStatus,
|
||||
difficulty: state.difficulty,
|
||||
difficultyCustomLabel: state.difficultyCustomLabel,
|
||||
contentWarnings: state.contentWarnings,
|
||||
storeLinks: state.storeLinks,
|
||||
storeLinkTypes: state.storeLinkTypes,
|
||||
social: state.social,
|
||||
rig: state.rig,
|
||||
vnBankName: state.vnBankName,
|
||||
vnBankAccount: state.vnBankAccount,
|
||||
vnBankHolder: state.vnBankHolder,
|
||||
vnMomo: state.vnMomo,
|
||||
vnZalopay: state.vnZalopay,
|
||||
}),
|
||||
[
|
||||
languageOverride,
|
||||
state.videoType,
|
||||
state.language,
|
||||
state.genres,
|
||||
state.gameName,
|
||||
state.gameNameLocalized,
|
||||
state.channelName,
|
||||
state.platform,
|
||||
state.partNumber,
|
||||
state.bossName,
|
||||
state.dlcName,
|
||||
state.challengeName,
|
||||
state.modName,
|
||||
state.modList,
|
||||
state.liveUrl,
|
||||
state.scheduledTime,
|
||||
state.gachaQuestType,
|
||||
state.chapterName,
|
||||
state.questName,
|
||||
state.resolution,
|
||||
state.fps,
|
||||
state.graphicsPreset,
|
||||
state.graphicsPresetCustom,
|
||||
state.skipGraphicsSettings,
|
||||
state.rayTracingModes,
|
||||
state.frameGenVendor,
|
||||
state.frameGenMultiplier,
|
||||
state.upscaleQuality,
|
||||
state.artStyle,
|
||||
state.versionInfo,
|
||||
state.timestamps,
|
||||
state.playlistLink,
|
||||
state.contactEmail,
|
||||
state.musicAttribution,
|
||||
state.sponsorName,
|
||||
state.sponsorPlatform,
|
||||
state.pubDevName,
|
||||
state.thirdPartyAdText,
|
||||
state.spoilerWarning,
|
||||
state.matureWarning,
|
||||
state.playthroughStatus,
|
||||
state.difficulty,
|
||||
state.difficultyCustomLabel,
|
||||
state.contentWarnings,
|
||||
state.storeLinks,
|
||||
state.storeLinkTypes,
|
||||
state.social,
|
||||
state.rig,
|
||||
state.vnBankName,
|
||||
state.vnBankAccount,
|
||||
state.vnBankHolder,
|
||||
state.vnMomo,
|
||||
state.vnZalopay,
|
||||
],
|
||||
// `useEditorStore()` (no selector) returns a fresh `state` reference
|
||||
// on every store update, so depending on `state` alone captures every
|
||||
// field change without enumerating each one — same memoisation
|
||||
// behaviour as the old per-field deps list, minus the v0.12.0 footgun
|
||||
// (any field added to EditorData but missing from the deps list would
|
||||
// silently stop participating in the memo invalidation).
|
||||
() => buildGeneratorInputFromEditor(state, languageOverride),
|
||||
[state, languageOverride],
|
||||
);
|
||||
}
|
||||
@@ -46,6 +46,7 @@
|
||||
"playthrough", "difficulty", "difficultyCustomLabel", "difficultyCustomPlaceholder",
|
||||
"contentWarnings",
|
||||
"contentWarningSearchPlaceholder", "contentWarningEmpty",
|
||||
"techNotes", "techNoteSearchPlaceholder", "techNoteEmpty",
|
||||
"videoSettings", "quickPreview", "version",
|
||||
"clearDraft", "draftSaved", "clearDraftConfirm",
|
||||
"genreSearchPlaceholder", "genreSearchNoResults"
|
||||
@@ -67,6 +68,22 @@
|
||||
"editor.warning": ["linkNameMismatch"],
|
||||
"editor.playthroughOptions": ["none", "blind", "replay", "newgame_plus", "postgame"],
|
||||
"editor.difficultyOptions": ["none", "easy", "normal", "hard", "nightmare", "custom"],
|
||||
"editor.playthroughNotes": [
|
||||
"title",
|
||||
"runTypeLabel", "difficultyLabel", "endingsLabel", "endingsPlaceholder",
|
||||
"languagePatchLabel", "languagePatchCustomLabel", "languagePatchCustomPlaceholder",
|
||||
"gameVersionLabel", "gameVersionCustomLabel", "gameVersionCustomPlaceholder"
|
||||
],
|
||||
"editor.playthroughNotes.languagePatchOptions": ["none", "official_en", "official_other", "fan_translation", "mtl", "custom"],
|
||||
"editor.playthroughNotes.gameVersionOptions": ["full_release", "demo", "early_access", "beta", "prologue", "pre_release", "custom"],
|
||||
"editor.techNoteGroups": ["audio", "video_quality", "recording_issues", "playstyle", "production"],
|
||||
"editor.techNoteOptions": [
|
||||
"copyright_muted_sections", "volume_reduced_copyright", "music_replaced_copyright", "cutscene_audio_muted_only", "original_audio_kept",
|
||||
"low_resolution_hardware", "low_graphics_performance", "fps_drops_hardware",
|
||||
"bug_from_game", "crash_kept_transparency", "loading_cut", "obs_artifacts_possible",
|
||||
"not_no_hit_run", "not_clean_walkthrough", "casual_no_commentary", "many_deaths_patience", "slow_exploration", "puzzle_stuck_possible", "grinding_cut", "not_speedrun_relaxed",
|
||||
"exploration_focus_skip_combat", "edited_for_pacing", "support_developers", "online_connectivity_issues"
|
||||
],
|
||||
"editor.contentWarningGroups": ["spoilers", "photosensitive", "phobias", "mental_health", "sensitive"],
|
||||
"editor.contentWarningOptions": [
|
||||
"spoiler_story", "spoiler_ending", "spoiler_true_ending", "spoiler_post_game", "spoiler_secret_ending", "spoiler_dlc",
|
||||
@@ -138,11 +155,22 @@
|
||||
"modList", "vnDonate",
|
||||
"sponsorCredit", "thirdPartyAds", "music", "donate", "social",
|
||||
"playlist", "contact", "cta",
|
||||
"copyright", "usagePolicyHeader", "usagePolicy",
|
||||
"playthrough", "difficulty"
|
||||
"copyright", "usagePolicyHeader", "usagePolicy"
|
||||
],
|
||||
"description.playthrough": ["blind", "replay", "newgame_plus", "postgame"],
|
||||
"description.difficulty": ["easy", "normal", "hard", "nightmare"],
|
||||
"description.playthroughNotes": ["header", "intro"],
|
||||
"description.playthroughNotes.labels": ["runType", "difficulty", "endings", "languagePatch", "gameVersion"],
|
||||
"description.playthroughNotes.languagePatchOptions": ["official_en", "official_other", "fan_translation", "mtl", "custom"],
|
||||
"description.playthroughNotes.gameVersionOptions": ["demo", "early_access", "beta", "prologue", "pre_release", "custom"],
|
||||
"description.techNotes": ["header", "intro"],
|
||||
"description.techNotes.items": [
|
||||
"copyright_muted_sections", "volume_reduced_copyright", "music_replaced_copyright", "cutscene_audio_muted_only", "original_audio_kept",
|
||||
"low_resolution_hardware", "low_graphics_performance", "fps_drops_hardware",
|
||||
"bug_from_game", "crash_kept_transparency", "loading_cut", "obs_artifacts_possible",
|
||||
"not_no_hit_run", "not_clean_walkthrough", "casual_no_commentary", "many_deaths_patience", "slow_exploration", "puzzle_stuck_possible", "grinding_cut", "not_speedrun_relaxed",
|
||||
"exploration_focus_skip_combat", "edited_for_pacing", "support_developers", "online_connectivity_issues"
|
||||
],
|
||||
"description.contentWarnings": ["header", "intro"],
|
||||
"description.contentWarnings.items": [
|
||||
"spoiler_story", "spoiler_ending", "spoiler_true_ending", "spoiler_post_game", "spoiler_secret_ending", "spoiler_dlc",
|
||||
|
||||
@@ -117,9 +117,7 @@
|
||||
"cta": "👍 Like | 🔔 Subscribe | ↗️ Share",
|
||||
"copyright": "© {{year}} {{channelName}}. All rights reserved.",
|
||||
"usagePolicyHeader": "📋 USAGE POLICY",
|
||||
"usagePolicy": "• Always credit with a link to the original video AND channel (at minimum in the description).\n• Don't re-upload the full video or large portions as your own content.\n• Don't monetize footage without explicit consent.\n• Don't edit footage to misrepresent the original content or creator.\n• Compilation, review, commentary, and reaction videos are OK — as long as you credit.\nIf in doubt, reach out via the social links or email in the description.",
|
||||
"playthrough": "🎯 Playthrough: {{value}}",
|
||||
"difficulty": "🎮 DIFFICULTY"
|
||||
"usagePolicy": "• Always credit with a link to the original video AND channel (at minimum in the description).\n• Don't re-upload the full video or large portions as your own content.\n• Don't monetize footage without explicit consent.\n• Don't edit footage to misrepresent the original content or creator.\n• Compilation, review, commentary, and reaction videos are OK — as long as you credit.\nIf in doubt, reach out via the social links or email in the description."
|
||||
},
|
||||
"playthrough": {
|
||||
"blind": "Blind run (first time playing)",
|
||||
@@ -133,6 +131,62 @@
|
||||
"hard": "Hard",
|
||||
"nightmare": "Nightmare / Extreme"
|
||||
},
|
||||
"playthroughNotes": {
|
||||
"header": "▸ 🎮 PLAYTHROUGH NOTES",
|
||||
"intro": "This run's settings, version, and approach.",
|
||||
"labels": {
|
||||
"runType": "Run type",
|
||||
"difficulty": "Difficulty",
|
||||
"endings": "Endings shown",
|
||||
"languagePatch": "Language patch",
|
||||
"gameVersion": "Game version"
|
||||
},
|
||||
"languagePatchOptions": {
|
||||
"official_en": "Official English release",
|
||||
"official_other": "Official release (other locale)",
|
||||
"fan_translation": "Fan translation",
|
||||
"mtl": "Machine translation",
|
||||
"custom": "Custom"
|
||||
},
|
||||
"gameVersionOptions": {
|
||||
"demo": "Demo",
|
||||
"early_access": "Early Access",
|
||||
"beta": "Beta",
|
||||
"prologue": "Prologue / Teaser",
|
||||
"pre_release": "Pre-release build",
|
||||
"custom": "Custom"
|
||||
}
|
||||
},
|
||||
"techNotes": {
|
||||
"header": "▸ 🛠 TECH NOTES",
|
||||
"intro": "Production and playstyle notes for transparency.",
|
||||
"items": {
|
||||
"copyright_muted_sections": "Some sections muted due to YouTube copyright",
|
||||
"volume_reduced_copyright": "Volume reduced in some sections due to copyright",
|
||||
"music_replaced_copyright": "Game music replaced to avoid copyright claims",
|
||||
"cutscene_audio_muted_only": "Only cutscene audio muted — gameplay audio kept",
|
||||
"original_audio_kept": "Original audio kept — accepting potential claim risk",
|
||||
"low_resolution_hardware": "Recorded at lower resolution due to hardware",
|
||||
"low_graphics_performance": "Graphics settings lowered for performance",
|
||||
"fps_drops_hardware": "FPS drops — caused by hardware (FPS counter visible top-left)",
|
||||
"bug_from_game": "Bugs / glitches are from the game, not the recording",
|
||||
"crash_kept_transparency": "Game crash kept in for transparency",
|
||||
"loading_cut": "Loading screens have been cut",
|
||||
"obs_artifacts_possible": "Possible OBS recording artifacts",
|
||||
"not_no_hit_run": "NOT a no-hit run — looking for clean play, skip this",
|
||||
"not_clean_walkthrough": "Not a polished walkthrough — exploring naturally",
|
||||
"casual_no_commentary": "Casual play, no commentary",
|
||||
"many_deaths_patience": "Many deaths — patience required",
|
||||
"slow_exploration": "Lots of backtracking — slow exploration pace",
|
||||
"puzzle_stuck_possible": "May get stuck on puzzles",
|
||||
"grinding_cut": "Grinding / repetitive sections cut",
|
||||
"not_speedrun_relaxed": "Not a speedrun — relaxed playthrough",
|
||||
"exploration_focus_skip_combat": "Exploration-focused — combat may be skipped",
|
||||
"edited_for_pacing": "Edited for pacing — not real-time",
|
||||
"support_developers": "Original game music — please support the developers",
|
||||
"online_connectivity_issues": "Online game — possible connectivity issues"
|
||||
}
|
||||
},
|
||||
"contentWarnings": {
|
||||
"header": "▸ ⚠️ CONTENT WARNINGS",
|
||||
"intro": "This video contains the following content. Viewer discretion advised.",
|
||||
|
||||
@@ -318,6 +318,72 @@
|
||||
"grief_loss": "Loss / grief",
|
||||
"kidnapping": "Kidnapping"
|
||||
},
|
||||
"playthroughNotes": {
|
||||
"title": "Playthrough notes",
|
||||
"runTypeLabel": "Run type",
|
||||
"difficultyLabel": "Difficulty",
|
||||
"endingsLabel": "Endings shown",
|
||||
"endingsPlaceholder": "e.g. True ending only, 1 of 3, All routes 100%",
|
||||
"languagePatchLabel": "Language patch",
|
||||
"languagePatchCustomLabel": "Custom language label",
|
||||
"languagePatchCustomPlaceholder": "e.g. Official KR, VNI fan TL v2.1",
|
||||
"gameVersionLabel": "Game version",
|
||||
"gameVersionCustomLabel": "Custom version label",
|
||||
"gameVersionCustomPlaceholder": "e.g. Steam Next Fest demo, Kickstarter backer build",
|
||||
"languagePatchOptions": {
|
||||
"none": "— Not set —",
|
||||
"official_en": "Official English",
|
||||
"official_other": "Official (other locale)",
|
||||
"fan_translation": "Fan translation",
|
||||
"mtl": "Machine translation",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"gameVersionOptions": {
|
||||
"full_release": "— Full release —",
|
||||
"demo": "Demo",
|
||||
"early_access": "Early Access",
|
||||
"beta": "Beta",
|
||||
"prologue": "Prologue / Teaser",
|
||||
"pre_release": "Pre-release",
|
||||
"custom": "Custom…"
|
||||
}
|
||||
},
|
||||
"techNotes": "Tech notes",
|
||||
"techNoteSearchPlaceholder": "Search tech notes…",
|
||||
"techNoteEmpty": "No matching notes",
|
||||
"techNoteGroups": {
|
||||
"audio": "Audio",
|
||||
"video_quality": "Video quality",
|
||||
"recording_issues": "Recording issues",
|
||||
"playstyle": "Playstyle disclaimers",
|
||||
"production": "Production & attribution"
|
||||
},
|
||||
"techNoteOptions": {
|
||||
"copyright_muted_sections": "Some sections muted (copyright)",
|
||||
"volume_reduced_copyright": "Volume reduced (copyright)",
|
||||
"music_replaced_copyright": "Game music replaced (copyright)",
|
||||
"cutscene_audio_muted_only": "Cutscene audio muted only",
|
||||
"original_audio_kept": "Original audio kept (claim risk)",
|
||||
"low_resolution_hardware": "Low resolution (hardware)",
|
||||
"low_graphics_performance": "Lower graphics (performance)",
|
||||
"fps_drops_hardware": "FPS drops (hardware)",
|
||||
"bug_from_game": "Bugs are from the game",
|
||||
"crash_kept_transparency": "Crash kept (transparency)",
|
||||
"loading_cut": "Loading screens cut",
|
||||
"obs_artifacts_possible": "Possible OBS artifacts",
|
||||
"not_no_hit_run": "NOT a no-hit run",
|
||||
"not_clean_walkthrough": "Not a clean walkthrough",
|
||||
"casual_no_commentary": "Casual, no commentary",
|
||||
"many_deaths_patience": "Many deaths",
|
||||
"slow_exploration": "Slow exploration",
|
||||
"puzzle_stuck_possible": "May get stuck on puzzles",
|
||||
"grinding_cut": "Grinding cut",
|
||||
"not_speedrun_relaxed": "Not a speedrun",
|
||||
"exploration_focus_skip_combat": "Exploration-focused (skip combat)",
|
||||
"edited_for_pacing": "Edited for pacing",
|
||||
"support_developers": "Support the developers",
|
||||
"online_connectivity_issues": "Online connectivity issues"
|
||||
},
|
||||
"videoSettings": "Video Settings",
|
||||
"quickPreview": "Quick Preview",
|
||||
"version": "Version",
|
||||
|
||||
@@ -117,9 +117,7 @@
|
||||
"cta": "👍 Me gusta | 🔔 Suscríbete | ↗️ Comparte",
|
||||
"copyright": "© {{year}} {{channelName}}. Todos los derechos reservados.",
|
||||
"usagePolicyHeader": "📋 POLÍTICA DE USO",
|
||||
"usagePolicy": "• Siempre acredita con un enlace al vídeo original Y al canal (al menos en la descripción).\n• No reuploadees el vídeo completo ni porciones grandes como contenido propio.\n• No monetices el material sin consentimiento explícito.\n• No edites el material de forma que tergiverse el contenido original o al creador.\n• Compilaciones, reseñas, comentarios y reacciones están OK — siempre que acredites.\nSi tienes dudas, contáctame por las redes sociales o el email de la descripción.",
|
||||
"playthrough": "🎯 Partida: {{value}}",
|
||||
"difficulty": "🎮 DIFICULTAD"
|
||||
"usagePolicy": "• Siempre acredita con un enlace al vídeo original Y al canal (al menos en la descripción).\n• No reuploadees el vídeo completo ni porciones grandes como contenido propio.\n• No monetices el material sin consentimiento explícito.\n• No edites el material de forma que tergiverse el contenido original o al creador.\n• Compilaciones, reseñas, comentarios y reacciones están OK — siempre que acredites.\nSi tienes dudas, contáctame por las redes sociales o el email de la descripción."
|
||||
},
|
||||
"playthrough": {
|
||||
"blind": "Partida a ciegas (primera vez)",
|
||||
@@ -133,6 +131,62 @@
|
||||
"hard": "Difícil",
|
||||
"nightmare": "Pesadilla / Extremo"
|
||||
},
|
||||
"playthroughNotes": {
|
||||
"header": "▸ 🎮 NOTAS DE LA PARTIDA",
|
||||
"intro": "Configuración, versión y enfoque de esta partida.",
|
||||
"labels": {
|
||||
"runType": "Tipo de partida",
|
||||
"difficulty": "Dificultad",
|
||||
"endings": "Finales mostrados",
|
||||
"languagePatch": "Parche de idioma",
|
||||
"gameVersion": "Versión del juego"
|
||||
},
|
||||
"languagePatchOptions": {
|
||||
"official_en": "Lanzamiento oficial en inglés",
|
||||
"official_other": "Lanzamiento oficial (otro idioma)",
|
||||
"fan_translation": "Traducción de fans",
|
||||
"mtl": "Traducción automática",
|
||||
"custom": "Personalizada"
|
||||
},
|
||||
"gameVersionOptions": {
|
||||
"demo": "Demo",
|
||||
"early_access": "Acceso anticipado",
|
||||
"beta": "Beta",
|
||||
"prologue": "Prólogo / Teaser",
|
||||
"pre_release": "Versión preliminar",
|
||||
"custom": "Personalizada"
|
||||
}
|
||||
},
|
||||
"techNotes": {
|
||||
"header": "▸ 🛠 NOTAS TÉCNICAS",
|
||||
"intro": "Notas de producción y estilo de juego para mayor transparencia.",
|
||||
"items": {
|
||||
"copyright_muted_sections": "Algunas secciones silenciadas por derechos de autor de YouTube",
|
||||
"volume_reduced_copyright": "Volumen reducido en algunas secciones por derechos de autor",
|
||||
"music_replaced_copyright": "Música del juego reemplazada para evitar reclamos de copyright",
|
||||
"cutscene_audio_muted_only": "Solo se silenció el audio de las cinemáticas — el audio del gameplay se mantiene",
|
||||
"original_audio_kept": "Audio original conservado — aceptando posible riesgo de reclamo",
|
||||
"low_resolution_hardware": "Grabado a menor resolución por limitaciones de hardware",
|
||||
"low_graphics_performance": "Configuración gráfica reducida por rendimiento",
|
||||
"fps_drops_hardware": "Caídas de FPS — causadas por hardware (contador de FPS visible arriba a la izquierda)",
|
||||
"bug_from_game": "Los bugs / glitches son del juego, no de la grabación",
|
||||
"crash_kept_transparency": "Crash del juego conservado por transparencia",
|
||||
"loading_cut": "Pantallas de carga eliminadas",
|
||||
"obs_artifacts_possible": "Posibles artefactos de grabación de OBS",
|
||||
"not_no_hit_run": "NO es una partida sin recibir daño — si buscas juego limpio, salta este vídeo",
|
||||
"not_clean_walkthrough": "No es una guía pulida — exploración natural",
|
||||
"casual_no_commentary": "Juego casual, sin comentario",
|
||||
"many_deaths_patience": "Muchas muertes — se requiere paciencia",
|
||||
"slow_exploration": "Mucho retroceso — ritmo de exploración lento",
|
||||
"puzzle_stuck_possible": "Puede haber bloqueos en los puzles",
|
||||
"grinding_cut": "Secciones de grindeo / repetición eliminadas",
|
||||
"not_speedrun_relaxed": "No es un speedrun — partida relajada",
|
||||
"exploration_focus_skip_combat": "Enfocado en exploración — se puede saltar combate",
|
||||
"edited_for_pacing": "Editado para el ritmo — no es en tiempo real",
|
||||
"support_developers": "Música original del juego — apoya a los desarrolladores",
|
||||
"online_connectivity_issues": "Juego online — posibles problemas de conexión"
|
||||
}
|
||||
},
|
||||
"contentWarnings": {
|
||||
"header": "▸ ⚠️ ADVERTENCIAS DE CONTENIDO",
|
||||
"intro": "Este video contiene los siguientes contenidos. Se recomienda discreción al espectador.",
|
||||
|
||||
@@ -318,6 +318,72 @@
|
||||
"grief_loss": "Duelo / pérdida",
|
||||
"kidnapping": "Secuestro"
|
||||
},
|
||||
"playthroughNotes": {
|
||||
"title": "Notas de la partida",
|
||||
"runTypeLabel": "Tipo de partida",
|
||||
"difficultyLabel": "Dificultad",
|
||||
"endingsLabel": "Finales mostrados",
|
||||
"endingsPlaceholder": "ej. Solo final verdadero, 1 de 3, Todas las rutas 100%",
|
||||
"languagePatchLabel": "Parche de idioma",
|
||||
"languagePatchCustomLabel": "Etiqueta de idioma personalizada",
|
||||
"languagePatchCustomPlaceholder": "ej. Oficial KR, Trad. fan ES v2.1",
|
||||
"gameVersionLabel": "Versión del juego",
|
||||
"gameVersionCustomLabel": "Etiqueta de versión personalizada",
|
||||
"gameVersionCustomPlaceholder": "ej. Demo Steam Next Fest, Build de mecenas Kickstarter",
|
||||
"languagePatchOptions": {
|
||||
"none": "— No establecido —",
|
||||
"official_en": "Inglés oficial",
|
||||
"official_other": "Oficial (otro idioma)",
|
||||
"fan_translation": "Traducción de fans",
|
||||
"mtl": "Traducción automática",
|
||||
"custom": "Personalizada…"
|
||||
},
|
||||
"gameVersionOptions": {
|
||||
"full_release": "— Versión completa —",
|
||||
"demo": "Demo",
|
||||
"early_access": "Acceso anticipado",
|
||||
"beta": "Beta",
|
||||
"prologue": "Prólogo / Teaser",
|
||||
"pre_release": "Pre-release",
|
||||
"custom": "Personalizada…"
|
||||
}
|
||||
},
|
||||
"techNotes": "Notas técnicas",
|
||||
"techNoteSearchPlaceholder": "Buscar notas…",
|
||||
"techNoteEmpty": "No hay notas que coincidan",
|
||||
"techNoteGroups": {
|
||||
"audio": "Audio",
|
||||
"video_quality": "Calidad de vídeo",
|
||||
"recording_issues": "Problemas de grabación",
|
||||
"playstyle": "Aclaraciones de estilo",
|
||||
"production": "Producción y créditos"
|
||||
},
|
||||
"techNoteOptions": {
|
||||
"copyright_muted_sections": "Secciones silenciadas (copyright)",
|
||||
"volume_reduced_copyright": "Volumen reducido (copyright)",
|
||||
"music_replaced_copyright": "Música reemplazada (copyright)",
|
||||
"cutscene_audio_muted_only": "Solo cinemáticas silenciadas",
|
||||
"original_audio_kept": "Audio original (riesgo de reclamo)",
|
||||
"low_resolution_hardware": "Baja resolución (hardware)",
|
||||
"low_graphics_performance": "Gráficos reducidos (rendimiento)",
|
||||
"fps_drops_hardware": "Caídas de FPS (hardware)",
|
||||
"bug_from_game": "Los bugs son del juego",
|
||||
"crash_kept_transparency": "Crash incluido (transparencia)",
|
||||
"loading_cut": "Pantallas de carga eliminadas",
|
||||
"obs_artifacts_possible": "Posibles artefactos de OBS",
|
||||
"not_no_hit_run": "NO es no-hit run",
|
||||
"not_clean_walkthrough": "No es guía pulida",
|
||||
"casual_no_commentary": "Casual, sin comentario",
|
||||
"many_deaths_patience": "Muchas muertes",
|
||||
"slow_exploration": "Exploración lenta",
|
||||
"puzzle_stuck_possible": "Posibles bloqueos en puzles",
|
||||
"grinding_cut": "Grindeo eliminado",
|
||||
"not_speedrun_relaxed": "No es speedrun",
|
||||
"exploration_focus_skip_combat": "Enfocado en exploración (skip combate)",
|
||||
"edited_for_pacing": "Editado para el ritmo",
|
||||
"support_developers": "Apoya a los desarrolladores",
|
||||
"online_connectivity_issues": "Problemas de conexión online"
|
||||
},
|
||||
"videoSettings": "Ajustes de Video",
|
||||
"quickPreview": "Vista Previa Rápida",
|
||||
"version": "Versión",
|
||||
|
||||
@@ -117,9 +117,7 @@
|
||||
"cta": "👍 いいね | 🔔 チャンネル登録 | ↗️ シェア",
|
||||
"copyright": "© {{year}} {{channelName}}. All rights reserved.",
|
||||
"usagePolicyHeader": "📋 動画利用ポリシー",
|
||||
"usagePolicy": "• 元動画のリンクとチャンネル名を必ずクレジットしてください(最低でも説明欄に)。\n• 動画全体または大部分の再アップロードは禁止です。\n• 明示的な許可なしに収益化しないでください。\n• 元の内容や制作者を歪曲するような編集は禁止です。\n• クレジットを明記すれば、コンピレーション、レビュー、解説、リアクション動画はOKです。\n不明な点があれば、説明欄のソーシャルアカウントまたはメールでご連絡ください。",
|
||||
"playthrough": "🎯 プレイスタイル: {{value}}",
|
||||
"difficulty": "🎮 難易度"
|
||||
"usagePolicy": "• 元動画のリンクとチャンネル名を必ずクレジットしてください(最低でも説明欄に)。\n• 動画全体または大部分の再アップロードは禁止です。\n• 明示的な許可なしに収益化しないでください。\n• 元の内容や制作者を歪曲するような編集は禁止です。\n• クレジットを明記すれば、コンピレーション、レビュー、解説、リアクション動画はOKです。\n不明な点があれば、説明欄のソーシャルアカウントまたはメールでご連絡ください。"
|
||||
},
|
||||
"playthrough": {
|
||||
"blind": "初見プレイ",
|
||||
@@ -133,6 +131,62 @@
|
||||
"hard": "ハード",
|
||||
"nightmare": "ナイトメア / 最難関"
|
||||
},
|
||||
"playthroughNotes": {
|
||||
"header": "▸ 🎮 プレイ情報",
|
||||
"intro": "本プレイの設定、バージョン、進め方の情報。",
|
||||
"labels": {
|
||||
"runType": "プレイ種別",
|
||||
"difficulty": "難易度",
|
||||
"endings": "公開エンディング",
|
||||
"languagePatch": "言語パッチ",
|
||||
"gameVersion": "ゲームバージョン"
|
||||
},
|
||||
"languagePatchOptions": {
|
||||
"official_en": "公式英語版",
|
||||
"official_other": "公式版(他言語)",
|
||||
"fan_translation": "ファン翻訳",
|
||||
"mtl": "機械翻訳",
|
||||
"custom": "カスタム"
|
||||
},
|
||||
"gameVersionOptions": {
|
||||
"demo": "体験版",
|
||||
"early_access": "アーリーアクセス",
|
||||
"beta": "ベータ版",
|
||||
"prologue": "プロローグ / ティザー",
|
||||
"pre_release": "プレリリース",
|
||||
"custom": "カスタム"
|
||||
}
|
||||
},
|
||||
"techNotes": {
|
||||
"header": "▸ 🛠 技術メモ",
|
||||
"intro": "制作およびプレイスタイルに関する透明性メモ。",
|
||||
"items": {
|
||||
"copyright_muted_sections": "YouTube著作権により一部音声をミュート",
|
||||
"volume_reduced_copyright": "著作権の都合で一部音量を下げています",
|
||||
"music_replaced_copyright": "著作権回避のためBGMを差し替え",
|
||||
"cutscene_audio_muted_only": "ムービーのみミュート — ゲーム音声はそのまま",
|
||||
"original_audio_kept": "原音そのまま — クレーム発生のリスクを承知",
|
||||
"low_resolution_hardware": "ハードウェア性能の都合で低解像度収録",
|
||||
"low_graphics_performance": "パフォーマンスのためグラフィック設定を低下",
|
||||
"fps_drops_hardware": "FPS低下 — ハード起因(左上にFPS表示)",
|
||||
"bug_from_game": "バグ/グリッチはゲーム側のもの、収録環境ではありません",
|
||||
"crash_kept_transparency": "透明性のためクラッシュ場面もそのまま掲載",
|
||||
"loading_cut": "ロード画面はカット済み",
|
||||
"obs_artifacts_possible": "OBS収録由来のアーティファクトの可能性あり",
|
||||
"not_no_hit_run": "ノーヒットランではありません — クリーンプレイ目的の方は注意",
|
||||
"not_clean_walkthrough": "丁寧な攻略ではなく、自然なプレイ重視",
|
||||
"casual_no_commentary": "気楽なプレイ、解説なし",
|
||||
"many_deaths_patience": "死亡シーン多め — 視聴に忍耐が必要かも",
|
||||
"slow_exploration": "戻り道多め — じっくり探索ペース",
|
||||
"puzzle_stuck_possible": "パズルで詰まる場面あり",
|
||||
"grinding_cut": "周回/繰り返しパートはカット",
|
||||
"not_speedrun_relaxed": "スピードランではなく、ゆったりプレイ",
|
||||
"exploration_focus_skip_combat": "探索重視 — 戦闘はスキップする場合あり",
|
||||
"edited_for_pacing": "テンポ調整の編集あり — 実時間ではありません",
|
||||
"support_developers": "原曲使用 — 開発者への応援をよろしくお願いします",
|
||||
"online_connectivity_issues": "オンラインゲーム — 接続不調の可能性"
|
||||
}
|
||||
},
|
||||
"contentWarnings": {
|
||||
"header": "▸ ⚠️ コンテンツ警告",
|
||||
"intro": "本動画には以下の内容が含まれます。視聴の際はご注意ください。",
|
||||
|
||||
@@ -318,6 +318,72 @@
|
||||
"grief_loss": "喪失 / 悲嘆",
|
||||
"kidnapping": "誘拐"
|
||||
},
|
||||
"playthroughNotes": {
|
||||
"title": "プレイ情報",
|
||||
"runTypeLabel": "プレイ種別",
|
||||
"difficultyLabel": "難易度",
|
||||
"endingsLabel": "公開エンディング",
|
||||
"endingsPlaceholder": "例: True エンディングのみ、3つ中1つ、全ルート100%",
|
||||
"languagePatchLabel": "言語パッチ",
|
||||
"languagePatchCustomLabel": "カスタム言語ラベル",
|
||||
"languagePatchCustomPlaceholder": "例: 公式韓国語版、ファン翻訳v2.1",
|
||||
"gameVersionLabel": "ゲームバージョン",
|
||||
"gameVersionCustomLabel": "カスタムバージョンラベル",
|
||||
"gameVersionCustomPlaceholder": "例: Steam Next Fest体験版、Kickstarter支援者ビルド",
|
||||
"languagePatchOptions": {
|
||||
"none": "— 未選択 —",
|
||||
"official_en": "公式英語",
|
||||
"official_other": "公式(他言語)",
|
||||
"fan_translation": "ファン翻訳",
|
||||
"mtl": "機械翻訳",
|
||||
"custom": "カスタム…"
|
||||
},
|
||||
"gameVersionOptions": {
|
||||
"full_release": "— 製品版 —",
|
||||
"demo": "体験版",
|
||||
"early_access": "アーリーアクセス",
|
||||
"beta": "ベータ",
|
||||
"prologue": "プロローグ / ティザー",
|
||||
"pre_release": "プレリリース",
|
||||
"custom": "カスタム…"
|
||||
}
|
||||
},
|
||||
"techNotes": "技術メモ",
|
||||
"techNoteSearchPlaceholder": "メモを検索…",
|
||||
"techNoteEmpty": "該当するメモはありません",
|
||||
"techNoteGroups": {
|
||||
"audio": "音声",
|
||||
"video_quality": "動画品質",
|
||||
"recording_issues": "収録時のトラブル",
|
||||
"playstyle": "プレイスタイル注記",
|
||||
"production": "制作・クレジット"
|
||||
},
|
||||
"techNoteOptions": {
|
||||
"copyright_muted_sections": "一部ミュート(著作権)",
|
||||
"volume_reduced_copyright": "音量低下(著作権)",
|
||||
"music_replaced_copyright": "BGM差し替え(著作権)",
|
||||
"cutscene_audio_muted_only": "ムービーのみミュート",
|
||||
"original_audio_kept": "原音そのまま(クレームリスク)",
|
||||
"low_resolution_hardware": "低解像度(ハード制約)",
|
||||
"low_graphics_performance": "グラフィック低下(性能)",
|
||||
"fps_drops_hardware": "FPS低下(ハード)",
|
||||
"bug_from_game": "バグはゲーム側",
|
||||
"crash_kept_transparency": "クラッシュ含む(透明性)",
|
||||
"loading_cut": "ロード画面カット",
|
||||
"obs_artifacts_possible": "OBS由来のノイズの可能性",
|
||||
"not_no_hit_run": "ノーヒットランではない",
|
||||
"not_clean_walkthrough": "丁寧な攻略ではない",
|
||||
"casual_no_commentary": "気楽プレイ、解説なし",
|
||||
"many_deaths_patience": "死亡多め",
|
||||
"slow_exploration": "じっくり探索",
|
||||
"puzzle_stuck_possible": "パズルで詰まる可能性",
|
||||
"grinding_cut": "周回パートカット",
|
||||
"not_speedrun_relaxed": "スピードランではない",
|
||||
"exploration_focus_skip_combat": "探索重視(戦闘スキップ)",
|
||||
"edited_for_pacing": "テンポ編集あり",
|
||||
"support_developers": "開発者を応援",
|
||||
"online_connectivity_issues": "オンライン接続不調"
|
||||
},
|
||||
"videoSettings": "動画設定",
|
||||
"quickPreview": "クイックプレビュー",
|
||||
"version": "バージョン",
|
||||
|
||||
@@ -117,9 +117,7 @@
|
||||
"cta": "👍 좋아요 | 🔔 구독 | ↗️ 공유",
|
||||
"copyright": "© {{year}} {{channelName}}. All rights reserved.",
|
||||
"usagePolicyHeader": "📋 영상 사용 정책",
|
||||
"usagePolicy": "• 원본 영상 링크와 채널을 반드시 크레딧해주세요 (최소한 설명란에).\n• 전체 영상 또는 상당 부분을 본인 콘텐츠로 재업로드하지 마세요.\n• 명시적 동의 없이 수익화하지 마세요.\n• 원본 내용이나 제작자를 왜곡하는 방식으로 편집하지 마세요.\n• 컴필레이션, 리뷰, 해설, 리액션 영상은 크레딧만 하면 OK입니다.\n불확실한 경우 설명란의 소셜 계정이나 이메일로 연락주세요.",
|
||||
"playthrough": "🎯 플레이 방식: {{value}}",
|
||||
"difficulty": "🎮 난이도"
|
||||
"usagePolicy": "• 원본 영상 링크와 채널을 반드시 크레딧해주세요 (최소한 설명란에).\n• 전체 영상 또는 상당 부분을 본인 콘텐츠로 재업로드하지 마세요.\n• 명시적 동의 없이 수익화하지 마세요.\n• 원본 내용이나 제작자를 왜곡하는 방식으로 편집하지 마세요.\n• 컴필레이션, 리뷰, 해설, 리액션 영상은 크레딧만 하면 OK입니다.\n불확실한 경우 설명란의 소셜 계정이나 이메일로 연락주세요."
|
||||
},
|
||||
"playthrough": {
|
||||
"blind": "초회차 플레이 (블라인드)",
|
||||
@@ -133,6 +131,62 @@
|
||||
"hard": "어려움",
|
||||
"nightmare": "악몽 / 최고 난이도"
|
||||
},
|
||||
"playthroughNotes": {
|
||||
"header": "▸ 🎮 플레이 노트",
|
||||
"intro": "이번 플레이의 설정, 버전, 진행 방식에 대한 안내.",
|
||||
"labels": {
|
||||
"runType": "플레이 방식",
|
||||
"difficulty": "난이도",
|
||||
"endings": "공개된 엔딩",
|
||||
"languagePatch": "언어 패치",
|
||||
"gameVersion": "게임 버전"
|
||||
},
|
||||
"languagePatchOptions": {
|
||||
"official_en": "공식 영어판",
|
||||
"official_other": "공식판 (다른 언어)",
|
||||
"fan_translation": "팬 번역",
|
||||
"mtl": "기계 번역",
|
||||
"custom": "사용자 지정"
|
||||
},
|
||||
"gameVersionOptions": {
|
||||
"demo": "데모",
|
||||
"early_access": "얼리 액세스",
|
||||
"beta": "베타",
|
||||
"prologue": "프롤로그 / 티저",
|
||||
"pre_release": "프리릴리스",
|
||||
"custom": "사용자 지정"
|
||||
}
|
||||
},
|
||||
"techNotes": {
|
||||
"header": "▸ 🛠 기술 노트",
|
||||
"intro": "투명성을 위한 제작 및 플레이 스타일 노트.",
|
||||
"items": {
|
||||
"copyright_muted_sections": "YouTube 저작권으로 일부 구간 음소거",
|
||||
"volume_reduced_copyright": "저작권 문제로 일부 구간 볼륨 다운",
|
||||
"music_replaced_copyright": "저작권 회피를 위해 게임 음악 교체",
|
||||
"cutscene_audio_muted_only": "컷씬 오디오만 음소거 — 게임플레이 오디오 유지",
|
||||
"original_audio_kept": "원본 오디오 유지 — 클레임 위험 감수",
|
||||
"low_resolution_hardware": "하드웨어 한계로 낮은 해상도 녹화",
|
||||
"low_graphics_performance": "성능을 위해 그래픽 설정 낮춤",
|
||||
"fps_drops_hardware": "FPS 저하 — 하드웨어 원인 (좌측 상단 FPS 표시)",
|
||||
"bug_from_game": "버그/글리치는 게임 자체의 문제, 녹화 환경이 아님",
|
||||
"crash_kept_transparency": "투명성을 위해 게임 크래시 그대로 유지",
|
||||
"loading_cut": "로딩 화면은 잘라냄",
|
||||
"obs_artifacts_possible": "OBS 녹화 아티팩트 가능성",
|
||||
"not_no_hit_run": "노히트 런 아님 — 깔끔한 플레이를 원하면 건너뛰세요",
|
||||
"not_clean_walkthrough": "정돈된 공략 아님 — 자연스러운 탐험",
|
||||
"casual_no_commentary": "캐주얼 플레이, 해설 없음",
|
||||
"many_deaths_patience": "사망 장면 다수 — 인내심 필요",
|
||||
"slow_exploration": "되돌아가는 구간 다수 — 느린 탐험",
|
||||
"puzzle_stuck_possible": "퍼즐에서 막힐 수 있음",
|
||||
"grinding_cut": "노가다/반복 구간 잘라냄",
|
||||
"not_speedrun_relaxed": "스피드런 아님 — 여유로운 플레이",
|
||||
"exploration_focus_skip_combat": "탐험 중심 — 전투를 건너뛸 수 있음",
|
||||
"edited_for_pacing": "리듬을 위해 편집 — 실시간 아님",
|
||||
"support_developers": "원곡 사용 — 개발자를 응원해 주세요",
|
||||
"online_connectivity_issues": "온라인 게임 — 연결 문제 가능성"
|
||||
}
|
||||
},
|
||||
"contentWarnings": {
|
||||
"header": "▸ ⚠️ 콘텐츠 경고",
|
||||
"intro": "이 영상에는 다음 콘텐츠가 포함되어 있습니다. 시청에 주의해 주세요.",
|
||||
|
||||
@@ -318,6 +318,72 @@
|
||||
"grief_loss": "상실 / 슬픔",
|
||||
"kidnapping": "납치"
|
||||
},
|
||||
"playthroughNotes": {
|
||||
"title": "플레이 노트",
|
||||
"runTypeLabel": "플레이 방식",
|
||||
"difficultyLabel": "난이도",
|
||||
"endingsLabel": "공개된 엔딩",
|
||||
"endingsPlaceholder": "예: 트루 엔딩만, 3개 중 1개, 모든 루트 100%",
|
||||
"languagePatchLabel": "언어 패치",
|
||||
"languagePatchCustomLabel": "언어 라벨 (사용자 지정)",
|
||||
"languagePatchCustomPlaceholder": "예: 공식 KR, 팬 번역 v2.1",
|
||||
"gameVersionLabel": "게임 버전",
|
||||
"gameVersionCustomLabel": "버전 라벨 (사용자 지정)",
|
||||
"gameVersionCustomPlaceholder": "예: Steam Next Fest 데모, Kickstarter 후원자 빌드",
|
||||
"languagePatchOptions": {
|
||||
"none": "— 미선택 —",
|
||||
"official_en": "공식 영어",
|
||||
"official_other": "공식 (다른 언어)",
|
||||
"fan_translation": "팬 번역",
|
||||
"mtl": "기계 번역",
|
||||
"custom": "사용자 지정…"
|
||||
},
|
||||
"gameVersionOptions": {
|
||||
"full_release": "— 정식판 —",
|
||||
"demo": "데모",
|
||||
"early_access": "얼리 액세스",
|
||||
"beta": "베타",
|
||||
"prologue": "프롤로그 / 티저",
|
||||
"pre_release": "프리릴리스",
|
||||
"custom": "사용자 지정…"
|
||||
}
|
||||
},
|
||||
"techNotes": "기술 노트",
|
||||
"techNoteSearchPlaceholder": "노트 검색…",
|
||||
"techNoteEmpty": "일치하는 노트 없음",
|
||||
"techNoteGroups": {
|
||||
"audio": "오디오",
|
||||
"video_quality": "영상 품질",
|
||||
"recording_issues": "녹화 문제",
|
||||
"playstyle": "플레이 스타일 안내",
|
||||
"production": "제작 및 크레딧"
|
||||
},
|
||||
"techNoteOptions": {
|
||||
"copyright_muted_sections": "일부 음소거 (저작권)",
|
||||
"volume_reduced_copyright": "볼륨 다운 (저작권)",
|
||||
"music_replaced_copyright": "음악 교체 (저작권)",
|
||||
"cutscene_audio_muted_only": "컷씬만 음소거",
|
||||
"original_audio_kept": "원본 오디오 유지 (클레임 위험)",
|
||||
"low_resolution_hardware": "낮은 해상도 (하드웨어)",
|
||||
"low_graphics_performance": "그래픽 낮춤 (성능)",
|
||||
"fps_drops_hardware": "FPS 저하 (하드웨어)",
|
||||
"bug_from_game": "버그는 게임 자체",
|
||||
"crash_kept_transparency": "크래시 유지 (투명성)",
|
||||
"loading_cut": "로딩 화면 잘라냄",
|
||||
"obs_artifacts_possible": "OBS 아티팩트 가능성",
|
||||
"not_no_hit_run": "노히트 런 아님",
|
||||
"not_clean_walkthrough": "정돈된 공략 아님",
|
||||
"casual_no_commentary": "캐주얼, 해설 없음",
|
||||
"many_deaths_patience": "사망 다수",
|
||||
"slow_exploration": "느린 탐험",
|
||||
"puzzle_stuck_possible": "퍼즐에서 막힐 수 있음",
|
||||
"grinding_cut": "노가다 잘라냄",
|
||||
"not_speedrun_relaxed": "스피드런 아님",
|
||||
"exploration_focus_skip_combat": "탐험 중심 (전투 스킵)",
|
||||
"edited_for_pacing": "리듬 위해 편집",
|
||||
"support_developers": "개발자 응원",
|
||||
"online_connectivity_issues": "온라인 연결 문제"
|
||||
},
|
||||
"videoSettings": "영상 설정",
|
||||
"quickPreview": "빠른 미리보기",
|
||||
"version": "버전",
|
||||
|
||||
@@ -117,9 +117,7 @@
|
||||
"cta": "👍 Like | 🔔 Đăng ký | ↗️ Chia sẻ",
|
||||
"copyright": "© {{year}} {{channelName}}. Đã đăng ký bản quyền.",
|
||||
"usagePolicyHeader": "📋 ĐIỀU KIỆN DÙNG VIDEO",
|
||||
"usagePolicy": "• Luôn luôn ghi credit kèm link video gốc VÀ kênh (tối thiểu trong phần mô tả).\n• Không re-upload toàn bộ video hoặc phần lớn nội dung dưới dạng content của bạn.\n• Không kiếm tiền từ footage mà chưa có sự đồng ý rõ ràng.\n• Không chỉnh sửa footage theo cách xuyên tạc nội dung gốc hoặc người tạo.\n• Compilation, review, commentary, reaction video đều OK miễn là có credit.\nNếu không chắc, liên hệ qua các kênh social hoặc email ở phần mô tả.",
|
||||
"playthrough": "🎯 Playthrough: {{value}}",
|
||||
"difficulty": "🎮 ĐỘ KHÓ"
|
||||
"usagePolicy": "• Luôn luôn ghi credit kèm link video gốc VÀ kênh (tối thiểu trong phần mô tả).\n• Không re-upload toàn bộ video hoặc phần lớn nội dung dưới dạng content của bạn.\n• Không kiếm tiền từ footage mà chưa có sự đồng ý rõ ràng.\n• Không chỉnh sửa footage theo cách xuyên tạc nội dung gốc hoặc người tạo.\n• Compilation, review, commentary, reaction video đều OK miễn là có credit.\nNếu không chắc, liên hệ qua các kênh social hoặc email ở phần mô tả."
|
||||
},
|
||||
"playthrough": {
|
||||
"blind": "Chơi lần đầu (blind run)",
|
||||
@@ -133,6 +131,62 @@
|
||||
"hard": "Khó",
|
||||
"nightmare": "Ác mộng / Cực khó"
|
||||
},
|
||||
"playthroughNotes": {
|
||||
"header": "▸ 🎮 GHI CHÚ LƯỢT CHƠI",
|
||||
"intro": "Thông tin thiết lập, phiên bản và cách chơi của lượt chơi này.",
|
||||
"labels": {
|
||||
"runType": "Kiểu chơi",
|
||||
"difficulty": "Độ khó",
|
||||
"endings": "Endings xuất hiện",
|
||||
"languagePatch": "Bản dịch",
|
||||
"gameVersion": "Phiên bản game"
|
||||
},
|
||||
"languagePatchOptions": {
|
||||
"official_en": "Bản tiếng Anh chính thức",
|
||||
"official_other": "Bản chính thức (ngôn ngữ khác)",
|
||||
"fan_translation": "Bản dịch của fan",
|
||||
"mtl": "Dịch máy",
|
||||
"custom": "Tùy chỉnh"
|
||||
},
|
||||
"gameVersionOptions": {
|
||||
"demo": "Bản demo",
|
||||
"early_access": "Early Access",
|
||||
"beta": "Bản beta",
|
||||
"prologue": "Prologue / Teaser",
|
||||
"pre_release": "Bản pre-release",
|
||||
"custom": "Tùy chỉnh"
|
||||
}
|
||||
},
|
||||
"techNotes": {
|
||||
"header": "▸ 🛠 GHI CHÚ KỸ THUẬT",
|
||||
"intro": "Ghi chú minh bạch về sản xuất và cách chơi.",
|
||||
"items": {
|
||||
"copyright_muted_sections": "Một số đoạn tắt tiếng do bản quyền YouTube",
|
||||
"volume_reduced_copyright": "Một số đoạn giảm volume vì bản quyền",
|
||||
"music_replaced_copyright": "Nhạc game đã được thay để tránh bản quyền",
|
||||
"cutscene_audio_muted_only": "Chỉ tắt tiếng cutscene — audio gameplay giữ nguyên",
|
||||
"original_audio_kept": "Giữ nguyên audio gốc — chấp nhận rủi ro claim",
|
||||
"low_resolution_hardware": "Quay ở độ phân giải thấp do phần cứng",
|
||||
"low_graphics_performance": "Hạ setting đồ họa vì hiệu năng",
|
||||
"fps_drops_hardware": "Có sụt FPS — do phần cứng (xem FPS góc trái video)",
|
||||
"bug_from_game": "Bug / lag là từ game, không phải do quay",
|
||||
"crash_kept_transparency": "Giữ lại đoạn crash để minh bạch",
|
||||
"loading_cut": "Đã cắt loading screen",
|
||||
"obs_artifacts_possible": "Có thể có lỗi do OBS recording",
|
||||
"not_no_hit_run": "Không phải no-hit run — bạn tìm clean play thì bỏ qua",
|
||||
"not_clean_walkthrough": "Không phải walkthrough mượt — chơi khám phá tự nhiên",
|
||||
"casual_no_commentary": "Chơi giải trí, không bình luận",
|
||||
"many_deaths_patience": "Có nhiều lần chết — cần kiên nhẫn xem",
|
||||
"slow_exploration": "Đi lại nhiều — khám phá chậm",
|
||||
"puzzle_stuck_possible": "Có thể bí ở puzzle",
|
||||
"grinding_cut": "Đã cắt phần cày / lặp",
|
||||
"not_speedrun_relaxed": "Không phải speedrun — chơi thư giãn",
|
||||
"exploration_focus_skip_combat": "Tập trung khám phá — có thể skip combat",
|
||||
"edited_for_pacing": "Đã edit cho hợp nhịp — không phải thời gian thực",
|
||||
"support_developers": "Nhạc gốc của game — hãy ủng hộ nhà phát triển",
|
||||
"online_connectivity_issues": "Game online — có thể có vấn đề kết nối"
|
||||
}
|
||||
},
|
||||
"contentWarnings": {
|
||||
"header": "▸ ⚠️ CẢNH BÁO NỘI DUNG",
|
||||
"intro": "Video này chứa các nội dung sau. Cân nhắc trước khi xem.",
|
||||
|
||||
@@ -318,6 +318,72 @@
|
||||
"grief_loss": "Mất mát / đau buồn",
|
||||
"kidnapping": "Bắt cóc"
|
||||
},
|
||||
"playthroughNotes": {
|
||||
"title": "Ghi chú lượt chơi",
|
||||
"runTypeLabel": "Kiểu chơi",
|
||||
"difficultyLabel": "Độ khó",
|
||||
"endingsLabel": "Endings xuất hiện",
|
||||
"endingsPlaceholder": "vd: Chỉ true ending, 1 trong 3, All routes 100%",
|
||||
"languagePatchLabel": "Bản dịch",
|
||||
"languagePatchCustomLabel": "Nhãn ngôn ngữ tuỳ chỉnh",
|
||||
"languagePatchCustomPlaceholder": "vd: Bản KR chính thức, Bản dịch fan VNI v2.1",
|
||||
"gameVersionLabel": "Phiên bản game",
|
||||
"gameVersionCustomLabel": "Nhãn phiên bản tuỳ chỉnh",
|
||||
"gameVersionCustomPlaceholder": "vd: Demo Steam Next Fest, Bản backer Kickstarter",
|
||||
"languagePatchOptions": {
|
||||
"none": "— Chưa chọn —",
|
||||
"official_en": "Tiếng Anh chính thức",
|
||||
"official_other": "Chính thức (ngôn ngữ khác)",
|
||||
"fan_translation": "Bản dịch fan",
|
||||
"mtl": "Dịch máy",
|
||||
"custom": "Tuỳ chỉnh…"
|
||||
},
|
||||
"gameVersionOptions": {
|
||||
"full_release": "— Bản chính thức —",
|
||||
"demo": "Demo",
|
||||
"early_access": "Early Access",
|
||||
"beta": "Beta",
|
||||
"prologue": "Prologue / Teaser",
|
||||
"pre_release": "Pre-release",
|
||||
"custom": "Tuỳ chỉnh…"
|
||||
}
|
||||
},
|
||||
"techNotes": "Ghi chú kỹ thuật",
|
||||
"techNoteSearchPlaceholder": "Tìm ghi chú…",
|
||||
"techNoteEmpty": "Không có ghi chú phù hợp",
|
||||
"techNoteGroups": {
|
||||
"audio": "Âm thanh",
|
||||
"video_quality": "Chất lượng video",
|
||||
"recording_issues": "Lỗi quay",
|
||||
"playstyle": "Ghi chú cách chơi",
|
||||
"production": "Sản xuất & ghi nhận"
|
||||
},
|
||||
"techNoteOptions": {
|
||||
"copyright_muted_sections": "Tắt tiếng (bản quyền)",
|
||||
"volume_reduced_copyright": "Giảm volume (bản quyền)",
|
||||
"music_replaced_copyright": "Thay nhạc (bản quyền)",
|
||||
"cutscene_audio_muted_only": "Chỉ tắt cutscene",
|
||||
"original_audio_kept": "Giữ audio gốc (rủi ro claim)",
|
||||
"low_resolution_hardware": "Độ phân giải thấp (phần cứng)",
|
||||
"low_graphics_performance": "Hạ đồ họa (hiệu năng)",
|
||||
"fps_drops_hardware": "Sụt FPS (phần cứng)",
|
||||
"bug_from_game": "Bug là từ game",
|
||||
"crash_kept_transparency": "Giữ crash (minh bạch)",
|
||||
"loading_cut": "Cắt loading screen",
|
||||
"obs_artifacts_possible": "Có thể có lỗi OBS",
|
||||
"not_no_hit_run": "KHÔNG phải no-hit run",
|
||||
"not_clean_walkthrough": "Không phải walkthrough mượt",
|
||||
"casual_no_commentary": "Giải trí, không bình luận",
|
||||
"many_deaths_patience": "Nhiều lần chết",
|
||||
"slow_exploration": "Khám phá chậm",
|
||||
"puzzle_stuck_possible": "Có thể bí ở puzzle",
|
||||
"grinding_cut": "Cắt phần cày",
|
||||
"not_speedrun_relaxed": "Không phải speedrun",
|
||||
"exploration_focus_skip_combat": "Khám phá (skip combat)",
|
||||
"edited_for_pacing": "Edit cho hợp nhịp",
|
||||
"support_developers": "Ủng hộ nhà phát triển",
|
||||
"online_connectivity_issues": "Lỗi kết nối online"
|
||||
},
|
||||
"videoSettings": "Cài đặt Video",
|
||||
"quickPreview": "Xem trước nhanh",
|
||||
"version": "Phiên bản",
|
||||
|
||||
@@ -117,9 +117,7 @@
|
||||
"cta": "👍 点赞 | 🔔 订阅 | ↗️ 分享",
|
||||
"copyright": "© {{year}} {{channelName}}. 版权所有。",
|
||||
"usagePolicyHeader": "📋 视频使用规则",
|
||||
"usagePolicy": "• 请务必附上原视频链接和频道的 credit(至少在描述中)。\n• 请勿将完整视频或大部分内容作为自己的内容重新上传。\n• 未经明确同意,请勿对素材进行商业化。\n• 请勿以歪曲原内容或创作者的方式剪辑素材。\n• 合集、评测、解说、反应视频均可 — 只要标明出处。\n如有疑问,请通过描述中的社交账号或邮箱联系我。",
|
||||
"playthrough": "🎯 游玩方式: {{value}}",
|
||||
"difficulty": "🎮 难度"
|
||||
"usagePolicy": "• 请务必附上原视频链接和频道的 credit(至少在描述中)。\n• 请勿将完整视频或大部分内容作为自己的内容重新上传。\n• 未经明确同意,请勿对素材进行商业化。\n• 请勿以歪曲原内容或创作者的方式剪辑素材。\n• 合集、评测、解说、反应视频均可 — 只要标明出处。\n如有疑问,请通过描述中的社交账号或邮箱联系我。"
|
||||
},
|
||||
"playthrough": {
|
||||
"blind": "初见游玩 (blind)",
|
||||
@@ -133,6 +131,62 @@
|
||||
"hard": "困难",
|
||||
"nightmare": "噩梦 / 极难"
|
||||
},
|
||||
"playthroughNotes": {
|
||||
"header": "▸ 🎮 本期游玩说明",
|
||||
"intro": "本次游玩的设置、版本及游玩方式说明。",
|
||||
"labels": {
|
||||
"runType": "游玩类型",
|
||||
"difficulty": "难度",
|
||||
"endings": "展示的结局",
|
||||
"languagePatch": "语言补丁",
|
||||
"gameVersion": "游戏版本"
|
||||
},
|
||||
"languagePatchOptions": {
|
||||
"official_en": "官方英文版",
|
||||
"official_other": "官方版本(其他语言)",
|
||||
"fan_translation": "民间翻译",
|
||||
"mtl": "机器翻译",
|
||||
"custom": "自定义"
|
||||
},
|
||||
"gameVersionOptions": {
|
||||
"demo": "试玩版",
|
||||
"early_access": "抢先体验版",
|
||||
"beta": "测试版",
|
||||
"prologue": "前传 / 预告",
|
||||
"pre_release": "预发布版本",
|
||||
"custom": "自定义"
|
||||
}
|
||||
},
|
||||
"techNotes": {
|
||||
"header": "▸ 🛠 技术说明",
|
||||
"intro": "为保持透明度的制作和游玩说明。",
|
||||
"items": {
|
||||
"copyright_muted_sections": "因 YouTube 版权部分静音",
|
||||
"volume_reduced_copyright": "因版权部分降低音量",
|
||||
"music_replaced_copyright": "为避免版权索赔已替换游戏音乐",
|
||||
"cutscene_audio_muted_only": "仅静音过场动画 — 游玩音频保留",
|
||||
"original_audio_kept": "保留原音 — 接受可能的版权索赔风险",
|
||||
"low_resolution_hardware": "因硬件限制以较低分辨率录制",
|
||||
"low_graphics_performance": "为性能降低画质设置",
|
||||
"fps_drops_hardware": "帧数下降 — 硬件原因(左上角可见 FPS 显示)",
|
||||
"bug_from_game": "Bug / 卡顿来自游戏本身,并非录制问题",
|
||||
"crash_kept_transparency": "为保持透明度保留游戏崩溃片段",
|
||||
"loading_cut": "已剪掉读取画面",
|
||||
"obs_artifacts_possible": "可能存在 OBS 录制造成的瑕疵",
|
||||
"not_no_hit_run": "并非无伤通关 — 想看干净游玩请跳过",
|
||||
"not_clean_walkthrough": "并非精修攻略 — 自然探索",
|
||||
"casual_no_commentary": "休闲游玩,无解说",
|
||||
"many_deaths_patience": "死亡较多 — 需要耐心观看",
|
||||
"slow_exploration": "频繁折返 — 探索节奏较慢",
|
||||
"puzzle_stuck_possible": "可能在解谜处卡住",
|
||||
"grinding_cut": "已剪掉刷取/重复段落",
|
||||
"not_speedrun_relaxed": "并非速通 — 轻松游玩",
|
||||
"exploration_focus_skip_combat": "侧重探索 — 战斗可能被跳过",
|
||||
"edited_for_pacing": "为节奏剪辑 — 并非实时",
|
||||
"support_developers": "原版游戏音乐 — 请支持开发者",
|
||||
"online_connectivity_issues": "联机游戏 — 可能存在连线问题"
|
||||
}
|
||||
},
|
||||
"contentWarnings": {
|
||||
"header": "▸ ⚠️ 内容警告",
|
||||
"intro": "本视频包含以下内容,请观众自行斟酌观看。",
|
||||
|
||||
@@ -318,6 +318,72 @@
|
||||
"grief_loss": "失去 / 悲伤",
|
||||
"kidnapping": "绑架"
|
||||
},
|
||||
"playthroughNotes": {
|
||||
"title": "本期游玩说明",
|
||||
"runTypeLabel": "游玩类型",
|
||||
"difficultyLabel": "难度",
|
||||
"endingsLabel": "展示的结局",
|
||||
"endingsPlaceholder": "例:仅真结局、3 选 1、全路线 100%",
|
||||
"languagePatchLabel": "语言补丁",
|
||||
"languagePatchCustomLabel": "自定义语言标签",
|
||||
"languagePatchCustomPlaceholder": "例:官方韩文版、民间汉化 v2.1",
|
||||
"gameVersionLabel": "游戏版本",
|
||||
"gameVersionCustomLabel": "自定义版本标签",
|
||||
"gameVersionCustomPlaceholder": "例:Steam Next Fest 试玩、Kickstarter 支持者版本",
|
||||
"languagePatchOptions": {
|
||||
"none": "— 未选择 —",
|
||||
"official_en": "官方英文",
|
||||
"official_other": "官方(其他语言)",
|
||||
"fan_translation": "民间翻译",
|
||||
"mtl": "机器翻译",
|
||||
"custom": "自定义…"
|
||||
},
|
||||
"gameVersionOptions": {
|
||||
"full_release": "— 正式版 —",
|
||||
"demo": "试玩版",
|
||||
"early_access": "抢先体验",
|
||||
"beta": "测试版",
|
||||
"prologue": "前传 / 预告",
|
||||
"pre_release": "预发布",
|
||||
"custom": "自定义…"
|
||||
}
|
||||
},
|
||||
"techNotes": "技术说明",
|
||||
"techNoteSearchPlaceholder": "搜索说明…",
|
||||
"techNoteEmpty": "无匹配的说明",
|
||||
"techNoteGroups": {
|
||||
"audio": "音频",
|
||||
"video_quality": "视频质量",
|
||||
"recording_issues": "录制问题",
|
||||
"playstyle": "游玩风格说明",
|
||||
"production": "制作与署名"
|
||||
},
|
||||
"techNoteOptions": {
|
||||
"copyright_muted_sections": "部分静音(版权)",
|
||||
"volume_reduced_copyright": "音量降低(版权)",
|
||||
"music_replaced_copyright": "替换音乐(版权)",
|
||||
"cutscene_audio_muted_only": "仅过场静音",
|
||||
"original_audio_kept": "保留原音(索赔风险)",
|
||||
"low_resolution_hardware": "低分辨率(硬件)",
|
||||
"low_graphics_performance": "画质降低(性能)",
|
||||
"fps_drops_hardware": "帧数下降(硬件)",
|
||||
"bug_from_game": "Bug 来自游戏",
|
||||
"crash_kept_transparency": "保留崩溃(透明)",
|
||||
"loading_cut": "剪掉读取画面",
|
||||
"obs_artifacts_possible": "可能存在 OBS 瑕疵",
|
||||
"not_no_hit_run": "并非无伤通关",
|
||||
"not_clean_walkthrough": "并非精修攻略",
|
||||
"casual_no_commentary": "休闲,无解说",
|
||||
"many_deaths_patience": "死亡较多",
|
||||
"slow_exploration": "慢节奏探索",
|
||||
"puzzle_stuck_possible": "可能卡解谜",
|
||||
"grinding_cut": "剪掉刷取段落",
|
||||
"not_speedrun_relaxed": "并非速通",
|
||||
"exploration_focus_skip_combat": "侧重探索(跳过战斗)",
|
||||
"edited_for_pacing": "为节奏剪辑",
|
||||
"support_developers": "支持开发者",
|
||||
"online_connectivity_issues": "联机连线问题"
|
||||
},
|
||||
"videoSettings": "视频设置",
|
||||
"quickPreview": "快速预览",
|
||||
"version": "版本",
|
||||
|
||||
@@ -10,7 +10,8 @@ import { RigEditor } from "@components/editor/RigEditor";
|
||||
import { SocialEditor } from "@components/editor/SocialEditor";
|
||||
import { VietnameseDonateEditor } from "@components/editor/VietnameseDonateEditor";
|
||||
import { ContentWarningChecklist } from "@components/editor/ContentWarningChecklist";
|
||||
import { ContentDetailsForm } from "@components/editor/ContentDetailsForm";
|
||||
import { PlaythroughNotesForm } from "@components/editor/PlaythroughNotesForm";
|
||||
import { TechNotesChecklist } from "@components/editor/TechNotesChecklist";
|
||||
import { ThumbnailHelper } from "@components/editor/ThumbnailHelper";
|
||||
import { PinnedCommentEditor } from "@components/editor/PinnedCommentEditor";
|
||||
import { MusicAttributionEditor } from "@components/editor/MusicAttributionEditor";
|
||||
@@ -94,8 +95,9 @@ export function EditorPage() {
|
||||
onToggle={() => toggleAccordion("contentDetails")}
|
||||
>
|
||||
<TimestampEditor />
|
||||
<ContentDetailsForm />
|
||||
<PlaythroughNotesForm />
|
||||
<ContentWarningChecklist />
|
||||
<TechNotesChecklist />
|
||||
<ValidatedInput
|
||||
label={t("editor.playlistLink")}
|
||||
placeholder={t("editor.playlistLinkPlaceholder")}
|
||||
|
||||
+203
-114
@@ -8,6 +8,14 @@ import type {
|
||||
PlaythroughStatus,
|
||||
DifficultyLevel,
|
||||
ContentWarning,
|
||||
LanguagePatch,
|
||||
GameVersion,
|
||||
TechNote,
|
||||
} from "@engine/types";
|
||||
import {
|
||||
LANGUAGE_PATCH_OPTIONS,
|
||||
GAME_VERSION_OPTIONS,
|
||||
TECH_NOTES,
|
||||
} from "@engine/types";
|
||||
import {
|
||||
GRAPHICS_PRESETS,
|
||||
@@ -29,7 +37,7 @@ import {
|
||||
} from "@config/gacha-quest-types";
|
||||
import { DEFAULTS } from "@config/defaults";
|
||||
|
||||
interface EditorData {
|
||||
export interface EditorData {
|
||||
videoType: VideoType;
|
||||
language: SupportedLanguage;
|
||||
genres: Genre[];
|
||||
@@ -79,7 +87,19 @@ interface EditorData {
|
||||
playthroughStatus: PlaythroughStatus;
|
||||
difficulty: DifficultyLevel;
|
||||
difficultyCustomLabel: string;
|
||||
/** Free-text endings descriptor for Playthrough Notes (v0.12). */
|
||||
endingsShown: string;
|
||||
/** Language-patch enum for Playthrough Notes (v0.12). */
|
||||
languagePatch: LanguagePatch;
|
||||
/** Free-form label paired with `languagePatch === "official_other" | "custom"`. */
|
||||
languagePatchCustom: string;
|
||||
/** Game-version enum for Playthrough Notes (v0.12). */
|
||||
gameVersion: GameVersion;
|
||||
/** Free-form label paired with `gameVersion === "custom"`. */
|
||||
gameVersionCustom: string;
|
||||
contentWarnings: ContentWarning[];
|
||||
/** Tech / production / playstyle disclaimer checklist items (v0.12). */
|
||||
techNotes: TechNote[];
|
||||
storeLinks: Record<string, string>;
|
||||
storeLinkTypes: Record<string, StoreLinkType>;
|
||||
social: Record<string, string>;
|
||||
@@ -235,7 +255,13 @@ const initialState: EditorData = {
|
||||
playthroughStatus: DEFAULTS.editor.playthroughStatus as PlaythroughStatus,
|
||||
difficulty: DEFAULTS.editor.difficulty as DifficultyLevel,
|
||||
difficultyCustomLabel: DEFAULTS.editor.difficultyCustomLabel,
|
||||
endingsShown: DEFAULTS.editor.endingsShown,
|
||||
languagePatch: DEFAULTS.editor.languagePatch,
|
||||
languagePatchCustom: DEFAULTS.editor.languagePatchCustom,
|
||||
gameVersion: DEFAULTS.editor.gameVersion,
|
||||
gameVersionCustom: DEFAULTS.editor.gameVersionCustom,
|
||||
contentWarnings: [...DEFAULTS.editor.contentWarnings] as ContentWarning[],
|
||||
techNotes: [...DEFAULTS.editor.techNotes] as TechNote[],
|
||||
storeLinks: { ...DEFAULTS.editor.storeLinks },
|
||||
storeLinkTypes: { ...DEFAULTS.editor.storeLinkTypes },
|
||||
social: { ...DEFAULTS.editor.social },
|
||||
@@ -320,119 +346,19 @@ export const useEditorStore = create<EditorState>()(
|
||||
// "native_aa"` is no longer a valid combo (DLSS uses
|
||||
// `dlaa`); coerce invalid pairs to `"none"` so the
|
||||
// editor Select doesn't render with a stale value.
|
||||
version: 9,
|
||||
migrate: (persistedState: unknown, version: number): EditorData => {
|
||||
if (!persistedState || typeof persistedState !== "object") {
|
||||
return { ...initialState };
|
||||
}
|
||||
const state = persistedState as Record<string, unknown> & {
|
||||
genre?: unknown;
|
||||
sponsorName?: unknown;
|
||||
sponsorPlatform?: unknown;
|
||||
};
|
||||
if (version < 2 && typeof state.genre === "string" && !Array.isArray(state.genres)) {
|
||||
state.genres = [state.genre];
|
||||
delete state.genre;
|
||||
}
|
||||
if (version < 3) {
|
||||
if (typeof state.sponsorName !== "string") state.sponsorName = "";
|
||||
if (typeof state.sponsorPlatform !== "string") state.sponsorPlatform = "";
|
||||
}
|
||||
if (version < 4) {
|
||||
if (typeof state.playthroughStatus !== "string") state.playthroughStatus = "none";
|
||||
if (typeof state.difficulty !== "string") state.difficulty = "none";
|
||||
if (typeof state.difficultyCustomLabel !== "string") {
|
||||
state.difficultyCustomLabel = "";
|
||||
}
|
||||
if (!Array.isArray(state.contentWarnings)) state.contentWarnings = [];
|
||||
}
|
||||
if (version < 5) {
|
||||
// Map legacy free-form preset text to the new enum + Custom slot.
|
||||
const legacy = typeof state.graphicsPreset === "string" ? state.graphicsPreset : "";
|
||||
const isAlreadyEnum = (GRAPHICS_PRESETS as readonly string[]).includes(legacy);
|
||||
if (!isAlreadyEnum) {
|
||||
const { preset, custom } = legacyGraphicsPresetToEnum(legacy);
|
||||
state.graphicsPreset = preset;
|
||||
if (typeof state.graphicsPresetCustom !== "string") {
|
||||
state.graphicsPresetCustom = custom;
|
||||
}
|
||||
} else if (typeof state.graphicsPresetCustom !== "string") {
|
||||
state.graphicsPresetCustom = "";
|
||||
}
|
||||
if (typeof state.skipGraphicsSettings !== "boolean") {
|
||||
state.skipGraphicsSettings = false;
|
||||
}
|
||||
if (!Array.isArray(state.rayTracingModes)) state.rayTracingModes = [];
|
||||
if (typeof state.frameGenVendor !== "string") state.frameGenVendor = "none";
|
||||
if (typeof state.frameGenMultiplier !== "string") state.frameGenMultiplier = "none";
|
||||
if (typeof state.upscaleQuality !== "string") state.upscaleQuality = "none";
|
||||
if (typeof state.artStyle !== "string") state.artStyle = "none";
|
||||
if (typeof state.versionInfo !== "string") state.versionInfo = "";
|
||||
if (typeof state.liveUrl !== "string") state.liveUrl = "";
|
||||
if (typeof state.scheduledTime !== "string") state.scheduledTime = "";
|
||||
}
|
||||
if (version < 6) {
|
||||
if (typeof state.modList !== "string") state.modList = "";
|
||||
if (typeof state.vnBankName !== "string") state.vnBankName = "";
|
||||
if (typeof state.vnBankAccount !== "string") state.vnBankAccount = "";
|
||||
if (typeof state.vnBankHolder !== "string") state.vnBankHolder = "";
|
||||
if (typeof state.vnMomo !== "string") state.vnMomo = "";
|
||||
if (typeof state.vnZalopay !== "string") state.vnZalopay = "";
|
||||
}
|
||||
if (version < 7) {
|
||||
const gqt = state.gachaQuestType;
|
||||
if (
|
||||
typeof gqt !== "string" ||
|
||||
!(GACHA_QUEST_TYPES as readonly string[]).includes(gqt)
|
||||
) {
|
||||
state.gachaQuestType = DEFAULT_GACHA_QUEST_TYPE;
|
||||
}
|
||||
if (typeof state.chapterName !== "string") state.chapterName = "";
|
||||
if (typeof state.questName !== "string") state.questName = "";
|
||||
}
|
||||
if (version < 8) {
|
||||
if (typeof state.pubDevName !== "string") state.pubDevName = "";
|
||||
}
|
||||
if (version < 9) {
|
||||
// 1. New per-profile ads field — empty-string back-fill.
|
||||
if (typeof state.thirdPartyAdText !== "string") state.thirdPartyAdText = "";
|
||||
|
||||
// 2. Merge legacy boolean toggles into the unified checklist.
|
||||
// `Array.isArray` defensive — pre-v0.4 drafts that never
|
||||
// saw the v3→v4 migration may still have a non-array here.
|
||||
const cw: ContentWarning[] = Array.isArray(state.contentWarnings)
|
||||
? (state.contentWarnings as ContentWarning[])
|
||||
: [];
|
||||
if (state.spoilerWarning === true && !cw.includes("spoiler_story")) {
|
||||
cw.push("spoiler_story");
|
||||
}
|
||||
if (state.matureWarning === true && !cw.includes("mature_18plus")) {
|
||||
cw.push("mature_18plus");
|
||||
}
|
||||
state.contentWarnings = cw;
|
||||
state.spoilerWarning = false;
|
||||
state.matureWarning = false;
|
||||
|
||||
// 3. Coerce vendor-incompatible upscale / frame-gen combos.
|
||||
const persistedVendor =
|
||||
typeof state.frameGenVendor === "string"
|
||||
? (state.frameGenVendor as FrameGenVendor)
|
||||
: "none";
|
||||
state.upscaleQuality = coerceUpscaleQuality(
|
||||
persistedVendor,
|
||||
typeof state.upscaleQuality === "string"
|
||||
? (state.upscaleQuality as UpscaleQuality)
|
||||
: "none",
|
||||
);
|
||||
state.frameGenMultiplier = coerceFrameGenMultiplier(
|
||||
persistedVendor,
|
||||
typeof state.frameGenMultiplier === "string"
|
||||
? (state.frameGenMultiplier as FrameGenMultiplier)
|
||||
: "none",
|
||||
);
|
||||
}
|
||||
return { ...initialState, ...state } as EditorData;
|
||||
},
|
||||
// v9 → v10: v0.12. Playthrough Notes section consolidated the v0.7
|
||||
// standalone "🎯 Playthrough" + "🎮 DIFFICULTY" blocks into
|
||||
// a single `▸ 🎮 PLAYTHROUGH NOTES` description block, and
|
||||
// added three new structured fields (`endingsShown`,
|
||||
// `languagePatch` + custom, `gameVersion` + custom). A new
|
||||
// `techNotes` checklist (`▸ 🛠 TECH NOTES`) sits after
|
||||
// content warnings. Migration is purely additive — the
|
||||
// existing `playthroughStatus` / `difficulty` /
|
||||
// `difficultyCustomLabel` values are preserved; only the
|
||||
// description-builder render path changed.
|
||||
version: 10,
|
||||
migrate: (persistedState, version) =>
|
||||
migrateEditorState(persistedState, version),
|
||||
partialize: (state) => ({
|
||||
videoType: state.videoType,
|
||||
language: state.language,
|
||||
@@ -478,7 +404,13 @@ export const useEditorStore = create<EditorState>()(
|
||||
playthroughStatus: state.playthroughStatus,
|
||||
difficulty: state.difficulty,
|
||||
difficultyCustomLabel: state.difficultyCustomLabel,
|
||||
endingsShown: state.endingsShown,
|
||||
languagePatch: state.languagePatch,
|
||||
languagePatchCustom: state.languagePatchCustom,
|
||||
gameVersion: state.gameVersion,
|
||||
gameVersionCustom: state.gameVersionCustom,
|
||||
contentWarnings: state.contentWarnings,
|
||||
techNotes: state.techNotes,
|
||||
storeLinks: state.storeLinks,
|
||||
storeLinkTypes: state.storeLinkTypes,
|
||||
social: state.social,
|
||||
@@ -492,3 +424,160 @@ export const useEditorStore = create<EditorState>()(
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
* Editor-store persist migration (extracted from the inline `migrate`
|
||||
* config so it's directly testable). Each `if (version < N)` block
|
||||
* back-fills the schema delta introduced in version `N`. Exported so
|
||||
* tests can feed in a known persisted blob and assert the migrated
|
||||
* result without going through localStorage.
|
||||
*/
|
||||
export function migrateEditorState(
|
||||
persistedState: unknown,
|
||||
version: number,
|
||||
): EditorData {
|
||||
if (!persistedState || typeof persistedState !== "object") {
|
||||
return { ...initialState };
|
||||
}
|
||||
const state = persistedState as Record<string, unknown> & {
|
||||
genre?: unknown;
|
||||
sponsorName?: unknown;
|
||||
sponsorPlatform?: unknown;
|
||||
};
|
||||
if (version < 2 && typeof state.genre === "string" && !Array.isArray(state.genres)) {
|
||||
state.genres = [state.genre];
|
||||
delete state.genre;
|
||||
}
|
||||
if (version < 3) {
|
||||
if (typeof state.sponsorName !== "string") state.sponsorName = "";
|
||||
if (typeof state.sponsorPlatform !== "string") state.sponsorPlatform = "";
|
||||
}
|
||||
if (version < 4) {
|
||||
if (typeof state.playthroughStatus !== "string") state.playthroughStatus = "none";
|
||||
if (typeof state.difficulty !== "string") state.difficulty = "none";
|
||||
if (typeof state.difficultyCustomLabel !== "string") {
|
||||
state.difficultyCustomLabel = "";
|
||||
}
|
||||
if (!Array.isArray(state.contentWarnings)) state.contentWarnings = [];
|
||||
}
|
||||
if (version < 5) {
|
||||
// Map legacy free-form preset text to the new enum + Custom slot.
|
||||
const legacy = typeof state.graphicsPreset === "string" ? state.graphicsPreset : "";
|
||||
const isAlreadyEnum = (GRAPHICS_PRESETS as readonly string[]).includes(legacy);
|
||||
if (!isAlreadyEnum) {
|
||||
const { preset, custom } = legacyGraphicsPresetToEnum(legacy);
|
||||
state.graphicsPreset = preset;
|
||||
if (typeof state.graphicsPresetCustom !== "string") {
|
||||
state.graphicsPresetCustom = custom;
|
||||
}
|
||||
} else if (typeof state.graphicsPresetCustom !== "string") {
|
||||
state.graphicsPresetCustom = "";
|
||||
}
|
||||
if (typeof state.skipGraphicsSettings !== "boolean") {
|
||||
state.skipGraphicsSettings = false;
|
||||
}
|
||||
if (!Array.isArray(state.rayTracingModes)) state.rayTracingModes = [];
|
||||
if (typeof state.frameGenVendor !== "string") state.frameGenVendor = "none";
|
||||
if (typeof state.frameGenMultiplier !== "string") state.frameGenMultiplier = "none";
|
||||
if (typeof state.upscaleQuality !== "string") state.upscaleQuality = "none";
|
||||
if (typeof state.artStyle !== "string") state.artStyle = "none";
|
||||
if (typeof state.versionInfo !== "string") state.versionInfo = "";
|
||||
if (typeof state.liveUrl !== "string") state.liveUrl = "";
|
||||
if (typeof state.scheduledTime !== "string") state.scheduledTime = "";
|
||||
}
|
||||
if (version < 6) {
|
||||
if (typeof state.modList !== "string") state.modList = "";
|
||||
if (typeof state.vnBankName !== "string") state.vnBankName = "";
|
||||
if (typeof state.vnBankAccount !== "string") state.vnBankAccount = "";
|
||||
if (typeof state.vnBankHolder !== "string") state.vnBankHolder = "";
|
||||
if (typeof state.vnMomo !== "string") state.vnMomo = "";
|
||||
if (typeof state.vnZalopay !== "string") state.vnZalopay = "";
|
||||
}
|
||||
if (version < 7) {
|
||||
const gqt = state.gachaQuestType;
|
||||
if (
|
||||
typeof gqt !== "string" ||
|
||||
!(GACHA_QUEST_TYPES as readonly string[]).includes(gqt)
|
||||
) {
|
||||
state.gachaQuestType = DEFAULT_GACHA_QUEST_TYPE;
|
||||
}
|
||||
if (typeof state.chapterName !== "string") state.chapterName = "";
|
||||
if (typeof state.questName !== "string") state.questName = "";
|
||||
}
|
||||
if (version < 8) {
|
||||
if (typeof state.pubDevName !== "string") state.pubDevName = "";
|
||||
}
|
||||
if (version < 9) {
|
||||
// 1. New per-profile ads field — empty-string back-fill.
|
||||
if (typeof state.thirdPartyAdText !== "string") state.thirdPartyAdText = "";
|
||||
|
||||
// 2. Merge legacy boolean toggles into the unified checklist.
|
||||
// `Array.isArray` defensive — pre-v0.4 drafts that never
|
||||
// saw the v3→v4 migration may still have a non-array here.
|
||||
const cw: ContentWarning[] = Array.isArray(state.contentWarnings)
|
||||
? (state.contentWarnings as ContentWarning[])
|
||||
: [];
|
||||
if (state.spoilerWarning === true && !cw.includes("spoiler_story")) {
|
||||
cw.push("spoiler_story");
|
||||
}
|
||||
if (state.matureWarning === true && !cw.includes("mature_18plus")) {
|
||||
cw.push("mature_18plus");
|
||||
}
|
||||
state.contentWarnings = cw;
|
||||
state.spoilerWarning = false;
|
||||
state.matureWarning = false;
|
||||
|
||||
// 3. Coerce vendor-incompatible upscale / frame-gen combos.
|
||||
const persistedVendor =
|
||||
typeof state.frameGenVendor === "string"
|
||||
? (state.frameGenVendor as FrameGenVendor)
|
||||
: "none";
|
||||
state.upscaleQuality = coerceUpscaleQuality(
|
||||
persistedVendor,
|
||||
typeof state.upscaleQuality === "string"
|
||||
? (state.upscaleQuality as UpscaleQuality)
|
||||
: "none",
|
||||
);
|
||||
state.frameGenMultiplier = coerceFrameGenMultiplier(
|
||||
persistedVendor,
|
||||
typeof state.frameGenMultiplier === "string"
|
||||
? (state.frameGenMultiplier as FrameGenMultiplier)
|
||||
: "none",
|
||||
);
|
||||
}
|
||||
if (version < 10) {
|
||||
// Playthrough Notes new fields — empty / sentinel back-fill.
|
||||
if (typeof state.endingsShown !== "string") state.endingsShown = "";
|
||||
if (
|
||||
typeof state.languagePatch !== "string" ||
|
||||
!(LANGUAGE_PATCH_OPTIONS as readonly string[]).includes(state.languagePatch as string)
|
||||
) {
|
||||
state.languagePatch = "none";
|
||||
}
|
||||
if (typeof state.languagePatchCustom !== "string") {
|
||||
state.languagePatchCustom = "";
|
||||
}
|
||||
if (
|
||||
typeof state.gameVersion !== "string" ||
|
||||
!(GAME_VERSION_OPTIONS as readonly string[]).includes(state.gameVersion as string)
|
||||
) {
|
||||
state.gameVersion = "full_release";
|
||||
}
|
||||
if (typeof state.gameVersionCustom !== "string") {
|
||||
state.gameVersionCustom = "";
|
||||
}
|
||||
// Tech Notes checklist — empty array back-fill, with a defensive
|
||||
// filter so a hand-edited persistent blob with stale ids doesn't
|
||||
// crash the engine on first read.
|
||||
if (!Array.isArray(state.techNotes)) {
|
||||
state.techNotes = [];
|
||||
} else {
|
||||
state.techNotes = (state.techNotes as unknown[]).filter(
|
||||
(id): id is TechNote =>
|
||||
typeof id === "string" &&
|
||||
(TECH_NOTES as readonly string[]).includes(id),
|
||||
);
|
||||
}
|
||||
}
|
||||
return { ...initialState, ...state } as EditorData;
|
||||
}
|
||||
@@ -10,6 +10,9 @@ import type {
|
||||
PlaythroughStatus,
|
||||
DifficultyLevel,
|
||||
ContentWarning,
|
||||
LanguagePatch,
|
||||
GameVersion,
|
||||
TechNote,
|
||||
} from "@engine/types";
|
||||
import type {
|
||||
GraphicsPreset,
|
||||
@@ -88,6 +91,16 @@ export interface TemplateSnapshot {
|
||||
difficulty?: DifficultyLevel;
|
||||
difficultyCustomLabel?: string;
|
||||
contentWarnings?: ContentWarning[];
|
||||
/** v0.12 Playthrough Notes structured fields. Optional for back-compat
|
||||
* with pre-v0.12 templates — `loadProfile` spreads `...patch` so
|
||||
* missing keys keep the editor's existing values. */
|
||||
endingsShown?: string;
|
||||
languagePatch?: LanguagePatch;
|
||||
languagePatchCustom?: string;
|
||||
gameVersion?: GameVersion;
|
||||
gameVersionCustom?: string;
|
||||
/** v0.12 Tech Notes checklist. Optional for back-compat. */
|
||||
techNotes?: TechNote[];
|
||||
storeLinks: Record<string, string>;
|
||||
storeLinkTypes: Record<string, StoreLinkType>;
|
||||
social: Record<string, string>;
|
||||
|
||||
@@ -807,57 +807,245 @@ describe("buildDescription", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("buildDescription — v0.7 content fields", () => {
|
||||
it("renders the playthrough block after the intro when set", () => {
|
||||
describe("buildDescription — v0.12 Playthrough Notes consolidation", () => {
|
||||
it("renders run type as a bullet of the unified PLAYTHROUGH NOTES block", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(
|
||||
makeInput({ playthroughStatus: "blind" }),
|
||||
t,
|
||||
);
|
||||
expect(result).toContain("🎯 Playthrough:");
|
||||
expect(result).toContain("Blind run (first time playing)");
|
||||
// Lands between the intro line and the No-Commentary tagline:
|
||||
expect(result).toContain("▸ 🎮 PLAYTHROUGH NOTES");
|
||||
expect(result).toContain("• Run type: Blind run (first time playing)");
|
||||
// The block sits between the intro and No Commentary, replacing the
|
||||
// pre-v0.12 standalone "🎯 Playthrough:" line.
|
||||
const introIdx = result.indexOf("full gameplay of Elden Ring");
|
||||
const playthroughIdx = result.indexOf("🎯 Playthrough");
|
||||
const pnIdx = result.indexOf("▸ 🎮 PLAYTHROUGH NOTES");
|
||||
const noCommentaryIdx = result.indexOf("No Commentary");
|
||||
expect(playthroughIdx).toBeGreaterThan(introIdx);
|
||||
expect(noCommentaryIdx).toBeGreaterThan(playthroughIdx);
|
||||
expect(pnIdx).toBeGreaterThan(introIdx);
|
||||
expect(noCommentaryIdx).toBeGreaterThan(pnIdx);
|
||||
// The legacy single-line block must NOT render anymore.
|
||||
expect(result).not.toContain("🎯 Playthrough:");
|
||||
});
|
||||
|
||||
it("omits the playthrough block when value is 'none'", () => {
|
||||
it("omits the entire PLAYTHROUGH NOTES block when every field is unset", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(
|
||||
makeInput({ playthroughStatus: "none" }),
|
||||
makeInput({
|
||||
playthroughStatus: "none",
|
||||
difficulty: "none",
|
||||
endingsShown: "",
|
||||
languagePatch: "none",
|
||||
gameVersion: "full_release",
|
||||
}),
|
||||
t,
|
||||
);
|
||||
expect(result).not.toContain("▸ 🎮 PLAYTHROUGH NOTES");
|
||||
expect(result).not.toContain("🎯 Playthrough");
|
||||
expect(result).not.toContain("🎮 DIFFICULTY");
|
||||
});
|
||||
|
||||
it("renders the difficulty block with a preset label", () => {
|
||||
it("renders difficulty as a bullet using the preset label", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(makeInput({ difficulty: "hard" }), t);
|
||||
expect(result).toContain("🎮 DIFFICULTY");
|
||||
expect(result).toContain("Hard");
|
||||
expect(result).toContain("▸ 🎮 PLAYTHROUGH NOTES");
|
||||
expect(result).toContain("• Difficulty: Hard");
|
||||
// Old standalone block must be gone.
|
||||
expect(result).not.toContain("🎮 DIFFICULTY\n");
|
||||
});
|
||||
|
||||
it("renders a custom difficulty label when difficulty is 'custom'", () => {
|
||||
it("uses the custom difficulty label verbatim when difficulty is 'custom'", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(
|
||||
makeInput({ difficulty: "custom", difficultyCustomLabel: "Lethal" }),
|
||||
t,
|
||||
);
|
||||
expect(result).toContain("🎮 DIFFICULTY\nLethal");
|
||||
expect(result).toContain("• Difficulty: Lethal");
|
||||
});
|
||||
|
||||
it("skips the difficulty block when difficulty is 'custom' but label is blank", () => {
|
||||
it("skips the Difficulty bullet when difficulty='custom' but label is blank", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(
|
||||
makeInput({ difficulty: "custom", difficultyCustomLabel: " " }),
|
||||
t,
|
||||
);
|
||||
expect(result).not.toContain("🎮 DIFFICULTY");
|
||||
// The whole PN block should be skipped (no other PN field set either).
|
||||
expect(result).not.toContain("▸ 🎮 PLAYTHROUGH NOTES");
|
||||
});
|
||||
|
||||
it("renders all five PLAYTHROUGH NOTES bullets when fully filled", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(
|
||||
makeInput({
|
||||
playthroughStatus: "blind",
|
||||
difficulty: "hard",
|
||||
endingsShown: "True ending only",
|
||||
languagePatch: "fan_translation",
|
||||
gameVersion: "early_access",
|
||||
}),
|
||||
t,
|
||||
);
|
||||
expect(result).toContain("▸ 🎮 PLAYTHROUGH NOTES");
|
||||
expect(result).toContain("• Run type: Blind run (first time playing)");
|
||||
expect(result).toContain("• Difficulty: Hard");
|
||||
expect(result).toContain("• Endings shown: True ending only");
|
||||
expect(result).toContain("• Language patch: Fan translation");
|
||||
expect(result).toContain("• Game version: Early Access");
|
||||
});
|
||||
|
||||
it("uses the custom slot for languagePatch='official_other'", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(
|
||||
makeInput({
|
||||
languagePatch: "official_other",
|
||||
languagePatchCustom: "Official KR",
|
||||
}),
|
||||
t,
|
||||
);
|
||||
expect(result).toContain("• Language patch: Official KR");
|
||||
});
|
||||
|
||||
it("uses the custom slot for gameVersion='custom'", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(
|
||||
makeInput({
|
||||
gameVersion: "custom",
|
||||
gameVersionCustom: "Kickstarter backer build",
|
||||
}),
|
||||
t,
|
||||
);
|
||||
expect(result).toContain("• Game version: Kickstarter backer build");
|
||||
});
|
||||
|
||||
it("renders bilingual EN · VI bullets when language=vi and tEn is provided", () => {
|
||||
const t = createMockT("vi");
|
||||
const tEn = createMockT("en");
|
||||
const result = buildDescription(
|
||||
makeInput({
|
||||
language: "vi",
|
||||
playthroughStatus: "blind",
|
||||
difficulty: "hard",
|
||||
languagePatch: "fan_translation",
|
||||
}),
|
||||
t,
|
||||
{ tEn },
|
||||
);
|
||||
expect(result).toContain(
|
||||
"▸ 🎮 PLAYTHROUGH NOTES / ▸ 🎮 GHI CHÚ LƯỢT CHƠI",
|
||||
);
|
||||
expect(result).toContain(
|
||||
"• Run type · Kiểu chơi: Blind run (first time playing) · Chơi lần đầu (blind run)",
|
||||
);
|
||||
expect(result).toContain("• Difficulty · Độ khó: Hard · Khó");
|
||||
expect(result).toContain(
|
||||
"• Language patch · Bản dịch: Fan translation · Bản dịch của fan",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("buildDescription — v0.12 Tech Notes", () => {
|
||||
it("renders selected tech notes as a bulleted block (en single-language)", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(
|
||||
makeInput({
|
||||
techNotes: ["copyright_muted_sections", "fps_drops_hardware"],
|
||||
}),
|
||||
t,
|
||||
);
|
||||
expect(result).toContain("▸ 🛠 TECH NOTES");
|
||||
expect(result).toContain(
|
||||
"Production and playstyle notes for transparency.",
|
||||
);
|
||||
expect(result).toContain(
|
||||
"• Some sections muted due to YouTube copyright",
|
||||
);
|
||||
expect(result).toContain(
|
||||
"• FPS drops — caused by hardware (FPS counter visible top-left)",
|
||||
);
|
||||
expect(result).not.toContain("• Game music replaced");
|
||||
});
|
||||
|
||||
it("omits the TECH NOTES block when the list is empty", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(makeInput({ techNotes: [] }), t);
|
||||
expect(result).not.toContain("TECH NOTES");
|
||||
});
|
||||
|
||||
it("preserves selection order in the rendered tech-note bullets", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(
|
||||
makeInput({
|
||||
techNotes: [
|
||||
"not_no_hit_run",
|
||||
"support_developers",
|
||||
"loading_cut",
|
||||
],
|
||||
}),
|
||||
t,
|
||||
);
|
||||
const noHitIdx = result.indexOf("• NOT a no-hit run");
|
||||
const supportIdx = result.indexOf("• Original game music");
|
||||
const loadingIdx = result.indexOf("• Loading screens");
|
||||
expect(noHitIdx).toBeGreaterThan(-1);
|
||||
expect(supportIdx).toBeGreaterThan(noHitIdx);
|
||||
expect(loadingIdx).toBeGreaterThan(supportIdx);
|
||||
});
|
||||
|
||||
it("renders bilingual EN · VI tech-note bullets when language=vi and tEn provided", () => {
|
||||
const t = createMockT("vi");
|
||||
const tEn = createMockT("en");
|
||||
const result = buildDescription(
|
||||
makeInput({
|
||||
language: "vi",
|
||||
techNotes: ["copyright_muted_sections", "casual_no_commentary"],
|
||||
}),
|
||||
t,
|
||||
{ tEn },
|
||||
);
|
||||
expect(result).toContain("▸ 🛠 TECH NOTES / ▸ 🛠 GHI CHÚ KỸ THUẬT");
|
||||
expect(result).toContain(
|
||||
"• Some sections muted due to YouTube copyright · Một số đoạn tắt tiếng do bản quyền YouTube",
|
||||
);
|
||||
expect(result).toContain(
|
||||
"• Casual play, no commentary · Chơi giải trí, không bình luận",
|
||||
);
|
||||
});
|
||||
|
||||
it("renders bilingual EN · JA tech-note bullets in Japanese mode", () => {
|
||||
const t = createMockT("ja");
|
||||
const tEn = createMockT("en");
|
||||
const result = buildDescription(
|
||||
makeInput({
|
||||
language: "ja",
|
||||
techNotes: ["fps_drops_hardware", "support_developers"],
|
||||
}),
|
||||
t,
|
||||
{ tEn },
|
||||
);
|
||||
expect(result).toContain("▸ 🛠 TECH NOTES / ▸ 🛠 技術メモ");
|
||||
expect(result).toContain(
|
||||
"• FPS drops — caused by hardware (FPS counter visible top-left) · FPS低下 — ハード起因(左上にFPS表示)",
|
||||
);
|
||||
expect(result).toContain(
|
||||
"• Original game music — please support the developers · 原曲使用 — 開発者への応援をよろしくお願いします",
|
||||
);
|
||||
});
|
||||
|
||||
it("falls back to single-language tech-note bullets when tEn is omitted", () => {
|
||||
const t = createMockT("vi");
|
||||
const result = buildDescription(
|
||||
makeInput({ language: "vi", techNotes: ["fps_drops_hardware"] }),
|
||||
t,
|
||||
);
|
||||
// No `· ` separator since tEn isn't passed.
|
||||
expect(result).not.toContain(" · ");
|
||||
expect(result).toContain("▸ 🛠 GHI CHÚ KỸ THUẬT");
|
||||
expect(result).toContain(
|
||||
"• Có sụt FPS — do phần cứng (xem FPS góc trái video)",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("buildDescription — v0.7 content fields (legacy)", () => {
|
||||
it("renders content warnings as a bulleted block (v0.11 unified, en single-language)", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(
|
||||
|
||||
@@ -0,0 +1,190 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { buildGeneratorInputFromEditor } from "@hooks/use-current-generator-input";
|
||||
import { DEFAULTS } from "@config/defaults";
|
||||
import type { EditorData } from "@store/editor-store";
|
||||
import type {
|
||||
PlaythroughStatus,
|
||||
DifficultyLevel,
|
||||
ContentWarning,
|
||||
LanguagePatch,
|
||||
GameVersion,
|
||||
TechNote,
|
||||
GraphicsPreset,
|
||||
RTMode,
|
||||
FrameGenVendor,
|
||||
FrameGenMultiplier,
|
||||
UpscaleQuality,
|
||||
ArtStyle,
|
||||
VideoType,
|
||||
Genre,
|
||||
SupportedLanguage,
|
||||
StoreLinkType,
|
||||
} from "@engine/types";
|
||||
import type { GachaQuestType } from "@config/gacha-quest-types";
|
||||
|
||||
/**
|
||||
* Regression suite for the v0.12.0 bug where six new editor fields
|
||||
* (`endingsShown`, `languagePatch`, `languagePatchCustom`, `gameVersion`,
|
||||
* `gameVersionCustom`, `techNotes`) were added to {@link EditorData} +
|
||||
* `GeneratorInput` but the editor → engine mapping in
|
||||
* `useCurrentGeneratorInput` wasn't kept in sync. Symptom: ticking a
|
||||
* tech-note checkbox didn't propagate into the description preview
|
||||
* because the engine never saw the field.
|
||||
*
|
||||
* The pure helper `buildGeneratorInputFromEditor` is now unit-testable
|
||||
* without React rendering — these tests assert it carries every editor
|
||||
* field across, with a parity check that fails loudly if a future field
|
||||
* is added to EditorData but skipped here.
|
||||
*/
|
||||
|
||||
function makeEditorData(overrides: Partial<EditorData> = {}): EditorData {
|
||||
return {
|
||||
videoType: DEFAULTS.editor.videoType as VideoType,
|
||||
language: DEFAULTS.editor.language as SupportedLanguage,
|
||||
genres: [...DEFAULTS.editor.genres] as Genre[],
|
||||
gameName: DEFAULTS.editor.gameName,
|
||||
gameNameLocalized: { ...DEFAULTS.editor.gameNameLocalized },
|
||||
channelName: DEFAULTS.editor.channelName,
|
||||
platform: DEFAULTS.editor.platform,
|
||||
partNumber: DEFAULTS.editor.partNumber,
|
||||
bossName: DEFAULTS.editor.bossName,
|
||||
dlcName: DEFAULTS.editor.dlcName,
|
||||
challengeName: DEFAULTS.editor.challengeName,
|
||||
modName: DEFAULTS.editor.modName,
|
||||
modList: DEFAULTS.editor.modList,
|
||||
liveUrl: DEFAULTS.editor.liveUrl,
|
||||
scheduledTime: DEFAULTS.editor.scheduledTime,
|
||||
gachaQuestType: DEFAULTS.editor.gachaQuestType as GachaQuestType,
|
||||
chapterName: DEFAULTS.editor.chapterName,
|
||||
questName: DEFAULTS.editor.questName,
|
||||
resolution: DEFAULTS.editor.resolution,
|
||||
fps: DEFAULTS.editor.fps,
|
||||
graphicsPreset: DEFAULTS.editor.graphicsPreset as GraphicsPreset,
|
||||
graphicsPresetCustom: DEFAULTS.editor.graphicsPresetCustom,
|
||||
skipGraphicsSettings: DEFAULTS.editor.skipGraphicsSettings,
|
||||
rayTracingModes: [...DEFAULTS.editor.rayTracingModes] as RTMode[],
|
||||
frameGenVendor: DEFAULTS.editor.frameGenVendor as FrameGenVendor,
|
||||
frameGenMultiplier: DEFAULTS.editor.frameGenMultiplier as FrameGenMultiplier,
|
||||
upscaleQuality: DEFAULTS.editor.upscaleQuality as UpscaleQuality,
|
||||
artStyle: DEFAULTS.editor.artStyle as ArtStyle,
|
||||
versionInfo: DEFAULTS.editor.versionInfo,
|
||||
timestamps: DEFAULTS.editor.timestamps,
|
||||
playlistLink: DEFAULTS.editor.playlistLink,
|
||||
contactEmail: DEFAULTS.editor.contactEmail,
|
||||
musicAttribution: DEFAULTS.editor.musicAttribution,
|
||||
sponsorName: DEFAULTS.editor.sponsorName,
|
||||
sponsorPlatform: DEFAULTS.editor.sponsorPlatform,
|
||||
pubDevName: DEFAULTS.editor.pubDevName,
|
||||
thirdPartyAdText: DEFAULTS.editor.thirdPartyAdText,
|
||||
thumbnailText: DEFAULTS.editor.thumbnailText,
|
||||
pinnedComment: DEFAULTS.editor.pinnedComment,
|
||||
spoilerWarning: DEFAULTS.editor.spoilerWarning,
|
||||
matureWarning: DEFAULTS.editor.matureWarning,
|
||||
playthroughStatus: DEFAULTS.editor.playthroughStatus as PlaythroughStatus,
|
||||
difficulty: DEFAULTS.editor.difficulty as DifficultyLevel,
|
||||
difficultyCustomLabel: DEFAULTS.editor.difficultyCustomLabel,
|
||||
endingsShown: DEFAULTS.editor.endingsShown,
|
||||
languagePatch: DEFAULTS.editor.languagePatch as LanguagePatch,
|
||||
languagePatchCustom: DEFAULTS.editor.languagePatchCustom,
|
||||
gameVersion: DEFAULTS.editor.gameVersion as GameVersion,
|
||||
gameVersionCustom: DEFAULTS.editor.gameVersionCustom,
|
||||
contentWarnings: [...DEFAULTS.editor.contentWarnings] as ContentWarning[],
|
||||
techNotes: [...DEFAULTS.editor.techNotes] as TechNote[],
|
||||
storeLinks: { ...DEFAULTS.editor.storeLinks },
|
||||
storeLinkTypes: { ...DEFAULTS.editor.storeLinkTypes } as Record<string, StoreLinkType>,
|
||||
social: { ...DEFAULTS.editor.social },
|
||||
rig: { ...DEFAULTS.editor.rig },
|
||||
vnBankName: DEFAULTS.editor.vnBankName,
|
||||
vnBankAccount: DEFAULTS.editor.vnBankAccount,
|
||||
vnBankHolder: DEFAULTS.editor.vnBankHolder,
|
||||
vnMomo: DEFAULTS.editor.vnMomo,
|
||||
vnZalopay: DEFAULTS.editor.vnZalopay,
|
||||
...overrides,
|
||||
};
|
||||
}
|
||||
|
||||
describe("buildGeneratorInputFromEditor — v0.12 fields propagation (regression)", () => {
|
||||
it("passes through endingsShown to GeneratorInput", () => {
|
||||
const input = buildGeneratorInputFromEditor(
|
||||
makeEditorData({ endingsShown: "True ending only" }),
|
||||
);
|
||||
expect(input.endingsShown).toBe("True ending only");
|
||||
});
|
||||
|
||||
it("passes through languagePatch + languagePatchCustom", () => {
|
||||
const input = buildGeneratorInputFromEditor(
|
||||
makeEditorData({
|
||||
languagePatch: "official_other",
|
||||
languagePatchCustom: "Official KR",
|
||||
}),
|
||||
);
|
||||
expect(input.languagePatch).toBe("official_other");
|
||||
expect(input.languagePatchCustom).toBe("Official KR");
|
||||
});
|
||||
|
||||
it("passes through gameVersion + gameVersionCustom", () => {
|
||||
const input = buildGeneratorInputFromEditor(
|
||||
makeEditorData({
|
||||
gameVersion: "custom",
|
||||
gameVersionCustom: "Kickstarter backer build",
|
||||
}),
|
||||
);
|
||||
expect(input.gameVersion).toBe("custom");
|
||||
expect(input.gameVersionCustom).toBe("Kickstarter backer build");
|
||||
});
|
||||
|
||||
it("passes through techNotes preserving selection order", () => {
|
||||
const input = buildGeneratorInputFromEditor(
|
||||
makeEditorData({
|
||||
techNotes: ["copyright_muted_sections", "fps_drops_hardware", "loading_cut"],
|
||||
}),
|
||||
);
|
||||
expect(input.techNotes).toEqual([
|
||||
"copyright_muted_sections",
|
||||
"fps_drops_hardware",
|
||||
"loading_cut",
|
||||
]);
|
||||
});
|
||||
|
||||
it("respects languageOverride for batch / multi-language rendering", () => {
|
||||
const input = buildGeneratorInputFromEditor(
|
||||
makeEditorData({ language: "en" }),
|
||||
"vi",
|
||||
);
|
||||
expect(input.language).toBe("vi");
|
||||
});
|
||||
|
||||
/**
|
||||
* Parity guard. Lists every key on EditorData that does NOT end up in
|
||||
* GeneratorInput on purpose (`thumbnailText` / `pinnedComment` feed
|
||||
* the pinned-comment builder via a separate code path; `spoiler-`
|
||||
* and `matureWarning` are deprecated v0.7 booleans kept on persisted
|
||||
* shapes only). Anything else added to EditorData but not surfaced in
|
||||
* the input shape will trip this assertion — preventing a silent
|
||||
* repeat of the v0.12.0 bug.
|
||||
*/
|
||||
it("forwards every non-excluded EditorData field into GeneratorInput", () => {
|
||||
const editorOnlyKeys = new Set<keyof EditorData>([
|
||||
"thumbnailText",
|
||||
"pinnedComment",
|
||||
]);
|
||||
|
||||
const editor = makeEditorData();
|
||||
const input = buildGeneratorInputFromEditor(editor);
|
||||
const inputKeys = new Set(Object.keys(input));
|
||||
|
||||
const missing: string[] = [];
|
||||
for (const key of Object.keys(editor) as (keyof EditorData)[]) {
|
||||
if (editorOnlyKeys.has(key)) continue;
|
||||
if (!inputKeys.has(key)) missing.push(key);
|
||||
}
|
||||
|
||||
expect(
|
||||
missing,
|
||||
`EditorData fields ${JSON.stringify(missing)} are not surfaced in ` +
|
||||
`GeneratorInput. If a field is intentionally engine-irrelevant, add ` +
|
||||
`it to the editorOnlyKeys allowlist; otherwise add it to ` +
|
||||
`buildGeneratorInputFromEditor.`,
|
||||
).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,163 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { migrateEditorState } from "@store/editor-store";
|
||||
|
||||
/**
|
||||
* Regression tests for the editor-store v9 → v10 migration introduced
|
||||
* in v0.12. The migration is purely additive: existing fields
|
||||
* (`playthroughStatus`, `difficulty`, `contentWarnings`, …) must
|
||||
* round-trip unchanged, while the new Playthrough Notes structured
|
||||
* fields (`endingsShown`, `languagePatch`, `gameVersion`, …) and the
|
||||
* `techNotes` checklist must back-fill to safe defaults.
|
||||
*/
|
||||
|
||||
function makeV9Persisted(overrides: Record<string, unknown> = {}): Record<string, unknown> {
|
||||
return {
|
||||
videoType: "full",
|
||||
language: "en",
|
||||
genres: ["action"],
|
||||
gameName: "Elden Ring",
|
||||
channelName: "TestChannel",
|
||||
platform: "steam",
|
||||
partNumber: "",
|
||||
bossName: "",
|
||||
dlcName: "",
|
||||
challengeName: "",
|
||||
modName: "",
|
||||
modList: "",
|
||||
liveUrl: "",
|
||||
scheduledTime: "",
|
||||
gachaQuestType: "main_story",
|
||||
chapterName: "",
|
||||
questName: "",
|
||||
resolution: "1080p",
|
||||
fps: "60",
|
||||
graphicsPreset: "medium",
|
||||
graphicsPresetCustom: "",
|
||||
skipGraphicsSettings: false,
|
||||
rayTracingModes: [],
|
||||
frameGenVendor: "none",
|
||||
frameGenMultiplier: "none",
|
||||
upscaleQuality: "none",
|
||||
artStyle: "none",
|
||||
versionInfo: "",
|
||||
timestamps: "",
|
||||
playlistLink: "",
|
||||
contactEmail: "",
|
||||
musicAttribution: "",
|
||||
sponsorName: "",
|
||||
sponsorPlatform: "",
|
||||
pubDevName: "",
|
||||
thirdPartyAdText: "",
|
||||
thumbnailText: "",
|
||||
pinnedComment: "",
|
||||
spoilerWarning: false,
|
||||
matureWarning: false,
|
||||
playthroughStatus: "none",
|
||||
difficulty: "none",
|
||||
difficultyCustomLabel: "",
|
||||
contentWarnings: [],
|
||||
storeLinks: {},
|
||||
storeLinkTypes: {},
|
||||
social: {},
|
||||
rig: {},
|
||||
vnBankName: "",
|
||||
vnBankAccount: "",
|
||||
vnBankHolder: "",
|
||||
vnMomo: "",
|
||||
vnZalopay: "",
|
||||
...overrides,
|
||||
};
|
||||
}
|
||||
|
||||
describe("migrateEditorState — v9 → v10 (v0.12)", () => {
|
||||
it("back-fills new Playthrough Notes fields with safe defaults", () => {
|
||||
const result = migrateEditorState(makeV9Persisted(), 9);
|
||||
expect(result.endingsShown).toBe("");
|
||||
expect(result.languagePatch).toBe("none");
|
||||
expect(result.languagePatchCustom).toBe("");
|
||||
expect(result.gameVersion).toBe("full_release");
|
||||
expect(result.gameVersionCustom).toBe("");
|
||||
expect(result.techNotes).toEqual([]);
|
||||
});
|
||||
|
||||
it("preserves existing playthroughStatus and difficulty values", () => {
|
||||
const result = migrateEditorState(
|
||||
makeV9Persisted({
|
||||
playthroughStatus: "blind",
|
||||
difficulty: "hard",
|
||||
difficultyCustomLabel: "Lethal",
|
||||
}),
|
||||
9,
|
||||
);
|
||||
expect(result.playthroughStatus).toBe("blind");
|
||||
expect(result.difficulty).toBe("hard");
|
||||
expect(result.difficultyCustomLabel).toBe("Lethal");
|
||||
// New fields still get defaults.
|
||||
expect(result.endingsShown).toBe("");
|
||||
expect(result.languagePatch).toBe("none");
|
||||
});
|
||||
|
||||
it("preserves existing contentWarnings and adds empty techNotes", () => {
|
||||
const result = migrateEditorState(
|
||||
makeV9Persisted({
|
||||
contentWarnings: ["spoiler_story", "flashing_lights"],
|
||||
}),
|
||||
9,
|
||||
);
|
||||
expect(result.contentWarnings).toEqual(["spoiler_story", "flashing_lights"]);
|
||||
expect(result.techNotes).toEqual([]);
|
||||
});
|
||||
|
||||
it("coerces an invalid persisted languagePatch to 'none'", () => {
|
||||
const result = migrateEditorState(
|
||||
makeV9Persisted({ languagePatch: "not_a_real_option" }),
|
||||
9,
|
||||
);
|
||||
expect(result.languagePatch).toBe("none");
|
||||
});
|
||||
|
||||
it("coerces an invalid persisted gameVersion to 'full_release'", () => {
|
||||
const result = migrateEditorState(
|
||||
makeV9Persisted({ gameVersion: "definitely_not_valid" }),
|
||||
9,
|
||||
);
|
||||
expect(result.gameVersion).toBe("full_release");
|
||||
});
|
||||
|
||||
it("filters out unknown techNotes ids (defensive against hand-edited blobs)", () => {
|
||||
const result = migrateEditorState(
|
||||
makeV9Persisted({
|
||||
techNotes: ["copyright_muted_sections", "ghost_id_xyz", "fps_drops_hardware"],
|
||||
}),
|
||||
9,
|
||||
);
|
||||
expect(result.techNotes).toEqual([
|
||||
"copyright_muted_sections",
|
||||
"fps_drops_hardware",
|
||||
]);
|
||||
});
|
||||
|
||||
it("preserves valid techNotes values when migrating from a manually-bumped v10 blob", () => {
|
||||
const result = migrateEditorState(
|
||||
makeV9Persisted({ techNotes: ["loading_cut", "support_developers"] }),
|
||||
9,
|
||||
);
|
||||
// v10 doesn't strip valid ids — only filters unknowns.
|
||||
expect(result.techNotes).toEqual(["loading_cut", "support_developers"]);
|
||||
});
|
||||
|
||||
it("returns a fresh initial state when persistedState is null/undefined", () => {
|
||||
const fromNull = migrateEditorState(null, 9);
|
||||
const fromUndefined = migrateEditorState(undefined, 9);
|
||||
expect(fromNull.endingsShown).toBe("");
|
||||
expect(fromUndefined.endingsShown).toBe("");
|
||||
expect(fromNull.techNotes).toEqual([]);
|
||||
expect(fromUndefined.techNotes).toEqual([]);
|
||||
});
|
||||
|
||||
it("is idempotent — running the migration twice produces the same result", () => {
|
||||
const once = migrateEditorState(makeV9Persisted(), 9);
|
||||
const twice = migrateEditorState(once, 10);
|
||||
expect(twice).toEqual(once);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user