提交 2c2b7c23 authored 作者: Thomas Mueller's avatar Thomas Mueller

Detect changes in messages again.

上级 6688cdb1
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
.translator=Thomas Mueller .translator=Thomas Mueller
02000=No data is available 02000=No data is available
07001=Invalid parameter count for {0}, expected count\: {1} 07001=Invalid parameter count for {0}, expected count: {1}
08000=Error opening database\: {0} 08000=Error opening database: {0}
08004=Wrong user name or password 08004=Wrong user name or password
21S02=Column count does not match 21S02=Column count does not match
22003=Numeric value out of range 22003=Numeric value out of range
22012=Division by zero\: {0} 22012=Division by zero: {0}
22025=Error in LIKE ESCAPE\: {0} 22025=Error in LIKE ESCAPE: {0}
23000=Check constraint violation\: {0} 23000=Check constraint violation: {0}
23001=Unique index or primary key violation\: {0} 23001=Unique index or primary key violation: {0}
23002=Referential integrity constraint violation\: {0} 23002=Referential integrity constraint violation: {0}
23003=Referential integrity constraint violation\: {0} 23003=Referential integrity constraint violation: {0}
40001=Deadlock detected. The current transaction was rolled back. Details\: {0} 40001=Deadlock detected. The current transaction was rolled back. Details: {0}
42000=Syntax error in SQL statement {0} 42000=Syntax error in SQL statement {0}
42001=Syntax error in SQL statement {0}; expected {1} 42001=Syntax error in SQL statement {0}; expected {1}
42S01=Table {0} already exists 42S01=Table {0} already exists
...@@ -24,15 +24,15 @@ ...@@ -24,15 +24,15 @@
90000=Function {0} must return a result set 90000=Function {0} must return a result set
90001=Method is not allowed for a query. Use execute or executeQuery instead of executeUpdate 90001=Method is not allowed for a query. Use execute or executeQuery instead of executeUpdate
90002=Method is only allowed for a query. Use execute or executeUpdate instead of executeQuery 90002=Method is only allowed for a query. Use execute or executeUpdate instead of executeQuery
90003=Hexadecimal string with odd number of characters\: {0} 90003=Hexadecimal string with odd number of characters: {0}
90004=Hexadecimal string contains non-hex character\: {0} 90004=Hexadecimal string contains non-hex character: {0}
90005=Value too long for column {0}\: {1} 90005=Value too long for column {0}: {1}
90006=NULL not allowed for column {0} 90006=NULL not allowed for column {0}
90007=The object is already closed 90007=The object is already closed
90008=Invalid value {0} for parameter {1} 90008=Invalid value {0} for parameter {1}
90009=Cannot parse date constant {0}, cause\: {1} 90009=Cannot parse date constant {0}, cause: {1}
90010=Cannot parse time constant {0}, cause\: {1} 90010=Cannot parse time constant {0}, cause: {1}
90011=Cannot parse timestamp constant {0}, cause\: {1} 90011=Cannot parse timestamp constant {0}, cause: {1}
90012=Parameter {0} is not set 90012=Parameter {0} is not set
90013=Database {0} not found 90013=Database {0} not found
90014=Error parsing {0} 90014=Error parsing {0}
...@@ -41,21 +41,21 @@ ...@@ -41,21 +41,21 @@
90017=Attempt to define a second primary key 90017=Attempt to define a second primary key
90018=The connection was not closed by the application and is garbage collected 90018=The connection was not closed by the application and is garbage collected
90019=Cannot drop the current user 90019=Cannot drop the current user
90020=Database may be already in use\: {0}. Possible solutions\: close all other connection(s); use the server mode 90020=Database may be already in use: {0}. Possible solutions: close all other connection(s); use the server mode
90021=Data conversion error converting {0} 90021=Data conversion error converting {0}
90022=Function {0} not found 90022=Function {0} not found
90023=Column {0} must not be nullable 90023=Column {0} must not be nullable
90024=Error while renaming file {0} to {1} 90024=Error while renaming file {0} to {1}
90025=Cannot delete file {0} 90025=Cannot delete file {0}
90026=Serialization failed, cause\: {0} 90026=Serialization failed, cause: {0}
90027=Deserialization failed, cause\: {0} 90027=Deserialization failed, cause: {0}
90028=IO Exception\: {0} 90028=IO Exception: {0}
90029=Currently not on an updatable row 90029=Currently not on an updatable row
90030=File corrupted while reading record\: {0}. Possible solution\: use the recovery tool 90030=File corrupted while reading record: {0}. Possible solution: use the recovery tool
90031=IO Exception\: {0}; {1} 90031=IO Exception: {0}; {1}
90032=User {0} not found 90032=User {0} not found
90033=User {0} already exists 90033=User {0} already exists
90034=Log file error\: {0}, cause\: {1} 90034=Log file error: {0}, cause: {1}
90035=Sequence {0} already exists 90035=Sequence {0} already exists
90036=Sequence {0} not found 90036=Sequence {0} not found
90037=View {0} not found 90037=View {0} not found
...@@ -64,14 +64,14 @@ ...@@ -64,14 +64,14 @@
90040=Admin rights are required for this operation 90040=Admin rights are required for this operation
90041=Trigger {0} already exists 90041=Trigger {0} already exists
90042=Trigger {0} not found 90042=Trigger {0} not found
90043=Error creating or initializing trigger {0} object, class {1}, cause\: {2}; see root cause for details 90043=Error creating or initializing trigger {0} object, class {1}, cause: {2}; see root cause for details
90044=Error executing trigger {0}, class {1}, cause \: {2}; see root cause for details 90044=Error executing trigger {0}, class {1}, cause : {2}; see root cause for details
90045=Constraint {0} already exists 90045=Constraint {0} already exists
90046=URL format error; must be {0} but is {1} 90046=URL format error; must be {0} but is {1}
90047=Version mismatch, driver version is {0} but server version is {1} 90047=Version mismatch, driver version is {0} but server version is {1}
90048=Unsupported database file version or invalid file header in file {0} 90048=Unsupported database file version or invalid file header in file {0}
90049=Encryption error in file {0} 90049=Encryption error in file {0}
90050=Wrong password format, must be\: file password <space> user password 90050=Wrong password format, must be: file password <space> user password
90051=Statement was canceled or the session timed out 90051=Statement was canceled or the session timed out
90052=Subquery is not a single column query 90052=Subquery is not a single column query
90053=Scalar subquery contains more than one row 90053=Scalar subquery contains more than one row
...@@ -82,19 +82,19 @@ ...@@ -82,19 +82,19 @@
90058=Commit or rollback is not allowed within a trigger 90058=Commit or rollback is not allowed within a trigger
90059=Ambiguous column name {0} 90059=Ambiguous column name {0}
90060=Unsupported file lock method {0} 90060=Unsupported file lock method {0}
90061=Exception opening port {0} (port may be in use), cause\: {1} 90061=Exception opening port {0} (port may be in use), cause: {1}
90062=Error while creating file {0} 90062=Error while creating file {0}
90063=Savepoint is invalid\: {0} 90063=Savepoint is invalid: {0}
90064=Savepoint is unnamed 90064=Savepoint is unnamed
90065=Savepoint is named 90065=Savepoint is named
90066=Duplicate property {0} 90066=Duplicate property {0}
90067=Connection is broken\: {0} 90067=Connection is broken: {0}
90068=Order by expression {0} must be in the result list in this case 90068=Order by expression {0} must be in the result list in this case
90069=Role {0} already exists 90069=Role {0} already exists
90070=Role {0} not found 90070=Role {0} not found
90071=User or role {0} not found 90071=User or role {0} not found
90072=Roles and rights cannot be mixed 90072=Roles and rights cannot be mixed
90073=Matching Java methods must have different parameter counts\: {0} and {1} 90073=Matching Java methods must have different parameter counts: {0} and {1}
90074=Role {0} already granted 90074=Role {0} already granted
90075=Column is part of the index {0} 90075=Column is part of the index {0}
90076=Function alias {0} already exists 90076=Function alias {0} already exists
...@@ -110,29 +110,29 @@ ...@@ -110,29 +110,29 @@
90086=Class {0} not found 90086=Class {0} not found
90087=Method {0} not found 90087=Method {0} not found
90088=Unknown mode {0} 90088=Unknown mode {0}
90089=Collation cannot be changed because there is a data table\: {0} 90089=Collation cannot be changed because there is a data table: {0}
90090=Schema {0} cannot be dropped 90090=Schema {0} cannot be dropped
90091=Role {0} cannot be dropped 90091=Role {0} cannot be dropped
90092=This Java version is not supported (Java 1.4 is required) 90092=This Java version is not supported (Java 1.4 is required)
90093=Clustering error - database currently runs in standalone mode 90093=Clustering error - database currently runs in standalone mode
90094=Clustering error - database currently runs in cluster mode, server list\: {0} 90094=Clustering error - database currently runs in cluster mode, server list: {0}
90095=String format error\: {0} 90095=String format error: {0}
90096=Not enough rights for object {0} 90096=Not enough rights for object {0}
90097=The database is read only 90097=The database is read only
90098=The database has been closed 90098=The database has been closed
90099=Error setting database event listener {0}, cause\: {1} 90099=Error setting database event listener {0}, cause: {1}
90100=No disk space available 90100=No disk space available
90101=Wrong XID format\: {0} 90101=Wrong XID format: {0}
90102=Unsupported compression options\: {0} 90102=Unsupported compression options: {0}
90103=Unsupported compression algorithm\: {0} 90103=Unsupported compression algorithm: {0}
90104=Compression error 90104=Compression error
90105=Exception calling user-defined function 90105=Exception calling user-defined function
90106=Cannot truncate {0} 90106=Cannot truncate {0}
90107=Cannot drop {0} because {1} depends on it 90107=Cannot drop {0} because {1} depends on it
90108=Out of memory. 90108=Out of memory.
90109=View {0} is invalid\: {1} 90109=View {0} is invalid: {1}
90110={0} out of range 90110={0} out of range
90111=Error accessing linked table with SQL statement {0}, cause\: {1} 90111=Error accessing linked table with SQL statement {0}, cause: {1}
90112=Row not found when trying to delete from index {0} 90112=Row not found when trying to delete from index {0}
90113=Unsupported connection setting {0} 90113=Unsupported connection setting {0}
90114=Constant {0} already exists 90114=Constant {0} already exists
...@@ -142,27 +142,27 @@ ...@@ -142,27 +142,27 @@
90118=Cannot drop table {0} 90118=Cannot drop table {0}
90119=User data type {0} already exists 90119=User data type {0} already exists
90120=User data type {0} not found 90120=User data type {0} not found
90121=Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT\=FALSE" to the db URL) 90121=Database is already closed (to disable automatic closing at VM shutdown, add ";DB_CLOSE_ON_EXIT=FALSE" to the db URL)
90122=Operation not supported for table {0} when there are views on the table\: {1} 90122=Operation not supported for table {0} when there are views on the table: {1}
90123=Cannot mix indexed and non-indexed parameters 90123=Cannot mix indexed and non-indexed parameters
90124=File not found\: {0} 90124=File not found: {0}
90125=Invalid class, expected {0} but got {1} 90125=Invalid class, expected {0} but got {1}
90126=Database is not persistent 90126=Database is not persistent
90127=The result set is not updatable. The query must select all columns from a unique key. Only one table may be selected. 90127=The result set is not updatable. The query must select all columns from a unique key. Only one table may be selected.
90128=The result set is not scrollable and can not be reset. You may need to use conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ..). 90128=The result set is not scrollable and can not be reset. You may need to use conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ..).
90129=Transaction {0} not found 90129=Transaction {0} not found
90130=This method is not allowed for a prepared statement; use a regular statement instead. 90130=This method is not allowed for a prepared statement; use a regular statement instead.
90131=Concurrent update in table {0}\: another transaction has updated or deleted the same row 90131=Concurrent update in table {0}: another transaction has updated or deleted the same row
90132=Aggregate {0} not found 90132=Aggregate {0} not found
90133=Cannot change the setting {0} when the database is already open 90133=Cannot change the setting {0} when the database is already open
90134=Access to the class {0} is denied 90134=Access to the class {0} is denied
90135=The database is open in exclusive mode; can not open additional connections 90135=The database is open in exclusive mode; can not open additional connections
90136=Unsupported outer join condition\: {0} 90136=Unsupported outer join condition: {0}
90137=Can only assign to a variable, not to\: {0} 90137=Can only assign to a variable, not to: {0}
90138=Invalid database name\: {0} 90138=Invalid database name: {0}
90139=The public static Java method was not found\: {0} 90139=The public static Java method was not found: {0}
90140=The result set is readonly. You may need to use conn.createStatement(.., ResultSet.CONCUR_UPDATABLE). 90140=The result set is readonly. You may need to use conn.createStatement(.., ResultSet.CONCUR_UPDATABLE).
HY000=General error\: {0} HY000=General error: {0}
HY004=Unknown data type\: {0} HY004=Unknown data type: {0}
HYC00=Feature not supported\: {0} HYC00=Feature not supported: {0}
HYT00=Timeout trying to lock table {0} HYT00=Timeout trying to lock table {0}
...@@ -34,7 +34,7 @@ adminTranslateStart=Translate ...@@ -34,7 +34,7 @@ adminTranslateStart=Translate
helpAction=Action helpAction=Action
helpAddAnotherRow=Add another row helpAddAnotherRow=Add another row
helpAddDrivers=Adding Database Drivers helpAddDrivers=Adding Database Drivers
helpAddDriversText=Additional database drivers can be registered by adding the Jar file location of the driver to the the environment variables H2DRIVERS or CLASSPATH. Example (Windows)\: to add the database driver library C\:\\Programs\\hsqldb\\lib\\hsqldb.jar, set the environment variable H2DRIVERS to C\:\\Programs\\hsqldb\\lib\\hsqldb.jar. helpAddDriversText=Additional database drivers can be registered by adding the Jar file location of the driver to the the environment variables H2DRIVERS or CLASSPATH. Example (Windows): to add the database driver library C:/Programs/hsqldb/lib/hsqldb.jar, set the environment variable H2DRIVERS to C:/Programs/hsqldb/lib/hsqldb.jar.
helpAddRow=Add a new row helpAddRow=Add a new row
helpCommandHistory=Shows the Command History helpCommandHistory=Shows the Command History
helpCreateTable=Create a new table helpCreateTable=Create a new table
......
...@@ -48,6 +48,8 @@ public class PrepareTranslation { ...@@ -48,6 +48,8 @@ public class PrepareTranslation {
private void run() throws Exception { private void run() throws Exception {
String baseDir = "src/docsrc/textbase"; String baseDir = "src/docsrc/textbase";
prepare(baseDir, "src/main/org/h2/res", true);
prepare(baseDir, "src/main/org/h2/server/web/res", true);
// convert the txt files to properties files // convert the txt files to properties files
PropertiesToUTF8.textUTF8ToProperties("src/docsrc/text/_docs_de.utf8.txt", PropertiesToUTF8.textUTF8ToProperties("src/docsrc/text/_docs_de.utf8.txt",
...@@ -59,7 +61,7 @@ public class PrepareTranslation { ...@@ -59,7 +61,7 @@ public class PrepareTranslation {
extractFromHtml("docs/html", "src/docsrc/text"); extractFromHtml("docs/html", "src/docsrc/text");
// add missing translations and create a new baseline // add missing translations and create a new baseline
prepare(baseDir, "src/docsrc/text"); prepare(baseDir, "src/docsrc/text", false);
// create the translated documentation // create the translated documentation
buildHtml("src/docsrc/text", "docs/html", "en"); buildHtml("src/docsrc/text", "docs/html", "en");
...@@ -88,12 +90,12 @@ public class PrepareTranslation { ...@@ -88,12 +90,12 @@ public class PrepareTranslation {
new File(targetDir).mkdirs(); new File(targetDir).mkdirs();
// load the main 'translation' // load the main 'translation'
String propName = templateDir + "/_docs_" + MAIN_LANGUAGE + ".properties"; String propName = templateDir + "/_docs_" + MAIN_LANGUAGE + ".properties";
Properties prop = SortedProperties.loadProperties(propName); Properties prop = load(propName, false);
propName = templateDir + "/_docs_" + language + ".properties"; propName = templateDir + "/_docs_" + language + ".properties";
if (!(new File(propName)).exists()) { if (!(new File(propName)).exists()) {
throw new IOException("Translation not found: " + propName); throw new IOException("Translation not found: " + propName);
} }
Properties transProp = SortedProperties.loadProperties(propName); Properties transProp = load(propName, false);
for (Object k : transProp.keySet()) { for (Object k : transProp.keySet()) {
String key = (String) k; String key = (String) k;
String t = transProp.getProperty(key); String t = transProp.getProperty(key);
...@@ -345,9 +347,9 @@ public class PrepareTranslation { ...@@ -345,9 +347,9 @@ public class PrepareTranslation {
} }
new File(target).mkdirs(); new File(target).mkdirs();
String propFileName = target + "/_docs_" + MAIN_LANGUAGE + ".properties"; String propFileName = target + "/_docs_" + MAIN_LANGUAGE + ".properties";
Properties old = SortedProperties.loadProperties(propFileName); Properties old = load(propFileName, false);
prop.putAll(old); prop.putAll(old);
prop.store(propFileName); store(prop, propFileName, false);
String t = template.toString(); String t = template.toString();
if (templateIsCopy && !t.equals(xml)) { if (templateIsCopy && !t.equals(xml)) {
for (int i = 0; i < Math.min(t.length(), xml.length()); i++) { for (int i = 0; i < Math.min(t.length(), xml.length()); i++) {
...@@ -388,32 +390,52 @@ public class PrepareTranslation { ...@@ -388,32 +390,52 @@ public class PrepareTranslation {
prop.setProperty(document, s); prop.setProperty(document, s);
} }
private void prepare(String baseDir, String path) throws IOException { private void prepare(String baseDir, String path, boolean utf8) throws IOException {
String suffix = utf8 ? ".prop" : ".properties";
File dir = new File(path); File dir = new File(path);
File main = null; File main = null;
ArrayList<File> translations = new ArrayList<File>(); ArrayList<File> translations = new ArrayList<File>();
for (File f : dir.listFiles()) { for (File f : dir.listFiles()) {
if (f.getName().endsWith(".properties") && f.getName().indexOf('_') >= 0) { if (f.getName().endsWith(suffix) && f.getName().indexOf('_') >= 0) {
if (f.getName().endsWith("_" + MAIN_LANGUAGE + ".properties")) { if (f.getName().endsWith("_" + MAIN_LANGUAGE + suffix)) {
main = f; main = f;
} else { } else {
translations.add(f); translations.add(f);
} }
} }
} }
SortedProperties p = SortedProperties.loadProperties(main.getAbsolutePath()); SortedProperties p = load(main.getAbsolutePath(), utf8);
Properties base = SortedProperties.loadProperties(baseDir + "/" + main.getName()); Properties base = load(baseDir + "/" + main.getName(), utf8);
p.store(main.getAbsolutePath()); store(p, main.getAbsolutePath(), utf8);
for (File trans : translations) { for (File trans : translations) {
String language = trans.getName(); String language = trans.getName();
language = language.substring(language.lastIndexOf('_') + 1, language.lastIndexOf('.')); language = language.substring(language.lastIndexOf('_') + 1, language.lastIndexOf('.'));
prepare(p, base, trans); prepare(p, base, trans, utf8);
} }
p.store(baseDir + "/" + main.getName()); store(p, baseDir + "/" + main.getName(), utf8);
} }
private void prepare(Properties main, Properties base, File trans) throws IOException { private static SortedProperties load(String fileName, boolean utf8) throws IOException {
SortedProperties p = SortedProperties.loadProperties(trans.getAbsolutePath()); if (utf8) {
String s = new String(IOUtils.readBytesAndClose(new FileInputStream(fileName), -1), "UTF-8");
return SortedProperties.fromLines(s);
}
return SortedProperties.loadProperties(fileName);
}
private static void store(SortedProperties p, String fileName, boolean utf8) throws IOException {
if (utf8) {
String s = p.toLines();
FileOutputStream f = new FileOutputStream(fileName);
f.write(s.getBytes("UTF-8"));
f.close();
} else {
p.store(fileName);
}
}
private void prepare(Properties main, Properties base, File trans, boolean utf8) throws IOException {
SortedProperties p = load(trans.getAbsolutePath(), utf8);
Properties oldTranslations = new Properties(); Properties oldTranslations = new Properties();
for (Object k : base.keySet()) { for (Object k : base.keySet()) {
String key = (String) k; String key = (String) k;
...@@ -478,7 +500,7 @@ public class PrepareTranslation { ...@@ -478,7 +500,7 @@ public class PrepareTranslation {
p.remove(key); p.remove(key);
} }
} }
p.store(trans.getAbsolutePath()); store(p, trans.getAbsolutePath(), utf8);
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论