- Status changed to Needs review
over 1 year ago 4:25am 19 May 2023 - last update
over 1 year ago 29,388 pass - 🇮🇳India gauravvvv Delhi, India
I have updated it for all the themes expect starterkit theme. I have attached a patch for same. please review
- Status changed to Needs work
over 1 year ago 3:13pm 19 May 2023 - 🇺🇸United States smustgrave
Saw the removal which addressed the first part but didn't see "As for a solution the agreement was to do something like add it in PHP/twig as a translatable string + context then let people translate it to empty string"
- First commit to issue fork.
- Merge request !98632838547: Remove default colon behind inline labels. → (Open) created by Unnamed author
- 🇮🇳India nayana_mvr
I have added the colon ':' as a translatable string in twig template
core/themes/claro/templates/classy/field/field.html.twig
and created an MR against 11.x branch. Attaching before and after screenshots of a Greek page after translating ':' to an empty string for Greek language in UI translation for reference.Before:
After:
Please review.
- 🇺🇸United States smustgrave
Per the proposed solution I actually think this should be done in php somehow to the title attributes
- 🇮🇳India nayana_mvr
As per feedback comment, I have done the changes using php. Please check if this is fine. Changes in the UI are same as shown in previous screenshots. So not attaching them again.
- 🇺🇸United States smustgrave
Opened 📌 Remove the colon in starterkit Active to address follow up. Though I do wonder if that could be rolled up into this now that it's not a twig change. Will let committer decide that but current scope of this issue looks addressed.
- 🇳🇿New Zealand quietone
I read the IS, comments and the MR. I see that the follow up has been made, there are no unanswered questions and the core gates are addressed.
I updated credit, hid files, and unassigned.
Leaving at RTBC
- 🇫🇷France nod_ Lille
We need more context in the translated string, whitespace rules around colons are different in english and french at least so we need to know a bit more than just ":".
- 🇺🇸United States smustgrave
Believe feedback from @nod_ has been addressed.
I think it is great to remove colons after label by default as it causes issues.
However using translations to manage it implies that we'll need to translate all labels if we want to remove colon (e.g. for Greek), add a space before (e.g. French)...etc. This seem to be less convenient than the current implementation in CSS - as of now, if it is easy to customize this with a one line CSS such as:
:lang(el) .field--label-inline .field__label::after { content: ""; }
:lang(fr) .field--label-inline .field__label::after { content: " :"; }
Marking as need review because I suggest we better provide custom CSS rules for the most languages possible in core + add example and documentation for developers to customize this colon for their sites' languages.
Hi,
Issue is reproduceable before applying patch.But after patch is showing an error. Hence unable to retest.
Steps to reproduce-
- Create a new field eg., Date in any of the content type.
- In the Manage Display, change label to inline.
- Create a node with that content type.
- Add Greek language in /admin/config/regional/language
- Open the newly created node in Greek /el/, there will be a colon ':' after the label.Please refer the attachments.
- 🇫🇷France ericdsd France
@Matthieuscarset, je me dis que ça mériterait même de générer ça avec une variable css
- Merge request !103032838547 Fix punctuation rules for inline label suffix colon with CSS only → (Closed) created by matthieuscarset
Just opened a MR to fix formatting of inline field label suffix per language with CSS only.
I just made two commits. I dont know why the MR show 450+ commits 🤷... something's wrong.
Need review.
@Eric good idea! I used a CSS variable:
:root { --drupal-field-label-inline-suffix: ":"; }
Test status-Pass
Verified on Drupal 11.X versionTest steps -
- Create a new field eg., Date in any of the content type.
- In the Manage Display, change label to inline.
- Create a node with that content type.
- Add Greek language in /admin/config/regional/language
- Open the newly created node in Greek /el/, there will be a colon ':' after the label.Patch applied successfully. Issue looks fixed. Moving the ticket to RTBC state.
Please refer the attached screenshots.If I understood correctly, using translation means users will need to translate each field labels for every language of a site?
This is a serious amount of work. It makes the current situation worst IMO.
- 🇫🇷France nod_ Lille
it's one string that needs translating, it'll handle all inline fields. No visible changes to users after this patch
- 🇺🇸United States smustgrave
Closed 📌 Remove the colon in starterkit Active as a duplicate, moving over credit