Swordfish | Eclipse Public License 1.0 | @@ -33,6 +33,10 @@H2 | Eclipse Public License 1.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SQLite | +Public Domain | +||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JSON | JSON.org | diff --git a/jars/openxliff.jar b/jars/openxliff.jar index 981dceb..c6182ed 100644 Binary files a/jars/openxliff.jar and b/jars/openxliff.jar differ diff --git a/jars/sqlite-jdbc-3.43.0.0.jar b/jars/sqlite-jdbc-3.43.0.0.jar new file mode 100644 index 0000000..3db85a4 Binary files /dev/null and b/jars/sqlite-jdbc-3.43.0.0.jar differ diff --git a/jars/xmljava.jar b/jars/xmljava.jar index f1c5bcc..45cd5a6 100644 Binary files a/jars/xmljava.jar and b/jars/xmljava.jar differ diff --git a/package.json b/package.json index c2e2bf2..a040ce7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "swordfish", "productName": "Swordfish", - "version": "4.30.0", + "version": "5.0.0", "description": "Swordfish Translation Editor", "main": "js/Swordfish.js", "scripts": { @@ -20,11 +20,11 @@ "url": "https://github.com/rmraya/Swordfish.git" }, "devDependencies": { - "electron": "^28.2.0", + "electron": "^29.0.1", "typescript": "^5.3.3" }, "dependencies": { - "mtengines": "^1.3.0", + "mtengines": "^1.3.2", "typesbcp47": "^1.2.0", "typesxml": "^1.2.1" } diff --git a/src/com/maxprograms/swordfish/Constants.java b/src/com/maxprograms/swordfish/Constants.java index f1ee9e6..afb2279 100644 --- a/src/com/maxprograms/swordfish/Constants.java +++ b/src/com/maxprograms/swordfish/Constants.java @@ -19,8 +19,8 @@ private Constants() { } public static final String APPNAME = "Swordfish"; - public static final String VERSION = "4.30.0"; - public static final String BUILD = "20240126_0948"; + public static final String VERSION = "5.0.0"; + public static final String BUILD = "20240224_1556"; public static final String REASON = "reason"; public static final String STATUS = "status"; diff --git a/src/com/maxprograms/swordfish/DbUpgrade.java b/src/com/maxprograms/swordfish/DbUpgrade.java new file mode 100644 index 0000000..42203c3 --- /dev/null +++ b/src/com/maxprograms/swordfish/DbUpgrade.java @@ -0,0 +1,312 @@ +/******************************************************************************* + * Copyright (c) 2007 - 2024 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.swordfish; + +import java.io.File; +import java.io.IOException; +import java.io.Reader; +import java.lang.System.Logger; +import java.nio.file.Files; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.text.MessageFormat; + +public class DbUpgrade { + + static Logger logger = System.getLogger(DbUpgrade.class.getName()); + + private DbUpgrade() { + // private constructor to prevent instantiation + } + + public static void main(String[] args) { + boolean upgradeMemory = false; + boolean upgradeProject = false; + String folder = ""; + for (String arg : args) { + if (arg.equals("-memory")) { + upgradeMemory = true; + continue; + } + if (arg.equals("-project")) { + upgradeProject = true; + continue; + } + if (!folder.isEmpty()) { + folder += " "; + } + folder += arg; + } + if (folder.isEmpty()) { + logger.log(Logger.Level.ERROR, Messages.getString("DbUpgrade.0")); + return; + } + if (upgradeProject) { + try { + upgradeProject(new File(folder)); + } catch (IOException | SQLException e) { + logger.log(Logger.Level.ERROR, e); + } + } + if (upgradeMemory) { + try { + upgradeMemory(new File(folder)); + } catch (IOException | SQLException e) { + logger.log(Logger.Level.ERROR, e); + } + } + } + + public static void upgradeProject(File projectFolder) throws IOException, SQLException { + MessageFormat mf = new MessageFormat(Messages.getString("DbUpgrade.1")); + logger.log(Logger.Level.INFO, mf.format(new String[] { projectFolder.getName() })); + File sqliteFolder = new File(projectFolder, "sqlite"); + if (!sqliteFolder.exists()) { + Files.createDirectories(sqliteFolder.toPath()); + } + File newDB = new File(sqliteFolder, "database.db"); + File h2Folder = new File(projectFolder, "h2data"); + try (Connection newConn = DriverManager + .getConnection("jdbc:sqlite:" + newDB.getAbsolutePath().replace('\\', '/'))) { + newConn.setAutoCommit(false); + createTables(newConn); + String url = "jdbc:h2:" + h2Folder.getAbsolutePath() + "/db"; + try (Connection oldConn = DriverManager.getConnection(url)) { + migrateFiles(oldConn, newConn); + migrateSegments(oldConn, newConn); + } + } + File backup = new File(projectFolder, "h2db"); + Files.move(h2Folder.toPath(), backup.toPath()); + } + + private static void migrateSegments(Connection oldConn, Connection newConn) throws SQLException, IOException { + String selectSql = "SELECT file, unitId, segId, type, state, child, translate, tags, space, source, sourceText, target, targetText, words, idx FROM segments"; + String insertSql = "INSERT INTO segments (file, unitId, segId, type, state, child, translate, tags, space, source, sourceText, target, targetText, words, idx) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; + int count = 0; + try (PreparedStatement newPstmt = newConn.prepareStatement(insertSql)) { + try (Statement stmt = oldConn.createStatement()) { + try (ResultSet rs = stmt.executeQuery(selectSql)) { + while (rs.next()) { + String file = rs.getString(1); + String unitId = rs.getString(2); + String segId = rs.getString(3); + String type = rs.getString(4); + String state = rs.getString(5); + int child = rs.getInt(6); + String translate = rs.getString(7); + int tags = rs.getInt(8); + String space = rs.getString(9); + String source = getString(rs.getNCharacterStream(10)); + String sourceText = getString(rs.getNCharacterStream(11)); + String target = getString(rs.getNCharacterStream(12)); + String targetText = getString(rs.getNCharacterStream(13)); + int words = rs.getInt(14); + int idx = rs.getInt(15); + newPstmt.setString(1, file); + newPstmt.setString(2, unitId); + newPstmt.setString(3, segId); + newPstmt.setString(4, type); + newPstmt.setString(5, state); + newPstmt.setInt(6, child); + newPstmt.setString(7, translate); + newPstmt.setInt(8, tags); + newPstmt.setString(9, space); + newPstmt.setString(10, source); + newPstmt.setString(11, sourceText); + newPstmt.setString(12, target); + newPstmt.setString(13, targetText); + newPstmt.setInt(14, words); + newPstmt.setInt(15, idx); + newPstmt.execute(); + if (count++ % 1000 == 0) { + newConn.commit(); + } + } + } + } + } + newConn.commit(); + } + + private static void migrateFiles(Connection oldConn, Connection newConn) throws SQLException, IOException { + String selectSql = "SELECT id, name FROM files"; + String insertSql = "INSERT INTO files (id, name) VALUES (?,?)"; + try (PreparedStatement newPstmt = newConn.prepareStatement(insertSql)) { + try (Statement stmt = oldConn.createStatement()) { + try (ResultSet rs = stmt.executeQuery(selectSql)) { + while (rs.next()) { + String id = rs.getString(1); + String name = getString(rs.getNCharacterStream(2)); + newPstmt.setString(1, id); + newPstmt.setString(2, name); + newPstmt.execute(); + } + } + } + } + newConn.commit(); + } + + private static void createTables(Connection newConn) throws SQLException { + String files = """ + CREATE TABLE files ( + id VARCHAR(50) NOT NULL, + name VARCHAR(350) NOT NULL, + PRIMARY KEY(id, name) + );"""; + String units = """ + CREATE TABLE units ( + file VARCHAR(50), + unitId VARCHAR(256) NOT NULL, + data TEXT NOT NULL, + compressed CHAR(1) NOT NULL DEFAULT 'N', + PRIMARY KEY(file, unitId) + );"""; + String segments = """ + CREATE TABLE segments ( + file VARCHAR(50), + unitId VARCHAR(256) NOT NULL, + segId VARCHAR(256) NOT NULL, + type CHAR(1) NOT NULL DEFAULT 'S', + state VARCHAR(12) DEFAULT 'initial', + child INTEGER, + translate CHAR(1), + tags INTEGER DEFAULT 0, + space CHAR(1) DEFAULT 'N', + source TEXT NOT NULL, + sourceText TEXT NOT NULL, + target TEXT NOT NULL, + targetText TEXT NOT NULL, + words INTEGER NOT NULL DEFAULT 0, + idx INTEGER, + PRIMARY KEY(file, unitId, segId, type) + );"""; + String matches = """ + CREATE TABLE matches ( + file VARCHAR(50), + unitId VARCHAR(256) NOT NULL, + segId VARCHAR(256) NOT NULL, + matchId varchar(256), + origin VARCHAR(256), + type CHAR(2) NOT NULL DEFAULT 'tm', + similarity INTEGER DEFAULT 0, + source TEXT NOT NULL, + target TEXT NOT NULL, + data TEXT NOT NULL, + compressed CHAR(1) NOT NULL DEFAULT 'N', + PRIMARY KEY(file, unitId, segId, matchid) + );"""; + String terms = """ + CREATE TABLE terms ( + file VARCHAR(50), + unitId VARCHAR(256) NOT NULL, + segId VARCHAR(256) NOT NULL, + termid varchar(256), + origin VARCHAR(256), + source TEXT NOT NULL, + target TEXT NOT NULL, + PRIMARY KEY(file, unitId, segId, termid) + );"""; + String notes = """ + CREATE TABLE notes ( + file VARCHAR(50), + unitId VARCHAR(256) NOT NULL, + segId VARCHAR(256) NOT NULL, + noteid varchar(256) NOT NULL, + note TEXT NOT NULL, + PRIMARY KEY(file, unitId, segId, noteid) + );"""; + try (Statement create = newConn.createStatement()) { + create.execute(files); + create.execute(units); + create.execute(segments); + create.execute(matches); + create.execute(terms); + create.execute(notes); + } + newConn.commit(); + } + + public static void upgradeMemory(File databaseFolder) throws SQLException, IOException { + MessageFormat mf = new MessageFormat(Messages.getString("DbUpgrade.2")); + logger.log(Logger.Level.INFO, mf.format(new String[] { databaseFolder.getName() })); + DriverManager.registerDriver(new org.sqlite.JDBC()); + File newDB = new File(databaseFolder, "database.db"); + try (Connection newConn = DriverManager + .getConnection("jdbc:sqlite:" + newDB.getAbsolutePath().replace('\\', '/'))) { + newConn.setAutoCommit(false); + String sql = """ + CREATE TABLE tuv ( + tuid VARCHAR(256) NOT NULL, + lang VARCHAR(15) NOT NULL, + seg TEXT NOT NULL, + puretext TEXT NOT NULL, + textlength INTEGER NOT NULL, + PRIMARY KEY(tuid, lang) + );"""; + try (Statement stmt = newConn.createStatement()) { + stmt.execute(sql); + } + newConn.commit(); + + String url = "jdbc:h2:" + databaseFolder.getAbsolutePath() + "/db"; + try (Connection oldConn = DriverManager.getConnection(url)) { + String selectSql = "SELECT tuid, lang, seg, puretext, textlength FROM tuv"; + String insertSql = "INSERT INTO tuv (tuid, lang, seg, puretext, textlength) VALUES (?,?,?,?,?)"; + int count = 0; + try (PreparedStatement newPstmt = newConn.prepareStatement(insertSql)) { + try (Statement stmt = oldConn.createStatement()) { + try (ResultSet rs = stmt.executeQuery(selectSql)) { + while (rs.next()) { + String tuid = rs.getString(1); + String lang = rs.getString(2); + String seg = getString(rs.getNCharacterStream(3)); + String puretext = getString(rs.getNCharacterStream(4)); + int textlength = rs.getInt(5); + newPstmt.setString(1, tuid); + newPstmt.setString(2, lang); + newPstmt.setString(3, seg); + newPstmt.setString(4, puretext); + newPstmt.setInt(5, textlength); + newPstmt.execute(); + if (count++ % 1000 == 0) { + newConn.commit(); + } + } + } + } + } + } + newConn.commit(); + } + File oldDb = new File(databaseFolder, "db.mv.db"); + File backup = new File(databaseFolder, "h2db.db"); + Files.move(oldDb.toPath(), backup.toPath()); + } + + public static String getString(Reader reader) throws IOException { + StringBuilder sb = new StringBuilder(); + char[] array = new char[1024]; + int read = 0; + while ((read = reader.read(array)) != -1) { + sb.append(array, 0, read); + } + reader.close(); + return sb.toString(); + } +} diff --git a/src/com/maxprograms/swordfish/GlossariesHandler.java b/src/com/maxprograms/swordfish/GlossariesHandler.java index c9b810c..01f270f 100644 --- a/src/com/maxprograms/swordfish/GlossariesHandler.java +++ b/src/com/maxprograms/swordfish/GlossariesHandler.java @@ -26,6 +26,7 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.sql.SQLException; +import java.text.MessageFormat; import java.util.Collections; import java.util.Hashtable; import java.util.Iterator; @@ -47,8 +48,8 @@ import com.maxprograms.swordfish.models.Memory; import com.maxprograms.swordfish.tbx.Tbx2Tmx; import com.maxprograms.swordfish.tm.ITmEngine; -import com.maxprograms.swordfish.tm.InternalDatabase; import com.maxprograms.swordfish.tm.RemoteDatabase; +import com.maxprograms.swordfish.tm.SqliteDatabase; import com.maxprograms.xml.Element; import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; @@ -59,7 +60,7 @@ public class GlossariesHandler implements HttpHandler { private static Map
# | Document | New | 100% | 95% - 99% | 85% - 95% | 75% - 84% | 50% - 84% | Int. Rep. | Ext. Rep. | Total |
---|---|---|---|---|---|---|---|---|---|---|
" + count++ + " | "); - writeString(out, "" + XMLUtils.cleanText(fileName) + " | "); - writeString(out, "" + newSegments + " | "); - writeString(out, "" + segments100 + " | "); - writeString(out, "" + segments95 + " | "); - writeString(out, "" + segments85 + " | "); - writeString(out, "" + segments75 + " | "); - writeString(out, "" + segments50 + " | "); - writeString(out, "" + intRep + " | "); - writeString(out, "" + extRep + " | "); - writeString(out, "" - + (newSegments + segments100 + segments95 + segments85 + segments75 + segments50 + intRep - + extRep) - + " | "); - writeString(out, "
"); - writeString(out, " | Total | "); - writeString(out, "" + projectNew + " | "); - writeString(out, "" + project100 + " | "); - writeString(out, "" + project95 + " | "); - writeString(out, "" + project85 + " | "); - writeString(out, "" + project75 + " | "); - writeString(out, "" + project50 + " | "); - writeString(out, "" + projectIntRep + " | "); - writeString(out, "" + projectExtRep + " | "); - writeString(out, "" - + (projectNew + project100 + project95 + project85 + project75 + project50 + projectIntRep - + projectExtRep) - + " | "); - writeString(out, "
# | Document | New | 100% | 95% - 99% | 85% - 95% | 75% - 84% | 50% - 84% | Int. Rep. | Ext. Rep. | Tags | Total |
---|---|---|---|---|---|---|---|---|---|---|---|
" + count++ + " | "); - writeString(out, "" + XMLUtils.cleanText(fileName) + " | "); - writeString(out, "" + newSegments + " | "); - writeString(out, "" + segments100 + " | "); - writeString(out, "" + segments95 + " | "); - writeString(out, "" + segments85 + " | "); - writeString(out, "" + segments75 + " | "); - writeString(out, "" + segments50 + " | "); - writeString(out, "" + intRep + " | "); - writeString(out, "" + extRep + " | "); - writeString(out, "" + tags + " | "); - writeString(out, "" - + (newSegments + segments100 + segments95 + segments85 + segments75 + segments50 + intRep - + extRep) - + " | "); - writeString(out, "
"); - writeString(out, " | Total | "); - writeString(out, "" + projectNew + " | "); - writeString(out, "" + project100 + " | "); - writeString(out, "" + project95 + " | "); - writeString(out, "" + project85 + " | "); - writeString(out, "" + project75 + " | "); - writeString(out, "" + project50 + " | "); - writeString(out, "" + projectIntRep + " | "); - writeString(out, "" + projectExtRep + " | "); - writeString(out, "" + projectTags + " | "); - writeString(out, "" - + (projectNew + project100 + project95 + project85 + project75 + project50 + projectIntRep - + projectExtRep) - + " | "); - writeString(out, "
Int. Rep.: Internal Repetition - Segment repetitions within one document
");
- writeString(out, "Ext. Rep.: External Repetition - Segment repetitions between all documents
# | Document | Not Translated | Translated | Not Confirmed | Confirmed | Total |
---|---|---|---|---|---|---|
" + count++ + " | "); - writeString(out, "" + XMLUtils.cleanText(fileName) + " | "); - writeString(out, "" + fileUntranslated + " | "); - writeString(out, "" + fileTranslated + " | "); - writeString(out, "" + (fileSegments - fileConfirmed) + " | "); - writeString(out, "" + fileConfirmed + " | "); - writeString(out, "" + fileSegments + " | "); - writeString(out, "
"); - writeString(out, " | Total | "); - writeString(out, "" + projectUntranslatedSegments + " | "); - writeString(out, "" + projectTranslatedSegments + " | "); - writeString(out, "" + (projectSegments - projectConfirmedSegments) + " | "); - writeString(out, "" + projectConfirmedSegments + " | "); - writeString(out, "" + projectSegments + " | "); - writeString(out, "
# | Document | Not Translated | Translated | Not Confirmed | Confirmed | Total |
---|---|---|---|---|---|---|
" + count++ + " | "); - writeString(out, "" + XMLUtils.cleanText(fileName) + " | "); - writeString(out, "" + fileUntranslated + " | "); - writeString(out, "" + fileTranslated + " | "); - writeString(out, "" + (fileWords - fileConfirmed) + " | "); - writeString(out, "" + fileConfirmed + " | "); - writeString(out, "" + fileWords + " | "); - writeString(out, "
"); - writeString(out, " | Total | "); - writeString(out, "" + projectUntranslated + " | "); - writeString(out, "" + projectTranslated + " | "); - writeString(out, "" + (projectWords - projectConfirmed) + " | "); - writeString(out, "" + projectConfirmed + " | "); - writeString(out, "" + projectWords + " | "); - writeString(out, "
# | \n"); - writeString(out, "" + LanguageUtils.getLanguage(srcLang).toString() + " | \n"); - writeString(out, "" + SVG_BLANK + " | \n"); - writeString(out, "" + LanguageUtils.getLanguage(tgtLang).toString() + " | \n"); - writeString(out, "
---|---|---|---|
" + count++ + " | \n"); - writeString(out, - "" - + XliffUtils.highlightSpaces( - removeSvg(addHtmlTags(source, "", false, false, tagsData, segPreserve))) - + " | \n"); - writeString(out, "" + box + " | \n"); - writeString(out, - "" - + XliffUtils.highlightSpaces( - removeSvg(addHtmlTags(target, "", false, false, tagsData, segPreserve))) - + " | \n"); - writeString(out, "
# | " + Messages.getString("XliffStore.8") + " | " + + Messages.getString("XliffStore.9") + + " | 100% | 95% - 99% | 85% - 95% | 75% - 84% | 50% - 84% | " + + Messages.getString("XliffStore.10") + " | " + Messages.getString("XliffStore.11") + + " | " + Messages.getString("XliffStore.12") + " |
---|---|---|---|---|---|---|---|---|---|---|
" + count++ + " | "); + writeString(out, "" + XMLUtils.cleanText(fileName) + " | "); + writeString(out, "" + newSegments + " | "); + writeString(out, "" + segments100 + " | "); + writeString(out, "" + segments95 + " | "); + writeString(out, "" + segments85 + " | "); + writeString(out, "" + segments75 + " | "); + writeString(out, "" + segments50 + " | "); + writeString(out, "" + intRep + " | "); + writeString(out, "" + extRep + " | "); + writeString(out, "" + (newSegments + segments100 + segments95 + segments85 + + segments75 + segments50 + intRep + extRep) + " | "); + writeString(out, "
"); + writeString(out, " | " + Messages.getString("XliffStore.12") + " | "); + writeString(out, "" + projectNew + " | "); + writeString(out, "" + project100 + " | "); + writeString(out, "" + project95 + " | "); + writeString(out, "" + project85 + " | "); + writeString(out, "" + project75 + " | "); + writeString(out, "" + project50 + " | "); + writeString(out, "" + projectIntRep + " | "); + writeString(out, "" + projectExtRep + " | "); + writeString(out, "" + (projectNew + project100 + project95 + project85 + project75 + + project50 + projectIntRep + projectExtRep) + " | "); + writeString(out, "
# | " + Messages.getString("XliffStore.8") + " | " + + Messages.getString("XliffStore.9") + + " | 100% | 95% - 99% | 85% - 95% | 75% - 84% | 50% - 84% | " + + "Int. Rep." + " | " + Messages.getString("XliffStore.16") + " | " + + Messages.getString("XliffStore.17") + " | " + Messages.getString("XliffStore.12") + + " |
---|---|---|---|---|---|---|---|---|---|---|---|
" + count++ + " | "); + writeString(out, "" + XMLUtils.cleanText(fileName) + " | "); + writeString(out, "" + newSegments + " | "); + writeString(out, "" + segments100 + " | "); + writeString(out, "" + segments95 + " | "); + writeString(out, "" + segments85 + " | "); + writeString(out, "" + segments75 + " | "); + writeString(out, "" + segments50 + " | "); + writeString(out, "" + intRep + " | "); + writeString(out, "" + extRep + " | "); + writeString(out, "" + tags + " | "); + writeString(out, "" + (newSegments + segments100 + segments95 + segments85 + + segments75 + segments50 + intRep + extRep) + " | "); + writeString(out, "
"); + writeString(out, " | " + Messages.getString("XliffStore.12") + " | "); + writeString(out, "" + projectNew + " | "); + writeString(out, "" + project100 + " | "); + writeString(out, "" + project95 + " | "); + writeString(out, "" + project85 + " | "); + writeString(out, "" + project75 + " | "); + writeString(out, "" + project50 + " | "); + writeString(out, "" + projectIntRep + " | "); + writeString(out, "" + projectExtRep + " | "); + writeString(out, "" + projectTags + " | "); + writeString(out, "" + (projectNew + project100 + project95 + project85 + project75 + + project50 + projectIntRep + projectExtRep) + " | "); + writeString(out, "
" + Messages.getString("XliffStore.18") + " " + Messages.getString("XliffStore.19")
+ + "
" + Messages.getString("XliffStore.20") + " "
+ + Messages.getString("XliffStore.21")
+ + "
# | " + Messages.getString("XliffStore.8") + " | " + + Messages.getString("XliffStore.25") + " | " + Messages.getString("XliffStore.26") + + " | " + Messages.getString("XliffStore.27") + " | " + + Messages.getString("XliffStore.28") + " | " + Messages.getString("XliffStore.12") + + " |
---|---|---|---|---|---|---|
" + count++ + " | "); + writeString(out, "" + XMLUtils.cleanText(fileName) + " | "); + writeString(out, "" + fileUntranslated + " | "); + writeString(out, "" + fileTranslated + " | "); + writeString(out, "" + (fileSegments - fileConfirmed) + " | "); + writeString(out, "" + fileConfirmed + " | "); + writeString(out, "" + fileSegments + " | "); + writeString(out, "
"); + writeString(out, " | Total | "); + writeString(out, "" + projectUntranslatedSegments + " | "); + writeString(out, "" + projectTranslatedSegments + " | "); + writeString(out, "" + (projectSegments - projectConfirmedSegments) + " | "); + writeString(out, "" + projectConfirmedSegments + " | "); + writeString(out, "" + projectSegments + " | "); + writeString(out, "
# | " + Messages.getString("XliffStore.8") + " | " + + Messages.getString("XliffStore.25") + " | " + Messages.getString("XliffStore.26") + + " | " + Messages.getString("XliffStore.27") + " | " + + Messages.getString("XliffStore.28") + " | " + Messages.getString("XliffStore.12") + + " |
---|---|---|---|---|---|---|
" + count++ + " | "); + writeString(out, "" + XMLUtils.cleanText(fileName) + " | "); + writeString(out, "" + fileUntranslated + " | "); + writeString(out, "" + fileTranslated + " | "); + writeString(out, "" + (fileWords - fileConfirmed) + " | "); + writeString(out, "" + fileConfirmed + " | "); + writeString(out, "" + fileWords + " | "); + writeString(out, "
"); + writeString(out, " | Total | "); + writeString(out, "" + projectUntranslated + " | "); + writeString(out, "" + projectTranslated + " | "); + writeString(out, "" + (projectWords - projectConfirmed) + " | "); + writeString(out, "" + projectConfirmed + " | "); + writeString(out, "" + projectWords + " | "); + writeString(out, "
# | \n"); + writeString(out, "" + LanguageUtils.getLanguage(srcLang).toString() + " | \n"); + writeString(out, "" + SVG_BLANK + " | \n"); + writeString(out, "" + LanguageUtils.getLanguage(tgtLang).toString() + " | \n"); + writeString(out, "
---|---|---|---|
" + count++ + " | \n"); + writeString(out, + "" + + XliffUtils.highlightSpaces( + removeSvg(addHtmlTags(source, "", false, false, tagsData, segPreserve))) + + " | \n"); + writeString(out, "" + box + " | \n"); + writeString(out, + "" + + XliffUtils.highlightSpaces( + removeSvg(addHtmlTags(target, "", false, false, tagsData, segPreserve))) + + " | \n"); + writeString(out, "