Fix the two pages that send the visitor to the wiki - #117
Conversation
Both found while verifying OpenIPC/firmware#1912, which is about the SigmaStar NAND page. Closing that issue meant quoting the page as it renders today, and it renders two defects. `sigmastar_nand_is_weird.html.erb` had a stray `>` after the ERB tag, so the sentence reached the page as "...not included in this guide.>". It is on openipc.org now, on the page every SigmaStar NAND owner is sent to. Both templates hardcoded the English word "Attention!" as their heading, the only string on either page not going through i18n. Now `firmware.installation.attention`, added to all ten locale files. `i18n-tasks missing` and `i18n-tasks unused` are unchanged at 37 and 307, neither of which mentions the new key. The heading tests assert the Russian string, because the English translation is the word that was hardcoded and an English assertion passes either way. They switch locale with `I18n.with_locale` rather than `?locale=ru`, because that parameter does nothing: Multilang's `before_action :set_locale` is commented out at multilang.rb:21, so every request renders in English whatever it asks for. That is worth its own look and is not touched here. 200 runs, 761 assertions. Hardcoding the headings fails both new tests; putting the stray `>` back fails the SigmaStar one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YFg9PRy2T6cr983S8gran5
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can hide the parts of a finding you never read, like the evidence or the agent prompt |
PR Summary by QodoLocalize wiki warning headings and remove stray SigmaStar markup
AI Description
Diagram
High-Level Assessment
Files changed (13)
|
Both defects were found while verifying
OpenIPC/firmware#1912. Closing thatissue meant quoting the SigmaStar NAND page as it renders today — and it renders
two things it should not.
A stray
>on a live pagesigmastar_nand_is_weird.html.erb:25wasso the sentence reaches the visitor as "...not included in this guide.>".
It is on openipc.org right now, on the page every SigmaStar NAND owner is
redirected to.
A hardcoded heading on both
<h2 class="mt-5 mb-3">Attention!</h2>— the only string on either of these twotemplates not going through i18n. Now
firmware.installation.attention, addedto all ten locale files:
Attention!Внимание!Achtung!¡Atención!Attenzione!Uwaga!Atenção!توجه!注意!Attention !i18n-tasks missingandi18n-tasks unusedare unchanged at 37 and 307respectively, and neither mentions the new key.
Something the tests turned up
The heading tests assert the Russian string, because the English
translation is exactly the word that was hardcoded — an English assertion passes
whether or not the fix is applied, which is how my first draft passed against
the unfixed template.
Switching locale had to be done with
I18n.with_locale, not?locale=ru,because that parameter does nothing.
Multilang'sbefore_action :set_localeis commented out at
multilang.rb:21, and the locale switcher is commented outof the layout, so every request renders in English regardless of what it asks
for. Ten locale files are maintained and none of them is ever served. Not
touched here — it deserves its own change and probably a decision — but it is
worth knowing before anyone spends more time on translations.
Verification
bin/rails test— 200 runs, 761 assertions, 0 failures.>backRubocop unchanged apart from the test class counting longer.
🤖 Generated with Claude Code
https://claude.ai/code/session_01YFg9PRy2T6cr983S8gran5