Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Title: locale StringDatabaseStorage doxygen needs love » Clean up StringDatabaseStorage doxygen
Component: locale.module » documentation
Assigned: Gábor Hojtsy » Unassigned
Status: Needs review » Reviewed & tested by the community
Issue tags: +D8MI, +Documentation, +language-ui

Looks good to me :)

Status: Reviewed & tested by the community » Needs work

The last submitted patch, locale_docs.patch, failed testing.

Gábor Hojtsy’s picture

The only change code change is -use Drupal\Core\Database\Database;, which I don't see locally either why would be needed. Sending for a retest.

Gábor Hojtsy’s picture

Status: Needs work » Needs review

locale_docs.patch queued for re-testing.

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community
jhodgdon’s picture

Status: Reviewed & tested by the community » Needs work

I don't think this is actually quite ready:

a) The formatting here is a bit off:

    * @return string
-   *   Either 's', 't' or 'l' depending on whether the field belongs to source,
-   *   target or location table table.
+   *   - 's' for "source", "context", "version" (locales_source table fields).
+   *   - 'l' for "type", "name" (locales_location table fields)
+   *   - 't' for "language", "translation", "customized" (locales_target
+   *   table fields)
    */
   protected function dbFieldTable($field) {

- Lists should be preceded by a line like "One of the following values:"
- The last line should be indented 2 more spaces.

b)

-   * @return \Drupal\locale\LocaleString
+   * @return \Drupal\locale\StringInterface
    *   The called object.
    */
   public function setId($id);

This should just say "@return $this" with no description. Several methods below have the same thing.

Jalandhar’s picture

Status: Needs work » Needs review
FileSize
11.39 KB
3.35 KB

Updating patch as said in comment 6. Please review.

Gábor Hojtsy’s picture

Status: Needs review » Needs work

Almost :)

+++ b/core/modules/locale/lib/Drupal/locale/StringDatabaseStorage.php
@@ -248,11 +245,15 @@ public function createTranslation($values = array()) {
+   *   Use one of the following values.

Should use : not .

Jalandhar’s picture

Status: Needs work » Needs review
FileSize
11.39 KB

Ok.

Used ':' instead of '.' and updating patch. updating patch wth this change

Gábor Hojtsy’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
11.38 KB

Also updated from "Use one of the..." to "One of the" on the same line, since this is a return value, not an argument. Same was suggested by @jhodgdon above. This is such a minor change and all other changes look good that this is RTBC :)

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks - also looks good to me. Committed to 8.x.

  • Commit 8894e43 on 8.x by jhodgdon:
    Issue #2238659 by Jalandhar, Gábor Hojtsy, chx: Clean up some docs in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.