Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
146c1f7
Initial efforts around conversion from MongoDB specific to Storage ag…
guilhermeblanco Feb 7, 2012
558e3e8
Added missing field to Entry.
guilhermeblanco Feb 7, 2012
6a994aa
Refactored services initialization for consistency with Symfony stand…
guilhermeblanco Feb 7, 2012
daa3dc0
Refactored the code. (This commit will break YML import.)
shiroyuki Feb 7, 2012
3dc3fd9
Laid out the code to support Xliff files with ORM.
shiroyuki Feb 7, 2012
13f3669
Several fixes to entities and also initial efforts on controller.
guilhermeblanco Feb 7, 2012
08e052c
Refactored the code ready for integrating with ORM.
shiroyuki Feb 7, 2012
ff52dea
Merge branch 'master' of github.com:instaclick/TranslationEditorBundle
guilhermeblanco Feb 7, 2012
2231ef2
More work around ImportCommand.
guilhermeblanco Feb 7, 2012
07d1827
Added createLocale and updated the variable referencing AppKernel.
shiroyuki Feb 7, 2012
f331db8
Finished import command. Still need to test if UTF-8 chars are import…
guilhermeblanco Feb 8, 2012
af5f151
Refactored frontend. Most actions are working (except the new transla…
guilhermeblanco Feb 8, 2012
c07430c
Refactored the code from ImportCommand to Base; finished the coding t…
shiroyuki Feb 8, 2012
82a63d0
Refactored the XLIFF file handler from the export command and make th…
shiroyuki Feb 9, 2012
ef2d950
Finished changes in Import and Export Commands. Now they are complete…
guilhermeblanco Feb 13, 2012
959a36d
Optimized ORMStorage and also added missing methods on StorageInterfa…
guilhermeblanco Feb 13, 2012
269777c
Made new entry works.
guilhermeblanco Feb 13, 2012
73cbf3b
Improved reusabiity of Importers. Added YamlImporter.
guilhermeblanco Feb 13, 2012
483a79d
Committed missing file
guilhermeblanco Feb 13, 2012
2257daa
Added YAML Exporter.
guilhermeblanco Feb 15, 2012
fd8dfe2
Added support to create and drop locales dynamically.
guilhermeblanco Feb 15, 2012
7ba43b2
Turned domain into a drop down list.
guilhermeblanco Feb 15, 2012
df367a1
{{@inheritdoc}} => {@inheritdoc} replacement. Thanks @asm89 for point…
guilhermeblanco Feb 15, 2012
b57dce1
Fixed bug with localized exporting uner XLIFF.
guilhermeblanco Feb 27, 2012
7f7d040
Fixed original file name exporter in XLIFF exporter.
guilhermeblanco Feb 27, 2012
56df1b1
fix default locale parameter
catacgc Feb 28, 2012
e2c32b3
update the docs
catacgc Feb 28, 2012
4a1f4d4
add the yaml exporter to the list of available services
catacgc Feb 28, 2012
4a54302
fix yaml importer typo
catacgc Feb 28, 2012
9e58eac
add template checks for null values
catacgc Feb 28, 2012
f6e5d66
refactor the importer to allow multi file type imports
catacgc Feb 28, 2012
70e4b92
add the yaml importer
catacgc Feb 28, 2012
be24327
move the file extension check in the abstract importer, change xlf to…
catacgc Feb 28, 2012
4884b1b
Merge pull request #1 from catacgc/master
guilhermeblanco Mar 5, 2012
a83d549
Update Controller/EditorController.php
guilhermeblanco Mar 13, 2012
faf8dd0
~ using text type for the translation
dinamic May 17, 2012
a6c49fb
Merge pull request #2 from dinamic/master
guilhermeblanco May 17, 2012
bef899b
Updated composer.json.
guilhermeblanco May 17, 2012
1a5f370
~ display 'MISSING' if a translation does not exist or is empty
dinamic May 19, 2012
77a2284
Merge pull request #3 from dinamic/master
guilhermeblanco May 19, 2012
963f5c3
Added the support for Symfony 2.1 by making the code automatically de…
cajoy May 24, 2012
79c063f
Update master
guilhermeblanco Jun 15, 2012
835bae6
Change the interface to allow "getFileExtension" to return either a s…
shiroyuki Jun 22, 2012
30c675a
Added the support for legacy extensions (e.g., XLIFF and XLF extensions)
shiroyuki Jun 22, 2012
d8d28f1
added debug code
Jun 22, 2012
2a13c0e
Added support for Symfony 2.1 and 2.0 (BC).
shiroyuki Jun 22, 2012
a7ab7b8
removed the debugging code, properly support 2.0 and 2.1 and took out…
Jun 22, 2012
b1c3acd
Added the missing module.
shiroyuki Jun 22, 2012
d4f50cb
Removed dependency of ORM EntityRepository, allowing custom implement…
guilhermeblanco Aug 3, 2012
b578b83
update code for bootstrap 2
gimler Aug 14, 2012
22fdd2a
remove inline js
gimler Aug 16, 2012
05b0774
replace Translation implementation with symfony translator service
gimler Aug 14, 2012
03e4f35
Merge pull request #5 from gimler/bootstrap2
guilhermeblanco Aug 16, 2012
3d95c96
Merge pull request #4 from gimler/translator
guilhermeblanco Aug 16, 2012
8c2a45f
Fixing addTranslationAction()
Aug 22, 2012
90f5691
fixed typo
ch3ric Sep 18, 2012
f575fb0
Merge pull request #6 from ch3ric/patch-1
robocoder Sep 18, 2012
f774ac2
update composer.json
robocoder Sep 27, 2012
0a2257d
removed useless conf (exporter)
ch3ric Nov 28, 2012
15c74a4
removed useless conf (exporter)
ch3ric Nov 28, 2012
412025c
removed useless conf (exporter)
ch3ric Nov 28, 2012
b7d8843
The catalogue domain corresponds to the fileName
ch3ric Nov 28, 2012
34d301e
Merge pull request #7 from ch3ric/master
guilhermeblanco Nov 28, 2012
a5fcb20
Update ImportCommand.php
ynx Mar 6, 2013
b60711b
Update AbstractStorage.php
ynx Mar 6, 2013
0abfd28
Update StorageInterface.php
ynx Mar 6, 2013
8238c5f
Merge pull request #8 from yxie/master
robocoder Mar 7, 2013
284abb3
Update composer.json
robocoder Mar 7, 2013
5559097
1) Fixing issue that entity aren't persisted; 2) further optimize per…
Mar 12, 2013
8946e1e
3) Fixing the JavaScript that wrong locale is deleted by the delete b…
Mar 12, 2013
af863de
Merge pull request #9 from yxie/master
guilhermeblanco Mar 12, 2013
2cd58e8
Updated bootstrap and jquery assets url
alex88 Apr 10, 2013
8415a67
Merge pull request #10 from alex88/patch-1
robocoder Apr 10, 2013
85ba131
Fixed filer to accept anything before the first dot
Jul 17, 2013
40d2181
Merge pull request #12 from ETSGlobal/fix-file-finder
guilhermeblanco Nov 19, 2013
f62a2e1
Update composer.json
guilhermeblanco Nov 19, 2013
921de0f
Update ImportCommand.php
pabgaran Dec 17, 2013
8f95db6
Avoid error on empty value
pabgaran Dec 17, 2013
de9e535
Merge pull request #13 from pgarrido/patch-1
guilhermeblanco Dec 17, 2013
0ca4eb2
Update template to bootstrap 3.0 Step 1
pabgaran Dec 17, 2013
2b47c8d
Update template to bootstrap 3.0 and add search capability
pabgaran Dec 19, 2013
b926e6a
Fix function names
pabgaran Dec 19, 2013
53903dc
Update README.md
guilhermeblanco Dec 19, 2013
4137409
Merge pull request #14 from pgarrido/master
guilhermeblanco Dec 19, 2013
f48afcd
saveLocal & saveEntry fix
ivch Jun 26, 2014
d6b4099
Merge pull request #15 from ivch/patch-1
guilhermeblanco Jun 26, 2014
d97b9dd
MonogDB storage support
pasinter Jul 28, 2014
785592d
Merge pull request #16 from pasinter/master
guilhermeblanco Jul 29, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified CHANGELOG.md
100644 → 100755
Empty file.
94 changes: 94 additions & 0 deletions Command/AbstractCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<?php

