Skip to content

Fix: use GLPI core console for locale extraction - #11

Closed
Rom1-B wants to merge 2 commits into
glpi-project:v1from
Rom1-B:fix_use_glpi_console
Closed

Rom1-B wants to merge 2 commits into
glpi-project:v1from
Rom1-B:fix_use_glpi_console

Conversation

@Rom1-B

@Rom1-B Rom1-B commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Problem

The Transifex push/sync workflows broke whenever a consuming plugin stopped declaring glpi-project/tools in its own composer.json, since they relied on that plugin dependency to provide vendor/bin/extract-locales and vendor/bin/plugin-release.

Fix

Locale extraction and compilation now run through GLPI core's own console commands (tools:locales:extract, tools:locales:compile) inside the official GLPI GitHub Actions image, so plugins no longer need any translation-tooling dependency in their own composer.json.

@cedric-anne cedric-anne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The workflow will not be compatible anymore with GLPI 10.x plugins. It may be complex to adapt the workflow to also support GLPI 10.x plugins, so maybe we should publish this change in a v2, since it is a BC-break.

@Rom1-B
Rom1-B requested a review from cedric-anne September 28, 2026 08:20
@Rom1-B
Rom1-B force-pushed the fix_use_glpi_console branch from d4a76f3 to 1d2b13e Compare September 28, 2026 08:27
@Rom1-B
Rom1-B force-pushed the fix_use_glpi_console branch from 1d2b13e to 80189a2 Compare September 28, 2026 08:29
@Rom1-B

Rom1-B commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Instead of a v2 (which would require every consuming plugin to update its workflow ref), the workflow now auto-detects: it runs composer install then checks whether vendor/bin/extract-locales exists. Plugins still declaring glpi-project/tools keep using it unchanged; plugins without it (the ones that hit this bug) automatically fall back to GLPI core's console command. No BC-break, no repo changes needed anywhere.

@froozeify

Copy link
Copy Markdown
Member

@Rom1-B That PR looks like #9 did you take inspiration of it ? And probably we will have to close it once one or the other is merged.

It was tested against a fork of Mreporting plugin

@Rom1-B Rom1-B closed this Sep 28, 2026
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