Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions components/ILIAS/File/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
use ILIAS\Component\Component;
use ILIAS\Setup\Agent;
use ILIAS\Refinery\Factory;
use ILIAS\Language\ComponentTranslation\LanguageFileDirectory;
use ILIAS\Language\ComponentTranslation\ComponentLanguageFileDirectory;

class File implements Component
{
Expand All @@ -40,5 +42,10 @@ public function init(
new \ilFileObjectAgent(
$pull[Factory::class]
);

$contribute[LanguageFileDirectory::class] = fn(): LanguageFileDirectory => new ComponentLanguageFileDirectory(
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is an example of how a component provides it's own lang-directory. Since the ComponentLanguageFileDirectory must provide the prefix (to avoid collisions), the prefixes can be removed in the language files

$this,
'file'
);
}
}
115 changes: 115 additions & 0 deletions components/ILIAS/File/lang/ilias_de.lang
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
********************************************************************
*/
/**
* ILIAS language file
*
* @module language file German
* @modulegroup language
* @author Matthias Kunkel <mkunkel@me.com>
* @version $Id$
*/
// The language file starts beyond the HTML-comment below. DO NOT modify this line!
// To edit your language file with a spreadsheet (i.e. Excel or StarCalc) remove all lines
// from the first line to the HTML-comment. After editing paste the lines in place again.
// NOTICE: Character coding of all ILIAS lang files is UTF-8! Please set your editor
// to the corresponding mode!
// Language file names refer to ISO 639, see: http://www.oasis-open.org/cover/iso639a.html
<!-- language file start -->
add_icon#:#Icon hinzufügen
amount_of_downloads#:#Downloads
amount_of_downloads_since#:#%d seit %s
copyright_custom#:#Benutzerdefiniert
copyright_custom_info#:#Lizenz auswählen, welche auf alle entpackten Dateien dieses Archivs angewandt wird.
copyright_inherited#:#Vererbt
copyright_inherited_info#:#Lizenz des Zip-Archivs auf seine entpackten Dateien anwenden. <br \>Lizenz des Zip-Archivs: %s.
could_not_create_file_objs#:#Beim Erstellen der Dateiobjekte ist ein Fehler aufgetreten, wenden Sie sich an die Administrierenden der Plattform.
de_activate_icon#:#(De-)Aktivieren
download_ascii_filename#:#Nur ASCII-Zeichen im Download
download_ascii_filename_info#:#Die Namen heruntergeladener Dateien enthalten nur ASCII-Zeichen und können so auf allen Systemen problemlos genutzt werden. Andere Zeichen werden durch Unterstriche ersetzt. Auf Installationen, die Dateinamen mit nicht-lateinischen Schriftzeichen nutzen, muss diese Option deaktiviert werden.
file_action_download#:#Datei herunterladen oder Inhalt anzeigen
file_action_download_info#:#Wenn WOPI aktiviert ist und die Berechtigung „Inhalt anzeigen“ erteilt wurde, wird die Datei auf der Registerkarte „Inhalt“ angezeigt. Wenn nicht, wird die Datei zum direkten Download angeboten.
file_action_show#:#Zunächst Reiter „Info“ anzeigen
file_action_show_info#:#Der Reiter „Info“ wird angezeigt, wo die Datei in einem zweiten Schritt heruntergeladen werden kann.
file_btn_lp_toggle_state_completed#:#Auf „Nicht bearbeitet“ setzen
file_btn_lp_toggle_state_not_completed#:#Auf „Bearbeitet“ setzen
file_copy#:#Datei kopieren
file_download#:#Datei herunterladen
file_import#:#Dateiimport
file_new_version#:#Neue Version anlegen
file_new_version_info#:#Eine neue Dateiversion anlegen. Alte Versionen bleiben erhalten.
file_publish#:#Entwurf veröffentlichen
file_rollback_rollback_first#:#Die Version konnte nicht zurückgesetzt werden, weil ein unveröffentlichter Entwurf existiert.
file_rollback_same_version#:#Dies ist bereits die veröffentlichte Version
file_unpublish#:#Als Entwurf markieren
file_upload_info_file_with_critical_extension#:#Mindestens eine Datei enthält eine kritische oder unbekannte Dateiendung. Die Dateiendung wird bei jedem Download zu .sec geändert. Bitte kontaktieren Sie gegebenenfalls Ihre technische Betreuung. Dateiname(n): %s
file_uploaded_by#:#Hochgeladen von
file_version_draft#:#Entwurf
file_version_draft_info#:#Die aktuellste Version ist im Status „Entwurf“. Solange diese Version nicht veröffentlicht wurde, können keine neuen Versionen angelegt werden. Personen mit Leserecht auf die Datei erhalten die aktuell veröffentlichte Version.
form_icon_creation#:#Icon erstellen
form_icon_updating#:#Icon aktualisieren
general_upload_error_occured#:#Beim Verarbeiten der Datei ist ein unerwartetet Fehler aufgetreten.
important_info#:#Wichtige Informationen
important_info_byline#:#Die Angaben werden im Reiter „Info“ angezeigt.
input_active#:#Aktiv
input_desc_active#:#Dieses Icon aktivieren.
input_desc_icon#:#Bild welches als Icon für Dateien mit den spezifizierten Suffixen verwendet werden soll.
input_desc_suffixes#:#Liste Komma-separierter Suffixe (Nur Buchstaben und Zahlen ohne vorangehenden Punkt).
input_icon#:#Icon
input_suffixes#:#Suffix(e)
migrated#:#Status
mime_type#:#MIME-Type
msg_cant_unpublish#:#Aktion konnte nicht ausgeführt werden
msg_confirm_entry_deletion#:#Wollen Sie den nachfolgenden Eintrag wirklich löschen?:
msg_error_active_suffixes_blacklisted#:#Eine der gewählten Dateiendungen ist auf der globalen Blacklist und kann derzeit nicht genutzt werden.
msg_error_active_suffixes_conflict#:#Fehler: Es dürfen nicht mehrere Icons für ein Suffix aktiv sein. Bitte deaktivieren Sie entweder dieses Icon oder das andere aktivierte Icon, dessen Suffixe sich mit jenen dieses Icons überschneiden.
msg_error_active_suffixes_not_whitelisted#:#Die gewählte Dateiendung ist nicht auf der globalen Whitelist, beim Download werden die Dateine zu .sec. umbenannt.
msg_error_duplicate_suffix_entries#:#Fehler: Die Komma-separierte Suffix-Liste enthält Duplikate.
msg_error_icon_deletion#:#Fehler: Icon Löschung fehlgeschlagen.
msg_error_suffixes_with_forbidden_characters#:#Fehler: unerlaubte Zeichen. Nur Buchstaben, Nummern, Leerzeichen und Kommas sind erlaubt.
msg_icon_missing_from_db#:#Icon ist nicht in der Datenbank.
msg_icon_missing_from_irss#:#Icon ist nicht im Resource Storage.
msg_success_icon_activated#:#Icon erfolgreich aktiviert.
msg_success_icon_created#:#Icon erfolgreich erstellt.
msg_success_icon_deactivated#:#Icon erfolgreich deaktiviert.
msg_success_icon_deletion#:#Icon erfolgreich gelöscht.
msg_success_icon_updated#:#Icon erfolgreich aktualisiert.
msg_unzip_success#:#Archiv wurde erfolreich entpackt.
on_click_action#:#Klick auf Titel
preview_caption#:#Vorschau %svon %s
preview_image_size_info#:#Die Vorschauversionen der Bilder werden je nach Bedarf verkleinert oder vergrößert, so dass ihre längste Seite der hier eingegebenen Länge (in px) entspricht.
preview_persisting#:#Vorschaubilder speichern
preview_persisting_info#:#Vorschaubilder werden generiert und gespeichert. Sie müssen nicht mehr bei jedem Aufruf neu erzeugt werden. Das verbessert die Performanz.
previews_for_tiles#:#Kachelbilder
previews_for_tiles_info#:#Verwende Vorschaubilder für Kacheln.
publish_before_delete#:#Version(en) konnte(n) nicht gelöscht werden, da ein noch unveröffentlichter Entwurf existiert.
replace_file_info#:#Alle früheren Dateiversionen werden gelöscht.
resource_id#:#Ressourcen ID
service_settings#:#Weitere Funktionen
service_settings_saved#:#Gespeichert
set_license_for_all_files#:#Lizenz für alle Dateien festlegen
show_amount_of_downloads#:#Anzahl Downloads anzeigen
show_amount_of_downloads_info#:#Die Anzahl der Downloads wird im Reiter „Info“ des Dateiobjekts angezeigt.
storage_id#:#Storage ID
suffix_specific_icons#:#Suffix-spezifische Icons
suffixes#:#Suffix(e)
upload_files#:#Dateien hochladen
upload_files_limit#:#Die maximale Größe einer Datei beträgt %s.
upload_files_title#:#Dateien hochladen
upload_info#:#Datei
upload_info_desc#:#Sie können die Dateien und die Dateiversionen im Tab "Versionen" verwalten.
version_uploaded#:#Version hochgeladen am
versionname#:#Angezeigter Titel
115 changes: 115 additions & 0 deletions components/ILIAS/File/lang/ilias_en.lang
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
********************************************************************
*/
/**
* ILIAS language file
*
* @module language file English
* @modulegroup language
* @author Matthias Kunkel <mkunkel@me.com>, Chris Potter <chris.potter@ilias.de>
* @version $Id$
*/
// The language file starts beyond the HTML-comment below. DO NOT modify this line!
// To edit your language file with a spreadsheet (i.e. Excel or StarCalc) remove all lines
// from the first line to the HTML-comment. After editing paste the lines in place again.
// NOTICE: Character coding of all ILIAS lang files is UTF-8! Please set your editor
// to the corresponding mode!
// Language file names refer to ISO 639, see: http://www.oasis-open.org/cover/iso639a.html
<!-- language file start -->
add_icon#:#Add Icon
amount_of_downloads#:#Downloads
amount_of_downloads_since#:#%d times since %s
copyright_custom#:#Custom
copyright_custom_info#:#Choose a custom copyright which will be applied to all unzipped files of this archive.
copyright_inherited#:#Inherited
copyright_inherited_info#:#Apply the copyright of the zip archive to its unzipped files. <br \>Copyright of zip archive: %s.
could_not_create_file_objs#:#An error occurred while creating your file objects. Please contact the administrators of this platform.
de_activate_icon#:#Activate / Deactivate
download_ascii_filename#:#Allow Only ASCII Characters in Downloaded Filenames
download_ascii_filename_info#:#Downloaded files should only have ASCII-characters in their filename. Deactivate to use all characters.
file_action_download#:#Download file or view content
file_action_download_info#:#If WOPI is activated and the permission 'View Content' is given, the file is shown in tab 'Content'. If not, the file will be offered for direct download.
file_action_show#:#Redirect user to the file’s ‘Info’ tab
file_action_show_info#:#The 'Info' tab is shown where the file could be downloaded in a second step.
file_btn_lp_toggle_state_completed#:#Set Not Completed
file_btn_lp_toggle_state_not_completed#:#Set Completed
file_copy#:#Copy File
file_download#:#Download File
file_import#:#Import File
file_new_version#:#Create New Version
file_new_version_info#:#Create new file version. Previous versions will not be modified.
file_publish#:#Publish Draft
file_rollback_rollback_first#:#The selected version could not be published because an unpublished draft exists.
file_rollback_same_version#:#This is already the published version!
file_unpublish#:#Mark as Draft
file_upload_info_file_with_critical_extension#:#At least one uploaded file contains a critical or unknown file ending. Whenever the file is downloaded, its ending will be changed to ‘.sec’. If necessary, contact your administrator. Filename(s): %s
file_uploaded_by#:#Uploaded By
file_version_draft#:#Draft Version
file_version_draft_info#:#The latest version of this file has the status ‘Draft’. As long as this version has not been published, no new versions can be created. People with read permission for the file get the most recent previously published version.
form_icon_creation#:#Create Icon
form_icon_updating#:#Update Icon
general_upload_error_occured#:#An unexpected error occurred during upload.
important_info#:#Important Information
important_info_byline#:#The information will be displayed in the ‘Info’ tab.
input_active#:#Active
input_desc_active#:#Activate this icon.
input_desc_icon#:#Image to be used as the icon for files with the specified suffixes.
input_desc_suffixes#:#List of comma-separated suffixes (characters and numbers only, without preceding full stop).
input_icon#:#Icon
input_suffixes#:#Suffix(es)
migrated#:#Status
mime_type#:#MIME Type
msg_cant_unpublish#:#File could not be unpublished.
msg_confirm_entry_deletion#:#Are you sure you want to delete the following entry?:
msg_error_active_suffixes_blacklisted#:#One of the selected file extensions is on the global blacklist and cannot therefore be currently used.
msg_error_active_suffixes_conflict#:#Error: It is not possible to have multiple icons activated for the same suffix. Please deactivate either this icon or the other activated icon whose suffixes overlap with those of this icon.
msg_error_active_suffixes_not_whitelisted#:#The selected file extension is not on the global whitelist. The file suffixes will be changed to ‘.sec’ when downloaded.
msg_error_duplicate_suffix_entries#:#Error: the comma separated list of suffixes contains duplicate entries.
msg_error_icon_deletion#:#Error: icon deletion failed.
msg_error_suffixes_with_forbidden_characters#:#Error: forbidden characters. Only letters, numbers, spaces and commas are allowed.
msg_icon_missing_from_db#:#Icon missing from database.
msg_icon_missing_from_irss#:#Icon missing from resource storage.
msg_success_icon_activated#:#Icon successfully activated.
msg_success_icon_created#:#Icon successfully created.
msg_success_icon_deactivated#:#Icon successfully deactivated.
msg_success_icon_deletion#:#Icon successfully deleted.
msg_success_icon_updated#:#Icon successfully updated.
msg_unzip_success#:#Archive successfully unzipped.
on_click_action#:#Action When Title Clicked
preview_caption#:#Preview %sof %s
preview_image_size_info#:#The preview versions of images will be downscaled or upscaled as appropriate, so that their longest side is the length (in px) entered here.
preview_persisting#:#Persistent Preview Images
preview_persisting_info#:#Generated preview images will be stored by ILIAS and used from then on each time the preview icon for that file is clicked on. If deactivated, previews will be generated anew each time.
previews_for_tiles#:#Tiles
previews_for_tiles_info#:#Use Preview for Tiles where possible.
publish_before_delete#:#It was not possible to delete any of the existing versions because an unpublished draft exists.
replace_file_info#:#All previous file versions will be deleted.
resource_id#:#Resource ID
service_settings#:#Additional Features
service_settings_saved#:#Changes saved.
set_license_for_all_files#:#Set License for All Files
show_amount_of_downloads#:#Show Number of Downloads
show_amount_of_downloads_info#:#Display the number of times a file object has been downloaded on its 'Info' page.
storage_id#:#Storage ID
suffix_specific_icons#:#Suffix-Specific Icons
suffixes#:#Suffix(es)
upload_files#:#Upload Files
upload_files_limit#:#The maximum file size allowed is %s.
upload_files_title#:#Upload Files
upload_info#:#File
upload_info_desc#:#Uploads and versions can be managed in the ‘Versions’ tab.
version_uploaded#:#Version Uploaded
versionname#:#Title
18 changes: 16 additions & 2 deletions components/ILIAS/Language/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
declare(strict_types=1);

namespace ILIAS;
use ILIAS\Language\ComponentTranslation\LanguageFileDirectoryManager;
use ILIAS\Language\ComponentTranslation\LanguageFileDirectory;
use ILIAS\Language\ComponentTranslation\MainLanguageFileDirectory;

class Language implements Component\Component
{
Expand All @@ -33,6 +36,7 @@ public function init(
array | \ArrayAccess &$internal,
): void {
$define[] = \ILIAS\Language\Language::class;
$contribute[LanguageFileDirectory::class] = static fn()=> new MainLanguageFileDirectory();
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The current directory /lang is provided here. Only one instance of MainLanguageFileDirectory can be provided.


$implement[\ILIAS\Language\Language::class] = static fn() =>
$internal[\ilSetupLanguage::class];
Expand All @@ -46,11 +50,21 @@ public function init(
$internal[\ilSetupLanguage::class]
);

$internal[LanguageFileDirectoryManager::class] = static fn() =>
new LanguageFileDirectoryManager(
...$seek[LanguageFileDirectory::class]
);

$internal[\ilSetupLanguage::class] = static fn() =>
new \ilSetupLanguage("en");
new \ilSetupLanguage(
"en",
$internal[LanguageFileDirectoryManager::class]
);

$internal[\ilLanguage::class] = static fn() =>
new Language\LanguageLegacyInitialisationAdapter();
new Language\LanguageLegacyInitialisationAdapter(
$internal[LanguageFileDirectoryManager::class]
);

$contribute[User\Settings\UserSettings::class] = fn() =>
new Language\UserSettings\Settings();
Expand Down
Loading
Loading