Skip to content

Language: Maintain the language modules of wave 3 in PO files - #12264

Merged
c-knof merged 220 commits into
ILIAS-eLearning:trunkfrom
kroepelin-projekte:feature/trunk/ck/po-migration-wave-c
Oct 28, 2026
Merged

c-knof merged 220 commits into
ILIAS-eLearning:trunkfrom
kroepelin-projekte:feature/trunk/ck/po-migration-wave-c

Conversation

@c-knof

@c-knof c-knof commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Part 3 of 4 of the migration of all language modules to PO files.
Depends on #12263

One commit per component. Each commit moves the component's modules from lang/ilias_<lang>.lang into
components/<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 .po files of the component from now on.

@c-knof c-knof added improvement php Pull requests that update Php code labels Oct 23, 2026
@c-knof
c-knof force-pushed the feature/trunk/ck/po-migration-wave-c branch 2 times, most recently from 1d594a3 to 60327e5 Compare October 28, 2026 08:38
c-knof and others added 25 commits October 28, 2026 10:20
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.
…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.
c-knof added 27 commits October 28, 2026 10:21
Refinery contributes its lang directory and ships the `validation`
module as .pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.
Session contributes its lang directory and ships the `sess` module as
.pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.

Left out as used nowhere and missing in en (last present in
lang/ilias_*.lang of caab027): `sess` (sess_show_members).
Style contributes its lang directory and ships the `style` module as
.pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.

Left out `Style` of `style`: it differs from `style` only in case (one
row in lng_data), so the lowercase key stays; nothing calls `Style`.
Tracking contributes its lang directory and ships the `trac` 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 also ships the `user` module as .pot/.po files from its lang
directory, converted with convert_module_to_po.php --remove-from-lang:
it no longer exists in the global language files.
WebResource contributes its lang directory and ships the `webr` module
as .pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.
Wiki contributes its lang directory and ships the `wiki` module as
.pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.
AccessControl contributes its lang directory and ships the `rbac` module
as .pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.

Left out as used nowhere and missing in en (last present in
lang/ilias_*.lang of caab027): `rbac` (extt_edit_permission,
extt_read, extt_visible, extt_write, file_content, file_view_content).
Bibliographic contributes its lang directory and ships the `bibl` module
as .pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.
Calendar also ships the `dateplaner` module as .pot/.po files from its
lang directory, converted with convert_module_to_po.php
--skip-unmigratable-keys --remove-from-lang: it no longer exists in the
global language files.

Left out as used nowhere and missing in en (last present in
lang/ilias_*.lang of caab027): `dateplaner` (cal_accepted,
cal_declined, cal_unshare).

Also left out: `cal_cal_details` and `cal_del_app_sure`, which
upstream removed from en/de only.
CmiXapi also ships the `cmix` module as .pot/.po files from its lang
directory, converted with convert_module_to_po.php --remove-from-lang:
it no longer exists in the global language files.
Course also ships the `crs` module as .pot/.po files from its lang
directory, converted with convert_module_to_po.php --remove-from-lang:
it no longer exists in the global language files.

Left out as used nowhere and missing in en (last present in
lang/ilias_*.lang of caab027): `crs` (crs_sort_manual,
crs_sort_title, event_digit).
DataCollection contributes its lang directory and ships the `dcl` module
as .pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.

Left out as used nowhere and missing in en (last present in
lang/ilias_*.lang of caab027): `dcl` (dcl_deactivate_view,
dcl_export_finished, dcl_export_started, dcl_field_required, dcl_import,
dcl_locked, dcl_locked_tooltip, dcl_msg_info_alternatives,
dcl_msg_tableviews_order_updated, dcl_next_record,
dcl_no_read_access_on_any_standard_view, dcl_notimage_exception,
dcl_plugin, dcl_plugin_desc, dcl_plugin_no_hooks_available,
dcl_prev_record, dcl_public_comments, dcl_public_comments_desc,
dcl_rbac_roles_without_read_access_on_any_standard_view,
dcl_record_from_total, dcl_required, dcl_save_order, dcl_select,
dcl_switch_table, dcl_switch_view, dcl_table_list_fields,
dcl_table_list_tables, dcl_tableview_locked,
dcl_tableviews_confirm_delete, dcl_tableviews_table,
dcl_title_standardview, dcl_view_configuration).

Also left out: `dcl_simulate_info`, renamed upstream to
dcl_simulate_import_info in en and de only (4f5116b), still present
in the 29 other languages.
Forum contributes its lang directory and ships the `forum` module as
.pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.
GlobalScreen contributes its lang directory and ships the `gsfo` module
as .pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.
Group contributes its lang directory and ships the `grp` module as
.pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.
Logging also ships the `log` module as .pot/.po files from its lang
directory, converted with convert_module_to_po.php --remove-from-lang:
it no longer exists in the global language files.

Left out as used nowhere and missing in en (last present in
lang/ilias_*.lang of caab027): `log` (log_browser,
log_browser_users, log_cache_, log_cache_info, log_cache_level,
log_component_root_desc, log_general_settings, log_log_level,
log_memory).
OrgUnit contributes its lang directory and ships the `orgu` module as
.pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.

Left out as missing in en (last present in lang/ilias_*.lang of
caab027): `orgu` (org_op_manage_participants,
org_op_score_participants); every language still gets them from the
`rbac` module.
Repository contributes its lang directory and ships the `rep` module as
.pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.

Left out as used nowhere and missing in en (last present in
lang/ilias_*.lang of caab027): `rep` (rep_add_to_favourites,
rep_added_to_favourites, rep_remove_from_favourites,
rep_removed_from_favourites).
ResourceStorage contributes its lang directory and ships the `irss`
module as .pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.
Search contributes its lang directory and ships the `search` module as
.pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.

Left out as used nowhere and missing in en (last present in
lang/ilias_*.lang of caab027): `search` (search_area,
search_sort_generic_asc, search_sort_generic_desc).
StudyProgramme contributes its lang directory and ships the `prg` 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 also ships the `survey` module as .pot/.po files from its lang
directory, converted with convert_module_to_po.php --remove-from-lang:
it no longer exists in the global language files.

Left out as used nowhere and missing in en (last present in
lang/ilias_*.lang of caab027): `survey` (dont_use_questionpool,
err_no_pool_name, select_questionpool_short,
spl_online_property_description, survey_360_appraisee_info,
survey_360_no_closed_appraisees, survey_360_rate_other_appraisees,
survey_360_raters_status_info, survey_existing_pool,
survey_from_x_points, survey_new_pool, survey_no_pool,
survey_pool_selection, survey_question_pool_usage,
survey_question_pool_usage_active,
survey_question_pool_usage_active_info,
survey_question_pool_usage_inactive,
survey_question_pool_usage_inactive_info, svy_mail_own_results,
svy_page_add_question, svy_results_view_own, svy_results_view_own_info).

Left out as missing in en (last present in lang/ilias_*.lang of
caab027): `survey` (select_questionpool); every language still gets
it from the `common` module.
en and the 29 other languages have rpc_pdf_font, rpc_pdf_font_info and
rpc_pdf_generation in `common`, hu has them in `administration` by
mistake. JavaServerGUI.php calls them, so hu keeps its texts when
`administration` is served from PO files without these keys.
Administration contributes its lang directory and ships the
`administration` module as .pot/.po files, converted with
convert_module_to_po.php --remove-from-lang: it no longer exists in the
global language files.

Left out as used nowhere and missing in en (last present in
lang/ilias_*.lang of caab027): `administration`
(rpc_pdf_configuration).
MetaData contributes its lang directory and ships the `meta` module as
.pot/.po files, converted with convert_module_to_po.php
--remove-from-lang: it no longer exists in the global language files.

Left out as used nowhere and missing in en (last present in
lang/ilias_*.lang of caab027): `meta` (meta_oer_blocked,
meta_oer_blocked_info, meta_oer_categories, meta_oer_target).

Left out as missing in en (last present in lang/ilias_*.lang of
caab027): `meta` (meta_subjectmatterexpert). It is still used
(MetaData Vocabularies Standard Repository, role "subject matter
expert") but was removed from en and de in c1a3ed0; en and de
already showed the identifier.
…hanges

`language_merge_local_changes_info` only named `lang/ilias_%s.lang`, but the
local changes of modules maintained in PO files are merged into the `.po` files of
their components. Translations are marked fuzzy, the English fallback is renewed.
@c-knof
c-knof force-pushed the feature/trunk/ck/po-migration-wave-c branch from 60327e5 to ce6c122 Compare October 28, 2026 09:34
@c-knof
c-knof merged commit 00d9bff into ILIAS-eLearning:trunk Oct 28, 2026
5 checks passed
@c-knof
c-knof deleted the feature/trunk/ck/po-migration-wave-c branch October 28, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants