Turbo87 / intellij-emberjs

Ember.js support for JetBrains IDEs (IntelliJ, WebStorm, ...)
Apache License 2.0
218 stars 33 forks source link

Missing Translation #234

Open ghost opened 5 years ago

ghost commented 5 years ago

I get a missing translation in all my templates. Completion works but the preview of translated string not.

bildschirmfoto 2018-09-27 um 12 22 32
Turbo87 commented 5 years ago

can you reproduce this in a fresh new ember app?

ghost commented 5 years ago

@Turbo87 , I’ll do it next week when I’m back at office

ghost commented 5 years ago

Before I forget I use ember-intl

makepanic commented 5 years ago

It could be caused by new ember-intl configs not using baseLocale anymore. The ember-intl code searches for its value https://github.com/Turbo87/intellij-emberjs/blob/master/src/main/kotlin/com/emberjs/translations/EmberIntlBaseLocaleFinder.kt#L12

With falling back through baseLocale, en-us and en it won't find the correct translation if the project uses a new ember-intl version wihtout having en-us or en translations in place.

@onceatime can you provide us with more information, i.e. ember-intl version and your ember-intl configuration?

If this is really the cause, I could open a PR to fallback through all configured intl locales if that's ok.

ghost commented 5 years ago

Im knocked out this week. I’ll try to test it ASAP.ä when I’m back on track. But the configuration fallback sounds cool. The best solution or maybe as a separate module or feature could be a dialogue where the user can choose what translations should be used.

ghost commented 5 years ago

@makepanic my configuration is the default which comes with ember-intl (no changes).

emmber-intl version: 3.2.5