Skip to content

Commit

Permalink
Updated for release 2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rmraya committed Apr 23, 2022
1 parent 8a10743 commit 0c4d716
Show file tree
Hide file tree
Showing 68 changed files with 211 additions and 171 deletions.
1 change: 1 addition & 0 deletions html/licenses/electron.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Copyright (c) Electron contributors
Copyright (c) 2013-2020 GitHub Inc.

Permission is hereby granted, free of charge, to any person obtaining
Expand Down
5 changes: 2 additions & 3 deletions html/licenses/jsoup.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

The MIT License

Copyright (c) 2009-2019 Jonathan Hedley <[email protected]>
Copyright (c) 2009-2022 Jonathan Hedley <https://jsoup.org/>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
Binary file modified images/about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified jars/openxliff.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tmxeditor",
"productName": "TMXEditor",
"version": "2.9.0",
"version": "2.10.0",
"description": "TMX Editor",
"main": "js/app.js",
"scripts": {
Expand All @@ -19,7 +19,7 @@
"url": "https://github.com/rmraya/TMXEditor.git"
},
"devDependencies": {
"electron": "^16.0.3",
"typescript": "^4.5.2"
"electron": "^18.1.0",
"typescript": "^4.6.3"
}
}
63 changes: 63 additions & 0 deletions src/com/maxprograms/tmxserver/CheckURL.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*******************************************************************************
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-v10.html
*
* Contributors:
* Maxprograms - initial API and implementation
*******************************************************************************/

package com.maxprograms.tmxserver;

import java.io.IOException;
import java.lang.System.Logger;
import java.lang.System.Logger.Level;
import java.net.HttpURLConnection;
import java.net.URL;

public class CheckURL {

protected static final Logger LOGGER = System.getLogger(CheckURL.class.getName());

public static void main(String[] args) {
if (args.length < 1) {
return;
}
checkURL(args[0]);
}

protected static void checkURL(String string) {
boolean waiting = true;
int count = 0;
while (waiting && count < 40) {
try {
connect(string);
waiting = false;
} catch (IOException e) {
try {
Thread.sleep(500);
count++;
} catch (InterruptedException e1) {
LOGGER.log(Level.ERROR, e1.getMessage(), e1);
Thread.currentThread().interrupt();
}
}
}
if (count < 40) {
LOGGER.log(Level.INFO, "ready");
} else {
System.exit(1);
}
}

private static void connect(String string) throws IOException {
URL url = new URL(string);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setConnectTimeout(1000);
connection.connect();
}

}
6 changes: 3 additions & 3 deletions src/com/maxprograms/tmxserver/Constants.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand All @@ -19,8 +19,8 @@ private Constants() {
}

public static final String APPNAME = "TMXEditor";
public static final String VERSION = "2.9.0";
public static final String BUILD = "20211201_0811";
public static final String VERSION = "2.10.0";
public static final String BUILD = "20220423_1037";

public static final String REASON = "reason";
public static final String STATUS = "status";
Expand Down
6 changes: 1 addition & 5 deletions src/com/maxprograms/tmxserver/TMXServer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down Expand Up @@ -289,10 +289,6 @@ public void handle(HttpExchange t) throws IOException {
}
}
}
if ("stop".equals(command)) {
logger.log(Level.INFO, "Stopping server");
System.exit(0);
}
} catch (IOException e) {
logger.log(Level.ERROR, e);
String message = e.getMessage();
Expand Down
12 changes: 11 additions & 1 deletion src/com/maxprograms/tmxserver/TMXService.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down Expand Up @@ -1592,6 +1592,11 @@ public JSONObject convertCsv(String csvFile, String tmxFile, List<String> langua
optionalDelims);
result.put(Constants.STATUS, Constants.SUCCESS);
} catch (Exception e) {
try {
Files.deleteIfExists(new File(tmxFile).toPath());
} catch (IOException e1) {
// do nothing
}
logger.log(Level.SEVERE, e.getMessage(), e);
result.put(Constants.STATUS, Constants.ERROR);
result.put(Constants.REASON, e.getMessage());
Expand Down Expand Up @@ -1822,6 +1827,11 @@ public JSONObject convertExcel(String excelFile, String tmxFile, String sheetNam
}
result.put(Constants.STATUS, Constants.SUCCESS);
} catch (IOException | SAXException | ParserConfigurationException e) {
try {
Files.deleteIfExists(new File(tmxFile).toPath());
} catch (IOException e1) {
// do nothing
}
logger.log(Level.SEVERE, e.getMessage(), e);
result.put(Constants.STATUS, Constants.ERROR);
result.put(Constants.REASON, e.getMessage());
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/excel/ExcelReader.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/excel/ExcelWriter.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/excel/Sheet.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/models/Language.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/models/TUnit.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/CountStore.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/H2Store.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/LanguagesStore.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/MergeStore.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/Pair.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/SimpleStore.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/SplitStore.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/StoreInterface.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/TMXCleaner.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/TMXContentHandler.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/TMXConverter.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/TMXCopyHandler.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/TMXReader.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/TMXResolver.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/tmx/TmxUtils.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/utils/LangUtils.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/com/maxprograms/tmxserver/utils/TextUtils.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion src/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
Binary file modified tmxeditor.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion ts/about.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion ts/addLanguage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion ts/addNote.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
2 changes: 1 addition & 1 deletion ts/addProperty.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018-2021 Maxprograms.
* Copyright (c) 2018-2022 Maxprograms.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 1.0
Expand Down
Loading

0 comments on commit 0c4d716

Please sign in to comment.