Skip to content

Commit

Permalink
Merge branch '5.1-dev' into lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
LadySolveig committed Jan 30, 2024
2 parents 51ea205 + a1cdbc1 commit 52e2fcb
Show file tree
Hide file tree
Showing 205 changed files with 3,897 additions and 2,143 deletions.
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ steps:
- mkdir -p transfer
- date +%s > transfer/$MINORVERSION-time.txt
- git rev-parse origin/$MINORVERSION-dev > transfer/$MINORVERSION.txt
- php build/build.php --remote=origin/$MINORVERSION-dev --exclude-gzip --exclude-bzip2 --disable-patch-packages
- php build/build.php --remote=origin/$MINORVERSION-dev --exclude-gzip --disable-patch-packages
- mv build/tmp/packages/* transfer/

- name: upload
Expand Down Expand Up @@ -403,6 +403,6 @@ trigger:

---
kind: signature
hmac: e8ab45eb1d91c0b0b38c8d25a3a983d112c973dcba0153a982f2afd581dfa458
hmac: c1434b09300896f8627ccb11c92e97878caf7a303772db01a647dca53a92fa3f

...
49 changes: 0 additions & 49 deletions .github/workflows/cacert-update.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/create-translation-pull-request-v4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Fetch latest cms changes
run: |
Expand All @@ -37,7 +37,7 @@ jobs:
git remote add upstream https://github.com/joomla/joomla-cms.git
git fetch upstream
git checkout --progress --force -B translation refs/remotes/origin/translation
git merge upstream/4.3-dev
git merge upstream/4.4-dev
- name: Fetch and extract translations
run: |
Expand Down Expand Up @@ -73,5 +73,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
run: |
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.3-dev
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "[4.x] Translation Update" | grep -v "No pull" || \
gh pr create --title "[4.x] Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.4-dev
77 changes: 77 additions & 0 deletions .github/workflows/create-translation-pull-request-v5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Create translation pull request

on:
push:
branches: [ translation ]

workflow_dispatch:

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

permissions:
contents: read

jobs:
build:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
# Only run this action the translation-bot repository in the translation branch
if: ${{ github.repository == 'joomla-translation-bot/joomla-cms' && github.ref == 'refs/heads/translation5' }}

steps:
- uses: actions/checkout@v3
# We need the full depth to create / update the pull request against the main repo
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 20

- name: Fetch latest cms changes
run: |
git config user.name Translation Bot
git config user.email release+translation-bot@joomla.org
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.0-dev
- name: Fetch and extract translations
run: |
cd ..
wget -nv "https://github.com/joomla/core-translations/archive/refs/heads/main.zip"
unzip main.zip
- name: Syncing directories
# 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}
- name: Update static error pages
run: |
npm ci --ignore-scripts && node build/build.js --build-pages
- name: Create commit
continue-on-error: true
run: |
git config user.name Translation Bot
git config user.email release+translation-bot@joomla.org
git add .
git commit -m "Language update"
git push --force
- name: Create pull request
if: ${{ success() }}
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
run: |
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 5.0-dev
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `#__fields_values` MODIFY `value` MEDIUMTEXT;
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,6 @@ public function display($tpl = null)
throw new GenericDataException(implode("\n", $errors), 500);
}

// Preprocess the list of items to find ordering divisions.
// @todo: Complete the ordering stuff with nested sets
foreach ($this->items as &$item) {
$item->order_up = true;
$item->order_dn = true;
}

// We don't need toolbar in the modal window.
if ($this->getLayout() !== 'modal') {
$this->addToolbar();
Expand Down
29 changes: 10 additions & 19 deletions administrator/components/com_cpanel/tmpl/cpanel/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
defined('_JEXEC') or die;

use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\Registry\Registry;
Expand All @@ -28,26 +27,16 @@
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_cpanel.admin-cpanel')
->useScript('com_cpanel.admin-addmodule');
->useScript('joomla.dialog-autocreate');

$user = $this->getCurrentUser();

// Set up the bootstrap modal that will be used for all module editors
echo HTMLHelper::_(
'bootstrap.renderModal',
'moduleDashboardAddModal',
[
'title' => Text::_('COM_CPANEL_ADD_MODULE_MODAL_TITLE'),
'backdrop' => 'static',
'url' => Route::_('index.php?option=com_cpanel&task=addModule&function=jSelectModuleType&position=' . $this->escape($this->position)),
'bodyHeight' => '70',
'modalWidth' => '80',
'footer' => '<button type="button" class="button-cancel btn btn-danger" data-bs-dismiss="modal" data-bs-target="#closeBtn">'
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</button>'
. '<button type="button" id="btnModalSaveAndClose" class="button-save btn btn-success hidden" data-bs-target="#saveBtn">'
. Text::_('JSAVE') . '</button>',
]
);
// Set up the modal options that will be used for module editor
$popupOptions = [
'popupType' => 'iframe',
'src' => Route::_('index.php?option=com_cpanel&task=addModule&position=' . $this->position, false),
'textHeader' => Text::_('COM_CPANEL_ADD_MODULE_MODAL_TITLE'),
];
?>
<div id="cpanel-modules">
<div class="cpanel-modules <?php echo $this->position; ?>">
Expand All @@ -69,7 +58,9 @@
<?php if ($user->authorise('core.create', 'com_modules')) : ?>
<div class="module-wrapper">
<div class="card">
<button type="button" data-bs-toggle="modal" data-bs-target="#moduleDashboardAddModal" class="cpanel-add-module">
<button type="button" class="cpanel-add-module"
data-joomla-dialog="<?php echo htmlspecialchars(json_encode($popupOptions, JSON_UNESCAPED_SLASHES)) ?>"
data-close-on-message data-reload-on-close>
<div class="cpanel-add-module-icon">
<span class="icon-plus-square" aria-hidden="true"></span>
</div>
Expand Down
10 changes: 5 additions & 5 deletions administrator/components/com_fields/src/Helper/FieldsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ public static function extract($contextString, $item = null)
* The values of the fields can be overridden by an associative array where the keys
* have to be a name and its corresponding value.
*
* @param string $context The context of the content passed to the helper
* @param null $item The item being edited in the form
* @param int|bool $prepareValue (if int is display event): 1 - AfterTitle, 2 - BeforeDisplay, 3 - AfterDisplay, 0 - OFF
* @param array|null $valuesToOverride The values to override
* @param bool $includeSubformFields Should I include fields marked as Only Use In Subform?
* @param string $context The context of the content passed to the helper
* @param object|array|null $item The item being edited in the form
* @param int|bool $prepareValue (if int is display event): 1 - AfterTitle, 2 - BeforeDisplay, 3 - AfterDisplay, 0 - OFF
* @param array|null $valuesToOverride The values to override
* @param bool $includeSubformFields Should I include fields marked as Only Use In Subform?
*
* @return array
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Installer\Administrator\View\Installer\HtmlView as InstallerViewDefault;

// phpcs:disable PSR1.Files.SideEffects
Expand Down Expand Up @@ -75,15 +74,19 @@ public function display($tpl = null)
*/
protected function addToolbar()
{
$canDo = ContentHelper::getActions('com_installer');
$canDo = ContentHelper::getActions('com_languages');
$toolbar = Toolbar::getInstance();

ToolbarHelper::title(Text::_('COM_INSTALLER_HEADER_' . $this->getName()), 'puzzle-piece install');
if ($canDo->get('core.manage')) {
$toolbar->linkButton('list', 'COM_INSTALLER_TOOLBAR_MANAGE_LANGUAGES')
->url('index.php?option=com_languages&view=installed');
$toolbar->linkButton('comments', 'COM_INSTALLER_TOOLBAR_MANAGE_LANGUAGES_CONTENT')
->url('index.php?option=com_languages&view=languages');
$toolbar->divider();
}

if ($canDo->get('core.admin')) {
parent::addToolbar();
parent::addToolbar();

$toolbar->help('Extensions:_Languages');
}
$toolbar->help('Extensions:_Languages');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('table.columns')
->useScript('multiselect');
->useScript('multiselect')
->useScript('webcomponent.core-loader');

$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
Expand Down Expand Up @@ -72,7 +73,7 @@
<td>
<?php $buttonText = (isset($this->installedLang[0][$language->code]) || isset($this->installedLang[1][$language->code])) ? 'REINSTALL' : 'INSTALL'; ?>
<?php $buttonClass = (isset($this->installedLang[0][$language->code]) || isset($this->installedLang[1][$language->code])) ? 'btn btn-success btn-sm' : 'btn btn-primary btn-sm'; ?>
<?php $onclick = 'document.getElementById(\'install_url\').value = \'' . $language->detailsurl . '\'; Joomla.submitbutton(\'install.install\');'; ?>
<?php $onclick = 'document.getElementById(\'install_url\').value = \'' . $language->detailsurl . '\'; Joomla.submitbutton(\'install.install\'); document.body.appendChild(document.createElement(\'joomla-core-loader\'));'; ?>
<input type="button"
class="<?php echo $buttonClass; ?>"
value="<?php echo Text::_('COM_INSTALLER_' . $buttonText . '_BUTTON'); ?>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,26 +239,26 @@ public function display($tpl = null)
$this->updateSourceKey = Text::_('COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_NEXT');
break;

// "Testing"
// "Testing"
case 'testing':
$this->langKey = 'COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_TESTING';
$this->updateSourceKey = Text::_('COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_TESTING');
break;

// "Custom"
// "Custom"
case 'custom':
$this->langKey = 'COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_CUSTOM';
$this->updateSourceKey = Text::_('COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_CUSTOM');
break;

/**
* "Minor & Patch Release for Current version (recommended and default)".
* The commented "case" below are for documenting where 'default' and legacy options falls
* case 'default':
* case 'sts':
* case 'lts':
* case 'nochange':
*/
/**
* "Minor & Patch Release for Current version (recommended and default)".
* The commented "case" below are for documenting where 'default' and legacy options falls
* case 'default':
* case 'sts':
* case 'lts':
* case 'nochange':
*/
default:
$this->langKey = 'COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_DEFAULT';
$this->updateSourceKey = Text::_('COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_DEFAULT');
Expand Down

0 comments on commit 52e2fcb

Please sign in to comment.