Author: rande
Date: 2010-03-06 16:04:30 +0100 (Sat, 06 Mar 2010)
New Revision: 28407
Added:
plugins/mgI18nPlugin/branches/sf1.3/UPGRADE
plugins/mgI18nPlugin/branches/sf1.3/WHATSNEW
plugins/mgI18nPlugin/branches/sf1.3/lib/task/mgI18nCreateTablesTask.class.php
Modified:
plugins/mgI18nPlugin/branches/sf1.3/README
plugins/mgI18nPlugin/branches/sf1.3/lib/form/plugin/PluginmgI18nTargetsForm.class.php
plugins/mgI18nPlugin/branches/sf1.3/package.xml.tmpl
Log:
update package.xml.tmpl file and othes files
Modified: plugins/mgI18nPlugin/branches/sf1.3/README
===================================================================
--- plugins/mgI18nPlugin/branches/sf1.3/README 2010-03-06 15:01:08 UTC (rev
28406)
+++ plugins/mgI18nPlugin/branches/sf1.3/README 2010-03-06 15:04:30 UTC (rev
28407)
@@ -4,7 +4,7 @@
Requirements
------------
-* symfony 1.2
+* symfony 1.3
* Propel or Doctrine
* pdo_mysql (not tested with others databases)
* jQuery
Added: plugins/mgI18nPlugin/branches/sf1.3/UPGRADE
===================================================================
--- plugins/mgI18nPlugin/branches/sf1.3/UPGRADE (rev 0)
+++ plugins/mgI18nPlugin/branches/sf1.3/UPGRADE 2010-03-06 15:04:30 UTC (rev
28407)
@@ -0,0 +1,24 @@
+UPGRADING FROM VERSION_0_0_6
+----------------------------
+
+ * The plugin can be used with Propel or Doctrine so you must update your
factories files to
+ set the name of the connection instead of the DSN information
+
+ i18n:
+ class: mgI18N
+ param:
+ source: mgMySQL
+ database: doctrine # or propel or any names defined in
the databases.yml files
+
+
+ * the GUI is now automatically added by the filter, so you have to remove all
references
+ of this code in your template files :
+
+ <?php if(sfConfig::get('mg_i18n_enabled')): ?>
+ <?php include_component('mgI18nAdmin', 'displayTranslationBox') ?>
+ <?php endif;?>
+
+ * All tasks are now under the i18n namespace
+
+ - mgI18n:xliff-import => i18n:mg-xliff-import
+
Added: plugins/mgI18nPlugin/branches/sf1.3/WHATSNEW
===================================================================
--- plugins/mgI18nPlugin/branches/sf1.3/WHATSNEW
(rev 0)
+++ plugins/mgI18nPlugin/branches/sf1.3/WHATSNEW 2010-03-06 15:04:30 UTC
(rev 28407)
@@ -0,0 +1,14 @@
+version 0.0.7
+ - remove Doctrine dependency
+ - merge lib, ajax and application tabs to one tab named 'Files'
+ - add a new database tab, the user can now lookup the database for messages
+ - the import task now update target if the target is already in the database
+ - fix utf8 errors
+ - small visual improvement
+ - expose the learning mode option
+ - add a create table task
+
+version 0.0.[1-6]
+ - parsing options
+ - fixes bugs
+ - initial code
\ No newline at end of file
Modified:
plugins/mgI18nPlugin/branches/sf1.3/lib/form/plugin/PluginmgI18nTargetsForm.class.php
===================================================================
---
plugins/mgI18nPlugin/branches/sf1.3/lib/form/plugin/PluginmgI18nTargetsForm.class.php
2010-03-06 15:01:08 UTC (rev 28406)
+++
plugins/mgI18nPlugin/branches/sf1.3/lib/form/plugin/PluginmgI18nTargetsForm.class.php
2010-03-06 15:04:30 UTC (rev 28407)
@@ -41,7 +41,7 @@
'targets' => new sfValidatorPass()
));
- $this->disableLocalCSRFProtection();
+ $this->disableLocalCSRFProtection();
}
public function save()
Added:
plugins/mgI18nPlugin/branches/sf1.3/lib/task/mgI18nCreateTablesTask.class.php
===================================================================
---
plugins/mgI18nPlugin/branches/sf1.3/lib/task/mgI18nCreateTablesTask.class.php
(rev 0)
+++
plugins/mgI18nPlugin/branches/sf1.3/lib/task/mgI18nCreateTablesTask.class.php
2010-03-06 15:04:30 UTC (rev 28407)
@@ -0,0 +1,75 @@
+<?php
+/*
+ * This file is part of the mgWidgetsPlugin package.
+ * (c) 2008 Qarmaq
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+
+/**
+ *
+ *
+ * @package mgI18nPlugin
+ * @author Thomas Rabaix <[email protected]>
+ * @version SVN: $Id$
+ */
+class mgI18nCreateTablesTask extends sfBaseTask
+{
+ /**
+ * @see sfTask
+ */
+ protected function configure()
+ {
+
+ $this->addArguments(array(
+ new sfCommandArgument('application', sfCommandArgument::REQUIRED, 'The
application name'),
+ ));
+
+ $this->addOptions(array(
+ new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED,
'The environment', 'cli'),
+ ));
+
+ $this->namespace = 'i18n';
+ $this->name = 'mg-create-tables';
+ $this->briefDescription = '[mgI18nPlugin] Create tables required by the
plugin';
+
+ $this->detailedDescription = <<<EOF
+Create tables required by the plugin.
+EOF;
+ }
+
+ /**
+ * @see sfTask
+ */
+ protected function execute($arguments = array(), $options = array())
+ {
+
+ // define SQLs
+ $sqls = array(
+ "CREATE TABLE catalogue (cat_id BIGINT AUTO_INCREMENT, name
VARCHAR(100), source_lang VARCHAR(100), target_lang VARCHAR(100), date_created
BIGINT, date_modified BIGINT, author VARCHAR(255), PRIMARY KEY(cat_id)) DEFAULT
CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = INNODB;",
+ "CREATE TABLE trans_unit (msg_id BIGINT AUTO_INCREMENT, cat_id BIGINT
DEFAULT '1', source LONGTEXT, target LONGTEXT, comments LONGTEXT, date_added
BIGINT DEFAULT 0, date_modified BIGINT DEFAULT 0, author VARCHAR(255),
translated TINYINT(1), INDEX cat_id_idx (cat_id), PRIMARY KEY(msg_id)) DEFAULT
CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = INNODB;",
+ "ALTER TABLE trans_unit ADD FOREIGN KEY (cat_id) REFERENCES
catalogue(cat_id);",
+ );
+
+ $this->logSection('install', 'Create tables');
+
+ // retrieve the PDO object
+ $manager = new sfDatabaseManager($this->configuration);
+ $database =
$manager->getDatabase(sfConfig::get('app_mgI18nPlugin_connection'));
+ $pdo = $database->getConnection();
+
+ // execute queries
+ $pdo->exec('START TRANSACTION');
+
+ foreach($sqls as $sql)
+ {
+ $pdo->exec($sql);
+ }
+ $pdo->exec('COMMIT');
+
+ $this->logSection('install', 'done ...');
+ $this->logSection('install', 'you can now import xliff files into the
database');
+ }
+}
\ No newline at end of file
Modified: plugins/mgI18nPlugin/branches/sf1.3/package.xml.tmpl
===================================================================
--- plugins/mgI18nPlugin/branches/sf1.3/package.xml.tmpl 2010-03-06
15:01:08 UTC (rev 28406)
+++ plugins/mgI18nPlugin/branches/sf1.3/package.xml.tmpl 2010-03-06
15:04:30 UTC (rev 28407)
@@ -35,9 +35,9 @@
<package>
<name>symfony</name>
<channel>pear.symfony-project.com</channel>
- <min>1.2.0</min>
- <max>1.3.0</max>
- <exclude>1.3.0</exclude>
+ <min>1.3.0</min>
+ <max>2.0.0</max>
+ <exclude>2.0.0</exclude>
</package>
</required>
</dependencies>
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.