rmariuzzo/Lang.js

Allow empty message if from fallback locale

Opened this issue · 4 comments

if (message[subKey]) {

If we have an empty value for a given key in a fallback locale:

'button.tooltip' => ''

and we request Lang.get('button.tooltip') then _getMessage returns 'button.tooltip'.

if (message[subKey] !== undefined) {

solves the problem.

I am facing the issue same.

@lsmith77 or @AldericWend can you prepare a PR for that? Otherwise, will tackle this during the weekend.

GENL commented

I suggest to use Matice: https://github.com/GENL/matice

I suggest to use Matice: https://github.com/GENL/matice

Hi again @GENL!

I saw 3 comments like this one across two repos. Although, matice doesn't have this bug I would suggest to contact me and if you want I could include a reference in the README file of both projects. I don't expect anything in return. wdyt?