Skip to content

Comments

Fix translated status#1328

Open
gianlucapiccolo wants to merge 2 commits intoIcinga:mainfrom
WuerthPhoenix:fix-translated-status
Open

Fix translated status#1328
gianlucapiccolo wants to merge 2 commits intoIcinga:mainfrom
WuerthPhoenix:fix-translated-status

Conversation

@gianlucapiccolo
Copy link

No description provided.

@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Feb 4, 2026
@nilmerg nilmerg requested a review from Copilot February 5, 2026 08:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where the getStateTextTranslated() methods in HostState and ServiceState models were incorrectly calling the text() method instead of the translated() method on their respective state classes. This would have resulted in untranslated state text being returned where translations were expected.

Changes:

  • Updated HostState to call HostStates::translated() instead of HostStates::text()
  • Updated ServiceState to call ServiceStates::translated() instead of ServiceStates::text()

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
library/Icingadb/Model/HostState.php Fixed getStateTextTranslated() to correctly call HostStates::translated()
library/Icingadb/Model/ServiceState.php Fixed getStateTextTranslated() to correctly call ServiceStates::translated() (contains a typo)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

public function getStateTextTranslated(): string
{
return ServiceStates::text($this->soft_state);
return ServiceStates::traslated($this->soft_state);
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

The method name "traslated" is misspelled. It should be "translated" to match the actual method name in the ServiceStates class.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla/signed CLA is signed by all contributors of a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant