Migrate more strings to translation keys (#11522)
This commit is contained in:
committed by
GitHub
parent
e650397bac
commit
bf68e4afb6
@@ -39,8 +39,8 @@ export default class PlainTextExporter extends Exporter {
|
||||
super(room, exportType, exportOptions, setProgressText);
|
||||
this.totalSize = 0;
|
||||
this.mediaOmitText = !this.exportOptions.attachmentsIncluded
|
||||
? _t("Media omitted")
|
||||
: _t("Media omitted - file size limit exceeded");
|
||||
? _t("export_chat|media_omitted")
|
||||
: _t("export_chat|media_omitted_file_size");
|
||||
}
|
||||
|
||||
public get destinationFileName(): string {
|
||||
@@ -92,14 +92,14 @@ export default class PlainTextExporter extends Exporter {
|
||||
} else {
|
||||
this.totalSize += blob.size;
|
||||
const filePath = this.getFilePath(mxEv);
|
||||
mediaText = " (" + _t("File Attached") + ")";
|
||||
mediaText = " (" + _t("export_chat|file_attached") + ")";
|
||||
this.addFile(filePath, blob);
|
||||
if (this.totalSize == this.exportOptions.maxSize) {
|
||||
this.exportOptions.attachmentsIncluded = false;
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
mediaText = " (" + _t("Error fetching file") + ")";
|
||||
mediaText = " (" + _t("export_chat|error_fetching_file") + ")";
|
||||
logger.log("Error fetching file " + error);
|
||||
}
|
||||
} else mediaText = ` (${this.mediaOmitText})`;
|
||||
@@ -113,7 +113,7 @@ export default class PlainTextExporter extends Exporter {
|
||||
for (let i = 0; i < events.length; i++) {
|
||||
const event = events[i];
|
||||
this.updateProgress(
|
||||
_t("Processing event %(number)s out of %(total)s", {
|
||||
_t("export_chat|processing_event_n", {
|
||||
number: i + 1,
|
||||
total: events.length,
|
||||
}),
|
||||
@@ -134,8 +134,8 @@ export default class PlainTextExporter extends Exporter {
|
||||
}
|
||||
|
||||
public async export(): Promise<void> {
|
||||
this.updateProgress(_t("Starting export process…"));
|
||||
this.updateProgress(_t("Fetching events…"));
|
||||
this.updateProgress(_t("export_chat|starting_export"));
|
||||
this.updateProgress(_t("export_chat|fetching_events"));
|
||||
|
||||
const fetchStart = performance.now();
|
||||
const res = await this.getRequiredEvents();
|
||||
@@ -143,7 +143,7 @@ export default class PlainTextExporter extends Exporter {
|
||||
|
||||
logger.log(`Fetched ${res.length} events in ${(fetchEnd - fetchStart) / 1000}s`);
|
||||
|
||||
this.updateProgress(_t("Creating output…"));
|
||||
this.updateProgress(_t("export_chat|creating_output"));
|
||||
const text = await this.createOutput(res);
|
||||
|
||||
if (this.files.length) {
|
||||
|
||||
Reference in New Issue
Block a user