MCPcopy Index your code
hub / github.com/ember-cli/ember-cli / getLangChoices

Method getLangChoices

lib/tasks/interactive-new.js:143–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141 }
142
143 async getLangChoices() {
144 let userLocale = await this.getUserLocale();
145 let langChoices = [
146 {
147 name: DEFAULT_LOCALE,
148 value: DEFAULT_LOCALE,
149 },
150 ];
151
152 if (userLocale !== DEFAULT_LOCALE) {
153 langChoices.push({
154 name: userLocale,
155 value: userLocale,
156 });
157 }
158
159 langChoices.push({
160 name: 'I want to manually provide a different language',
161 value: null,
162 });
163
164 return langChoices;
165 }
166
167 getUserLocale() {
168 const { osLocale } = require('os-locale');

Callers 1

getQuestionsMethod · 0.95

Calls 1

getUserLocaleMethod · 0.95

Tested by

no test coverage detected