Problem/Motivation
When dealing generically with language types it is annoying that LanguageInterface::TYPE_URL
does not have a name or description. It is not exposed nowhere in core, but we shouldn't force contrib modules that do expose language types in some way to alter in a name and description just because we are lazy.
I personally hit this when making the URL language type configurable (which you can only do by manually editing config). The language negotiation UI then shows:
With this patch it shows:
Note again that this will generally never be shown unless you manually edit configuration.
Proposed resolution
Add a name
and description
to LanguageInterface::TYPE_URL
.
Remaining tasks
Answer #26
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Create a patch | Instructions | Done | |
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards | Instructions |
User interface changes
(New or changed features/functionality in the user interface, modules added or removed, changes to URL paths, changes to user interface text.)
API changes
(API changes/additions that would affect module, install profile, and theme developers, including examples of before/after code if appropriate.)
Data model changes
(Database or configuration data changes that would make stored data on an existing site incompatible with the site's updated codebase, including changes to hook_schema(), configuration schema or keys, or the expected format of stored data, etc.)
Comment | File | Size | Author |
---|---|---|---|
#27 | interdiff-25-27.txt | 800 bytes | LOBsTerr |
#27 | 2668548-27.patch | 1.45 KB | LOBsTerr |
| |||
#23 | 2668548-afterpatch.png | 23.1 KB | gaurav-mathur |
#23 | 2668548-beforepatch.png | 14.79 KB | gaurav-mathur |
#20 | 2668548-20.patch | 677 bytes | sahil.goyal |
|
Comments
Comment #2
tstoecklerComment #5
iMiksuI can't find the failing test anymore. Triggering tests again.
Comment #19
smustgrave CreditAttribution: smustgrave at Mobomo commentedPatch or MR doesn't apply anymore
The last patch or MR doesn't apply to the target branch, please reroll the code so that it can be reviewed by the automated testbot.
Comment #20
sahil.goyal CreditAttribution: sahil.goyal as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedAs seen that last patch target not correct as per #19 so updating the patch for the latest version 10.1.x, not sure that reroll or interadiff needs to be created or not as last patch does not targeting to the issue number and in comments as well.
Comment #21
rpayanmComment #22
gaurav-mathur CreditAttribution: gaurav-mathur at Dotsquares Ltd. commentedComment #23
gaurav-mathur CreditAttribution: gaurav-mathur at Dotsquares Ltd. commentedSuccessfully Applied patch #20 for Drupal 10.1.x version. It is working as expected. Adding screenshots to refer after and before patch.
Comment #24
smustgrave CreditAttribution: smustgrave at Mobomo commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
Changing to feature request.
The IS mentions
Then we should test to make sure this possible.
Will need a change record to announce to others this is possible.
Comment #25
chaitanyadessai CreditAttribution: chaitanyadessai at Specbee commentedAdded 'name' and 'description' for LanguageInterface::TYPE_URL
Comment #26
smustgrave CreditAttribution: smustgrave at Mobomo commented@chaitanyadessai this is the same patch as #20.
Still needs test coverage so not ready for review.
Comment #27
LOBsTerr CreditAttribution: LOBsTerr at European Commission and European Union Institutions, Agencies and Bodies commentedOk, let's wrap up this issue. I have added tests, which will check, that all language type have names and descriptions.
Comment #28
smustgrave CreditAttribution: smustgrave at Mobomo commentedThanks for the tests.
Only thing left is the change record I believe. Or explanation on why it's not needed.
Thanks! Super close I think.