Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
297
Merge Requests
297
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
56bc655f
Commit
56bc655f
authored
Apr 24, 2019
by
Gábor Hojtsy
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#3050180
by alexpott, shaal, smaz: Cannot install Umami in Spanish
parent
8847936f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
0 deletions
+75
-0
core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php
...mo_umami/modules/demo_umami_content/src/InstallHelper.php
+3
-0
core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php
...ami/tests/src/Functional/UmamiMultilingualInstallTest.php
+72
-0
No files found.
core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php
View file @
56bc655f
...
...
@@ -524,6 +524,7 @@ protected function processBannerBlock(array $data, $langcode) {
'uuid'
=>
$data
[
'uuid'
],
'info'
=>
$data
[
'info'
],
'type'
=>
$data
[
'type'
],
'langcode'
=>
'en'
,
'field_title'
=>
[
'value'
=>
$data
[
'field_title'
],
],
...
...
@@ -556,6 +557,7 @@ protected function processDisclaimerBlock(array $data) {
'uuid'
=>
$data
[
'uuid'
],
'info'
=>
$data
[
'info'
],
'type'
=>
$data
[
'type'
],
'langcode'
=>
'en'
,
'field_disclaimer'
=>
[
'value'
=>
$data
[
'field_disclaimer'
],
'format'
=>
'basic_html'
,
...
...
@@ -585,6 +587,7 @@ protected function processFooterPromoBlock(array $data, $langcode) {
'uuid'
=>
$data
[
'uuid'
],
'info'
=>
$data
[
'info'
],
'type'
=>
$data
[
'type'
],
'langcode'
=>
'en'
,
'field_title'
=>
[
'value'
=>
$data
[
'field_title'
],
],
...
...
core/profiles/demo_umami/tests/src/Functional/UmamiMultilingualInstallTest.php
0 → 100644
View file @
56bc655f
<?php
namespace
Drupal\Tests\demo_umami\Functional
;
use
Drupal\FunctionalTests\Installer\InstallerTestBase
;
/**
* Tests the multilingual installer installing the Umami profile.
*
* @group Installer
*/
class
UmamiMultilingualInstallTest
extends
InstallerTestBase
{
/**
* {@inheritdoc}
*/
protected
$profile
=
'demo_umami'
;
/**
* {@inheritdoc}
*/
protected
$langcode
=
'es'
;
/**
* Ensures that Umami can be installed with Spanish as the default language.
*/
public
function
testUmami
()
{
$this
->
drupalGet
(
''
);
$this
->
assertSession
()
->
pageTextContains
(
'Quiche mediterráneo profundo'
);
}
/**
* {@inheritdoc}
*/
protected
function
setUpLanguage
()
{
// Place custom local translations in the translations directory to avoid
// getting translations from localize.drupal.org.
mkdir
(
DRUPAL_ROOT
.
'/'
.
$this
->
siteDirectory
.
'/files/translations'
,
0777
,
TRUE
);
file_put_contents
(
DRUPAL_ROOT
.
'/'
.
$this
->
siteDirectory
.
'/files/translations/drupal-8.0.0.es.po'
,
$this
->
getPo
(
'es'
));
parent
::
setUpLanguage
();
}
/**
* Returns the string for the test .po file.
*
* @param string $langcode
* The language code.
* @return string
* Contents for the test .po file.
*/
protected
function
getPo
(
$langcode
)
{
return
<<<ENDPO
msgid ""
msgstr ""
msgid "Save and continue"
msgstr "Save and continue $langcode"
msgid "Anonymous"
msgstr "Anonymous $langcode"
msgid "Language"
msgstr "Language $langcode"
#: Testing site name configuration during the installer.
msgid "Drupal"
msgstr "Drupal"
ENDPO;
}
}
Gábor Hojtsy
@goba
mentioned in commit
09c12787
·
Apr 24, 2019
mentioned in commit
09c12787
mentioned in commit 09c12787976dbbc9ec6054dfb2b84ae56d1cf0e8
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment