Localize bridge action failure messages - #57
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
🚧 Files skipped from review as they are similar to previous changes (8)
📝 WalkthroughWalkthroughThe change adds localized messages for known and unknown strategy, crafting, inventory-action, bank, and trainer errors. Engine and UI fallbacks now display localized text instead of raw error codes. ChangesLocalized error reasons
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
|
@codex review |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
UI/MultiBotInventoryItem.lua (1)
584-596: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract the shared "unknown item-action" fallback text.
Lines 584 and 596 each rebuild the same key and English fallback text that
getInventoryItemActionReasonalready builds internally at lines 529-532. Three call sites now hard-code"inventory.item_action.reason.UNKNOWN"and its fallback string.Store this text in one place and reuse it at both call sites. This keeps the key and fallback wording in sync if either one changes later.
♻️ Proposed fix to share the fallback text
+local function unknownInventoryItemActionReasonText() + return inventoryItemL("inventory.item_action.reason.UNKNOWN", "The server returned an unknown item-action error.") +end + local function getInventoryItemActionReason(reason) reason = tostring(reason or "") if reason == "" or reason == "OK" then return "" end - local fallback = inventoryItemL( - "inventory.item_action.reason.UNKNOWN", - "The server returned an unknown item-action error." - ) - return inventoryItemL("inventory.item_action.reason." .. reason, fallback) + return inventoryItemL("inventory.item_action.reason." .. reason, unknownInventoryItemActionReasonText()) endThen reuse
unknownInventoryItemActionReasonText()at lines 584 and 596 in place of the repeatedinventoryItemL(...)calls.🤖 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 `@UI/MultiBotInventoryItem.lua` around lines 584 - 596, Extract the shared unknown item-action fallback into a helper such as unknownInventoryItemActionReasonText(), alongside getInventoryItemActionReason. Replace the duplicated inventoryItemL calls in the bank status and professionRecipeFrame status handling with this helper, keeping the existing reasonText selection behavior unchanged.
🤖 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.
Inline comments:
In `@Locales/MultiBotAceLocale-esES.lua`:
- Line 1020: Update the value for info.trainer.reason.UNKNOWN to use
“entrenador” instead of “instructor”, matching the terminology used by
info.trainer.window_title, info.trainer.reason.NO_TRAINER_TARGET, and
info.trainer.reason.NO_TRAINER.
---
Nitpick comments:
In `@UI/MultiBotInventoryItem.lua`:
- Around line 584-596: Extract the shared unknown item-action fallback into a
helper such as unknownInventoryItemActionReasonText(), alongside
getInventoryItemActionReason. Replace the duplicated inventoryItemL calls in the
bank status and professionRecipeFrame status handling with this helper, keeping
the existing reasonText selection behavior unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3d506ac6-7409-476e-a3f5-edb797331ac6
📒 Files selected for processing (13)
Core/MultiBotEngine.luaLocales/MultiBotAceLocale-deDE.luaLocales/MultiBotAceLocale-enGB.luaLocales/MultiBotAceLocale-enUS.luaLocales/MultiBotAceLocale-esES.luaLocales/MultiBotAceLocale-frFR.luaLocales/MultiBotAceLocale-koKR.luaLocales/MultiBotAceLocale-ruRU.luaLocales/MultiBotAceLocale-zhCN.luaUI/MultiBotBankFrame.luaUI/MultiBotCharacterInfoFrame.luaUI/MultiBotInventoryItem.luaUI/MultiBotTrainerUI.lua
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d9d664287
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Localizes bridge failure/status reasons across the addon and prevents raw internal reason codes from being shown to users.
Changes:
Validation:
Summary by CodeRabbit
Bug Fixes
Localization