Skip to content

Commit

Permalink
Merge branch '5.3-dev' into explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
brianteeman authored Sep 17, 2024
2 parents b9523f6 + fcb83ec commit 28d2cec
Show file tree
Hide file tree
Showing 331 changed files with 1,158 additions and 998 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/create-translation-pull-request-v5.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: Create translation pull request
name: Create translation pull request J5

on:
push:
branches: [ translation ]
branches: [ translation5 ]

workflow_dispatch:

schedule:
# Run daily at 7:32
- cron: '32 7 * * *'

env:
JOOMLA_MAJOR_VERSION: 5
JOOMLA_MINOR_VERSION: 5.3

permissions:
contents: read

Expand All @@ -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:
Expand All @@ -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: |
Expand All @@ -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: |
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 3 additions & 3 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}
}
}
Expand All @@ -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);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Original file line number Diff line number Diff line change
@@ -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';
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 . ')';
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
<?php
$iconStates = [
-2 => 'icon-trash',
0 => 'icon-times',
1 => 'icon-check',
2 => 'icon-folder',
0 => 'icon-unpublish',
1 => 'icon-publish',
2 => 'icon-archive',
];
?>
<?php foreach ($this->items as $i => $item) : ?>
Expand Down
6 changes: 3 additions & 3 deletions administrator/components/com_contact/tmpl/contacts/modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@
<?php
$iconStates = [
-2 => 'icon-trash',
0 => 'icon-times',
1 => 'icon-check',
2 => 'icon-folder',
0 => 'icon-unpublish',
1 => 'icon-publish',
2 => 'icon-archive',
];
?>
<?php foreach ($this->items as $i => $item) : ?>
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_content/tmpl/articles/modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
<?php
$iconStates = [
-2 => 'icon-trash',
0 => 'icon-times',
1 => 'icon-check',
0 => 'icon-unpublish',
1 => 'icon-publish',
2 => 'icon-archive',
];
?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 3 additions & 0 deletions administrator/components/com_fields/forms/field.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<form addfieldprefix="Joomla\Component\Fields\Administrator\Field">
<config>
<inlinehelp button="show"/>
</config>
<fieldset>
<field
name="id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ private function checkDefaultValue($data)
try {
$rule->setDatabase($this->getDatabase());
} catch (DatabaseNotFoundException $e) {
@trigger_error(sprintf('Database must be set, this will not be caught anymore in 5.0.'), E_USER_DEPRECATED);
@trigger_error(\sprintf('Database must be set, this will not be caught anymore in 5.0.'), E_USER_DEPRECATED);
$rule->setDatabase(Factory::getContainer()->get(DatabaseInterface::class));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ function (Toolbar $childBar) use ($checkedOut, $itemEditable, $canDo) {
$toolbar->cancel('field.cancel');
}

$toolbar->inlinehelp();
$toolbar->help('Fields:_Edit');
}
}
6 changes: 3 additions & 3 deletions administrator/components/com_fields/tmpl/fields/modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@
<?php
$iconStates = [
-2 => 'icon-trash',
0 => 'icon-times',
1 => 'icon-check',
2 => 'icon-folder',
0 => 'icon-unpublish',
1 => 'icon-publish',
2 => 'icon-archive',
];
foreach ($this->items as $i => $item) :
$attrs = 'data-content-select data-content-type="com_fields.field"'
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_finder/src/Indexer/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ public function onBuildIndex()
$items = $this->getItems($offset, $limit);

// Iterate through the items and index them.
for ($i = 0, $n = \count($items); $i < $n; $i++) {
foreach ($items as $item) {
// Index the item.
$this->index($items[$i]);
$this->index($item);

// Adjust the offsets.
$offset++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@ public function onBuildIndex()
$items = $this->getItems($offset, $limit);

// Iterate through the items and index them.
for ($i = 0, $n = \count($items); $i < $n; $i++) {
foreach ($items as $item) {
// Index the item.
$this->index($items[$i]);
$this->index($item);

// Adjust the offsets.
$offset++;
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_finder/src/Indexer/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public static function addContentType($title, $mime = null)
$query->clear()
->insert($db->quoteName('#__finder_types'))
->columns([$db->quoteName('title'), $db->quoteName('mime')])
->values($db->quote($title) . ', ' . $db->quote($mime));
->values($db->quote($title) . ', ' . $db->quote($mime ?? ''));
$db->setQuery($query);
$db->execute();

Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_finder/src/Indexer/Indexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class Indexer
public function __construct(?DatabaseInterface $db = null)
{
if ($db === null) {
@trigger_error(sprintf('Database will be mandatory in 5.0.'), E_USER_DEPRECATED);
@trigger_error(\sprintf('Database will be mandatory in 5.0.'), E_USER_DEPRECATED);
$db = Factory::getContainer()->get(DatabaseInterface::class);
}

Expand Down Expand Up @@ -506,7 +506,7 @@ public function index($item, $format = 'html')
// Iterate through the contexts and aggregate the tokens per context.
foreach ($state->weights as $context => $multiplier) {
// Run the query to aggregate the tokens for this context..
$db->setQuery(sprintf($query, $multiplier, $context, $context));
$db->setQuery(\sprintf($query, $multiplier, $context, $context));
$db->execute();
}

Expand Down
Loading

0 comments on commit 28d2cec

Please sign in to comment.