语言环境无法在Rails上正常运行?

时间:2019-04-01 10:18:27

标签: ruby-on-rails ruby

我正在处理一个应用程序,并且正在使用多个语言环境。所有人都可以在开发环境中正常工作,但是暂存环境存在一些问题。少数语言环境会导致缺少翻译错误。

这是我的语言环境文件:

en:
  js:
    funds:
      deposit: Deposit
      withdraw: Withdraw
      currency_name:
        usd: USD
        btc: BTC
        eth: ETH
        aion: AION
        ada: CARDANO
        vechain: VECHAIN
     deposit_btc:
        title: BTC Deposit
     deposit_eth:
        title: ETH Deposit
     deposit_aion:
        title: AION Deposit
     deposit_ada: 
        title: CARDANO Deposit
     deposit_vechain: 
        title: VECHAIN Deposit  
     withdraw_btc:
        title: BTC Withdraw
     withdraw_eth:
        title: ETH Withdraw
     withdraw_aion:
        title: AION Withdraw
     withdraw_ada:
        title: CARDANO Withdraw
     withdraw_vechain:
        title: VECHAIN Withdraw

当我将应用程序运行到暂存环境中时,所有btc,eth,ada和vechain都可以正常工作。但是aion的语言环境给出以下错误:

[missing "en.funds.deposit_aion.title" translation]

这是我渲染此货币的模板:

<h2 class="panel-title">{{"funds.deposit_aion.title" | t}}</h2>
<ng-include src="'/templates/funds/_deposit_coin.html'"></ng-include>
<ng-include src="'/templates/funds/_deposit_coin_history.html'"></ng-include>

请帮助任何人?

1 个答案:

答案 0 :(得分:0)

您是否有一个单独的(备用)翻译文件来使其他翻译正常工作?该错误似乎表明您不应将翻译的范围限制为js;删除第二行。