Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
user interface text
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2014 at 07:05 UTC
Updated:
11 Jun 2025 at 15:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
droplet commentedweight.patch queued for re-testing.
Comment #3
yesct commentedadding d8mi, not sure if other tag for language...
Comment #4
dawehner+1 for more contexts. This really helps confusions like
Note: It should be t('Weight', array(), array('context' => 'Ordering')); instead, see \Drupal\Core\StringTranslation\TranslationInterface::translate(). In general it feels odd that the context is uppercase
Comment #5
droplet commentedahh right! Fixed the context array
Comment #6
dawehner@droplet
Do you have an explanation regarding the uppercase-ness?
Comment #7
sutharsan commentedWhy do we add a string context to the dominating usage of the word 'Weight'? This wil result in the maximum number of strings requiring a context. Guidelines for contexts are being discussed in #1035716: [policy, no patch] Decide and document guidelines for using string context. One of the criteria says:
Therefore, the context should not be added to 'Weight' in the meaning as sort order, but in strings that use 'Weight' for mass.
Putting the status to 'needs work', but would actually vote for won't fix.
Comment #8
droplet commentedwhile the issue spending 3 years on discussion, I think it should not let that blocking any other issues. We need a properly way to sort the REAL problem temporarily, not just write the rules on paper and waiting for years and years and no changes. Do you agree?
Comment #9
sutharsan commentedIf you mean with a temporary solution, to commit this patch? I don't agree. There is no temporary solution with contexts. Once a context is in, we can never take it out. Nowadays even Drupal 5 translations are still in use, so it can be expected that contexts which are added today will be in use for many years to come. In php code we can break with the past, but in translations we (currently) can't.
The fact that the discussion on string context guidelines does not progress, should not block this issue. I proposed to add a context to those cases that use weight in the meaning of mass and not, as in #5 add the context to weight in the meaning of sort order.
Comment #10
sutharsan commenteddroplet said in https://drupal.org/comment/8526233#comment-8526233:
It is not relevant which words other systems use for sort order, Drupal string are only shared within Drupal. Drupal core uses "Weight" at least 53 times in translatable strings. Can you show me where the problem is? Where is the translation conflict that this context will solve?
53 translatable strings with 'weight' :
git grep -i "[ |>]\t('[^']*weight"Comment #24
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #25
smustgrave commentedSince there's been no follow up in 3 months going to close out, but this can always be re-opened.
Thanks all!