Repository navigation
Conversation
… 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.
Reverts the PO pilot of the File component from the base branch: the `file` entries move back into lang/ilias_*.lang and File no longer contributes a LanguageFileDirectory. The PO migration is piloted with TermsOfService and Poll instead.
Rating contributes its lang directory and ships the `rating` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
Registration contributes its lang directory and ships the `registration` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
RemoteCategory contributes its lang directory and ships the `rcat` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
RemoteCourse contributes its lang directory and ships the `rcrs` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
RemoteFile contributes its lang directory and ships the `rfil` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
RemoteGlossary contributes its lang directory and ships the `rglo` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
RemoteGroup contributes its lang directory and ships the `rgrp` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
RemoteLearningModule contributes its lang directory and ships the `rlm` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
RemoteTest contributes its lang directory and ships the `rtst` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
RemoteWiki contributes its lang directory and ships the `rwik` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
Skill contributes its lang directory and ships the `skll` and `skmg` modules as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: they no longer exist in the global language files.
StaticURL contributes its lang directory and ships the `stus` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
Survey contributes its lang directory and ships the `svy` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
SystemCheck contributes its lang directory and ships the `sysc` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
Table contributes its lang directory and ships the `tbl` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
Tagging contributes its lang directory and ships the `tagging` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
Tasks contributes its lang directory and ships the `task` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
Taxonomy contributes its lang directory and ships the `tax` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
Test contributes its lang directory and ships the `tstv` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
TestQuestionPool contributes its lang directory and ships the `qpl` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
UI contributes its lang directory and ships the `ui` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
User contributes its lang directory and ships the `usr` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
WOPI contributes its lang directory and ships the `wopi` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
WebServices contributes its lang directory and ships the `ecs` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
WorkspaceFolder contributes its lang directory and ships the `wfld` module as .pot/.po files, converted with convert_module_to_po.php --remove-from-lang: it no longer exists in the global language files.
For every literal ComponentLanguageFileDirectory contribution of a component: its .pot and English .po are shipped, its lines are gone from lang/ilias_*.lang and no other component contributes the same prefix; every shipped .pot is contributed.
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.
Part 1 of 4 of the migration of all language modules to PO files.
Depends on #12261
One commit per component. Each commit moves the component's modules from
lang/ilias_<lang>.langintocomponents/<Vendor>/<Component>/lang/<module>.pot|_<lang>.po, contributes the directory in<Component>.php(
$contribute[LanguageFileDirectory::class]) and removes the lines from the global language files. The texts are unchanged, except where the agreed rules for language variables required it (English as reference, identifiers without English text removed, lower case identifiers, one module per identifier); those cases are named in the commit messages.Maintainers: please check the commit of your component. Translations keep working through Setup as before; translators edit the
.pofiles of the component from now on.