Skip to content

Localize bridge action failure messages - #57

Merged
Wishmaster117 merged 2 commits into
mainfrom
Localize-bridge-action-failure-messages
Aug 11, 2026
Merged

Localize bridge action failure messages#57
Wishmaster117 merged 2 commits into
mainfrom
Localize-bridge-action-failure-messages

Conversation

@Wishmaster117

@Wishmaster117 Wishmaster117 commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Localizes bridge failure/status reasons across the addon and prevents raw internal reason codes from being shown to users.

Changes:

  • adds localized ITEM_ACTION reasons including FORBIDDEN and RATE_LIMIT
  • reuses the canonical NOT_IN_SAME_GUILD reason
  • replaces raw reason fallbacks with localized generic fallbacks
  • covers Inventory / Bank / Profession Craft / Trainer paths
  • localizes Strategy Mutation failure reasons
  • updates all 8 supported locale files

Validation:

  • locale coverage: 8/8
  • GBANK different-guild rejection: tested in game
  • ITEM_ACTION rate limit message: tested in game
  • /reload: no Lua errors
  • final post-test audit: OK

Summary by CodeRabbit

  • Bug Fixes

    • Replaced raw error codes with clear, localized messages across strategy, bank, crafting, inventory, and trainer actions.
    • Added helpful fallback messages when an error reason is unavailable or unrecognized.
  • Localization

    • Expanded error messaging in English, German, Spanish, French, Korean, Russian, and Chinese.
    • Added detailed messages for connection issues, validation failures, targeting problems, rate limits, timeouts, partial failures, and other strategy errors.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a54f46c4-5001-44bf-9fe2-78088e281520

📥 Commits

Reviewing files that changed from the base of the PR and between 9d9d664 and ec9148e.

📒 Files selected for processing (8)
  • Locales/MultiBotAceLocale-deDE.lua
  • Locales/MultiBotAceLocale-enGB.lua
  • Locales/MultiBotAceLocale-enUS.lua
  • Locales/MultiBotAceLocale-esES.lua
  • Locales/MultiBotAceLocale-frFR.lua
  • Locales/MultiBotAceLocale-koKR.lua
  • Locales/MultiBotAceLocale-ruRU.lua
  • Locales/MultiBotAceLocale-zhCN.lua
🚧 Files skipped from review as they are similar to previous changes (8)
  • Locales/MultiBotAceLocale-deDE.lua
  • Locales/MultiBotAceLocale-enGB.lua
  • Locales/MultiBotAceLocale-enUS.lua
  • Locales/MultiBotAceLocale-zhCN.lua
  • Locales/MultiBotAceLocale-esES.lua
  • Locales/MultiBotAceLocale-ruRU.lua
  • Locales/MultiBotAceLocale-frFR.lua
  • Locales/MultiBotAceLocale-koKR.lua

📝 Walkthrough

Walkthrough

The 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.

Changes

Localized error reasons

Layer / File(s) Summary
Strategy reason resolution
Core/MultiBotEngine.lua
Strategy error codes now resolve through localized strategy.reason.* entries, with an unknown-reason fallback.
Locale message catalog
Locales/MultiBotAceLocale-*.lua
Supported locales now define unknown crafting, inventory-action, trainer, and detailed strategy error messages.
UI error fallbacks
UI/MultiBotBankFrame.lua, UI/MultiBotCharacterInfoFrame.lua, UI/MultiBotInventoryItem.lua, UI/MultiBotTrainerUI.lua
UI reason resolvers and failure statuses now use localized fallback messages instead of raw reasons.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: localizing bridge action failure messages instead of displaying raw reason codes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch Localize-bridge-action-failure-messages

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Wishmaster117

Copy link
Copy Markdown
Owner Author

@codex review

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
UI/MultiBotInventoryItem.lua (1)

584-596: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract the shared "unknown item-action" fallback text.

Lines 584 and 596 each rebuild the same key and English fallback text that getInventoryItemActionReason already 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())
 end

Then reuse unknownInventoryItemActionReasonText() at lines 584 and 596 in place of the repeated inventoryItemL(...) 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

📥 Commits

Reviewing files that changed from the base of the PR and between a670417 and 9d9d664.

📒 Files selected for processing (13)
  • Core/MultiBotEngine.lua
  • Locales/MultiBotAceLocale-deDE.lua
  • Locales/MultiBotAceLocale-enGB.lua
  • Locales/MultiBotAceLocale-enUS.lua
  • Locales/MultiBotAceLocale-esES.lua
  • Locales/MultiBotAceLocale-frFR.lua
  • Locales/MultiBotAceLocale-koKR.lua
  • Locales/MultiBotAceLocale-ruRU.lua
  • Locales/MultiBotAceLocale-zhCN.lua
  • UI/MultiBotBankFrame.lua
  • UI/MultiBotCharacterInfoFrame.lua
  • UI/MultiBotInventoryItem.lua
  • UI/MultiBotTrainerUI.lua

Comment thread Locales/MultiBotAceLocale-esES.lua Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread Core/MultiBotEngine.lua
@Wishmaster117
Wishmaster117 merged commit 8a6c7ef into main Aug 11, 2026
5 checks passed
@Wishmaster117
Wishmaster117 deleted the Localize-bridge-action-failure-messages branch August 11, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant