From a78fe5961590713ebdea895775484bb7a88a4fed Mon Sep 17 00:00:00 2001 From: tischsoic Date: Mon, 7 Aug 2023 15:09:17 +0200 Subject: [PATCH 01/21] IBX-6314: initial --- features/personas/SubtreeEditor.feature | 4 ++-- .../themes/admin/account/bookmarks/toggle_switch.html.twig | 2 +- .../admin/content/modal/user_group_invitation_modal.html.twig | 2 +- .../views/themes/admin/content/tab/details.html.twig | 2 +- .../views/themes/admin/content/tab/locations/tab.html.twig | 2 +- .../themes/admin/ui/field_type/edit/relation_base.html.twig | 2 +- src/bundle/Resources/views/themes/admin/ui/layout.html.twig | 2 +- .../themes/admin/user/invitation/issue_email_empty.html.twig | 2 +- .../views/themes/admin/user/role_assignment/create.html.twig | 2 +- src/bundle/ui-dev/src/modules/sub-items/sub.items.module.js | 2 +- src/lib/Behat/Page/ContentViewPage.php | 2 +- src/lib/Form/Type/Content/CustomUrl/CustomUrlAddType.php | 1 + src/lib/Form/Type/Location/LocationAssignSectionType.php | 2 +- src/lib/Form/Type/Location/LocationTrashType.php | 2 +- 14 files changed, 15 insertions(+), 14 deletions(-) diff --git a/features/personas/SubtreeEditor.feature b/features/personas/SubtreeEditor.feature index fe2a6cb612..605955910c 100644 --- a/features/personas/SubtreeEditor.feature +++ b/features/personas/SubtreeEditor.feature @@ -61,7 +61,7 @@ Feature: Verify that an Editor with Subtree limitations can perform all his task | buttonName | | Create content | | Edit | - And the "Send to Trash" button is not visible + And the "Delete" button is not visible Scenario: I cannot edit, create or send to trash Content outside my permissions Given I navigate to content "FolderGrandParent" of type "DedicatedFolder" in "root" @@ -69,4 +69,4 @@ Feature: Verify that an Editor with Subtree limitations can perform all his task | buttonName | | Create content | | Edit | - And the "Send to Trash" button is not visible + And the "Delete" button is not visible diff --git a/src/bundle/Resources/views/themes/admin/account/bookmarks/toggle_switch.html.twig b/src/bundle/Resources/views/themes/admin/account/bookmarks/toggle_switch.html.twig index d433a6b718..5ba6be149c 100644 --- a/src/bundle/Resources/views/themes/admin/account/bookmarks/toggle_switch.html.twig +++ b/src/bundle/Resources/views/themes/admin/account/bookmarks/toggle_switch.html.twig @@ -4,7 +4,7 @@
{% if content is defined %} - {{ 'content.create.editing_details'|trans({ '%content_name%': ibexa_content_name(content) })|desc('under %content_name%') }} + {{ 'content.create.editing_details'|trans({ '%content%': ibexa_content_name(content) })|desc('Location: %content%') }} {% endif %}
diff --git a/src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig b/src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig index c055befc4e..673ef67f61 100644 --- a/src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig +++ b/src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig @@ -452,7 +452,7 @@ {% block content_type_field_definition_widget -%} {{- form_row(form.enabled, { label: 'meta.enabled'|trans({ '%type%': form.name.vars.value, - }, 'content_type')|desc('Enable %type% for this content type') }) -}} + }, 'content_type')|desc('Enable %type% for this Content Type') }) -}} {% for form_field in form.children %} {% if form_field.isRendered() == false %} diff --git a/src/bundle/Resources/views/themes/admin/ui/on_the_fly/edit_on_the_fly.html.twig b/src/bundle/Resources/views/themes/admin/ui/on_the_fly/edit_on_the_fly.html.twig index 1f527cde03..0df6b2ec9c 100644 --- a/src/bundle/Resources/views/themes/admin/ui/on_the_fly/edit_on_the_fly.html.twig +++ b/src/bundle/Resources/views/themes/admin/ui/on_the_fly/edit_on_the_fly.html.twig @@ -35,7 +35,7 @@ content_type_name: content_type.name, show_autosave_status: true, description: content_type.description, - subtitle: 'editing_details'|trans({ '%location_name%': parent_location.contentInfo.name, '%language%': language.name })|desc('under %location_name% in %language%'), + subtitle: 'editing_details'|trans({ '%location%': parent_location.contentInfo.name, '%language%': language.name })|desc('Location: %location% Translation: %language'), context_actions: context_actions, } %} {% endblock %} diff --git a/src/bundle/Resources/views/themes/admin/user/create.html.twig b/src/bundle/Resources/views/themes/admin/user/create.html.twig index 432cd69c36..c06056add8 100644 --- a/src/bundle/Resources/views/themes/admin/user/create.html.twig +++ b/src/bundle/Resources/views/themes/admin/user/create.html.twig @@ -17,7 +17,7 @@ icon_name: content_type.name, show_autosave_status: false, title: 'new_content_item'|trans({'%contentType%': content_type.name})|desc('New %contentType%'), - subtitle: 'editing_details'|trans({ '%location_name%': parent_location.contentInfo.name })|desc('under %location_name%'), + subtitle: 'editing_details'|trans({ '%location%': parent_location.contentInfo.name })|desc('Location: %location%'), context_actions: knp_menu_render(user_content_edit_menu, {'template': '@ibexadesign/ui/menu/context_menu.html.twig'}) } %} {% endblock %} diff --git a/src/bundle/Resources/views/themes/admin/user/edit.html.twig b/src/bundle/Resources/views/themes/admin/user/edit.html.twig index 737e495910..121f0f6edd 100644 --- a/src/bundle/Resources/views/themes/admin/user/edit.html.twig +++ b/src/bundle/Resources/views/themes/admin/user/edit.html.twig @@ -18,7 +18,7 @@ icon_name: content_type.name, show_autosave_status: false, title: "%s %s"|format(user.getFieldValue('first_name'), user.getFieldValue('last_name')), - subtitle: 'editing_details'|trans({ '%location_name%': parent_location.contentInfo.name })|desc('under %location_name%'), + subtitle: 'editing_details'|trans({ '%location%': parent_location.contentInfo.name })|desc('Location: %location%'), context_actions: knp_menu_render(user_content_edit_menu, {'template': '@ibexadesign/ui/menu/context_menu.html.twig'}) } %} {% endblock %} diff --git a/src/bundle/ui-dev/src/modules/common/services/content.type.service.js b/src/bundle/ui-dev/src/modules/common/services/content.type.service.js index c5e9504af0..9657737b39 100644 --- a/src/bundle/ui-dev/src/modules/common/services/content.type.service.js +++ b/src/bundle/ui-dev/src/modules/common/services/content.type.service.js @@ -11,5 +11,5 @@ export const loadContentTypes = (contentTypeIds, callback) => { fetch(request) .then(handleRequestResponse) .then(callback) - .catch(() => window.ibexa.helpers.notification.showErrorNotification('Cannot load content types')); + .catch(() => window.ibexa.helpers.notification.showErrorNotification('Cannot load Content Types')); }; diff --git a/src/bundle/ui-dev/src/modules/multi-file-upload/services/multi.file.upload.service.js b/src/bundle/ui-dev/src/modules/multi-file-upload/services/multi.file.upload.service.js index 44c50cdaaf..d1ff758391 100644 --- a/src/bundle/ui-dev/src/modules/multi-file-upload/services/multi.file.upload.service.js +++ b/src/bundle/ui-dev/src/modules/multi-file-upload/services/multi.file.upload.service.js @@ -169,7 +169,7 @@ const prepareStruct = ({ parentInfo, config, languageCode }, data) => { .catch(() => window.ibexa.helpers.notification.showErrorNotification( Translator.trans( - /*@Desc("Cannot get content type by identifier")*/ 'cannot_get_content_type_identifier.message', + /*@Desc("Cannot get Content Type by identifier")*/ 'cannot_get_content_type_identifier.message', {}, 'multi_file_upload', ), @@ -189,7 +189,7 @@ const prepareStruct = ({ parentInfo, config, languageCode }, data) => { .catch(() => window.ibexa.helpers.notification.showErrorNotification( Translator.trans( - /*@Desc("Cannot get content type by identifier")*/ 'cannot_get_content_type_identifier.message', + /*@Desc("Cannot get Content Type by identifier")*/ 'cannot_get_content_type_identifier.message', {}, 'multi_file_upload', ), diff --git a/src/bundle/ui-dev/src/modules/universal-discovery/components/content-create-widget/content.create.widget.js b/src/bundle/ui-dev/src/modules/universal-discovery/components/content-create-widget/content.create.widget.js index 923934e275..7101220c8a 100644 --- a/src/bundle/ui-dev/src/modules/universal-discovery/components/content-create-widget/content.create.widget.js +++ b/src/bundle/ui-dev/src/modules/universal-discovery/components/content-create-widget/content.create.widget.js @@ -87,8 +87,8 @@ const ContentCreateWidget = () => { 'universal_discovery_widget', ); const createUnderLabel = Translator.trans( - /*@Desc("under %content_name%")*/ 'content.create.editing_details', - { content_name: selectedLocation?.location?.ContentInfo.Content.TranslatedName }, + /*@Desc("Location: %location%")*/ 'content.create.editing_details', + { location: selectedLocation?.location?.ContentInfo.Content.TranslatedName }, 'universal_discovery_widget', ); const widgetClassName = createCssClassNames({ diff --git a/src/bundle/ui-dev/src/modules/universal-discovery/content.meta.preview.module.js b/src/bundle/ui-dev/src/modules/universal-discovery/content.meta.preview.module.js index 5afe9b40ad..4c432ba1e8 100644 --- a/src/bundle/ui-dev/src/modules/universal-discovery/content.meta.preview.module.js +++ b/src/bundle/ui-dev/src/modules/universal-discovery/content.meta.preview.module.js @@ -30,7 +30,7 @@ const ContentMetaPreview = () => { const allowRedirects = useContext(AllowRedirectsContext); const { formatShortDateTime } = ibexa.helpers.timezone; const locationData = useMemo(() => getLocationData(loadedLocationsMap, markedLocationId), [markedLocationId, loadedLocationsMap]); - const lastModifiedLabel = Translator.trans(/*@Desc("Last modified")*/ 'meta_preview.last_modified', {}, 'universal_discovery_widget'); + const lastModifiedLabel = Translator.trans(/*@Desc("Modified")*/ 'meta_preview.last_modified', {}, 'universal_discovery_widget'); const creationDateLabel = Translator.trans(/*@Desc("Created")*/ 'meta_preview.creation_date', {}, 'universal_discovery_widget'); const translationsLabel = Translator.trans(/*@Desc("Translations")*/ 'meta_preview.translations', {}, 'universal_discovery_widget'); diff --git a/src/lib/Form/TrashLocationOptionProvider/HasChildren.php b/src/lib/Form/TrashLocationOptionProvider/HasChildren.php index 0f8fc8e70b..fee9fe66d2 100644 --- a/src/lib/Form/TrashLocationOptionProvider/HasChildren.php +++ b/src/lib/Form/TrashLocationOptionProvider/HasChildren.php @@ -40,7 +40,7 @@ public function addOptions(FormInterface $form, Location $location): void $translatorParameters = [ '%children_count%' => $childCount, - '%content_name%' => $location->getContent()->getName(), + '%content%' => $location->getContent()->getName(), ]; $form @@ -49,7 +49,7 @@ public function addOptions(FormInterface $form, Location $location): void /** @Desc("Sub-items") */ $this->translator->trans('form.has_children.label', [], 'forms'), 'help_multiline' => [ - /** @Desc("Sending '%content_name%' and its %children_count% Content item(s) to Trash will also send the sub-items of this Location to Trash.") */ + /** @Desc("Sending '%content%' and its %children_count% Content item(s) to Trash will also send the sub-items of this Location to Trash.") */ $this->translator->trans('trash_container.modal.message_main', $translatorParameters, 'messages'), ], ]); diff --git a/src/lib/Form/TrashLocationOptionProvider/HasReverseRelations.php b/src/lib/Form/TrashLocationOptionProvider/HasReverseRelations.php index de28bb97be..bf4f4f1d0a 100644 --- a/src/lib/Form/TrashLocationOptionProvider/HasReverseRelations.php +++ b/src/lib/Form/TrashLocationOptionProvider/HasReverseRelations.php @@ -42,7 +42,7 @@ public function addOptions(FormInterface $form, Location $location): void $reverseRelationsCount = $this->contentService->countReverseRelations($location->contentInfo); $translatorParameters = [ - '%content_name%' => $location->getContent()->getName(), + '%content%' => $location->getContent()->getName(), '%reverse_relations%' => $reverseRelationsCount, ]; @@ -52,7 +52,7 @@ public function addOptions(FormInterface $form, Location $location): void /** @Desc("Conflict with reverse Relations") */ $this->translator->trans('form.has_reverse_relation.label', [], 'forms'), 'help_multiline' => [ - /** @Desc("'%content_name%' is in use by %reverse_relations% Content item(s). You should remove all reverse Relations before deleting the Content item.") */ + /** @Desc("'%content%' is in use by %reverse_relations% Content item(s). You should remove all reverse Relations before deleting the Content item.") */ $this->translator->trans('trash_container.modal.message_relations', $translatorParameters), ], ]); diff --git a/src/lib/Form/TrashLocationOptionProvider/HasUniqueAssetRelation.php b/src/lib/Form/TrashLocationOptionProvider/HasUniqueAssetRelation.php index 7ea587948d..88548aeef1 100644 --- a/src/lib/Form/TrashLocationOptionProvider/HasUniqueAssetRelation.php +++ b/src/lib/Form/TrashLocationOptionProvider/HasUniqueAssetRelation.php @@ -46,7 +46,7 @@ public function supports(Location $location): bool public function addOptions(FormInterface $form, Location $location): void { $translatorParameters = [ - '%content_name%' => $location->getContent()->getName(), + '%content%' => $location->getContent()->getName(), ]; $form->add(self::TRASH_ASSETS, ChoiceType::class, [ @@ -62,7 +62,7 @@ public function addOptions(FormInterface $form, Location $location): void $this->translator->trans('location_trash_form.trash_with_asset', $translatorParameters, 'forms') => self::RADIO_SELECT_TRASH_WITH_ASSETS, ], 'help_multiline' => [ - /** @Desc("'%content_name%' has 1 or more asset Field(s). You have an option to send only the Content item to Trash, or to send the Content item and its assets to Trash. Please select your option:") */ + /** @Desc("'%content%' has 1 or more asset Field(s). You have an option to send only the Content item to Trash, or to send the Content item and its assets to Trash. Please select your option:") */ $this->translator->trans('trash_asset_single.modal.message_main', $translatorParameters), ], ]); From a130233278d1fbbac73781ac1bced8df0cf8bdaa Mon Sep 17 00:00:00 2001 From: tischsoic Date: Tue, 8 Aug 2023 10:53:08 +0200 Subject: [PATCH 08/21] FT: add new -> add --- .../views/themes/admin/content/modal/draft_conflict.html.twig | 2 +- .../views/themes/admin/content/tab/locations/tab.html.twig | 2 +- .../views/themes/admin/content/tab/translations/tab.html.twig | 2 +- .../Resources/views/themes/admin/content/tab/urls.html.twig | 2 +- .../Resources/views/themes/admin/object_state/list.html.twig | 2 +- .../Resources/views/themes/admin/url_wildcard/list.html.twig | 2 +- .../Resources/views/themes/admin/user/policy/list.html.twig | 2 +- src/lib/Behat/Page/RolePage.php | 2 +- src/lib/Menu/ContentRightSidebarBuilder.php | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/bundle/Resources/views/themes/admin/content/modal/draft_conflict.html.twig b/src/bundle/Resources/views/themes/admin/content/modal/draft_conflict.html.twig index 58d8bd9f84..f1c48164e8 100644 --- a/src/bundle/Resources/views/themes/admin/content/modal/draft_conflict.html.twig +++ b/src/bundle/Resources/views/themes/admin/content/modal/draft_conflict.html.twig @@ -51,7 +51,7 @@ - {{ 'draft.conflict.add_new'|trans|desc('Add new') }} + {{ 'draft.conflict.add_new'|trans|desc('Add') }} {% endif %} diff --git a/src/bundle/Resources/views/themes/admin/content/tab/locations/tab.html.twig b/src/bundle/Resources/views/themes/admin/content/tab/locations/tab.html.twig index d4976c6e62..ffa5f58557 100644 --- a/src/bundle/Resources/views/themes/admin/content/tab/locations/tab.html.twig +++ b/src/bundle/Resources/views/themes/admin/content/tab/locations/tab.html.twig @@ -158,7 +158,7 @@ - {{ 'tab.locations.action.add'|trans|desc('Add new') }} + {{ 'tab.locations.action.add'|trans|desc('Add') }} diff --git a/src/bundle/Resources/views/themes/admin/content/tab/translations/tab.html.twig b/src/bundle/Resources/views/themes/admin/content/tab/translations/tab.html.twig index 384b85e980..f2af855485 100644 --- a/src/bundle/Resources/views/themes/admin/content/tab/translations/tab.html.twig +++ b/src/bundle/Resources/views/themes/admin/content/tab/translations/tab.html.twig @@ -94,7 +94,7 @@ - {{ 'tab.translations.action.add'|trans|desc('Add new') }} + {{ 'tab.translations.action.add'|trans|desc('Add') }} diff --git a/src/bundle/Resources/views/themes/admin/content/tab/urls.html.twig b/src/bundle/Resources/views/themes/admin/content/tab/urls.html.twig index e3351dfb8e..d737d166e7 100644 --- a/src/bundle/Resources/views/themes/admin/content/tab/urls.html.twig +++ b/src/bundle/Resources/views/themes/admin/content/tab/urls.html.twig @@ -58,7 +58,7 @@ - {{ 'tab.urls.action.add'|trans|desc('Add new') }} + {{ 'tab.urls.action.add'|trans|desc('Add') }} diff --git a/src/bundle/Resources/views/themes/admin/object_state/list.html.twig b/src/bundle/Resources/views/themes/admin/object_state/list.html.twig index 743611eb61..a161dc4dfb 100644 --- a/src/bundle/Resources/views/themes/admin/object_state/list.html.twig +++ b/src/bundle/Resources/views/themes/admin/object_state/list.html.twig @@ -83,7 +83,7 @@ - {{ 'object_state.new'|trans|desc('Add new') }} + {{ 'object_state.new'|trans|desc('Add') }} diff --git a/src/bundle/Resources/views/themes/admin/url_wildcard/list.html.twig b/src/bundle/Resources/views/themes/admin/url_wildcard/list.html.twig index 7024b16cb9..bcd0422ef5 100644 --- a/src/bundle/Resources/views/themes/admin/url_wildcard/list.html.twig +++ b/src/bundle/Resources/views/themes/admin/url_wildcard/list.html.twig @@ -122,7 +122,7 @@ - {{ 'url_wildcard.list.action.create'|trans|desc('Add new') }} + {{ 'url_wildcard.list.action.create'|trans|desc('Add') }} {% include '@ibexadesign/ui/modal/bulk_delete_confirmation.html.twig' with { 'id': modal_data_target, - 'message': 'tab.urls.modal.message'|trans|desc('Do you want to delete the selected custom URL alias(es)?'), + 'message': 'tab.urls.modal.message'|trans|desc('Delete the selected custom URL aliases permanently?'), 'data_click': '#' ~ form_custom_url_remove.remove.vars.id, }%} {% endif %} diff --git a/src/bundle/Resources/views/themes/admin/language/list.html.twig b/src/bundle/Resources/views/themes/admin/language/list.html.twig index 3a812d79ff..9b037a569f 100644 --- a/src/bundle/Resources/views/themes/admin/language/list.html.twig +++ b/src/bundle/Resources/views/themes/admin/language/list.html.twig @@ -154,7 +154,9 @@ {% include '@ibexadesign/ui/modal/bulk_delete_confirmation.html.twig' with { 'id': modal_data_target, - 'message': 'language.modal.message'|trans|desc('Do you want to delete the language(s)?'), + 'message': 'language.modal.message'|trans|desc( + 'Delete the languages?' + ), 'data_click': '#languages_delete_delete', }%} {% endif %} diff --git a/src/bundle/Resources/views/themes/admin/language/modal/delete_confirmation.html.twig b/src/bundle/Resources/views/themes/admin/language/modal/delete_confirmation.html.twig index 4839c6fa80..892e5c8406 100644 --- a/src/bundle/Resources/views/themes/admin/language/modal/delete_confirmation.html.twig +++ b/src/bundle/Resources/views/themes/admin/language/modal/delete_confirmation.html.twig @@ -6,7 +6,7 @@ {% trans_default_domain 'language' %} {% block body_content %} -

{{ 'language.modal.message'|trans|desc('Do you want to delete the language(s)?') }}

+

{{ 'language.modal.message'|trans|desc('Delete the languages?') }}

{% endblock %} {% block footer_content %} {{ form_widget(deleteForm.delete, { 'attr': {'class': 'btn ibexa-btn ibexa-btn--primary'} }) }} diff --git a/src/bundle/Resources/views/themes/admin/link_manager/list.html.twig b/src/bundle/Resources/views/themes/admin/link_manager/list.html.twig index ac855316c1..cf1aea171d 100644 --- a/src/bundle/Resources/views/themes/admin/link_manager/list.html.twig +++ b/src/bundle/Resources/views/themes/admin/link_manager/list.html.twig @@ -7,7 +7,7 @@ {{ form_start(form, {'attr': {'class': 'ibexa-search-links-form'}}) }}