Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
55223337
Commit
55223337
authored
Nov 13, 2012
by
Nathaniel Catchpole
Browse files
Issue
#1834250
by plach: Hide Content Translation module until we are able to remove it.
parent
0617e701
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/modules/node/node.module
View file @
55223337
...
...
@@ -3870,3 +3870,19 @@ function node_library_info() {
return
$libraries
;
}
/**
* Implements hook_system_info_alter().
*
* The Content Translation module is deprecated in Drupal 8 in favor of the
* Entity Translation and is planned for removal. Until an upgrade path is
* available, it will still be possible to enable it, if necessary, through the
* module API or by tweaking the system module list configuration by hand.
* Morever every D8 site where Content Translation is installed (not necessarily
* enabled) will still be able to see it as usual in the module page.
*/
function
node_system_info_alter
(
&
$info
,
$file
,
$type
)
{
if
(
$type
==
'module'
&&
$file
->
name
==
'translation'
)
{
$info
[
'hidden'
]
=
!
module_exists
(
'translation'
)
&&
config
(
'system.module.disabled'
)
->
get
(
'translation'
)
===
NULL
;
}
}
core/modules/system/lib/Drupal/system/Tests/Module/DependencyTest.php
View file @
55223337
...
...
@@ -20,16 +20,16 @@ public static function getInfo() {
}
/**
* Attempts to enable translation module without
l
anguage enabled.
* Attempts to enable t
he Entity T
ranslation module without
L
anguage enabled.
*/
function
testEnableWithoutDependency
()
{
// Attempt to enable
content t
ranslation without
l
anguage enabled.
// Attempt to enable
Entity T
ranslation without
L
anguage enabled.
$edit
=
array
();
$edit
[
'modules[Core][translation][enable]'
]
=
'translation'
;
$edit
[
'modules[Core][translation
_entity
][enable]'
]
=
'translation
_entity
'
;
$this
->
drupalPost
(
'admin/modules'
,
$edit
,
t
(
'Save configuration'
));
$this
->
assertText
(
t
(
'Some required modules must be enabled'
),
'Dependency required.'
);
$this
->
assertModules
(
array
(
'translation
'
,
'locale
'
,
'language'
),
FALSE
);
$this
->
assertModules
(
array
(
'translation
_entity
'
,
'language'
),
FALSE
);
// Assert that the language tables weren't enabled.
$this
->
assertTableCount
(
'language'
,
FALSE
);
...
...
@@ -37,7 +37,7 @@ function testEnableWithoutDependency() {
$this
->
drupalPost
(
NULL
,
NULL
,
t
(
'Continue'
));
$this
->
assertText
(
t
(
'The configuration options have been saved.'
),
'Modules status has been updated.'
);
$this
->
assertModules
(
array
(
'translation'
,
'language'
),
TRUE
);
$this
->
assertModules
(
array
(
'translation
_entity
'
,
'language'
),
TRUE
);
// Assert that the language tables were enabled.
$this
->
assertTableCount
(
'language'
,
TRUE
);
...
...
core/modules/translation/translation.info
View file @
55223337
name
=
Content
Translation
description
=
Allows
content
to
be
translated
into
different
languages
.
dependencies
[]
=
node
dependencies
[]
=
language
package
=
Core
version
=
VERSION
core
=
8.
x
;
The
Content
Translation
module
is
deprecated
in
Drupal
8.
;
See
node_system_info_alter
().
hidden
=
TRUE
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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