Problem/Motivation

In working on #2416987: Fix UI regression in the menu link form it was identified that the help text for link fields contains "drupal.org" as the example external URL. Per the Interface Text guidelines (https://www.drupal.org/node/604342) it would be best to change this so as not to identify the site as Drupal.

Proposed resolution

Replace drupal.org in user facing text with something like example.com or better still make it configurable.

Remaining tasks

Contributor tasks needed
Task Novice task? Contributor instructions Complete?
Create a patch Instructions done
document a grep or ag regular expression to show all instances are gone
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards Instructions done

User interface changes

API changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lucastockmann’s picture

Status: Active » Needs review
FileSize
2.07 KB

For me it doesn't make sense to have this configurable but at least I changed the url's to example.com.

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

I agree that making it configurable is overkill. Using example.com is inline with general web standards, this makes sense to me.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php
@@ -142,7 +142,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
+      $element['uri']['#description'] = $this->t('This can be an internal Drupal path such as %add-node or an external URL such as %url. Enter %front to link to the front page.', array('%front' => '<front>', '%add-node' => 'node/add', '%url' => 'http://example.com'));

So if the aim is to make this comply with the interface standard of not being identifiable as Drupal then This can be an internal Drupal path is not going to help :)

I guess one could argue it is out-of-scope but we are changing this line to remove drupal so I think not.

chintan.vyas’s picture

Status: Needs work » Needs review
FileSize
2.06 KB
1.15 KB

Changes mentioned in #3

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

Heh, nice catch @alexpott!
Yes, I think "Drupal" does not really give much additional value in that line.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

UI strings are not yet frozen. Committed 685470f and pushed to 8.0.x. Thanks!

  • alexpott committed 685470f on 8.0.x
    Issue #2418209 by chintan.vyas, lucastockmann: Replace user facing...
YesCT’s picture

[edit]

oops. removed comment that is not relevant.

YesCT’s picture

Issue summary: View changes
Issue tags: -Needs issue summary update
David_Rothstein’s picture

Version: 8.0.x-dev » 7.x-dev
Status: Fixed » Patch (to be ported)
Issue tags: +Needs backport to D7

It's worth backporting this, I think (at least the part that doesn't involve breaking translations - it's probably not worth breaking translations for something like this).

jacob.embree’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.7 KB

Here it is for Drupal 7.

Mac_Weber’s picture

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

Status: Reviewed & tested by the community » Needs work

That patch is breaking translations though - per above I think this is really only worth changing in cases where it's part of the substitution (not part of the translatable string), especially since there's no actual bug here.

Or if there really is only that one case and we don't like the idea of "%drupal" referring to example.com (not that anyone would care in practice) we could just close this instead :)

Mac_Weber’s picture

Status: Needs work » Reviewed & tested by the community

@David_Rothstein I personally also think that most people don't really care about it. But some big companies and government agencies prefer to obscure the platform being used. Due to this reason, to improve Drupal's acceptance among these companies, the coding standard is to use example.com: https://www.drupal.org/coding-standards#example

For the same reason, the word "Drupal" got removed from that string.

About translations, this patch does not break the translation system. The reason you may not see a translated string is because the original string has changed. Every time a string is changed or a new one is added it has to be translated. This is the normal behavior.

Yet this is a minor patch, it is still a valid patch even with the translated URL, IMHO.

David_Rothstein’s picture

About translations, this patch does not break the translation system. The reason you may not see a translated string is because the original string has changed. Every time a string is changed or a new one is added it has to be translated. This is the normal behavior.

Yes, that is what I meant by "breaking translations" :) Sorry for the confusion.

Since these are admin-facing strings I guess we technically can break them even though this isn't a bugfix (see https://www.drupal.org/node/1527558) although not really sure if it's a good tradeoff to do that. People who need to remove "Drupal" from the UI have other methods to do that, and (I think?) many strings besides these they need to override.

By "not that anyone would care in practice" I was referring specifically to the idea of having %drupal point to example.com (not the overall goal of this issue), as a means of replacing the URL in that one case without breaking the translation... I still think that's worth considering, although it's true that there's another "Drupal" in the same string that would be nice to remove.

  • alexpott committed 685470f on 8.1.x
    Issue #2418209 by chintan.vyas, lucastockmann: Replace user facing...
Mac_Weber’s picture

@alexpott this patch seems good to be applied to 7 too

David_Rothstein’s picture

The #16 commit was just an automated message due to the creation of the 8.1.x branch (it was committed to Drupal 8 a long time ago for 8.0.x).

I think I'm willing to commit this to Drupal 7, but only if we go ahead with #2598382: [policy] Adopt a 6-month feature release schedule for Drupal 7 (similar to Drupal 8) and use pseudo-semantic versioning. Those releases would be a window where bigger changes are acceptable and where people will be looking out for them, so I think that makes it more reasonable to do non-bugfix translation changes then too.

So I'm going to leave this RTBC but not commit it now - possibly for a release on April 20 instead.

  • David_Rothstein committed c273ce5 on 7.x
    Issue #2418209 by chintan.vyas, lucastockmann, jacob.embree: Replace...
David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +7.44 release notes, +String change in 7.44

Alright, it's likely enough that we're going to go ahead with the above, so let's bend the rules a bit and get this in.

Committed to 7.x - thanks!

Status: Fixed » Closed (fixed)

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

David_Rothstein’s picture

Issue tags: -7.44 release notes, -String change in 7.44 +7.50 release notes, +String change in 7.50

Changing tags since the release that includes this will probably be labeled Drupal 7.50 to indicate it contains some big changes.