chore(i18n): wrap fork feature & menu DrawSettings strings#127
Conversation
|
Warning Review limit reached
More reviews will be available in 47 minutes and 17 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (36)
📝 WalkthroughWalkthroughThis PR wraps user-facing strings across fork-diverged feature DrawSettings methods and menu renderers with the i18n ChangesI18n Localization for Fork Features and Menus
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
No actionable suggestions for changed features. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/Features/Upscaling.cpp (1)
580-703:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRemove duplicated VR diagnostics block in Backend Diagnostics.
DrawSettings()renders the VR diagnostics subtree twice (old hardcoded block + localized block). This duplicates controls, can create conflicting ImGui state/IDs, and adds avoidable UI overhead.Suggested fix
- // VR Debug visualization -- per-eye buffers and native inputs - if (globals::game::isVR) { - ImGui::Separator(); - static float debugRescale = 0.15f; - ImGui::SliderFloat("View Resize", &debugRescale, 0.05f, 1.f); - - if (ImGui::TreeNode("Upscaling Intermediates")) { - if (vrIntermediateMotionVectors[0]) { - bool isDLSS = GetUpscaleMethod() == UpscaleMethod::kDLSS; - if (vrIntermediateColorIn[0] && vrIntermediateColorOut[0]) { - BUFFER_VIEWER_NODE_TITLE(vrIntermediateColorIn[0], "Left Eye In", debugRescale) - BUFFER_VIEWER_NODE_TITLE(vrIntermediateColorIn[1], "Right Eye In", debugRescale) - if (!isDLSS) - BUFFER_VIEWER_NODE_TITLE(vrIntermediateColorOut[0], "Left Eye Out", debugRescale) - BUFFER_VIEWER_NODE_TITLE(vrIntermediateColorOut[1], "Right Eye Out", debugRescale) - } - BUFFER_VIEWER_NODE_TITLE(vrIntermediateMotionVectors[0], "Left Eye MVec", debugRescale) - BUFFER_VIEWER_NODE_TITLE(vrIntermediateMotionVectors[1], "Right Eye MVec", debugRescale) - BUFFER_VIEWER_NODE_TITLE(vrIntermediateReactiveMask[0], "Left Eye Reactive", debugRescale) - BUFFER_VIEWER_NODE_TITLE(vrIntermediateReactiveMask[1], "Right Eye Reactive", debugRescale) - if (vrIntermediateTransparencyMask[0]) { - BUFFER_VIEWER_NODE_TITLE(vrIntermediateTransparencyMask[0], "Left Eye Transparency", debugRescale) - BUFFER_VIEWER_NODE_TITLE(vrIntermediateTransparencyMask[1], "Right Eye Transparency", debugRescale) - } - } else { - ImGui::TextDisabled("VR intermediates not yet created (enter game world)"); - } - ImGui::TreePop(); - } - - if (ImGui::TreeNode("Native Inputs")) { - auto renderer = globals::game::renderer; - auto& main = renderer->GetRuntimeData().renderTargets[RE::RENDER_TARGETS::kMAIN]; - auto& mvec = renderer->GetRuntimeData().renderTargets[RE::RENDER_TARGETS::kMOTION_VECTOR]; - auto& depth = renderer->GetDepthStencilData().depthStencils[RE::RENDER_TARGETS_DEPTHSTENCIL::kMAIN]; - - auto DisplayRT = [&](const char* label, ID3D11Texture2D* tex, ID3D11ShaderResourceView* srv) { - if (srv && tex) { - D3D11_TEXTURE2D_DESC desc; - tex->GetDesc(&desc); - char buf[128]; - snprintf(buf, sizeof(buf), "%s (%ux%u)", label, desc.Width, desc.Height); - if (ImGui::TreeNode(buf)) { - ImGui::Image(srv, { desc.Width * debugRescale, desc.Height * debugRescale }); - ImGui::TreePop(); - } - } - }; - - DisplayRT("kMAIN (Color Input)", (ID3D11Texture2D*)main.texture, (ID3D11ShaderResourceView*)main.SRV); - DisplayRT("Motion Vectors", (ID3D11Texture2D*)mvec.texture, (ID3D11ShaderResourceView*)mvec.SRV); - DisplayRT("Depth", depth.texture, depth.depthSRV); - - if (reactiveMaskTexture) - BUFFER_VIEWER_NODE_TITLE(reactiveMaskTexture, "Reactive Mask", debugRescale) - if (transparencyCompositionMaskTexture) - BUFFER_VIEWER_NODE_TITLE(transparencyCompositionMaskTexture, "Transparency Mask", debugRescale) - - ImGui::TreePop(); - } - } + // Keep only the localized VR diagnostics block below.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/Features/Upscaling.cpp` around lines 580 - 703, The VR diagnostics UI block is duplicated: remove the first hard-coded VR diagnostics block (the entire if (globals::game::isVR) { ... } starting with "VR Debug visualization -- per-eye buffers and native inputs" that defines static float debugRescale, the "Upscaling Intermediates" TreeNode, and the "Native Inputs" TreeNode including the DisplayRT lambda and BUFFER_VIEWER_NODE_TITLE calls for vrIntermediateColorIn/out, vrIntermediateMotionVectors, vrIntermediateReactiveMask, vrIntermediateTransparencyMask, reactiveMaskTexture and transparencyCompositionMaskTexture); keep the second (localized) block with T/TKEY calls so you don't have duplicate ImGui state/IDs and duplicate static debugRescale definitions. Ensure only one Separator/SliderFloat and one TreeNode set remains.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/Features/Upscaling.cpp`:
- Around line 580-703: The VR diagnostics UI block is duplicated: remove the
first hard-coded VR diagnostics block (the entire if (globals::game::isVR) { ...
} starting with "VR Debug visualization -- per-eye buffers and native inputs"
that defines static float debugRescale, the "Upscaling Intermediates" TreeNode,
and the "Native Inputs" TreeNode including the DisplayRT lambda and
BUFFER_VIEWER_NODE_TITLE calls for vrIntermediateColorIn/out,
vrIntermediateMotionVectors, vrIntermediateReactiveMask,
vrIntermediateTransparencyMask, reactiveMaskTexture and
transparencyCompositionMaskTexture); keep the second (localized) block with
T/TKEY calls so you don't have duplicate ImGui state/IDs and duplicate static
debugRescale definitions. Ensure only one Separator/SliderFloat and one TreeNode
set remains.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8b4a5592-b959-48fd-a532-dfa05ac724e9
📒 Files selected for processing (13)
package/SKSE/Plugins/CommunityShaders/Translations/en.jsonsrc/FeatureIssues.cppsrc/Features/DynamicCubemaps.cppsrc/Features/LightLimitFix.cppsrc/Features/LightLimitFix.hsrc/Features/RenderDoc.cppsrc/Features/ScreenSpaceGI.hsrc/Features/Upscaling.cppsrc/Features/VR.hsrc/Features/VRStereoOptimizations.cppsrc/Features/VolumetricLighting.cppsrc/Menu/AdvancedSettingsRenderer.cppsrc/Menu/HomePageRenderer.cpp
There was a problem hiding this comment.
Pull request overview
Extends the upstream i18n framework into fork-diverged UI surfaces by wrapping user-facing DrawSettings()/menu strings in T(TKEY(), "...") / T("full.key", "..."), and regenerating Translations/en.json to re-establish English key coverage after the v1.7.0 sync.
Changes:
- Wrapped fork-specific feature UI strings (e.g., VR/VR-stereo, LightLimitFix, ScreenSpaceGI, VolumetricLighting, Upscaling, RenderDoc, DynamicCubemaps) with
T()/TKEY()so they are extractable/translatable. - Wrapped customized menu surfaces (Home/FAQ/Setup, Advanced settings panels, Feature Issues) so they participate in translation extraction.
- Regenerated
package/.../Translations/en.jsonto add the newly-referenced keys.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Menu/HomePageRenderer.cpp | Localizes Home/FAQ/Setup strings; welcome line uses I18n::Format with named placeholders. |
| src/Menu/AdvancedSettingsRenderer.cpp | Localizes several Advanced menu labels/tooltips and parallelism/statistics UI strings. |
| src/Features/VRStereoOptimizations.cpp | Localizes VR stereo reprojection settings UI strings. |
| src/Features/VR.h | Localizes VR feature display name and summary text. |
| src/Features/VolumetricLighting.cpp | Localizes (part of) Volumetric Lighting settings UI. |
| src/Features/Upscaling.cpp | Localizes select Upscaling UI strings and adds translated format-string sites via std::vformat. |
| src/Features/ScreenSpaceGI.h | Localizes SSGI feature summary text and VR warning. |
| src/Features/RenderDoc.cpp | Localizes RenderDoc enable/capture UI strings and restart-gated messaging. |
| src/Features/LightLimitFix.h | Localizes LightLimitFix feature summary strings. |
| src/Features/LightLimitFix.cpp | Localizes portions of LightLimitFix DrawSettings UI (stats/debug headings/tooltips). |
| src/Features/DynamicCubemaps.cpp | Localizes SSR tooltip and VR advanced settings node label. |
| src/FeatureIssues.cpp | Localizes additional Feature Issues tooltips/testing UI strings. |
| package/SKSE/Plugins/CommunityShaders/Translations/en.json | Regenerated English translation file to include the newly referenced keys. |
Comments suppressed due to low confidence (2)
src/Features/Upscaling.cpp:439
- The restart-gated tooltip body for Frame Generation is still a raw English literal, so it won’t be extracted into en.json and will remain untranslated even after localizing the section heading/checkbox.
bool fgEnabled = settings.frameGenerationMode != 0;
if (ImGui::Checkbox(T(TKEY("frame_generation"), "Frame Generation"), &fgEnabled))
settings.frameGenerationMode = fgEnabled ? 1 : 0;
Util::UI::RestartGatedAnnotate(bootSnapshot, settings, &Settings::frameGenerationMode,
"Interpolate real frames with generated ones for a smoother experience. Uses AMD FSR Frame\n"
"Generation. Requires a D3D11-to-D3D12 proxy swapchain which can introduce compatibility\n"
"issues; in particular, frame generation works only in windowed mode.");
src/Features/VolumetricLighting.cpp:35
- The restart-gated tooltip body for the Exteriors toggle is still a raw English literal. Wrapping it in T() ensures it’s extracted into en.json and translatable like the checkbox label.
if (ImGui::Checkbox(T(TKEY("enable_exteriors"), "Enable Volumetric Lighting in Exteriors"), &settings.ExteriorEnabled))
SetupVL();
if (globals::game::isVR)
Util::UI::RestartGatedAnnotate(bootSnapshot, settings, &Settings::ExteriorEnabled,
"Volumetric god-rays / fog scattering in exterior cells.");
|
✅ A pre-release build is available for this PR: |
Wrap user-facing strings in the fork-diverged feature DrawSettings (and GetFeatureSummary) for LightLimitFix, ScreenSpaceGI, VolumetricLighting, DynamicCubemaps, Upscaling, RenderDoc, and VR/VR stereo so they are translatable. English defaults are the exact current inline literals, so there is no behavior or visual change for English users (T() falls back to the default when no translation exists). Part of #123. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Wrap user-facing strings in the fork-customized menu code: the advanced settings tab (shader-compiler stats, parallelism metrics, logging, runtime debug), the home/FAQ/setup page, and the feature-issues panel. Format-string sites use std::vformat(T(...), make_format_args(...)) and the home welcome line uses I18n::Format with named placeholders, matching existing codebase i18n conventions. English output is unchanged. Part of #123. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Second pass over strings review flagged as still hardcoded: Advanced tab labels (Diagnostics/Shaders) and section headers (Compile Flags, Threading, Cache & File Watcher, Runtime Debug); LLF Statistics stat lines + lights visualisation-mode combo options; Upscaling DLSS-preset tooltip tail lines, frame-limit refresh-rate status line, Force-Enable-FrameGen restart tooltip body, and Streamline log-level options; VR stereo stencil-swap debug readout; VolumetricLighting exteriors restart tooltip body. Regen en.json. English output unchanged (defaults are the current literals). std::format format-string sites use std::vformat(T(...), make_format_args(...)). Part of #123. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
08403e4 to
f86c46e
Compare
Subrect.cpp (compiled directly into cpp_tests) now calls T() after the i18n wrap pass, pulling in I18n::Get. Stub it to return the inline English default so the test binary links without the translation loader (file I/O + spdlog). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Closes #123.
What
Wraps the fork-diverged feature and menu
DrawSettings()strings inT(TKEY(), "...")/T("full.key", "...")so they are translatable, and regeneratesen.json. This completes the i18n coverage gap left by the v1.7.0 sync (#121), where these heavily-diverged fork files were left rendering plain English to keep the merge small (the keys were removed fromen.jsonin a58e2df).Wrapped surfaces:
No English behavior change
Every
T()default is the exact current inline literal, so English output is byte-identical.zh_CN.jsondoes not gain these keys in this PR (translations land incrementally); re-adding the English keys is the gate.Format-string sites use
std::vformat(T(...), std::make_format_args(...))and the home welcome line usesI18n::Formatwith named placeholders, matching existing codebase conventions.A handful of dropped keys are intentionally not re-added because their inline source string no longer exists (restart prompts now rendered by the shared
RestartGatedAnnotatehelper, removed/renamed tabs, stale Discord/Wiki links). These are listed below for traceability.Verification
python tools/extract-i18n.py --check— up to datepython tools/extract-i18n.py --orphans— nonepython tools/sort-i18n.py --check— orderedBuildRelease.bat ALL— greencpp_tests— 218/218 assertions passRelease impact
chore(i18n)— no version bump. English is unchanged today andzh_CNkeys are not yet added, so there is no user-visible change; this is i18n framework upkeep that unlocks future translation.🤖 Generated with Claude Code
Summary by CodeRabbit