mirror of https://github.com/status-im/consul.git
ui: Fix intl keys in order to render correct messages for empty states (#13409)
* ui: Fix intl keys in order to render correct messages for empty states * Add a debug only debug log to warn about missing keys
This commit is contained in:
parent
da8cea58c9
commit
7761d0abe4
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:bug
|
||||||
|
ui: Fix incorrect text on certain page empty states
|
||||||
|
```
|
|
@ -90,13 +90,13 @@ as |route|>
|
||||||
>
|
>
|
||||||
<BlockSlot @name="header">
|
<BlockSlot @name="header">
|
||||||
<h2>
|
<h2>
|
||||||
{{t 'routes.dc.auth-methods.index.empty.header'
|
{{t 'routes.dc.acls.auth-methods.index.empty.header'
|
||||||
items=items.length
|
items=items.length
|
||||||
}}
|
}}
|
||||||
</h2>
|
</h2>
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
<BlockSlot @name="body">
|
<BlockSlot @name="body">
|
||||||
{{t 'routes.dc.auth-methods.index.empty.body'
|
{{t 'routes.dc.acls.auth-methods.index.empty.body'
|
||||||
items=items.length
|
items=items.length
|
||||||
htmlSafe=true
|
htmlSafe=true
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -94,13 +94,13 @@ as |route|>
|
||||||
>
|
>
|
||||||
<BlockSlot @name="header">
|
<BlockSlot @name="header">
|
||||||
<h2>
|
<h2>
|
||||||
{{t 'routes.dc.services.intentions.index.empty.header'
|
{{t 'routes.dc.services.show.intentions.index.empty.header'
|
||||||
items=items.length
|
items=items.length
|
||||||
}}
|
}}
|
||||||
</h2>
|
</h2>
|
||||||
</BlockSlot>
|
</BlockSlot>
|
||||||
<BlockSlot @name="body">
|
<BlockSlot @name="body">
|
||||||
{{t 'routes.dc.services.intentions.index.empty.body'
|
{{t 'routes.dc.services.show.intentions.index.empty.body'
|
||||||
items=items.length
|
items=items.length
|
||||||
htmlSafe=true
|
htmlSafe=true
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
|
/* eslint no-console: ["error", { allow: ["debug"] }] */
|
||||||
|
import { runInDebug } from '@ember/debug';
|
||||||
|
|
||||||
// if we can't find the message, take the last part of the identifier and
|
// if we can't find the message, take the last part of the identifier and
|
||||||
// ucfirst it so it looks human
|
// ucfirst it so it looks human
|
||||||
export default function missingMessage(key, locales) {
|
export default function missingMessage(key, locales) {
|
||||||
|
runInDebug(
|
||||||
|
_ => console.debug(`Translation key not found: ${key}`)
|
||||||
|
);
|
||||||
const last = key
|
const last = key
|
||||||
.split('.')
|
.split('.')
|
||||||
.pop()
|
.pop()
|
||||||
|
|
|
@ -75,11 +75,12 @@ dc:
|
||||||
title: Metadata
|
title: Metadata
|
||||||
sessions:
|
sessions:
|
||||||
title: Lock Sessions
|
title: Lock Sessions
|
||||||
header: Welcome to Lock Sessions
|
empty:
|
||||||
body: |
|
header: Welcome to Lock Sessions
|
||||||
<p>
|
body: |
|
||||||
Consul provides a session mechanism which can be used to build distributed locks. Sessions act as a binding layer between Nodes, Health Checks, and Key/Value data. There are currently no Lock Sessions present, or you may not have <code>key:read</code> or <code>session:read</code> permissions.
|
<p>
|
||||||
</p>
|
Consul provides a session mechanism which can be used to build distributed locks. Sessions act as a binding layer between Nodes, Health Checks, and Key/Value data. There are currently no Lock Sessions present, or you may not have <code>key:read</code> or <code>session:read</code> permissions.
|
||||||
|
</p>
|
||||||
services:
|
services:
|
||||||
title: Service Instances
|
title: Service Instances
|
||||||
empty: |
|
empty: |
|
||||||
|
|
Loading…
Reference in New Issue