Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
language system
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2015 at 09:56 UTC
Updated:
9 Oct 2015 at 10:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
alexpottFirst cut includes #2557113: Make t() return a TranslationWrapper object to remove reliance on a static, unpredictable safe list
Comment #3
alexpottComment #6
alexpottMaking a patch that applies... includes #2557113: Make t() return a TranslationWrapper object to remove reliance on a static, unpredictable safe list. The do-not-test.patch is unchanged.
Comment #7
dawehnerAre we sure that this long logic should be part of the value object?
OH I did not knew that this exists.
Comment #10
alexpottComment #11
alexpottRerolled and fixed the test fails.
Comment #13
alexpottFixing tests.
Comment #15
alexpottRenaming to be consistent with #2569069: Replace TranslationWrapper with TranslatableString and deprecate TranslationWrapper
Comment #16
alexpottAdding the hack to return unsafe strings so we can do this before finishing
!placeholderremoval.Comment #17
lauriiiFound some nitpicks from the patch:
"@count could be on the previous line
Posted also on the other issue but I this doesn't have to be necessary a service, but what should it be called then?
Usually not worth mentioning but maybe we could consider using [] for the arrays because it would make this line a lot shorter & more readable
80 chars
80 chars
Newline
80 chars
Newline
Issue number would be nice
Comment #18
alexpottDiscussed with @gabor and we decided to deprecate LOCALE_PLURAL_DELIMITER for Drupal 9 for cleaner unit testing and future proofing.
Comment #19
alexpottAdded CR https://www.drupal.org/node/2571563
Comment #20
lauriiiCR looks good. Few things that might be a good idea to fix:
Nit: Wouldn't "new PluralTranslatableString object" be more accurate
Nit: the still fits the previous line.
And the reason why I still NW this, the const could be changed to the non-deprecated one :)
Comment #21
alexpottComment #22
lauriiiYeah I just don't like that we're adding new usages in the patch that is deprecating it :)
Comment #23
alexpottRerolled now that #2569069: Replace TranslationWrapper with TranslatableString and deprecate TranslationWrapper landed.
Comment #24
alexpott@catch noticed a missing
@returnComment #25
catchCommitted/pushed to 8.0.x, thanks!
Comment #29
lauriiiComment #31
gábor hojtsyYay for security and consistency. Thanks!
Comment #32
duaelfrI just opened a follow-up #2584797: \Drupal\Core\StringTranslation\StringTranslationTrait::formatPluralTranslated uses dead code