Skip to content

Commit 23cf632

Browse files
committed
added missing translations
1 parent 4c94e21 commit 23cf632

File tree

7 files changed

+84
-4
lines changed

7 files changed

+84
-4
lines changed

frontend/src/app/app.module.ts

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { AppComponent } from './app.component';
99
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
1010
import { HomeComponent, OfflinePlaylistComponent } from './pages';
1111
import { FlexLayoutModule } from '@angular/flex-layout';
12+
import { ClipboardModule } from '@angular/cdk/clipboard';
1213
import { MatButtonModule } from '@angular/material/button';
1314
import { MatBadgeModule } from '@angular/material/badge';
1415
import { MatCardModule } from '@angular/material/card';
@@ -84,6 +85,7 @@ export function HttpLoaderFactory(http: HttpClient) {
8485
}),
8586
FlexLayoutModule,
8687
QrCodeModule,
88+
ClipboardModule,
8789
MatBadgeModule,
8890
MatButtonModule,
8991
MatCardModule,

frontend/src/app/components/settings/settings.component.html

+8-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@
101101
<div fxLayout="row" fxLayoutAlign="start start" fxLayoutGap="12px" [style.width.%]="100" *ngIf="model.PublicServer.Enabled">
102102
<div class="qrcode">
103103
<qr-code [value]="publicServerQrcode" size="300" errorCorrectionLevel="M"></qr-code>
104-
{{ publicServerQrcode }}
105104
</div>
106105
<div class="form" fxLayout="column" fxLayoutAlign="start start" fxLayoutGap="16px">
107106
<mat-form-field appearance="fill" [style.width.%]="100">
@@ -147,13 +146,20 @@
147146
</div>
148147
</div>
149148

150-
<div class="mobile-app box info" *ngIf="isNgrokAvailable && model.PublicServer.Enabled">
149+
<div class="mobile-app box info" *ngIf="false && isNgrokAvailable && model.PublicServer.Enabled">
151150
<span>{{ 'SETTINGS.TABS.PUBLIC_SERVER.NGROK.MOBILE_APP' | translate }}</span>
152151
<button mat-flat-button color="secondary" (click)="openUrl('https://github.com/marcio199226/ytd-mobile/releases')">
153152
{{ 'SETTINGS.TABS.PUBLIC_SERVER.NGROK.MOBILE_APP_BTN' | translate }}
154153
</button>
155154
</div>
156155

156+
<div class="share-url box info" *ngIf="isNgrokAvailable && model.PublicServer.Enabled">
157+
<span>{{ 'SETTINGS.TABS.PUBLIC_SERVER.NGROK.SHARE_URL' | translate }}</span>
158+
<button mat-icon-button [title]="'SETTINGS.TABS.PUBLIC_SERVER.NGROK.COPY_URL' | translate" (click)="copyUrlToClipboard()">
159+
<mat-icon>content_copy</mat-icon>
160+
</button>
161+
</div>
162+
157163
</div>
158164
</ng-template>
159165
</mat-tab>

frontend/src/app/components/settings/settings.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ settings {
7575
width: 100%;
7676
}
7777

78-
.mobile-app {
78+
.mobile-app, .share-url {
7979
margin-top: 6px;
8080
width: 100%;
8181
box-sizing: border-box;

frontend/src/app/components/settings/settings.component.ts

+9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
1111
import to from 'await-to-js';
1212
import { AppConfig, getQrcodeData, NgrokState } from '@models';
1313
import { MatTabGroup } from '@angular/material/tabs';
14+
import { Clipboard } from '@angular/cdk/clipboard';
15+
import { SnackbarService } from 'app/services/snackbar.service';
1416

1517
@Component({
1618
selector: 'settings',
@@ -64,6 +66,8 @@ export class SettingsComponent implements OnInit {
6466
constructor(
6567
private _cdr: ChangeDetectorRef,
6668
private _dialogRef: MatDialogRef<SettingsComponent>,
69+
private _clipboard: Clipboard,
70+
private _snackbar: SnackbarService,
6771
@Inject(MAT_DIALOG_DATA) public data: { tab?: string, config: AppConfig, isNgrokRunning: boolean, ngrok: NgrokState },
6872
) {
6973
}
@@ -117,6 +121,11 @@ export class SettingsComponent implements OnInit {
117121
this._cdr.detectChanges();
118122
}
119123

124+
copyUrlToClipboard(): void {
125+
this._clipboard.copy(this.publicServerQrcode);
126+
this._snackbar.openSuccess("SETTINGS.TABS.PUBLIC_SERVER.NGROK.URL_COPIED");
127+
}
128+
120129
private _getQrCodeData(): string {
121130
const pwa = window.APP_STATE.pwaUrl;
122131
if(this.data.isNgrokRunning) {

frontend/src/assets/i18n/en.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@
112112
"APIKEY_DESC_ENABLED": "Disable api key verification",
113113
"APIKEY_DESC_DISABLED": "Enable api key verification",
114114
"APP_KEY": "Verify api key (more secure)",
115-
"APP_KEY_HINT": "Your local server will verify api key too"
115+
"APP_KEY_HINT": "Your local server will verify api key too",
116+
"SHARE_URL": "Share url with your fiends",
117+
"COPY_URL": "Copy to clipboard",
118+
"URL_COPIED": "Url has been copied to your clipboard"
116119
}
117120
}
118121
},

frontend/src/assets/i18n/it.json

+30
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,36 @@
114114
"UNSUPPORTED_URL": "Url non supportato",
115115
"TRACK_ADDED": "Brano aggiunto al download",
116116
"TRACK_ADD_KO": "Impossibile aggiungere il brano al download"
117+
},
118+
"TABS": {
119+
"GENERAL": "Generali",
120+
"PUBLIC_SERVER": {
121+
"LABEL": "Condivisione",
122+
"DESC": "Condividi i tuoi brani e le tue playlist con i tuoi amici",
123+
"ENABLED": "Attiva",
124+
"DISABLED": "Spenta",
125+
"NGROK": {
126+
"NOT_INSTALLED": "Devi prima installare ngrok per abilitare questa funzionalita",
127+
"INSTALL_BTN": "Installa ngrok",
128+
"MOBILE_APP": "Scarica l'app mobile e scanerizza il qrcode",
129+
"MOBILE_APP_BTN": "Scarica l'app",
130+
"AUTH_TOKEN": "Authtoken di ngrok",
131+
"AUTH_TOKEN_HINT": "",
132+
"AUTH_DESC_ENABLED": "L'autenticazione è abilitata",
133+
"AUTH_DESC_DISABLED": "Abilita l'autenticazione (maggiore sicurezza)",
134+
"USERNAME": "Username",
135+
"USERNAME_HINT": "Username usata per l'autenticazione",
136+
"PASSWORD": "Password",
137+
"PASSWORD_HINT": "Password usata per l'autenticazione",
138+
"APIKEY_DESC_ENABLED": "Disabilita la verifica della api key",
139+
"APIKEY_DESC_DISABLED": "Abilita la verifica della api key",
140+
"APP_KEY": "Verifica api key (maggiore sicurezza)",
141+
"APP_KEY_HINT": "Verra' verificata la api key per la connessione",
142+
"SHARE_URL": "Condividi l'url con i tuoi amici per accedere alle tue playlist",
143+
"COPY_URL": "Copia nella clipboard",
144+
"URL_COPIED": "L'url è stato copiato nei tuoi appunti"
145+
}
146+
}
117147
}
118148
},
119149
"UPDATER": {

frontend/src/assets/i18n/pl.json

+30
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,36 @@
114114
"UNSUPPORTED_URL": "Nieobsługiwany adres URL",
115115
"TRACK_ADDED": "Utwór dodany do pobrania",
116116
"TRACK_ADD_KO": "Bład przy dodawaniu utworu do listy pobierania"
117+
},
118+
"TABS": {
119+
"GENERAL": "Ogólne",
120+
"PUBLIC_SERVER": {
121+
"LABEL": "Tunelowanie",
122+
"DESC": "Udostepniaj twoim znajomym twoje utwory i listy odtwarzania",
123+
"ENABLED": "Aktywne",
124+
"DISABLED": "Nieaktywne",
125+
"NGROK": {
126+
"NOT_INSTALLED": "Musisz najpierw zainstalować ngrok, aby włączyć tę funkcję",
127+
"INSTALL_BTN": "Zainstaluj ngrok",
128+
"MOBILE_APP": "Ściągnij aplikacje i zeskanuj qrcode",
129+
"MOBILE_APP_BTN": "Ściągnij aplikacje",
130+
"AUTH_TOKEN": "Token ngrok",
131+
"AUTH_TOKEN_HINT": "",
132+
"AUTH_DESC_ENABLED": "Autentykacja włączona",
133+
"AUTH_DESC_DISABLED": "Włącz uwierzytelnianie (zwiększone bezpieczeństwo)",
134+
"USERNAME": "Użytkownik",
135+
"USERNAME_HINT": "Nazwa użytkownik potrzebna do autentykacji",
136+
"PASSWORD": "Hasło",
137+
"PASSWORD_HINT": "Hasło użytkownika potrzebne do autentykacji",
138+
"APIKEY_DESC_ENABLED": "Wyłącz weryfikację klucza API",
139+
"APIKEY_DESC_DISABLED": "Włącz weryfikację klucza API",
140+
"APP_KEY": "Zweryfikuj klucz API (większe bezpieczeństwo)",
141+
"APP_KEY_HINT": "Aby połączyc sie trzeba bedzie podac klucz API",
142+
"SHARE_URL": "Udostępnij adres URL znajomym, aby uzyskać dostęp do twoich list odtwarzania",
143+
"COPY_URL": "Skopiuj do schowka",
144+
"URL_COPIED": "Adres URL został skopiowany do schowka"
145+
}
146+
}
117147
}
118148
},
119149
"UPDATER": {

0 commit comments

Comments
 (0)