Skip to content

N°9553 - Fix on LoadLocalizedData in ModuleInstaller#926

Open
v-dumas wants to merge 4 commits into
developfrom
feature/9553-ModuleInstaller-Feedbacks
Open

N°9553 - Fix on LoadLocalizedData in ModuleInstaller#926
v-dumas wants to merge 4 commits into
developfrom
feature/9553-ModuleInstaller-Feedbacks

Conversation

@v-dumas
Copy link
Copy Markdown
Contributor

@v-dumas v-dumas commented Jun 1, 2026

Base information

Question Answer
Related to a Combodo ticket
Type of change? Bug fix / Enhancement / Translations

Proposed solution (bug and enhancement)

Improve code and tests

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested all changes I made on an iTop instance
  • I have added a unit test, otherwise I have explained why I couldn't
  • Is the PR clear and detailed enough so anyone can understand without digging in the code?

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 1, 2026

Greptile Summary

This PR updates localized data loading during module installation. The main changes are:

  • LoadLocalizedData() accepts nullable version arguments.
  • Empty first-loading versions can force loading on upgrades.
  • Localized data now always uses the passed configuration language.
  • Missing localized files now flow directly into XMLFileLoad().
  • Unit tests were expanded for language fallback, version gates, and invalid parameters.

Confidence Score: 3/5

This should be fixed before merging.

  • Missing localized data files can now abort setup instead of being skipped.
  • Upgrade paths can load data in the wrong language when the passed configuration differs from the installed configuration.
  • The issues affect core module installation and upgrade behavior.

setup/moduleinstaller.class.inc.php

Important Files Changed

Filename Overview
setup/moduleinstaller.class.inc.php Changes the localized data loading gate, language source, and missing-file handling.
tests/php-unit-tests/unitary-tests/setup/ModuleInstallerAPITest.php Adds coverage for language fallback, version conditions, idempotent loading, and invalid parameters.

Reviews (1): Last reviewed commit: "N°9553 - fix typo" | Re-trigger Greptile

Comment thread setup/moduleinstaller.class.inc.php Outdated
Comment thread setup/moduleinstaller.class.inc.php Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Work made by Combodo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants