Merge branch 'hotfix/recursive404' of https://github.com/rufinus/ZendSkeletonApplicat...
authorMatthew Weier O'Phinney <matthew@zend.com>
Wed, 3 Oct 2012 20:51:19 +0000 (15:51 -0500)
committerMatthew Weier O'Phinney <matthew@zend.com>
Wed, 3 Oct 2012 20:51:19 +0000 (15:51 -0500)
README.md
config/autoload/global.php
config/autoload/local.php.dist
init_autoloader.php
module/Application/Module.php
module/Application/language/pt_BR.mo [new file with mode: 0644]
module/Application/language/pt_BR.po [new file with mode: 0644]
module/Application/language/zh_CN.mo [new file with mode: 0644]
module/Application/language/zh_CN.po [new file with mode: 0644]
module/Application/view/layout/layout.phtml
public/index.php

index 4e7d164..4f653c3 100644 (file)
--- a/README.md
+++ b/README.md
@@ -14,13 +14,32 @@ Installation
 Using Composer (recommended)
 ----------------------------
 The recommended way to get a working copy of this project is to clone the repository
-and use composer to install dependencies:
+and use `composer` to install dependencies using the `create-project` command:
+
+    curl -s https://getcomposer.org/installer | php -
+    php composer.phar create-project -repository-url="http://packages.zendframework.com" zendframework/skeleton-application path/to/install
+
+Alternately, clone the repository and manually invoke `composer` using the shipped
+`composer.phar`:
 
     cd my/project/dir
     git clone git://github.com/zendframework/ZendSkeletonApplication.git
     cd ZendSkeletonApplication
+    php composer.phar self-update
     php composer.phar install
 
+(The `self-update` directive is to ensure you have an up-to-date `composer.phar`
+available.)
+
+Another alternative for downloading the project is to grab it via `curl`, and
+then pass it to `tar`:
+
+    cd my/project/dir
+    curl -#L https://github.com/zendframework/ZendSkeletonApplication/tarball/master | tar xz --strip-components=1
+
+You would then invoke `composer` to install dependencies per the previous
+example.
+
 Using Git submodules
 --------------------
 Alternatively, you can install using native git submodules:
index 1473720..104762e 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * Global Configuration Override
  *
- * You can use this file for overridding configuration values from modules, etc.
+ * You can use this file for overriding configuration values from modules, etc.
  * You would place values in here that are agnostic to the environment and not
  * sensitive to security.
  *
index 7862eba..33fb696 100644 (file)
@@ -8,7 +8,7 @@
  *
  * @NOTE: This file is ignored from Git by default with the .gitignore included
  * in ZendSkeletonApplication. This is a good practice, as it prevents sensitive
