- ๐ช๐ธSpain penyaskito Seville ๐, Spain ๐ช๐ธ, UTC+2 ๐ช๐บ
Did some debugging and now I know why that confusing comparison is there, and it's not buggy. Added a comment explaining why.
$translation = $this->translations[$langcode][$context]->get($string); + // If translation is TRUE means that no translation exists, but the source + // string was successfully stored in the persistent cache (in this + // translator, that means a new entry on the 'locales_source' table). return $translation === TRUE ? FALSE : $translation;
- ๐ช๐ธSpain penyaskito Seville ๐, Spain ๐ช๐ธ, UTC+2 ๐ช๐บ
Debugged again and now makes more sense (I wasn't technically correct)
$translation = $this->translations[$langcode][$context]->get($string); // If translation is TRUE means that no translation exists, but that string // needs to be stored in the persistent cache for performance reasons (so // e.g. we don't have hundreds of queries to locale tables on each request). // That cache is persisted when the request ends and the lookup service is // destructed. return $translation === TRUE ? FALSE : $translation;
- Status changed to Needs work
about 2 years ago 7:02pm 19 February 2023 - ๐บ๐ธUnited States smustgrave
Nit picky
But believe core is trying to avoid the use of e.g. can you just change that to example.
The rest looks good.
- Status changed to Needs review
about 2 years ago 5:12am 20 February 2023 - Status changed to RTBC
about 2 years ago 3:59pm 20 February 2023 - Status changed to Needs work
about 2 years ago 1:47pm 21 February 2023 - ๐ช๐ธSpain penyaskito Seville ๐, Spain ๐ช๐ธ, UTC+2 ๐ช๐บ
There's a grammar error now.
- Status changed to Needs review
about 2 years ago 7:08am 23 February 2023 - ๐ฎ๐ณIndia mrinalini9 New Delhi
Updated patch #16 by addressing #20, please review it.
Thanks!
- Status changed to RTBC
about 2 years ago 3:33pm 27 February 2023 - ๐บ๐ธUnited States smustgrave
Comment change makes sense. Proposed solution kinda mentions it but borderline. Think should be fine though.
The last submitted patch, 21: 2188715-21.patch, failed testing. View results โ
- ๐ช๐ธSpain penyaskito Seville ๐, Spain ๐ช๐ธ, UTC+2 ๐ช๐บ
Unrelated test failure.
- ๐ณ๐ฟNew Zealand quietone
Suggesting a title that reflects the change.
- Status changed to Fixed
about 2 years ago 8:27am 17 April 2023 - ๐ฌ๐งUnited Kingdom catch
Docs definitely help with the confusing return value.
Committed/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.