Skip to content

feat: add i18n/translation tools#42

Open
Prolls wants to merge 2 commits intooisee:mainfrom
Prolls:feature/i18n-tools
Open

feat: add i18n/translation tools#42
Prolls wants to merge 2 commits intooisee:mainfrom
Prolls:feature/i18n-tools

Conversation

@Prolls
Copy link

@Prolls Prolls commented Mar 1, 2026

Summary

  • Add 7 i18n tools for managing ABAP translations across languages
  • Add OverrideLanguage field to RequestOptions + minimal change to buildURL() in http.go (3 lines)
  • New files: pkg/adt/i18n.go, internal/mcp/handlers_i18n.go, pkg/adt/i18n_test.go (6 tests)
  • Modified: pkg/adt/http.go (OverrideLanguage support), pkg/adt/http_test.go, internal/mcp/server.go (tool group "N")

Tools

Tool Mode Description
GetObjectTextsInLanguage focused Get object source in a specific language
GetDataElementLabels focused Get data element labels (short/medium/long/heading)
GetMessageClassTexts focused Get message class texts in a language
GetTextPoolInLanguage focused Get program text pool entries
CompareObjectLanguages focused Compare texts between two languages
WriteMessageClassTexts expert Update message class texts (requires lock)
WriteDataElementLabels expert Update data element labels (requires lock)

Key design decision

Per-request language override via OverrideLanguage in RequestOptionsbuildURL() applies it after the global sap-language, cleanly overriding with q.Set(). No changes to existing tool behavior.

Test plan

  • go build ./... passes
  • go test ./... passes (6 new i18n tests + existing http_test updated)
  • go vet ./... clean

Closes #40

🤖 Generated with Claude Code

Prolls and others added 2 commits March 1, 2026 11:45
Implement 7 i18n tools for managing ABAP translations:
- GetObjectTextsInLanguage, GetDataElementLabels, GetMessageClassTexts (read)
- GetTextPoolInLanguage, CompareObjectLanguages (read)
- WriteMessageClassTexts, WriteDataElementLabels (write, expert mode)

Add OverrideLanguage field to RequestOptions and update buildURL() to
support per-request sap-language override without affecting global config.
Tool group "N" for selective disablement. 5 read-only tools in focused
mode, all 7 in expert mode.

Closes oisee#40

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The previous mock reused the same http.Response body reader, which
gets exhausted after the first read. Use a funcMockClient that
returns fresh responses and varies content based on sap-language
query parameter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

[Feature Request] Add translation/i18n tools for multilingual ABAP development

1 participant