我们正在为CakePHP项目从Assembla切换到GitHub存储库。目前,“cake i18n extract”的输出如下:
...
#: http://subversion.assembla.com/svn/our_project_name/trunk/app/controllers
/wall_controller.php:333
msgid ""
"some error message"
msgstr ""
...
http://subversion.assembla.com/svn/our_project_name/trunk前缀来自哪里? (我假设它是在某个配置文件中设置的,但是我无法通过在app / config中为“assembla”执行grep,甚至从根目录中找到它。)我想知道我可以更改前缀指向GitHub存储库。
答案 0 :(得分:1)
提取任务在提取时将relative path references放入po文件中。蛋糕生成的底池文件如下所示:
-> Console/cake i18n extract
...
-> cat Locale/cake.pot
# LANGUAGE translation of CakePHP Application
# Copyright YEAR NAME <EMAIL@ADDRESS>
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"POT-Creation-Date: 2014-02-19 15:12+0000\n"
"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n"
"Last-Translator: NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: View/Errors/error400.ctp:21
#: View/Errors/error500.ctp:21
msgid "Error"
msgstr ""
#: View/Errors/error400.ctp:23
msgid "The requested address %s was not found on this server."
msgstr ""
#: View/Errors/error500.ctp:22
msgid "An Internal Error Has Occurred."
msgstr ""
当在线查看指向其托管位置时,assembla可能会修改这些引用,或者前一个开发人员更改了po文件中的引用(请注意,提取任务不会生成po文件,只有pot文件)以方便使用。
如果您仍然在pot文件中看到这些assembla引用 - 请检查Cake文件夹中的提取任务是否未被修改,并且没有app / Console / Command / Task / ExtractTask.php文件将在运行时覆盖核心任务。