Skip to content

Commit

Permalink
Move Localization (CLDR) from PrestaShopBundle to Core
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleBigDev committed Jan 10, 2018
1 parent 91c1792 commit 1c7b004
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Exception;
namespace PrestaShop\PrestaShop\Localization\Exception;

class LocalizationException extends \Exception
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Number;
namespace PrestaShop\PrestaShop\Localization\Number;

use InvalidArgumentException as SPLInvalidArgumentException;
use PrestaShop\Decimal\Number as DecimalNumber;
use PrestaShop\Decimal\Operation\Rounding;
use PrestaShopBundle\Localization\Exception\LocalizationException;
use PrestaShopBundle\Localization\Specification\NumberInterface as NumberSpecification;
use PrestaShopBundle\Localization\Specification\Price as PriceSpecification;
use PrestaShop\PrestaShop\Localization\Exception\LocalizationException;
use PrestaShop\PrestaShop\Localization\Specification\NumberInterface as NumberSpecification;
use PrestaShop\PrestaShop\Localization\Specification\Price as PriceSpecification;

/**
* Formats a number (raw, price, percentage) according to passed specifications
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Specification;
namespace PrestaShop\PrestaShop\Localization\Specification;

class Locale
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Specification;
namespace PrestaShop\PrestaShop\Localization\Specification;

use PrestaShopBundle\Localization\Exception\LocalizationException;
use PrestaShop\PrestaShop\Localization\Exception\LocalizationException;

/**
* Number specification class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Specification;
namespace PrestaShop\PrestaShop\Localization\Specification;

/**
* Number specification class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Specification;
namespace PrestaShop\PrestaShop\Localization\Specification;

use PrestaShopBundle\Localization\Exception\LocalizationException;
use PrestaShop\PrestaShop\Localization\Exception\LocalizationException;

/**
* Number's symbols data bag. Regroups all symbols used when formatting a number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Specification;
namespace PrestaShop\PrestaShop\Localization\Specification;

use PrestaShopBundle\Localization\Specification\Number as NumberSpecification;
use PrestaShop\PrestaShop\Localization\Specification\Number as NumberSpecification;

/**
* Percentage specification class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace PrestaShopBundle\Localization\Specification;
namespace PrestaShop\PrestaShop\Localization\Specification;

use PrestaShopBundle\Localization\Exception\LocalizationException;
use PrestaShopBundle\Localization\Specification\Number as NumberSpecification;
use PrestaShop\PrestaShop\Localization\Exception\LocalizationException;
use PrestaShop\PrestaShop\Localization\Specification\Number as NumberSpecification;

/**
* Price number specification class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace Tests\PrestaShopBundle\Localization\Number;
namespace Tests\Unit\Core\Localization\Number;

use PHPUnit\Framework\TestCase;
use PrestaShop\Decimal\Operation\Rounding;
use PrestaShopBundle\Localization\Exception\LocalizationException;
use PrestaShopBundle\Localization\Number\Formatter;
use PrestaShopBundle\Localization\Specification\Number as NumberSpecification;
use PrestaShopBundle\Localization\Specification\NumberInterface as NumberSpecificationInterface;
use PrestaShopBundle\Localization\Specification\NumberSymbolList;
use PrestaShopBundle\Localization\Specification\Price as PriceSpecification;
use PrestaShop\PrestaShop\Localization\Exception\LocalizationException;
use PrestaShop\PrestaShop\Localization\Number\Formatter;
use PrestaShop\PrestaShop\Localization\Specification\Number as NumberSpecification;
use PrestaShop\PrestaShop\Localization\Specification\NumberInterface as NumberSpecificationInterface;
use PrestaShop\PrestaShop\Localization\Specification\NumberSymbolList;
use PrestaShop\PrestaShop\Localization\Specification\Price as PriceSpecification;

class FormatterTest extends TestCase
{
Expand Down Expand Up @@ -266,7 +266,7 @@ public function provideValidNumberFormatSpecs()
'numberSpecification' => new PriceSpecification(
'¤ #,##0.##',
'-¤ #,##0.##',
['latn' => new NumberSymbolList(',', ' ', ';', '%', '-', '+', 'E', '^', '', '', 'NaN')],
['latn' => new NumberSymbolList('.', ',', ';', '%', '-', '+', 'E', '^', '', '', 'NaN')],
2,
2,
true,
Expand All @@ -280,14 +280,14 @@ public function provideValidNumberFormatSpecs()
'numberingSystem' => 'latn', // Occidental numbering system
],
'number' => -123456.789,
'expected' => '-$ 123 456,79',
'expected' => '-$ 123,456.79',
],
'USA positive price with ISO code' => [
'specs' => [
'numberSpecification' => new PriceSpecification(
'¤ #,##0.##',
'-¤ #,##0.##',
['latn' => new NumberSymbolList(',', ' ', ';', '%', '-', '+', 'E', '^', '', '', 'NaN')],
['latn' => new NumberSymbolList('.', ',', ';', '%', '-', '+', 'E', '^', '', '', 'NaN')],
2,
2,
true,
Expand All @@ -301,7 +301,7 @@ public function provideValidNumberFormatSpecs()
'numberingSystem' => 'latn', // Occidental numbering system
],
'number' => 123456.781,
'expected' => 'USD 123 456,78',
'expected' => 'USD 123,456.78',
],
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace Tests\PrestaShopBundle\Localization\Specification;
namespace Tests\Unit\Core\Localization\Specification;

use PHPUnit\Framework\TestCase;
use PrestaShopBundle\Localization\Specification\Number as NumberSpecification;
use PrestaShopBundle\Localization\Specification\NumberSymbolList;
use PrestaShop\PrestaShop\Localization\Specification\Number as NumberSpecification;
use PrestaShop\PrestaShop\Localization\Specification\NumberSymbolList;

class NumberTest extends TestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace Tests\PrestaShopBundle\Localization\Specification;
namespace Tests\Unit\Core\Localization\Specification;

use PrestaShopBundle\Localization\Specification\Percentage as PercentageSpecification;
use PrestaShop\PrestaShop\Localization\Specification\Percentage as PercentageSpecification;

class PercentageTest extends NumberTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* International Registered Trademark & Property of PrestaShop SA
*/

namespace Tests\PrestaShopBundle\Localization\Specification;
namespace Tests\Unit\Core\Localization\Specification;

use PrestaShopBundle\Localization\Specification\Price as PriceSpecification;
use PrestaShop\PrestaShop\Localization\Specification\Price as PriceSpecification;

class PriceTest extends NumberTest
{
Expand Down

0 comments on commit 1c7b004

Please sign in to comment.