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
229
Merge Requests
229
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
7f7c379c
Commit
7f7c379c
authored
Dec 19, 2013
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2154709
by Gábor Hojtsy: 'No translatable fields' link points to misleading place.
parent
2c932093
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
core/modules/content_translation/content_translation.pages.inc
...modules/content_translation/content_translation.pages.inc
+3
-7
core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
...ules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
+1
-1
No files found.
core/modules/content_translation/content_translation.pages.inc
View file @
7f7c379c
...
...
@@ -23,7 +23,7 @@ function content_translation_overview(EntityInterface $entity) {
$languages
=
language_list
();
$original
=
$entity
->
getUntranslated
()
->
language
()
->
id
;
$translations
=
$entity
->
getTranslationLanguages
();
$
field_ui
=
\
Drupal
::
moduleHandler
()
->
moduleExists
(
'field_ui'
)
&&
user_access
(
'administer '
.
$entity
->
entityType
()
.
' field
s'
);
$
administrator
=
\
Drupal
::
currentUser
()
->
hasPermission
(
'administer language
s'
);
$rel
=
array
();
foreach
(
array
(
'canonical'
,
'edit-form'
,
'drupal:content-translation-overview'
)
as
$name
)
{
...
...
@@ -122,12 +122,8 @@ function content_translation_overview(EntityInterface $entity) {
$links
[
'add'
]
=
isset
(
$add_links
->
links
[
$langcode
][
'href'
])
?
$add_links
->
links
[
$langcode
]
:
array
(
'href'
=>
$add_path
,
'language'
=>
$language
);
$links
[
'add'
][
'title'
]
=
t
(
'Add'
);
}
elseif
(
$field_ui
)
{
$entity_path
=
$entity_manager
->
getAdminPath
(
$entity
->
entityType
(),
$entity
->
bundle
());
// Link directly to the fields tab to make it easier to find the
// setting to enable translation on fields.
$path
=
$entity_path
.
'/fields'
;
$links
[
'nofields'
]
=
array
(
'title'
=>
t
(
'No translatable fields'
),
'href'
=>
$path
,
'language'
=>
$language
);
elseif
(
$administrator
)
{
$links
[
'nofields'
]
=
array
(
'title'
=>
t
(
'No translatable fields'
),
'route_name'
=>
'language.content_settings_page'
,
'language'
=>
$language
);
}
}
...
...
core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php
View file @
7f7c379c
...
...
@@ -70,7 +70,7 @@ protected function getEditorPermissions() {
* {@inheritdoc}
*/
protected
function
getAdministratorPermissions
()
{
return
array_merge
(
parent
::
getAdministratorPermissions
(),
array
(
'access administration pages'
,
'administer content types'
,
'administer node fields'
,
'access content overview'
,
'bypass node access'
));
return
array_merge
(
parent
::
getAdministratorPermissions
(),
array
(
'access administration pages'
,
'administer content types'
,
'administer node fields'
,
'access content overview'
,
'bypass node access'
,
'administer languages'
));
}
/**
...
...
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