diff --git a/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php b/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php index b044aa7..a3d2b32 100644 --- a/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php +++ b/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php @@ -7,20 +7,20 @@ namespace Drupal\locale\Controller; use Drupal\Core\Controller\ControllerInterface; - -use Drupal\Core\Routing\PathBasedGeneratorInterface; use Drupal\Core\Extension\ModuleHandlerInterface; -use Symfony\Component\DependencyInjection\ContainerInterface; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Drupal\locale\Form\TranslateFilterForm; -use Drupal\locale\Form\TranslateEditForm; use Drupal\Core\KeyValueStore\KeyValueStoreInterface; +use Drupal\Core\Routing\PathBasedGeneratorInterface; use Drupal\Core\StringTranslation\Translator\TranslatorInterface; +use Drupal\locale\Form\TranslateEditForm; +use Drupal\locale\Form\TranslateFilterForm; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\RedirectResponse; /** * Return response for manual check translations. */ class LocaleController implements ControllerInterface { + /** * The module handler. * @@ -36,17 +36,14 @@ class LocaleController implements ControllerInterface { protected $container; /** - - * - * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler - * The module handler. - */ - /** * Constructs a \Drupal\locale\Controller\LocaleController object. * * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler + * The module handler. * @param \Drupal\Core\Routing\PathBasedGeneratorInterface $url_generator + * The URL generator service. * @param \Symfony\Component\DependencyInjection\ContainerInterface $container + * The service container this object should use. */ public function __construct(ModuleHandlerInterface $module_handler, PathBasedGeneratorInterface $url_generator, ContainerInterface $container) { $this->moduleHandler = $module_handler; diff --git a/core/modules/locale/lib/Drupal/locale/Form/TranslateEditForm.php b/core/modules/locale/lib/Drupal/locale/Form/TranslateEditForm.php index 4f8b644..9ecd16e 100644 --- a/core/modules/locale/lib/Drupal/locale/Form/TranslateEditForm.php +++ b/core/modules/locale/lib/Drupal/locale/Form/TranslateEditForm.php @@ -7,14 +7,17 @@ namespace Drupal\locale\Form; -use Symfony\Component\HttpFoundation\Request; use Drupal\Core\Form\FormInterface; -use Drupal\locale\SourceString; -use Drupal\node\NodeInterface; use Drupal\Core\KeyValueStore\KeyValueStoreInterface; use Drupal\Core\StringTranslation\Translator\TranslatorInterface; +use Drupal\locale\SourceString; use Drupal\locale\StringDatabaseStorage; +use Drupal\node\NodeInterface; +use Symfony\Component\HttpFoundation\Request; +/** + * Defines a translation edit form. + */ class TranslateEditForm extends TranslateFormBase implements FormInterface { /** @@ -31,7 +34,6 @@ class TranslateEditForm extends TranslateFormBase implements FormInterface { */ protected $translator; - /** * The locale storage. * @@ -39,14 +41,15 @@ class TranslateEditForm extends TranslateFormBase implements FormInterface { */ protected $localStorage; - /** * Constructs a TranslateEditFrom object. - */ - /** + * * @param \Drupal\Core\KeyValueStore\KeyValueStoreInterface $state + * The state key/value store. * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator + * The translator service. * @param \Drupal\locale\StringDatabaseStorage $local_storage + * The local storage for translations. */ public function __construct(KeyValueStoreInterface $state, TranslatorInterface $translator, StringDatabaseStorage $local_storage) { $this->state = $state; @@ -271,4 +274,5 @@ public function submitForm(array &$form, array &$form_state, Request $request = _locale_refresh_configuration(array($langcode), $updated); } } + } diff --git a/core/modules/locale/lib/Drupal/locale/Form/TranslateFilterForm.php b/core/modules/locale/lib/Drupal/locale/Form/TranslateFilterForm.php index c055abb..e02819c 100644 --- a/core/modules/locale/lib/Drupal/locale/Form/TranslateFilterForm.php +++ b/core/modules/locale/lib/Drupal/locale/Form/TranslateFilterForm.php @@ -9,6 +9,9 @@ use Drupal\Core\Form\FormInterface; +/** + * Provides a filtered translation edit form. + */ class TranslateFilterForm extends TranslateFormBase implements FormInterface { /** @@ -107,4 +110,5 @@ public function submitForm(array &$form, array &$form_state) { $form_state['redirect'] = 'admin/config/regional/translate'; } + } diff --git a/core/modules/locale/lib/Drupal/locale/Form/TranslateFormBase.php b/core/modules/locale/lib/Drupal/locale/Form/TranslateFormBase.php index 13e5a6f..8f2e6e0 100644 --- a/core/modules/locale/lib/Drupal/locale/Form/TranslateFormBase.php +++ b/core/modules/locale/lib/Drupal/locale/Form/TranslateFormBase.php @@ -8,16 +8,24 @@ namespace Drupal\locale\Form; use Drupal\Core\Form\FormInterface; -use Symfony\Component\HttpFoundation\Request; use Drupal\Core\Language\Language; +use Symfony\Component\HttpFoundation\Request; +/** + * Defines the locale user interface translation form base. + * + * Provides methods for searching and filtering strings. + */ abstract class TranslateFormBase implements FormInterface { /** * Builds a string search query and returns an array of string objects. * + * @param \Symfony\Component\HttpFoundation\Request $request + * The current request object. + * * @return array - * Array of Drupal\locale\TranslationString objects. + * Array of \Drupal\locale\TranslationString objects. */ function translateFilterLoadStrings(Request $request) { $filter_values = $this->translateFilterValues($request); @@ -53,7 +61,13 @@ function translateFilterLoadStrings(Request $request) { } /** - * Build array out of search criteria specified in request variables. + * Builds an array out of search criteria specified in request variables. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * The current request object. + * + * @return array $filter_values + * The filter values. */ function translateFilterValues(Request $request) { // @todo vlikin: Need be decoupled. @@ -148,4 +162,5 @@ function translateFilters() { return $filters; } + } diff --git a/core/modules/locale/locale.pages.inc b/core/modules/locale/locale.pages.inc index f2adfcd..f5523cb 100644 --- a/core/modules/locale/locale.pages.inc +++ b/core/modules/locale/locale.pages.inc @@ -12,7 +12,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** - * Page callback: Checks for translation updates and displays the translations status. + * Page callback: Checks for translation updates and displays the status. * * Manually checks the translation status without the use of cron. * @@ -21,9 +21,9 @@ function locale_translation_manual_status() { module_load_include('compare.inc', 'locale'); - // Check translation status of all translatable project in all languages. + // Check the translation status of all translatable projects in all languages. // First we clear the cached list of projects. Although not strictly - // nescessary, this is helpfull in case the project list is out of sync. + // necessary, this is helpful in case the project list is out of sync. locale_translation_flush_projects(); locale_translation_check_projects();