Skip to content

Commit c6b9465

Browse files
authored
Merge branch '4.1-dev' into feature-module-workflow
2 parents c921041 + a4854f3 commit c6b9465

File tree

140 files changed

+8837
-748
lines changed

Some content is hidden

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

140 files changed

+8837
-748
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Create translation pull request
2+
3+
on:
4+
push:
5+
branches: [ translation ]
6+
7+
workflow_dispatch:
8+
9+
schedule:
10+
# Run daily at 7:26
11+
- cron: '26 7 * * *'
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
# Only run this action the translation-bot repository in the translation branch
17+
if: ${{ github.repository == 'joomla-translation-bot/joomla-cms' && github.ref == 'refs/heads/translation' }}
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
# We need the full depth to create / update the pull request against the main repo
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Fetch latest cms changes
26+
run: |
27+
git config user.name Translation Bot
28+
git config user.email [email protected]
29+
git remote add upstream https://github.com/joomla/joomla-cms.git
30+
git fetch upstream
31+
git checkout --progress --force -B translation refs/remotes/origin/translation
32+
git rebase upstream/4.0-dev
33+
34+
- name: Fetch and extract translations
35+
run: |
36+
cd ..
37+
wget -nv "https://github.com/joomla/core-translations/archive/refs/heads/main.zip"
38+
unzip main.zip
39+
40+
- name: Syncing directories
41+
# We use a simple copy paste syntax here if needed customization for different directories
42+
run: |
43+
cd ..
44+
SYNC_VERION="v4"
45+
46+
SYNC_PATH="installation/language/"
47+
echo ${SYNC_PATH}
48+
rsync -i -rptgo --checksum --ignore-times --delete --exclude="*en-GB*" core-translations-main/joomla_${SYNC_VERION}/translations/core/${SYNC_PATH} joomla-cms/${SYNC_PATH}
49+
50+
- name: Create commit
51+
run: |
52+
git config user.name Translation Bot
53+
git config user.email [email protected]
54+
git add .
55+
git commit -m "Language update"
56+
git push --force
57+
58+
- name: Create pull request
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
61+
run: |
62+
gh pr list -R joomla/joomla-cms --state open --author joomla-translation-bot -S "Translation Update" | grep -v "No pull" || \
63+
gh pr create --title "Translation Update" --body "Automatically created pull request based on core-translation repository changes" -R joomla/joomla-cms --base 4.0-dev

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
/administrator/logs
1515
/cache
1616
/installation/cache
17-
/installation/sessions
1817
/tmp
1918
/configuration.php
2019
/.htaccess

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Do you want to improve Joomla?
7070
* Get Involved: Joomla! is community developed software. [Join the community](https://volunteers.joomla.org).
7171
* Documentation for [Developers](https://docs.joomla.org/Special:MyLanguage/Portal:Developers).
7272
* Documentation for [Web designers](https://docs.joomla.org/Special:MyLanguage/Web_designers).
73+
* Provide a translation for Joomla: [Joomla Crowdin Project](https://joomla.crowdin.com/cms)
7374

7475
Copyright
7576
---------------------

administrator/components/com_admin/script.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,12 @@ protected function updateManifestCaches()
567567
{
568568
$extensions = ExtensionHelper::getCoreExtensions();
569569

570+
// If we have the search package around, it may not have a manifest cache entry after upgrades from 3.x, so add it to the list
571+
if (File::exists(JPATH_ROOT . '/administrator/manifests/packages/pkg_search.xml'))
572+
{
573+
$extensions[] = array('package', 'pkg_search', '', 0);
574+
}
575+
570576
// Attempt to refresh manifest caches
571577
$db = Factory::getDbo();
572578
$query = $db->getQuery(true)
@@ -6064,6 +6070,24 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
60646070
'/templates/cassiopeia/css/vendor/fontawesome-free/fontawesome.min.css',
60656071
'/templates/cassiopeia/css/vendor/fontawesome-free/fontawesome.min.css.gz',
60666072
'/templates/cassiopeia/scss/vendor/fontawesome-free/fontawesome.scss',
6073+
// 4.0 from RC 6 to 4.0.0 (stable)
6074+
'/libraries/vendor/algo26-matthias/idna-convert/tests/integration/ToIdnTest.php',
6075+
'/libraries/vendor/algo26-matthias/idna-convert/tests/integration/ToUnicodeTest.php',
6076+
'/libraries/vendor/algo26-matthias/idna-convert/tests/unit/.gitkeep',
6077+
'/libraries/vendor/algo26-matthias/idna-convert/tests/unit/namePrepTest.php',
6078+
'/libraries/vendor/doctrine/inflector/docs/en/index.rst',
6079+
'/libraries/vendor/jakeasmith/http_build_url/tests/HttpBuildUrlTest.php',
6080+
'/libraries/vendor/jakeasmith/http_build_url/tests/bootstrap.php',
6081+
'/libraries/vendor/willdurand/negotiation/tests/Negotiation/Tests/AcceptLanguageTest.php',
6082+
'/libraries/vendor/willdurand/negotiation/tests/Negotiation/Tests/AcceptTest.php',
6083+
'/libraries/vendor/willdurand/negotiation/tests/Negotiation/Tests/BaseAcceptTest.php',
6084+
'/libraries/vendor/willdurand/negotiation/tests/Negotiation/Tests/CharsetNegotiatorTest.php',
6085+
'/libraries/vendor/willdurand/negotiation/tests/Negotiation/Tests/EncodingNegotiatorTest.php',
6086+
'/libraries/vendor/willdurand/negotiation/tests/Negotiation/Tests/LanguageNegotiatorTest.php',
6087+
'/libraries/vendor/willdurand/negotiation/tests/Negotiation/Tests/MatchTest.php',
6088+
'/libraries/vendor/willdurand/negotiation/tests/Negotiation/Tests/NegotiatorTest.php',
6089+
'/libraries/vendor/willdurand/negotiation/tests/Negotiation/Tests/TestCase.php',
6090+
'/libraries/vendor/willdurand/negotiation/tests/bootstrap.php',
60676091
);
60686092

60696093
$folders = array(
@@ -7311,6 +7335,16 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
73117335
'/media/templates/cassiopeia/js/mod_menu',
73127336
'/media/templates/cassiopeia/js',
73137337
'/media/templates/cassiopeia',
7338+
// 4.0 from RC 6 to 4.0.0 (stable)
7339+
'/libraries/vendor/willdurand/negotiation/tests/Negotiation/Tests',
7340+
'/libraries/vendor/willdurand/negotiation/tests/Negotiation',
7341+
'/libraries/vendor/willdurand/negotiation/tests',
7342+
'/libraries/vendor/jakeasmith/http_build_url/tests',
7343+
'/libraries/vendor/doctrine/inflector/docs/en',
7344+
'/libraries/vendor/doctrine/inflector/docs',
7345+
'/libraries/vendor/algo26-matthias/idna-convert/tests/unit',
7346+
'/libraries/vendor/algo26-matthias/idna-convert/tests/integration',
7347+
'/libraries/vendor/algo26-matthias/idna-convert/tests',
73147348
);
73157349

73167350
$status['files_checked'] = $files;
@@ -7358,6 +7392,18 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
73587392

73597393
$this->fixFilenameCasing();
73607394

7395+
/*
7396+
* Needed for updates from 3.10
7397+
* If com_search doesn't exist then assume we can delete the search package manifest (included in the update packages)
7398+
* We deliberately check for the presence of the files in case people have previously uninstalled their search extension
7399+
* but an update has put the files back. In that case it exists even if they don't believe in it!
7400+
*/
7401+
if (!File::exists(JPATH_ROOT . '/administrator/components/com_search/search.php')
7402+
&& File::exists(JPATH_ROOT . '/administrator/manifests/packages/pkg_search.xml'))
7403+
{
7404+
File::delete(JPATH_ROOT . '/administrator/manifests/packages/pkg_search.xml');
7405+
}
7406+
73617407
if ($suppressOutput === false && \count($status['folders_errors']))
73627408
{
73637409
echo implode('<br>', $status['folders_errors']);
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
--
2+
-- Fix wrong asset name for com_content basic workflow stage if a new asset with the right
3+
-- name hasn't been created yet when saving the workflow stage in backend in past.
4+
--
5+
UPDATE `#__assets`
6+
SET `name` = 'com_content.stage.1'
7+
WHERE `name` = 'com_content.state.1'
8+
AND (SELECT c.`count` FROM (SELECT COUNT(b.`id`) AS `count` FROM `#__assets` b WHERE b.`name` = 'com_content.stage.1') AS c) = 0;
9+
10+
--
11+
-- Fix wrong asset titles for workflow transitions
12+
--
13+
UPDATE `#__assets` SET `title` = 'Unpublish' WHERE `name` = 'com_content.transition.1' AND `title` = 'Publish';
14+
UPDATE `#__assets` SET `title` = 'Publish' WHERE `name` = 'com_content.transition.2' AND `title` = 'Unpublish';
15+
UPDATE `#__assets` SET `title` = 'Trash' WHERE `name` = 'com_content.transition.3' AND `title` = 'Archive';
16+
UPDATE `#__assets` SET `title` = 'Archive' WHERE `name` = 'com_content.transition.4' AND `title` = 'Trash';
17+
18+
--
19+
-- Set asset ID of com_content basic workflow stage to the right value if not already set.
20+
-- The right value is either the asset fixed with the first update statement at the top
21+
-- of this file or a new asset which has been created yet when saving the workflow stage
22+
-- in backend in past.
23+
--
24+
UPDATE `#__workflow_stages` s
25+
INNER JOIN (SELECT `name`, MAX(`id`) AS `id` FROM `#__assets` GROUP BY `name`) AS a ON a.`name` = CONCAT('com_content.stage.', s.`id`)
26+
SET s.`asset_id` = a.`id`
27+
WHERE s.`id` = 1
28+
AND s.`asset_id` = 0;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
INSERT INTO `#__extensions` (`name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `custom_data`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
2+
('search', 'package', 'pkg_search', '', 0, 1, 1, 0, '', '', '', 0, NULL, 0, 0);
3+
4+
UPDATE `#__extensions` a
5+
CROSS JOIN (SELECT `extension_id` FROM `#__extensions` WHERE `type`='package' AND `element`='pkg_search') AS b
6+
SET a.`package_id` = b.`extension_id`
7+
WHERE (`type` = 'component' AND `element` = 'com_search')
8+
OR (`type` = 'module' AND `element` = 'mod_search' AND `client_id` = 0)
9+
OR (`type` = 'plugin' AND `element` IN ('categories', 'contacts', 'content', 'newsfeeds', 'tags') AND `folder` = 'search');
10+
11+
INSERT INTO `#__update_sites` (`name`, `type`, `location`, `enabled`) VALUES
12+
('Search Update Site', 'extension', 'https://raw.githubusercontent.com/joomla-extensions/search/main/manifest.xml', 1);
13+
14+
INSERT INTO `#__update_sites_extensions` (`update_site_id`, `extension_id`) VALUES
15+
((SELECT `update_site_id` FROM `#__update_sites` WHERE `name` = 'Search Update Site'), (SELECT `extension_id` FROM `#__extensions` WHERE `element` = 'pkg_search' AND `type` = 'package'));
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--
2+
-- Fix wrong asset name for com_content basic workflow stage if a new asset with the right
3+
-- name hasn't been created yet when saving the workflow stage in backend in past.
4+
--
5+
UPDATE "#__assets"
6+
SET "name" = 'com_content.stage.1'
7+
WHERE "name" = 'com_content.state.1'
8+
AND (SELECT c."count" FROM (SELECT COUNT(b."id") AS "count" FROM "#__assets" b WHERE b."name" = 'com_content.stage.1') AS c) = 0;
9+
10+
--
11+
-- Fix wrong asset titles for workflow transitions
12+
--
13+
UPDATE "#__assets" SET "title" = 'Unpublish' WHERE "name" = 'com_content.transition.1' AND "title" = 'Publish';
14+
UPDATE "#__assets" SET "title" = 'Publish' WHERE "name" = 'com_content.transition.2' AND "title" = 'Unpublish';
15+
UPDATE "#__assets" SET "title" = 'Trash' WHERE "name" = 'com_content.transition.3' AND "title" = 'Archive';
16+
UPDATE "#__assets" SET "title" = 'Archive' WHERE "name" = 'com_content.transition.4' AND "title" = 'Trash';
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
INSERT INTO "#__extensions" ("name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "checked_out", "checked_out_time", "ordering", "state") VALUES
2+
('search', 'package', 'pkg_search', '', 0, 1, 1, 0, '', '', '', 0, NULL, 0, 0);
3+
4+
UPDATE "#__extensions"
5+
SET "package_id" = b."extension_id"
6+
FROM (SELECT "extension_id" FROM "#__extensions" WHERE "type"='package' AND "element"='pkg_search') AS b
7+
WHERE ("type" = 'component' AND "element" = 'com_search')
8+
OR ("type" = 'module' AND "element" = 'mod_search' AND "client_id" = 0)
9+
OR ("type" = 'plugin' AND "element" IN ('categories', 'contacts', 'content', 'newsfeeds', 'tags') AND "folder" = 'search');
10+
11+
INSERT INTO "#__update_sites" ("name", "type", "location", "enabled") VALUES
12+
('Search Update Site', 'extension', 'https://raw.githubusercontent.com/joomla-extensions/search/main/manifest.xml', 1);
13+
14+
INSERT INTO "#__update_sites_extensions" ("update_site_id", "extension_id") VALUES
15+
((SELECT "update_site_id" FROM "#__update_sites" WHERE "name" = 'Search Update Site'), (SELECT "extension_id" FROM "#__extensions" WHERE "element" = 'pkg_search' AND "type" = 'package'));

administrator/components/com_admin/src/Model/SysinfoModel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ public function getDirectory(bool $public = false): array
535535
$cparams = ComponentHelper::getParams('com_media');
536536

537537
$this->addDirectory('administrator/components', JPATH_ADMINISTRATOR . '/components');
538+
$this->addDirectory('administrator/components/com_joomlaupdate', JPATH_ADMINISTRATOR . '/components/com_joomlaupdate');
538539
$this->addDirectory('administrator/language', JPATH_ADMINISTRATOR . '/language');
539540

540541
// List all admin languages

administrator/components/com_categories/src/View/Categories/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ protected function addToolbar()
179179
$title = Text::_($component_title_key);
180180
}
181181
elseif ($lang->hasKey($component_section_key = strtoupper($component . ($section ? "_$section" : ''))))
182-
// Else if the component section string exits, let's use it
182+
// Else if the component section string exists, let's use it.
183183
{
184184
$title = Text::sprintf('COM_CATEGORIES_CATEGORIES_TITLE', $this->escape(Text::_($component_section_key)));
185185
}

0 commit comments

Comments
 (0)