diff --git a/jsonapi.api.php b/jsonapi.api.php index 433a2ef..1eab61c 100644 --- a/jsonapi.api.php +++ b/jsonapi.api.php @@ -44,7 +44,6 @@ use Drupal\Core\Access\AccessResult; * This eliminates the need for another abstraction layer in order implement * certain features of the specification. * - * * @section relationships Relationships * The specification defines semantics for the "relationships" between * resources. Since the JSON:API module defines every entity type + bundle as a @@ -121,6 +120,14 @@ use Drupal\Core\Access\AccessResult; * @see https://www.drupal.org/project/jsonapi/issues/3009588. * @see https://tools.ietf.org/html/rfc5829 * + * @section translations Resource translations + * + * Some multilingual features currently do not work well with JSON:API. See + * JSON:API modules's multilingual support documentation online for more + * information on the current status of multilingual support. + * + * @see https://www.drupal.org/docs/8/modules/jsonapi/translations + * * @section api API * The JSON:API module provides an HTTP API that adheres to the JSON:API * specification. diff --git a/jsonapi.install b/jsonapi.install new file mode 100644 index 0000000..7f09b77 --- /dev/null +++ b/jsonapi.install @@ -0,0 +1,34 @@ +moduleExists($module_name); + }, FALSE); + if ($should_warn) { + $requirements['multilingual_support'] = [ + 'title' => 'JSON:API multilingual support', + 'value' => t('JSON:API multilingual support'), + 'description' => t('Some multilingual features currently do not work well with JSON:API. See the JSON:API multilingual support documentation for more information on the current status of multilingual support.', [ + ':jsonapi-docs' => 'https://www.drupal.org/docs/8/modules/jsonapi/translations', + ]), + ]; + } + } + return $requirements; +} diff --git a/jsonapi.module b/jsonapi.module index d00a15a..3c73735 100644 --- a/jsonapi.module +++ b/jsonapi.module @@ -96,6 +96,9 @@ function jsonapi_help($route_name, RouteMatchInterface $route_match) { ':rest-docs' => 'https://www.drupal.org/docs/8/core/modules/rest', ':comparison' => 'https://www.drupal.org/docs/8/modules/jsonapi/jsonapi-vs-cores-rest-module', ]) . ''; + $output .= '
' . t('Some multilingual features currently do not work well with JSON:API. See the JSON:API multilingual support documentation for more information on the current status of multilingual support.', [ + ':jsonapi-docs' => 'https://www.drupal.org/docs/8/modules/jsonapi/translations', + ]) . '
'; $output .= ''; return $output;