[wp-trac] [WordPress Trac] #49690: Reconsider ja_JP usage in Tests_DB::test_locale_floats()
WordPress Trac
noreply at wordpress.org
Mon Apr 13 06:31:29 UTC 2020
#49690: Reconsider ja_JP usage in Tests_DB::test_locale_floats()
----------------------------+---------------------
Reporter: SergeyBiryukov | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.5
Component: Database | Version: 5.1
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+---------------------
Comment (by gh640):
> Are there float tests that are inadvertently failing when testing with
ja_JP?
I'm not sure if there are failing tests but I think it doesn't make sense
to use the locale `ja_JP` in `Tests_DB::test_locale_floats()`. Because
Japan uses a dot as a decimal separator as mentioned. (I'm Japanese.)
Concretely, if `$flag` is set to `ja_JP.utf8` or `ja_JP` in the following
lines, it's better to skip the test with the message "No European
languages available for testing" rather than to pass the test using the
selected locale, I think.
{{{#!php
<?php
// Switch to Russian.
$flag = setlocale( LC_ALL, 'ru_RU.utf8', 'rus', 'fr_FR.utf8', 'fr_FR',
'de_DE.utf8', 'de_DE', 'es_ES.utf8', 'es_ES', 'ja_JP.utf8', 'ja_JP' );
if ( false === $flag ) {
$this->markTestSkipped( 'No European languages available for
testing' );
}
}}}
So I think it's better to remove `ja_JP.utf8` and `ja_JP` from there as
proposed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49690#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list