namespace ServerGrove\Bundle\TranslationEditorBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand,
Symfony\Component\Finder\Finder;

/**
* AbstractCommand
*
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
*/
abstract class AbstractCommand extends ContainerAwareCommand
{
/**
* @var string the relative path
*/
const TRANSLATION_PATH = 'Resources/translations';

/**
* @var \Symfony\Component\Console\Input\InputInterface
*/
protected $input;

/**
* @var \Symfony\Component\Console\Output\OutputInterface
*/
protected $output;

/**
* Retrieve the list of registered Bundles
*
* @param string $filterBundleName
*
* @return array
*/
protected function getBundleList($filterBundleName = null)
{
$kernel = $this->getContainer()->get('kernel');

if ($filterBundleName) {
return array($kernel->getBundle($filterBundleName));
}

$sourcePath = realpath($kernel->getRootDir() . '/../src');

// Filter non-application bundles
$bundleList = array_filter(
$kernel->getBundles(),
function ($bundle) use ($sourcePath) {
return (strpos($bundle->getPath(), $sourcePath) === 0);
}
);

return $bundleList;
}

/**
* Extract file information
*
* @param string $fileName
*
* @return array
*/
protected function extractNameLocaleType($fileName)
{
// Gather information for re-assembly.
list($name, $locale, $type) = explode('.', basename($fileName));
list($language, $country) = $this->extractLocaleInformation($locale);

// Fix the inconsistency in naming convention.
$type = strtolower($type);

return array($name, $language, $country, $type);
}

/**
* Extract locale information
*
* @param string $locale
*
* @return array
*/
protected function extractLocaleInformation($locale)
{
$localeParts = preg_split('/(-|_)/', $locale, 2);

// Fix the inconsistency in naming convention.
$language = strtolower($localeParts[0]);
$country = (isset($localeParts[1])) ? strtoupper($localeParts[1]) : null;

return array($language, $country);
}
}
27 changes: 0 additions & 27 deletions Command/Base.php

This file was deleted.

Loading