From 9201602af83b586e52acb023ac4f8d613221a2a8 Mon Sep 17 00:00:00 2001
From: mikolaj
Date: Wed, 10 May 2023 15:06:47 +0200
Subject: [PATCH] Fixed translation configuration
---
.../IbexaCoreExtension.php | 4 +-
.../translations/content_fields.en.xlf | 4 +-
.../translations/fielddefinition.en.xlf | 115 ++------
.../{forms.en.xliff => forms.en.xlf} | 126 ++++-----
.../Resources/translations/messages.en.xlf | 8 +-
.../translations/repository_exceptions.en.xlf | 262 ++++++------------
.../ContentTypeValidationException.php | 4 +-
.../Exceptions/ContentValidationException.php | 4 +-
.../ArrayTranslatorFieldsGroupsList.php | 2 +
.../Twig/Extension/FileSizeExtension.php | 5 +-
.../ExceptionMessageTemplateFileVisitor.php | 50 ++++
11 files changed, 227 insertions(+), 357 deletions(-)
rename src/bundle/Core/Resources/translations/{forms.en.xliff => forms.en.xlf} (80%)
diff --git a/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php b/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php
index 1529c9f580..af250d764f 100644
--- a/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php
+++ b/src/bundle/Core/DependencyInjection/IbexaCoreExtension.php
@@ -1024,10 +1024,10 @@ private function prependJMSTranslation(ContainerBuilder $container): void
'configs' => [
'ibexa_core' => [
'dirs' => [
- __DIR__ . '/../',
+ __DIR__ . '/../../../',
],
'output_dir' => __DIR__ . '/../Resources/translations/',
- 'output_format' => 'xliff',
+ 'output_format' => 'xlf',
'excluded_dirs' => ['Behat', 'Tests', 'node_modules', 'Features'],
],
],
diff --git a/src/bundle/Core/Resources/translations/content_fields.en.xlf b/src/bundle/Core/Resources/translations/content_fields.en.xlf
index 696fb92681..38a1439791 100644
--- a/src/bundle/Core/Resources/translations/content_fields.en.xlf
+++ b/src/bundle/Core/Resources/translations/content_fields.en.xlf
@@ -8,12 +8,12 @@
- Not set
+ Not set
key: content-field.latitude.not_set
- Not set
+ Not set
key: content-field.longitude.not_set
diff --git a/src/bundle/Core/Resources/translations/fielddefinition.en.xlf b/src/bundle/Core/Resources/translations/fielddefinition.en.xlf
index 8f38518d8e..9e67f3842c 100644
--- a/src/bundle/Core/Resources/translations/fielddefinition.en.xlf
+++ b/src/bundle/Core/Resources/translations/fielddefinition.en.xlf
@@ -1,6 +1,6 @@
-
+
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.
@@ -10,388 +10,311 @@
Any
key: fielddefinition.allowed-content-types.any
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Allowed content types:
key: fielddefinition.allowed-content-types.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
-
-
-
- Default layout:
- key: fielddefinition.default-layout.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
-
-
-
- None
- key: fielddefinition.default-layout.none
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Checked
key: fielddefinition.default-value.checked
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
+
+
+
+ Current User
+ key: fielddefinition.default-value.current_author
Current date
key: fielddefinition.default-value.current_date
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Current datetime
key: fielddefinition.default-value.current_datetime
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Current datetime adjusted by
key: fielddefinition.default-value.current_datetime_adjust_by
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Current time
key: fielddefinition.default-value.current_time
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Empty
key: fielddefinition.default-value.empty
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Default value:
key: fielddefinition.default-value.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Unchecked
key: fielddefinition.default-value.unchecked
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
No default value
key: fielddefinition.default-value.undefined
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
%default% %day% day(s)
key: fielddefinition.interval.day
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
%default% %hour% hour(s)
key: fielddefinition.interval.hour
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
%default% %minute% minute(s)
key: fielddefinition.interval.minute
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
%default% %month% month(s)
key: fielddefinition.interval.month
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
%default% %second% second(s)
key: fielddefinition.interval.second
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
%default% %year% year(s)
key: fielddefinition.interval.year
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Selected ISBN format:
key: fielddefinition.isbn.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Max string length:
key: fielddefinition.max-length.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
No defined maximum string length
key: fielddefinition.max-length.undefined
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
%max% characters
key: fielddefinition.max-length.value
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Maximum value:
key: fielddefinition.max-value.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
No defined maximum value
key: fielddefinition.max-value.undefined
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Maximum file size:
key: fielddefinition.maximum-file-size.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
No defined maximum size
key: fielddefinition.maximum-file-size.undefined
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
%max% MB
key: fielddefinition.maximum-file-size.value
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Flash
key: fielddefinition.media-player-type.flash
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
HTML5 Audio
key: fielddefinition.media-player-type.html5_audio
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
HTML5 Video
key: fielddefinition.media-player-type.html5_video
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Media player type:
key: fielddefinition.media-player-type.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Quicktime
key: fielddefinition.media-player-type.quick_time
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Real Player
key: fielddefinition.media-player-type.real_player
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Silverlight
key: fielddefinition.media-player-type.silverlight
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
No defined value
key: fielddefinition.media-player-type.undefined
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Window Media Player
key: fielddefinition.media-player-type.windows_media_player
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
- Min string length:
+ Min string length:
key: fielddefinition.min-length.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
- No defined minimum string length
+ No defined minimum string length
key: fielddefinition.min-length.undefined
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
- %min% characters
+ %min% characters
key: fielddefinition.min-length.value
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Minimum value:
key: fielddefinition.min-value.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
No defined minimum value
key: fielddefinition.min-value.undefined
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Allow multiple choices:
key: fielddefinition.multiple.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
-
-
-
- Yes
- key: fielddefinition.multiple.yes
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
No
key: fielddefinition.multiple.no
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
+
+
+
+ Yes
+ key: fielddefinition.multiple.yes
Defined options
key: fielddefinition.options.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Preferred number of rows:
key: fielddefinition.preferred-rows-number.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
No preferred number of rows
key: fielddefinition.preferred-rows-number.undefined
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
%rows% rows
key: fielddefinition.preferred-rows-number.value
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Browse
key: fielddefinition.selection-method.browse
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
List with checkboxes
key: fielddefinition.selection-method.checkbox
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Selection method:
key: fielddefinition.selection-method.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Drop-down list
key: fielddefinition.selection-method.list
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Template based, multi
key: fielddefinition.selection-method.multi_template
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Multiple selection list
key: fielddefinition.selection-method.multiple_list
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
List with radio buttons
key: fielddefinition.selection-method.radio
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Template based, single
key: fielddefinition.selection-method.single_template
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Drop-down tree
key: fielddefinition.selection-method.tree
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Selection root:
key: fielddefinition.selection-root.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
No defined root
key: fielddefinition.selection-root.undefined
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
Use seconds:
key: fielddefinition.use-seconds.label
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
-
-
-
- Yes
- key: fielddefinition.use-seconds.yes
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
No
key: fielddefinition.use-seconds.no
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
- src/bundle/Core/Resources/views/fielddefinition_settings.html.twig
+
+
+
+ Yes
+ key: fielddefinition.use-seconds.yes
- Content Type
+ Content Type
key: role.policy.class
- Content Type / All functions
+ Content Type / All functions
key: role.policy.class.all_functions
- Content Type / Create
+ Content Type / Create
key: role.policy.class.create
- Content Type / Delete
+ Content Type / Delete
key: role.policy.class.delete
- Content Type / Update
+ Content Type / Update
key: role.policy.class.update
- Content
+ Content
key: role.policy.content
- Content / All functions
+ Content / All functions
key: role.policy.content.all_functions
- Content / Cleantrash
+ Content / Cleantrash
key: role.policy.content.cleantrash
- Content / Create
+ Content / Create
key: role.policy.content.create
- Content / Diff
+ Content / Diff
key: role.policy.content.diff
- Content / Edit
+ Content / Edit
key: role.policy.content.edit
- Content / Hide
+ Content / Hide
key: role.policy.content.hide
- Content / Manage locations
+ Content / Manage locations
key: role.policy.content.manage_locations
- Content / Pendinglist
+ Content / Pendinglist
key: role.policy.content.pendinglist
- Content / Publish
+ Content / Publish
key: role.policy.content.publish
- Content / Read
+ Content / Read
key: role.policy.content.read
- Content / Remove
+ Content / Remove
key: role.policy.content.remove
- Content / Restore
+ Content / Restore
key: role.policy.content.restore
- Content / Reverserelatedlist
+ Content / Reverserelatedlist
key: role.policy.content.reverserelatedlist
- Content / Translate
+ Content / Translate
key: role.policy.content.translate
- Content / Translations
+ Content / Translations
key: role.policy.content.translations
- Content / Unlock
+ Content / Unlock
key: role.policy.content.unlock
- Content / Urltranslator
+ Content / Urltranslator
key: role.policy.content.urltranslator
- Content / Versionread
+ Content / Versionread
key: role.policy.content.versionread
- Content / Versionremove
+ Content / Versionremove
key: role.policy.content.versionremove
- Role
+ Role
key: role.policy.role
- Role / All functions
+ Role / All functions
key: role.policy.role.all_functions
- Role / Assign
+ Role / Assign
key: role.policy.role.assign
- Role / Create
+ Role / Create
key: role.policy.role.create
- Role / Delete
+ Role / Delete
key: role.policy.role.delete
- Role / Read
+ Role / Read
key: role.policy.role.read
- Role / Update
+ Role / Update
key: role.policy.role.update
- Section
+ Section
key: role.policy.section
- Section / All functions
+ Section / All functions
key: role.policy.section.all_functions
- Section / Assign
+ Section / Assign
key: role.policy.section.assign
- Section / Edit
+ Section / Edit
key: role.policy.section.edit
- Section / View
+ Section / View
key: role.policy.section.view
- Setting
+ Setting
key: role.policy.setting
- Setting / All functions
+ Setting / All functions
key: role.policy.setting.all_functions
- Setting / Create
+ Setting / Create
key: role.policy.setting.create
- Setting / Remove
+ Setting / Remove
key: role.policy.setting.remove
- Setting / Update
+ Setting / Update
key: role.policy.setting.update
- Setup
+ Setup
key: role.policy.setup
- Setup / Administrate
+ Setup / Administrate
key: role.policy.setup.administrate
- Setup / All functions
+ Setup / All functions
key: role.policy.setup.all_functions
- Setup / Install
+ Setup / Install
key: role.policy.setup.install
- Setup / Setup
+ Setup / Setup
key: role.policy.setup.setup
- Setup / System info
+ Setup / System info
key: role.policy.setup.system_info
- State
+ State
key: role.policy.state
- State / Administrate
+ State / Administrate
key: role.policy.state.administrate
- State / All functions
+ State / All functions
key: role.policy.state.all_functions
- State / Assign
+ State / Assign
key: role.policy.state.assign
- User
+ User
key: role.policy.user
- User / Activation
+ User / Activation
key: role.policy.user.activation
- User / All functions
+ User / All functions
key: role.policy.user.all_functions
- User / Invite
+ User / Invite
key: role.policy.user.invite
- User / Login
+ User / Login
key: role.policy.user.login
- User / Password
+ User / Password
key: role.policy.user.password
- User / Preferences
+ User / Preferences
key: role.policy.user.preferences
- User / Register
+ User / Register
key: role.policy.user.register
- User / Selfedit
+ User / Selfedit
key: role.policy.user.selfedit
- User / Update
+ User / Update
key: role.policy.user.update
- User / View
+ User / View
key: role.policy.user.view