From eeea885543c86419bbba2c241cc46f86d8f0696e Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 2 Sep 2013 23:36:34 +0200 Subject: [PATCH 01/10] create new smarty function for displaying date in expected format --- core/lib/Thelia/Config/Resources/config.xml | 5 + .../Core/HttpFoundation/Session/Session.php | 7 +- .../Core/Template/Smarty/Plugins/Format.php | 94 +++++++++++++++++++ core/lib/Thelia/Core/TheliaHttpKernel.php | 2 +- core/lib/Thelia/Model/Lang.php | 24 ++++- .../Template/Smarty/Plugins/FormatTest.php | 58 ++++++++++++ install/sqldb.map | 2 + reset_install.sh | 2 +- 8 files changed, 187 insertions(+), 7 deletions(-) create mode 100644 core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php create mode 100644 core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php create mode 100644 install/sqldb.map diff --git a/core/lib/Thelia/Config/Resources/config.xml b/core/lib/Thelia/Config/Resources/config.xml index 733e4303a..4c1bf61f8 100755 --- a/core/lib/Thelia/Config/Resources/config.xml +++ b/core/lib/Thelia/Config/Resources/config.xml @@ -121,6 +121,11 @@ + + + + + diff --git a/core/lib/Thelia/Core/HttpFoundation/Session/Session.php b/core/lib/Thelia/Core/HttpFoundation/Session/Session.php index 738cb531d..5f311ad0e 100755 --- a/core/lib/Thelia/Core/HttpFoundation/Session/Session.php +++ b/core/lib/Thelia/Core/HttpFoundation/Session/Session.php @@ -55,12 +55,15 @@ class Session extends BaseSession return $this; } + /** + * @return \Thelia\Model\Lang|null + */ public function getLang() { - return $this->get("lang", substr($this->getLocale(), 0, 2)); + return $this->get("lang"); } - public function setLang($lang) + public function setLang(Lang $lang) { $this->set("lang", $lang); diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php new file mode 100644 index 000000000..c2fe1652d --- /dev/null +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php @@ -0,0 +1,94 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Template\Smarty\Plugins; + +use Thelia\Core\HttpFoundation\Request; +use Thelia\Core\Template\Smarty\AbstractSmartyPlugin; +use Thelia\Core\Template\Smarty\SmartyPluginDescriptor; + +/** + * Class Format + * @package Thelia\Core\Template\Smarty\Plugins + * @author Manuel Raynaud + */ +class Format extends AbstractSmartyPlugin +{ + protected $request; + + public function __construct(Request $request) + { + $this->request = $request; + } + + /** + * @param $params + * @param $smarty + */ + public function formatDate($params, &$smarty = null) + { + $date = $params["date"]; + + if(!$date instanceof \DateTime) { + return ""; + } + + $format = null; + $output = array_key_exists("output", $params) ? $params["output"] : null; + + if (array_key_exists("format", $params)) { + $format = $params["format"]; + } else { + $session = $this->request->getSession(); + $lang = $session->getLang(); + + if($lang) { + switch ($output) { + case "date" : + $format = $lang->getDateFormat(); + break; + case "time" : + $format = $lang->getTimeFormat(); + break; + default: + case "datetime" : + $format = $lang->getDateTimeFormat(); + break; + } + } + } + + return $date->format($format); + + } + + /** + * @return an array of SmartyPluginDescriptor + */ + public function getPluginDescriptors() + { + return array( + new SmartyPluginDescriptor("function", "format_date", $this, "formatDate") + ); + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/TheliaHttpKernel.php b/core/lib/Thelia/Core/TheliaHttpKernel.php index 94ab09f1b..7109f5ba2 100755 --- a/core/lib/Thelia/Core/TheliaHttpKernel.php +++ b/core/lib/Thelia/Core/TheliaHttpKernel.php @@ -126,7 +126,7 @@ class TheliaHttpKernel extends HttpKernel if ($lang) { $request->getSession() - ->setLang($lang->getCode()) + ->setLang($lang) ->setLocale($lang->getLocale()) ; } diff --git a/core/lib/Thelia/Model/Lang.php b/core/lib/Thelia/Model/Lang.php index 3339dec64..cb89b53e1 100755 --- a/core/lib/Thelia/Model/Lang.php +++ b/core/lib/Thelia/Model/Lang.php @@ -24,15 +24,33 @@ class Lang extends BaseLang { return $default_lang; } - public function getDateFormat() { + public function getDateFormat() + { return "d/m/Y"; } - public function getTimeFormat() { + public function getTimeFormat() + { return "H:i:s"; } - public function getDateTimeFormat() { + public function getDateTimeFormat() + { return "d/m/Y H:i:s"; } + + public function getDecimalSeparator() + { + return "."; + } + + public function getThousandSeparator() + { + return " "; + } + + public function getDecimals() + { + return 2; + } } diff --git a/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php b/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php new file mode 100644 index 000000000..439ab7ee0 --- /dev/null +++ b/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php @@ -0,0 +1,58 @@ +. */ +/* */ +/*************************************************************************************/ +namespace Thelia\Tests\Core\Smarty\Plugins; + +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; +use Thelia\Core\HttpFoundation\Request; +use Thelia\Core\HttpFoundation\Session\Session; +use Thelia\Core\Template\Smarty\Plugins\Format; + +class FormatTest extends \PHPUnit_Framework_TestCase +{ + protected $request; + protected $session; + + public function setUp() + { + $this->session = new Session(new MockArraySessionStorage()); + $this->request = new Request(); + + $this->request->setSession($this->session); + } + + public function testFormatDateWithSpecificFormat() + { + $dateTime = new \DateTime(); + $format = "Y-m-d H:i:s"; + + $formatClass = new Format($this->request); + + $render = $formatClass->formatDate(array( + "date" => $dateTime, + "format" => $format + )); + + $this->assertEquals($dateTime->format($format), $render); + } + +} \ No newline at end of file diff --git a/install/sqldb.map b/install/sqldb.map new file mode 100644 index 000000000..63a93baa8 --- /dev/null +++ b/install/sqldb.map @@ -0,0 +1,2 @@ +# Sqlfile -> Database map +thelia.sql=thelia diff --git a/reset_install.sh b/reset_install.sh index f3a635a9b..5c51ac60c 100755 --- a/reset_install.sh +++ b/reset_install.sh @@ -9,7 +9,7 @@ if [ ! -f local/config/database.yml ]; then echo "[FAILED] Please add your database informations in local/config/database.yml and start this script again." else echo -e "\n\e[01;34m[INFO] Downloading vendors\e[00m\n" - php composer install --prefer-dist --no-dev + composer install cd local/config/ From 92b64db156b10ec830426bfdf940758a7702bf0e Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 2 Sep 2013 23:51:51 +0200 Subject: [PATCH 02/10] complete test for format_date smarty function --- .../Template/Smarty/Plugins/FormatTest.php | 97 ++++++++++++++++++- 1 file changed, 94 insertions(+), 3 deletions(-) diff --git a/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php b/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php index 439ab7ee0..bce527d41 100644 --- a/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php @@ -30,14 +30,12 @@ use Thelia\Core\Template\Smarty\Plugins\Format; class FormatTest extends \PHPUnit_Framework_TestCase { protected $request; - protected $session; public function setUp() { - $this->session = new Session(new MockArraySessionStorage()); $this->request = new Request(); - $this->request->setSession($this->session); + $this->request->setSession(new Session(new MockArraySessionStorage())); } public function testFormatDateWithSpecificFormat() @@ -55,4 +53,97 @@ class FormatTest extends \PHPUnit_Framework_TestCase $this->assertEquals($dateTime->format($format), $render); } + public function testFormatDateWithDefaultSessionParam() + { + $dateTime = new \DateTime(); + + $langMock = $this->getLangMock(); + $this->request->getSession()->setLang($langMock); + + $formatClass = new Format($this->request); + + $render = $formatClass->formatDate(array("date" => $dateTime)); + + $this->assertEquals($dateTime->format("Y-m-d H:i:s"), $render); + } + + public function testFormatDateWithDateSessionParam() + { + $dateTime = new \DateTime(); + + $langMock = $this->getLangMock(); + $this->request->getSession()->setLang($langMock); + + $formatClass = new Format($this->request); + + $render = $formatClass->formatDate(array( + "date" => $dateTime, + "output" => "date" + )); + + $this->assertEquals($dateTime->format("Y-m-d"), $render); + } + + public function testFormatDateWithTimeSessionParam() + { + $dateTime = new \DateTime(); + + $langMock = $this->getLangMock(); + $this->request->getSession()->setLang($langMock); + + $formatClass = new Format($this->request); + + $render = $formatClass->formatDate(array( + "date" => $dateTime, + "output" => "time" + )); + + $this->assertEquals($dateTime->format("H:i:s"), $render); + } + + public function testFormatDateWithDateTimeSessionParam() + { + $dateTime = new \DateTime(); + + $langMock = $this->getLangMock(); + $this->request->getSession()->setLang($langMock); + + $formatClass = new Format($this->request); + + $render = $formatClass->formatDate(array( + "date" => $dateTime, + "output" => "datetime" + )); + + $this->assertEquals($dateTime->format("Y-m-d H:i:s"), $render); + } + + public function getLangMock() + { + $mock = $this->getMock( + "Thelia\Model\Lang", + array( + "getDateFormat", + "getTimeFormat", + "getDateTimeFormat" + ) + ); + + $mock->expects($this->any()) + ->method("getDateFormat") + ->will($this->returnValue("Y-m-d")); + + $mock->expects($this->any()) + ->method("getTimeFormat") + ->will($this->returnValue("H:i:s")); + + $mock->expects($this->any()) + ->method("getDateTimeFormat") + ->will($this->returnValue("Y-m-d H:i:s")); + + return $mock; + } + + + } \ No newline at end of file From 0d261373f8d4ee261ac1acb5c7267a7e8be36ab0 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Tue, 3 Sep 2013 00:05:37 +0200 Subject: [PATCH 03/10] add some phpdoc --- .../Core/Template/Smarty/Plugins/Format.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php index c2fe1652d..ce7ba68c8 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php @@ -42,10 +42,15 @@ class Format extends AbstractSmartyPlugin } /** - * @param $params - * @param $smarty + * return date in expected format + * + * ex : {format_date date=$dateTimeObject format="Y-m-d H:i:s"} + * + * @param array $params + * @param null $template + * @return string */ - public function formatDate($params, &$smarty = null) + public function formatDate($params, $template = null) { $date = $params["date"]; @@ -82,13 +87,19 @@ class Format extends AbstractSmartyPlugin } + public function formatNumber($params, $template = null) + { + + } + /** * @return an array of SmartyPluginDescriptor */ public function getPluginDescriptors() { return array( - new SmartyPluginDescriptor("function", "format_date", $this, "formatDate") + new SmartyPluginDescriptor("function", "format_date", $this, "formatDate"), + new SmartyPluginDescriptor("function", "format_number", $this, "formatNumber") ); } } \ No newline at end of file From cf53e45ef0af8519bc7b1e64d2b78db7bb4a2c63 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Tue, 3 Sep 2013 07:57:14 +0200 Subject: [PATCH 04/10] remove sqlmap file --- install/sqldb.map | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 install/sqldb.map diff --git a/install/sqldb.map b/install/sqldb.map deleted file mode 100644 index 63a93baa8..000000000 --- a/install/sqldb.map +++ /dev/null @@ -1,2 +0,0 @@ -# Sqlfile -> Database map -thelia.sql=thelia From 7718c90e60b16927308b12d687156a77abc8b98f Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Tue, 3 Sep 2013 08:34:46 +0200 Subject: [PATCH 05/10] create foramt_number smarty function --- .../Exception/SmartyPluginException.php | 33 ++++++++++++ .../Core/Template/Smarty/Plugins/Format.php | 50 ++++++++++++++++++- core/lib/Thelia/Model/Lang.php | 2 +- 3 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 core/lib/Thelia/Core/Template/Smarty/Exception/SmartyPluginException.php diff --git a/core/lib/Thelia/Core/Template/Smarty/Exception/SmartyPluginException.php b/core/lib/Thelia/Core/Template/Smarty/Exception/SmartyPluginException.php new file mode 100644 index 000000000..fdaf93608 --- /dev/null +++ b/core/lib/Thelia/Core/Template/Smarty/Exception/SmartyPluginException.php @@ -0,0 +1,33 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Template\Smarty\Exception; + + +/** + * Class SmartyPluginException + * @package Thelia\Core\Template\Smarty\Exception + * @author Manuel Raynaud + */ +class SmartyPluginException extends \SmartyException +{} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php index ce7ba68c8..7404a2a6f 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php @@ -25,9 +25,13 @@ namespace Thelia\Core\Template\Smarty\Plugins; use Thelia\Core\HttpFoundation\Request; use Thelia\Core\Template\Smarty\AbstractSmartyPlugin; +use Thelia\Core\Template\Smarty\Exception\SmartyPluginException; use Thelia\Core\Template\Smarty\SmartyPluginDescriptor; /** + * + * format_date and format_date smarty function. + * * Class Format * @package Thelia\Core\Template\Smarty\Plugins * @author Manuel Raynaud @@ -44,14 +48,31 @@ class Format extends AbstractSmartyPlugin /** * return date in expected format * - * ex : {format_date date=$dateTimeObject format="Y-m-d H:i:s"} + * available parameters : + * date => DateTime objet (mandatory) + * format => expected format + * output => list of default system format. Values available : + * date => date format + * time => time format + * datetime => datetime format (default) + * + * ex : + * {format_date date=$dateTimeObject format="Y-m-d H:i:s"} will output the format with specific format + * {format_date date=$dateTimeObject output="date"} will output the date using the default date system format + * {format_date date=$dateTimeObject} will output with the default datetime system format * * @param array $params * @param null $template + * @throws \Thelia\Core\Template\Smarty\Exception\SmartyPluginException * @return string */ public function formatDate($params, $template = null) { + + if (array_key_exists("date", $params) === false) { + throw new SmartyPluginException("date is a mandatory parameter in format_date function"); + } + $date = $params["date"]; if(!$date instanceof \DateTime) { @@ -87,9 +108,36 @@ class Format extends AbstractSmartyPlugin } + /** + * + * display numbers in expected format + * + * available parameters : + * number => int or float number + * decimals => how many decimals format expected + * dec_point => separator for the decimal point + * thousands_sep => thousands separator + * + * + * @param $params + * @param null $template + * @throws \Thelia\Core\Template\Smarty\Exception\SmartyPluginException + * @return string the expected number formatted + */ public function formatNumber($params, $template = null) { + if (array_key_exists("number", $params) === false) { + throw new SmartyPluginException("number is a mandatory parameter in format_number function"); + } + $lang = $this->request->getSession()->getLang(); + + $number = $params["number"]; + $decimals = array_key_exists("decimals", $params) ? $params["decimals"] : $lang->getDecimals(); + $decPoint = array_key_exists("dec_point", $params) ? $params["dec_point"] : $lang->getDecimalSeparator(); + $thousandsSep = array_key_exists("thousands_sep", $params) ? $params["thousands_sep"] : $lang->getThousandsSeparator(); + + return number_format($number, $decimals, $decPoint, $thousandsSep); } /** diff --git a/core/lib/Thelia/Model/Lang.php b/core/lib/Thelia/Model/Lang.php index cb89b53e1..654c89719 100755 --- a/core/lib/Thelia/Model/Lang.php +++ b/core/lib/Thelia/Model/Lang.php @@ -44,7 +44,7 @@ class Lang extends BaseLang { return "."; } - public function getThousandSeparator() + public function getThousandsSeparator() { return " "; } From 1f50158398a38975e9285b4a77556d9420b78db1 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Tue, 3 Sep 2013 08:43:00 +0200 Subject: [PATCH 06/10] test foramt_date without datetime object --- .../Template/Smarty/Plugins/FormatTest.php | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php b/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php index bce527d41..210e02f43 100644 --- a/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php @@ -27,6 +27,9 @@ use Thelia\Core\HttpFoundation\Request; use Thelia\Core\HttpFoundation\Session\Session; use Thelia\Core\Template\Smarty\Plugins\Format; +/** + * @coversDefaultClass \Thelia\Core\Template\Smarty\Plugins\Format + */ class FormatTest extends \PHPUnit_Framework_TestCase { protected $request; @@ -38,6 +41,12 @@ class FormatTest extends \PHPUnit_Framework_TestCase $this->request->setSession(new Session(new MockArraySessionStorage())); } + /** + * + * test formatDate method with expected format + * + * @covers ::formatDate + */ public function testFormatDateWithSpecificFormat() { $dateTime = new \DateTime(); @@ -53,6 +62,12 @@ class FormatTest extends \PHPUnit_Framework_TestCase $this->assertEquals($dateTime->format($format), $render); } + /** + * + * test formatDate method with date default format + * + * @covers ::formatDate + */ public function testFormatDateWithDefaultSessionParam() { $dateTime = new \DateTime(); @@ -67,6 +82,12 @@ class FormatTest extends \PHPUnit_Framework_TestCase $this->assertEquals($dateTime->format("Y-m-d H:i:s"), $render); } + /** + * + * test formatDate method with time default format + * + * @covers ::formatDate + */ public function testFormatDateWithDateSessionParam() { $dateTime = new \DateTime(); @@ -84,6 +105,12 @@ class FormatTest extends \PHPUnit_Framework_TestCase $this->assertEquals($dateTime->format("Y-m-d"), $render); } + /** + * + * test formatDate method with datetime default format + * + * @covers ::formatDate + */ public function testFormatDateWithTimeSessionParam() { $dateTime = new \DateTime(); @@ -101,6 +128,12 @@ class FormatTest extends \PHPUnit_Framework_TestCase $this->assertEquals($dateTime->format("H:i:s"), $render); } + /** + * + * test formatDate method without output or expected format. datetime format must be return + * + * @covers ::formatDate + */ public function testFormatDateWithDateTimeSessionParam() { $dateTime = new \DateTime(); @@ -118,6 +151,25 @@ class FormatTest extends \PHPUnit_Framework_TestCase $this->assertEquals($dateTime->format("Y-m-d H:i:s"), $render); } + /** + * @covers ::formatDate + * @expectedException \Thelia\Core\Template\Smarty\Exception\SmartyPluginException + */ + public function testFormatDateWithoutDate() + { + $dateTime = new \DateTime(); + + $formatClass = new Format($this->request); + + $render = $formatClass->formatDate(array()); + + $this->assertEquals($dateTime->format("Y-m-d H:i:s"), $render); + } + + /** + * create a mock for Thelia\Model\Lang class + * @return \Thelia\Model\Lang instance + */ public function getLangMock() { $mock = $this->getMock( From 29dc067076efc5ba46af042d5f0c5304eec05319 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Tue, 3 Sep 2013 09:06:02 +0200 Subject: [PATCH 07/10] complete test for foramt_number smarty function --- .../Core/Template/Smarty/Plugins/Format.php | 1 + .../Template/Smarty/Plugins/FormatTest.php | 75 ++++++++++++++++++- 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php index 7404a2a6f..d4b6c246f 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php @@ -118,6 +118,7 @@ class Format extends AbstractSmartyPlugin * dec_point => separator for the decimal point * thousands_sep => thousands separator * + * ex : {format_number number="1246.12" decimals="1" dec_point="," thousands_sep=" "} will output "1 246,1" * * @param $params * @param null $template diff --git a/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php b/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php index 210e02f43..38c00b55f 100644 --- a/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Smarty/Plugins/FormatTest.php @@ -152,6 +152,8 @@ class FormatTest extends \PHPUnit_Framework_TestCase } /** + * test formatDate without mandatory parameters + * * @covers ::formatDate * @expectedException \Thelia\Core\Template\Smarty\Exception\SmartyPluginException */ @@ -166,6 +168,62 @@ class FormatTest extends \PHPUnit_Framework_TestCase $this->assertEquals($dateTime->format("Y-m-d H:i:s"), $render); } + + /** + * test formatNumber without mandatory parameters + * + * @covers ::formatNumber + * @expectedException \Thelia\Core\Template\Smarty\Exception\SmartyPluginException + */ + public function testFormatNumberWithoutParams() + { + $formatClass = new Format($this->request); + + $render = $formatClass->formatNumber(array()); + } + + /** + * test formatDate specifying all parameters + * + * @covers ::formatNumber + */ + public function testFormatNumberWithAllParams() + { + $formatClass = new Format($this->request); + + $number = 1256.12; + $decimals = 1; + $decPoint = ","; + $thousandsSep = " "; + + $render = $formatClass->formatNumber(array( + "number" => $number, + "decimals" => $decimals, + "dec_point" => $decPoint, + "thousands_sep" => $thousandsSep + )); + + $this->assertEquals($render, "1 256,1"); + } + + /** + * @covers ::formatNumber + */ + public function testFormatNumberWithDefaultParameters() + { + $number = 1234.56; + $langMock = $this->getLangMock(); + $this->request->getSession()->setLang($langMock); + + $formatClass = new Format($this->request); + + $render = $formatClass->formatNumber(array( + "number" => $number + )); + + $this->assertEquals( $render, number_format($number, 2, ",", " ")); + } + /** * create a mock for Thelia\Model\Lang class * @return \Thelia\Model\Lang instance @@ -177,7 +235,10 @@ class FormatTest extends \PHPUnit_Framework_TestCase array( "getDateFormat", "getTimeFormat", - "getDateTimeFormat" + "getDateTimeFormat", + "getDecimalSeparator", + "getThousandsSeparator", + "getDecimals" ) ); @@ -193,6 +254,18 @@ class FormatTest extends \PHPUnit_Framework_TestCase ->method("getDateTimeFormat") ->will($this->returnValue("Y-m-d H:i:s")); + $mock->expects($this->any()) + ->method("getDecimals") + ->will($this->returnValue(2)); + + $mock->expects($this->any()) + ->method("getDecimalSeparator") + ->will($this->returnValue(",")); + + $mock->expects($this->any()) + ->method("getThousandsSeparator") + ->will($this->returnValue(" ")); + return $mock; } From dce816d77cbcd84b697dbb98810d0c626b991d96 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Tue, 3 Sep 2013 09:22:12 +0200 Subject: [PATCH 08/10] fix typo in phpdoc --- core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php index d4b6c246f..a095f214a 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Format.php @@ -49,7 +49,7 @@ class Format extends AbstractSmartyPlugin * return date in expected format * * available parameters : - * date => DateTime objet (mandatory) + * date => DateTime object (mandatory) * format => expected format * output => list of default system format. Values available : * date => date format From e4c23adba600ddf3e23790a6ea30b531470098d9 Mon Sep 17 00:00:00 2001 From: franck Date: Tue, 3 Sep 2013 11:26:03 +0200 Subject: [PATCH 09/10] Smarty inheritance in admin template. --- core/lib/Thelia/Action/Currency.php | 120 ++++++ core/lib/Thelia/Config/Resources/action.xml | 9 +- core/lib/Thelia/Config/Resources/config.xml | 3 + .../Thelia/Config/Resources/routing/admin.xml | 22 + .../Controller/Admin/BaseAdminController.php | 9 + .../Controller/Admin/CurrencyController.php | 284 +++++++++++++ .../Thelia/Core/Event/CurrencyChangeEvent.php | 47 ++ .../Thelia/Core/Event/CurrencyCreateEvent.php | 93 ++++ .../Thelia/Core/Event/CurrencyDeleteEvent.php | 48 +++ core/lib/Thelia/Core/Event/CurrencyEvent.php | 47 ++ core/lib/Thelia/Core/Event/TheliaEvents.php | 15 +- core/lib/Thelia/Core/Template/Loop/Config.php | 4 +- .../Thelia/Core/Template/Loop/Currency.php | 86 +++- core/lib/Thelia/Core/Template/Loop/Image.php | 134 +++--- core/lib/Thelia/Form/CurrencyCreationForm.php | 65 +++ .../Thelia/Form/CurrencyModificationForm.php | 45 ++ core/lib/Thelia/Model/Currency.php | 60 ++- templates/admin/default/404.html | 16 +- templates/admin/default/admin-layout.tpl | 223 ++++++++++ templates/admin/default/assets/css/admin.less | 4 + templates/admin/default/categories.html | 28 +- templates/admin/default/configuration.html | 12 +- templates/admin/default/currencies.html | 401 ++++++++++++++++++ templates/admin/default/edit_category.html | 14 +- templates/admin/default/general_error.html | 24 +- templates/admin/default/home.html | 26 +- .../admin/default/includes/footer.inc.html | 20 - .../admin/default/includes/header.inc.html | 167 -------- templates/admin/default/includes/js.inc.html | 13 - templates/admin/default/login.html | 100 ++--- templates/admin/default/message-edit.html | 32 +- templates/admin/default/messages.html | 14 +- templates/admin/default/variable-edit.html | 33 +- templates/admin/default/variables.html | 14 +- 34 files changed, 1804 insertions(+), 428 deletions(-) create mode 100644 core/lib/Thelia/Action/Currency.php create mode 100644 core/lib/Thelia/Controller/Admin/CurrencyController.php create mode 100644 core/lib/Thelia/Core/Event/CurrencyChangeEvent.php create mode 100644 core/lib/Thelia/Core/Event/CurrencyCreateEvent.php create mode 100644 core/lib/Thelia/Core/Event/CurrencyDeleteEvent.php create mode 100644 core/lib/Thelia/Core/Event/CurrencyEvent.php create mode 100644 core/lib/Thelia/Form/CurrencyCreationForm.php create mode 100644 core/lib/Thelia/Form/CurrencyModificationForm.php create mode 100644 templates/admin/default/admin-layout.tpl create mode 100644 templates/admin/default/currencies.html delete mode 100755 templates/admin/default/includes/footer.inc.html delete mode 100755 templates/admin/default/includes/header.inc.html delete mode 100755 templates/admin/default/includes/js.inc.html diff --git a/core/lib/Thelia/Action/Currency.php b/core/lib/Thelia/Action/Currency.php new file mode 100644 index 000000000..4e3bb45d4 --- /dev/null +++ b/core/lib/Thelia/Action/Currency.php @@ -0,0 +1,120 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Action; + + +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +use Thelia\Model\CurrencyQuery; +use Thelia\Model\Currency as CurrencyModel; + +use Thelia\Core\Event\TheliaEvents; + +use Thelia\Core\Event\CurrencyChangeEvent; +use Thelia\Core\Event\CurrencyCreateEvent; +use Thelia\Core\Event\CurrencyDeleteEvent; + +class Currency extends BaseAction implements EventSubscriberInterface +{ + /** + * Create a new currencyuration entry + * + * @param CurrencyCreateEvent $event + */ + public function create(CurrencyCreateEvent $event) + { + $currency = new CurrencyModel(); + + $currency + ->setDispatcher($this->getDispatcher()) + + ->setLocale($event->getLocale()) + ->setName($event->getCurrencyName()) + ->setSymbol($event->getSymbol()) + ->setRate($event->getRate()) + ->setCode($event->getCode()) + + ->save() + ; + + $event->setCurrency($currency); + } + + /** + * Change a currency + * + * @param CurrencyChangeEvent $event + */ + public function modify(CurrencyChangeEvent $event) + { + $search = CurrencyQuery::create(); + + if (null !== $currency = CurrencyQuery::create()->findOneById($event->getCurrencyId())) { + + $currency + ->setDispatcher($this->getDispatcher()) + + ->setLocale($event->getLocale()) + ->setName($event->getCurrencyName()) + ->setSymbol($event->getSymbol()) + ->setRate($event->getRate()) + ->setCode($event->getCode()) + + ->save(); + + $event->setCurrency($currency); + } + } + + /** + * Delete a currencyuration entry + * + * @param CurrencyDeleteEvent $event + */ + public function delete(CurrencyDeleteEvent $event) + { + + if (null !== ($currency = CurrencyQuery::create()->findOneById($event->getCurrencyId()))) { + + $currency + ->setDispatcher($this->getDispatcher()) + ->delete() + ; + + $event->setCurrency($currency); + } + } + + /** + * {@inheritDoc} + */ + public static function getSubscribedEvents() + { + return array( + TheliaEvents::CURRENCY_CREATE => array("create", 128), + TheliaEvents::CURRENCY_MODIFY => array("modify", 128), + TheliaEvents::CURRENCY_DELETE => array("delete", 128), + ); + } +} diff --git a/core/lib/Thelia/Config/Resources/action.xml b/core/lib/Thelia/Config/Resources/action.xml index a9638fe04..bcc162e24 100755 --- a/core/lib/Thelia/Config/Resources/action.xml +++ b/core/lib/Thelia/Config/Resources/action.xml @@ -32,12 +32,17 @@ - + - + + + + + + diff --git a/core/lib/Thelia/Config/Resources/config.xml b/core/lib/Thelia/Config/Resources/config.xml index 733e4303a..1210c9949 100755 --- a/core/lib/Thelia/Config/Resources/config.xml +++ b/core/lib/Thelia/Config/Resources/config.xml @@ -53,6 +53,9 @@
+ + + diff --git a/core/lib/Thelia/Config/Resources/routing/admin.xml b/core/lib/Thelia/Config/Resources/routing/admin.xml index d57eb8f95..627fa9bf3 100755 --- a/core/lib/Thelia/Config/Resources/routing/admin.xml +++ b/core/lib/Thelia/Config/Resources/routing/admin.xml @@ -83,6 +83,28 @@ Thelia\Controller\Admin\MessageController::deleteAction + + + + Thelia\Controller\Admin\CurrencyController::defaultAction + + + + Thelia\Controller\Admin\CurrencyController::createAction + + + + Thelia\Controller\Admin\CurrencyController::changeAction + + + + Thelia\Controller\Admin\CurrencyController::saveChangeAction + + + + Thelia\Controller\Admin\CurrencyController::deleteAction + + diff --git a/core/lib/Thelia/Controller/Admin/BaseAdminController.php b/core/lib/Thelia/Controller/Admin/BaseAdminController.php index c4b4c44b0..8160033fe 100755 --- a/core/lib/Thelia/Controller/Admin/BaseAdminController.php +++ b/core/lib/Thelia/Controller/Admin/BaseAdminController.php @@ -199,12 +199,21 @@ class BaseAdminController extends BaseController // Find the current edit language ID $edition_language = $this->getCurrentEditionLangId(); + // Current back-office (not edition) language + $current_lang = LangQuery::create()->findOneById($session->getLangId()); + // Prepare common template variables $args = array_merge($args, array( 'locale' => $session->getLocale(), 'lang_code' => $session->getLang(), 'lang_id' => $session->getLangId(), + + 'datetime_format' => $current_lang->getDateTimeFormat(), + 'date_format' => $current_lang->getDateFormat(), + 'time_format' => $current_lang->getTimeFormat(), + 'edition_language' => $edition_language, + 'current_url' => htmlspecialchars($this->getRequest()->getUri()) )); diff --git a/core/lib/Thelia/Controller/Admin/CurrencyController.php b/core/lib/Thelia/Controller/Admin/CurrencyController.php new file mode 100644 index 000000000..69cc60117 --- /dev/null +++ b/core/lib/Thelia/Controller/Admin/CurrencyController.php @@ -0,0 +1,284 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Controller\Admin; + +use Thelia\Core\Event\CurrencyDeleteEvent; +use Thelia\Core\Event\TheliaEvents; +use Thelia\Tools\URL; +use Thelia\Core\Event\CurrencyChangeEvent; +use Thelia\Core\Event\CurrencyCreateEvent; +use Thelia\Log\Tlog; +use Thelia\Form\Exception\FormValidationException; +use Thelia\Core\Security\Exception\AuthorizationException; +use Thelia\Model\CurrencyQuery; +use Thelia\Form\CurrencyModificationForm; +use Thelia\Form\CurrencyCreationForm; + +/** + * Manages currencies sent by mail + * + * @author Franck Allimant + */ +class CurrencyController extends BaseAdminController +{ + /** + * Render the currencies list, ensuring the sort order is set. + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + protected function renderList() { + + // Find the current order + $order = $this->getRequest()->get( + 'order', + $this->getSession()->get('admin.currency_order', 'manual') + ); + + // Store the current sort order in session + $this->getSession()->set('admin.currency_order', $order); + + return $this->render('currencies', array('order' => $order)); + } + + /** + * The default action is displaying the currencies list. + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + public function defaultAction() { + + if (null !== $response = $this->checkAuth("admin.configuration.currencies.view")) return $response; + + return $this->renderList(); + } + + /** + * Create a new currency object + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + public function createAction() { + + // Check current user authorization + if (null !== $response = $this->checkAuth("admin.configuration.currencies.create")) return $response; + + $currency = false; + + // Create the Creation Form + $creationForm = new CurrencyCreationForm($this->getRequest()); + + try { + + // Validate the form, create the CurrencyCreation event and dispatch it. + $form = $this->validateForm($creationForm, "POST"); + + $data = $form->getData(); + + $createEvent = new CurrencyCreateEvent(); + + $createEvent + ->setCurrencyName($data['name']) + ->setLocale($data["locale"]) + ->setSymbol($data['symbol']) + ; + + $this->dispatch(TheliaEvents::CURRENCY_CREATE, $createEvent); + + $createdObject = $createEvent->getCurrency(); + + // Log currency creation + $this->adminLogAppend(sprintf("Variable %s (ID %s) created", $createdObject->getName(), $createdObject->getId())); + + // Substitute _ID_ in the URL with the ID of the created object + $successUrl = str_replace('_ID_', $createdObject->getId(), $creationForm->getSuccessUrl()); + + // Redirect to the success URL + $this->redirect($successUrl); + } + catch (FormValidationException $ex) { + // Form cannot be validated + $currency = sprintf("Please check your input: %s", $ex->getCurrency()); + } + catch (\Exception $ex) { + // Any other error + $currency = sprintf("Sorry, an error occured: %s", $ex->getCurrency()); + } + + if ($currency !== false) { + // An error has been detected: log it + Tlog::getInstance()->error(sprintf("Error during currency creation process : %s. Exception was %s", $currency, $ex->getCurrency())); + + // Mark the form as errored + $creationForm->setErrorCurrency($currency); + + // Pass it to the parser, along with the error currency + $this->getParserContext() + ->addForm($creationForm) + ->setGeneralError($currency) + ; + } + + // At this point, the form has error, and should be redisplayed. + return $this->renderList(); + } + + /** + * Load a currency object for modification, and display the edit template. + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + public function changeAction() { + + // Check current user authorization + if (null !== $response = $this->checkAuth("admin.configuration.currencies.change")) return $response; + + // Load the currency object + $currency = CurrencyQuery::create() + ->joinWithI18n($this->getCurrentEditionLocale()) + ->findOneById($this->getRequest()->get('currency_id')); + + if ($currency != null) { + + // Prepare the data that will hydrate the form + $data = array( + 'id' => $currency->getId(), + 'name' => $currency->getName(), + 'locale' => $currency->getLocale(), + 'code' => $currency->getCode(), + 'symbol' => $currency->getSymbol(), + 'rate' => $currency->getSubject() + ); + + // Setup the object form + $changeForm = new CurrencyModificationForm($this->getRequest(), "form", $data); + + // Pass it to the parser + $this->getParserContext()->addForm($changeForm); + } + + // Render the edition template. + return $this->render('currency-edit', array('currency_id' => $this->getRequest()->get('currency_id'))); + } + + /** + * Save changes on a modified currency object, and either go back to the currency list, or stay on the edition page. + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + public function saveChangeAction() { + + // Check current user authorization + if (null !== $response = $this->checkAuth("admin.configuration.currencies.change")) return $response; + + $currency = false; + + // Create the form from the request + $changeForm = new CurrencyModificationForm($this->getRequest()); + + // Get the currency ID + $currency_id = $this->getRequest()->get('currency_id'); + + try { + + // Check the form against constraints violations + $form = $this->validateForm($changeForm, "POST"); + + // Get the form field values + $data = $form->getData(); + + $changeEvent = new CurrencyChangeEvent($data['id']); + + // Create and dispatch the change event + $changeEvent + ->setCurrencyName($data['name']) + ->setLocale($data["locale"]) + ->setSymbol($data['symbol']) + ->setCode($data['code']) + ->setRate($data['rate']) + ; + + $this->dispatch(TheliaEvents::CURRENCY_MODIFY, $changeEvent); + + // Log currency modification + $changedObject = $changeEvent->getCurrency(); + + $this->adminLogAppend(sprintf("Variable %s (ID %s) modified", $changedObject->getName(), $changedObject->getId())); + + // If we have to stay on the same page, do not redirect to the succesUrl, + // just redirect to the edit page again. + if ($this->getRequest()->get('save_mode') == 'stay') { + $this->redirect(URL::absoluteUrl( + "admin/configuration/currencies/change", + array('currency_id' => $currency_id) + )); + } + + // Redirect to the success URL + $this->redirect($changeForm->getSuccessUrl()); + } + catch (FormValidationException $ex) { + // Invalid data entered + $currency = sprintf("Please check your input: %s", $ex->getCurrency()); + } + catch (\Exception $ex) { + // Any other error + $currency = sprintf("Sorry, an error occured: %s", $ex->getCurrency()); + } + + if ($currency !== false) { + // Log error currency + Tlog::getInstance()->error(sprintf("Error during currency modification process : %s. Exception was %s", $currency, $ex->getCurrency())); + + // Mark the form as errored + $changeForm->setErrorCurrency($currency); + + // Pas the form and the error to the parser + $this->getParserContext() + ->addForm($changeForm) + ->setGeneralError($currency) + ; + } + + // At this point, the form has errors, and should be redisplayed. + return $this->render('currency-edit', array('currency_id' => $currency_id)); + } + + /** + * Delete a currency object + * + * @return Symfony\Component\HttpFoundation\Response the response + */ + public function deleteAction() { + + // Check current user authorization + if (null !== $response = $this->checkAuth("admin.configuration.currencies.delete")) return $response; + + // Get the currency id, and dispatch the delet request + $event = new CurrencyDeleteEvent($this->getRequest()->get('currency_id')); + + $this->dispatch(TheliaEvents::CURRENCY_DELETE, $event); + + $this->redirect(URL::adminViewUrl('currencies')); + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/CurrencyChangeEvent.php b/core/lib/Thelia/Core/Event/CurrencyChangeEvent.php new file mode 100644 index 000000000..f94d71b88 --- /dev/null +++ b/core/lib/Thelia/Core/Event/CurrencyChangeEvent.php @@ -0,0 +1,47 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; +use Thelia\Model\Currency; + +class CurrencyChangeEvent extends CurrencyCreateEvent +{ + protected $currency_id; + + public function __construct($currency_id) + { + $this->setCurrencyId($currency_id); + } + + public function getCurrencyId() + { + return $this->currency_id; + } + + public function setCurrencyId($currency_id) + { + $this->currency_id = $currency_id; + + return $this; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/CurrencyCreateEvent.php b/core/lib/Thelia/Core/Event/CurrencyCreateEvent.php new file mode 100644 index 000000000..fba23a09b --- /dev/null +++ b/core/lib/Thelia/Core/Event/CurrencyCreateEvent.php @@ -0,0 +1,93 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; +use Thelia\Model\Currency; + +class CurrencyCreateEvent extends CurrencyEvent +{ + protected $currency_name; + protected $locale; + protected $symbol; + protected $code; + protected $rate; + + // Use currency_name to prevent conflict with Event::name property. + public function getCurrencyName() + { + return $this->currency_name; + } + + public function setCurrencyName($currency_name) + { + $this->currency_name = $currency_name; + + return $this; + } + + public function getLocale() + { + return $this->locale; + } + + public function setLocale($locale) + { + $this->locale = $locale; + + return $this; + } + + public function getSymbol() + { + return $this->symbol; + } + + public function setSymbol($symbol) + { + $this->symbol = $symbol; + } + + public function getCode() + { + return $this->code; + } + + public function setCode($code) + { + $this->code = $code; + + return $this; + } + + public function getRate() + { + return $this->rate; + } + + public function setRate($rate) + { + $this->rate = $rate; + + return $this; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/CurrencyDeleteEvent.php b/core/lib/Thelia/Core/Event/CurrencyDeleteEvent.php new file mode 100644 index 000000000..5b9714b47 --- /dev/null +++ b/core/lib/Thelia/Core/Event/CurrencyDeleteEvent.php @@ -0,0 +1,48 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; + +use Thelia\Model\Currency; + +class CurrencyDeleteEvent extends CurrencyEvent +{ + protected $currency_id; + + public function __construct($currency_id) + { + $this->setCurrencyId($currency_id); + } + + public function getCurrencyId() + { + return $this->currency_id; + } + + public function setCurrencyId($currency_id) + { + $this->currency_id = $currency_id; + + return $this; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Core/Event/CurrencyEvent.php b/core/lib/Thelia/Core/Event/CurrencyEvent.php new file mode 100644 index 000000000..e0716da0c --- /dev/null +++ b/core/lib/Thelia/Core/Event/CurrencyEvent.php @@ -0,0 +1,47 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; +use Thelia\Model\Currency; + +class CurrencyEvent extends ActionEvent +{ + protected $currency; + + public function __construct(Currency $currency = null) + { + $this->currency = $currency; + } + + public function getCurrency() + { + return $this->currency; + } + + public function setCurrency($currency) + { + $this->currency = $currency; + + return $this; + } +} diff --git a/core/lib/Thelia/Core/Event/TheliaEvents.php b/core/lib/Thelia/Core/Event/TheliaEvents.php index ed0a96cdf..8bca60bb4 100755 --- a/core/lib/Thelia/Core/Event/TheliaEvents.php +++ b/core/lib/Thelia/Core/Event/TheliaEvents.php @@ -194,7 +194,6 @@ final class TheliaEvents const BEFORE_DELETECONFIG = "action.before_deleteConfig"; const AFTER_DELETECONFIG = "action.after_deleteConfig"; - // -- Messages management --------------------------------------------- const MESSAGE_CREATE = "action.createMessage"; @@ -210,4 +209,18 @@ final class TheliaEvents const BEFORE_DELETEMESSAGE = "action.before_deleteMessage"; const AFTER_DELETEMESSAGE = "action.after_deleteMessage"; + // -- Currencies management --------------------------------------------- + + const CURRENCY_CREATE = "action.createCurrency"; + const CURRENCY_MODIFY = "action.changeCurrency"; + const CURRENCY_DELETE = "action.deleteCurrency"; + + const BEFORE_CREATECURRENCY = "action.before_createCurrency"; + const AFTER_CREATECURRENCY = "action.after_createCurrency"; + + const BEFORE_CHANGECURRENCY = "action.before_changeCurrency"; + const AFTER_CHANGECURRENCY = "action.after_changeCurrency"; + + const BEFORE_DELETECURRENCY = "action.before_deleteCurrency"; + const AFTER_DELETECURRENCY = "action.after_deleteCurrency"; } diff --git a/core/lib/Thelia/Core/Template/Loop/Config.php b/core/lib/Thelia/Core/Template/Loop/Config.php index 02f39510d..5cc1b2b44 100644 --- a/core/lib/Thelia/Core/Template/Loop/Config.php +++ b/core/lib/Thelia/Core/Template/Loop/Config.php @@ -109,13 +109,13 @@ class Config extends BaseI18nLoop ->set("NAME" , $result->getName()) ->set("VALUE" , $result->getValue()) ->set("IS_TRANSLATED", $result->getVirtualColumn('IS_TRANSLATED')) - ->set("LOCALE",$locale) + ->set("LOCALE" , $locale) ->set("TITLE" , $result->getVirtualColumn('i18n_TITLE')) ->set("CHAPO" , $result->getVirtualColumn('i18n_CHAPO')) ->set("DESCRIPTION" , $result->getVirtualColumn('i18n_DESCRIPTION')) ->set("POSTSCRIPTUM" , $result->getVirtualColumn('i18n_POSTSCRIPTUM')) ->set("HIDDEN" , $result->getHidden()) - ->set("SECURED" , $result->getSecured()) + ->set("SECURED" , $result->getSecured()) ->set("CREATE_DATE" , $result->getCreatedAt()) ->set("UPDATE_DATE" , $result->getUpdatedAt()) ; diff --git a/core/lib/Thelia/Core/Template/Loop/Currency.php b/core/lib/Thelia/Core/Template/Loop/Currency.php index 8076e2276..2fb296070 100755 --- a/core/lib/Thelia/Core/Template/Loop/Currency.php +++ b/core/lib/Thelia/Core/Template/Loop/Currency.php @@ -33,6 +33,8 @@ use Thelia\Core\Template\Loop\Argument\Argument; use Thelia\Model\CurrencyQuery; use Thelia\Model\ConfigQuery; +use Thelia\Type\TypeCollection; +use Thelia\Type\EnumListType; /** * @@ -53,7 +55,22 @@ class Currency extends BaseI18nLoop return new ArgumentCollection( Argument::createIntListTypeArgument('id'), Argument::createIntListTypeArgument('exclude'), - Argument::createBooleanTypeArgument('default_only', false) + Argument::createBooleanTypeArgument('default_only', false), + new Argument( + 'order', + new TypeCollection( + new EnumListType( + array( + 'id', 'id_reverse', + 'name', 'name_reverse', + 'code', 'code_reverse', + 'symbol', 'symbol_reverse', + 'rate', 'rate_reverse', + 'manual', 'manual_reverse') + ) + ), + 'manual' + ) ); } @@ -87,7 +104,53 @@ class Currency extends BaseI18nLoop $search->filterByByDefault(true); } - $search->orderByPosition(); + $orders = $this->getOrder(); + + foreach($orders as $order) { + switch ($order) { + case 'id': + $search->orderById(Criteria::ASC); + break; + case 'id_reverse': + $search->orderById(Criteria::DESC); + break; + + case 'name': + $search->addAscendingOrderByColumn('i18n_NAME'); + break; + case 'name_reverse': + $search->addDescendingOrderByColumn('i18n_NAME'); + break; + + case 'code': + $search->orderByCode(Criteria::ASC); + break; + case 'code_reverse': + $search->orderByCode(Criteria::DESC); + break; + + case 'symbol': + $search->orderBySymbol(Criteria::ASC); + break; + case 'symbol_reverse': + $search->orderBySymbol(Criteria::DESC); + break; + + case 'rate': + $search->orderByRate(Criteria::ASC); + break; + case 'rate_reverse': + $search->orderByRate(Criteria::DESC); + break; + + case 'manual': + $search->orderByPosition(Criteria::ASC); + break; + case 'manual_reverse': + $search->orderByPosition(Criteria::DESC); + break; + } + } /* perform search */ $currencies = $this->search($search, $pagination); @@ -95,15 +158,18 @@ class Currency extends BaseI18nLoop $loopResult = new LoopResult(); foreach ($currencies as $currency) { + $loopResultRow = new LoopResultRow(); - $loopResultRow->set("ID", $currency->getId()) - ->set("IS_TRANSLATED",$currency->getVirtualColumn('IS_TRANSLATED')) - ->set("LOCALE",$locale) - ->set("NAME",$currency->getVirtualColumn('i18n_NAME')) - ->set("ISOCODE", $currency->getCode()) - ->set("SYMBOL", $currency->getSymbol()) - ->set("RATE", $currency->getRate()) - ->set("IS_DEFAULT", $currency->getByDefault()); + $loopResultRow + ->set("ID" , $currency->getId()) + ->set("IS_TRANSLATED" , $currency->getVirtualColumn('IS_TRANSLATED')) + ->set("LOCALE" , $locale) + ->set("NAME" , $currency->getVirtualColumn('i18n_NAME')) + ->set("ISOCODE" , $currency->getCode()) + ->set("SYMBOL" , $currency->getSymbol()) + ->set("RATE" , $currency->getRate()) + ->set("POSITION" , $currency->getPosition()) + ->set("IS_DEFAULT" , $currency->getByDefault()); $loopResult->addRow($loopResultRow); } diff --git a/core/lib/Thelia/Core/Template/Loop/Image.php b/core/lib/Thelia/Core/Template/Loop/Image.php index fc34a40b6..697ce5d73 100755 --- a/core/lib/Thelia/Core/Template/Loop/Image.php +++ b/core/lib/Thelia/Core/Template/Loop/Image.php @@ -50,6 +50,60 @@ class Image extends BaseI18nLoop */ protected $possible_sources = array('category', 'product', 'folder', 'content'); + /** + * @return \Thelia\Core\Template\Loop\Argument\ArgumentCollection + */ + protected function getArgDefinitions() + { + $collection = new ArgumentCollection( + + Argument::createIntListTypeArgument('id'), + Argument::createIntListTypeArgument('exclude'), + new Argument( + 'order', + new TypeCollection( + new EnumListType(array('alpha', 'alpha-reverse', 'manual', 'manual-reverse', 'random')) + ), + 'manual' + ), + Argument::createIntTypeArgument('lang'), + + Argument::createIntTypeArgument('width'), + Argument::createIntTypeArgument('height'), + Argument::createIntTypeArgument('rotation', 0), + Argument::createAnyTypeArgument('background_color'), + Argument::createIntTypeArgument('quality'), + new Argument( + 'resize_mode', + new TypeCollection( + new EnumType(array('crop', 'borders', 'none')) + ), + 'none' + ), + Argument::createAnyTypeArgument('effects'), + + Argument::createIntTypeArgument('category'), + Argument::createIntTypeArgument('product'), + Argument::createIntTypeArgument('folder'), + Argument::createIntTypeArgument('content'), + + new Argument( + 'source', + new TypeCollection( + new EnumType($this->possible_sources) + ) + ), + Argument::createIntTypeArgument('source_id') + ); + + // Add possible image sources + foreach($this->possible_sources as $source) { + $collection->addArgument(Argument::createIntTypeArgument($source)); + } + + return $collection; + } + /** * Dynamically create the search query, and set the proper filter and order * @@ -244,19 +298,19 @@ class Image extends BaseI18nLoop $loopResultRow = new LoopResultRow(); $loopResultRow - ->set("ID", $result->getId()) - ->set("LOCALE",$locale) - ->set("IMAGE_URL", $event->getFileUrl()) - ->set("ORIGINAL_IMAGE_URL", $event->getOriginalFileUrl()) - ->set("IMAGE_PATH", $event->getCacheFilepath()) - ->set("ORIGINAL_IMAGE_PATH", $source_filepath) - ->set("TITLE",$folder->getVirtualColumn('i18n_TITLE')) - ->set("CHAPO", $folder->getVirtualColumn('i18n_CHAPO')) - ->set("DESCRIPTION", $folder->getVirtualColumn('i18n_DESCRIPTION')) - ->set("POSTSCRIPTUM", $folder->getVirtualColumn('i18n_POSTSCRIPTUM')) - ->set("POSITION", $result->getPosition()) - ->set("OBJECT_TYPE", $object_type) - ->set("OBJECT_ID", $object_id) + ->set("ID" , $result->getId()) + ->set("LOCALE" ,$locale) + ->set("IMAGE_URL" , $event->getFileUrl()) + ->set("ORIGINAL_IMAGE_URL" , $event->getOriginalFileUrl()) + ->set("IMAGE_PATH" , $event->getCacheFilepath()) + ->set("ORIGINAL_IMAGE_PATH" , $source_filepath) + ->set("TITLE" , $result->getVirtualColumn('i18n_TITLE')) + ->set("CHAPO" , $result->getVirtualColumn('i18n_CHAPO')) + ->set("DESCRIPTION" , $result->getVirtualColumn('i18n_DESCRIPTION')) + ->set("POSTSCRIPTUM" , $result->getVirtualColumn('i18n_POSTSCRIPTUM')) + ->set("POSITION" , $result->getPosition()) + ->set("OBJECT_TYPE" , $object_type) + ->set("OBJECT_ID" , $object_id) ; $loopResult->addRow($loopResultRow); @@ -269,58 +323,4 @@ class Image extends BaseI18nLoop return $loopResult; } - - /** - * @return \Thelia\Core\Template\Loop\Argument\ArgumentCollection - */ - protected function getArgDefinitions() - { - $collection = new ArgumentCollection( - - Argument::createIntListTypeArgument('id'), - Argument::createIntListTypeArgument('exclude'), - new Argument( - 'order', - new TypeCollection( - new EnumListType(array('alpha', 'alpha-reverse', 'manual', 'manual-reverse', 'random')) - ), - 'manual' - ), - Argument::createIntTypeArgument('lang'), - - Argument::createIntTypeArgument('width'), - Argument::createIntTypeArgument('height'), - Argument::createIntTypeArgument('rotation', 0), - Argument::createAnyTypeArgument('background_color'), - Argument::createIntTypeArgument('quality'), - new Argument( - 'resize_mode', - new TypeCollection( - new EnumType(array('crop', 'borders', 'none')) - ), - 'none' - ), - Argument::createAnyTypeArgument('effects'), - - Argument::createIntTypeArgument('category'), - Argument::createIntTypeArgument('product'), - Argument::createIntTypeArgument('folder'), - Argument::createIntTypeArgument('content'), - - new Argument( - 'source', - new TypeCollection( - new EnumType($this->possible_sources) - ) - ), - Argument::createIntTypeArgument('source_id') - ); - - // Add possible image sources - foreach($this->possible_sources as $source) { - $collection->addArgument(Argument::createIntTypeArgument($source)); - } - - return $collection; - } } \ No newline at end of file diff --git a/core/lib/Thelia/Form/CurrencyCreationForm.php b/core/lib/Thelia/Form/CurrencyCreationForm.php new file mode 100644 index 000000000..11a496582 --- /dev/null +++ b/core/lib/Thelia/Form/CurrencyCreationForm.php @@ -0,0 +1,65 @@ +. */ +/* */ +/*************************************************************************************/ +namespace Thelia\Form; + +use Symfony\Component\Validator\Constraints; +use Thelia\Model\CurrencyQuery; +use Symfony\Component\Validator\ExecutionContextInterface; +use Symfony\Component\Validator\Constraints\NotBlank; + +class CurrencyCreationForm extends BaseForm +{ + protected function buildForm($change_mode = false) + { + $name_constraints = array(new Constraints\NotBlank()); + + if (!$change_mode) { + $name_constraints[] = new Constraints\Callback(array( + "methods" => array(array($this, "checkDuplicateName")) + )); + } + + $this->formBuilder + ->add("name" , "text" , array("constraints" => array($name_constraints))) + ->add("locale" , "text" , array()) + ->add("symbol" , "text" , array("constraints" => array(new NotBlank()))) + ->add("rate" , "text" , array("constraints" => array(new NotBlank()))) + ->add("code" , "text" , array("constraints" => array(new NotBlank()))) + ; + } + + public function getName() + { + return "thelia_currency_creation"; + } + + public function checkDuplicateName($value, ExecutionContextInterface $context) + { + $currency = CurrencyQuery::create()->findOneByName($value); + + if ($currency) { + $context->addViolation(sprintf("A currency with name \"%s\" already exists.", $value)); + } + } + +} diff --git a/core/lib/Thelia/Form/CurrencyModificationForm.php b/core/lib/Thelia/Form/CurrencyModificationForm.php new file mode 100644 index 000000000..6a4279d1b --- /dev/null +++ b/core/lib/Thelia/Form/CurrencyModificationForm.php @@ -0,0 +1,45 @@ +. */ +/* */ +/*************************************************************************************/ +namespace Thelia\Form; + +use Symfony\Component\Validator\Constraints\NotBlank; +use Thelia\Model\LangQuery; +use Propel\Runtime\ActiveQuery\Criteria; +use Symfony\Component\Validator\Constraints\GreaterThan; + +class CurrencyModificationForm extends CurrencyCreationForm +{ + protected function buildForm() + { + parent::buildForm(true); + + $this->formBuilder + ->add("id" , "hidden", array("constraints" => array(new GreaterThan(array('value' => 0))))) + ; + } + + public function getName() + { + return "thelia_currency_modification"; + } +} \ No newline at end of file diff --git a/core/lib/Thelia/Model/Currency.php b/core/lib/Thelia/Model/Currency.php index e9aec3ea0..f2f1175c6 100755 --- a/core/lib/Thelia/Model/Currency.php +++ b/core/lib/Thelia/Model/Currency.php @@ -3,7 +3,65 @@ namespace Thelia\Model; use Thelia\Model\Base\Currency as BaseCurrency; +use Thelia\Core\Event\TheliaEvents; +use Propel\Runtime\Connection\ConnectionInterface; +use Thelia\Core\Event\CurrencyEvent; class Currency extends BaseCurrency { -} + use \Thelia\Model\Tools\ModelEventDispatcherTrait; + + /** + * {@inheritDoc} + */ + public function preInsert(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_CREATECURRENCY, new CurrencyEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postInsert(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_CREATECURRENCY, new CurrencyEvent($this)); + } + + /** + * {@inheritDoc} + */ + public function preUpdate(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_CHANGECURRENCY, new CurrencyEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postUpdate(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_CHANGECURRENCY, new CurrencyEvent($this)); + } + + /** + * {@inheritDoc} + */ + public function preDelete(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::BEFORE_DELETECURRENCY, new CurrencyEvent($this)); + + return true; + } + + /** + * {@inheritDoc} + */ + public function postDelete(ConnectionInterface $con = null) + { + $this->dispatchEvent(TheliaEvents::AFTER_DELETECURRENCY, new CurrencyEvent($this)); + } +} \ No newline at end of file diff --git a/templates/admin/default/404.html b/templates/admin/default/404.html index 48caf7a12..c72b43b01 100755 --- a/templates/admin/default/404.html +++ b/templates/admin/default/404.html @@ -1,11 +1,9 @@ -{$page_title={intl l='Page not found'}} +{extends file="general_error.html"} -{include file='includes/header.inc.html'} +{block name="page-title"}{intl l='Page not found'}{/block} +{block name="content-title"}{intl l='Page not found'}{/block} -
-

{intl l="Oops! An Error Occurred"}

-

{intl l='The server returned a "404 Not Found"'}

-

{intl l='The page you\'ve requested was not found. Please check the page address, and try again.'}

-
- -{include file='includes/footer.inc.html'} \ No newline at end of file +{block name="error-message"} +

{intl l='The server returned a "404 Not Found"'}

+

{intl l='The page you\'ve requested was not found. Please check the page address, and try again.'}

+{/block} \ No newline at end of file diff --git a/templates/admin/default/admin-layout.tpl b/templates/admin/default/admin-layout.tpl new file mode 100644 index 000000000..93143d0e6 --- /dev/null +++ b/templates/admin/default/admin-layout.tpl @@ -0,0 +1,223 @@ +{* -- By default, check admin login ----------------------------------------- *} + +{block name="check-auth"} + {check_auth roles="ADMIN" permissions="{block name="check-permissions"}{/block}" login_tpl="/admin/login"} +{/block} + + + + + {block name="page-title"}Default Page Title{/block} - {intl l='Thelia Back Office'} + + {images file='assets/img/favicon.ico'}{/images} + + + + {block name="meta"}{/block} + + {* -- Bootstrap CSS section --------------------------------------------- *} + + {block name="before-bootstrap-css"}{/block} + + {stylesheets file='assets/bootstrap/css/bootstrap.css' filters='cssembed'} + + {/stylesheets} + + {stylesheets file='assets/bootstrap/css/bootstrap-responsive.css' filters='cssembed'} + + {/stylesheets} + + {block name="after-bootstrap-css"}{/block} + + {* -- Admin CSS section ------------------------------------------------- *} + + {block name="before-admin-css"}{/block} + + {stylesheets file='assets/css/*' filters='less,cssembed'} + + {/stylesheets} + + {block name="after-admin-css"}{/block} + + {* Modules css are included here *} + + {module_include location='head_css'} + + + + {* display top bar only if admin is connected *} + + {loop name="top-bar-auth" type="auth" roles="ADMIN"} + + {* -- Brand bar section ------------------------------------------------- *} + + {module_include location='before_topbar'} + +
+
+ +
{intl l='Version %ver' ver="{$THELIA_VERSION}"}
+ + {module_include location='inside_topbar'} + + + + {loop name="top-bar-search" type="auth" roles="ADMIN" permissions="admin.search"} + +
+
+ + +
+
+ + {/loop} + + +
+
+ + {module_include location='after_topbar'} + + {* -- Top menu section -------------------------------------------------- *} + + {module_include location='before_top_menu'} + + + + {module_include location='after_top_menu'} + + {/loop} + + {* A basic brandbar is displayed if user is not connected *} + + {elseloop rel="top-bar-auth"} + + {/elseloop} + + {* -- Main page content section ----------------------------------------- *} + + {block name="main-content"}Put here the content of the template{/block} + + {* -- Footer section ---------------------------------------------------- *} + + {module_include location='before_footer'} + +
+ + + {module_include location='after_footer'} + + + {* -- Javascript section ------------------------------------------------ *} + + {block name="before-javascript-include"}{/block} + + {javascripts file='assets/js/jquery.min.js'} + + {/javascripts} + + {javascripts file='assets/bootstrap/js/bootstrap.min.js'} + + {/javascripts} + + {block name="after-javascript-include"}{/block} + + {block name="javascript-initialization"}{/block} + + {* Modules scripts are included now *} + {module_include location='footer_js'} + + \ No newline at end of file diff --git a/templates/admin/default/assets/css/admin.less b/templates/admin/default/assets/css/admin.less index 6c5c76a8d..85cef27da 100755 --- a/templates/admin/default/assets/css/admin.less +++ b/templates/admin/default/assets/css/admin.less @@ -584,6 +584,10 @@ form .info .input-append .add-on { .actions { text-align: right; } + + .form { + margin-bottom: 0; + } } // Reduce bottom margin of admin tabs. diff --git a/templates/admin/default/categories.html b/templates/admin/default/categories.html index 2cc6b633c..1548140bf 100755 --- a/templates/admin/default/categories.html +++ b/templates/admin/default/categories.html @@ -1,11 +1,16 @@ -{check_auth roles="ADMIN" permissions="admin.catalog.view" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Catalog'}} +{block name="page-title"}{intl l='Catalog'}{/block} -{$thelia_page_css_file = "assets/bootstrap-editable/css/bootstrap-editable.css"} +{block name="check-permissions"}admin.catalog.view{/block} -{include file='includes/header.inc.html'} +{block name="after-admin-css"} + {stylesheets file='assets/bootstrap-editable/css/bootstrap-editable.css' filters='cssembed'} + + {/stylesheets} +{/block} +{block name="main-content"}
@@ -256,13 +261,15 @@ {include file="includes/add-category-dialog.html"} {include file="includes/delete-category-dialog.html"} +{/block} -{include file='includes/js.inc.html'} - -{javascripts file='assets/bootstrap-editable/js/bootstrap-editable.js'} - -{/javascripts} +{block name="after-javascript-include"} + {javascripts file='assets/bootstrap-editable/js/bootstrap-editable.js'} + + {/javascripts} +{/block} +{block name="javascript-initialization"} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/configuration.html b/templates/admin/default/configuration.html index 259a0f3d7..848283b5e 100644 --- a/templates/admin/default/configuration.html +++ b/templates/admin/default/configuration.html @@ -1,9 +1,10 @@ -{check_auth roles="ADMIN" permissions="admin.configuration.view" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Configuration'}} +{block name="page-title"}{intl l='Configuration'}{/block} -{include file='includes/header.inc.html'} +{block name="check-permissions"}admin.configuration.view{/block} +{block name="main-content"}
@@ -168,7 +169,4 @@
- -{include file='includes/js.inc.html'} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/currencies.html b/templates/admin/default/currencies.html new file mode 100644 index 000000000..762bb47ee --- /dev/null +++ b/templates/admin/default/currencies.html @@ -0,0 +1,401 @@ +{extends file="admin-layout.tpl"} + +{block name="page-title"}{intl l='Currencies'}{/block} + +{block name="check-permissions"}admin.configuration.currencies.view{/block} + +{block name="after-admin-css"} + {stylesheets file='assets/bootstrap-editable/css/bootstrap-editable.css' filters='cssembed'} + + {/stylesheets} +{/block} + +{block name="main-content"} +
+ +
+ + + + {module_include location='currencies_top'} + +
+ +
+
+
+ + + + + + + + + + + + + + + + + + {module_include location='currencies_table_header'} + + + + + {loop name="currencies" type="currency" backend_context="1" lang=$lang_id order=$order} + + + + + + + + + + + + + + + + + {module_include location='currencies_table_row'} + + + + {/loop} + + {elseloop rel="currencies"} + + + + {/elseloop} +
+ {intl l='Currencies'} + {loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.currencies.create"} + + + + {/loop} + +
+ {if $order == 'id'} + + {$order_change = 'id_reverse'} + {elseif $order == 'id_reverse'} + + {$order_change = 'id'} + {else} + {$order_change = 'id'} + {/if} + + {intl l="ID"} + + + {if $order == 'alpha'} + + {$order_change = 'alpha_reverse'} + {elseif $order == 'alpha_reverse'} + + {$order_change = 'alpha'} + {else} + {$order_change = 'alpha'} + {/if} + + {intl l="Name"} + + + {if $order == 'code'} + + {$order_change = 'code_reverse'} + {elseif $order == 'code_reverse'} + + {$order_change = 'code'} + {else} + {$order_change = 'code'} + {/if} + {intl l="ISO 4217 Code"} + + + {if $order == 'symbol'} + + {$order_change = 'symbol_reverse'} + {elseif $order == 'symbol_reverse'} + + {$order_change = 'symbol'} + {else} + {$order_change = 'symbol'} + {/if} + + {intl l="Symbol"} + + + {if $order == 'rate'} + + {$order_change = 'rate_reverse'} + {elseif $order == 'rate_reverse'} + + {$order_change = 'rate'} + {else} + {$order_change = 'rate'} + {/if} + + {intl l="Rate in €"} + + + {if $order == 'manual'} + + {$order_change = 'manual_reverse'} + {elseif $order == 'manual_reverse'} + + {$order_change = 'manual'} + {else} + {$order_change = 'manual'} + {/if} + + {intl l="Position"} + {intl l="Default"} 
{$ID} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"} + {$NAME} + {/loop} + {elseloop rel="can_change"} + {$NAME} + {/elseloop} + {$ISOCODE}{$SYMBOL}{$RATE|string_format:"%.4f"} + {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.category.edit"} + + {$POSITION} + + {/loop} + + {elseloop rel="can_change"} + {$POSITION} + {/elseloop} + +
+ {loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.currencies.change"} + + {/loop} + + {loop type="auth" name="can_delete" roles="ADMIN" permissions="admin.configuration.currencies.delete"} + + {/loop} +
+
+
+ {intl l="No currency has been created yet. Click the + button to create one."} +
+
+
+
+
+
+ + {module_include location='currencies_bottom'} + +
+
+ + +{* Adding a new currency *} + + + + +{* Delete confirmation dialog *} + + +{/block} + +{block name="after-javascript-include"} + {javascripts file='assets/bootstrap-editable/js/bootstrap-editable.js'} + + {/javascripts} +{/block} + +{block name="javascript-initialization"} + +{/block} \ No newline at end of file diff --git a/templates/admin/default/edit_category.html b/templates/admin/default/edit_category.html index d58c251fd..65c5f9c56 100755 --- a/templates/admin/default/edit_category.html +++ b/templates/admin/default/edit_category.html @@ -1,9 +1,10 @@ -{check_auth roles="ADMIN" permissions="admin.catalog.view" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Edit category'}} +{block name="check-permissions"}admin.catalog.view{/block} -{include file='includes/header.inc.html'} +{block name="page-title"}{intl l='Edit category'}{/block} +{block name="main-content"}
+{/block} -{include file='includes/js.inc.html'} - +{block name="javascript-initialization"} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/general_error.html b/templates/admin/default/general_error.html index b8f9e8661..dcbcc80ab 100755 --- a/templates/admin/default/general_error.html +++ b/templates/admin/default/general_error.html @@ -1,10 +1,22 @@ -{$page_title={intl l='An error occured'}} +{extends file="admin-layout.tpl"} -{include file='includes/header.inc.html'} +{* -- We do not check admin login on this page *} +{block name="check-auth"}{/block} +{block name="page-title"}{intl l='An error occured'}{/block} + +{block name="main-content"}
-

{intl l="Oops! An Error Occurred"}

-

{$error_message}

-
-{include file='includes/footer.inc.html'} \ No newline at end of file +
+
+

{intl l="Oops! An Error Occurred"}

+ + {block name="error-message"}
{$error_message}
{/block} + +

{intl l="Go to administration home"}

+
+
+ + +{/block} \ No newline at end of file diff --git a/templates/admin/default/home.html b/templates/admin/default/home.html index a48e30ec6..e4897eda6 100755 --- a/templates/admin/default/home.html +++ b/templates/admin/default/home.html @@ -1,18 +1,18 @@ -{check_auth roles="ADMIN" login_tpl="/admin/login"} -{$page_title={intl l='Home'}} -{include file='includes/header.inc.html'} +{extends file="admin-layout.tpl"} -
-
+{block name="page-title"}{intl l='Back-office home'}{/block} - {module_include location='home_top'} +{block name="main-content"} +
+
-
- This is the administration home page. Put some interesting statistics here, and display useful information :) + {module_include location='home_top'} + +
+ This is the administration home page. Put some interesting statistics here, and display useful information :) +
+ + {module_include location='home_bottom'}
- - {module_include location='home_bottom'}
-
- -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/includes/footer.inc.html b/templates/admin/default/includes/footer.inc.html deleted file mode 100755 index c69b253ad..000000000 --- a/templates/admin/default/includes/footer.inc.html +++ /dev/null @@ -1,20 +0,0 @@ - {module_include location='before_footer'} - -
- - - {module_include location='after_footer'} - - \ No newline at end of file diff --git a/templates/admin/default/includes/header.inc.html b/templates/admin/default/includes/header.inc.html deleted file mode 100755 index 2ee435b4b..000000000 --- a/templates/admin/default/includes/header.inc.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - {intl l='Thelia Back Office'}{if ! empty($page_title)} - {$page_title}{/if} - - {images file='../assets/img/favicon.ico'}{/images} - - - - {stylesheets file='../assets/bootstrap/css/bootstrap.css' filters='cssembed'} - - {/stylesheets} - - {stylesheets file='../assets/bootstrap/css/bootstrap-responsive.css' filters='cssembed'} - - {/stylesheets} - - {* Include here page specifc CSS file, if any *} - - {if ! empty($thelia_page_css_file)} - {stylesheets file="../$thelia_page_css_file" filters='less,cssembed'} - - {/stylesheets} - {/if} - - {stylesheets file='../assets/css/*' filters='less,cssembed'} - - {/stylesheets} - - {* Include here page specifc CSS file, if any *} - - {if ! empty($thelia_page_css_file)} - {stylesheets file="../$thelia_page_css_file" filters='less,cssembed'} - - {/stylesheets} - {/if} - - {* Modules css are included here *} - - {module_include location='head_css'} - - - -{* display top bar once admin is connected *} - -{loop name="top-bar-auth" type="auth" roles="ADMIN"} - -{module_include location='before_topbar'} - -
-
- -
{intl l='Version %ver' ver="{$THELIA_VERSION}"}
- - {module_include location='inside_topbar'} - - - - {loop name="top-bar-search" type="auth" roles="ADMIN" permissions="admin.search"} - - {/loop} - - -
-
- -{module_include location='after_topbar'} - - -{module_include location='before_top_menu'} - - - -{module_include location='after_top_menu'} - -{/loop} - -{elseloop rel="top-bar-auth"} - -{/elseloop} diff --git a/templates/admin/default/includes/js.inc.html b/templates/admin/default/includes/js.inc.html deleted file mode 100755 index 367d966ff..000000000 --- a/templates/admin/default/includes/js.inc.html +++ /dev/null @@ -1,13 +0,0 @@ - -{* Include required JS files *} - -{javascripts file='../assets/js/jquery.min.js'} - -{/javascripts} - -{javascripts file='../assets/bootstrap/js/bootstrap.min.js'} - -{/javascripts} - -{* Modules scripts are included now *} -{module_include location='footer_js'} diff --git a/templates/admin/default/login.html b/templates/admin/default/login.html index 0fa6852a5..13e57a8eb 100755 --- a/templates/admin/default/login.html +++ b/templates/admin/default/login.html @@ -1,66 +1,70 @@ -{$page_title={intl l='Welcome'}} -{include file='includes/header.inc.html'} +{extends file="admin-layout.tpl"} -
+{* -- We do not check admin login on this page *} +{block name="check-auth"}{/block} -
+{block name="page-title"}{intl l='Welcome'}{/block} - {module_include location='index_top'} +{block name="main-content"} +
-
-

{intl l='Thelia Back Office'}

+
- {form name="thelia.admin.login"} -
+ {module_include location='index_top'} - {if #form_error}
#form_error_message
{/if} +
+

{intl l='Thelia Back Office'}

- {form_hidden_fields form=$form} + {form name="thelia.admin.login"} + - {form_field form=$form field='success_url'} - {* on success, redirect to /admin *} - {/form_field} + {if #form_error}
#form_error_message
{/if} - {form_field form=$form field='username'} - - - - {/form_field} + {form_hidden_fields form=$form} - {form_field form=$form field='password'} - - - - {/form_field} + {form_field form=$form field='success_url'} + {* on success, redirect to /admin *} + {/form_field} - {form_field form=$form field='remember_me'} - - {/form_field} + {form_field form=$form field='username'} + + + + {/form_field} - - - {/form} -
+ {form_field form=$form field='password'} + + + + {/form_field} - {module_include location='index_middle'} + {form_field form=$form field='remember_me'} + + {/form_field} -
-
-
{intl l="Loading Thelia lastest news..."}
+ + + {/form} +
+ + {module_include location='index_middle'} + +
+
+
{intl l="Loading Thelia lastest news..."}
+
+ + {module_include location='index_bottom'} +
+{/block} - {module_include location='index_bottom'} - -
- -{include file='includes/js.inc.html'} - - - -{include file='includes/footer.inc.html'} \ No newline at end of file +{block name="javascript-initialization"} + +{/block} \ No newline at end of file diff --git a/templates/admin/default/message-edit.html b/templates/admin/default/message-edit.html index 1c4dfe159..3639a8e20 100644 --- a/templates/admin/default/message-edit.html +++ b/templates/admin/default/message-edit.html @@ -1,9 +1,10 @@ -{check_auth roles="ADMIN" permissions="admin.configuration.messages.edit" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Edit a mailing template'}} +{block name="page-title"}{intl l='Edit a mailing template'}{/block} -{include file='includes/header.inc.html'} +{block name="check-permissions"}admin.configuration.messages.edit{/block} +{block name="main-content"}
@@ -27,11 +28,9 @@
-
- - {form name="thelia.admin.message.modification"} -
- + {form name="thelia.admin.message.modification"} + +
{* Be sure to get the message ID, even if the form could not be validated *} @@ -142,9 +141,15 @@
{/form_field} - - {/form} - + +
+
+

{intl l='Message created on %date_create. Last modification: %date_change' df=$datetime_format date_create=$CREATE_DATE->format($datetime_format) date_change=$UPDATE_DATE->format($datetime_format)}

+
+
+ + + {/form}
@@ -165,7 +170,4 @@
- -{include file='includes/js.inc.html'} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/messages.html b/templates/admin/default/messages.html index e75cbe8da..3c7a35e86 100644 --- a/templates/admin/default/messages.html +++ b/templates/admin/default/messages.html @@ -1,9 +1,10 @@ -{check_auth roles="ADMIN" permissions="admin.configuration.messages.view" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Thelia Mailing Templates'}} +{block name="page-title"}{intl l='Thelia Mailing Templates'}{/block} -{include file='includes/header.inc.html'} +{block name="check-permissions"}admin.configuration.messages.view{/block} +{block name="main-content"}
@@ -202,9 +203,9 @@
+{/block} -{include file='includes/js.inc.html'} - +{block name="javascript-initialization"} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/variable-edit.html b/templates/admin/default/variable-edit.html index 86d13060a..40a70c077 100644 --- a/templates/admin/default/variable-edit.html +++ b/templates/admin/default/variable-edit.html @@ -1,9 +1,10 @@ -{check_auth roles="ADMIN" permissions="admin.configuration.variables.edit" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Edit a system variable'}} +{block name="page-title"}{intl l='Edit a system variable'}{/block} -{include file='includes/header.inc.html'} +{block name="check-permissions"}admin.configuration.variables.edit{/block} +{block name="main-content"}
@@ -27,11 +28,9 @@
-
- - {form name="thelia.admin.config.modification"} -
- + {form name="thelia.admin.config.modification"} + +
{* Be sure to get the variable ID, even if the form could not be validated *} @@ -107,15 +106,22 @@ {include file="includes/standard-description-form-fields.html"} - - {/form} -
+
+
+

{intl l='Variable created on %date_create. Last modification: %date_change' df=$datetime_format date_create=$CREATE_DATE->format($datetime_format) date_change=$UPDATE_DATE->format($datetime_format)}

+
+
+ +
+ + {/form}
+ {/loop} {elseloop rel="config_edit"} @@ -130,7 +136,4 @@
- -{include file='includes/js.inc.html'} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file diff --git a/templates/admin/default/variables.html b/templates/admin/default/variables.html index f47ec53dd..37c8ef4b2 100644 --- a/templates/admin/default/variables.html +++ b/templates/admin/default/variables.html @@ -1,9 +1,10 @@ -{check_auth roles="ADMIN" permissions="admin.configuration.variables.view" login_tpl="/admin/login"} +{extends file="admin-layout.tpl"} -{$page_title={intl l='Thelia System Variables'}} +{block name="page-title"}{intl l='Thelia System Variables'}{/block} -{include file='includes/header.inc.html'} +{block name="check-permissions"}admin.configuration.variables.view{/block} +{block name="main-content"}
@@ -223,9 +224,9 @@
+{/block} -{include file='includes/js.inc.html'} - +{block name="javascript-initialization"} - -{include file='includes/footer.inc.html'} \ No newline at end of file +{/block} \ No newline at end of file From 69f88db09051dad35af22d09a106772909fd9b28 Mon Sep 17 00:00:00 2001 From: franck Date: Tue, 3 Sep 2013 11:32:13 +0200 Subject: [PATCH 10/10] en_EN -> en_UK, the "en_EN" locale does not exists. --- install/insert.sql | 540 ++++++++++++++++++++++----------------------- 1 file changed, 270 insertions(+), 270 deletions(-) diff --git a/install/insert.sql b/install/insert.sql index 4336eaa0c..41c63e353 100755 --- a/install/insert.sql +++ b/install/insert.sql @@ -24,11 +24,11 @@ INSERT INTO `customer_title`(`id`, `by_default`, `position`, `created_at`, `upda INSERT INTO `customer_title_i18n` (`id`, `locale`, `short`, `long`) VALUES (1, 'fr_FR', 'Mr', 'Monsieur'), -(1, 'en_EN', 'M', 'Mister'), +(1, 'en_UK', 'M', 'Mister'), (2, 'fr_FR', 'Mrs', 'Madame'), -(2, 'en_EN', 'Mme', 'Misses'), +(2, 'en_UK', 'Mme', 'Misses'), (3, 'fr_FR', 'Miss', 'Madamemoiselle'), -(3, 'en_EN', 'Mlle', 'Miss'); +(3, 'en_UK', 'Mlle', 'Miss'); INSERT INTO `currency` (`id` ,`code` ,`symbol` ,`rate`, `position` ,`by_default` ,`created_at` ,`updated_at`) VALUES @@ -39,11 +39,11 @@ VALUES INSERT INTO `currency_i18n` (`id` ,`locale` ,`name`) VALUES (1, 'fr_FR', 'euro'), -(1, 'en_EN', 'euro'), +(1, 'en_UK', 'euro'), (2, 'fr_FR', 'dollar'), -(2, 'en_EN', 'dollar'), +(2, 'en_UK', 'dollar'), (3, 'fr_FR', 'livre'), -(3, 'en_EN', 'pound'); +(3, 'en_UK', 'pound'); INSERT INTO `country` (`id`, `area_id`, `isocode`, `isoalpha2`, `isoalpha3`, `created_at`, `updated_at`) VALUES @@ -313,795 +313,795 @@ INSERT INTO `country` (`id`, `area_id`, `isocode`, `isoalpha2`, `isoalpha3`, `cr (268, NULL, '840', 'US', 'USA', NOW(), NOW()); INSERT INTO `country_i18n` (`id`, `locale`, `title`, `description`, `chapo`, `postscriptum`) VALUES -(1, 'en_EN', 'Afghanistan', '', '', ''), +(1, 'en_UK', 'Afghanistan', '', '', ''), (1, 'es_ES', 'Afganistán', '', '', ''), (1, 'fr_FR', 'Afghanistan', '', '', ''), -(2, 'en_EN', 'South Africa', '', '', ''), +(2, 'en_UK', 'South Africa', '', '', ''), (2, 'es_ES', 'Sudáfrica', '', '', ''), (2, 'fr_FR', 'Afrique du Sud', '', '', ''), -(3, 'en_EN', 'Albania', '', '', ''), +(3, 'en_UK', 'Albania', '', '', ''), (3, 'es_ES', 'Albania', '', '', ''), (3, 'fr_FR', 'Albanie', '', '', ''), -(4, 'en_EN', 'Algeria', '', '', ''), +(4, 'en_UK', 'Algeria', '', '', ''), (4, 'es_ES', 'Argelia', '', '', ''), (4, 'fr_FR', 'Algérie', '', '', ''), -(5, 'en_EN', 'Germany', '', '', ''), +(5, 'en_UK', 'Germany', '', '', ''), (5, 'es_ES', 'Alemania', '', '', ''), (5, 'fr_FR', 'Allemagne', '', '', ''), -(6, 'en_EN', 'Andorra', '', '', ''), +(6, 'en_UK', 'Andorra', '', '', ''), (6, 'es_ES', 'Andorra', '', '', ''), (6, 'fr_FR', 'Andorre', '', '', ''), -(7, 'en_EN', 'Angola', '', '', ''), +(7, 'en_UK', 'Angola', '', '', ''), (7, 'es_ES', 'Angola', '', '', ''), (7, 'fr_FR', 'Angola', '', '', ''), -(8, 'en_EN', 'Antigua and Barbuda', '', '', ''), +(8, 'en_UK', 'Antigua and Barbuda', '', '', ''), (8, 'es_ES', 'Antigua y Barbuda', '', '', ''), (8, 'fr_FR', 'Antigua-et-Barbuda', '', '', ''), -(9, 'en_EN', 'Saudi Arabia', '', '', ''), +(9, 'en_UK', 'Saudi Arabia', '', '', ''), (9, 'es_ES', 'Arabia Saudita', '', '', ''), (9, 'fr_FR', 'Arabie saoudite', '', '', ''), -(10, 'en_EN', 'Argentina', '', '', ''), +(10, 'en_UK', 'Argentina', '', '', ''), (10, 'es_ES', 'Argentina', '', '', ''), (10, 'fr_FR', 'Argentine', '', '', ''), -(11, 'en_EN', 'Armenia', '', '', ''), +(11, 'en_UK', 'Armenia', '', '', ''), (11, 'es_ES', 'Armenia', '', '', ''), (11, 'fr_FR', 'Arménie', '', '', ''), -(12, 'en_EN', 'Australia', '', '', ''), +(12, 'en_UK', 'Australia', '', '', ''), (12, 'es_ES', 'Australia', '', '', ''), (12, 'fr_FR', 'Australie', '', '', ''), -(13, 'en_EN', 'Austria', '', '', ''), +(13, 'en_UK', 'Austria', '', '', ''), (13, 'es_ES', 'Austria', '', '', ''), (13, 'fr_FR', 'Autriche', '', '', ''), -(14, 'en_EN', 'Azerbaijan', '', '', ''), +(14, 'en_UK', 'Azerbaijan', '', '', ''), (14, 'es_ES', 'Azerbaiyán', '', '', ''), (14, 'fr_FR', 'Azerbaïdjan', '', '', ''), -(15, 'en_EN', 'Bahamas', '', '', ''), +(15, 'en_UK', 'Bahamas', '', '', ''), (15, 'es_ES', 'Bahamas', '', '', ''), (15, 'fr_FR', 'Bahamas', '', '', ''), -(16, 'en_EN', 'Bahrain', '', '', ''), +(16, 'en_UK', 'Bahrain', '', '', ''), (16, 'es_ES', 'Bahrein', '', '', ''), (16, 'fr_FR', 'Bahreïn', '', '', ''), -(17, 'en_EN', 'Bangladesh', '', '', ''), +(17, 'en_UK', 'Bangladesh', '', '', ''), (17, 'es_ES', 'Bangladesh', '', '', ''), (17, 'fr_FR', 'Bangladesh', '', '', ''), -(18, 'en_EN', 'Barbados', '', '', ''), +(18, 'en_UK', 'Barbados', '', '', ''), (18, 'es_ES', 'Barbados', '', '', ''), (18, 'fr_FR', 'Barbade', '', '', ''), -(19, 'en_EN', 'Belarus', '', '', ''), +(19, 'en_UK', 'Belarus', '', '', ''), (19, 'es_ES', 'Belarús', '', '', ''), (19, 'fr_FR', 'Belau', '', '', ''), -(20, 'en_EN', 'Belgium', '', '', ''), +(20, 'en_UK', 'Belgium', '', '', ''), (20, 'es_ES', 'Bélgica', '', '', ''), (20, 'fr_FR', 'Belgique', '', '', ''), -(21, 'en_EN', 'Belize', '', '', ''), +(21, 'en_UK', 'Belize', '', '', ''), (21, 'es_ES', 'Belice', '', '', ''), (21, 'fr_FR', 'Belize', '', '', ''), -(22, 'en_EN', 'Benin', '', '', ''), +(22, 'en_UK', 'Benin', '', '', ''), (22, 'es_ES', 'Benin', '', '', ''), (22, 'fr_FR', 'Bénin', '', '', ''), -(23, 'en_EN', 'Bhutan', '', '', ''), +(23, 'en_UK', 'Bhutan', '', '', ''), (23, 'es_ES', 'Bhután', '', '', ''), (23, 'fr_FR', 'Bhoutan', '', '', ''), -(24, 'en_EN', 'Bielorussia', '', '', ''), +(24, 'en_UK', 'Bielorussia', '', '', ''), (24, 'es_ES', 'Bielorusia', '', '', ''), (24, 'fr_FR', 'Biélorussie', '', '', ''), -(25, 'en_EN', 'Burma', '', '', ''), +(25, 'en_UK', 'Burma', '', '', ''), (25, 'es_ES', 'Birmania', '', '', ''), (25, 'fr_FR', 'Birmanie', '', '', ''), -(26, 'en_EN', 'Bolivia', '', '', ''), +(26, 'en_UK', 'Bolivia', '', '', ''), (26, 'es_ES', 'Bolivia', '', '', ''), (26, 'fr_FR', 'Bolivie', '', '', ''), -(27, 'en_EN', 'Bosnia and Herzegovina', '', '', ''), +(27, 'en_UK', 'Bosnia and Herzegovina', '', '', ''), (27, 'es_ES', 'Bosnia y Herzegovina', '', '', ''), (27, 'fr_FR', 'Bosnie-Herzégovine', '', '', ''), -(28, 'en_EN', 'Botswana', '', '', ''), +(28, 'en_UK', 'Botswana', '', '', ''), (28, 'es_ES', 'Botswana', '', '', ''), (28, 'fr_FR', 'Botswana', '', '', ''), -(29, 'en_EN', 'Brazil', '', '', ''), +(29, 'en_UK', 'Brazil', '', '', ''), (29, 'es_ES', 'Brasil', '', '', ''), (29, 'fr_FR', 'Brésil', '', '', ''), -(30, 'en_EN', 'Brunei', '', '', ''), +(30, 'en_UK', 'Brunei', '', '', ''), (30, 'es_ES', 'Brunei', '', '', ''), (30, 'fr_FR', 'Brunei', '', '', ''), -(31, 'en_EN', 'Bulgaria', '', '', ''), +(31, 'en_UK', 'Bulgaria', '', '', ''), (31, 'es_ES', 'Bulgaria', '', '', ''), (31, 'fr_FR', 'Bulgarie', '', '', ''), -(32, 'en_EN', 'Burkina', '', '', ''), +(32, 'en_UK', 'Burkina', '', '', ''), (32, 'es_ES', 'Burkina', '', '', ''), (32, 'fr_FR', 'Burkina', '', '', ''), -(33, 'en_EN', 'Burundi', '', '', ''), +(33, 'en_UK', 'Burundi', '', '', ''), (33, 'es_ES', 'Burundi', '', '', ''), (33, 'fr_FR', 'Burundi', '', '', ''), -(34, 'en_EN', 'Cambodia', '', '', ''), +(34, 'en_UK', 'Cambodia', '', '', ''), (34, 'es_ES', 'Camboya', '', '', ''), (34, 'fr_FR', 'Cambodge', '', '', ''), -(35, 'en_EN', 'Cameroon', '', '', ''), +(35, 'en_UK', 'Cameroon', '', '', ''), (35, 'es_ES', 'Camerún', '', '', ''), (35, 'fr_FR', 'Cameroun', '', '', ''), -(37, 'en_EN', 'Cape Verde', '', '', ''), +(37, 'en_UK', 'Cape Verde', '', '', ''), (37, 'es_ES', 'Cabo Verde', '', '', ''), (37, 'fr_FR', 'Cap-Vert', '', '', ''), -(38, 'en_EN', 'Chile', '', '', ''), +(38, 'en_UK', 'Chile', '', '', ''), (38, 'es_ES', 'Chile', '', '', ''), (38, 'fr_FR', 'Chili', '', '', ''), -(39, 'en_EN', 'China', '', '', ''), +(39, 'en_UK', 'China', '', '', ''), (39, 'es_ES', 'China', '', '', ''), (39, 'fr_FR', 'Chine', '', '', ''), -(40, 'en_EN', 'Cyprus', '', '', ''), +(40, 'en_UK', 'Cyprus', '', '', ''), (40, 'es_ES', 'Chipre', '', '', ''), (40, 'fr_FR', 'Chypre', '', '', ''), -(41, 'en_EN', 'Colombia', '', '', ''), +(41, 'en_UK', 'Colombia', '', '', ''), (41, 'es_ES', 'Colombia', '', '', ''), (41, 'fr_FR', 'Colombie', '', '', ''), -(42, 'en_EN', 'Comoros', '', '', ''), +(42, 'en_UK', 'Comoros', '', '', ''), (42, 'es_ES', 'Comoras', '', '', ''), (42, 'fr_FR', 'Comores', '', '', ''), -(43, 'en_EN', 'Congo', '', '', ''), +(43, 'en_UK', 'Congo', '', '', ''), (43, 'es_ES', 'Congo', '', '', ''), (43, 'fr_FR', 'Congo', '', '', ''), -(44, 'en_EN', 'Cook Islands', '', '', ''), +(44, 'en_UK', 'Cook Islands', '', '', ''), (44, 'es_ES', 'Cook', '', '', ''), (44, 'fr_FR', 'Cook', '', '', ''), -(45, 'en_EN', 'North Korea', '', '', ''), +(45, 'en_UK', 'North Korea', '', '', ''), (45, 'es_ES', 'Corea del Norte', '', '', ''), (45, 'fr_FR', 'Corée du Nord', '', '', ''), -(46, 'en_EN', 'South Korea', '', '', ''), +(46, 'en_UK', 'South Korea', '', '', ''), (46, 'es_ES', 'Corea del Sur', '', '', ''), (46, 'fr_FR', 'Corée du Sud', '', '', ''), -(47, 'en_EN', 'Costa Rica', '', '', ''), +(47, 'en_UK', 'Costa Rica', '', '', ''), (47, 'es_ES', 'Costa Rica', '', '', ''), (47, 'fr_FR', 'Costa Rica', '', '', ''), -(48, 'en_EN', 'Ivory Coast', '', '', ''), +(48, 'en_UK', 'Ivory Coast', '', '', ''), (48, 'es_ES', 'Costa de Marfil', '', '', ''), (48, 'fr_FR', 'Côte dIvoire', '', '', ''), -(49, 'en_EN', 'Croatia', '', '', ''), +(49, 'en_UK', 'Croatia', '', '', ''), (49, 'es_ES', 'Croacia', '', '', ''), (49, 'fr_FR', 'Croatie', '', '', ''), -(50, 'en_EN', 'Cuba', '', '', ''), +(50, 'en_UK', 'Cuba', '', '', ''), (50, 'es_ES', 'Cuba', '', '', ''), (50, 'fr_FR', 'Cuba', '', '', ''), -(51, 'en_EN', 'Denmark', '', '', ''), +(51, 'en_UK', 'Denmark', '', '', ''), (51, 'es_ES', 'Dinamarca', '', '', ''), (51, 'fr_FR', 'Danemark', '', '', ''), -(52, 'en_EN', 'Djibouti', '', '', ''), +(52, 'en_UK', 'Djibouti', '', '', ''), (52, 'es_ES', 'Djibouti', '', '', ''), (52, 'fr_FR', 'Djibouti', '', '', ''), -(53, 'en_EN', 'Dominica', '', '', ''), +(53, 'en_UK', 'Dominica', '', '', ''), (53, 'es_ES', 'Dominica', '', '', ''), (53, 'fr_FR', 'Dominique', '', '', ''), -(54, 'en_EN', 'Egypt', '', '', ''), +(54, 'en_UK', 'Egypt', '', '', ''), (54, 'es_ES', 'Egipto', '', '', ''), (54, 'fr_FR', 'Égypte', '', '', ''), -(55, 'en_EN', 'United Arab Emirates', '', '', ''), +(55, 'en_UK', 'United Arab Emirates', '', '', ''), (55, 'es_ES', 'Emiratos Árabes Unidos', '', '', ''), (55, 'fr_FR', 'Émirats arabes unis', '', '', ''), -(56, 'en_EN', 'Ecuador', '', '', ''), +(56, 'en_UK', 'Ecuador', '', '', ''), (56, 'es_ES', 'Ecuador', '', '', ''), (56, 'fr_FR', 'Équateur', '', '', ''), -(57, 'en_EN', 'Eritrea', '', '', ''), +(57, 'en_UK', 'Eritrea', '', '', ''), (57, 'es_ES', 'Eritrea', '', '', ''), (57, 'fr_FR', 'Érythrée', '', '', ''), -(58, 'en_EN', 'Spain', '', '', ''), +(58, 'en_UK', 'Spain', '', '', ''), (58, 'es_ES', 'España', '', '', ''), (58, 'fr_FR', 'Espagne', '', '', ''), -(59, 'en_EN', 'Estonia', '', '', ''), +(59, 'en_UK', 'Estonia', '', '', ''), (59, 'es_ES', 'Estonia', '', '', ''), (59, 'fr_FR', 'Estonie', '', '', ''), -(61, 'en_EN', 'Ethiopia', '', '', ''), +(61, 'en_UK', 'Ethiopia', '', '', ''), (61, 'es_ES', 'Etiopía', '', '', ''), (61, 'fr_FR', 'Éthiopie', '', '', ''), -(62, 'en_EN', 'Fiji', '', '', ''), +(62, 'en_UK', 'Fiji', '', '', ''), (62, 'es_ES', 'Fiji', '', '', ''), (62, 'fr_FR', 'Fidji', '', '', ''), -(63, 'en_EN', 'Finland', '', '', ''), +(63, 'en_UK', 'Finland', '', '', ''), (63, 'es_ES', 'Finlandia', '', '', ''), (63, 'fr_FR', 'Finlande', '', '', ''), -(64, 'en_EN', 'France metropolitan', '', '', ''), +(64, 'en_UK', 'France metropolitan', '', '', ''), (64, 'es_ES', 'Francia', '', '', ''), (64, 'fr_FR', 'France métropolitaine', '', '', ''), -(65, 'en_EN', 'Gabon', '', '', ''), +(65, 'en_UK', 'Gabon', '', '', ''), (65, 'es_ES', 'Gabón', '', '', ''), (65, 'fr_FR', 'Gabon', '', '', ''), -(66, 'en_EN', 'Gambia', '', '', ''), +(66, 'en_UK', 'Gambia', '', '', ''), (66, 'es_ES', 'Gambia', '', '', ''), (66, 'fr_FR', 'Gambie', '', '', ''), -(67, 'en_EN', 'Georgia', '', '', ''), +(67, 'en_UK', 'Georgia', '', '', ''), (67, 'es_ES', 'Georgia', '', '', ''), (67, 'fr_FR', 'Géorgie', '', '', ''), -(68, 'en_EN', 'Ghana', '', '', ''), +(68, 'en_UK', 'Ghana', '', '', ''), (68, 'es_ES', 'Ghana', '', '', ''), (68, 'fr_FR', 'Ghana', '', '', ''), -(69, 'en_EN', 'Greece', '', '', ''), +(69, 'en_UK', 'Greece', '', '', ''), (69, 'es_ES', 'Grecia', '', '', ''), (69, 'fr_FR', 'Grèce', '', '', ''), -(70, 'en_EN', 'Grenada', '', '', ''), +(70, 'en_UK', 'Grenada', '', '', ''), (70, 'es_ES', 'Granada', '', '', ''), (70, 'fr_FR', 'Grenade', '', '', ''), -(71, 'en_EN', 'Guatemala', '', '', ''), +(71, 'en_UK', 'Guatemala', '', '', ''), (71, 'es_ES', 'Guatemala', '', '', ''), (71, 'fr_FR', 'Guatemala', '', '', ''), -(72, 'en_EN', 'Guinea', '', '', ''), +(72, 'en_UK', 'Guinea', '', '', ''), (72, 'es_ES', 'Guinea', '', '', ''), (72, 'fr_FR', 'Guinée', '', '', ''), -(73, 'en_EN', 'Guinea-Bissau', '', '', ''), +(73, 'en_UK', 'Guinea-Bissau', '', '', ''), (73, 'es_ES', 'Guinea-Bissau', '', '', ''), (73, 'fr_FR', 'Guinée-Bissao', '', '', ''), -(74, 'en_EN', 'Equatorial Guinea', '', '', ''), +(74, 'en_UK', 'Equatorial Guinea', '', '', ''), (74, 'es_ES', 'Guinea Ecuatorial', '', '', ''), (74, 'fr_FR', 'Guinée équatoriale', '', '', ''), -(75, 'en_EN', 'Guyana', '', '', ''), +(75, 'en_UK', 'Guyana', '', '', ''), (75, 'es_ES', 'Guyana', '', '', ''), (75, 'fr_FR', 'Guyana', '', '', ''), -(76, 'en_EN', 'Haiti', '', '', ''), +(76, 'en_UK', 'Haiti', '', '', ''), (76, 'es_ES', 'Haití', '', '', ''), (76, 'fr_FR', 'Haïti', '', '', ''), -(77, 'en_EN', 'Honduras', '', '', ''), +(77, 'en_UK', 'Honduras', '', '', ''), (77, 'es_ES', 'Honduras', '', '', ''), (77, 'fr_FR', 'Honduras', '', '', ''), -(78, 'en_EN', 'Hungary', '', '', ''), +(78, 'en_UK', 'Hungary', '', '', ''), (78, 'es_ES', 'Hungría', '', '', ''), (78, 'fr_FR', 'Hongrie', '', '', ''), -(79, 'en_EN', 'India', '', '', ''), +(79, 'en_UK', 'India', '', '', ''), (79, 'es_ES', 'India', '', '', ''), (79, 'fr_FR', 'Inde', '', '', ''), -(80, 'en_EN', 'Indonesia', '', '', ''), +(80, 'en_UK', 'Indonesia', '', '', ''), (80, 'es_ES', 'Indonesia', '', '', ''), (80, 'fr_FR', 'Indonésie', '', '', ''), -(81, 'en_EN', 'Iran', '', '', ''), +(81, 'en_UK', 'Iran', '', '', ''), (81, 'es_ES', 'Irán', '', '', ''), (81, 'fr_FR', 'Iran', '', '', ''), -(82, 'en_EN', 'Iraq', '', '', ''), +(82, 'en_UK', 'Iraq', '', '', ''), (82, 'es_ES', 'Iraq', '', '', ''), (82, 'fr_FR', 'Iraq', '', '', ''), -(83, 'en_EN', 'Ireland', '', '', ''), +(83, 'en_UK', 'Ireland', '', '', ''), (83, 'es_ES', 'Irlanda', '', '', ''), (83, 'fr_FR', 'Irlande', '', '', ''), -(84, 'en_EN', 'Iceland', '', '', ''), +(84, 'en_UK', 'Iceland', '', '', ''), (84, 'es_ES', 'Islandia', '', '', ''), (84, 'fr_FR', 'Islande', '', '', ''), -(85, 'en_EN', 'Israel', '', '', ''), +(85, 'en_UK', 'Israel', '', '', ''), (85, 'es_ES', 'Israel', '', '', ''), (85, 'fr_FR', 'Israël', '', '', ''), -(86, 'en_EN', 'Italy', '', '', ''), +(86, 'en_UK', 'Italy', '', '', ''), (86, 'es_ES', 'Italia', '', '', ''), (86, 'fr_FR', 'Italie', '', '', ''), -(87, 'en_EN', 'Jamaica', '', '', ''), +(87, 'en_UK', 'Jamaica', '', '', ''), (87, 'es_ES', 'Jamaica', '', '', ''), (87, 'fr_FR', 'Jamaïque', '', '', ''), -(88, 'en_EN', 'Japan', '', '', ''), +(88, 'en_UK', 'Japan', '', '', ''), (88, 'es_ES', 'Japón', '', '', ''), (88, 'fr_FR', 'Japon', '', '', ''), -(89, 'en_EN', 'Jordan', '', '', ''), +(89, 'en_UK', 'Jordan', '', '', ''), (89, 'es_ES', 'Jordania', '', '', ''), (89, 'fr_FR', 'Jordanie', '', '', ''), -(90, 'en_EN', 'Kazakhstan', '', '', ''), +(90, 'en_UK', 'Kazakhstan', '', '', ''), (90, 'es_ES', 'Kazajstán', '', '', ''), (90, 'fr_FR', 'Kazakhstan', '', '', ''), -(91, 'en_EN', 'Kenya', '', '', ''), +(91, 'en_UK', 'Kenya', '', '', ''), (91, 'es_ES', 'Kenia', '', '', ''), (91, 'fr_FR', 'Kenya', '', '', ''), -(92, 'en_EN', 'Kyrgyzstan', '', '', ''), +(92, 'en_UK', 'Kyrgyzstan', '', '', ''), (92, 'es_ES', 'Kirguistán', '', '', ''), (92, 'fr_FR', 'Kirghizistan', '', '', ''), -(93, 'en_EN', 'Kiribati', '', '', ''), +(93, 'en_UK', 'Kiribati', '', '', ''), (93, 'es_ES', 'Kiribati', '', '', ''), (93, 'fr_FR', 'Kiribati', '', '', ''), -(94, 'en_EN', 'Kuwait', '', '', ''), +(94, 'en_UK', 'Kuwait', '', '', ''), (94, 'es_ES', 'Kuwait', '', '', ''), (94, 'fr_FR', 'Koweït', '', '', ''), -(95, 'en_EN', 'Laos', '', '', ''), +(95, 'en_UK', 'Laos', '', '', ''), (95, 'es_ES', 'Laos', '', '', ''), (95, 'fr_FR', 'Laos', '', '', ''), -(96, 'en_EN', 'Lesotho', '', '', ''), +(96, 'en_UK', 'Lesotho', '', '', ''), (96, 'es_ES', 'Lesotho', '', '', ''), (96, 'fr_FR', 'Lesotho', '', '', ''), -(97, 'en_EN', 'Latvia', '', '', ''), +(97, 'en_UK', 'Latvia', '', '', ''), (97, 'es_ES', 'Letonia', '', '', ''), (97, 'fr_FR', 'Lettonie', '', '', ''), -(98, 'en_EN', 'Lebanon', '', '', ''), +(98, 'en_UK', 'Lebanon', '', '', ''), (98, 'es_ES', 'Líbano', '', '', ''), (98, 'fr_FR', 'Liban', '', '', ''), -(99, 'en_EN', 'Liberia', '', '', ''), +(99, 'en_UK', 'Liberia', '', '', ''), (99, 'es_ES', 'Liberia', '', '', ''), (99, 'fr_FR', 'Liberia', '', '', ''), -(100, 'en_EN', 'Libya', '', '', ''), +(100, 'en_UK', 'Libya', '', '', ''), (100, 'es_ES', 'Libia', '', '', ''), (100, 'fr_FR', 'Libye', '', '', ''), -(101, 'en_EN', 'Liechtenstein', '', '', ''), +(101, 'en_UK', 'Liechtenstein', '', '', ''), (101, 'es_ES', 'Liechtenstein', '', '', ''), (101, 'fr_FR', 'Liechtenstein', '', '', ''), -(102, 'en_EN', 'Lithuania', '', '', ''), +(102, 'en_UK', 'Lithuania', '', '', ''), (102, 'es_ES', 'Lituania', '', '', ''), (102, 'fr_FR', 'Lituanie', '', '', ''), -(103, 'en_EN', 'Luxembourg', '', '', ''), +(103, 'en_UK', 'Luxembourg', '', '', ''), (103, 'es_ES', 'Luxemburgo', '', '', ''), (103, 'fr_FR', 'Luxembourg', '', '', ''), -(104, 'en_EN', 'Macedonia', '', '', ''), +(104, 'en_UK', 'Macedonia', '', '', ''), (104, 'es_ES', 'Macedonia', '', '', ''), (104, 'fr_FR', 'Macédoine', '', '', ''), -(105, 'en_EN', 'Madagascar', '', '', ''), +(105, 'en_UK', 'Madagascar', '', '', ''), (105, 'es_ES', 'Madagascar', '', '', ''), (105, 'fr_FR', 'Madagascar', '', '', ''), -(106, 'en_EN', 'Malaysia', '', '', ''), +(106, 'en_UK', 'Malaysia', '', '', ''), (106, 'es_ES', 'Malasia', '', '', ''), (106, 'fr_FR', 'Malaisie', '', '', ''), -(107, 'en_EN', 'Malawi', '', '', ''), +(107, 'en_UK', 'Malawi', '', '', ''), (107, 'es_ES', 'Malawi', '', '', ''), (107, 'fr_FR', 'Malawi', '', '', ''), -(108, 'en_EN', 'Maldives', '', '', ''), +(108, 'en_UK', 'Maldives', '', '', ''), (108, 'es_ES', 'Maldivas', '', '', ''), (108, 'fr_FR', 'Maldives', '', '', ''), -(109, 'en_EN', 'Mali', '', '', ''), +(109, 'en_UK', 'Mali', '', '', ''), (109, 'es_ES', 'Malí', '', '', ''), (109, 'fr_FR', 'Mali', '', '', ''), -(110, 'en_EN', 'Malta', '', '', ''), +(110, 'en_UK', 'Malta', '', '', ''), (110, 'es_ES', 'Malta', '', '', ''), (110, 'fr_FR', 'Malte', '', '', ''), -(111, 'en_EN', 'Morocco', '', '', ''), +(111, 'en_UK', 'Morocco', '', '', ''), (111, 'es_ES', 'Marruecos', '', '', ''), (111, 'fr_FR', 'Maroc', '', '', ''), -(112, 'en_EN', 'Marshall Islands', '', '', ''), +(112, 'en_UK', 'Marshall Islands', '', '', ''), (112, 'es_ES', 'Marshall', '', '', ''), (112, 'fr_FR', 'Marshall', '', '', ''), -(113, 'en_EN', 'Mauritius', '', '', ''), +(113, 'en_UK', 'Mauritius', '', '', ''), (113, 'es_ES', 'Mauricio', '', '', ''), (113, 'fr_FR', 'Maurice', '', '', ''), -(114, 'en_EN', 'Mauritania', '', '', ''), +(114, 'en_UK', 'Mauritania', '', '', ''), (114, 'es_ES', 'Mauritania', '', '', ''), (114, 'fr_FR', 'Mauritanie', '', '', ''), -(115, 'en_EN', 'Mexico', '', '', ''), +(115, 'en_UK', 'Mexico', '', '', ''), (115, 'es_ES', 'Méjico', '', '', ''), (115, 'fr_FR', 'Mexique', '', '', ''), -(116, 'en_EN', 'Micronesia', '', '', ''), +(116, 'en_UK', 'Micronesia', '', '', ''), (116, 'es_ES', 'Micronesia', '', '', ''), (116, 'fr_FR', 'Micronésie', '', '', ''), -(117, 'en_EN', 'Moldova', '', '', ''), +(117, 'en_UK', 'Moldova', '', '', ''), (117, 'es_ES', 'Moldova', '', '', ''), (117, 'fr_FR', 'Moldavie', '', '', ''), -(118, 'en_EN', 'Monaco', '', '', ''), +(118, 'en_UK', 'Monaco', '', '', ''), (118, 'es_ES', 'Mónaco', '', '', ''), (118, 'fr_FR', 'Monaco', '', '', ''), -(119, 'en_EN', 'Mongolia', '', '', ''), +(119, 'en_UK', 'Mongolia', '', '', ''), (119, 'es_ES', 'Mongolia', '', '', ''), (119, 'fr_FR', 'Mongolie', '', '', ''), -(120, 'en_EN', 'Mozambique', '', '', ''), +(120, 'en_UK', 'Mozambique', '', '', ''), (120, 'es_ES', 'Mozambique', '', '', ''), (120, 'fr_FR', 'Mozambique', '', '', ''), -(121, 'en_EN', 'Namibia', '', '', ''), +(121, 'en_UK', 'Namibia', '', '', ''), (121, 'es_ES', 'Namibia', '', '', ''), (121, 'fr_FR', 'Namibie', '', '', ''), -(122, 'en_EN', 'Nauru', '', '', ''), +(122, 'en_UK', 'Nauru', '', '', ''), (122, 'es_ES', 'Nauru', '', '', ''), (122, 'fr_FR', 'Nauru', '', '', ''), -(123, 'en_EN', 'Nepal', '', '', ''), +(123, 'en_UK', 'Nepal', '', '', ''), (123, 'es_ES', 'Nepal', '', '', ''), (123, 'fr_FR', 'Népal', '', '', ''), -(124, 'en_EN', 'Nicaragua', '', '', ''), +(124, 'en_UK', 'Nicaragua', '', '', ''), (124, 'es_ES', 'Nicaragua', '', '', ''), (124, 'fr_FR', 'Nicaragua', '', '', ''), -(125, 'en_EN', 'Niger', '', '', ''), +(125, 'en_UK', 'Niger', '', '', ''), (125, 'es_ES', 'Níger', '', '', ''), (125, 'fr_FR', 'Niger', '', '', ''), -(126, 'en_EN', 'Nigeria', '', '', ''), +(126, 'en_UK', 'Nigeria', '', '', ''), (126, 'es_ES', 'Nigeria', '', '', ''), (126, 'fr_FR', 'Nigeria', '', '', ''), -(127, 'en_EN', 'Niue', '', '', ''), +(127, 'en_UK', 'Niue', '', '', ''), (127, 'es_ES', 'Niue', '', '', ''), (127, 'fr_FR', 'Niue', '', '', ''), -(128, 'en_EN', 'Norway', '', '', ''), +(128, 'en_UK', 'Norway', '', '', ''), (128, 'es_ES', 'Noruega', '', '', ''), (128, 'fr_FR', 'Norvège', '', '', ''), -(129, 'en_EN', 'New Zealand', '', '', ''), +(129, 'en_UK', 'New Zealand', '', '', ''), (129, 'es_ES', 'Nueva Zelandia', '', '', ''), (129, 'fr_FR', 'Nouvelle-Zélande', '', '', ''), -(130, 'en_EN', 'Oman', '', '', ''), +(130, 'en_UK', 'Oman', '', '', ''), (130, 'es_ES', 'Omán', '', '', ''), (130, 'fr_FR', 'Oman', '', '', ''), -(131, 'en_EN', 'Uganda', '', '', ''), +(131, 'en_UK', 'Uganda', '', '', ''), (131, 'es_ES', 'Uganda', '', '', ''), (131, 'fr_FR', 'Ouganda', '', '', ''), -(132, 'en_EN', 'Uzbekistan', '', '', ''), +(132, 'en_UK', 'Uzbekistan', '', '', ''), (132, 'es_ES', 'Uzbekistán', '', '', ''), (132, 'fr_FR', 'Ouzbékistan', '', '', ''), -(133, 'en_EN', 'Pakistan', '', '', ''), +(133, 'en_UK', 'Pakistan', '', '', ''), (133, 'es_ES', 'Pakistán', '', '', ''), (133, 'fr_FR', 'Pakistan', '', '', ''), -(134, 'en_EN', 'Panama', '', '', ''), +(134, 'en_UK', 'Panama', '', '', ''), (134, 'es_ES', 'Panamá', '', '', ''), (134, 'fr_FR', 'Panama', '', '', ''), -(135, 'en_EN', 'Papua Nueva Guinea', '', '', ''), +(135, 'en_UK', 'Papua Nueva Guinea', '', '', ''), (135, 'es_ES', 'Papua Nueva Guinea', '', '', ''), (135, 'fr_FR', 'Papouasie', '', '', ''), -(136, 'en_EN', 'Paraguay', '', '', ''), +(136, 'en_UK', 'Paraguay', '', '', ''), (136, 'es_ES', 'Paraguay', '', '', ''), (136, 'fr_FR', 'Paraguay', '', '', ''), -(137, 'en_EN', 'Netherlands', '', '', ''), +(137, 'en_UK', 'Netherlands', '', '', ''), (137, 'es_ES', 'Países Bajos', '', '', ''), (137, 'fr_FR', 'Pays-Bas', '', '', ''), -(138, 'en_EN', 'Peru', '', '', ''), +(138, 'en_UK', 'Peru', '', '', ''), (138, 'es_ES', 'Perú', '', '', ''), (138, 'fr_FR', 'Pérou', '', '', ''), -(139, 'en_EN', 'Philippines', '', '', ''), +(139, 'en_UK', 'Philippines', '', '', ''), (139, 'es_ES', 'Filipinas', '', '', ''), (139, 'fr_FR', 'Philippines', '', '', ''), -(140, 'en_EN', 'Poland', '', '', ''), +(140, 'en_UK', 'Poland', '', '', ''), (140, 'es_ES', 'Polonia', '', '', ''), (140, 'fr_FR', 'Pologne', '', '', ''), -(141, 'en_EN', 'Portugal', '', '', ''), +(141, 'en_UK', 'Portugal', '', '', ''), (141, 'es_ES', 'Portugal', '', '', ''), (141, 'fr_FR', 'Portugal', '', '', ''), -(142, 'en_EN', 'Qatar', '', '', ''), +(142, 'en_UK', 'Qatar', '', '', ''), (142, 'es_ES', 'Qatar', '', '', ''), (142, 'fr_FR', 'Qatar', '', '', ''), -(143, 'en_EN', 'Central African Republic', '', '', ''), +(143, 'en_UK', 'Central African Republic', '', '', ''), (143, 'es_ES', 'República Centroafricana', '', '', ''), (143, 'fr_FR', 'République centrafricaine', '', '', ''), -(144, 'en_EN', 'Dominican Republic', '', '', ''), +(144, 'en_UK', 'Dominican Republic', '', '', ''), (144, 'es_ES', 'República Dominicana', '', '', ''), (144, 'fr_FR', 'République dominicaine', '', '', ''), -(145, 'en_EN', 'Czech Republic', '', '', ''), +(145, 'en_UK', 'Czech Republic', '', '', ''), (145, 'es_ES', 'República Checa', '', '', ''), (145, 'fr_FR', 'République tchèque', '', '', ''), -(146, 'en_EN', 'Romania', '', '', ''), +(146, 'en_UK', 'Romania', '', '', ''), (146, 'es_ES', 'Rumania', '', '', ''), (146, 'fr_FR', 'Roumanie', '', '', ''), -(147, 'en_EN', 'United Kingdom', '', '', ''), +(147, 'en_UK', 'United Kingdom', '', '', ''), (147, 'es_ES', 'Reino Unido', '', '', ''), (147, 'fr_FR', 'Royaume-Uni', '', '', ''), -(148, 'en_EN', 'Russia', '', '', ''), +(148, 'en_UK', 'Russia', '', '', ''), (148, 'es_ES', 'Rusia', '', '', ''), (148, 'fr_FR', 'Russie', '', '', ''), -(149, 'en_EN', 'Rwanda', '', '', ''), +(149, 'en_UK', 'Rwanda', '', '', ''), (149, 'es_ES', 'Ruanda', '', '', ''), (149, 'fr_FR', 'Rwanda', '', '', ''), -(150, 'en_EN', 'Saint Kitts and Nevis', '', '', ''), +(150, 'en_UK', 'Saint Kitts and Nevis', '', '', ''), (150, 'es_ES', 'San Cristóbal', '', '', ''), (150, 'fr_FR', 'Saint-Christophe-et-Niévès', '', '', ''), -(151, 'en_EN', 'Saint Lucia', '', '', ''), +(151, 'en_UK', 'Saint Lucia', '', '', ''), (151, 'es_ES', 'Santa Lucía', '', '', ''), (151, 'fr_FR', 'Sainte-Lucie', '', '', ''), -(152, 'en_EN', 'San Marino', '', '', ''), +(152, 'en_UK', 'San Marino', '', '', ''), (152, 'es_ES', 'San Marino', '', '', ''), (152, 'fr_FR', 'Saint-Marin', '', '', ''), -(153, 'en_EN', 'Saint Vincent and the Grenadines', '', '', ''), +(153, 'en_UK', 'Saint Vincent and the Grenadines', '', '', ''), (153, 'es_ES', 'San Vicente y las Granadinas', '', '', ''), (153, 'fr_FR', 'Saint-Vincent-et-les Grenadines', '', '', ''), -(154, 'en_EN', 'Solomon Islands', '', '', ''), +(154, 'en_UK', 'Solomon Islands', '', '', ''), (154, 'es_ES', 'Salomón', '', '', ''), (154, 'fr_FR', 'Salomon', '', '', ''), -(155, 'en_EN', 'El Salvador', '', '', ''), +(155, 'en_UK', 'El Salvador', '', '', ''), (155, 'es_ES', 'El Salvador', '', '', ''), (155, 'fr_FR', 'Salvador', '', '', ''), -(156, 'en_EN', 'Western Samoa', '', '', ''), +(156, 'en_UK', 'Western Samoa', '', '', ''), (156, 'es_ES', 'Samoa', '', '', ''), (156, 'fr_FR', 'Samoa occidentales', '', '', ''), -(157, 'en_EN', 'Sao Tome and Principe', '', '', ''), +(157, 'en_UK', 'Sao Tome and Principe', '', '', ''), (157, 'es_ES', 'Santo Tomé y Príncipe', '', '', ''), (157, 'fr_FR', 'Sao Tomé-et-Principe', '', '', ''), -(158, 'en_EN', 'Senegal', '', '', ''), +(158, 'en_UK', 'Senegal', '', '', ''), (158, 'es_ES', 'Senegal', '', '', ''), (158, 'fr_FR', 'Sénégal', '', '', ''), -(159, 'en_EN', 'Seychelles', '', '', ''), +(159, 'en_UK', 'Seychelles', '', '', ''), (159, 'es_ES', 'Seychelles', '', '', ''), (159, 'fr_FR', 'Seychelles', '', '', ''), -(160, 'en_EN', 'Sierra Leone', '', '', ''), +(160, 'en_UK', 'Sierra Leone', '', '', ''), (160, 'es_ES', 'Sierra Leona', '', '', ''), (160, 'fr_FR', 'Sierra Leone', '', '', ''), -(161, 'en_EN', 'Singapore', '', '', ''), +(161, 'en_UK', 'Singapore', '', '', ''), (161, 'es_ES', 'Singapur', '', '', ''), (161, 'fr_FR', 'Singapour', '', '', ''), -(162, 'en_EN', 'Slovakia', '', '', ''), +(162, 'en_UK', 'Slovakia', '', '', ''), (162, 'es_ES', 'Eslovaquia', '', '', ''), (162, 'fr_FR', 'Slovaquie', '', '', ''), -(163, 'en_EN', 'Slovenia', '', '', ''), +(163, 'en_UK', 'Slovenia', '', '', ''), (163, 'es_ES', 'Eslovenia', '', '', ''), (163, 'fr_FR', 'Slovénie', '', '', ''), -(164, 'en_EN', 'Somalia', '', '', ''), +(164, 'en_UK', 'Somalia', '', '', ''), (164, 'es_ES', 'Somalia', '', '', ''), (164, 'fr_FR', 'Somalie', '', '', ''), -(165, 'en_EN', 'Sudan', '', '', ''), +(165, 'en_UK', 'Sudan', '', '', ''), (165, 'es_ES', 'Sudán', '', '', ''), (165, 'fr_FR', 'Soudan', '', '', ''), -(166, 'en_EN', 'Sri Lanka', '', '', ''), +(166, 'en_UK', 'Sri Lanka', '', '', ''), (166, 'es_ES', 'Sri Lanka', '', '', ''), (166, 'fr_FR', 'Sri Lanka', '', '', ''), -(167, 'en_EN', 'Sweden', '', '', ''), +(167, 'en_UK', 'Sweden', '', '', ''), (167, 'es_ES', 'Suecia', '', '', ''), (167, 'fr_FR', 'Suède', '', '', ''), -(168, 'en_EN', 'Switzerland', '', '', ''), +(168, 'en_UK', 'Switzerland', '', '', ''), (168, 'es_ES', 'Suiza', '', '', ''), (168, 'fr_FR', 'Suisse', '', '', ''), -(169, 'en_EN', 'Suriname', '', '', ''), +(169, 'en_UK', 'Suriname', '', '', ''), (169, 'es_ES', 'Suriname', '', '', ''), (169, 'fr_FR', 'Suriname', '', '', ''), -(170, 'en_EN', 'Swaziland', '', '', ''), +(170, 'en_UK', 'Swaziland', '', '', ''), (170, 'es_ES', 'Swazilandia', '', '', ''), (170, 'fr_FR', 'Swaziland', '', '', ''), -(171, 'en_EN', 'Syria', '', '', ''), +(171, 'en_UK', 'Syria', '', '', ''), (171, 'es_ES', 'Siria', '', '', ''), (171, 'fr_FR', 'Syrie', '', '', ''), -(172, 'en_EN', 'Tajikistan', '', '', ''), +(172, 'en_UK', 'Tajikistan', '', '', ''), (172, 'es_ES', 'Tayikistán', '', '', ''), (172, 'fr_FR', 'Tadjikistan', '', '', ''), -(173, 'en_EN', 'Tanzania', '', '', ''), +(173, 'en_UK', 'Tanzania', '', '', ''), (173, 'es_ES', 'Tanzanía', '', '', ''), (173, 'fr_FR', 'Tanzanie', '', '', ''), -(174, 'en_EN', 'Chad', '', '', ''), +(174, 'en_UK', 'Chad', '', '', ''), (174, 'es_ES', 'Chad', '', '', ''), (174, 'fr_FR', 'Tchad', '', '', ''), -(175, 'en_EN', 'Thailand', '', '', ''), +(175, 'en_UK', 'Thailand', '', '', ''), (175, 'es_ES', 'Tailandia', '', '', ''), (175, 'fr_FR', 'Thaïlande', '', '', ''), -(176, 'en_EN', 'Togo', '', '', ''), +(176, 'en_UK', 'Togo', '', '', ''), (176, 'es_ES', 'Togo', '', '', ''), (176, 'fr_FR', 'Togo', '', '', ''), -(177, 'en_EN', 'Tonga', '', '', ''), +(177, 'en_UK', 'Tonga', '', '', ''), (177, 'es_ES', 'Tonga', '', '', ''), (177, 'fr_FR', 'Tonga', '', '', ''), -(178, 'en_EN', 'Trinidad and Tobago', '', '', ''), +(178, 'en_UK', 'Trinidad and Tobago', '', '', ''), (178, 'es_ES', 'Trinidad y Tabago', '', '', ''), (178, 'fr_FR', 'Trinité-et-Tobago', '', '', ''), -(179, 'en_EN', 'Tunisia', '', '', ''), +(179, 'en_UK', 'Tunisia', '', '', ''), (179, 'es_ES', 'Túnez', '', '', ''), (179, 'fr_FR', 'Tunisie', '', '', ''), -(180, 'en_EN', 'Turkmenistan', '', '', ''), +(180, 'en_UK', 'Turkmenistan', '', '', ''), (180, 'es_ES', 'Turkmenistán', '', '', ''), (180, 'fr_FR', 'Turkménistan', '', '', ''), -(181, 'en_EN', 'Turkey', '', '', ''), +(181, 'en_UK', 'Turkey', '', '', ''), (181, 'es_ES', 'Turquía', '', '', ''), (181, 'fr_FR', 'Turquie', '', '', ''), -(182, 'en_EN', 'Tuvalu', '', '', ''), +(182, 'en_UK', 'Tuvalu', '', '', ''), (182, 'es_ES', 'Tuvalu', '', '', ''), (182, 'fr_FR', 'Tuvalu', '', '', ''), -(183, 'en_EN', 'Ukraine', '', '', ''), +(183, 'en_UK', 'Ukraine', '', '', ''), (183, 'es_ES', 'Ucrania', '', '', ''), (183, 'fr_FR', 'Ukraine', '', '', ''), -(184, 'en_EN', 'Uruguay', '', '', ''), +(184, 'en_UK', 'Uruguay', '', '', ''), (184, 'es_ES', 'Uruguay', '', '', ''), (184, 'fr_FR', 'Uruguay', '', '', ''), -(185, 'en_EN', 'The Vatican', '', '', ''), +(185, 'en_UK', 'The Vatican', '', '', ''), (185, 'es_ES', 'El Vatican', '', '', ''), (185, 'fr_FR', 'Vatican', '', '', ''), -(186, 'en_EN', 'Vanuatu', '', '', ''), +(186, 'en_UK', 'Vanuatu', '', '', ''), (186, 'es_ES', 'Vanuatu', '', '', ''), (186, 'fr_FR', 'Vanuatu', '', '', ''), -(187, 'en_EN', 'Venezuela', '', '', ''), +(187, 'en_UK', 'Venezuela', '', '', ''), (187, 'es_ES', 'Venezuela', '', '', ''), (187, 'fr_FR', 'Venezuela', '', '', ''), -(188, 'en_EN', 'Vietnam', '', '', ''), +(188, 'en_UK', 'Vietnam', '', '', ''), (188, 'es_ES', 'Viet Nam', '', '', ''), (188, 'fr_FR', 'Viêt Nam', '', '', ''), -(189, 'en_EN', 'Yemen', '', '', ''), +(189, 'en_UK', 'Yemen', '', '', ''), (189, 'es_ES', 'Yemen', '', '', ''), (189, 'fr_FR', 'Yémen', '', '', ''), -(190, 'en_EN', 'Yougoslavia', '', '', ''), +(190, 'en_UK', 'Yougoslavia', '', '', ''), (190, 'es_ES', 'Yugoslavia', '', '', ''), (190, 'fr_FR', 'Yougoslavie', '', '', ''), -(191, 'en_EN', 'Zaire', '', '', ''), +(191, 'en_UK', 'Zaire', '', '', ''), (191, 'es_ES', 'Zaire', '', '', ''), (191, 'fr_FR', 'Zaïre', '', '', ''), -(192, 'en_EN', 'Zambia', '', '', ''), +(192, 'en_UK', 'Zambia', '', '', ''), (192, 'es_ES', 'Zambia', '', '', ''), (192, 'fr_FR', 'Zambie', '', '', ''), -(193, 'en_EN', 'Zimbabwe', '', '', ''), +(193, 'en_UK', 'Zimbabwe', '', '', ''), (193, 'es_ES', 'Zimbabwe', '', '', ''), (193, 'fr_FR', 'Zimbabwe', '', '', ''), -(196, 'en_EN', 'USA - Alaska', '', '', ''), +(196, 'en_UK', 'USA - Alaska', '', '', ''), (196, 'es_ES', 'USA - Alaska', '', '', ''), (196, 'fr_FR', 'USA - Alaska', '', '', ''), -(197, 'en_EN', 'USA - Arizona', '', '', ''), +(197, 'en_UK', 'USA - Arizona', '', '', ''), (197, 'es_ES', 'USA - Arizona', '', '', ''), (197, 'fr_FR', 'USA - Arizona', '', '', ''), -(198, 'en_EN', 'USA - Arkansas', '', '', ''), +(198, 'en_UK', 'USA - Arkansas', '', '', ''), (198, 'es_ES', 'USA - Arkansas', '', '', ''), (198, 'fr_FR', 'USA - Arkansas', '', '', ''), -(199, 'en_EN', 'USA - California', '', '', ''), +(199, 'en_UK', 'USA - California', '', '', ''), (199, 'es_ES', 'USA - California', '', '', ''), (199, 'fr_FR', 'USA - California', '', '', ''), -(200, 'en_EN', 'USA - Colorado', '', '', ''), +(200, 'en_UK', 'USA - Colorado', '', '', ''), (200, 'es_ES', 'USA - Colorado', '', '', ''), (200, 'fr_FR', 'USA - Colorado', '', '', ''), -(201, 'en_EN', 'USA - Connecticut', '', '', ''), +(201, 'en_UK', 'USA - Connecticut', '', '', ''), (201, 'es_ES', 'USA - Connecticut', '', '', ''), (201, 'fr_FR', 'USA - Connecticut', '', '', ''), -(202, 'en_EN', 'USA - Delaware', '', '', ''), +(202, 'en_UK', 'USA - Delaware', '', '', ''), (202, 'es_ES', 'USA - Delaware', '', '', ''), (202, 'fr_FR', 'USA - Delaware', '', '', ''), -(203, 'en_EN', 'USA - District Of Columbia', '', '', ''), +(203, 'en_UK', 'USA - District Of Columbia', '', '', ''), (203, 'es_ES', 'USA - District Of Columbia', '', '', ''), (203, 'fr_FR', 'USA - District Of Columbia', '', '', ''), -(204, 'en_EN', 'USA - Florida', '', '', ''), +(204, 'en_UK', 'USA - Florida', '', '', ''), (204, 'es_ES', 'USA - Florida', '', '', ''), (204, 'fr_FR', 'USA - Florida', '', '', ''), -(205, 'en_EN', 'USA - Georgia', '', '', ''), +(205, 'en_UK', 'USA - Georgia', '', '', ''), (205, 'es_ES', 'USA - Georgia', '', '', ''), (205, 'fr_FR', 'USA - Georgia', '', '', ''), -(206, 'en_EN', 'USA - Hawaii', '', '', ''), +(206, 'en_UK', 'USA - Hawaii', '', '', ''), (206, 'es_ES', 'USA - Hawaii', '', '', ''), (206, 'fr_FR', 'USA - Hawaii', '', '', ''), -(207, 'en_EN', 'USA - Idaho', '', '', ''), +(207, 'en_UK', 'USA - Idaho', '', '', ''), (207, 'es_ES', 'USA - Idaho', '', '', ''), (207, 'fr_FR', 'USA - Idaho', '', '', ''), -(208, 'en_EN', 'USA - Illinois', '', '', ''), +(208, 'en_UK', 'USA - Illinois', '', '', ''), (208, 'es_ES', 'USA - Illinois', '', '', ''), (208, 'fr_FR', 'USA - Illinois', '', '', ''), -(209, 'en_EN', 'USA - Indiana', '', '', ''), +(209, 'en_UK', 'USA - Indiana', '', '', ''), (209, 'es_ES', 'USA - Indiana', '', '', ''), (209, 'fr_FR', 'USA - Indiana', '', '', ''), -(210, 'en_EN', 'USA - Iowa', '', '', ''), +(210, 'en_UK', 'USA - Iowa', '', '', ''), (210, 'es_ES', 'USA - Iowa', '', '', ''), (210, 'fr_FR', 'USA - Iowa', '', '', ''), -(211, 'en_EN', 'USA - Kansas', '', '', ''), +(211, 'en_UK', 'USA - Kansas', '', '', ''), (211, 'es_ES', 'USA - Kansas', '', '', ''), (211, 'fr_FR', 'USA - Kansas', '', '', ''), -(212, 'en_EN', 'USA - Kentucky', '', '', ''), +(212, 'en_UK', 'USA - Kentucky', '', '', ''), (212, 'es_ES', 'USA - Kentucky', '', '', ''), (212, 'fr_FR', 'USA - Kentucky', '', '', ''), -(213, 'en_EN', 'USA - Louisiana', '', '', ''), +(213, 'en_UK', 'USA - Louisiana', '', '', ''), (213, 'es_ES', 'USA - Louisiana', '', '', ''), (213, 'fr_FR', 'USA - Louisiana', '', '', ''), -(214, 'en_EN', 'USA - Maine', '', '', ''), +(214, 'en_UK', 'USA - Maine', '', '', ''), (214, 'es_ES', 'USA - Maine', '', '', ''), (214, 'fr_FR', 'USA - Maine', '', '', ''), -(215, 'en_EN', 'USA - Maryland', '', '', ''), +(215, 'en_UK', 'USA - Maryland', '', '', ''), (215, 'es_ES', 'USA - Maryland', '', '', ''), (215, 'fr_FR', 'USA - Maryland', '', '', ''), -(216, 'en_EN', 'USA - Massachusetts', '', '', ''), +(216, 'en_UK', 'USA - Massachusetts', '', '', ''), (216, 'es_ES', 'USA - Massachusetts', '', '', ''), (216, 'fr_FR', 'USA - Massachusetts', '', '', ''), -(217, 'en_EN', 'USA - Michigan', '', '', ''), +(217, 'en_UK', 'USA - Michigan', '', '', ''), (217, 'es_ES', 'USA - Michigan', '', '', ''), (217, 'fr_FR', 'USA - Michigan', '', '', ''), -(218, 'en_EN', 'USA - Minnesota', '', '', ''), +(218, 'en_UK', 'USA - Minnesota', '', '', ''), (218, 'es_ES', 'USA - Minnesota', '', '', ''), (218, 'fr_FR', 'USA - Minnesota', '', '', ''), -(219, 'en_EN', 'USA - Mississippi', '', '', ''), +(219, 'en_UK', 'USA - Mississippi', '', '', ''), (219, 'es_ES', 'USA - Mississippi', '', '', ''), (219, 'fr_FR', 'USA - Mississippi', '', '', ''), -(220, 'en_EN', 'USA - Missouri', '', '', ''), +(220, 'en_UK', 'USA - Missouri', '', '', ''), (220, 'es_ES', 'USA - Missouri', '', '', ''), (220, 'fr_FR', 'USA - Missouri', '', '', ''), -(221, 'en_EN', 'USA - Montana', '', '', ''), +(221, 'en_UK', 'USA - Montana', '', '', ''), (221, 'es_ES', 'USA - Montana', '', '', ''), (221, 'fr_FR', 'USA - Montana', '', '', ''), -(222, 'en_EN', 'USA - Nebraska', '', '', ''), +(222, 'en_UK', 'USA - Nebraska', '', '', ''), (222, 'es_ES', 'USA - Nebraska', '', '', ''), (222, 'fr_FR', 'USA - Nebraska', '', '', ''), -(223, 'en_EN', 'USA - Nevada', '', '', ''), +(223, 'en_UK', 'USA - Nevada', '', '', ''), (223, 'es_ES', 'USA - Nevada', '', '', ''), (223, 'fr_FR', 'USA - Nevada', '', '', ''), -(224, 'en_EN', 'USA - New Hampshire', '', '', ''), +(224, 'en_UK', 'USA - New Hampshire', '', '', ''), (224, 'es_ES', 'USA - New Hampshire', '', '', ''), (224, 'fr_FR', 'USA - New Hampshire', '', '', ''), -(225, 'en_EN', 'USA - New Jersey', '', '', ''), +(225, 'en_UK', 'USA - New Jersey', '', '', ''), (225, 'es_ES', 'USA - New Jersey', '', '', ''), (225, 'fr_FR', 'USA - New Jersey', '', '', ''), -(226, 'en_EN', 'USA - New Mexico', '', '', ''), +(226, 'en_UK', 'USA - New Mexico', '', '', ''), (226, 'es_ES', 'USA - New Mexico', '', '', ''), (226, 'fr_FR', 'USA - New Mexico', '', '', ''), -(227, 'en_EN', 'USA - New York', '', '', ''), +(227, 'en_UK', 'USA - New York', '', '', ''), (227, 'es_ES', 'USA - New York', '', '', ''), (227, 'fr_FR', 'USA - New York', '', '', ''), -(228, 'en_EN', 'USA - North Carolina', '', '', ''), +(228, 'en_UK', 'USA - North Carolina', '', '', ''), (228, 'es_ES', 'USA - North Carolina', '', '', ''), (228, 'fr_FR', 'USA - North Carolina', '', '', ''), -(229, 'en_EN', 'USA - North Dakota', '', '', ''), +(229, 'en_UK', 'USA - North Dakota', '', '', ''), (229, 'es_ES', 'USA - North Dakota', '', '', ''), (229, 'fr_FR', 'USA - North Dakota', '', '', ''), -(230, 'en_EN', 'USA - Ohio', '', '', ''), +(230, 'en_UK', 'USA - Ohio', '', '', ''), (230, 'es_ES', 'USA - Ohio', '', '', ''), (230, 'fr_FR', 'USA - Ohio', '', '', ''), -(231, 'en_EN', 'USA - Oklahoma', '', '', ''), +(231, 'en_UK', 'USA - Oklahoma', '', '', ''), (231, 'es_ES', 'USA - Oklahoma', '', '', ''), (231, 'fr_FR', 'USA - Oklahoma', '', '', ''), -(232, 'en_EN', 'USA - Oregon', '', '', ''), +(232, 'en_UK', 'USA - Oregon', '', '', ''), (232, 'es_ES', 'USA - Oregon', '', '', ''), (232, 'fr_FR', 'USA - Oregon', '', '', ''), -(233, 'en_EN', 'USA - Pennsylvania', '', '', ''), +(233, 'en_UK', 'USA - Pennsylvania', '', '', ''), (233, 'es_ES', 'USA - Pennsylvania', '', '', ''), (233, 'fr_FR', 'USA - Pennsylvania', '', '', ''), -(234, 'en_EN', 'USA - Rhode Island', '', '', ''), +(234, 'en_UK', 'USA - Rhode Island', '', '', ''), (234, 'es_ES', 'USA - Rhode Island', '', '', ''), (234, 'fr_FR', 'USA - Rhode Island', '', '', ''), -(235, 'en_EN', 'USA - South Carolina', '', '', ''), +(235, 'en_UK', 'USA - South Carolina', '', '', ''), (235, 'es_ES', 'USA - South Carolina', '', '', ''), (235, 'fr_FR', 'USA - South Carolina', '', '', ''), -(236, 'en_EN', 'USA - South Dakota', '', '', ''), +(236, 'en_UK', 'USA - South Dakota', '', '', ''), (236, 'es_ES', 'USA - South Dakota', '', '', ''), (236, 'fr_FR', 'USA - South Dakota', '', '', ''), -(237, 'en_EN', 'USA - Tennessee', '', '', ''), +(237, 'en_UK', 'USA - Tennessee', '', '', ''), (237, 'es_ES', 'USA - Tennessee', '', '', ''), (237, 'fr_FR', 'USA - Tennessee', '', '', ''), -(238, 'en_EN', 'USA - Texas', '', '', ''), +(238, 'en_UK', 'USA - Texas', '', '', ''), (238, 'es_ES', 'USA - Texas', '', '', ''), (238, 'fr_FR', 'USA - Texas', '', '', ''), -(239, 'en_EN', 'USA - Utah', '', '', ''), +(239, 'en_UK', 'USA - Utah', '', '', ''), (239, 'es_ES', 'USA - Utah', '', '', ''), (239, 'fr_FR', 'USA - Utah', '', '', ''), -(240, 'en_EN', 'USA - Vermont', '', '', ''), +(240, 'en_UK', 'USA - Vermont', '', '', ''), (240, 'es_ES', 'USA - Vermont', '', '', ''), (240, 'fr_FR', 'USA - Vermont', '', '', ''), -(241, 'en_EN', 'USA - Virginia', '', '', ''), +(241, 'en_UK', 'USA - Virginia', '', '', ''), (241, 'es_ES', 'USA - Virginia', '', '', ''), (241, 'fr_FR', 'USA - Virginia', '', '', ''), -(242, 'en_EN', 'USA - Washington', '', '', ''), +(242, 'en_UK', 'USA - Washington', '', '', ''), (242, 'es_ES', 'USA - Washington', '', '', ''), (242, 'fr_FR', 'USA - Washington', '', '', ''), -(243, 'en_EN', 'USA - West Virginia', '', '', ''), +(243, 'en_UK', 'USA - West Virginia', '', '', ''), (243, 'es_ES', 'USA - West Virginia', '', '', ''), (243, 'fr_FR', 'USA - West Virginia', '', '', ''), -(244, 'en_EN', 'USA - Wisconsin', '', '', ''), +(244, 'en_UK', 'USA - Wisconsin', '', '', ''), (244, 'es_ES', 'USA - Wisconsin', '', '', ''), (244, 'fr_FR', 'USA - Wisconsin', '', '', ''), -(245, 'en_EN', 'USA - Wyoming', '', '', ''), +(245, 'en_UK', 'USA - Wyoming', '', '', ''), (245, 'es_ES', 'USA - Wyoming', '', '', ''), (245, 'fr_FR', 'USA - Wyoming', '', '', ''), -(246, 'en_EN', 'Canada - Colombie-Britannique', '', '', ''), +(246, 'en_UK', 'Canada - Colombie-Britannique', '', '', ''), (246, 'es_ES', 'Canada - Colombie-Britannique', '', '', ''), (246, 'fr_FR', 'Canada - Colombie-Britannique', '', '', ''), -(247, 'en_EN', 'Canada - Alberta', '', '', ''), +(247, 'en_UK', 'Canada - Alberta', '', '', ''), (247, 'es_ES', 'Canada - Alberta', '', '', ''), (247, 'fr_FR', 'Canada - Alberta', '', '', ''), -(248, 'en_EN', 'Canada - Saskatchewan', '', '', ''), +(248, 'en_UK', 'Canada - Saskatchewan', '', '', ''), (248, 'es_ES', 'Canada - Saskatchewan', '', '', ''), (248, 'fr_FR', 'Canada - Saskatchewan', '', '', ''), -(249, 'en_EN', 'Canada - Manitoba', '', '', ''), +(249, 'en_UK', 'Canada - Manitoba', '', '', ''), (249, 'es_ES', 'Canada - Manitoba', '', '', ''), (249, 'fr_FR', 'Canada - Manitoba', '', '', ''), -(250, 'en_EN', 'Canada - Ontario', '', '', ''), +(250, 'en_UK', 'Canada - Ontario', '', '', ''), (250, 'es_ES', 'Canada - Ontario', '', '', ''), (250, 'fr_FR', 'Canada - Ontario', '', '', ''), -(251, 'en_EN', 'Canada - Québec', '', '', ''), +(251, 'en_UK', 'Canada - Québec', '', '', ''), (251, 'es_ES', 'Canada - Québec', '', '', ''), (251, 'fr_FR', 'Canada - Québec', '', '', ''), -(252, 'en_EN', 'Canada - Nouveau-Brunswick', '', '', ''), +(252, 'en_UK', 'Canada - Nouveau-Brunswick', '', '', ''), (252, 'es_ES', 'Canada - Nouveau-Brunswick', '', '', ''), (252, 'fr_FR', 'Canada - Nouveau-Brunswick', '', '', ''), -(253, 'en_EN', 'Canada - Nouvelle-Écosse', '', '', ''), +(253, 'en_UK', 'Canada - Nouvelle-Écosse', '', '', ''), (253, 'es_ES', 'Canada - Nouvelle-Écosse', '', '', ''), (253, 'fr_FR', 'Canada - Nouvelle-Écosse', '', '', ''), -(254, 'en_EN', 'Canada - Île-du-Prince-Édouard ', '', '', ''), +(254, 'en_UK', 'Canada - Île-du-Prince-Édouard ', '', '', ''), (254, 'es_ES', 'Canada - Île-du-Prince-Édouard ', '', '', ''), (254, 'fr_FR', 'Canada - Île-du-Prince-Édouard ', '', '', ''), -(255, 'en_EN', 'Canada - Terre-Neuve-et-Labrador ', '', '', ''), +(255, 'en_UK', 'Canada - Terre-Neuve-et-Labrador ', '', '', ''), (255, 'es_ES', 'Canada - Terre-Neuve-et-Labrador ', '', '', ''), (255, 'fr_FR', 'Canada - Terre-Neuve-et-Labrador ', '', '', ''), -(256, 'en_EN', 'Canada - Yukon', '', '', ''), +(256, 'en_UK', 'Canada - Yukon', '', '', ''), (256, 'es_ES', 'Canada - Yukon', '', '', ''), (256, 'fr_FR', 'Canada - Yukon', '', '', ''), -(257, 'en_EN', 'Canada - Territoires-du-Nord-Ouest', '', '', ''), +(257, 'en_UK', 'Canada - Territoires-du-Nord-Ouest', '', '', ''), (257, 'es_ES', 'Canada - Territoires-du-Nord-Ouest', '', '', ''), (257, 'fr_FR', 'Canada - Territoires-du-Nord-Ouest', '', '', ''), -(258, 'en_EN', 'Canada - Nunavut', '', '', ''), +(258, 'en_UK', 'Canada - Nunavut', '', '', ''), (258, 'es_ES', 'Canada - Nunavut', '', '', ''), (258, 'fr_FR', 'Canada - Nunavut', '', '', ''), -(259, 'en_EN', 'Guadeloupe', '', '', ''), +(259, 'en_UK', 'Guadeloupe', '', '', ''), (259, 'es_ES', 'Guadeloupe', '', '', ''), (259, 'fr_FR', 'Guadeloupe', '', '', ''), -(260, 'en_EN', 'Guyane Française', '', '', ''), +(260, 'en_UK', 'Guyane Française', '', '', ''), (260, 'es_ES', 'Guyane Française', '', '', ''), (260, 'fr_FR', 'Guyane Française', '', '', ''), -(261, 'en_EN', 'Martinique', '', '', ''), +(261, 'en_UK', 'Martinique', '', '', ''), (261, 'es_ES', 'Martinique', '', '', ''), (261, 'fr_FR', 'Martinique', '', '', ''), -(262, 'en_EN', 'Mayotte', '', '', ''), +(262, 'en_UK', 'Mayotte', '', '', ''), (262, 'es_ES', 'Mayotte', '', '', ''), (262, 'fr_FR', 'Mayotte', '', '', ''), -(263, 'en_EN', 'Réunion(La)', '', '', ''), +(263, 'en_UK', 'Réunion(La)', '', '', ''), (263, 'es_ES', 'Réunion(La)', '', '', ''), (263, 'fr_FR', 'Réunion(La)', '', '', ''), -(264, 'en_EN', 'St Pierre et Miquelon', '', '', ''), +(264, 'en_UK', 'St Pierre et Miquelon', '', '', ''), (264, 'es_ES', 'St Pierre et Miquelon', '', '', ''), (264, 'fr_FR', 'St Pierre et Miquelon', '', '', ''), -(265, 'en_EN', 'Nouvelle-Calédonie', '', '', ''), +(265, 'en_UK', 'Nouvelle-Calédonie', '', '', ''), (265, 'es_ES', 'Nouvelle-Calédonie', '', '', ''), (265, 'fr_FR', 'Nouvelle-Calédonie', '', '', ''), -(266, 'en_EN', 'Polynésie française', '', '', ''), +(266, 'en_UK', 'Polynésie française', '', '', ''), (266, 'es_ES', 'Polynésie française', '', '', ''), (266, 'fr_FR', 'Polynésie française', '', '', ''), -(267, 'en_EN', 'Wallis-et-Futuna', '', '', ''), +(267, 'en_UK', 'Wallis-et-Futuna', '', '', ''), (267, 'es_ES', 'Wallis-et-Futuna', '', '', ''), (267, 'fr_FR', 'Wallis-et-Futuna', '', '', ''), -(268, 'en_EN', 'USA - Alabama', '', '', ''), +(268, 'en_UK', 'USA - Alabama', '', '', ''), (268, 'es_ES', 'USA - Alabama', '', '', ''), (268, 'fr_FR', 'USA - Alabama', '', '', '');