File tree Expand file tree Collapse file tree 12 files changed +109
-3
lines changed
fixtures/in-repo-translations Expand file tree Collapse file tree 12 files changed +109
-3
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,26 @@ exports[`Test Fixtures emblem 1`] = `
4444
4545exports [` Test Fixtures emblem 2` ] = ` Map { } ` ;
4646
47+ exports [` Test Fixtures in-repo-translations 1` ] = `
48+ "[1/4] 🔍 Finding JS and HBS files...
49+ [2/4] 🔍 Searching for translations keys in JS and HBS files...
50+ [3/4] ⚙️ Checking for unused translations...
51+ [4/4] ⚙️ Checking for missing translations...
52+
53+ ⚠️ Found 1 unused translations!
54+ You can use --fix to remove all unused translations.
55+
56+ - in-repo-addon.unused (used in lib/in-repo-addon/translations/en.yaml)
57+
58+ ⚠️ Found 2 missing translations!
59+
60+ - translation-missing-in-addon (used in lib/in-repo-addon/addon/templates/addon.hbs)
61+ - translation-missing-in-app (used in lib/in-repo-addon/app/templates/application.hbs)
62+ "
63+ ` ;
64+
65+ exports [` Test Fixtures in-repo-translations 2` ] = ` Map { } ` ;
66+
4767exports [` Test Fixtures missing-translations 1` ] = `
4868"[1/4] 🔍 Finding JS and HBS files...
4969[2/4] 🔍 Searching for translations keys in JS and HBS files...
Original file line number Diff line number Diff line change 1+ import Controller from '@ember/controller' ;
2+
3+ export default class ApplicationController extends Controller {
4+ get foo ( ) {
5+ return this . intl . t ( 'js-translation' ) ;
6+ }
7+ }
Original file line number Diff line number Diff line change 1+ {{ t " hbs-translation" }}
2+ {{ t " in-repo-addon.translation-outside-addon" }}
Original file line number Diff line number Diff line change 1+ import Controller from '@ember/controller' ;
2+
3+ export default class AddonController extends Controller {
4+ get foo ( ) {
5+ return this . intl . t ( 'in-repo-addon.addon.js-translation' ) ;
6+ }
7+ }
Original file line number Diff line number Diff line change 1+ {{ t " in-repo-addon.addon.hbs-translation" }}
2+ {{ t " translation-outside-app-in-addon" }}
3+ {{ t " translation-missing-in-addon" }}
Original file line number Diff line number Diff line change 1+ import Controller from '@ember/controller' ;
2+
3+ export default class ApplicationController extends Controller {
4+ get foo ( ) {
5+ return this . intl . t ( 'in-repo-addon.app.js-translation' ) ;
6+ }
7+ }
Original file line number Diff line number Diff line change 1+ {{ t " in-repo-addon.app.hbs-translation" }}
2+ {{ t " translation-outside-app-in-app" }}
3+ {{ t " translation-missing-in-app" }}
Original file line number Diff line number Diff line change 1+ in-repo-addon :
2+ addon :
3+ hbs-translation : HBS in in-repo addon addon
4+ js-translation : JS in in-repo addon addon
5+ app :
6+ hbs-translation : HBS in in-repo addon app
7+ js-translation : JS in in-repo addon app
8+ translation-outside-addon : This translation is used outside the in-repo addon
9+ unused : This translation is unused
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " in-repo-translations" ,
3+ "ember-addon" : {
4+ "paths" : [
5+ " lib/in-repo-addon"
6+ ]
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ hbs-translation : HBS!
2+ js-translation : JS!
3+ translation-outside-app-in-addon : This translation is only used in the addon folder of the addon
4+ translation-outside-app-in-app : This translation is only used in the app folder of the addon
You can’t perform that action at this time.
0 commit comments