1 | import { isEmpty } from '@ember/utils';
|
2 | import { warn } from '@ember/debug';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | export default function missingMessage(key, locales /*, options */) {
|
9 | if (isEmpty(locales)) {
|
10 | warn(
|
11 | `[ember-intl] no locale has been set! See: https://ember-intl.github.io/ember-intl/docs/quickstart#4-configure-ember-intl`,
|
12 | false,
|
13 | {
|
14 | id: 'ember-intl-no-locale-set',
|
15 | }
|
16 | );
|
17 |
|
18 | return `No locale defined. Unable to resolve translation: "${key}"`;
|
19 | }
|
20 |
|
21 | const localeNames = locales.join(', ');
|
22 |
|
23 | warn(`[ember-intl] translation: "${key}" on locale: "${localeNames}" was not found.`, false, {
|
24 | id: 'ember-intl-missing-translation',
|
25 | });
|
26 |
|
27 | return `Missing translation "${key}" for locale "${localeNames}"`;
|
28 | }
|