i18n all the remaining strings.

This commit is contained in:
softsimon
2020-12-03 18:34:19 +07:00
parent 80552fcd78
commit 4d097ea92a
39 changed files with 776 additions and 424 deletions

View File

@@ -1,4 +1,4 @@
<span #buttonWrapper [attr.data-tlite]="'Copied!'" style="position: relative;">
<span #buttonWrapper [attr.data-tlite]="copiedMessage" style="position: relative;">
<button #btn class="btn btn-sm btn-link pt-0" style="line-height: 0.9;" [attr.data-clipboard-text]="text">
<img src="./resources/clippy.svg" width="13">
</button>

View File

@@ -1,4 +1,4 @@
import { Component, OnInit, ViewChild, ElementRef, AfterViewInit, Input, ChangeDetectionStrategy } from '@angular/core';
import { Component, ViewChild, ElementRef, AfterViewInit, Input, ChangeDetectionStrategy } from '@angular/core';
import * as ClipboardJS from 'clipboard';
import * as tlite from 'tlite';
@@ -12,6 +12,7 @@ export class ClipboardComponent implements AfterViewInit {
@ViewChild('btn') btn: ElementRef;
@ViewChild('buttonWrapper') buttonWrapper: ElementRef;
@Input() text: string;
copiedMessage: string = $localize`:@@clipboard.copied-message:Copied!`;
clipboard: any;
@@ -19,7 +20,7 @@ export class ClipboardComponent implements AfterViewInit {
ngAfterViewInit() {
this.clipboard = new ClipboardJS(this.btn.nativeElement);
this.clipboard.on('success', (e) => {
this.clipboard.on('success', () => {
tlite.show(this.buttonWrapper.nativeElement);
setTimeout(() => {
tlite.hide(this.buttonWrapper.nativeElement);