Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
language system
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2015 at 19:17 UTC
Updated:
6 Oct 2015 at 21:32 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
alexpottComment #3
alexpottComment #4
stefan.r commentedComment #5
stefan.r commentedComment #6
stefan.r commentedComment #7
stefan.r commentedCR: https://www.drupal.org/node/2571255
Comment #8
stefan.r commentedComment #11
stefan.r commentedCannot reproduce this failure locally :/
Comment #12
stefan.r commentedComment #13
lauriiiHmm, has there been discussion somewhere about the name TranslatedString or should we include that in this issue?
Comment #14
stefan.r commented@lauriii I had added it in the parent after @dawehner or @alexpott's suggestion and @joelpittet +1ed, but then took it out so it could be its own issue.
TranslatedString or TranslatableString works for me, considering we already have SafeString as well and we may have more *String classes later on
Comment #15
lauriiiBut isn't that more like a TranslatableString because on string will be only translated when its actually being printed? So its not always necessarily translated.
Comment #16
stefan.r commentedYes, if I had to pick between the two I'd go with that as well.
Comment #17
alexpottWell it always translated when you print it but I guess TranslatableString is more correct so let's do that.
Comment #18
lauriiiYeah TranslatedString is super confusing when creating new instance
Comment #19
alexpottComment #20
alexpottLet's also fix the param name on
TranslationInterface::translateString()The param should be
$translatable_stringComment #21
mr.baileysWorking on this.
Comment #22
mr.baileys* Now using TranslatableString instead of TranslatedString
* No interdiff since that doesn't make sense in this case
* Also manually renamed TranslationWrapper to TranslatableString in "core/modules/system/tests/fixtures/update/drupal-8.language-enabled.php" (both class names have the same string lenght and are essentially the same object, so I'm assuming this is won't screw up the serialized data).
Comment #24
mr.baileysPatch didn't apply since
core/modules/system/tests/fixtures/update/drupal-8.language-enabled.phpis a binary file, and the patch was created without the--binaryflag.Comment #26
cpj commentedI've reviewed the changes and it looks fine to me. So I'm going to mark it RTBC
Comment #27
stefan.r commentedtranslatedString
getUntranslatedString
Comment #28
mr.baileysThx, fixed.
Comment #30
lauriiiWhat is this change?
Comment #31
mr.baileys@lauriii
/fixtures/update/drupal-8.language-enabled.phpcontains a couple of references to TranslationWrapper that have been renamed to TranslatableString. The file is marked as binary though (contains null bytes in an otherwise plain-text file), hence the strange output in the patch.Comment #32
mr.baileysComment #33
stefan.r commentedPatch looks good to me! The change in fixtures/update/drupal-8.language-enabled.php shouldn't technically be needed, but if tests are green it's fine to keep anyway.
Comment #34
lauriiiLooked the changes inside the fixtures/update/drupal-8.language-enabled.php and there actually is something about the TranslationWrapper so it makes sense. DrupalCI is green so RTBC!
Comment #35
alexpottA simple rename leaving the original class as a deprecated BC later. Looks great. Committed 5c943b5 and pushed to 8.0.x. Thanks!
Comment #37
stefan.r commentedPublished the CR at https://www.drupal.org/node/2571255
Comment #39
lauriiiComment #41
gábor hojtsyNot sure how this lost all its tags in #4, restoring :)