Matmarex has uploaded a new change for review. https://gerrit.wikimedia.org/r/71297
Change subject: wfBCP47: do actually use lowercase for single segment ...................................................................... wfBCP47: do actually use lowercase for single segment Broken since its inception in 2009 (r53722), wfBCP47() compared the count of segments to 0 instead of 1. Change-Id: Iffe166f3480df0b104e09e41dd8d3023d43b9aa7 --- M tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php 1 file changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/97/71297/1 diff --git a/tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php b/tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php index 6229be3..98511ec 100644 --- a/tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php +++ b/tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php @@ -111,6 +111,13 @@ array( 'zh-cn-a-myext-x-private', 'zh-CN-a-myext-x-private' ), array( 'en-a-myext-b-another', 'en-a-myext-b-another' ), + # Use lowercase for single segment + # ISO 3166-1-alpha-2 code + array( 'US', 'us' ), # USA + array( 'uS', 'us' ), # USA + array( 'Fr', 'fr' ), # France + array( 'va', 'va' ), # Holy See (Vatican City State) + # Invalid: // de-419-DE // a-DE @@ -122,12 +129,6 @@ # @todo FIXME: Fix our function? array( 'SR-lATN', 'sr-Latn' ), array( 'fr-latn', 'fr-Latn' ), - // Use lowercase for single segment - // ISO 3166-1-alpha-2 code - array( 'US', 'us' ), # USA - array( 'uS', 'us' ), # USA - array( 'Fr', 'fr' ), # France - array( 'va', 'va' ), # Holy See (Vatican City State) */ ); } -- To view, visit https://gerrit.wikimedia.org/r/71297 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iffe166f3480df0b104e09e41dd8d3023d43b9aa7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Matmarex <matma....@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits