Skip to content

[4.0] Adapt pages build script to language file changes#27180

Merged
wilsonge merged 2 commits intojoomla:4.0-devfrom
SharkyKZ:j4/build/pages
Nov 30, 2019
Merged

[4.0] Adapt pages build script to language file changes#27180
wilsonge merged 2 commits intojoomla:4.0-devfrom
SharkyKZ:j4/build/pages

Conversation

@SharkyKZ
Copy link
Contributor

@SharkyKZ SharkyKZ commented Nov 29, 2019

Summary of Changes

Corrects language detection.

Testing Instructions

Run node build.js --build-pages or npm install/npm ci etc.
Check that no changes are made to files in Git.

Expected result

No changes.

Actual result

templates/system/incompatible.html and templates/system/build_incomplete.html are modified with erroneous language code:

@@ -4,11 +4,11 @@
   <meta http-equiv="Content-Language" content="en-GB">
   <meta name="robots" content="noindex, nofollow">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>Joomla: unsupported PHP version</title><!-- Sets the page title, IMPORTANT DO NOT REMOVE -->
   <style>body{margin:0;padding:0;font:14px / 18px sans-serif;color:#555;background-color:transparent}html{background:#f1f1f1;background:-moz-radial-gradient(center,ellipse cover,rgba(241,241,241,1) 0,rgba(58,146,200,1) 100%);background:-webkit-radial-gradient(center,ellipse cover,rgba(241,241,241,1) 0,rgba(58,146,200,1) 100%);background:radial-gradient(ellipse at center,rgba(241,241,241,1) 0,rgba(58,146,200,1) 100%);background-repeat:no-repeat;background-attachment:fixed}ol,ul{padding:0;margin:0;list-style:none}a{color:#0084b4;text-decoration:none;outline:0}a:hover,a:focus{text-decoration:underline}p a{line-height:inherit}.container{display:flex;flex-direction:column;justify-content:center;align-items:center;position:relative;margin:0 auto;width:100%;height:100vh;overflow:hidden}.alert-main{display:block;position:relative;background:#fff;border:1px solid rgba(0,0,0,0.1);border-radius:5px;padding:20px 60px;margin:0 20px;box-shadow:0 0 10px rgba(0,0,0,0.05)}svg{position:absolute;bottom:-120px;right:-70px;width:400px;transform:rotate(10deg);z-index:-1}h1,p{position:relative;z-index:10;text-align:center;text-rendering:optimizeLegibility}h1{margin:18px 0 0;font-size:40px;font-weight:200;line-height:1;text-shadow:0 1px 2px rgba(0,0,0,.2)}p,label{margin:10px 0 20px;font-size:18px;font-weight:300;line-height:25px;color:#777}p a{font-weight:bold;color:#1c3d5c}.link-help{padding:.4rem .85rem;font-size:1rem;font-weight:normal;border-radius:.25rem;text-decoration:none;background-color:#f5f5f5;border:1px solid rgba(0,0,0,0.1)}.link-help:hover{background-color:#eee;text-decoration:none}.footer{margin:8px 20px;text-align:left;font-size:11px}.footer ul{margin-bottom:5px}.footer li{display:inline;margin:0 5px;line-height:20px}.footer li,.footer a{color:#1c3d5c}.footer a:hover{color:#59b0ff}.links{display:block;text-align:center;margin-top:4rem;margin-left:auto;margin-right:auto;font-size:1rem}.links li{display:inline-block;margin-top:20px}@media screen and (max-width:480px){.container{height:auto;padding-top:20px;padding-bottom:20px}h1{font-size:30px}.link-help{white-space:nowrap}}</style><!-- Sets the page styling, IMPORTANT DO NOT REMOVE -->
-  <script>window.errorLocale = {"en-GB":{"language":"English GB","header":"Sorry, your PHP version is not supported","text1":"Your host needs to use PHP version {{phpversion}} or newer to run this version of Joomla","help-url-text":"Help me resolve this"},"en-US":{"language":"English US","header":"Sorry, your PHP version is not supported","text1":"Your host needs to use PHP version {{phpversion}} or newer to run this version of Joomla","help-url-text":"Help me resolve this"},}</script><!-- Sets the content of the translated text, IMPORTANT DO NOT REMOVE -->
+  <script>window.errorLocale = {"joomla":{"language":"English GB","header":"Sorry, your PHP version is not supported","text1":"Your host needs to use PHP version {{phpversion}} or newer to run this version of Joomla","help-url-text":"Help me resolve this"},"joomla":{"language":"English US","header":"Sorry, your PHP version is not supported","text1":"Your host needs to use PHP version {{phpversion}} or newer to run this version of Joomla","help-url-text":"Help me resolve this"},}</script><!-- Sets the content of the translated text, IMPORTANT DO NOT REMOVE -->
 </head>
 <body ><!-- Sets the minimum PHP version, IMPORTANT DO NOT REMOVE -->
 <div class="container">
   <div class="container-main">
     <div class="alert-main">

Documentation Changes Required

No.

@brianteeman
Copy link
Contributor

Can't find it now but I am sure it was raised before (perhaps by me)

@richard67
Copy link
Member

I have tested this item ✅ successfully on fe28a13


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27180.

@richard67
Copy link
Member

Here a diff of one of the 2 html files without the patch of this PR, left hand side clean 4.0-dev after checkout (= correct), right hand side same file after a run of npm install:

pr-27180_1

The same but with having applied the patch before running npm shows no differences, and the correct language codes ("en-GB", "en-US") are used.

@richard67
Copy link
Member

Above screenshot just as help for other testers. PR is fine.

@SharkyKZ
Copy link
Contributor Author

@brianteeman I don't think so. This PR fixes an issue introduced a few days ago with #27130.

There's #23258 raised by you but it's a different issue. It appears fixed for now but will reintroduce itself once more installation languages are added.

@Quy
Copy link
Contributor

Quy commented Nov 29, 2019

I have tested this item ✅ successfully on fe28a13


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27180.

@Quy
Copy link
Contributor

Quy commented Nov 29, 2019

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27180.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Nov 29, 2019
@brianteeman
Copy link
Contributor

@SharkyKZ thanks for checking

@Quy Quy added the PR-4.0-dev label Nov 30, 2019
@dgrammatiko
Copy link
Contributor

image

AFAIK there is no known language Joomla!!
That should be either en-GB or en-US as these are the only languages in the J4 branch so far!

In other words there's more than the filenames here that needs to be patched

@brianteeman
Copy link
Contributor

AFAIK there is no known language Joomla!!
There should be :)

@SharkyKZ
Copy link
Contributor Author

@dgrammatiko Image on the right is before patch. That's what this PR fixes.

@dgrammatiko
Copy link
Contributor

@SharkyKZ oooops, my bad! Ignore the noise

@wilsonge wilsonge merged commit df430a6 into joomla:4.0-dev Nov 30, 2019
@wilsonge
Copy link
Contributor

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Nov 30, 2019
@wilsonge wilsonge added this to the Joomla 4.0 milestone Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants