Skip to content

Commit fcb83ec

Browse files
authored
Merge pull request joomla#44076 from richard67/5.3-dev-upmerge-2024-09-14
[5.3] Upmerge 2024-09-14
2 parents 36d1c7f + 342e74b commit fcb83ec

File tree

331 files changed

+1158
-998
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+1158
-998
lines changed

.github/workflows/create-translation-pull-request-v5.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
name: Create translation pull request
1+
name: Create translation pull request J5
22

33
on:
44
push:
5-
branches: [ translation ]
5+
branches: [ translation5 ]
66

77
workflow_dispatch:
88

99
schedule:
1010
# Run daily at 7:32
1111
- cron: '32 7 * * *'
1212

13+
env:
14+
JOOMLA_MAJOR_VERSION: 5
15+
JOOMLA_MINOR_VERSION: 5.3
16+
1317
permissions:
1418
contents: read
1519

@@ -25,6 +29,7 @@ jobs:
2529
- uses: actions/checkout@v3
2630
# We need the full depth to create / update the pull request against the main repo
2731
with:
32+
ref: translation5
2833
fetch-depth: 0
2934
- uses: actions/setup-node@v3
3035
with:
@@ -37,7 +42,7 @@ jobs:
3742
git remote add upstream https://github.com/joomla/joomla-cms.git
3843
git fetch upstream
3944
git checkout --progress --force -B translation5 refs/remotes/origin/translation5
40-
git merge upstream/5.1-dev
45+
git merge upstream/${{ env.JOOMLA_MINOR_VERSION }}-dev
4146
4247
- name: Fetch and extract translations
4348
run: |
@@ -49,11 +54,9 @@ jobs:
4954
# We use a simple copy paste syntax here if needed customization for different directories
5055
run: |
5156
cd ..
52-
SYNC_VERSION="v5"
53-
5457
SYNC_PATH="installation/language/"
5558
echo ${SYNC_PATH}
56-
rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_${SYNC_VERSION}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH}
59+
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}
5760
5861
- name: Update static error pages
5962
run: |
@@ -73,5 +76,5 @@ jobs:
7376
env:
7477
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
7578
run: |
76-
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[5.x] Translation Update" | grep -v "No pull" || \
77-
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
79+
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" || \
80+
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

