Skip to content

Silence GIMP 3.x i18n warnings on plugin load#20

Merged
maorcc merged 1 commit intomainfrom
maor/silence-i18n-warning
Apr 16, 2026
Merged

Silence GIMP 3.x i18n warnings on plugin load#20
maorcc merged 1 commit intomainfrom
maor/silence-i18n-warning

Conversation

@maorcc
Copy link
Copy Markdown
Owner

@maorcc maorcc commented Apr 16, 2026

Problem

On GIMP 3.x startup, for every registered procedure that doesn't explicitly override set_i18n(), GIMP logs three warning lines:

[plug-in-mcp-server] The catalog directory does not exist: ~/.config/GIMP/3.2/plug-ins/gimp-mcp-plugin/locale
[plug-in-mcp-server] Override method set_i18n() for the plug-in to customize or disable localization.
[plug-in-mcp-server] Localization disabled

The plugin registers three procedures (plug-in-mcp-server, plug-in-mcp-check, plug-in-mcp-restart), so that's 9 noise lines on every launch.

Fix

Override do_set_i18n on MCPPlugin to return False. No behavior change — localization was already disabled, this just tells GIMP it's intentional.

Test plan

  • ruff check clean
  • Restart GIMP after install, confirm the 9 lines are gone

Summary by CodeRabbit

  • Updates
    • Modified plugin internationalization behavior to prevent GIMP from automatically translating plugin procedures, providing explicit control over translation handling.

GIMP 3.x logs 'catalog directory does not exist' + 'Localization
disabled' for every registered procedure unless the plugin explicitly
overrides set_i18n(). With three procedures (server, check, restart)
that's 9 noise lines at every GIMP startup.

Add do_set_i18n returning False to tell GIMP the plugin has no
translations. No behavior change — localization was already disabled,
this just declares it intentionally.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 672c774e-add8-4dcf-a676-4d67c8d3f67a

📥 Commits

Reviewing files that changed from the base of the PR and between 5fb99bc and 1a415d2.

📒 Files selected for processing (1)
  • gimp-mcp-plugin.py

Walkthrough

A do_set_i18n() method was added to the MCPPlugin class to override GIMP's i18n hook, returning False to prevent automatic translation handling for plugin procedures.

Changes

Cohort / File(s) Summary
I18N Integration Hook
gimp-mcp-plugin.py
Added do_set_i18n(self, procname) method to the MCPPlugin class that returns False, explicitly disabling GIMP's automatic i18n translation handling for plugin procedures.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: silencing GIMP 3.x i18n warnings that appear on plugin load. It directly maps to the PR's primary objective of preventing warning messages.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch maor/silence-i18n-warning

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 and usage tips.

@maorcc maorcc merged commit 5c53da5 into main Apr 16, 2026
3 of 4 checks passed
@maorcc maorcc deleted the maor/silence-i18n-warning branch April 16, 2026 14:40
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