Repository navigation
Conversation
Member
|
I removed the ‘Authorities’ label because this is not a PR that should change authority assignments in the maintenance.md. |
c-knof
force-pushed
the
language-component-revision
branch
from
October 12, 2026 15:53
9b99a5f to
1d1950c
Compare
mjansenDatabay
approved these changes
Oct 13, 2026
c-knof
force-pushed
the
language-component-revision
branch
from
October 16, 2026 12:28
6f12808 to
db2fc38
Compare
Contributor
Author
|
Rebased onto current trunk to resolve a conflict in components/ILIAS/File/File.php with the new File Activities (4eeebdf). The contribution of the language directory now sits below the Activity contributions; no other changes. |
Contributor
Author
|
Aligns the Activities of the Language component with the File Activities that were merged in 4eeebdf:
Kept on purpose: the input is still ground through |
c-knof
force-pushed
the
language-component-revision
branch
from
October 19, 2026 15:40
77bc179 to
32877f6
Compare
Contributor
Author
|
New commits on top of the reviewed state (
|
c-knof
force-pushed
the
language-component-revision
branch
from
October 23, 2026 07:48
dd29d5e to
7bc37a8
Compare
… introduce Activities
The seven Activities now get `ILIAS\AccessControl\PublicInterface\RBAC` via `$use` instead of reaching into `$GLOBALS['DIC']->rbac()`, and call `system()` only in `isAllowedToPerform()`. The Setup agent uses `InstallLanguage::forSetup()`/`UpdateLanguage::forSetup()`, since Setup checks no permissions and needs no RBAC.
`InstalledLanguageDatabaseRepository`, `LanguageInstallationManager`, `AddLanguageEntry` and the `ilSetupLanguage` of the web Activities now get `ILIAS\Database\Connection` via `$pull` instead of resolving `$GLOBALS['ilDB']`. `ilSetupLanguage` takes an optional connection; Setup keeps handing in its database via `setDbHandler()`, also for the metrics, and the file-only checks need no database.
The Setup CLI asks `ilLanguagesInstalledAndUpdatedObjective` for its label before `achieve()`, so `getLabel()` only worked through a leftover `$GLOBALS['ilDB']`. `isApplicable()`, which the CLI calls first, now reads the languages from the Setup database and `getLabel()` lists them without database access.
The repository and the installation manager in the component graph now get the root from `ILIAS\Environment\Configuration\Installation\Directories` at resolve time instead of a path computed in `init()`. Callers outside the graph keep passing the path themselves.
… container `AllModernComponents` bound `$DIC[ILIAS\Language\Language::class]` to the `$use`d language, whose legacy adapter itself delegates to `$DIC->language()`. Nothing reads the key, so the constructor parameter and the binding are removed.
No component pulls `InstalledLanguageRepository` or `LanguageInstallationManager`, so they stay internal services of the component; `ilSetupLanguage` remains the entry point for callers outside it.
The Activities took the ref_id of the language folder as `int|\Closure` defaulting to 0. They now require `ILIAS\Language\LanguageFolder`, whose `LanguageFolderLegacyProxy` looks the ref_id up only when a permission is checked.
Keep only what the code does not say itself (the why, a constraint or a pitfall), mostly in one line, and drop the history of how it got there.
…vities A denied permission is now a `DomainException` with code 403 instead of a localized string, and `Failure::of()` masks every error outside the 4xx range as a generic 500, so callers other than the GUI no longer see internal messages. `InvalidInputException` carries 400, `AmbiguousLanguageTitleException` 409; `RendersActivityErrors` decides by code, which replaces the `SafeToDisplayActivityError` marker.
…the File Activities `LanguageActivity::isAllowedToPerform()` now rejects unknown and anonymous users before asking RBAC, as `FileUpload\Activities\AccessCheck` does for the File Activities. `maybePerformAs()` hands the trusted user id to `perform()` directly, which replaces the `additionalPerformParameters()` hook.
…ections like the File Activities The descriptions are built with `ILIAS\Data\Factory` instead of an own markdown helper, so the Activities no longer need the Refinery. The input of every Activity is a titled `section` instead of an untitled `group`, as in the File Activities.
…Provider` like the File Activities The language objects, language entries, the module cache, the user lookup and the settings are reached through one `RepositoryProvider` instead of optional closures with legacy defaults in every Activity. `UninstallLanguage`, `RemoveLocalLanguageChanges`, `AddLanguageEntry` and the two settings Activities take it as their only dependency besides language, RBAC and language folder; the tests mock it.
A `PDOException` carries its SQLSTATE as string code, and `'42S02'` compares as a 4xx code, so `Failure::of()` and `RendersActivityErrors` showed the database message as input error. Both now require an integer code. The test doubles no longer call the removed `markdown()` helper.
Keeps only what the code does not say itself, as in the File component: the reasons in `Language.php` shrink to the two real traps (no `final` Activities, the order of the contributions), and the tests lose their history notes.
`LanguageActivity` no longer takes `Language`: only `AddLanguageEntry` needs it, for the labels of its translation fields. The other six Activities, their `forSetup()` variants and the wiring drop the parameter.
… of the component translation classes
…ndent of their order
…tead of a path read during wiring
…y proxy instead of a global $DIC fallback
…st CSRF The table actions were read from the query by `executeCommand()` without a command, so ilCtrl never checked a token. `ilObjLanguageFolderGUI` now implements `ilCtrlSecurityInterface`, runs the table actions only through the unsafe command `executeTableAction` and dispatches an exact allowlist of commands, since ilCtrl compares commands case-sensitively but PHP calls methods case-insensitively. Takes effect after the ctrl security artifact is rebuilt (`composer dump-autoload` or `setup build`).
…ObjLanguageFolderGUI` Listing and downloading the deprecated entries failed with an error, because `ilObjLanguageFolderGUI` still included `ilLangDeprecated` from the former `Services/Language` directory.
…uageFolderGUI` `confirmRefreshSelectedObject()`, `confirmUninstallObject()`, `confirmUninstallChangesObject()` and the table action `edit` could no longer be reached since the table actions confirm in modals, and their confirmations failed for lack of language ids.
Named arguments are not used in the core (review criteria).
PHPUnit 14 no longer allows `with()` without `expects()`, so the mocks in `SetLanguageTranslationEnabledTest`, `AddLanguageEntryTest` and `LanguageInstallationManagerTest` now expect their calls once.
…es as `@internal` `TranslationCache`, `InstallationRoot`, `LanguageSettings` and their implementations are only wired in `$internal` and used inside the Language component, like the language file directories that already carry the marker.
c-knof
force-pushed
the
language-component-revision
branch
from
October 23, 2026 15:38
7bc37a8 to
cfeb84f
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the Language component to the Component Revision architecture (
$define/$implement/$use/$contribute/$seek/$provide/$pull/$internal) and introducesActivityimplementations for its domain operations, replacing logic previously embedded directly in the GUI classes.Activities(components/ILIAS/Language/src/Activities):InstallLanguage,UninstallLanguage,UpdateLanguage,AddLanguageEntry,RemoveLocalLanguageChanges,SetLanguageDetectionEnabled,SetLanguageTranslationEnabled, plus supporting traits/classes (GrindsFormInput,GrindingInputAccess,ParsesLanguageKeyList,ResolvesLanguageKeysToObjIds,RendersActivityErrors, exception types)class.ilObjLanguageFolderGUI.php/class.ilObjLanguageExtGUI.phpinto these ActivitiesInstalledLanguageRepository/InstalledLanguageDatabaseRepositoryandLanguageInstallationManager/LanguageFileParsingundersrc/Setupto back the new Activities and setup objectivesComponentTranslationsupport (ComponentLanguageFileDirectory,CustomizingLanguageFileDirectory,MainLanguageFileDirectory,LanguageFileDirectoryManager) so individual components can ship their own language files instead of everything living in the centrallang/files; implemented exemplarily for the File component (components/ILIAS/File/File.php,components/ILIAS/File/lang/ilias_{de,en}.lang) as a reference for how other components can adopt this going forwardSELECT * FROM lng_modulesqueries with queries selecting only the needed columns (e.g.SELECT lang_array FROM lng_modules) as part of thelng_modulesaccess rewrite inclass.ilSetupLanguage.php/class.ilObjLanguage.phpLanguage.php,Init.php, andAllModernComponents.phpREADME.mdanddocs/development/language.mdwith the Activities overview and documented, known deviations from theActivitycontractOther changes
ilCertificateDateHelperTest.php: loosen thelng_modulesquery mock match (SELECT * FROM lng_modules→FROM lng_modules), since the column list actually queried againstlng_moduleschanged as part of this migration (see above) and the previous exact-string match no longer applied.