mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 03:14:40 +03: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.
|
||||
//
|
||||
|
||||
import { Status, unknownError, OK } from './status'
|
||||
import { Status, OK } from './status'
|
||||
|
||||
/**
|
||||
* @public
|
||||
@ -72,13 +72,9 @@ async function broadcastEvent (event: string, data: any): Promise<void> {
|
||||
* @param status -
|
||||
* @returns
|
||||
*/
|
||||
export async function setPlatformStatus (status: Status | Error): Promise<void> {
|
||||
// console.log('platform status', status)
|
||||
if (status instanceof Error) {
|
||||
return await broadcastEvent(PlatformEvent, unknownError(status))
|
||||
} else {
|
||||
return await broadcastEvent(PlatformEvent, status)
|
||||
}
|
||||
export async function setPlatformStatus (status: Status): Promise<void> {
|
||||
// console.log(await translate(status.code, status.params))
|
||||
return await broadcastEvent(PlatformEvent, status)
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,6 +2,6 @@
|
||||
"status": {
|
||||
"LoadingPlugin": "Loading plugin '<b>'{plugin}'</b>'...",
|
||||
"UnknownError": "Unknown error: {message}",
|
||||
"InvaldId": "Invalid Id: {id}"
|
||||
"InvalidId": "Invalid Id: {id}"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user