@@ -12,10 +12,12 @@ import * as ConfigUtil from "../../common/config-util.js";
12
12
import * as DNDUtil from "../../common/dnd-util.js" ;
13
13
import type { DndSettings } from "../../common/dnd-util.js" ;
14
14
import * as EnterpriseUtil from "../../common/enterprise-util.js" ;
15
+ import { html } from "../../common/html.js" ;
15
16
import * as LinkUtil from "../../common/link-util.js" ;
16
17
import Logger from "../../common/logger-util.js" ;
17
18
import * as Messages from "../../common/messages.js" ;
18
19
import { bundlePath , bundleUrl } from "../../common/paths.js" ;
20
+ import * as t from "../../common/translation-util.js" ;
19
21
import type {
20
22
NavigationItem ,
21
23
ServerConfig ,
@@ -607,7 +609,7 @@ export class ServerManagerView {
607
609
) : Promise < void > {
608
610
await this . openFunctionalTab ( {
609
611
page : "Settings" ,
610
- label : "Settings" ,
612
+ label : t . __ ( "Settings" ) ,
611
613
materialIcon : "settings" ,
612
614
makeView : async ( ) => {
613
615
this . preferenceView = await PreferenceView . create ( ) ;
@@ -627,7 +629,7 @@ export class ServerManagerView {
627
629
let aboutView : AboutView ;
628
630
await this . openFunctionalTab ( {
629
631
page : "About" ,
630
- label : "About" ,
632
+ label : t . __ ( "About" ) ,
631
633
materialIcon : "sentiment_very_satisfied" ,
632
634
async makeView ( ) {
633
635
aboutView = await AboutView . create ( ) ;
@@ -817,7 +819,7 @@ export class ServerManagerView {
817
819
event . preventDefault ( ) ;
818
820
const template = [
819
821
{
820
- label : "Disconnect organization" ,
822
+ label : t . __ ( "Disconnect organization" ) ,
821
823
async click ( ) {
822
824
const { response} = await dialog . showMessageBox ( {
823
825
type : "warning" ,
@@ -838,7 +840,7 @@ export class ServerManagerView {
838
840
} ,
839
841
} ,
840
842
{
841
- label : "Notification settings" ,
843
+ label : t . __ ( "Notification settings" ) ,
842
844
enabled : await this . isLoggedIn ( index ) ,
843
845
click : async ( ) => {
844
846
// Switch to tab whose icon was right-clicked
@@ -849,7 +851,7 @@ export class ServerManagerView {
849
851
} ,
850
852
} ,
851
853
{
852
- label : "Copy Zulip URL" ,
854
+ label : t . __ ( "Copy Zulip URL" ) ,
853
855
click ( ) {
854
856
clipboard . writeText ( DomainUtil . getDomain ( index ) . url ) ;
855
857
} ,
@@ -1185,6 +1187,62 @@ export class ServerManagerView {
1185
1187
}
1186
1188
1187
1189
window . addEventListener ( "load" , async ( ) => {
1190
+ document . body . innerHTML = html `
1191
+ < div id ="content ">
1192
+ < div class ="popup ">
1193
+ < span class ="popuptext hidden " id ="fullscreen-popup "> </ span >
1194
+ </ div >
1195
+ < div id ="sidebar " class ="toggle-sidebar ">
1196
+ < div id ="view-controls-container ">
1197
+ < div id ="tabs-container "> </ div >
1198
+ < div id ="add-tab " class ="tab functional-tab ">
1199
+ < div class ="server-tab " id ="add-action ">
1200
+ < i class ="material-icons "> add</ i >
1201
+ </ div >
1202
+ < span id ="add-server-tooltip " style ="display: none "
1203
+ > ${ t . __ ( "Add Organization" ) } </ span
1204
+ >
1205
+ </ div >
1206
+ </ div >
1207
+ < div id ="actions-container ">
1208
+ < div class ="action-button " id ="dnd-action ">
1209
+ < i class ="material-icons md-48 "> notifications</ i >
1210
+ < span id ="dnd-tooltip " style ="display: none "
1211
+ > ${ t . __ ( "Do Not Disturb" ) } </ span
1212
+ >
1213
+ </ div >
1214
+ < div class ="action-button hidden " id ="reload-action ">
1215
+ < i class ="material-icons md-48 "> refresh</ i >
1216
+ < span id ="reload-tooltip " style ="display: none "
1217
+ > ${ t . __ ( "Reload" ) } </ span
1218
+ >
1219
+ </ div >
1220
+ < div class ="action-button disable " id ="loading-action ">
1221
+ < i class ="refresh material-icons md-48 "> loop</ i >
1222
+ < span id ="loading-tooltip " style ="display: none "
1223
+ > ${ t . __ ( "Loading" ) } </ span
1224
+ >
1225
+ </ div >
1226
+ < div class ="action-button disable " id ="back-action ">
1227
+ < i class ="material-icons md-48 "> arrow_back</ i >
1228
+ < span id ="back-tooltip " style ="display: none "
1229
+ > ${ t . __ ( "Go Back" ) } </ span
1230
+ >
1231
+ </ div >
1232
+ < div class ="action-button " id ="settings-action ">
1233
+ < i class ="material-icons md-48 "> settings</ i >
1234
+ < span id ="setting-tooltip " style ="display: none "
1235
+ > ${ t . __ ( "Settings" ) } </ span
1236
+ >
1237
+ </ div >
1238
+ </ div >
1239
+ </ div >
1240
+ < div id ="main-container ">
1241
+ < div id ="webviews-container "> </ div >
1242
+ </ div >
1243
+ </ div >
1244
+ ` . html ;
1245
+
1188
1246
const serverManagerView = new ServerManagerView ( ) ;
1189
1247
await serverManagerView . init ( ) ;
1190
1248
} ) ;
0 commit comments