Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/services/platform-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ export class PlatformService extends EventEmitter implements IPlatformService {
private $deviceAppDataFactory: Mobile.IDeviceAppDataFactory,
private $projectChangesService: IProjectChangesService,
private $emulatorPlatformService: IEmulatorPlatformService,
private $analyticsService: IAnalyticsService) {
private $analyticsService: IAnalyticsService,
private $messages: IMessages,
private $staticConfig: Config.IStaticConfig) {
super();
}

Expand Down Expand Up @@ -504,7 +506,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
}

if (found.length === 0) {
this.$errors.fail("Cannot find device with name: %s", emulateOptions.device);
this.$errors.fail(this.$messages.Devices.NotFoundDeviceByIdentifierErrorMessage, this.$staticConfig.CLIENT_NAME.toLowerCase());
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions test/npm-support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { DevicePlatformsConstants } from "../lib/common/mobile/device-platforms-
import { XmlValidator } from "../lib/xml-validator";
import { LockFile } from "../lib/lockfile";
import ProjectChangesLib = require("../lib/services/project-changes-service");
import { Messages } from "../lib/common/messages/messages";

import path = require("path");
import temp = require("temp");
Expand Down Expand Up @@ -82,6 +83,7 @@ function createTestInjector(): IInjector {
testInjector.register("analyticsService", {
track: async () => undefined
});
testInjector.register("messages", Messages);

return testInjector;
}
Expand Down
2 changes: 2 additions & 0 deletions test/platform-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { XmlValidator } from "../lib/xml-validator";
import * as ChildProcessLib from "../lib/common/child-process";
import { CleanCommand } from "../lib/commands/platform-clean";
import ProjectChangesLib = require("../lib/services/project-changes-service");
import { Messages } from "../lib/common/messages/messages";

let isCommandExecuted = true;

Expand Down Expand Up @@ -139,6 +140,7 @@ function createTestInjector() {
testInjector.register("analyticsService", {
track: async () => undefined
});
testInjector.register("messages", Messages);

return testInjector;
}
Expand Down
2 changes: 2 additions & 0 deletions test/platform-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { DevicePlatformsConstants } from "../lib/common/mobile/device-platforms-
import { XmlValidator } from "../lib/xml-validator";
import * as ChildProcessLib from "../lib/common/child-process";
import ProjectChangesLib = require("../lib/services/project-changes-service");
import { Messages } from "../lib/common/messages/messages";

require("should");
let temp = require("temp");
Expand Down Expand Up @@ -80,6 +81,7 @@ function createTestInjector() {
testInjector.register("analyticsService", {
track: async () => undefined
});
testInjector.register("messages", Messages);

return testInjector;
}
Expand Down