mirror of
https://github.com/OutlineFoundation/outline-server.git
synced 2026-05-13 05:52:04 +00:00
make hasTranslation better
This commit is contained in:
parent
783e4f2ad4
commit
b66664cd83
1 changed files with 10 additions and 2 deletions
|
|
@ -785,8 +785,16 @@ export class AppRoot extends polymerElementWithLocalize {
|
|||
}
|
||||
|
||||
hasTranslation(key: string) {
|
||||
const msg = this.localize(key);
|
||||
return msg !== key && msg !== '';
|
||||
let message;
|
||||
|
||||
try {
|
||||
message = this.localize(key);
|
||||
} catch (e) {
|
||||
// failed to find translation
|
||||
message = '';
|
||||
}
|
||||
|
||||
return message !== key && message !== '';
|
||||
}
|
||||
|
||||
showIntro() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue