wiki.techinc.nl/languages/classes/LanguageMy.php
C. Scott Ananian d7b2fe4d46 language: Clean up $separatorTransformTable in km/la/my
LanguageKm and LanguageMy defined overrides for ::formatNum()
which did nothing -- but what they really wanted to do was just to
suppress separators.  Do that in the 'modern' way by invoking
::formatNumNoSeparators().

MessagesLa and MessagesKm defined $separatorTransformTable for one but
not both of the keys `.` and `,`.  Add defaults to
Language::formatNum() to handle this case without burping out a PHP
notice.  Use belt and suspenders by also defining an identity mapping
for '.' in MessagesLa::$separatorTransformTable.

Bug: T267091
Change-Id: I0169606ca1e211d241fa71f23ee0a16edc64b7ae
2020-11-05 03:30:05 +00:00

44 lines
1.3 KiB
PHP

<?php
/**
* Burmese (Myanmasa) specific code.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @author Niklas Laxström, 2008
* @ingroup Language
*/
/**
* Burmese (Myanmasa)
*
* @ingroup Language
*/
class LanguageMy extends Language {
/**
* @param string $number
* @param bool|null $noSeparators
* @return string
*/
public function formatNum( $number, $noSeparators = null ) {
/* NO-op. Cannot use
* $separatorTransformTable = [ ',' => '' ]
* That would break when parsing and doing strstr '' => 'foo';
*/
return $this->formatNumNoSeparators( $number );
}
}