Skip to content

Fix #3639: Rename "Update the Companion" to "Update the Companion for Emulator"#3751

Open
jaideepj2004 wants to merge 2 commits intomit-cml:masterfrom
jaideepj2004:fix/issue-3639-rename-companion-update
Open

Fix #3639: Rename "Update the Companion" to "Update the Companion for Emulator"#3751
jaideepj2004 wants to merge 2 commits intomit-cml:masterfrom
jaideepj2004:fix/issue-3639-rename-companion-update

Conversation

@jaideepj2004
Copy link

Summary

Resolves #3639

This PR renames the "Update the Companion" menu item to "Update the Companion for Emulator" to reduce confusion for mobile device users who expect it to update their phone/tablet companion app.

Changes Made

  • Updated OdeMessages.java with clearer menu item text and description
  • Updated Portuguese translation in OdeMessages_pt.properties
  • Updated description comments in 8 localization files (ca, es_ES, hy, ja, ko_KR, pl, tr, uk)

Testing

  • Code changes verified
  • Commit message follows project conventions
  • Built and tested on local development server (requires Java 11 + Ant setup)

Before and After

Before:

Help Menu → Update the Companion

After:

Help Menu → Update the Companion for Emulator

Rationale

As noted by @bobparks in #3639, workshop users with mobile devices are confused by the current menu item text. They expect it to update their phone's companion app, but it actually only updates the companion for the Android emulator. This change makes the purpose explicit.

Files Modified

  • appinventor/appengine/src/com/google/appinventor/client/OdeMessages.java
  • appinventor/appengine/src/com/google/appinventor/client/OdeMessages_pt.properties
  • 8 additional localization property files (description comment updates)

Checklist

…ion for Emulator'

- Updated OdeMessages.java to clarify menu item applies to emulator only
- Updated Portuguese translation in OdeMessages_pt.properties
- Updated description comments in 8 localization files (ca, es_ES, hy, ja, ko_KR, pl, tr, uk)

This change reduces confusion for mobile device users who expect the menu
item to update their phone/tablet companion app. The menu item now clearly
indicates it only updates the Companion for the Android emulator.
@AppInventorWorkerBee
Copy link
Collaborator

Can one of the admins verify this patch?

1 similar comment
@AppInventorWorkerBee
Copy link
Collaborator

Can one of the admins verify this patch?

Copy link
Member

@josmas josmas left a comment

Choose a reason for hiding this comment

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

Please add a check for running emulator

Addresses review feedback from @josmas on PR mit-cml#3751.

Changes:
- Added isEmulatorRunning() check in CompanionUpdateAction
- Added native method in BlocklyPanel to check ReplState
- Added error message companionUpdateNeedEmulator in OdeMessages
- Prevents update attempt when emulator is not connected

This ensures the 'Update the Companion for Emulator' menu item only
functions when the emulator is actually running and connected, providing
better user feedback and preventing errors.
@jaideepj2004
Copy link
Author

@josmas Thank you for the review! I've added the emulator running check as requested.

Changes made:

  • Added isEmulatorRunning() check in CompanionUpdateAction before allowing the update
  • Implemented native method in BlocklyPanel that checks if ReplState.replcode === 'emulator' and ReplState.state === CONNECTED
  • Added new error message companionUpdateNeedEmulator in OdeMessages.java
  • Override method in YaBlocksEditor and base method in FileEditor

Behavior:
Now when a user clicks "Update the Companion for Emulator" without the emulator running, they'll get a clear error message: "The emulator must be running to update the Companion"

The check ensures that:

  1. A project is open
  2. The emulator is actually running and connected
  3. Only then proceeds with the update

Please let me know if you'd like any adjustments!

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.

Move "Update the Companion" menu item in AI2

3 participants