Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow empty message if from fallback locale #80

Open
AldericWend opened this issue Jan 14, 2020 · 4 comments · May be fixed by #85
Open

Allow empty message if from fallback locale #80

AldericWend opened this issue Jan 14, 2020 · 4 comments · May be fixed by #85
Labels

Comments

@AldericWend
Copy link

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.

@lsmith77
Copy link

I am facing the issue same.

@rmariuzzo
Copy link
Owner

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

lsmith77 added a commit to lsmith77/Lang.js that referenced this issue Feb 8, 2021
@lsmith77 lsmith77 linked a pull request Feb 8, 2021 that will close this issue
@GENL
Copy link

GENL commented Mar 6, 2021

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

@rmariuzzo rmariuzzo added the bug label Mar 6, 2021
@rmariuzzo
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants