Skip to content

Commit 710d0d6

Browse files
committed
Updated for release 2.13.0
1 parent 20b05bc commit 710d0d6

File tree

9 files changed

+111
-102
lines changed

9 files changed

+111
-102
lines changed

jars/openxliff.jar

80.2 KB
Binary file not shown.

jars/tmxvalidator.jar

2.9 KB
Binary file not shown.

jars/xmljava.jar

2.48 KB
Binary file not shown.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tmxeditor",
33
"productName": "TMXEditor",
4-
"version": "2.12.0",
4+
"version": "2.13.0",
55
"description": "TMX Editor",
66
"main": "js/app.js",
77
"scripts": {
@@ -19,9 +19,10 @@
1919
"url": "https://github.com/rmraya/TMXEditor.git"
2020
},
2121
"devDependencies": {
22-
"electron": "^22.0.2"
22+
"electron": "^25.4.0",
23+
"typescript": "^5.1.6"
2324
},
2425
"dependencies": {
2526
"sdltm": "^1.0.2"
2627
}
27-
}
28+
}

src/com/maxprograms/tmxserver/Constants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ private Constants() {
1919
}
2020

2121
public static final String APPNAME = "TMXEditor";
22-
public static final String VERSION = "2.12.0";
23-
public static final String BUILD = "20230114_0957";
22+
public static final String VERSION = "2.13.0";
23+
public static final String BUILD = "20230801_0748";
2424

2525
public static final String REASON = "reason";
2626
public static final String STATUS = "status";

tmxeditor.pdf

-19 Bytes
Binary file not shown.

ts/app.ts

Lines changed: 77 additions & 70 deletions
Large diffs are not rendered by default.