administrator/components/com_actionlogs/src/Helper/ActionlogsHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static function getCsvData($data): \Generator
5353
{
5454
if (!is_iterable($data)) {
5555
throw new \InvalidArgumentException(
56-
sprintf(
56+
\sprintf(
5757
'%s() requires an array or object implementing the Traversable interface, a %s was given.',
5858
__METHOD__,
5959
\is_object($data) ? \get_class($data) : \gettype($data)

administrator/components/com_actionlogs/src/Model/ActionlogModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ActionlogModel extends BaseDatabaseModel implements UserFactoryAwareInterf
5252
public function addLog($messages, $messageLanguageKey, $context, $userId = 0)
5353
{
5454
if (!is_numeric($userId)) {
55-
@trigger_error(sprintf('User ID must be an integer in %s.', __METHOD__), E_USER_DEPRECATED);
55+
@trigger_error(\sprintf('User ID must be an integer in %s.', __METHOD__), E_USER_DEPRECATED);
5656
}
5757

5858
$user = $userId ? $this->getUserFactory()->loadUserById($userId) : $this->getCurrentUser();

administrator/components/com_admin/script.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ protected function updateManifestCaches()
543543
if (!$installer->refreshManifestCache($extension->extension_id)) {
544544
$this->collectError(
545545
__METHOD__,
546-
new \Exception(sprintf(
546+
new \Exception(\sprintf(
547547
'Error on updating manifest cache: (type, element, folder, client) = (%s, %s, %s, %s)',
548548
$extension->type,
549549
$extension->element,
@@ -2636,7 +2636,7 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
26362636
if (File::delete(JPATH_ROOT . $file)) {
26372637
$status['files_deleted'][] = $file;
26382638
} else {
2639-
$status['files_errors'][] = sprintf('Error on deleting file or folder %s', $file);
2639+
$status['files_errors'][] = \sprintf('Error on deleting file or folder %s', $file);
26402640
}
26412641
}
26422642
}
@@ -2650,7 +2650,7 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
26502650
if (Folder::delete(JPATH_ROOT . $folder)) {
26512651
$status['folders_deleted'][] = $folder;
26522652
} else {
2653-
$status['folders_errors'][] = sprintf('Error on deleting file or folder %s', $folder);
2653+
$status['folders_errors'][] = \sprintf('Error on deleting file or folder %s', $folder);
26542654
}
26552655
}
26562656
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
INSERT INTO `#__guidedtours` (`title`, `description`, `extensions`, `url`, `published`, `language`, `note`, `access`, `uid`, `autostart`, `created`, `created_by`, `modified`, `modified_by`) VALUES
2+
('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);
3+
INSERT INTO `#__guidedtour_steps` (`title`, `description`, `position`, `target`, `type`, `interactive_type`, `url`, `published`, `language`, `note`, `params`, `tour_id`, `created`, `created_by`, `modified`, `modified_by`)
4+
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
5+
FROM `#__guidedtours`
6+
WHERE `uid` = 'joomla-whatsnew-5-2';
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
INSERT INTO "#__guidedtours" ("title", "description", "extensions", "url", "published", "language", "note", "access", "uid", "autostart", "created", "created_by", "modified", "modified_by") VALUES
2+
('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);
3+
INSERT INTO "#__guidedtour_steps" ("title", "description", "position", "target", "type", "interactive_type", "url", "published", "language", "note", "params", "tour_id", "created", "created_by", "modified", "modified_by")
4+
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
5+
FROM "#__guidedtours"
6+
WHERE "uid" = 'joomla-whatsnew-5-2';

administrator/components/com_associations/tmpl/associations/default.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030

3131
$iconStates = [
3232
-2 => 'icon-trash',
33-
0 => 'icon-times',
34-
1 => 'icon-check',
35-
2 => 'icon-folder',
33+
0 => 'icon-unpublish',
34+
1 => 'icon-publish',
35+
2 => 'icon-archive',
3636
];
3737

3838
Text::script('COM_ASSOCIATIONS_PURGE_CONFIRM_PROMPT', true);

administrator/components/com_associations/tmpl/associations/modal.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838

3939
$iconStates = [
4040
-2 => 'icon-trash',
41-
0 => 'icon-times',
42-
1 => 'icon-check',
43-
2 => 'icon-folder',
41+
0 => 'icon-unpublish',
42+
1 => 'icon-publish',
43+
2 => 'icon-archive',
4444
];
4545

4646
$this->getDocument()->addScriptOptions('associations-modal', ['func' => $function]);

administrator/components/com_banners/src/Table/BannerTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function check()
143143
$this->ordering = 0;
144144
} elseif (empty($this->ordering)) {
145145
// Set ordering to last if ordering was 0
146-
$this->ordering = self::getNextOrder($this->_db->quoteName('catid') . ' = ' . ((int) $this->catid) . ' AND ' . $this->_db->quoteName('state') . ' >= 0');
146+
$this->ordering = $this->getNextOrder($this->_db->quoteName('catid') . ' = ' . ((int) $this->catid) . ' AND ' . $this->_db->quoteName('state') . ' >= 0');
147147
}
148148

149149
// Set modified to created if not set

administrator/components/com_categories/src/Field/CategoryeditField.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,23 +242,23 @@ protected function getOptions()
242242
}
243243

244244
// Pad the option text with spaces using depth level as a multiplier.
245-
for ($i = 0, $n = \count($options); $i < $n; $i++) {
245+
foreach ($options as $option) {
246246
// Translate ROOT
247247
if ($this->element['parent'] == true || $jinput->get('option') == 'com_categories') {
248-
if ($options[$i]->level == 0) {
249-
$options[$i]->text = Text::_('JGLOBAL_ROOT_PARENT');
248+
if ($option->level == 0) {
249+
$option->text = Text::_('JGLOBAL_ROOT_PARENT');
250250
}
251251
}
252252

253-
if ($options[$i]->published == 1) {
254-
$options[$i]->text = str_repeat('- ', !$options[$i]->level ? 0 : $options[$i]->level - 1) . $options[$i]->text;
253+
if ($option->published == 1) {
254+
$option->text = str_repeat('- ', !$option->level ? 0 : $option->level - 1) . $option->text;
255255
} else {
256-
$options[$i]->text = str_repeat('- ', !$options[$i]->level ? 0 : $options[$i]->level - 1) . '[' . $options[$i]->text . ']';
256+
$option->text = str_repeat('- ', !$option->level ? 0 : $option->level - 1) . '[' . $option->text . ']';
257257
}
258258

259259
// Displays language code if not set to All
260-
if ($options[$i]->language !== '*') {
261-
$options[$i]->text .= ' (' . $options[$i]->language . ')';
260+
if ($option->language !== '*') {
261+
$option->text .= ' (' . $option->language . ')';
262262
}
263263
}
264264

0 commit comments

Comments
 (0)