add more translations

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-08-24 15:35:35 +02:00
parent 8f4ba43b70
commit ec5eff89c7
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0
2 changed files with 5 additions and 9 deletions

View File

@ -14,7 +14,7 @@
// limitations under the License. // limitations under the License.
// //
import { Status, unknownError, OK } from './status' import { Status, OK } from './status'
/** /**
* @public * @public
@ -72,13 +72,9 @@ async function broadcastEvent (event: string, data: any): Promise<void> {
* @param status - * @param status -
* @returns * @returns
*/ */
export async function setPlatformStatus (status: Status | Error): Promise<void> { export async function setPlatformStatus (status: Status): Promise<void> {
// console.log('platform status', status) // console.log(await translate(status.code, status.params))
if (status instanceof Error) { return await broadcastEvent(PlatformEvent, status)
return await broadcastEvent(PlatformEvent, unknownError(status))
} else {
return await broadcastEvent(PlatformEvent, status)
}
} }
/** /**

View File

@ -2,6 +2,6 @@
"status": { "status": {
"LoadingPlugin": "Loading plugin '<b>'{plugin}'</b>'...", "LoadingPlugin": "Loading plugin '<b>'{plugin}'</b>'...",
"UnknownError": "Unknown error: {message}", "UnknownError": "Unknown error: {message}",
"InvaldId": "Invalid Id: {id}" "InvalidId": "Invalid Id: {id}"
} }
} }