fix(pdf): translate the report disclaimers that existed only in English - #42
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by auditing every locale file for key parity, not just the ones this session touched.
The gap
pdf.jsoncarried seven strings underpage8.disclaimersinenthat were absent from bothmsandzh:tnbTariff·afaRate·eeiRebate·solarGeneration·creditForfeiture·systemCost·paybackProjectionsThese are the financial and regulatory disclaimers on the exported PDF — the text that says estimates are based on RP4 tariffs, that AFA changes monthly, that excess NEM credits are forfeited at year end, that payback ignores maintenance and inverter replacement, and that system cost should be confirmed with a SEDA-registered installer.
A Malay or Chinese user exporting a report was getting the numbers without the caveats attached to them. Given the README already frames SolarSim as an assessment tool rather than a quotation, that is the wrong thing to silently drop.
Pre-existing, not a regression
git log 4a1b14f..HEAD -- frontend/src/locales/*/pdf.jsonreturns nothing — untouched by any of this session's 16 PRs. It predates them, which is exactly why a whole-directory parity check was worth running rather than only re-checking edited files.Translated at the register already used in
ms/zh(formal anda, 您), keeping the Malaysian domain terms intact — TNB, RP4, AFA, EEI, NEM, SEDA, PETRA, BOS.Verified
en/ms/zh— full structural parity, checked file by file.pnpm --filter frontend exec tsc --noEmit0 errors · 216 frontend tests pass · Prettier clean.Other audit checks, all clean
frontend/src/lib/demoLocations.tsandprisma/seedDemoLocations.ts(the deliberate duplication has not drifted).TODO/FIXME/@ts-ignore/: anyintroduced across this session's 16 PRs.render.yamlcovers every required key inbackend/src/config/env.ts.https://claude.ai/code/session_01URDpaxhXyPLWnUQtvowNyM