-
Notifications
You must be signed in to change notification settings - Fork 572
Add missing factory description in instructions (fixes #1974) #2005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdded English copy updates for factory and port descriptions and inserted a Factory row in the HelpModal build menu. Changes are limited to one locale JSON and one client UI TypeScript file; no runtime logic or public API changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as HelpModal
participant I18n as Translation Store
User->>UI: Open Help → Build tab
UI->>I18n: Request labels/descriptions (port, factory, warship...)
I18n-->>UI: Returns localized strings (including build_factory_desc)
UI->>UI: Render Build table with new Factory row between Port and Warship
Note right of UI: UI-only change — no backend interaction
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
resources/lang/en.json (2)
97-97
: Polish Factory description for clarity (active voice).Shorter and clearer wording; same meaning.
- "build_factory_desc": "Creates railroads automatically with nearby cities, ports and other factories. Trains are spawned regularly and will get you a fixed amount of gold for each building visited along the route.", + "build_factory_desc": "Automatically creates railroads connecting nearby cities, ports, and factories. Trains spawn regularly and earn a fixed amount of gold for each building visited on the route.",
60-60
: Typo: “recieved” → “received”.User-facing text—fix spelling.
- "ui_events_quickchat": "Quick Chat - You can see sent and recieved chat messages here. Send a message to a player by clicking the Quick Chat icon in their Info menu.", + "ui_events_quickchat": "Quick Chat - You can see sent and received chat messages here. Send a message to a player by clicking the Quick Chat icon in their Info menu.",src/client/HelpModal.ts (1)
462-466
: Icon class and locales OK; DRY table is optional.
.factory-icon
is defined (src/client/styles.css:379) and matches peer icons.- All non-EN locale files include
help_modal.build_factory
andhelp_modal.build_factory_desc
.- Optional: replace manual
<tr>
s with a typed array of row configs to generate table rows and reduce repetition.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
resources/lang/en.json
(1 hunks)src/client/HelpModal.ts
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: andrewNiziolek
PR: openfrontio/OpenFrontIO#1007
File: resources/lang/de.json:115-115
Timestamp: 2025-06-02T14:27:37.609Z
Learning: For OpenFrontIO project: When localization keys are renamed in language JSON files, the maintainers separate technical changes from translation content updates. They wait for community translators to update the actual translation values rather than attempting to translate in the same PR. This allows technical changes to proceed while ensuring accurate translations from native speakers.
🧬 Code graph analysis (1)
src/client/HelpModal.ts (2)
src/client/LangSelector.ts (1)
translateText
(248-268)src/client/Utils.ts (1)
translateText
(82-137)
🔇 Additional comments (2)
resources/lang/en.json (1)
101-101
: Apply proposed wording tweak for build_port_desc
Matches game rules and aligns with other help texts.src/client/HelpModal.ts (1)
462-466
: Factory row addition looks correct.Keys map to existing entries in en.json; placement after Port and before Warship matches the menu flow.
It will get 10k for each port/city visit, and 0 if it visited another Factory. |
@abdallahbahrawi1 I've mentioned visits to neighbors, but similar to other instructions they should remain concise, I don't want to add too much information as it's just a quick overview. Also not mentioning amounts since they can be changed any time and translations will take time to update. |
Description:
Added missing factory description to instructions and improved some instruction texts. Fixes #1974.
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
dutchster_