Repository navigation
add openfront copyright to loading screen - #2151
Conversation
WalkthroughAdds a new translation key code_license in en.json and updates GameStartingModal to render a copyright line, a code license heading, and then the previous title text, along with a new .copyright style and adjusted content order. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Modal as GameStartingModal
participant I18N as i18n
participant UI as DOM
User->>Modal: Open modal
Modal->>I18N: get("game_starting_modal.code_license")
I18N-->>Modal: "Code licensed under AGPL-3.0"
Modal->>UI: Render sections in order:
Note right of UI: 1) Copyright line\n2) Code license heading\n3) Previous title as paragraph
UI-->>User: Updated modal content visible
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks✅ Passed checks (3 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
resources/lang/en.json(1 hunks)src/client/GameStartingModal.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Deploy to openfront.dev
🔇 Additional comments (1)
resources/lang/en.json (1)
252-252: LGTM!The translation key is correctly added and the license text is appropriate.
|
|
||
| .copyright { | ||
| font-size: 32px; | ||
| margin-top: 20px; | ||
| opacity: 1; | ||
| } |
There was a problem hiding this comment.
Font size appears too large for a copyright notice.
The font-size: 32px for the copyright text is unusually large. Copyright notices are typically displayed in smaller text (e.g., 10-14px). Also, opacity: 1 is redundant since it's the default value.
Consider this adjustment:
.copyright {
- font-size: 32px;
+ font-size: 12px;
margin-top: 20px;
- opacity: 1;
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| .copyright { | |
| font-size: 32px; | |
| margin-top: 20px; | |
| opacity: 1; | |
| } | |
| .copyright { | |
| font-size: 12px; | |
| margin-top: 20px; | |
| } |
🤖 Prompt for AI Agents
In src/client/GameStartingModal.ts around lines 87 to 92, the copyright selector
sets an oversized font-size (32px) and includes a redundant opacity: 1; change
the font-size to a smaller, conventional value (e.g., 12px–14px) appropriate for
legal/copyright text and remove the opacity declaration to clean up the CSS; if
spacing needs adjustment, tweak margin-top modestly rather than increasing font
size.
| <div class="copyright">© OpenFront</div> | ||
| <h5>${translateText("game_starting_modal.code_license")}</h5> | ||
| <p>${translateText("game_starting_modal.title")}</p> |
There was a problem hiding this comment.
Use translateText() for the copyright notice.
The copyright text © OpenFront is hardcoded but should be processed through translateText() and added to en.json, as per the PR checklist requirement: "Process all displayed text through translateText() and add it to en.json".
Apply this diff:
-<div class="copyright">© OpenFront</div>
+<div class="copyright">${translateText("game_starting_modal.copyright")}</div>Then add this key to resources/lang/en.json in the game_starting_modal section:
"game_starting_modal": {
"title": "Game is Starting...",
+ "copyright": "© OpenFront",
"code_license": "Code licensed under AGPL-3.0",
"desc": "Preparing for the lobby to start. Please wait."
},📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <div class="copyright">© OpenFront</div> | |
| <h5>${translateText("game_starting_modal.code_license")}</h5> | |
| <p>${translateText("game_starting_modal.title")}</p> | |
| <div class="copyright">${translateText("game_starting_modal.copyright")}</div> | |
| <h5>${translateText("game_starting_modal.code_license")}</h5> | |
| <p>${translateText("game_starting_modal.title")}</p> |
🤖 Prompt for AI Agents
In src/client/GameStartingModal.ts around lines 98 to 100 the copyright string
is hardcoded as "© OpenFront"; replace it with
translateText("game_starting_modal.copyright") so all displayed text goes
through translation, and then add a corresponding key "copyright": "© OpenFront"
under the game_starting_modal section in resources/lang/en.json.
Description:
This will make the copyright notice more clear.
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
evan