kazupon/vue-i18n

Change the way missing translation keys are detected

Open

#563 建立於 2019年4月16日

在 GitHub 查看
 (14 留言) (10 反應) (0 負責人)JavaScript (886 fork)batch import
Type: Improvementgood first issue

倉庫指標

Star
 (7,181 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Hello,

Our translations are handled with Crowdin and one particularity with Crowdin is that, if a key wasn't translated yet and we sync them; Crowdin will return the key with an empty string instead of returning the file without the missing keys.

The thing is that, vue-i18n considers the empty string as an already-translated key, so it will uses it instead of fallbacking to the default version (english).

It would be great to override this default rule, so I can say that: "If my key is missing OR my key is empty, fallback to the default version".

An implementation suggestion would be a handler in the config that returns true or false if the key passed should be considered as missing?

貢獻者指南