ts/main.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ class Main {
3131
properties: Array<string[]>;
3232
notes: string[];
3333

34-
currentId: string = null;
35-
currentLang: string = null;
36-
currentCell: HTMLTableCellElement = null;
37-
currentContent: string = null;
34+
currentId: string;
35+
currentLang: string;
36+
currentCell: HTMLTableCellElement;
37+
currentContent: string;
3838
selectedUnits: string[] = [];
3939

4040
static EDIT: string = '<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">' +
@@ -74,16 +74,16 @@ class Main {
7474
this.deleteUnits();
7575
});
7676
this.electron.ipcRenderer.on('sort-on', () => {
77-
document.getElementById('sortUnits').classList.add('active');
77+
(document.getElementById('sortUnits') as HTMLAnchorElement).classList.add('active');
7878
});
7979
this.electron.ipcRenderer.on('sort-off', () => {
80-
document.getElementById('sortUnits').classList.remove('active');
80+
(document.getElementById('sortUnits') as HTMLAnchorElement).classList.remove('active');
8181
});
8282
this.electron.ipcRenderer.on('filters-on', () => {
83-
document.getElementById('filterUnits').classList.add('active');
83+
(document.getElementById('filterUnits') as HTMLAnchorElement).classList.add('active');
8484
});
8585
this.electron.ipcRenderer.on('filters-off', () => {
86-
document.getElementById('filterUnits').classList.remove('active');
86+
(document.getElementById('filterUnits') as HTMLAnchorElement).classList.remove('active');
8787
});
8888
this.electron.ipcRenderer.on('start-waiting', () => {
8989
document.body.classList.add("wait");
@@ -361,7 +361,7 @@ class Main {
361361
event.cancelBubble = true;
362362
this.lastPage();
363363
}
364-
if (this.currentCell !== null && (event.key === 'PageDown' || event.key === 'PageUp') && !(event.ctrlKey || event.metaKey)) {
364+
if (this.currentCell && (event.key === 'PageDown' || event.key === 'PageUp') && !(event.ctrlKey || event.metaKey)) {
365365
// prevent scrolling while editing
366366
event.preventDefault();
367367
event.cancelBubble = true;
@@ -859,7 +859,7 @@ class Main {
859859
if (!this.isLoaded) {
860860
return;
861861
}
862-
if (this.currentId === null || this.currentId === '') {
862+
if (!this.currentId || this.currentId === null || this.currentId === '') {
863863
return;
864864
}
865865
this.electron.ipcRenderer.send('edit-attributes', { id: this.currentId, atts: this.attributes, type: this.attributesType });
@@ -869,7 +869,7 @@ class Main {
869869
if (!this.isLoaded) {
870870
return;
871871
}
872-
if (this.currentId === null || this.currentId === '') {
872+
if (!this.currentId || this.currentId === null || this.currentId === '') {
873873
return;
874874
}
875875
this.electron.ipcRenderer.send('edit-properties', { id: this.currentId, props: this.properties, type: this.attributesType });
@@ -879,7 +879,7 @@ class Main {
879879
if (!this.isLoaded) {
880880
return;
881881
}
882-
if (this.currentId === null || this.currentId === '') {
882+
if (!this.currentId || this.currentId === null || this.currentId === '') {
883883
return;
884884
}
885885
this.electron.ipcRenderer.send('edit-notes', { id: this.currentId, notes: this.notes, type: this.attributesType });
@@ -952,10 +952,10 @@ class Main {
952952
this.maxPage = 0;
953953
this.isLoaded = false;
954954

955-
this.currentId = null;
956-
this.currentLang = null;
957-
this.currentCell = null;
958-
this.currentContent = null;
955+
this.currentId = undefined;
956+
this.currentLang = undefined;
957+
this.currentCell = undefined;
958+
this.currentContent = undefined;
959959
this.selectedUnits = [];
960960
}
961961

@@ -983,7 +983,7 @@ class Main {
983983
document.getElementById('propertiesSpan').innerHTML = 'TU';
984984
document.getElementById('notesTable').innerHTML = '';
985985
document.getElementById('notesSpan').innerHTML = 'TU';
986-
this.currentId = null;
986+
this.currentId = undefined;
987987
this.setStatus('');
988988
}
989989

@@ -1040,15 +1040,15 @@ class Main {
10401040
}
10411041
lang = (event.target as Element).getAttribute('lang');
10421042
}
1043-
if (this.currentCell !== null && this.currentCell.isContentEditable && (this.currentId !== id || this.currentLang !== lang)) {
1043+
if (this.currentCell && this.currentCell.isContentEditable && (this.currentId !== id || this.currentLang !== lang)) {
10441044
this.saveEdit();
10451045
}
10461046

10471047
if (id) {
10481048
this.currentId = id;
10491049
if (this.currentCell) {
1050-
this.currentCell = null;
1051-
this.currentContent = null;
1050+
this.currentCell = undefined;
1051+
this.currentContent = undefined;
10521052
}
10531053
if (lang) {
10541054
this.currentLang = lang;
@@ -1130,7 +1130,7 @@ class Main {
11301130
}
11311131

11321132
firstPage(): void {
1133-
if (this.currentCell !== null && this.currentCell.isContentEditable) {
1133+
if (this.currentCell && this.currentCell.isContentEditable) {
11341134
this.saveEdit();
11351135
}
11361136
this.currentPage = 0;
@@ -1140,7 +1140,7 @@ class Main {
11401140

11411141
previousPage(): void {
11421142
if (this.currentPage > 0) {
1143-
if (this.currentCell !== null && this.currentCell.isContentEditable) {
1143+
if (this.currentCell && this.currentCell.isContentEditable) {
11441144
this.saveEdit();
11451145
}
11461146
this.currentPage--;
@@ -1151,7 +1151,7 @@ class Main {
11511151

11521152
nextPage(): void {
11531153
if (this.currentPage < this.maxPage - 1) {
1154-
if (this.currentCell !== null && this.currentCell.isContentEditable) {
1154+
if (this.currentCell && this.currentCell.isContentEditable) {
11551155
this.saveEdit();
11561156
}
11571157
this.currentPage++;
@@ -1161,7 +1161,7 @@ class Main {
11611161
}
11621162

11631163
lastPage(): void {
1164-
if (this.currentCell !== null && this.currentCell.isContentEditable) {
1164+
if (this.currentCell && this.currentCell.isContentEditable) {
11651165
this.saveEdit();
11661166
}
11671167
this.currentPage = this.maxPage - 1;
@@ -1184,7 +1184,7 @@ class Main {
11841184
(document.getElementById('units_page') as HTMLInputElement).value = '' + this.unitsPage;
11851185
this.maxPage = Math.ceil(this.unitsCount / this.unitsPage);
11861186
document.getElementById('pages').innerText = '' + this.maxPage;
1187-
if (this.currentCell !== null && this.currentCell.isContentEditable) {
1187+
if (this.currentCell && this.currentCell.isContentEditable) {
11881188
this.saveEdit();
11891189
}
11901190
this.firstPage();
@@ -1203,7 +1203,7 @@ class Main {
12031203
if (this.currentPage > this.maxPage - 1) {
12041204
this.currentPage = this.maxPage - 1;
12051205
}
1206-
if (this.currentCell !== null && this.currentCell.isContentEditable) {
1206+
if (this.currentCell && this.currentCell.isContentEditable) {
12071207
this.saveEdit();
12081208
}
12091209
(document.getElementById('page') as HTMLInputElement).value = '' + (this.currentPage + 1);

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
]
1414
},
1515
"forceConsistentCasingInFileNames": true,
16-
"strict": false
16+
"strict": false,
17+
"esModuleInterop": true
1718
},
1819
"include": [
1920
"ts/**/*"

0 commit comments

Comments
 (0)