diff --git a/.github/workflows/create-translation-pull-request-v5.yml b/.github/workflows/create-translation-pull-request-v5.yml index a7014b3f76bdb..673410d759b40 100644 --- a/.github/workflows/create-translation-pull-request-v5.yml +++ b/.github/workflows/create-translation-pull-request-v5.yml @@ -1,8 +1,8 @@ -name: Create translation pull request +name: Create translation pull request J5 on: push: - branches: [ translation ] + branches: [ translation5 ] workflow_dispatch: @@ -10,6 +10,10 @@ on: # Run daily at 7:32 - cron: '32 7 * * *' +env: + JOOMLA_MAJOR_VERSION: 5 + JOOMLA_MINOR_VERSION: 5.3 + permissions: contents: read @@ -25,6 +29,7 @@ jobs: - uses: actions/checkout@v3 # We need the full depth to create / update the pull request against the main repo with: + ref: translation5 fetch-depth: 0 - uses: actions/setup-node@v3 with: @@ -37,7 +42,7 @@ jobs: git remote add upstream https://github.com/joomla/joomla-cms.git git fetch upstream git checkout --progress --force -B translation5 refs/remotes/origin/translation5 - git merge upstream/5.1-dev + git merge upstream/${{ env.JOOMLA_MINOR_VERSION }}-dev - name: Fetch and extract translations run: | @@ -49,11 +54,9 @@ jobs: # We use a simple copy paste syntax here if needed customization for different directories run: | cd .. - SYNC_VERSION="v5" - SYNC_PATH="installation/language/" echo ${SYNC_PATH} - rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_${SYNC_VERSION}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH} + rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_v${{ env.JOOMLA_MAJOR_VERSION }}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH} - name: Update static error pages run: | @@ -73,5 +76,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }} run: | - gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[5.x] Translation Update" | grep -v "No pull" || \ - gh pr create --title "[5.x] Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 5.1-dev + gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[${{ env.JOOMLA_MINOR_VERSION }}] Translation Update" --base ${{ env.JOOMLA_MINOR_VERSION }}-dev | grep -v "No pull" || \ + gh pr create --title "[${{ env.JOOMLA_MINOR_VERSION }}] Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base ${{ env.JOOMLA_MINOR_VERSION }}-dev diff --git a/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php b/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php index 658788a9486c4..d253348661abe 100644 --- a/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php +++ b/administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php @@ -53,7 +53,7 @@ public static function getCsvData($data): \Generator { if (!is_iterable($data)) { throw new \InvalidArgumentException( - sprintf( + \sprintf( '%s() requires an array or object implementing the Traversable interface, a %s was given.', __METHOD__, \is_object($data) ? \get_class($data) : \gettype($data) diff --git a/administrator/components/com_actionlogs/src/Model/ActionlogModel.php b/administrator/components/com_actionlogs/src/Model/ActionlogModel.php index 932de5be9698a..f11c3bf87c034 100644 --- a/administrator/components/com_actionlogs/src/Model/ActionlogModel.php +++ b/administrator/components/com_actionlogs/src/Model/ActionlogModel.php @@ -52,7 +52,7 @@ class ActionlogModel extends BaseDatabaseModel implements UserFactoryAwareInterf public function addLog($messages, $messageLanguageKey, $context, $userId = 0) { if (!is_numeric($userId)) { - @trigger_error(sprintf('User ID must be an integer in %s.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(\sprintf('User ID must be an integer in %s.', __METHOD__), E_USER_DEPRECATED); } $user = $userId ? $this->getUserFactory()->loadUserById($userId) : $this->getCurrentUser(); diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php index d95337516ba3a..035103d764dc9 100644 --- a/administrator/components/com_admin/script.php +++ b/administrator/components/com_admin/script.php @@ -543,7 +543,7 @@ protected function updateManifestCaches() if (!$installer->refreshManifestCache($extension->extension_id)) { $this->collectError( __METHOD__, - new \Exception(sprintf( + new \Exception(\sprintf( 'Error on updating manifest cache: (type, element, folder, client) = (%s, %s, %s, %s)', $extension->type, $extension->element, @@ -2636,7 +2636,7 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) if (File::delete(JPATH_ROOT . $file)) { $status['files_deleted'][] = $file; } else { - $status['files_errors'][] = sprintf('Error on deleting file or folder %s', $file); + $status['files_errors'][] = \sprintf('Error on deleting file or folder %s', $file); } } } @@ -2650,7 +2650,7 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false) if (Folder::delete(JPATH_ROOT . $folder)) { $status['folders_deleted'][] = $folder; } else { - $status['folders_errors'][] = sprintf('Error on deleting file or folder %s', $folder); + $status['folders_errors'][] = \sprintf('Error on deleting file or folder %s', $folder); } } } diff --git a/administrator/components/com_admin/sql/updates/mysql/5.2.0-2024-08-22.sql b/administrator/components/com_admin/sql/updates/mysql/5.2.0-2024-08-22.sql new file mode 100644 index 0000000000000..0876fa5024ede --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/5.2.0-2024-08-22.sql @@ -0,0 +1,6 @@ +INSERT INTO `#__guidedtours` (`title`, `description`, `extensions`, `url`, `published`, `language`, `note`, `access`, `uid`, `autostart`, `created`, `created_by`, `modified`, `modified_by`) VALUES +('COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_DESCRIPTION', '["com_cpanel"]', 'administrator/index.php', 1, '*', '', 1, 'joomla-whatsnew-5-2', 1, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0); +INSERT INTO `#__guidedtour_steps` (`title`, `description`, `position`, `target`, `type`, `interactive_type`, `url`, `published`, `language`, `note`, `params`, `tour_id`, `created`, `created_by`, `modified`, `modified_by`) +SELECT 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_DESCRIPTION', 'right', '#sidebarmenu nav > ul:first-of-type > li:last-child', 0, 1, '', 1, '*', '', '{"required":1,"requiredvalue":""}', MAX(`id`), CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0 + FROM `#__guidedtours` + WHERE `uid` = 'joomla-whatsnew-5-2'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/5.2.0-2024-08-22.sql b/administrator/components/com_admin/sql/updates/postgresql/5.2.0-2024-08-22.sql new file mode 100644 index 0000000000000..a92672ae0efd7 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/5.2.0-2024-08-22.sql @@ -0,0 +1,6 @@ +INSERT INTO "#__guidedtours" ("title", "description", "extensions", "url", "published", "language", "note", "access", "uid", "autostart", "created", "created_by", "modified", "modified_by") VALUES +('COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_DESCRIPTION', '["com_cpanel"]', 'administrator/index.php', 1, '*', '', 1, 'joomla-whatsnew-5-2', 1, CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0); +INSERT INTO "#__guidedtour_steps" ("title", "description", "position", "target", "type", "interactive_type", "url", "published", "language", "note", "params", "tour_id", "created", "created_by", "modified", "modified_by") +SELECT 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_TITLE', 'COM_GUIDEDTOURS_TOUR_WHATSNEW_5_2_STEP_0_DESCRIPTION', 'right', '#sidebarmenu nav > ul:first-of-type > li:last-child', 0, 1, '', 1, '*', '', '{"required":1,"requiredvalue":""}', MAX("id"), CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0 + FROM "#__guidedtours" + WHERE "uid" = 'joomla-whatsnew-5-2'; diff --git a/administrator/components/com_associations/tmpl/associations/default.php b/administrator/components/com_associations/tmpl/associations/default.php index 01a8f1ad29579..3c6bcc2f202c7 100644 --- a/administrator/components/com_associations/tmpl/associations/default.php +++ b/administrator/components/com_associations/tmpl/associations/default.php @@ -30,9 +30,9 @@ $iconStates = [ -2 => 'icon-trash', - 0 => 'icon-times', - 1 => 'icon-check', - 2 => 'icon-folder', + 0 => 'icon-unpublish', + 1 => 'icon-publish', + 2 => 'icon-archive', ]; Text::script('COM_ASSOCIATIONS_PURGE_CONFIRM_PROMPT', true); diff --git a/administrator/components/com_associations/tmpl/associations/modal.php b/administrator/components/com_associations/tmpl/associations/modal.php index 8db50389fc743..5a4b2214e4519 100644 --- a/administrator/components/com_associations/tmpl/associations/modal.php +++ b/administrator/components/com_associations/tmpl/associations/modal.php @@ -38,9 +38,9 @@ $iconStates = [ -2 => 'icon-trash', - 0 => 'icon-times', - 1 => 'icon-check', - 2 => 'icon-folder', + 0 => 'icon-unpublish', + 1 => 'icon-publish', + 2 => 'icon-archive', ]; $this->getDocument()->addScriptOptions('associations-modal', ['func' => $function]); diff --git a/administrator/components/com_banners/src/Table/BannerTable.php b/administrator/components/com_banners/src/Table/BannerTable.php index 29388eecf588d..bd3968945314b 100644 --- a/administrator/components/com_banners/src/Table/BannerTable.php +++ b/administrator/components/com_banners/src/Table/BannerTable.php @@ -143,7 +143,7 @@ public function check() $this->ordering = 0; } elseif (empty($this->ordering)) { // Set ordering to last if ordering was 0 - $this->ordering = self::getNextOrder($this->_db->quoteName('catid') . ' = ' . ((int) $this->catid) . ' AND ' . $this->_db->quoteName('state') . ' >= 0'); + $this->ordering = $this->getNextOrder($this->_db->quoteName('catid') . ' = ' . ((int) $this->catid) . ' AND ' . $this->_db->quoteName('state') . ' >= 0'); } // Set modified to created if not set diff --git a/administrator/components/com_categories/src/Field/CategoryeditField.php b/administrator/components/com_categories/src/Field/CategoryeditField.php index b443379088c5f..c824639799c3b 100644 --- a/administrator/components/com_categories/src/Field/CategoryeditField.php +++ b/administrator/components/com_categories/src/Field/CategoryeditField.php @@ -242,23 +242,23 @@ protected function getOptions() } // Pad the option text with spaces using depth level as a multiplier. - for ($i = 0, $n = \count($options); $i < $n; $i++) { + foreach ($options as $option) { // Translate ROOT if ($this->element['parent'] == true || $jinput->get('option') == 'com_categories') { - if ($options[$i]->level == 0) { - $options[$i]->text = Text::_('JGLOBAL_ROOT_PARENT'); + if ($option->level == 0) { + $option->text = Text::_('JGLOBAL_ROOT_PARENT'); } } - if ($options[$i]->published == 1) { - $options[$i]->text = str_repeat('- ', !$options[$i]->level ? 0 : $options[$i]->level - 1) . $options[$i]->text; + if ($option->published == 1) { + $option->text = str_repeat('- ', !$option->level ? 0 : $option->level - 1) . $option->text; } else { - $options[$i]->text = str_repeat('- ', !$options[$i]->level ? 0 : $options[$i]->level - 1) . '[' . $options[$i]->text . ']'; + $option->text = str_repeat('- ', !$option->level ? 0 : $option->level - 1) . '[' . $option->text . ']'; } // Displays language code if not set to All - if ($options[$i]->language !== '*') { - $options[$i]->text .= ' (' . $options[$i]->language . ')'; + if ($option->language !== '*') { + $option->text .= ' (' . $option->language . ')'; } } diff --git a/administrator/components/com_categories/tmpl/categories/modal.php b/administrator/components/com_categories/tmpl/categories/modal.php index cc0b2800ceaca..ae7d0fee6e36e 100644 --- a/administrator/components/com_categories/tmpl/categories/modal.php +++ b/administrator/components/com_categories/tmpl/categories/modal.php @@ -79,9 +79,9 @@ 'icon-trash', - 0 => 'icon-times', - 1 => 'icon-check', - 2 => 'icon-folder', + 0 => 'icon-unpublish', + 1 => 'icon-publish', + 2 => 'icon-archive', ]; ?> items as $i => $item) : ?> diff --git a/administrator/components/com_contact/tmpl/contacts/modal.php b/administrator/components/com_contact/tmpl/contacts/modal.php index 8d9fe4391c436..ed2579532dc83 100644 --- a/administrator/components/com_contact/tmpl/contacts/modal.php +++ b/administrator/components/com_contact/tmpl/contacts/modal.php @@ -92,9 +92,9 @@ 'icon-trash', - 0 => 'icon-times', - 1 => 'icon-check', - 2 => 'icon-folder', + 0 => 'icon-unpublish', + 1 => 'icon-publish', + 2 => 'icon-archive', ]; ?> items as $i => $item) : ?> diff --git a/administrator/components/com_content/tmpl/articles/modal.php b/administrator/components/com_content/tmpl/articles/modal.php index 42dd83cc093a7..00619b47145bb 100644 --- a/administrator/components/com_content/tmpl/articles/modal.php +++ b/administrator/components/com_content/tmpl/articles/modal.php @@ -94,8 +94,8 @@ 'icon-trash', - 0 => 'icon-times', - 1 => 'icon-check', + 0 => 'icon-unpublish', + 1 => 'icon-publish', 2 => 'icon-archive', ]; ?> diff --git a/administrator/components/com_content/tmpl/featured/default.php b/administrator/components/com_content/tmpl/featured/default.php index 048b8640421c0..df58b6aa66b58 100644 --- a/administrator/components/com_content/tmpl/featured/default.php +++ b/administrator/components/com_content/tmpl/featured/default.php @@ -203,7 +203,7 @@ 'title' => Text::_($item->stage_title), 'tip_content' => Text::sprintf('JWORKFLOW', Text::_($item->workflow_title)), 'id' => 'workflow-' . $item->id, - 'task' => 'articles.runTransitions' + 'task' => 'articles.runTransition' ]; echo (new TransitionButton($options)) diff --git a/administrator/components/com_fields/forms/field.xml b/administrator/components/com_fields/forms/field.xml index 53fc2fb858a5a..d10862621214e 100644 --- a/administrator/components/com_fields/forms/field.xml +++ b/administrator/components/com_fields/forms/field.xml @@ -1,5 +1,8 @@