2015-06-17 18 views
2

在Symfony2中,与JMSTranslationBundle,运行jms翻译包:格式“yml〜”不存在。

php app/console translation:extract fr --config=app 

,当我得到这个问题

[JMS\TranslationBundle\Exception\InvalidArgumentException] 
    The format "yml~" does not exist.  

我的配置是

jms_translation: 
    configs: 
     app: 
      dirs: [%kernel.root_dir%, %kernel.root_dir%/../src] 
      output_dir: %kernel.root_dir%/Resources/translations 
      ignored_domains: [routes] 
      excluded_names: ["*TestCase.php", "*Test.php"] 
      excluded_dirs: [cache, data, logs] 
#   extractors: [jms_i18n_routing] 

任何想法如何解决这个问题?

回答

1

解决方法是从您的项目中删除所有*.yml~文件。

+0

大概你还可以添加“*〜”到excluded_names? –