Closed (fixed)
Project:
Drupal core
Version:
8.1.x-dev
Component:
user interface text
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
13 Oct 2015 at 19:20 UTC
Updated:
11 Mar 2016 at 06:54 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
cilefen commentedComment #3
cilefen commentedTranslated strings like this cannot change until the next feature release so I am bumping this to 8.1.x.
Comment #4
cilefen commentedComment #5
AbdealiJK commentedI was trying to find an easy bug to begin contributing and found this.
Could you tell me how do I submit a patch for 8.1.x ? On git it seems the 8.1.x branch is 15 months old
Comment #6
sdstyles commentedComment #7
cilefen commented@AbdealiJK That is a good question. A small patch like this one could be made against 8.0.x and will probably still work later. It never hurts to get a patch in, even if all it does is form the base for other work later.
Core contribution mentoring office hours are today, if you have the time.
Comment #8
snehi commentedI was applying patch but unable to find core/modules/node/config/optional directory.
pwd : /var/www/d8.1/core/modules/node/config
command apply : git apply content-type-label-2591357-6.patch
Comment #9
cilefen commented@snehi Patches are created from the root directory, so you should be in /var/www/d8.1/ when you apply the patch.
Comment #10
snehi commented@cilefen done the same and that is the latest clone from
Comment #11
cilefen commentedBranch 8.1.x isn't really set up yet. I think this issue is supposed to be on 8.1.x because of translatable text. If that's the case, it would be best to wait until that branch is ready to go.
Comment #12
snehi commentedComment #13
snehi commentedComment #14
k.dani commentedI've managed to test the patch against 8.1.x branch. It works as it should, so I put the issue in RTBC.
Comment #15
alexpottThe
Content Typeshould be wrapped in single quotes, like so:'Content Type'.It is tricky to work out if this should have an upgrade path. On one hand this is in an obvious admin UI improvement, on the other, sites own their admin UI and this is not fixing something that is broken - plus they might have already translated this. As this is the first patch to change default translatable config I'm going to ping @GaborHojtsy for an opinion about the effect of changing this value.
Comment #16
gábor hojtsyI agree we should not do an upgrade path, this is site owned configuration and a usability improvement, not a bugfix.
A. For new sites, localize.drupal.org will recognize this new string in the config and Drupal will save its translation to the config translation to the right place.
B. For sites already using the old configuration but updating to the new Drupal version, the result *depends* on what exactly is the status of translation there and what happens next.
B1. If the string was not yet translated, then config translation does not yet contain the key. Although the active config will contain the old string 'Type', the translation will look up the new 'Content Type' source string, because the default config is the reference, and the default config was changed with the update.
B2. If the string is already translated and its the same as the shipped translation (not customized), then the question is what service kicks in first I think. If the config translation is saved again first, then its saved as customized and kept as-is. If localization update is ran first, then the localization will be updated from the translation of 'Type' to the translation of 'Content Type'. Again because the default configuration is kept as reference. I am not sure either service runs automatically with/after updates.
B3. If the string is already translated and its customized (different from the shipped translation), then all will be kept as-is, those string are protected by default.
#2428045: Comparing active storage to install storage is problematic, install storage may change anytime would of course make most of the special cases go away since locale would not compare to 'Content Type' if the active config was originally installed with 'Type'.
Comment #17
snehi commentedChanging with 'Content Type'.
Comment #18
xjmThanks everyone. I agree that we should probably not provide an upgrade path for this.
According to our content standards, I think this should be sentence-case ("Content type").
Can we get a screenshot of this patch's effect in the Views UI, rather than a screenshot of the patch being applied?
Thanks for proposing improvements to our UI text, and thanks @Gábor Hojtsy for explaining the impact on translations.
Comment #19
gábor hojtsyThe patch tries to unify the labeling of content types in the content admin view. Prior to the patch:
It already is title cased in the column label, but the CSS styling makes it not apparent. Maybe we want to fix that too then?
Comment #20
xjmYes, I think we should potentially fix both places the title casing is used (might be a separate issue unless we rescope this to "Standardize on 'Content type' always for content types in UI text" or such):
Thanks @Gábor Hojtsy.
Comment #21
brolad commentedI have solved the main issue and also have added these changes to the patch:
Comment #22
swati_qa commentedVerified the patch "2591357-21.patch" mentioned in #21.
Steps performed to verify the patch:
1. Navigate to http://localhost/drupal/admin/content.
2. Verify the filter name "Type" before and after patch is applied.
3. As the Filter name has not been updated after applying the patch, its Retest Failed.
So, issue can be marked as "RETEST FAILED".
Comment #23
swati_qa commentedComment #24
catchStill missing the single quotes as pointed out in #15.
Comment #25
dimaro commentedUpdate the patch for introduce the single quotes as pointed out in #15.
Comment #26
dawehnerDon't we want to add an update path and so adapt the existing configuration installed on sites?
Comment #27
lomasr commentedComment #28
snehi commentedComment #29
nidhi.badani commentedTesting the patch, will update soon.
Comment #30
nidhi.badani commentedHey the patch works perfectly fine. Below are the steps followed:
1. Took the git clone for 8.1.x.
2. Applied the patch with git apply -v
3. Reviewed content page with admin login, the results were seen as attached in the screenshot.
Comment #31
snehi commentedI also tested the same. Worked for me. Thanks.
making it RTBC.
Comment #32
dawehnerIMHO we still want an update path, see #26
Comment #33
gábor hojtsyFixing tags. Adding back needs upgrade path. Not sure what would be the best tag for DCAsia, certainly not with a +. Removing that.
Comment #34
oleksiyComment #35
gábor hojtsyThat display may or may not be there, the filter may not be there, it may not be exposed, etc. It may not have the original label either (eg. on a multilingual site it is very likely it would not be the old one anymore). So just plainly updating it without consideration if the view existed, the filter existed, the label was still the old one etc. is not very good I am afraid.
Comment #36
oleksiyThanks for review, Gábor. Have updated the patch.
Comment #37
gábor hojtsySuperb, thanks for the quick fix. Now only needs tests for the upgrade path :)
Comment #38
oleksiyAdded tests for the upgrade path and updated the patch a bit, as we forgot to update Type field label.
Comment #39
gábor hojtsyI think that is plenty of coverage for a small label change thanks a lot :)
Comment #41
catchSorry I agree with #15, #16 and #18 that we don't want an upgrade path for this. It does no harm to leave things the same on sites that already have this config.
Went ahead and committed/pushed #25 to 8.1.x, thanks!
Comment #42
gábor hojtsyWorks for me :) Thanks!