Skip to content

Conversation

@takaokouji
Copy link

Summary

センサーラベルを統一した名前空間に移行し、保守性を向上させます。

Unify sensor labels to a consistent namespace to improve maintainability.

Changes Made

sensor labels namespace unification

  • All sensor labels now use smalrubotS1.sensorPositionsMenu.* namespace:
    • smalrubotS1.sensorPositionsMenu.left (A4)
    • smalrubotS1.sensorPositionsMenu.right (A5)
    • smalrubotS1.sensorPositionsMenu.touch (A2)
    • smalrubotS1.sensorPositionsMenu.light (A6)
    • smalrubotS1.sensorPositionsMenu.sound (A7)

Default values enhanced

  • Port numbers are now included in default values for clarity
  • Users can easily identify hardware port connections

Code organization

  • Clearer separation between sensor and motor/LED labels
  • Consistent naming pattern for all sensor-related translations

Technical Details

File Changed:

  • src/extensions/scratch3_smalrubot_s1/index.js: Updated SENSOR_POSITIONS_MENU message IDs

Impact:

  • Requires corresponding localization updates in smalruby3-gui
  • Improves maintainability for future sensor additions
  • Better user experience with clear hardware mapping

Testing

  • ✅ Lint passed
  • ✅ All tests passed
  • ✅ No breaking changes to existing functionality

Related

🤖 Generated with Claude Code

…amespace

- Update SENSOR_POSITIONS_MENU to use unified smalrubotS1.sensorPositionsMenu.* IDs
- Add port numbers to default values for clarity:
  - left(A4), right(A5), touch(A2), light(A6), sound(A7)
- Improve maintainability by consolidating all sensor labels under single namespace
- Separates sensor labels from motor/LED labels for better UX

Related to: smalruby/smalruby3-gui#405

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
takaokouji added a commit to smalruby/smalruby3-gui that referenced this pull request Sep 13, 2025
- Add sensorPositionsMenu namespace translations with port numbers:
  - 左(A4), 右(A5), タッチ(A2), 光(A6), 音(A7)
- Simplify positionsMenu for motors/LEDs to just '左', '右'
- Improves hardware port visibility and user experience
- Supports unified sensor label namespace from scratch-vm

Related to: #405
Companion to: smalruby/scratch-vm#37

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@takaokouji takaokouji merged commit 2690df4 into develop Sep 13, 2025
1 check passed
@takaokouji takaokouji deleted the fix/smalrubot-s1-sensor-labels branch September 13, 2025 04:34
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.

2 participants