-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include PHP 5.3 support and improve release script, prepare for 1.0.6…
… release
- Loading branch information
Showing
12 changed files
with
141 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
/README.html | ||
/root/ | ||
/vendor/ | ||
/tests/files/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# TODO | ||
|
||
* 1.0.6: | ||
* Onemogočanje TinyMCE, če je glavni modul locale_sl_si onemogočen? | ||
* adminhtml.csv: Kako je pravilno "Flat Catalog" | ||
|
||
* TinyMCE nima prevedenega naslova popupa pri plugin-u "Insert variable" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
$adminElements = array_map('str_getcsv', file(__DIR__.'/../package/app/locale/sl_SI/Mage_Adminhtml.csv')); | ||
|
||
$admin = []; | ||
|
||
foreach ($adminElements as $el) { | ||
$admin[] = $el[0]; | ||
} | ||
|
||
$csv = array_map('str_getcsv', file(__DIR__.'/../package/app/design/adminhtml/default/default/locale/sl_SI/translate.csv')); | ||
|
||
$i = 1; | ||
foreach($csv as $translate) { | ||
if (!in_array($translate[0], $admin)) { | ||
echo $i.'. '.$translate[0]."\n"; | ||
} | ||
$i++; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
|
||
function array_duplicates(array $array) { | ||
return array_diff_assoc($array, array_unique($array)); | ||
} | ||
|
||
try { | ||
$files = scandir(__DIR__.'/../package/app/locale/sl_SI'); | ||
foreach ($files as $file) { | ||
$translations = array_map('str_getcsv', file(__DIR__.'/../package/app/locale/sl_SI/'.$file)); | ||
|
||
$sources = []; | ||
foreach ($translations as $translation) { | ||
$sources[] = $translation[0]; | ||
} | ||
|
||
$duplicates = array_duplicates($sources); | ||
if (count($duplicates) !== 0) { | ||
echo $file.":\n"; | ||
var_dump($duplicates); | ||
} | ||
} | ||
|
||
|
||
} catch (\Exception $e) { | ||
echo 'Exception: '.$e; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace SymfonySi\Test; | ||
|
||
use SymfonySi\LocalePack\Archiver; | ||
|
||
class ArchiverTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
public function setUp() | ||
{ | ||
if (!is_dir($folder = __DIR__.'/files')) { | ||
mkdir($folder, 0777); | ||
} | ||
|
||
if (is_file($file = __DIR__.'/files/locale.tgz')) { | ||
unlink($file); | ||
} | ||
} | ||
|
||
public function testCompress() | ||
{ | ||
$archiver = new Archiver(__DIR__.'/files/locale.tgz'); | ||
|
||
$archiver->addFile(__DIR__.'/Fixtures/package.xml', 'package.xml'); | ||
|
||
$archiver->compress(); | ||
|
||
$this->assertFileExists(__DIR__.'/files/locale.tgz'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters