diff --git a/core/modules/locale/locale.api.php b/core/modules/locale/locale.api.php index 4683a18..9aabb0e 100644 --- a/core/modules/locale/locale.api.php +++ b/core/modules/locale/locale.api.php @@ -6,47 +6,9 @@ */ /** - * @addtogroup hooks + * @defgroup interface_translation_properties Interface translation properties * @{ - */ - -/** - * Alter the list of projects to be updated by locale's interface translation. - * - * Locale module attempts to update the translation of those modules returned - * by update_get_projects(). Using this hook the data returned by - * update_get_projects() can be altered or extended. - * - * Modules or distributions that use a dedicated translation server should use - * this hook to specify the translation sever parameters. These parameters are: - * - "interface translation server pattern": URL of the .po translation files - * used to download the files from. The URL contains tokens which will be - * replaced by appropriate values. - * The following tokens are available for the server pattern: - * - "%core": Core version. Value example: "8.x". - * - "%project": Project name. Value examples: "drupal", "media_gallery". - * - "%version": Project version release. Value examples: "8.1", "8.x-1.0". - * - "%language": Language code. Value examples: "fr", "pt-pt". - * - * @param array $projects - * Project data as returned by update_get_projects(). * - * @see locale_project_list(). - */ -function hook_locale_translation_projects_alter(&$projects) { - // The translations are located at a custom translation sever. - $projects['existing_project'] = array( - 'info' => array( - 'interface translation server pattern' => 'http://example.com/files/translations/%core/%project/%project-%version.%language.po', - ), - ); -} - -/** - * @} End of "addtogroup hooks". - */ - -/** * .info file properties for interface translation settings. * * Modules hosted on drupal.org, a project definition is automatically added to @@ -103,4 +65,47 @@ function hook_locale_translation_projects_alter(&$projects) { * - "%project": Project name. Value examples: "drupal", "media_gallery". * - "%version": Project version release. Value examples: "8.1", "8.x-1.0". * - "%language": Language code. Value examples: "fr", "pt-pt". + * + * @} End of "defgroup interface_translation_properties". + */ + +/** + * @addtogroup hooks + * @{ + */ + +/** + * Alter the list of projects to be updated by locale's interface translation. + * + * Locale module attempts to update the translation of those modules returned + * by update_get_projects(). Using this hook the data returned by + * update_get_projects() can be altered or extended. + * + * Modules or distributions that use a dedicated translation server should use + * this hook to specify the interface translation server pattern. + * - "interface translation server pattern": URL of the .po translation files + * used to download the files from. The URL contains tokens which will be + * replaced by appropriate values. + * The following tokens are available for the server pattern: + * - "%core": Core version. Value example: "8.x". + * - "%project": Project name. Value examples: "drupal", "media_gallery". + * - "%version": Project version release. Value examples: "8.1", "8.x-1.0". + * - "%language": Language code. Value examples: "fr", "pt-pt". + * + * @param array $projects + * Project data as returned by update_get_projects(). + * + * @see locale_project_list(). + */ +function hook_locale_translation_projects_alter(&$projects) { + // The translations are located at a custom translation sever. + $projects['existing_project'] = array( + 'info' => array( + 'interface translation server pattern' => 'http://example.com/files/translations/%core/%project/%project-%version.%language.po', + ), + ); +} + +/** + * @} End of "addtogroup hooks". */