Problem/Motivation

There are a couple of URLs pointing to either wikpedia or php.net in hook_help() and other user interface strings, as well as in API documentation.

The links in UI strings should be localizable, and the links in API documentation and UI strings should be unlocalized.

Proposed resolution

a) In API documentation and other code comments, we should put in unlocalized links to php.net and wikipedia.org, rather than ones with "us" or "en" in them. Examples:

http://php.net/manual/function.date.php (unlocalized -- good)
vs.
http://us1.php.net/manual/en/function.date.php (localized -- bad)

https://wikipedia.org/wiki/Elie_Wiesel (unlocalized -- good)
vs.
https://en.wikipedia.org/wiki/Elie_Wiesel (localized -- bad)

b) In user interface text strings (anything inside t(), including hook_help() implementations) we should include the php.net and wikipedia.org links in the translated string, so that translators can change the link URL to a localized link if desired. So we should do this:

t('See <a href="http://wikipedia.org/wiki/whatever">the Wikipedia page on whatever</a> for more information');

rather than pulling the URL out like we have been doing:

t('See <a href="!wikipedia">the Wikipedia page on whatever</a> for more information', array('!wikipedia' => 'http://wikipedia.org/wiki/whatever');

And the URL we put in there should be unlocalized.

However, note that changes to UI strings are discouraged at some stages of the product release. So making a change to a UI string that pulls the URL inside so it can be localized is good, because it fixes the bug that they cannot currently be localized. But just changing the link so it doesn't contain a 'en' or 'us' is not enough of a bug to justify the UI string change.

Remaining tasks

Find all the links and strings that need updating, and make a patch.

User interface changes

Links to php.net and wikipedia.org will be localizable.

Translatable UI strings are affected.

API changes

No.

Data model changes

No.

CommentFileSizeAuthor
#62 interdiff-2571845-60-62.txt3.33 KBanil280988
#62 core-localized-links-2571845-62.patch57.02 KBanil280988
#60 core-localized-links-2571845-60.patch54.35 KBhussainweb
#57 core-localized-links-2571845-57.patch54.85 KBhussainweb
#50 interdiff-43-47.txt22.96 KBhussainweb
#49 core-localized-links-2571845-47.patch55.52 KBhussainweb
#43 interdiff-2571845-39-43.txt66.15 KBanil280988
#43 core-localized-links-2571845-43-D8.patch66.15 KBanil280988
#41 interdiff-39-28.txt17.65 KBdrupal.ninja03
#39 core-localized-links-2571845-39-D8.patch92.02 KBdrupal.ninja03
#28 interdiff-27-24.txt3.15 KBdrupal.ninja03
#28 core-localized-links-2571845-28-D8.patch109.67 KBdrupal.ninja03
#26 core-localized-links-2571845-24-D8.patch108.89 KBdrupal.ninja03
#26 interdiff-24-21.txt11.36 KBdrupal.ninja03
#23 interdiff-21-18.txt23 KBdrupal.ninja03
#23 core-localized-links-2571845-21-D8.patch104.75 KBdrupal.ninja03
#20 core-localized-links-2571845-18-D8.patch93.23 KBdrupal.ninja03
#20 interdiff-18-16.txt60.57 KBdrupal.ninja03
#17 interdiff-16-12.txt10.24 KBdrupal.ninja03
#17 core-localized-links-2571845-16-D8.patch17.21 KBdrupal.ninja03
#14 core-localized-links-2571845-12-D8.patch26.05 KBdrupal.ninja03
#8 wikipedia_php_links-2571845-8-D8.patch33.15 KBsnehi
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner created an issue. See original summary.

dawehner’s picture

jhodgdon’s picture

My opinion is that the URLs should be within the t() text so they can be changed to more appropriate localized links.

stefan.r’s picture

Agreed with #3

So in the cases where we do this:

t('For more information, see the <a href=":url">PHP.net documentation</a>', [':url' => 'http://www.php.net/foo']);

Should we do:

// a) this?
t('For more information, see the <a href="http://en.php.net/foo">PHP.net documentation</a>');
// or b) this?
t('For more information, see the <a href=":url">PHP.net documentation</a>', [':url' => t('http://en.php.net/foo')]);

The advantage of b) is we only need to translate a URL once, the advantage of a) is we have more context.

jhodgdon’s picture

Ah, good question. The other advantage of (b) is that it only adds a string to the translation set, and doesn't change the existing strings.

So. Regarding php.net, we already have a solution to that, which is that PHP.net URLs are *supposed* to not have the "en" in them, because if you visit a URL like
http://php.net/manual/function.date.php
it should redirect you to an appropriate, localized page, like
http://us1.php.net/manual/en/function.date.php
in my case.

If we have php.net URLs with 'en' or 'us' in them, that is wrong and we should fix it, and I think we don't need to put the URLs in t().

Maybe Wikipedia does the same? Can someone whose browser language and country is other than EN/US try to visit this URL and see if it redirects you to your own language? Let's see...
https://wikipedia.org/wiki/Elie_Wiesel (his birthday is today)
That redirects me to
https://en.wikipedia.org/wiki/Elie_Wiesel

So... If we can do the same with Wikipedia as we can with php.net, then I think we can just fix the URLs instead of actually needing to translate them.

Then if we have a few links that point to sites other than php.net or Wikipedia, we can t() them.

Can someone tests the redirects to languages other than English in the above URLs, to see if this is viable?

stefan.r’s picture

My browser has a preferred language of French but both http://php.net/manual/function.date.php and https://wikipedia.org/wiki/Elie_Wiesel go to English pages

jhodgdon’s picture

Hm. I wonder if it is based on location/IP address...

snehi’s picture

Assigned: Unassigned » snehi
Status: Active » Needs review
FileSize
33.15 KB

Changed instances from

en.wikipedia

to only

wikipedia

in all the files.
Unable to find any link like

en.php.net

Found one with

us.php.net

and i replaced it with

php.net

jhodgdon’s picture

Issue tags: +Needs manual testing

Hm. According to comment #6, those no-language Wikipedia and php.net links do not redirect people to the localized pages, unless there is something weird going on for stefan.r. No one else has tested the links in #5 to wikipedia and php.net to see if they redirect. If they don't redirect for anyone, we need to do something else in this patch than this.

So if we could have a few other people who:

a) Are located in a non-English-speaking country

b) Have their browser's default language set to a non-English language

test the non-localized php.net and wikipedia.org links in #5 and report here where they redirected to, that would be great! Then we can figure out what to do in this patch.

drupal.ninja03’s picture

Hi,

I second comment#6. I have tested according to comment#5 & #9 and set my browser language to Hindi and Assamese but I am getting same result as comment#6.

jhodgdon’s picture

Title: Discuss whether links to wikipedia/php.net should be part of the actual t() string. » Links to wikipedia/php.net should be part of the actual t() string so they can be localized
Issue summary: View changes
Status: Needs review » Needs work
Issue tags: -Needs manual testing

OK then. Thanks for testing!

In that case, it looks like the strategy of trying to put unlocalized links in is not going to work. So, here is what I think we should do [adding this to the issue summary too]:

a) In API documentation and other code comments, we should put in unlocalized links to php.net and wikipedia.org, rather than ones with "us" or "en" in them. Examples:

http://php.net/manual/function.date.php (unlocalized)
vs.
http://us1.php.net/manual/en/function.date.php (localized)

https://wikipedia.org/wiki/Elie_Wiesel (unlocalized)
vs.
https://en.wikipedia.org/wiki/Elie_Wiesel (localized)

b) In user interface text strings (anything inside t(), including hook_help() implementations) we should include the php.net and wikipedia.org links in the translated string, so that translators can change the link URL to a localized link if desired. So we should do this:

t('See <a href="http://wikipedia.org/wiki/whatever">the Wikipedia page on whatever</a> for more information');

rather than pulling the URL out like we have been doing:

t('See <a href="!wikipedia">the Wikipedia page on whatever</a> for more information', array('!wikipedia' => 'http://wikipedia.org/wiki/whatever');

And the URL we put in there should be unlocalized.

jhodgdon’s picture

Issue summary: View changes

Adding a note about translatable strings to the issue summary.

GoZ’s picture

You can find some other urls to fix in https://www.drupal.org/node/2591919#comment-10455511

drupal.ninja03’s picture

Status: Needs work » Needs review
FileSize
26.05 KB

As mentioned in #11, i have just created the patch for it. This is my first patch in Drupal, i might be wrong here.
Please review attached one.

GoZ’s picture

Status: Needs review » Needs work

@passionate.drupalist can you add an interdiff file ? https://www.drupal.org/documentation/git/interdiff

There is still some urls to fix. See link from #13

jhodgdon’s picture

Thanks!

Please read the issue summary about what we do and do not want to change in this patch, and see below for some things that need to be fixed in this patch.

  1. +++ b/core/core.api.php
    @@ -79,9 +79,9 @@
    + * - SOAP: http://wikipedia.org/wiki/SOAP SOAP
    

    We should remove the extra "SOAP" at the end of this line.

  2. +++ b/core/lib/Drupal/Component/Datetime/DateTimePlus.php
    @@ -177,7 +177,7 @@ public static function createFromTimestamp($timestamp, $timezone = NULL, $settin
    +   *   @see http://php.net/manual/en/datetime.createfromformat.php
    

    This URL still has 'en' in it.

  3. +++ b/core/lib/Drupal/Component/Datetime/DateTimePlus.php
    @@ -389,7 +389,7 @@ protected function prepareFormat($format) {
    +   * @see http://php.net/manual/en/time.getlasterrors.php
    

    Still contains 'en'.

  4. +++ b/core/modules/aggregator/aggregator.module
    @@ -49,7 +49,7 @@ function aggregator_help($route_name, RouteMatchInterface $route_match) {
    -      $output = '<p>' . t('Many sites publish their headlines and posts in feeds, using a number of standardized XML-based formats. The aggregator supports <a href="http://en.wikipedia.org/wiki/Rss">RSS</a>, <a href="http://en.wikipedia.org/wiki/Resource_Description_Framework">RDF</a>, and <a href="http://en.wikipedia.org/wiki/Atom_%28standard%29">Atom</a>.') . '</p>';
    +      $output = '<p>' . t('Many sites publish their headlines and posts in feeds, using a number of standardized XML-based formats. The aggregator supports <a href="http://wikipedia.org/wiki/Rss">RSS</a>, <a href="http://wikipedia.org/wiki/Resource_Description_Framework">RDF</a>, and <a href="http://wikipedia.org/wiki/Atom_%28standard%29">Atom</a>.') . '</p>';
    

    As discussed in an earlier comment, right now we do *not* want to change localized URLs to localized URLs within UI strings (i.e., inside t() calls).

    If the URL is not part of the t() string at all, it's a bug that we would want to fix. But if the URL is already there (as in this case), we don't want to change it because this would change the string for translators and it's not so major of a bug.

  5. +++ b/core/modules/basic_auth/basic_auth.module
    @@ -15,7 +15,7 @@ function basic_auth_help($route_name, RouteMatchInterface $route_match) {
    -      $output .= '<p>' . t('The HTTP Basic Authentication module supplies an <a href="http://en.wikipedia.org/wiki/Basic_access_authentication">HTTP Basic authentication</a> provider for web service requests. This authentication provider authenticates requests using the HTTP Basic Authentication username and password, as an alternative to using Drupal\'s standard cookie-based authentication system. It is only useful if your site provides web services configured to use this type of authentication (for instance, the <a href=":rest_help">RESTful Web Services module</a>). For more information, see the <a href=":hba_do">online documentation for the HTTP Basic Authentication module</a>.', array(':hba_do' => 'https://www.drupal.org/documentation/modules/basic_auth', ':rest_help' => (\Drupal::moduleHandler()->moduleExists('rest')) ? \Drupal::url('help.page', array('name' => 'rest')) : '#')) . '</p>';
    +      $output .= '<p>' . t('The HTTP Basic Authentication module supplies an <a href="http://wikipedia.org/wiki/Basic_access_authentication">HTTP Basic authentication</a> provider for web service requests. This authentication provider authenticates requests using the HTTP Basic Authentication username and password, as an alternative to using Drupal\'s standard cookie-based authentication system. It is only useful if your site provides web services configured to use this type of authentication (for instance, the <a href=":rest_help">RESTful Web Services module</a>). For more information, see the <a href=":hba_do">online documentation for the HTTP Basic Authentication module</a>.', array(':hba_do' => 'https://www.drupal.org/documentation/modules/basic_auth', ':rest_help' => (\Drupal::moduleHandler()->moduleExists('rest')) ? \Drupal::url('help.page', array('name' => 'rest')) : '#')) . '</p>';
    

    See previous comment.

  6. +++ b/core/modules/breakpoint/breakpoint.module
    @@ -23,7 +23,7 @@ function breakpoint_help($route_name, RouteMatchInterface $route_match) {
    -      $output .= '<dd>' . t('Resolution multipliers are a measure of the viewport\'s device resolution, defined to be the ratio between the physical pixel size of the active device and the <a href="http://en.wikipedia.org/wiki/Device_independent_pixel">device-independent pixel</a> size. The Breakpoint module defines multipliers of 1, 1.5, and 2; when defining breakpoints, modules and themes can define which multipliers apply to each breakpoint.') . '</dd>';
    +      $output .= '<dd>' . t('Resolution multipliers are a measure of the viewport\'s device resolution, defined to be the ratio between the physical pixel size of the active device and the <a href="http://wikipedia.org/wiki/Device_independent_pixel">device-independent pixel</a> size. The Breakpoint module defines multipliers of 1, 1.5, and 2; when defining breakpoints, modules and themes can define which multipliers apply to each breakpoint.') . '</dd>';
    

    see previous comment

  7. +++ b/core/modules/datetime/datetime.module
    @@ -36,7 +36,7 @@ function datetime_help($route_name, RouteMatchInterface $route_match) {
    -      $output .= '<dd>' . t('Dates can be displayed using the <em>Plain</em> or the <em>Default</em> formatter. The <em>Plain</em> formatter displays the date in the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> format. If you choose the <em>Default</em> formatter, you can choose a format from a predefined list that can be managed on the <a href=":date_format_list">Date and time formats</a> page.', array(':date_format_list'=> \Drupal::url('entity.date_format.collection'))) . '</dd>';
    +      $output .= '<dd>' . t('Dates can be displayed using the <em>Plain</em> or the <em>Default</em> formatter. The <em>Plain</em> formatter displays the date in the <a href="http://wikipedia.org/wiki/ISO_8601">ISO 8601</a> format. If you choose the <em>Default</em> formatter, you can choose a format from a predefined list that can be managed on the <a href=":date_format_list">Date and time formats</a> page.', array(':date_format_list'=> \Drupal::url('entity.date_format.collection'))) . '</dd>';
    

    See previous comment

  8. +++ b/core/modules/hal/hal.module
    @@ -16,7 +16,7 @@ function hal_help($route_name, RouteMatchInterface $route_match) {
    -      $output .= '<p>' . t('Hypermedia APIs are a style of Web API that uses URIs to identify resources and the <a href=":link_rel">link relations</a> between them, enabling API consumers to follow links to discover API functionality.', array(':link_rel' => 'http://en.wikipedia.org/wiki/Link_relation')) . '</p>';
    +      $output .= '<p>' . t('Hypermedia APIs are a style of Web API that uses URIs to identify resources and the <a href=":link_rel">link relations</a> between them, enabling API consumers to follow links to discover API functionality.', array(':link_rel' => 'http://wikipedia.org/wiki/Link_relation')) . '</p>';
    

    Now in this case, that is what we *do* want to change. The wikipedia string is not currently part of the translated piece of the string. So we would want to move it in there so it can be translated/localized.

  9. +++ b/core/modules/image/image.module
    @@ -66,7 +66,7 @@ function image_help($route_name, RouteMatchInterface $route_match) {
    -      $output .= '<dd>' . t('You can also configure a minimum and/or maximum resolution for uploaded images. Images that are too small will be rejected. Images that are to large will be resized. During the resizing the <a href=":exif">EXIF data</a> in the image will be lost.', array(':exif' => 'http://en.wikipedia.org/wiki/Exchangeable_image_file_format')) . '</dd>';
    +      $output .= '<dd>' . t('You can also configure a minimum and/or maximum resolution for uploaded images. Images that are too small will be rejected. Images that are to large will be resized. During the resizing the <a href=":exif">EXIF data</a> in the image will be lost.', array(':exif' => 'http://wikipedia.org/wiki/Exchangeable_image_file_format')) . '</dd>';
    

    Same here.

  10. +++ b/core/modules/views/src/Plugin/views/field/Date.php
    @@ -111,7 +111,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    -      '#description' => $this->t('If "Custom", see <a href="http://us.php.net/manual/en/function.date.php" target="_blank">the PHP docs</a> for date formats. Otherwise, enter the number of different time units to display, which defaults to 2.'),
    +      '#description' => $this->t('If "Custom", see <a href="http://php.net/manual/en/function.date.php" target="_blank">the PHP docs</a> for date formats. Otherwise, enter the number of different time units to display, which defaults to 2.'),
    

    Don't make this change (see above).

drupal.ninja03’s picture

Assigned: snehi » drupal.ninja03
Status: Needs work » Needs review
FileSize
17.21 KB
10.24 KB

Hi,

As mentioned in #16, changes has been done. Please review.

jhodgdon’s picture

Status: Needs review » Needs work

Thanks! Better, but still a few things to fix. Again, please read the issue summary.

  1. +++ b/core/lib/Drupal/Component/Datetime/DateTimePlus.php
    @@ -389,7 +389,7 @@ protected function prepareFormat($format) {
    +   * @see http://php.net/manual/en/time.getlasterrors.php
    

    This URL still has 'en' in it.

  2. +++ b/core/modules/hal/hal.module
    @@ -16,7 +16,7 @@ function hal_help($route_name, RouteMatchInterface $route_match) {
    -      $output .= '<p>' . t('Hypermedia APIs are a style of Web API that uses URIs to identify resources and the <a href=":link_rel">link relations</a> between them, enabling API consumers to follow links to discover API functionality.', array(':link_rel' => 'http://en.wikipedia.org/wiki/Link_relation')) . '</p>';
    +      $output .= '<p>' . t('Hypermedia APIs are a style of Web API that uses URIs to identify resources and the <a href=":link_rel">link relations</a> between them, enabling API consumers to follow links to discover API functionality.', array(':link_rel' => 'http://wikipedia.org/wiki/Link_relation')) . '</p>';
    

    Again, we want to put the URL ***into the main t() string*** here. Read the issue summary please. There are a few other places in the patch where this also needs to be done.

GoZ’s picture

Closed issue linked in #13 should also be considered.
Please, add those changes removing all /en from php.net urls.

  1. diff --git a/core/includes/file.inc b/core/includes/file.inc
    index 63f4bb3..3abca61 100644
    --- a/core/includes/file.inc
    +++ b/core/includes/file.inc
    @@ -631,7 +631,7 @@ function file_munge_filename($filename, $extensions, $alerts = TRUE) {
     
       // Allow potentially insecure uploads for very savvy users and admin
       if (!\Drupal::config('system.file')->get('allow_insecure_uploads')) {
    -    // Remove any null bytes. See http://php.net/manual/en/security.filesystem.nullbytes.php
    +    // Remove any null bytes. See http://php.net/manual/security.filesystem.nullbytes.php
         $filename = str_replace(chr(0), '', $filename);
     
         $whitelist = array_unique(explode(' ', strtolower(trim($extensions))));
    

    Remove /en from php.net url like this patch does.

  2. diff --git a/core/includes/theme.inc b/core/includes/theme.inc
    index 2c94b6c..47d0fdd 100644
    --- a/core/includes/theme.inc
    +++ b/core/includes/theme.inc
    @@ -401,7 +401,7 @@ function theme_render_and_autoescape($arg) {
           $return = (string) $arg;
         }
         // You can't throw exceptions in the magic PHP __toString methods, see
    -    // http://php.net/manual/en/language.oop5.magic.php#object.tostring so
    +    // http://php.net/manual/language.oop5.magic.php#object.tostring so
         // we also support a toString method.
         elseif (method_exists($arg, 'toString')) {
           $return = $arg->toString();
    

    Remove /en from php.net url like this patch does.

  3. diff --git a/core/lib/Drupal/Component/Utility/OpCodeCache.php b/core/lib/Drupal/Component/Utility/OpCodeCache.php
    index 90b28e7..999d68bb 100644
    --- a/core/lib/Drupal/Component/Utility/OpCodeCache.php
    +++ b/core/lib/Drupal/Component/Utility/OpCodeCache.php
    @@ -37,7 +37,7 @@ public static function invalidate($pathname) {
         if (extension_loaded('apc') && function_exists('apc_delete_file')) {
           // apc_delete_file() throws a PHP warning in case the specified file was
           // not compiled yet.
    -      // @see http://php.net/manual/en/function.apc-delete-file.php
    +      // @see http://php.net/manual/function.apc-delete-file.php
           @apc_delete_file($pathname);
         }
       }
    

    Remove /en from php.net url like this patch does.

  4. diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php
    index e3867d4..b7f32ee 100644
    --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php
    +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php
    @@ -152,7 +152,7 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin
         $scale = rand($decimal_digits, $scale);
     
         // @see "Example #1 Calculate a random floating-point number" in
    -    // http://php.net/manual/en/function.mt-getrandmax.php
    +    // http://php.net/manual/function.mt-getrandmax.php
         $random_decimal = $min + mt_rand() / mt_getrandmax() * ($max - $min);
         $values['value'] = self::truncateDecimal($random_decimal, $scale);
         return $values;
    

    Remove /en from php.net url like this patch does.

  5. diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/FloatItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/FloatItem.php
    index 34eebe9..9bc552d 100644
    --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/FloatItem.php
    +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/FloatItem.php
    @@ -72,7 +72,7 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin
         $max = is_numeric($settings['max']) ?: pow(10, ($precision - $scale)) - 1;
         $min = is_numeric($settings['min']) ?: -pow(10, ($precision - $scale)) + 1;
         // @see "Example #1 Calculate a random floating-point number" in
    -    // http://php.net/manual/en/function.mt-getrandmax.php
    +    // http://php.net/manual/function.mt-getrandmax.php
         $random_decimal = $min + mt_rand() / mt_getrandmax() * ($max - $min);
         $values['value'] = self::truncateDecimal($random_decimal, $scale);
         return $values;
    

    Remove /en from php.net url like this patch does.

  6. diff --git a/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php b/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
    index 9dcb582..c939565 100644
    --- a/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
    +++ b/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
    @@ -53,7 +53,7 @@ public function format(array $message) {
        * @return bool
        *   TRUE if the mail was successfully accepted, otherwise FALSE.
        *
    -   * @see http://php.net/manual/en/function.mail.php
    +   * @see http://php.net/manual/function.mail.php
        * @see \Drupal\Core\Mail\MailManagerInterface::mail()
        */
       public function mail(array $message) {
    

    Remove /en from php.net url like this patch does.

  7. diff --git a/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php b/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php
    index 4013d0f..ad4636c 100644
    --- a/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php
    +++ b/core/lib/Drupal/Core/StreamWrapper/LocalReadOnlyStream.php
    @@ -104,7 +104,7 @@ public function stream_lock($operation) {
        * @return bool
        *   FALSE as data will not be written.
        *
    -   * @see http://php.net/manual/en/streamwrapper.stream-write.php
    +   * @see http://php.net/manual/streamwrapper.stream-write.php
        */
       public function stream_write($data) {
         trigger_error('stream_write() not supported for read-only stream wrappers', E_USER_WARNING);
    @@ -158,7 +158,7 @@ public function stream_truncate($new_size) {
        *   TRUE so that file_delete() will remove db reference to file. File is not
        *   actually deleted.
        *
    -   * @see http://php.net/manual/en/streamwrapper.unlink.php
    +   * @see http://php.net/manual/streamwrapper.unlink.php
        */
       public function unlink($uri) {
         trigger_error('unlink() not supported for read-only stream wrappers', E_USER_WARNING);
    @@ -178,7 +178,7 @@ public function unlink($uri) {
        * @return bool
        *   FALSE as file will never be renamed.
        *
    -   * @see http://php.net/manual/en/streamwrapper.rename.php
    +   * @see http://php.net/manual/streamwrapper.rename.php
        */
       public function rename($from_uri, $to_uri) {
         trigger_error('rename() not supported for read-only stream wrappers', E_USER_WARNING);
    @@ -200,7 +200,7 @@ public function rename($from_uri, $to_uri) {
        * @return bool
        *   FALSE as directory will never be created.
        *
    -   * @see http://php.net/manual/en/streamwrapper.mkdir.php
    +   * @see http://php.net/manual/streamwrapper.mkdir.php
        */
       public function mkdir($uri, $mode, $options) {
         trigger_error('mkdir() not supported for read-only stream wrappers', E_USER_WARNING);
    @@ -220,7 +220,7 @@ public function mkdir($uri, $mode, $options) {
        * @return bool
        *   FALSE as directory will never be deleted.
        *
    -   * @see http://php.net/manual/en/streamwrapper.rmdir.php
    +   * @see http://php.net/manual/streamwrapper.rmdir.php
        */
       public function rmdir($uri, $options) {
         trigger_error('rmdir() not supported for read-only stream wrappers', E_USER_WARNING);
    

    Remove /en from php.net url like this patch does.

  8. diff --git a/core/lib/Drupal/Core/StreamWrapper/ReadOnlyStream.php b/core/lib/Drupal/Core/StreamWrapper/ReadOnlyStream.php
    index 67e6430..2072e6e 100644
    --- a/core/lib/Drupal/Core/StreamWrapper/ReadOnlyStream.php
    +++ b/core/lib/Drupal/Core/StreamWrapper/ReadOnlyStream.php
    @@ -138,7 +138,7 @@ public function stream_lock($operation) {
        * @return bool
        *   FALSE as data will not be written.
        *
    -   * @see http://php.net/manual/en/streamwrapper.stream-write.php
    +   * @see http://php.net/manual/streamwrapper.stream-write.php
        */
       public function stream_write($data) {
         trigger_error('stream_write() not supported for read-only stream wrappers', E_USER_WARNING);
    @@ -192,7 +192,7 @@ public function stream_truncate($new_size) {
        *   TRUE so that file_delete() will remove db reference to file. File is not
        *   actually deleted.
        *
    -   * @see http://php.net/manual/en/streamwrapper.unlink.php
    +   * @see http://php.net/manual/streamwrapper.unlink.php
        */
       public function unlink($uri) {
         trigger_error('unlink() not supported for read-only stream wrappers', E_USER_WARNING);
    @@ -212,7 +212,7 @@ public function unlink($uri) {
        * @return bool
        *   FALSE as file will never be renamed.
        *
    -   * @see http://php.net/manual/en/streamwrapper.rename.php
    +   * @see http://php.net/manual/streamwrapper.rename.php
        */
       public function rename($from_uri, $to_uri) {
         trigger_error('rename() not supported for read-only stream wrappers', E_USER_WARNING);
    @@ -234,7 +234,7 @@ public function rename($from_uri, $to_uri) {
        * @return bool
        *   FALSE as directory will never be created.
        *
    -   * @see http://php.net/manual/en/streamwrapper.mkdir.php
    +   * @see http://php.net/manual/streamwrapper.mkdir.php
        */
       public function mkdir($uri, $mode, $options) {
         trigger_error('mkdir() not supported for read-only stream wrappers', E_USER_WARNING);
    @@ -254,7 +254,7 @@ public function mkdir($uri, $mode, $options) {
        * @return bool
        *   FALSE as directory will never be deleted.
        *
    -   * @see http://php.net/manual/en/streamwrapper.rmdir.php
    +   * @see http://php.net/manual/streamwrapper.rmdir.php
        */
       public function rmdir($uri, $options) {
         trigger_error('rmdir() not supported for read-only stream wrappers', E_USER_WARNING);
    

    Remove /en from php.net url like this patch does.

  9. diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php
    index 9d6dd1a..d7630a0 100644
    --- a/core/lib/Drupal/Core/Template/TwigExtension.php
    +++ b/core/lib/Drupal/Core/Template/TwigExtension.php
    @@ -432,7 +432,7 @@ public function escapeFilter(\Twig_Environment $env, $arg, $strategy = 'html', $
             $return = (string) $arg;
           }
           // You can't throw exceptions in the magic PHP __toString methods, see
    -      // http://php.net/manual/en/language.oop5.magic.php#object.tostring so
    +      // http://php.net/manual/language.oop5.magic.php#object.tostring so
           // we also support a toString method.
           elseif (method_exists($arg, 'toString')) {
             $return = $arg->toString();
    @@ -510,7 +510,7 @@ public function renderVar($arg) {
             return (string) $arg;
           }
           // You can't throw exceptions in the magic PHP __toString methods, see
    -      // http://php.net/manual/en/language.oop5.magic.php#object.tostring so
    +      // http://php.net/manual/language.oop5.magic.php#object.tostring so
           // we also support a toString method.
           elseif (method_exists($arg, 'toString')) {
             return $arg->toString();
    

    Remove /en from php.net url like this patch does.

  10. diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php
    index 7cc76cb..d56cfc0 100644
    --- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php
    +++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/BinaryData.php
    @@ -14,7 +14,7 @@
      * The binary data type.
      *
      * The plain value of binary data is a PHP file resource, see
    - * http://php.net/manual/en/language.types.resource.php. For setting the value
    + * http://php.net/manual/language.types.resource.php. For setting the value
      * a PHP file resource or a (absolute) stream resource URI may be passed.
      *
      * @DataType(
    

    Remove /en from php.net url like this patch does.

  11. diff --git a/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php
    index e277c14..04067fe 100644
    --- a/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php
    +++ b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php
    @@ -51,7 +51,7 @@ public function defaultValuesForm(array &$form, FormStateInterface $form_state)
             'default_date' => array(
               '#type' => 'textfield',
               '#title' => t('Relative default value'),
    -          '#description' => t("Describe a time by reference to the current day, like '+90 days' (90 days from the day the field is created) or '+1 Saturday' (the next Saturday). See <a href=\"@url\">@strtotime</a> for more details.", array('@strtotime' => 'strtotime', '@url' => 'http://www.php.net/manual/en/function.strtotime.php')),
    +          '#description' => t("Describe a time by reference to the current day, like '+90 days' (90 days from the day the field is created) or '+1 Saturday' (the next Saturday). See <a href=\"@url\">@strtotime</a> for more details.", array('@strtotime' => 'strtotime', '@url' => 'http://www.php.net/manual/function.strtotime.php')),
               '#default_value' => (isset($default_value[0]['default_date_type']) && $default_value[0]['default_date_type'] == static::DEFAULT_VALUE_CUSTOM) ? $default_value[0]['default_date'] : '',
               '#states' => array(
                 'visible' => array(
    

    Remove /en from php.net url, remove @url param from t() and put it in translatable string like suggested in b/ from the issue summary.

  12. diff --git a/core/modules/options/src/Plugin/Field/FieldType/ListFloatItem.php b/core/modules/options/src/Plugin/Field/FieldType/ListFloatItem.php
    index 870ad91..ff2e25c 100644
    --- a/core/modules/options/src/Plugin/Field/FieldType/ListFloatItem.php
    +++ b/core/modules/options/src/Plugin/Field/FieldType/ListFloatItem.php
    @@ -104,7 +104,7 @@ public static function simplifyAllowedValues(array $structured_values) {
           // Cast the value to a float first so that .5 and 0.5 are the same value
           // and then cast to a string so that values like 0.5 can be used as array
           // keys.
    -      // @see http://php.net/manual/en/language.types.array.php
    +      // @see http://php.net/manual/language.types.array.php
           $values[(string) (float) $item['value']] = $item['label'];
         }
         return $values;
    

    Remove /en from php.net url like this patch does.

  13. diff --git a/core/modules/simpletest/src/TestBase.php b/core/modules/simpletest/src/TestBase.php
    index 940fcba..d1fea7b 100644
    --- a/core/modules/simpletest/src/TestBase.php
    +++ b/core/modules/simpletest/src/TestBase.php
    @@ -298,7 +298,7 @@
        * HTTP authentication method (specified as a CURLAUTH_* constant).
        *
        * @var int
    -   * @see http://php.net/manual/en/function.curl-setopt.php
    +   * @see http://php.net/manual/function.curl-setopt.php
        */
       protected $httpAuthMethod = CURLAUTH_BASIC;
    

    Remove /en from php.net url like this patch does.

  14. diff --git a/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
    index f9cfb53..c79187b 100644
    --- a/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
    +++ b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
    @@ -53,7 +53,7 @@ class GDToolkit extends ImageToolkitBase {
        *
        * @see \Drupal\system\Plugin\ImageToolkit\GDToolkit::parseFile()
        * @see \Drupal\system\Plugin\ImageToolkit\GDToolkit::setResource()
    -   * @see http://php.net/manual/en/function.getimagesize.php
    +   * @see http://php.net/manual/function.getimagesize.php
        */
       protected $preLoadInfo = NULL;
    

    Remove /en from php.net url like this patch does.

  15. diff --git a/core/modules/system/system.install b/core/modules/system/system.install
    index 8addfd1..32286fd 100644
    --- a/core/modules/system/system.install
    +++ b/core/modules/system/system.install
    @@ -246,7 +246,7 @@ function system_requirements($phase) {
           $requirements['php_opcache'] = array(
             'value' => t('Not enabled'),
             'severity' => REQUIREMENT_WARNING,
    -        'description' => t('PHP OPcode caching can improve your site\'s performance considerably. It is <strong>highly recommended</strong> to have <a href=":opcache_link" target="_blank">OPcache</a> installed on your server.', array(':opcache_link' => 'http://php.net/manual/en/opcache.installation.php')),
    +        'description' => t('PHP OPcode caching can improve your site\'s performance considerably. It is <strong>highly recommended</strong> to have <a href=":opcache_link" target="_blank">OPcache</a> installed on your server.', array(':opcache_link' => 'http://php.net/manual/opcache.installation.php')),
           );
         }
         else {
    

    Remove /en from php.net url, remove :opcache_link param from t() and put it in translatable string like suggested in b/ from the issue summary.

  16. diff --git a/core/modules/views/src/Plugin/views/PluginBase.php b/core/modules/views/src/Plugin/views/PluginBase.php
    index d844969..dc94f25 100644
    --- a/core/modules/views/src/Plugin/views/PluginBase.php
    +++ b/core/modules/views/src/Plugin/views/PluginBase.php
    @@ -369,7 +369,7 @@ protected function viewsTokenReplace($text, $tokens) {
           if (strpos($token, '.') === FALSE) {
             // We need to validate tokens are valid Twig variables. Twig uses the
             // same variable naming rules as PHP.
    -        // @see http://php.net/manual/en/language.variables.basics.php
    +        // @see http://php.net/manual/language.variables.basics.php
             assert('preg_match(\'/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/\', $token) === 1', 'Tokens need to be valid Twig variables.');
             $twig_tokens[$token] = $replacement;
           }
    

    Remove /en from php.net url like this patch does.

  17. diff --git a/core/modules/views/src/Tests/Handler/FieldDateTest.php b/core/modules/views/src/Tests/Handler/FieldDateTest.php
    index 004118f..c9b3a05 100644
    --- a/core/modules/views/src/Tests/Handler/FieldDateTest.php
    +++ b/core/modules/views/src/Tests/Handler/FieldDateTest.php
    @@ -80,7 +80,7 @@ public function testFieldDate() {
             'table' => 'views_test_data',
             'field' => 'created',
             'relationship' => 'none',
    -        // ISO 8601 format @see http://php.net/manual/en/function.date.php
    +        // ISO 8601 format @see http://php.net/manual/function.date.php
             'custom_date_format' => 'c',
           ),
           'destroyed' => array(
    

    Remove /en from php.net url like this patch does.

  18. diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
    index 9ca309f..6e25265 100755
    --- a/core/scripts/run-tests.sh
    +++ b/core/scripts/run-tests.sh
    @@ -1178,7 +1178,7 @@ function simpletest_script_color_code($status) {
      * Searches the provided array of string values for close matches based on the
      * Levenshtein algorithm.
      *
    - * @see http://php.net/manual/en/function.levenshtein.php
    + * @see http://php.net/manual/function.levenshtein.php
      *
      * @param string $string
      *   A string to test.
    

    Remove /en from php.net url like this patch does.

  19. diff --git a/core/tests/Drupal/Tests/Component/Utility/TimerTest.php b/core/tests/Drupal/Tests/Component/Utility/TimerTest.php
    index cfb05dd..79e863f 100644
    --- a/core/tests/Drupal/Tests/Component/Utility/TimerTest.php
    +++ b/core/tests/Drupal/Tests/Component/Utility/TimerTest.php
    @@ -39,7 +39,7 @@ public function testTimer() {
     
         // Although we sleep for 5 milliseconds, we should test that at least 4 ms
         // have past because usleep() is not reliable on Windows. See
    -    // http://php.net/manual/en/function.usleep.php for more information. The
    +    // http://php.net/manual/function.usleep.php for more information. The
         // purpose of the test to validate that the Timer class can measure elapsed
         // time not the granularity of usleep() on a particular OS.
         $this->assertGreaterThanOrEqual(4, $value, 'Timer failed to measure at least 4 milliseconds of sleeping while running.');
    
    

    Remove /en from php.net url like this patch does.

drupal.ninja03’s picture

Hi,

Please pardon my mistakes earlier. I have now made the remaining changes that got left out earlier as pointed out in #18 and #19. Please review it.

GoZ’s picture

I think we are pretty closed. Thanks for your stuff.
Still a few things.

  1. +++ b/core/modules/color/color.install
    @@ -22,14 +22,14 @@ function color_requirements($phase) {
    +        $requirements['color_gd']['description'] = t('The GD library for PHP is enabled, but was compiled without PNG support. Check the <a href="http://www.php.net/manual/ref.image.php">PHP image documentation</a> for information on how to correct this.');
    

    Remove www. from www.php.net

  2. +++ b/core/modules/color/color.install
    @@ -22,14 +22,14 @@ function color_requirements($phase) {
    +        'description' => t('The GD library for PHP is missing or outdated. Check the <a href="http://www.php.net/manual/book.image.php">PHP image documentation</a> for information on how to correct this.'),
    

    Remove www. from www.php.net

  3. +++ b/core/modules/color/color.module
    @@ -410,7 +410,7 @@ function color_scheme_form_submit($form, FormStateInterface $form_state) {
    +      drupal_set_message(t('There is not enough memory available to PHP to change this theme\'s color scheme. You need at least %size more. Check the <a href="http://www.php.net/manual/ini.core.php#ini.sect.resource-limits">PHP documentation</a> for more information.', array('%size' => format_size($usage + $required - $size))), 'error');
    

    Remove www. from www.php.net

  4. +++ b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php
    @@ -51,7 +51,7 @@ public function defaultValuesForm(array &$form, FormStateInterface $form_state)
    +          '#description' => t("Describe a time by reference to the current day, like '+90 days' (90 days from the day the field is created) or '+1 Saturday' (the next Saturday). See <a href=\"http://www.php.net/manual/en/function.strtotime.php\">@strtotime</a> for more details.", array('@strtotime' => 'strtotime')),
    

    Remove www. from www.php.net

  5. +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php
    @@ -67,8 +67,8 @@ class MongoDBCache extends CacheProvider
    +     * @see http://www.php.net/manual/mongo.readpreferences.php
    +     * @see http://www.php.net/manual/mongo.writeconcerns.php
    

    Remove www. from www.php.net

  6. +++ b/vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php
    @@ -67,8 +67,8 @@ class MongoDBCache extends CacheProvider
    +     * @see http://www.php.net/manual/mongo.readpreferences.php
    

    Remove www from www.php.net

  7. +++ b/vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php
    @@ -72,7 +72,7 @@ public static function countChars($string)
    +     *            A valid encoding. Examples: http://www.php.net/manual/mbstring.supported-encodings.php
    

    Remove www. from www.php.net

  8. +++ b/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php
    @@ -141,7 +141,7 @@ protected static function recursiveExport($value, $indentation, &$processedObjec
    +            // http://www.php.net/manual/language.types.array.php#73936
    

    Remove www. from www.php.net

  9. +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php
    @@ -12,7 +12,7 @@
    + * detail at {@url http://www.php.net/manual/types.comparisons.php}.
    

    Remove www. from www.php.net

  10. +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php
    @@ -13,7 +13,7 @@
    + * {@url http://www.php.net/manual/types.comparisons.php}.
    

    Remove www. from www.php.net

  11. +++ b/vendor/psr/http-message/src/StreamInterface.php
    @@ -75,7 +75,7 @@ public function isSeekable();
    +     * @link http://www.php.net/manual/function.fseek.php
    

    Remove www. from www.php.net

  12. +++ b/vendor/psr/http-message/src/StreamInterface.php
    @@ -93,7 +93,7 @@ public function seek($offset, $whence = SEEK_SET);
    +     * @link http://www.php.net/manual/function.fseek.php
    

    Remove www. from www.php.net

  13. +++ b/vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php
    @@ -28,7 +28,7 @@ class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface
    +     * @link http://www.php.net/manual/function.finfo-open.php
    

    Remove www. from www.php.net

  14. +++ b/vendor/symfony/process/Process.php
    @@ -391,7 +391,7 @@ public function getPid()
    +     * @param int $signal A valid POSIX signal (see http://www.php.net/manual/pcntl.constants.php)
    

    Remove www. from www.php.net

  15. +++ b/vendor/symfony/process/Process.php
    @@ -1456,7 +1456,7 @@ private function resetProcessData()
    +     * @param int  $signal         A valid POSIX signal (see http://www.php.net/manual/pcntl.constants.php)
    

    Remove www. from www.php.net

GoZ’s picture

  1. +++ b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php
    @@ -51,7 +51,7 @@ public function defaultValuesForm(array &$form, FormStateInterface $form_state)
    +          '#description' => t("Describe a time by reference to the current day, like '+90 days' (90 days from the day the field is created) or '+1 Saturday' (the next Saturday). See <a href=\"http://www.php.net/manual/en/function.strtotime.php\">@strtotime</a> for more details.", array('@strtotime' => 'strtotime')),
    

    Remove /en from www.php.net/manual/en/

  2. +++ b/vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php
    @@ -81,7 +81,7 @@ public static function convertToUTF8($data, $encoding = 'UTF-8')
    +        // details for the bug are on http://php.net/manual/en/function.iconv.php#108643
    

    You miss /en in php.net/manual/en

drupal.ninja03’s picture

Status: Needs work » Needs review
FileSize
104.75 KB
23 KB

Hi,

I have made the changes mentioned in #21 & #22. Please review it.

GoZ’s picture

Status: Needs review » Needs work

Damn fast. Still few thinks in this diff

  1. +++ b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php
    @@ -51,7 +51,7 @@ public function defaultValuesForm(array &$form, FormStateInterface $form_state)
    +          '#description' => t("Describe a time by reference to the current day, like '+90 days' (90 days from the day the field is created) or '+1 Saturday' (the next Saturday). See <a href=\"http://php.net/manual/en/function.strtotime.php\">@strtotime</a> for more details.", array('@strtotime' => 'strtotime')),
    

    Still have php.net/manual/en

  2. +++ b/core/modules/syslog/syslog.module
    @@ -17,7 +17,7 @@ function syslog_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<p>' . t('The Syslog module logs events by sending messages to the logging facility of your web server\'s operating system. Syslog is an operating system administrative logging tool that provides valuable information for use in system management and security auditing. Most suited to medium and large sites, Syslog provides filtering tools that allow messages to be routed by type and severity. For more information, see the <a href=":syslog">online documentation for the Syslog module</a>, as well as PHP\'s documentation pages for the <a href=":php_openlog">openlog</a> and <a href=":php_syslog">syslog</a> functions.', array(':syslog' => 'https://www.drupal.org/documentation/modules/syslog', ':php_openlog' => 'http://php.net/manual/function.openlog.php', ':php_syslog' => 'http://php.net/manual/function.syslog.php')) . '</p>';
    

    Replace placeholders directly by urls.

  3. +++ b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
    @@ -378,7 +378,7 @@ public function getRequirements() {
    +      $requirements['version']['description'] = t('The GD Library for PHP is enabled, but was compiled without support for functions used by the rotate and desaturate effects. It was probably compiled using the official GD libraries from http://www.libgd.org instead of the GD library bundled with PHP. You should recompile PHP --with-gd using the bundled GD library. See <a href=":url">the PHP manual</a>.', array(':url' => 'http://php.net/manual/book.image.php'));
    

    Replace placeholder by url.

GoZ’s picture

I found some not noticed yet place where php.net are displayed in t() with placeholders :

  1. core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/TimestampFormatter.php
    '#description' => $this->t('See <a href=":url" target="_blank">the documentation for PHP date formats</a>.', [':url' => 'http://php.net/manual/function.date.php']),
  2. core/modules/file/file.install
    line 105
    $description = t('Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the <a href=":uploadprogress_url">PECL uploadprogress library</a> (preferred) or to install <a href=":apc_url">APC</a>.', array(':uploadprogress_url' => 'http://pecl.php.net/package/uploadprogress', ':apc_url' => 'http://php.net/apc'));
    
  3. core/modules/file/file.install
    line 112
          $value = t('Enabled (<a href=":url">PECL uploadprogress</a>)', array(':url' => 'http://pecl.php.net/package/uploadprogress'));
    
  4. core/modules/simpletest/simpletest.install
    line 31
              $requirements['curl']['description'] = t('The testing framework could not be installed because the PHP <a href=":curl_url">cURL</a> library is not available.', array(':curl_url' => 'http://php.net/manual/curl.setup.php'));
    
  5. core/modules/simpletest/simpletest.install
    line 52
                  $requirements['php_open_basedir']['description'] = t('The testing framework requires the PHP <a href=":open_basedir-url">open_basedir</a> restriction to be disabled. Check your webserver configuration or contact your web host.', array(':open_basedir-url' => 'http://php.net/manual/ini.core.php#ini.open-basedir'));
    
  6. core/modules/syslog/syslog.module
    line 20
          $output .= '<p>' . t('The Syslog module logs events by sending messages to the logging facility of your web server\'s operating system. Syslog is an operating system administrative logging tool that provides valuable information for use in system management and security auditing. Most suited to medium and large sites, Syslog provides filtering tools that allow messages to be routed by type and severity. For more information, see the <a href=":syslog">online documentation for the Syslog module</a>, as well as PHP\'s documentation pages for the <a href=":php_openlog">openlog</a> and <a href=":php_syslog">syslog</a> functions.', array(':syslog' => 'https://www.drupal.org/documentation/modules/syslog', ':php_openlog' => 'http://php.net/manual/function.openlog.php', ':php_syslog' => 'http://php.net/manual/function.syslog.php')) . '</p>';
    
  7. core/modules/system/system.install
    line 249
            'description' => t('PHP OPcode caching can improve your site\'s performance considerably. It is <strong>highly recommended</strong> to have <a href=":opcache_link" target="_blank">OPcache</a> installed on your server.', array(':opcache_link' => 'http://php.net/manual/opcache.installation.php')),
    
  8. core/modules/system/src/Form/DateFormatFormBase.php
    line 107
          '#description' => $this->t('A user-defined date format. See the <a href=":url">PHP manual</a> for available options.', array(':url' => 'http://php.net/manual/function.date.php')),
    
  9. core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
    line 381
          $requirements['version']['description'] = t('The GD Library for PHP is enabled, but was compiled without support for functions used by the rotate and desaturate effects. It was probably compiled using the official GD libraries from http://www.libgd.org instead of the GD library bundled with PHP. You should recompile PHP --with-gd using the bundled GD library. See <a href=":url">the PHP manual</a>.', array(':url' => 'http://php.net/manual/book.image.php'));
    
drupal.ninja03’s picture

Status: Needs work » Needs review
FileSize
11.36 KB
108.89 KB

Hi,

As per comment#24 and #25, I have made the necessary changes and corrections. I hope this is exactly what you need. Kindly review my patch. Thanks.

GoZ’s picture

Status: Needs review » Needs work
+++ b/core/modules/file/file.install
@@ -102,14 +102,14 @@ function file_requirements($phase) {
+      $description = t('Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the <a href=":uploadprogress_url">PECL uploadprogress library</a> (preferred) or to install <a href="http://php.net/apc">APC</a>.', array(':uploadprogress_url' => 'http://pecl.php.net/package/uploadprogress'));

:uploadprogress_url should be replaced by url in t()

+++ b/core/modules/syslog/syslog.module
@@ -17,7 +17,7 @@ function syslog_help($route_name, RouteMatchInterface $route_match) {
+      $output .= '<p>' . t('The Syslog module logs events by sending messages to the logging facility of your web server\'s operating system. Syslog is an operating system administrative logging tool that provides valuable information for use in system management and security auditing. Most suited to medium and large sites, Syslog provides filtering tools that allow messages to be routed by type and severity. For more information, see the <a href=":syslog">online documentation for the Syslog module</a>, as well as PHP\'s documentation pages for the <a href="http://php.net/manual/function.openlog.php">openlog</a> and <a href="http://php.net/manual/function.syslog.php">syslog</a> functions.', array(':syslog' => 'https://www.drupal.org/documentation/modules/syslog')) . '</p>';

:syslog should be replaced by url in t()

When you make a patch, you should name it with comment number you'll post it, and not comment your patch try to fix. You can use "Patch name suggestion" Button in right of upload area to help you naming your patch. So interdiff also refer to 2 comments where patchs are posted.

drupal.ninja03’s picture

Status: Needs work » Needs review
FileSize
109.67 KB
3.15 KB

Hi GoZ,

I have made the changes suggested by you and uploaded the patch and interdiff files. Please review it. Thanks.

GoZ’s picture

Status: Needs review » Reviewed & tested by the community

Seems good to me and ready to RTBC.

Someone see something else missing ?

The last submitted patch, 8: wikipedia_php_links-2571845-8-D8.patch, failed testing.

stefan.r’s picture

diff --git a/core-localized-links-2571845-16-D8.patch b/core-localized-links-2571845-16-D8.patch
new file mode 100644
index 0000000..8edb100
--- /dev/null
+++ b/core-localized-links-2571845-16-D8.patch
@@ -0,0 +1,235 @@
+diff --git a/core/core.api.php b/core/core.api.php
+index 69e074c..3e983cd 100644
+--- a/core/core.api.php
++++ b/core/core.api.php
+@@ -79,9 +79,9 @@
+  * Web services make it possible for applications and web sites to read and
+  * update information from other web sites. There are several standard
+  * techniques for providing web services, including:
+- * - SOAP: http://en.wikipedia.org/wiki/SOAP SOAP
+- * - XML-RPC: http://en.wikipedia.org/wiki/XML-RPC
+- * - REST: http://en.wikipedia.org/wiki/Representational_state_transfer
++ * - SOAP: http://wikipedia.org/wiki/SOAP
++ * - XML-RPC: http://wikipedia.org/wiki/XML-RPC
++ * - REST: http://wikipedia.org/wiki/Representational_state_transfer
+  * Drupal sites can both provide web services and integrate third-party web
+  * services.
+  *
+@@ -254,7 +254,7 @@
+  * - Exporting and importing configuration.
+  *
+  * The file storage format for configuration information in Drupal is
+- * @link http://en.wikipedia.org/wiki/YAML YAML files. @endlink Configuration is
++ * @link http://wikipedia.org/wiki/YAML YAML files. @endlink Configuration is
+  * divided into files, each containing one configuration object. The file name
+  * for a configuration object is equal to the unique name of the configuration,
+  * with a '.yml' extension. The default configuration files for each module are
+diff --git a/core/lib/Drupal/Component/Datetime/DateTimePlus.php b/core/lib/Drupal/Component/Datetime/DateTimePlus.php
+index 4540b3b..a2a38a8 100644
+--- a/core/lib/Drupal/Component/Datetime/DateTimePlus.php
++++ b/core/lib/Drupal/Component/Datetime/DateTimePlus.php
+@@ -177,7 +177,7 @@ public static function createFromTimestamp($timestamp, $timezone = NULL, $settin
+    *   to use things like negative years, which php's parser fails on, or
+    *   any other specialized input with a known format. If provided the
+    *   date will be created using the createFromFormat() method.
+-   *   @see http://us3.php.net/manual/en/datetime.createfromformat.php
++   *   @see http://php.net/manual/datetime.createfromformat.php
+    * @param mixed $time
+    *   @see __construct()
+    * @param mixed $timezone
+@@ -389,7 +389,7 @@ protected function prepareFormat($format) {
+    * PHP creates a valid date from invalid data with only a warning,
+    * 2011-02-30 becomes 2011-03-03, for instance, but we don't want that.
+    *
+-   * @see http://us3.php.net/manual/en/time.getlasterrors.php
++   * @see http://php.net/manual/en/time.getlasterrors.php
+    */
+   public function checkErrors() {
+     $errors = \DateTime::getLastErrors();
+diff --git a/core/lib/Drupal/Component/Utility/Bytes.php b/core/lib/Drupal/Component/Utility/Bytes.php
+index 0bcac31..4d331ea 100644
+--- a/core/lib/Drupal/Component/Utility/Bytes.php
++++ b/core/lib/Drupal/Component/Utility/Bytes.php
+@@ -15,7 +15,7 @@ class Bytes {
+   /**
+    * The number of bytes in a kilobyte.
+    *
+-   * @see http://en.wikipedia.org/wiki/Kilobyte
++   * @see http://wikipedia.org/wiki/Kilobyte
+    */
+   const KILOBYTE = 1024;
+
+diff --git a/core/lib/Drupal/Component/Utility/Html.php b/core/lib/Drupal/Component/Utility/Html.php
+index 0c811f2..d13c134 100644
+--- a/core/lib/Drupal/Component/Utility/Html.php
++++ b/core/lib/Drupal/Component/Utility/Html.php
+@@ -334,7 +334,7 @@ public static function escapeCdataElement(\DOMNode $node, $comment_start = '//',
+         // Prevent invalid cdata escaping as this would throw a DOM error.
+         // This is the same behavior as found in libxml2.
+         // Related W3C standard: http://www.w3.org/TR/REC-xml/#dt-cdsection
+-        // Fix explanation: http://en.wikipedia.org/wiki/CDATA#Nesting
++        // Fix explanation: http://wikipedia.org/wiki/CDATA#Nesting
+         $data = str_replace(']]>', ']]]]><![CDATA[>', $child_node->data);
+
+         $fragment = $node->ownerDocument->createDocumentFragment();
+diff --git a/core/lib/Drupal/Core/Config/ConfigBase.php b/core/lib/Drupal/Core/Config/ConfigBase.php
+index 0d66c66..3c464d9 100644
+--- a/core/lib/Drupal/Core/Config/ConfigBase.php
++++ b/core/lib/Drupal/Core/Config/ConfigBase.php
+@@ -55,7 +55,7 @@
+    * incompatible with this limitation are created, we enforce a maximum name
+    * length of 250 characters (leaving 5 characters for the file extension).
+    *
+-   * @see http://en.wikipedia.org/wiki/Comparison_of_file_systems
++   * @see http://wikipedia.org/wiki/Comparison_of_file_systems
+    *
+    * Configuration objects not stored on the filesystem should still be
+    * restricted in name length so name can be used as a cache key.
+diff --git a/core/lib/Drupal/Core/Render/Element/HtmlTag.php b/core/lib/Drupal/Core/Render/Element/HtmlTag.php
+index f2bcacf..158889c 100644
+--- a/core/lib/Drupal/Core/Render/Element/HtmlTag.php
++++ b/core/lib/Drupal/Core/Render/Element/HtmlTag.php
+@@ -147,7 +147,7 @@ public static function preRenderConditionalComments($element) {
+     // conditional comment markup. The conditional comment expression is
+     // evaluated by Internet Explorer only. To control the rendering by other
+     // browsers, use either the "downlevel-hidden" or "downlevel-revealed"
+-    // technique. See http://en.wikipedia.org/wiki/Conditional_comment
++    // technique. See http://wikipedia.org/wiki/Conditional_comment
+     // for details.
+
+     // Ensure what we are dealing with is safe.
+diff --git a/core/modules/file/src/Plugin/Field/FieldFormatter/RSSEnclosureFormatter.php b/core/modules/file/src/Plugin/Field/FieldFormatter/RSSEnclosureFormatter.php
+index ad3418f..ab479f3 100644
+--- a/core/modules/file/src/Plugin/Field/FieldFormatter/RSSEnclosureFormatter.php
++++ b/core/modules/file/src/Plugin/Field/FieldFormatter/RSSEnclosureFormatter.php
+@@ -28,7 +28,7 @@ class RSSEnclosureFormatter extends FileFormatterBase {
+   public function viewElements(FieldItemListInterface $items, $langcode) {
+     $entity = $items->getEntity();
+     // Add the first file as an enclosure to the RSS item. RSS allows only one
+-    // enclosure per item. See: http://en.wikipedia.org/wiki/RSS_enclosure
++    // enclosure per item. See: http://wikipedia.org/wiki/RSS_enclosure
+     foreach ($this->getEntitiesToView($items, $langcode) as $delta => $file) {
+       $entity->rss_elements[] = array(
+         'key' => 'enclosure',
+diff --git a/core/modules/hal/hal.module b/core/modules/hal/hal.module
+index 90696d4..f59cf3c 100644
+--- a/core/modules/hal/hal.module
++++ b/core/modules/hal/hal.module
+@@ -16,7 +16,7 @@ function hal_help($route_name, RouteMatchInterface $route_match) {
+       $output = '';
+       $output .= '<h3>' . t('About') . '</h3>';
+       $output .= '<p>' . t('<a href=":hal_spec">Hypertext Application Language (HAL)</a> is a format that supports the linking required for hypermedia APIs.', array(':hal_spec' => 'http://stateless.co/hal_specification.html')) . '</p>';
+-      $output .= '<p>' . t('Hypermedia APIs are a style of Web API that uses URIs to identify resources and the <a href=":link_rel">link relations</a> between them, enabling API consumers to follow links to discover API functionality.', array(':link_rel' => 'http://en.wikipedia.org/wiki/Link_relation')) . '</p>';
++      $output .= '<p>' . t('Hypermedia APIs are a style of Web API that uses URIs to identify resources and the <a href=":link_rel">link relations</a> between them, enabling API consumers to follow links to discover API functionality.', array(':link_rel' => 'http://wikipedia.org/wiki/Link_relation')) . '</p>';
+       $output .= '<p>' . t('This module adds support for serializing entities (such as content items, taxonomy terms, etc.) to the JSON version of HAL. For more information, see the <a href=":hal_do">online documentation for the HAL module</a>.', array(':hal_do' => 'https://www.drupal.org/documentation/modules/hal')) . '</p>';
+       return $output;
+   }
+diff --git a/core/modules/image/image.module b/core/modules/image/image.module
+index 2c222f8..97dfc7c 100644
+--- a/core/modules/image/image.module
++++ b/core/modules/image/image.module
+@@ -66,7 +66,7 @@ function image_help($route_name, RouteMatchInterface $route_match) {
+       $output .= '<dd>' . t('For accessibility and search engine optimization, all images that convey meaning on web sites should have alternate text. Drupal also allows entry of title text for images, but it can lead to confusion for screen reader users and its use is not recommended. Image fields can be configured so that alternate and title text fields are enabled or disabled; if enabled, the fields can be set to be required. The recommended setting is to enable and require alternate text and disable title text.') . '</dd>';
+       $output .= '<dd>' . t('When you create an image field, you will need to choose whether the uploaded images will be stored in the public or private file directory defined in your settings.php file and shown on the <a href=":file-system">File system page</a>. This choice cannot be changed later. You can also configure your field to store files in a subdirectory of the public or private directory; this setting can be changed later and can be different for each entity sub-type using the field. For more information on file storage, see the <a href=":system-help">System module help page</a>.', array(':file-system' => \Drupal::url('system.file_system_settings'), ':system-help' => \Drupal::url('help.page', array('name' => 'system')))) . '</dd>';
+       $output .= '<dd>' . t('The maximum file size that can be uploaded is limited by PHP settings of the server, but you can restrict it further by configuring a <em>Maximum upload size</em> in the field settings (this setting can be changed later). The maximum file size, either from PHP server settings or field configuration, is automatically displayed to users in the help text of the image field.') . '</dd>';
+-      $output .= '<dd>' . t('You can also configure a minimum and/or maximum resolution for uploaded images. Images that are too small will be rejected. Images that are to large will be resized. During the resizing the <a href=":exif">EXIF data</a> in the image will be lost.', array(':exif' => 'http://en.wikipedia.org/wiki/Exchangeable_image_file_format')) . '</dd>';
++      $output .= '<dd>' . t('You can also configure a minimum and/or maximum resolution for uploaded images. Images that are too small will be rejected. Images that are to large will be resized. During the resizing the <a href=":exif">EXIF data</a> in the image will be lost.', array(':exif' => 'http://wikipedia.org/wiki/Exchangeable_image_file_format')) . '</dd>';
+       $output .= '<dd>' . t('You can also configure a default image that will be used if no image is uploaded in an image field. This default can be defined for all instances of the field in the field storage settings when you create a field, and the setting can be overridden for each entity sub-type that uses the field.') . '</dd>';
+       $output .= '<dt>' . t('Configuring displays and form displays') . '</dt>';
+       $output .= '<dd>' . t('On the <em>Manage display</em> page, you can choose the image formatter, which determines the image style used to display the image in each display mode and whether or not to display the image as a link. On the <em>Manage form display</em> page, you can configure the image upload widget, including setting the preview image style shown on the entity edit form.') . '</dd>';
+diff --git a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php
+index 442929f..82d12e0 100644
+--- a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php
++++ b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php
+@@ -212,7 +212,7 @@ public function fieldSettingsForm(array $form, FormStateInterface $form_state) {
+       '#weight' => 4.1,
+       '#field_prefix' => '<div class="container-inline">',
+       '#field_suffix' => '</div>',
+-      '#description' => t('The maximum allowed image size expressed as WIDTH×HEIGHT (e.g. 640×480). Leave blank for no restriction. If a larger image is uploaded, it will be resized to reflect the given width and height. Resizing images on upload will cause the loss of <a href=":url">EXIF data</a> in the image.', array(':url' => 'http://en.wikipedia.org/wiki/Exchangeable_image_file_format')),
++      '#description' => t('The maximum allowed image size expressed as WIDTH×HEIGHT (e.g. 640×480). Leave blank for no restriction. If a larger image is uploaded, it will be resized to reflect the given width and height. Resizing images on upload will cause the loss of <a href=":url">EXIF data</a> in the image.', array(':url' => 'http://wikipedia.org/wiki/Exchangeable_image_file_format')),
+     );
+     $element['max_resolution']['x'] = array(
+       '#type' => 'number',
+diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php
+index c481a85..99a0af8 100644
+--- a/core/modules/views/src/Plugin/views/query/Sql.php
++++ b/core/modules/views/src/Plugin/views/query/Sql.php
+@@ -1838,7 +1838,7 @@ public function getDateFormat($field, $format, $string_date = FALSE) {
+
+         // SQLite does not have a ISO week substitution string, so it needs
+         // special handling.
+-        // @see http://en.wikipedia.org/wiki/ISO_week_date#Calculation
++        // @see http://wikipedia.org/wiki/ISO_week_date#Calculation
+         // @see http://stackoverflow.com/a/15511864/1499564
+         if ($format === '%W') {
+           $expression = "((strftime('%j', date(strftime('%Y-%m-%d', $field" . $unixepoch . "), '-3 days', 'weekday 4')) - 1) / 7 + 1)";
+diff --git a/core/modules/views/src/Tests/Handler/ArgumentDateTest.php b/core/modules/views/src/Tests/Handler/ArgumentDateTest.php
+index 678698f..0a5a2d5 100644
+--- a/core/modules/views/src/Tests/Handler/ArgumentDateTest.php
++++ b/core/modules/views/src/Tests/Handler/ArgumentDateTest.php
+@@ -175,7 +175,7 @@ public function testWeekHandler() {
+     $view = Views::getView('test_argument_date');
+     $view->setDisplay('embed_3');
+     // Check the week calculation for a leap year.
+-    // @see http://en.wikipedia.org/wiki/ISO_week_date#Calculation
++    // @see http://wikipedia.org/wiki/ISO_week_date#Calculation
+     $this->executeView($view, array('39'));
+     $expected = array();
+     $expected[] = array('id' => 1);
+@@ -184,7 +184,7 @@ public function testWeekHandler() {
+
+     $view->setDisplay('embed_3');
+     // Check the week calculation for the 29th of February in a leap year.
+-    // @see http://en.wikipedia.org/wiki/ISO_week_date#Calculation
++    // @see http://wikipedia.org/wiki/ISO_week_date#Calculation
+     $this->executeView($view, array('09'));
+     $expected = array();
+     $expected[] = array('id' => 2);
+diff --git a/core/modules/views/src/Tests/Handler/SortRandomTest.php b/core/modules/views/src/Tests/Handler/SortRandomTest.php
+index 9a9b5a6..0fe29ac 100644
+--- a/core/modules/views/src/Tests/Handler/SortRandomTest.php
++++ b/core/modules/views/src/Tests/Handler/SortRandomTest.php
+@@ -34,7 +34,7 @@ class SortRandomTest extends ViewKernelTestBase {
+    * of protons / electrons in the observable universe, also called the
+    * eddington number.
+    *
+-   * @see http://en.wikipedia.org/wiki/Eddington_number
++   * @see http://wikipedia.org/wiki/Eddington_number
+    */
+   protected function dataSet() {
+     $data = parent::dataSet();
+diff --git a/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
+index de7f428..470d255 100644
+--- a/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
++++ b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
+@@ -118,7 +118,7 @@ public function providerTestPhpTransliteration() {
+     // http://www.unicode.org/charts/PDF/U1400.pdf
+     $four_byte = html_entity_decode('&#x1411;', ENT_NOQUOTES, 'UTF-8');
+     // These are two Gothic alphabet letters. See
+-    // http://en.wikipedia.org/wiki/Gothic_alphabet
++    // http://wikipedia.org/wiki/Gothic_alphabet
+     // They are not in our tables, but should at least give us '?' (unknown).
+     $five_byte = html_entity_decode('&#x10330;&#x10338;', ENT_NOQUOTES, 'UTF-8');
+
+diff --git a/core/tests/Drupal/Tests/Core/Transliteration/PhpTransliterationTest.php b/core/tests/Drupal/Tests/Core/Transliteration/PhpTransliterationTest.php
+index 6788011..9dc8388 100644
+--- a/core/tests/Drupal/Tests/Core/Transliteration/PhpTransliterationTest.php
++++ b/core/tests/Drupal/Tests/Core/Transliteration/PhpTransliterationTest.php
+@@ -50,7 +50,7 @@ public function testPhpTransliterationWithAlter($langcode, $original, $expected,
+           // The default transliteration of Ä is A, but change it to Z for testing.
+           $overrides[0xC4] = 'Z';
+           // Also provide transliterations of two 5-byte characters from
+-          // http://en.wikipedia.org/wiki/Gothic_alphabet.
++          // http://wikipedia.org/wiki/Gothic_alphabet.
+           $overrides[0x10330] = 'A';
+           $overrides[0x10338] = 'Th';
+         }
+@@ -73,7 +73,7 @@ public function providerTestPhpTransliterationWithAlter() {
+     // Note that the 3-byte character is overridden by the 'kg' language.
+     $two_byte = 'Ä Ö Ü Å Ø äöüåøhello';
+     // These are two Gothic alphabet letters. See
+-    // http://en.wikipedia.org/wiki/Gothic_alphabet
++    // http://wikipedia.org/wiki/Gothic_alphabet
+     // They are not in our tables, but should at least give us '?' (unknown).
+     $five_byte = html_entity_decode('&#x10330;&#x10338;', ENT_NOQUOTES, 'UTF-8');
+     // Five-byte characters do not work in MySQL, so make a printable version.

This can be removed.

Other than that I think the current approach is fine, the difference with HEAD is that we stop using the t('<a href=":url">') pattern for "translatable" URLs and instead put the URL in the translatable text directly.

stefan.r’s picture

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 28: core-localized-links-2571845-28-D8.patch, failed testing.

drupal.ninja03’s picture

Status: Needs work » Needs review

Hi stefan.r,

I believe you are looking at an old version of the patch file I have submitted. Please review the latest file: core-localized-links-2571845-28-D8.patch as mentioned in comment#28.
Thanks.

The last submitted patch, 8: wikipedia_php_links-2571845-8-D8.patch, failed testing.

stefan.r’s picture

Status: Needs review » Needs work
stefan.r’s picture

stefan.r’s picture

drupal.ninja03’s picture

Status: Needs work » Needs review
FileSize
92.02 KB

Hi Stefan.r,

I have removed the lines you have highlighted. Please review it. Thanks.

GoZ’s picture

@drupal.ninja03 you miss interdiff

drupal.ninja03’s picture

FileSize
17.65 KB

Hi GoZ,

Interdiff attached. Please review.

GoZ’s picture

Status: Needs review » Needs work

Ok, my bad. I make you add some changes in vendor/ files. I should be tired this day... Vendors should not be changed.

Please remove them and forgive me for this bad request.

	modified:   vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php
	modified:   vendor/easyrdf/easyrdf/README.md
	modified:   vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/HTML.php
	modified:   vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/XML.php
	modified:   vendor/guzzlehttp/psr7/src/InflateStream.php
	modified:   vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php
	modified:   vendor/masterminds/html5/src/HTML5/Serializer/Traverser.php
	modified:   vendor/mikey179/vfsStream/src/main/php/org/bovigo/vfs/vfsStreamWrapper.php
	modified:   vendor/phpdocumentor/reflection-docblock/README.md
	modified:   vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php
	modified:   vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php
	modified:   vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php
	modified:   vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php
	modified:   vendor/phpunit/phpunit/src/Util/Blacklist.php
	modified:   vendor/psr/http-message/src/StreamInterface.php
	modified:   vendor/psr/http-message/src/UploadedFileInterface.php
	modified:   vendor/symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php
	modified:   vendor/symfony/http-foundation/ParameterBag.php
	modified:   vendor/symfony/http-foundation/Request.php
	modified:   vendor/symfony/http-foundation/ServerBag.php
	modified:   vendor/symfony/http-kernel/Profiler/Profiler.php
	modified:   vendor/symfony/process/Process.php
	modified:   vendor/symfony/serializer/Encoder/JsonDecode.php
	modified:   vendor/symfony/serializer/Encoder/JsonEncode.php
	modified:   vendor/symfony/translation/Interval.php
	modified:   vendor/symfony/validator/Constraints/AbstractComparisonValidator.php
	modified:   vendor/symfony/validator/Constraints/CardSchemeValidator.php
	modified:   vendor/symfony/validator/Constraints/IsbnValidator.php
	modified:   vendor/symfony/validator/Constraints/IssnValidator.php
	modified:   vendor/symfony/validator/Constraints/LuhnValidator.php
	modified:   vendor/symfony/validator/Constraints/RangeValidator.php
	modified:   vendor/symfony/validator/Constraints/UuidValidator.php
	modified:   vendor/twig/twig/lib/Twig/ExpressionParser.php
	modified:   vendor/twig/twig/lib/Twig/Extension/Core.php
	modified:   vendor/zendframework/zend-diactoros/src/HeaderSecurity.php
	modified:   vendor/zendframework/zend-diactoros/src/UploadedFile.php

There is something wrong with your interdiff, please read https://www.drupal.org/documentation/git/interdiff to know how to generate interdiff.

anil280988’s picture

Status: Needs work » Needs review
FileSize
66.15 KB
66.15 KB

Hi GoZ/drupal.ninja03,
Remove the changes listed in comment #42, @GoZ.

jhodgdon’s picture

Status: Needs review » Needs work

Thanks for the patches! Sorry for delay in reviewing, I've been on vacation...

This is mostly good. A few notes:

  1. +++ b/core/includes/file.inc
    @@ -631,7 +631,7 @@ function file_munge_filename($filename, $extensions, $alerts = TRUE) {
    +    // Remove any null bytes. See http://php.net/manual/security.filesystem.nullbytes.php
    

    This is over 80 characters and should be wrapped.

  2. +++ b/core/lib/Drupal/Core/Database/Log.php
    @@ -136,7 +136,7 @@ public function log(StatementInterface $statement, $args, $time) {
    -   * @link http://www.php.net/debug_backtrace
    +   * @link http://php.net/debug_backtrace
    

    This @link is wrong. There is no @endlink. Presumably it should be a @see instead? And should be at the end of the doc block.

  3. +++ b/core/modules/aggregator/aggregator.module
    @@ -49,7 +49,7 @@ function aggregator_help($route_name, RouteMatchInterface $route_match) {
    -      $output = '<p>' . t('Many sites publish their headlines and posts in feeds, using a number of standardized XML-based formats. The aggregator supports <a href="http://en.wikipedia.org/wiki/Rss">RSS</a>, <a href="http://en.wikipedia.org/wiki/Resource_Description_Framework">RDF</a>, and <a href="http://en.wikipedia.org/wiki/Atom_%28standard%29">Atom</a>.') . '</p>';
    +      $output = '<p>' . t('Many sites publish their headlines and posts in feeds, using a number of standardized XML-based formats. The aggregator supports <a href="http://wikipedia.org/wiki/Rss">RSS</a>, <a href="http://wikipedia.org/wiki/Resource_Description_Framework">RDF</a>, and <a href="http://wikipedia.org/wiki/Atom_%28standard%29">Atom</a>.') . '</p>';
    

    IMO, we should drop this change. The wikipedia URL is already part of the string, and I don't think it's worth invalidating translations to remove the "en" from the URL.

  4. +++ b/core/modules/basic_auth/basic_auth.module
    @@ -15,7 +15,7 @@ function basic_auth_help($route_name, RouteMatchInterface $route_match) {
    -      $output .= '<p>' . t('The HTTP Basic Authentication module supplies an <a href="http://en.wikipedia.org/wiki/Basic_access_authentication">HTTP Basic authentication</a> provider for web service requests. This authentication provider authenticates requests using the HTTP Basic Authentication username and password, as an alternative to using Drupal\'s standard cookie-based authentication system. It is only useful if your site provides web services configured to use this type of authentication (for instance, the <a href=":rest_help">RESTful Web Services module</a>). For more information, see the <a href=":hba_do">online documentation for the HTTP Basic Authentication module</a>.', array(':hba_do' => 'https://www.drupal.org/documentation/modules/basic_auth', ':rest_help' => (\Drupal::moduleHandler()->moduleExists('rest')) ? \Drupal::url('help.page', array('name' => 'rest')) : '#')) . '</p>';
    +      $output .= '<p>' . t('The HTTP Basic Authentication module supplies an <a href="http://wikipedia.org/wiki/Basic_access_authentication">HTTP Basic authentication</a> provider for web service requests. This authentication provider authenticates requests using the HTTP Basic Authentication username and password, as an alternative to using Drupal\'s standard cookie-based authentication system. It is only useful if your site provides web services configured to use this type of authentication (for instance, the <a href=":rest_help">RESTful Web Services module</a>). For more information, see the <a href=":hba_do">online documentation for the HTTP Basic Authentication module</a>.', array(':hba_do' => 'https://www.drupal.org/documentation/modules/basic_auth', ':rest_help' => (\Drupal::moduleHandler()->moduleExists('rest')) ? \Drupal::url('help.page', array('name' => 'rest')) : '#')) . '</p>';
    

    Same here.

  5. +++ b/core/modules/breakpoint/breakpoint.module
    @@ -23,7 +23,7 @@ function breakpoint_help($route_name, RouteMatchInterface $route_match) {
    -      $output .= '<dd>' . t('Resolution multipliers are a measure of the viewport\'s device resolution, defined to be the ratio between the physical pixel size of the active device and the <a href="http://en.wikipedia.org/wiki/Device_independent_pixel">device-independent pixel</a> size. The Breakpoint module defines multipliers of 1, 1.5, and 2; when defining breakpoints, modules and themes can define which multipliers apply to each breakpoint.') . '</dd>';
    +      $output .= '<dd>' . t('Resolution multipliers are a measure of the viewport\'s device resolution, defined to be the ratio between the physical pixel size of the active device and the <a href="http://wikipedia.org/wiki/Device_independent_pixel">device-independent pixel</a> size. The Breakpoint module defines multipliers of 1, 1.5, and 2; when defining breakpoints, modules and themes can define which multipliers apply to each breakpoint.') . '</dd>';
    

    Same here.

  6. +++ b/core/modules/color/color.install
    @@ -22,14 +22,14 @@ function color_requirements($phase) {
    -        $requirements['color_gd']['description'] = t('The GD library for PHP is enabled, but was compiled without PNG support. Check the <a href=":url">PHP image documentation</a> for information on how to correct this.', array(':url' => 'http://www.php.net/manual/ref.image.php'));
    +        $requirements['color_gd']['description'] = t('The GD library for PHP is enabled, but was compiled without PNG support. Check the <a href="http://php.net/manual/ref.image.php">PHP image documentation</a> for information on how to correct this.');
    

    Now here, we are moving the URL into the string, and that is important to do, so we do want this change.

  7. +++ b/core/modules/datetime/datetime.module
    @@ -36,7 +36,7 @@ function datetime_help($route_name, RouteMatchInterface $route_match) {
    -      $output .= '<dd>' . t('Dates can be displayed using the <em>Plain</em> or the <em>Default</em> formatter. The <em>Plain</em> formatter displays the date in the <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> format. If you choose the <em>Default</em> formatter, you can choose a format from a predefined list that can be managed on the <a href=":date_format_list">Date and time formats</a> page.', array(':date_format_list'=> \Drupal::url('entity.date_format.collection'))) . '</dd>';
    +      $output .= '<dd>' . t('Dates can be displayed using the <em>Plain</em> or the <em>Default</em> formatter. The <em>Plain</em> formatter displays the date in the <a href="http://wikipedia.org/wiki/ISO_8601">ISO 8601</a> format. If you choose the <em>Default</em> formatter, you can choose a format from a predefined list that can be managed on the <a href=":date_format_list">Date and time formats</a> page.', array(':date_format_list'=> \Drupal::url('entity.date_format.collection'))) . '</dd>';
    

    Another one we shouldn't change.

  8. +++ b/core/modules/datetime/src/Plugin/Field/FieldType/DateTimeFieldItemList.php
    @@ -51,7 +51,7 @@ public function defaultValuesForm(array &$form, FormStateInterface $form_state)
    +          '#description' => t("Describe a time by reference to the current day, like '+90 days' (90 days from the day the field is created) or '+1 Saturday' (the next Saturday). See <a href=\"http://php.net/manual/function.strtotime.php\">@strtotime</a> for more details.", array('@strtotime' => 'strtotime')),
    

    I don't understand why we are escaping the name of the strtotime function here. Let's move this into the main string too instead of using @strtotime?

  9. +++ b/core/modules/file/file.install
    @@ -98,18 +98,18 @@ function file_requirements($phase) {
    -      $description = t('Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the <a href=":uploadprogress_url">PECL uploadprogress library</a> (preferred) or to install <a href=":apc_url">APC</a>.', array(':uploadprogress_url' => 'http://pecl.php.net/package/uploadprogress', ':apc_url' => 'http://php.net/apc'));
    +      $description = t('Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the <a href=":uploadprogress_url">PECL uploadprogress library</a> (preferred) or to install <a href="http://php.net/apc">APC</a>.', array(':uploadprogress_url' => 'http://pecl.php.net/package/uploadprogress'));
    

    :uploadprogress_url should also be moved into the string.

  10. +++ b/core/modules/image/image.module
    @@ -66,7 +66,7 @@ function image_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<dd>' . t('You can also configure a minimum and/or maximum resolution for uploaded images. Images that are too small will be rejected. Images that are to large will be resized. During the resizing the <a href=":exif">EXIF data</a> in the image will be lost.', array(':exif' => 'http://wikipedia.org/wiki/Exchangeable_image_file_format')) . '</dd>';
    

    :exif URL should be moved into the translatable string.

  11. +++ b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php
    @@ -212,7 +212,7 @@ public function fieldSettingsForm(array $form, FormStateInterface $form_state) {
    +      '#description' => t('The maximum allowed image size expressed as WIDTH×HEIGHT (e.g. 640×480). Leave blank for no restriction. If a larger image is uploaded, it will be resized to reflect the given width and height. Resizing images on upload will cause the loss of <a href=":url">EXIF data</a> in the image.', array(':url' => 'http://wikipedia.org/wiki/Exchangeable_image_file_format')),
    

    :url should be in the string.

  12. +++ b/core/modules/rest/rest.install
    @@ -16,7 +16,7 @@ function rest_requirements($phase) {
    -      'description' => t('The always_populate_raw_post_data PHP setting should be set to -1 in PHP version 5.6. Please check the <a href="https://php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data">PHP manual</a> for information on how to correct this.'),
    +      'description' => t('The always_populate_raw_post_data PHP setting should be set to -1 in PHP version 5.6. Please check the <a href="https://php.net/manual/ini.core.php#ini.always-populate-raw-post-data">PHP manual</a> for information on how to correct this.'),
    

    Should not make this string change.

  13. +++ b/core/modules/syslog/syslog.module
    @@ -17,7 +17,7 @@ function syslog_help($route_name, RouteMatchInterface $route_match) {
    +      $output .= '<p>' . t('The Syslog module logs events by sending messages to the logging facility of your web server\'s operating system. Syslog is an operating system administrative logging tool that provides valuable information for use in system management and security auditing. Most suited to medium and large sites, Syslog provides filtering tools that allow messages to be routed by type and severity. For more information, see the <a href="https://www.drupal.org/documentation/modules/syslog">online documentation for the Syslog module</a>, as well as PHP\'s documentation pages for the <a href="http://php.net/manual/function.openlog.php">openlog</a> and <a href="http://php.net/manual/function.syslog.php">syslog</a> functions.') . '</p>';
    

    We generally do not move drupal.org URLs into the translatable strings.

  14. +++ b/core/modules/views/src/Plugin/views/field/Date.php
    @@ -111,7 +111,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    -      '#description' => $this->t('If "Custom", see <a href="http://us.php.net/manual/en/function.date.php" target="_blank">the PHP docs</a> for date formats. Otherwise, enter the number of different time units to display, which defaults to 2.'),
    +      '#description' => $this->t('If "Custom", see <a href="http://php.net/manual/function.date.php" target="_blank">the PHP docs</a> for date formats. Otherwise, enter the number of different time units to display, which defaults to 2.'),
    

    Probably should not make this change.

  15. +++ b/core/modules/views/src/Tests/Handler/FieldDateTest.php
    @@ -80,7 +80,7 @@ public function testFieldDate() {
    +        // ISO 8601 format @see http://php.net/manual/function.date.php
    

    In // comments, we usually do not use @see. Just say "see".

  16. +++ b/vendor/psr/http-message/src/StreamInterface.php
    @@ -93,7 +93,7 @@ public function seek($offset, $whence = SEEK_SET);
    +     * @link ttp://www.php.net/manual/en/function.fseek.php
    

    Lost the h in http. Also this should be @see, and we need to lose the en. in the URL.

  17. +++ b/vendor/psr/http-message/src/StreamInterface.php
    @@ -148,7 +148,7 @@ public function getContents();
    +     * @link http://www.php.net/manual/en/function.fseek.php
    

    Should be @see and at the end of the doc block. Also need to lose the /en in the URL. And why did you add www?

Himanshu5050’s picture

Himanshu5050’s picture

Assigned: Himanshu5050 » Unassigned
r_sharma08’s picture

Status: Needs work » Needs review
FileSize
57.52 KB
21.55 KB

Applied patch.
#13 did not patched, as I need more clarity. how to resolve it?
Please review.

Status: Needs review » Needs work

The last submitted patch, 47: core-localized-links-2571845-47.patch, failed testing.

hussainweb’s picture

Fixing for comments in #44. I removed the changes pointed in 16 and 17 as that was in vendor and we shouldn't touch that here at all.

hussainweb’s picture

FileSize
22.96 KB

I think I lost the interdiff in crosspost. Here it is.

@r_sharma08: There was a PHP error in your patch as we can see from CI output. Can you review the patch I uploaded instead? It also fixes for the point 13. Please let me know if you need any help.

r_sharma08’s picture

Thanks hussainweb.

r_sharma08’s picture

Thanks hussainweb.

jhodgdon’s picture

Component: documentation » other
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

OK... Within the scope of this issue, the patch is OK. As it is changing translatable strings, I am changing the component to "other". I suspect that it may be pushed off to 8.1.x but I am not sure about the policy on translatable strings so we'll see.

Updated the issue summary to highlight that translatable strings are affected.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 49: core-localized-links-2571845-47.patch, failed testing.

anil280988’s picture

Hi,
How this patch has gone to Needs Work again? Do we have to upload the last patch again?

jhodgdon’s picture

RE #55, if you click through to the failed test in #49, it looks like the patch does not apply.

hussainweb’s picture

Status: Needs work » Needs review
FileSize
54.85 KB
jhodgdon’s picture

Version: 8.0.x-dev » 8.1.x-dev
Status: Needs review » Reviewed & tested by the community
Issue tags: +needs backport to 8.0.x

Thanks! Looks like a few new items were added; they're all fine. Back to RTBC. Moving to 8.1 because I think UI text changes that are non-critical (like these) are being moved there. After commit to 8.1, we should consider porting the non-UI part back to 8.0.x too. Thanks!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 57: core-localized-links-2571845-57.patch, failed testing.

hussainweb’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
54.35 KB

Rerolled. Back to RTBC because the change in this patch for run-tests.sh was done in #2605290: Improve docs, coding standards for run-tests.sh and hence the conflict.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/includes/unicode.inc
@@ -29,7 +29,7 @@ function unicode_requirements() {
-  $t_args = array(':url' => 'http://www.php.net/mbstring');
+  $t_args = array(':url' => 'http://php.net/mbstring');

This looks like we should be putting it inside the strings below so that translators can localise - according to the issue summary.

anil280988’s picture

Status: Needs work » Needs review
FileSize
57.02 KB
3.33 KB

Hi alexpott/hussainweb,
Made the changes. Kindly suggest if anything else needed to be fix.

hussainweb’s picture

Thanks @anil280988. Changes look good. RTBC +1.

anil280988’s picture

Status: Needs review » Reviewed & tested by the community

All the changes looks good now. Change suggest by alexpott is also implemented. Putting it to RTBC so that it could be closed, if its correct, as it is hanging for long time. Give suggestion if more changes are required.

alexpott’s picture

Version: 8.1.x-dev » 8.0.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed 9067206 and pushed to 8.1.x. Thanks!

  • alexpott committed 9067206 on 8.1.x
    Issue #2571845 by drupal.ninja03, hussainweb, anil280988, snehi,...
Balu Ertl’s picture

To the attention of translator fellows: to help your work I collected the most string changes between 8.0.0 and 8.1.x-beta1 related to this issue. Please find them at the bottom of this spreadsheet: http://goo.gl/Qjxumq. (Don't forget to select your lang code in the top cell to make the links pointing to your locale on l.d.o!)

This collection is probably not full, if you may find any others, please submit them on this form: http://goo.gl/forms/8R4Hovq2YA

xjm’s picture

Version: 8.0.x-dev » 8.1.x-dev
Status: Patch (to be ported) » Fixed
Issue tags: -needs backport to 8.0.x

8.0.6 is the final bugfix release for 8.0.x and is released now, so this no longer needs to be backported.

Status: Fixed » Closed (fixed)

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

David_Rothstein’s picture

There are a couple other cases that still don't follow the recommendations that were developed in this issue - see the link for a patch.