- * credentials from accidentally being comitted into version control.
+ * credentials from accidentally being committed into version control.
  */
 
 return array(
index 08a0045..fbce704 100644 (file)
@@ -33,7 +33,7 @@ if (getenv('ZF2_PATH')) {           // Support for ZF2_PATH environment variable
 
 if ($zf2Path) {
     if (isset($loader)) {
-        $loader->add('Zend', $zf2Path . '/Zend');
+        $loader->add('Zend', $zf2Path);
     } else {
         include $zf2Path . '/Zend/Loader/AutoloaderFactory.php';
         Zend\Loader\AutoloaderFactory::factory(array(
index 86d9d4e..7786cd8 100644 (file)
 namespace Application;
 
 use Zend\Mvc\ModuleRouteListener;
+use Zend\Mvc\MvcEvent;
 
 class Module
 {
-    public function onBootstrap($e)
+    public function onBootstrap(MvcEvent $e)
     {
         $e->getApplication()->getServiceManager()->get('translator');
         $eventManager        = $e->getApplication()->getEventManager();
diff --git a/module/Application/language/pt_BR.mo b/module/Application/language/pt_BR.mo
new file mode 100644 (file)
index 0000000..f509b81
Binary files /dev/null and b/module/Application/language/pt_BR.mo differ
diff --git a/module/Application/language/pt_BR.po b/module/Application/language/pt_BR.po
new file mode 100644 (file)
index 0000000..f526e8c
--- /dev/null
@@ -0,0 +1,153 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: ZendSkeletonApplication\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-05 22:17-0700\n"
+"PO-Revision-Date: 2012-09-09 15:23-0300\n"
+"Last-Translator: Diogo Melo <dmelo87@gmail.com>\n"
+"Language-Team: ZF Contibutors <zf-devteam@zend.com>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-KeywordsList: translate\n"
+"X-Poedit-Language: Portuguese\n"
+"X-Poedit-Country: Brazil\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-SearchPath-0: ..\n"
+
+#: ../view/layout/layout.phtml:6
+#: ../view/layout/layout.phtml:33
+msgid "Skeleton Application"
+msgstr "Aplicação Skeleton"
+
+#: ../view/layout/layout.phtml:36
+msgid "Home"
+msgstr "Início"
+
+#: ../view/layout/layout.phtml:50
+msgid "All rights reserved."
+msgstr "Todos os direitos reservados."
+
+#: ../view/application/index/index.phtml:2
+#, php-format
+msgid "Welcome to %sZend Framework 2%s"
+msgstr "Bem vindo ao %sZend Framework 2%s"
+
+#: ../view/application/index/index.phtml:3
+#, php-format
+msgid "Congratulations! You have successfully installed the %sZF2 Skeleton Application%s. You are currently running Zend Framework version %s. This skeleton can serve as a simple starting point for you to begin building your application on ZF2."
+msgstr "Parabéns! Você instalou a %sAplicação Skeleton ZF2%s com sucesso. Você está usando a versão %s do Zend Framework. Este esqueleto serve simplesmente como um ponto de inicio na construção da sua aplicação ZF2."
+
+#: ../view/application/index/index.phtml:4
+msgid "Fork Zend Framework 2 on GitHub"
+msgstr "Replique Zend Framework 2 no GitHub"
+
+#: ../view/application/index/index.phtml:10
+msgid "Follow Development"
+msgstr "Acompanhe o Desenvolvimento"
+
+#: ../view/application/index/index.phtml:11
+#, php-format
+msgid "Zend Framework 2 is under active development. If you are interested in following the development of ZF2, there is a special ZF2 portal on the official Zend Framework website which provides links to the ZF2 %swiki%s, %sdev blog%s, %sissue tracker%s, and much more. This is a great resource for staying up to date with the latest developments!"
+msgstr "Zend Framework 2 está sob desenvolvimento ativo. Se vocês está interessado em acompanhar o desenvolvimento do ZF2, tem um portal ZF2 especial no site oficial do Zend Framework que possui links para ZF2 %swiki%s, %sdev blog%s, %sissue tracker%s, dentre outros. Este é um excelente material para se manter atualizado com os últimos desenvolvimentos!"
+
+#: ../view/application/index/index.phtml:12
+msgid "ZF2 Development Portal"
+msgstr "Portal de Desenvolvimento do ZF2"
+
+#: ../view/application/index/index.phtml:16
+msgid "Discover Modules"
+msgstr "Descubra Módulos"
+
+#: ../view/application/index/index.phtml:17
+#, php-format
+msgid "The community is working on developing a community site to serve as a repository and gallery for ZF2 modules. The project is available %son GitHub%s. The site is currently live and currently contains a list of some of the modules already available for ZF2."
+msgstr "A Comunidade está trabalhando em desenvolver um site comunitário para servir como repositório e galeria de módulos ZF2. O projeto estará disponível %sem breve no GitHub%s. O site já está online e atualmente contém uma lista de alguns dos módulos já disponíveis para ZF2."
+
+#: ../view/application/index/index.phtml:18
+msgid "Explore ZF2 Modules"
+msgstr "Explore Módulos ZF2"
+
+#: ../view/application/index/index.phtml:22
+msgid "Help &amp; Support"
+msgstr "Ajuda &amp; Suporte"
+
+#: ../view/application/index/index.phtml:23
+#, php-format
+msgid "If you need any help or support while developing with ZF2, you may reach us via IRC: %s#zftalk.2 on Freenode%s. We'd love to hear any questions or feedback you may have regarding the beta releases. Alternatively, you may subscribe and post questions to the %smailing lists%s."
+msgstr "Caso você precise de ajuda ou suporte enquanto desenvolve com ZF2, pode nos encontrar pelo %s#zftalk.2 on Freenode%s. Vamos gostar muito de ouvir perguntas e opiniões que você possa ter em relação às versões beta. Também, você pode se registrar e enviar perguntar para a %slista de e-mail%s."
+
+#: ../view/application/index/index.phtml:24
+msgid "Ping us on IRC"
+msgstr "Nos escreva no IRC"
+
+#: ../view/error/index.phtml:1
+msgid "An error occurred"
+msgstr "Ocorreu um erro"
+
+#: ../view/error/index.phtml:8
+msgid "Additional information"
+msgstr "Informação adicional"
+
+#: ../view/error/index.phtml:11
+#: ../view/error/index.phtml:35
+msgid "File"
+msgstr "Arquivo"
+
+#: ../view/error/index.phtml:15
+#: ../view/error/index.phtml:39
+msgid "Message"
+msgstr "Mensagem"
+
+#: ../view/error/index.phtml:19
+#: ../view/error/index.phtml:43
+#: ../view/error/404.phtml:55
+msgid "Stack trace"
+msgstr "Pilha de execução"
+
+#: ../view/error/index.phtml:29
+msgid "Previous exceptions"
+msgstr "Exceções anteriores"
+
+#: ../view/error/index.phtml:58
+msgid "No Exception available"
+msgstr "Nenhuma exceção disponível"
+
+#: ../view/error/404.phtml:1
+msgid "A 404 error occurred"
+msgstr "Ocorreu um erro 404"
+
+#: ../view/error/404.phtml:10
+msgid "The requested controller was unable to dispatch the request."
+msgstr "O controlador requisitado não foi capaz de despachar a requisição."
+
+#: ../view/error/404.phtml:13
+msgid "The requested controller could not be mapped to an existing controller class."
+msgstr "O controlador requisitados não pode ser mapeado a uma classe de controlador existente."
+
+#: ../view/error/404.phtml:16
+msgid "The requested controller was not dispatchable."
+msgstr "O controlador requisitado não foi despachado."
+
+#: ../view/error/404.phtml:19
+msgid "The requested URL could not be matched by routing."
+msgstr "A URL requisitada não pode ser encontrada em uma rota."
+
+#: ../view/error/404.phtml:22
+msgid "We cannot determine at this time why a 404 was generated."
+msgstr "Não foi possível determinar o motivo do 404 ter ocorrido."
+
+#: ../view/error/404.phtml:34
+msgid "Controller"
+msgstr "Controlador"
+
+#: ../view/error/404.phtml:41
+#, php-format
+msgid "resolves to %s"
+msgstr "resolve como %s"
+
+#: ../view/error/404.phtml:51
+msgid "Exception"
+msgstr "Exceção"
+
diff --git a/module/Application/language/zh_CN.mo b/module/Application/language/zh_CN.mo
new file mode 100644 (file)
index 0000000..4efabe2
Binary files /dev/null and b/module/Application/language/zh_CN.mo differ
diff --git a/module/Application/language/zh_CN.po b/module/Application/language/zh_CN.po
new file mode 100644 (file)
index 0000000..4bf3ffb
--- /dev/null
@@ -0,0 +1,174 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: ZendSkeletonApplication\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-07-05 22:17-0700\n"
+"PO-Revision-Date: 2012-09-08 13:15+0800\n"
+"Last-Translator: Evan Coury <me@evancoury.com>\n"
+"Language-Team: ZF Contibutors <zf-devteam@zend.com>\n"
+"Language: en_US\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-KeywordsList: translate\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-SearchPath-0: ..\n"
+
+#: ../view/layout/layout.phtml:6 ../view/layout/layout.phtml:33
+msgid "Skeleton Application"
+msgstr "框架应用"
+
+#: ../view/layout/layout.phtml:36
+msgid "Home"
+msgstr "主页"
+
+#: ../view/layout/layout.phtml:50
+msgid "All rights reserved."
+msgstr "All rights reserved."
+
+#: ../view/application/index/index.phtml:2
+#, php-format
+msgid "Welcome to %sZend Framework 2%s"
+msgstr "欢迎使用%sZend Framework 2%s"
+
+#: ../view/application/index/index.phtml:3
+#, php-format
+msgid ""
+"Congratulations! You have successfully installed the %sZF2 Skeleton "
+"Application%s. You are currently running Zend Framework version %s. This "
+"skeleton can serve as a simple starting point for you to begin building your "
+"application on ZF2."
+msgstr ""
+"恭喜!您已经成功安装了%sZF2 Skeleton Application%s。您现在运行的Zend "
+"Framework的版本为%s。这个框架应用可以用作您创建自己的ZF2应用的起点。"
+
+#: ../view/application/index/index.phtml:4
+msgid "Fork Zend Framework 2 on GitHub"
+msgstr "在GitHub中获取Zend Framework 2到您的应用"
+
+#: ../view/application/index/index.phtml:10
+msgid "Follow Development"
+msgstr "关注开发"
+
+#: ../view/application/index/index.phtml:11
+#, php-format
+msgid ""
+"Zend Framework 2 is under active development. If you are interested in "
+"following the development of ZF2, there is a special ZF2 portal on the "
+"official Zend Framework website which provides links to the ZF2 %swiki%s, "
+"%sdev blog%s, %sissue tracker%s, and much more. This is a great resource for "
+"staying up to date with the latest developments!"
+msgstr ""
+"Zend Framework 2正在开发中。如果您有兴趣关注ZF2的开发,Zend Framework的官方网"
+"站有一个专门的ZF2入口,从这个入口可以进入ZF2的%swiki%s, %sdev blog%s, "
+"%sissue tracker%s等。这些是关注我们最新开发的好资源!"
+
+#: ../view/application/index/index.phtml:12
+msgid "ZF2 Development Portal"
+msgstr "ZF2 开发入口"
+
+#: ../view/application/index/index.phtml:16
+msgid "Discover Modules"
+msgstr "探索模块"
+
+#: ../view/application/index/index.phtml:17
+#, php-format
+msgid ""
+"The community is working on developing a community site to serve as a "
+"repository and gallery for ZF2 modules. The project is available %son GitHub"
+"%s. The site is currently live and currently contains a list of some of the "
+"modules already available for ZF2."
+msgstr ""
+"社区正在开发一个能够存储和展示ZF2模块的功能。这个项目可以在%son GitHub%s找"
+"到。这个网站现在已经包含了许多ZF2可用的模块。"
+
+#: ../view/application/index/index.phtml:18
+msgid "Explore ZF2 Modules"
+msgstr "浏览ZF2模块"
+
+#: ../view/application/index/index.phtml:22
+msgid "Help &amp; Support"
+msgstr "帮助 &amp; 支持"
+
+#: ../view/application/index/index.phtml:23
+#, php-format
+msgid ""
+"If you need any help or support while developing with ZF2, you may reach us "
+"via IRC: %s#zftalk.2 on Freenode%s. We'd love to hear any questions or "
+"feedback you may have regarding the beta releases. Alternatively, you may "
+"subscribe and post questions to the %smailing lists%s."
+msgstr ""
+"如果您需要一些关于ZF2开发的帮助和支持,可以通过IRC: %s#zftalk.2 on Freenode"
+"%s。我们非常乐意收到您对于发布的公测版提问和反馈。或者,您也可以通"
+"过%smailing lists%s订阅并发布问题。"
+
+#: ../view/application/index/index.phtml:24
+msgid "Ping us on IRC"
+msgstr "在IRC上ping我们"
+
+#: ../view/error/index.phtml:1
+msgid "An error occurred"
+msgstr "发生错误"
+
+#: ../view/error/index.phtml:8
+msgid "Additional information"
+msgstr "附加信息"
+
+#: ../view/error/index.phtml:11 ../view/error/index.phtml:35
+msgid "File"
+msgstr "文件"
+
+#: ../view/error/index.phtml:15 ../view/error/index.phtml:39
+msgid "Message"
+msgstr "消息"
+
+#: ../view/error/index.phtml:19 ../view/error/index.phtml:43
+#: ../view/error/404.phtml:55
+msgid "Stack trace"
+msgstr "Stack trace"
+
+#: ../view/error/index.phtml:29
+msgid "Previous exceptions"
+msgstr "上一个异常"
+
+#: ../view/error/index.phtml:58
+msgid "No Exception available"
+msgstr "没有可用的Exception"
+
+#: ../view/error/404.phtml:1
+msgid "A 404 error occurred"
+msgstr "404 缺少目标文件"
+
+#: ../view/error/404.phtml:10
+msgid "The requested controller was unable to dispatch the request."
+msgstr "所请求的控制器不能分发该请求"
+
+#: ../view/error/404.phtml:13
+msgid ""
+"The requested controller could not be mapped to an existing controller class."
+msgstr "所请求的控制器不能映射到已存在的控制器类"
+
+#: ../view/error/404.phtml:16
+msgid "The requested controller was not dispatchable."
+msgstr ""
+
+#: ../view/error/404.phtml:19
+msgid "The requested URL could not be matched by routing."
+msgstr "所请求的URL不能与路由对应"
+
+#: ../view/error/404.phtml:22
+msgid "We cannot determine at this time why a 404 was generated."
+msgstr "我们不能确定为什么这次会出现404"
+
+#: ../view/error/404.phtml:34
+msgid "Controller"
+msgstr "控制器"
+
+#: ../view/error/404.phtml:41
+#, php-format
+msgid "resolves to %s"
+msgstr "解决: %s"
+
+#: ../view/error/404.phtml:51
+msgid "Exception"
+msgstr "异常"
index d5af45f..52285ec 100644 (file)
@@ -1,57 +1,47 @@
 <?php echo $this->doctype(); ?>
 
 <html lang="en">
-  <head>
-    <meta charset="utf-8">
-    <?php echo $this->headTitle('ZF2 '. $this->translate('Skeleton Application'))->setSeparator(' - ')->setAutoEscape(false) ?>
-
-    <?php echo $this->headMeta()->appendName('viewport', 'width=device-width, initial-scale=1.0') ?>
-
-    <!-- Le styles -->
-    <?php echo $this->headLink(array('rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/images/favicon.ico'))
-                    ->prependStylesheet($this->basePath() . '/css/bootstrap-responsive.min.css')
-                    ->prependStylesheet($this->basePath() . '/css/style.css')
-                    ->prependStylesheet($this->basePath() . '/css/bootstrap.min.css') ?>
-
-    <!-- Scripts -->
-    <?php echo $this->headScript()->prependFile($this->basePath() . '/js/html5.js', 'text/javascript', array('conditional' => 'lt IE 9',))
-                                  ->prependFile($this->basePath() . '/js/jquery-1.7.2.min.js') ?>
-
-  </head>
-
-  <body>
-
-    <div class="navbar navbar-fixed-top">
-      <div class="navbar-inner">
-        <div class="container">
-          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
-
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-            <span class="icon-bar"></span>
-          </a>
-          <a class="brand" href="<?php echo $this->url('home') ?>"><?php echo $this->translate('Skeleton Application') ?></a>
-          <div class="nav-collapse">
-            <ul class="nav">
-              <li class="active"><a href="<?php echo $this->url('home') ?>"><?php echo $this->translate('Home') ?></a></li>
-            </ul>
-          </div><!--/.nav-collapse -->
+    <head>
+        <meta charset="utf-8">
+        <?php echo $this->headTitle('ZF2 '. $this->translate('Skeleton Application'))->setSeparator(' - ')->setAutoEscape(false) ?>
+
+        <?php echo $this->headMeta()->appendName('viewport', 'width=device-width, initial-scale=1.0') ?>
+
+        <!-- Le styles -->
+        <?php echo $this->headLink(array('rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/images/favicon.ico'))
+                        ->prependStylesheet($this->basePath() . '/css/bootstrap-responsive.min.css')
+                        ->prependStylesheet($this->basePath() . '/css/style.css')
+                        ->prependStylesheet($this->basePath() . '/css/bootstrap.min.css') ?>
+
+        <!-- Scripts -->
+        <?php echo $this->headScript()->prependFile($this->basePath() . '/js/html5.js', 'text/javascript', array('conditional' => 'lt IE 9',))
+                                      ->prependFile($this->basePath() . '/js/jquery-1.7.2.min.js') ?>
+    </head>
+    <body>
+        <div class="navbar navbar-fixed-top">
+            <div class="navbar-inner">
+                <div class="container">
+                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+                        <span class="icon-bar"></span>
+                        <span class="icon-bar"></span>
+                        <span class="icon-bar"></span>
+                    </a>
+                    <a class="brand" href="<?php echo $this->url('home') ?>"><?php echo $this->translate('Skeleton Application') ?></a>
+                    <div class="nav-collapse">
+                        <ul class="nav">
+                            <li class="active"><a href="<?php echo $this->url('home') ?>"><?php echo $this->translate('Home') ?></a></li>
+                        </ul>
+                    </div><!--/.nav-collapse -->
+                </div>
+            </div>
         </div>
-      </div>
-    </div>
-
-    <div class="container">
-
-      <?php echo $this->content; ?>
-
-      <hr>
-
-      <footer>
-        <p>&copy; 2005 - 2012 by Zend Technologies Ltd. <?php echo $this->translate('All rights reserved.') ?></p>
-      </footer>
-
-    </div> <!-- /container -->
-
-  <?php echo $this->inlineScript() ?>
-  </body>
+        <div class="container">
+            <?php echo $this->content; ?>
+            <hr>
+            <footer>
+                <p>&copy; 2005 - 2012 by Zend Technologies Ltd. <?php echo $this->translate('All rights reserved.') ?></p>
+            </footer>
+        </div> <!-- /container -->
+        <?php echo $this->inlineScript() ?>
+    </body>
 </html>
index 2891a0c..49cb018 100644 (file)
@@ -6,7 +6,7 @@
 chdir(dirname(__DIR__));
 
 // Setup autoloading
-include 'init_autoloader.php';
+require 'init_autoloader.php';
 
 // Run the application!
-Zend\Mvc\Application::init(include 'config/application.config.php')->run();
+Zend\Mvc\Application::init(require 'config/application.config.php')->run();