Skip to content

Remove Tier prefix from credential type labels and sort alphabetically - #3

Merged
bmfmancini merged 3 commits into
mainfrom
remove-tier-prefix-credential-type
Oct 16, 2026
Merged

bmfmancini merged 3 commits into
mainfrom
remove-tier-prefix-credential-type

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Summary

The credential type drop-down previously prefixed each type's display name with Tier X: (e.g. "Tier 1: SNMP v1/v2c Community"). This removes that prefix so the selector shows just the credential type name, and sorts the options alphabetically by display name.

Changes

  • includes/arrays.php — in credentials_type_options():
    • Use the type's translated name directly instead of __('Tier %d: %s', ...).
    • Sort the option map alphabetically by display name with natcasesort().
    • Update the function docblock to reflect alphabetical ordering.

Notes

  • Type names are already wrapped in __() in the type definitions, so translation is preserved.
  • The Tier %d: %s entry in locales/po/cacti.pot is now unused and will drop out on the next POT regeneration.
  • php -l passes with no syntax errors.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 15, 2026 03:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The missing translation-template refresh will fail the pull request’s CI check.

1 open finding
What changed in this PR

Simplifies the Cacti credentials selector by displaying translated type names without tier prefixes.

Changes:

  • Removes Tier X: from option labels.
  • Sorts labels naturally and case-insensitively.
  • Updates the ordering docblock.
File Description
includes/​arrays.php Simplifies labels and sorts the credential type options.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread includes/arrays.php
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bmfmancini
bmfmancini previously approved these changes Oct 15, 2026
…edential-type

# Conflicts:
#	locales/po/cacti.pot
@sonarqubecloud

Copy link
Copy Markdown

@bmfmancini
bmfmancini merged commit c0398df into main Oct 16, 2026
4 checks passed
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.

3 participants