mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-20 07:10:02 +00:00
add more translations
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
8f4ba43b70
commit
ec5eff89c7
@ -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)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user