Skip to content

[Bug]: modal is not displayed when translation for default language is not present #715

@veyu

Description

@veyu

Expected Behavior

I would expect some kind of error message in console when translation cannot be found.

Current Behavior

Currently there is no message in console and modal is not displayed. I spent a lot of time debugging until I realized that I did not changed identifier of translation to match default language setting.

Steps to reproduce

  1. Use config downloaded from playground.
  2. Change language default to something else:
  language: {
    default: "de",
    autoDetect: "browser",
    translations: {
      en: { ... }
    }
  },
  1. Visit page/reload.

Proposed fix or additional info.

What was confusing for me was the fact that on my personal computer it did worked correctly (MacOs Sonoma 14.2.1; Firefox 128.0.3 (64-bit) ) and I was seeing changes which I introduced. But when someone else tried opening this page, browser would not show modal. Other people tried it from many different locations on Windows with different browsers (Chrome, Firefox, Opera). I used some old laptop with Windows and was able to confirm problem reported by others. I was not able to find out why it was working on my machine (tried incognito mode, clearing cache, different browsers - still worked for me).
Finally after using old laptop as test device I pinpointed above issue to be the cause.

Version

3.0.1

On which browser do you see the issue?

Firefox, Chrome, Other

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions