[jsword-svn] r1726 - in trunk: bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop bibledesktop/src/main/resources/images jsword/src/main/java/org/crosswire/jsword/book jsword/src/main/java/org/crosswire/jsword/book/install/sword jsword/src/main/java/org/crosswire/jsword/book/readings jsword/src/main/java/org/crosswire/jsword/util jsword/src/main/java/org/crosswire/jsword/versification
dmsmith at www.crosswire.org
dmsmith at www.crosswire.org
Fri Dec 28 13:37:24 MST 2007
Author: dmsmith
Date: 2007-12-28 13:37:23 -0700 (Fri, 28 Dec 2007)
New Revision: 1726
Added:
trunk/bibledesktop/src/main/resources/images/splash_zh.png
trunk/bibledesktop/src/main/resources/images/splash_zh_TW.png
trunk/jsword/src/main/java/org/crosswire/jsword/book/Msg_zh_CN.properties
trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/Msg_zh_CN.properties
trunk/jsword/src/main/java/org/crosswire/jsword/book/readings/Msg_zh_CN.properties
trunk/jsword/src/main/java/org/crosswire/jsword/util/Msg_zh_CN.properties
Modified:
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Translations.java
trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/translations.txt
trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/Msg_zh_TW.properties
trunk/jsword/src/main/java/org/crosswire/jsword/util/Msg_zh_TW.properties
trunk/jsword/src/main/java/org/crosswire/jsword/versification/SectionNames_zh_TW.properties
Log:
Initial zh_CN (Chinese, China) translation of BibleDesktop and JSword.
More zh_TW changes.
Changes to Translations to allow for country code.
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Translations.java
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Translations.java 2007-12-28 17:17:44 UTC (rev 1725)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/Translations.java 2007-12-28 20:37:23 UTC (rev 1726)
@@ -30,15 +30,16 @@
import java.util.Properties;
import org.crosswire.common.config.ChoiceFactory;
+import org.crosswire.common.util.Countries;
import org.crosswire.common.util.Languages;
import org.crosswire.common.util.Logger;
import org.crosswire.common.util.NetUtil;
import org.crosswire.common.util.ResourceUtil;
-import org.crosswire.jsword.book.readings.ReadingsBookDriver;
+import org.crosswire.common.util.StringUtil;
import org.crosswire.jsword.util.Project;
/**
- * Translations provides a list of languages that BibleDesktop has been translated into.
+ * Translations provides a list of locales that BibleDesktop has been translated into.
*
* @see gnu.gpl.License for license details.
* The copyright to this program is held by it's authors.
@@ -80,12 +81,12 @@
public Map getSupported()
{
loadSupportedTranslations();
- // I18N(DMS) Collate these according to the current locale, putting the current locale's languages first.
+ // I18N(DMS) Collate these according to the current locale, putting the current locale's locale first.
Map names = new LinkedHashMap();
for (int i = 0; i < translations.length; i++)
{
- names.put(translations[i], Languages.getLanguage(translations[i]));
+ names.put(translations[i], toString(translations[i]));
}
return names;
@@ -107,7 +108,7 @@
*/
public String getCurrent()
{
- return Languages.getLanguage(translation);
+ return toString(translation);
}
/**
@@ -117,22 +118,23 @@
*/
public void setCurrent(String newTranslation)
{
- String lang = DEFAULT_TRANSLATION;
- String currentLang = ""; //$NON-NLS-1$
+ String found = DEFAULT_TRANSLATION;
+ String currentTranslation = ""; //$NON-NLS-1$
for (int i = 0; i < translations.length; i++)
{
String trans = translations[i];
- currentLang = Languages.getLanguage(translation);
- if (trans.equals(newTranslation) || currentLang.equals(newTranslation))
+ currentTranslation = toString(translation);
+
+ if (trans.equals(newTranslation) || currentTranslation.equals(newTranslation))
{
- lang = trans;
+ found = trans;
break;
}
}
try
{
- translation = lang;
+ translation = found;
Properties props = new Properties();
props.put(TRANSLATION_KEY, translation);
URI outputURI = Project.instance().getWritablePropertiesURI(getClass().getName());
@@ -216,6 +218,21 @@
}
}
+ public String toString(String translationCode)
+ {
+ StringBuffer currentTranslation = new StringBuffer(Languages.getLanguage(translationCode));
+
+ if (translationCode.indexOf('_') != -1)
+ {
+ String[] locale = StringUtil.split(translationCode, '_');
+ currentTranslation.append(" ("); //$NON-NLS-1$
+ currentTranslation.append(Countries.getCountry(locale[1]));
+ currentTranslation.append(')');
+ }
+
+ return currentTranslation.toString();
+ }
+
/**
* The key used in config.xml
*/
@@ -227,13 +244,12 @@
public static final String DEFAULT_TRANSLATION = "en"; //$NON-NLS-1$
/**
- * The language that BibleDesktop should use.
+ * The translation that BibleDesktop should use.
*/
private String translation = DEFAULT_TRANSLATION;
/**
- * List of available languages.
- * TODO(DM): Externalize this list.
+ * List of available translations.
*/
private String[] translations;
Modified: trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/translations.txt
===================================================================
--- trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/translations.txt 2007-12-28 17:17:44 UTC (rev 1725)
+++ trunk/bibledesktop/src/main/java/org/crosswire/bibledesktop/desktop/translations.txt 2007-12-28 20:37:23 UTC (rev 1726)
@@ -2,7 +2,8 @@
# Each language should be on a line to itself.
# Note: This file is ordered by the English representation of the file.
en
-zh
+zh_CN
+zh_TW
de
fa
tr
Added: trunk/bibledesktop/src/main/resources/images/splash_zh.png
===================================================================
(Binary files differ)
Property changes on: trunk/bibledesktop/src/main/resources/images/splash_zh.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/bibledesktop/src/main/resources/images/splash_zh_TW.png
===================================================================
(Binary files differ)
Property changes on: trunk/bibledesktop/src/main/resources/images/splash_zh_TW.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsword/src/main/java/org/crosswire/jsword/book/Msg_zh_CN.properties
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/Msg_zh_CN.properties (rev 0)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/Msg_zh_CN.properties 2007-12-28 20:37:23 UTC (rev 1726)
@@ -0,0 +1,17 @@
+#Created by JInto - www.guh-software.de
+#Fri Dec 28 15:33:23 CST 2007
+BookCategory.Bible=\u5723\u7ECF
+BookCategory.Commentary=\u8BC4\u8BBA
+BookCategory.Dictionary=\u5B57\u5178
+BookCategory.General=\u666E\u904D\u7684\u4E66\u7C4D
+BookCategory.Glossaries=\u8BCD\u6C47\u8868
+BookCategory.Other=\u5176\u4ED6
+BookCategory.Readings=\u6BCF\u65E5\u8BFB\u7ECF
+BookCategory.Unorthodox=\u72C2\u70ED / \u975E\u6B63\u7EDF / \u4E0D\u53EF\u53D6\u7684
+Books.BookNoRemove=Could not remove unregistered Book
+Books.DriverNoRemove=Could not remove unregistered Driver
+Defaults.BibleNotFound=Bible called "{0}" could not be found.
+Defaults.CommentaryNotFound=Commentary called "{0}" could not be found.
+Defaults.DictionaryNotFound=Dictionary called "{0}" could not be found.
+OSISUtil.MissingVerse=Verse element could not be found
+OSISUtil.OSISBadID=OsisID not valid\: {0}
Added: trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/Msg_zh_CN.properties
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/Msg_zh_CN.properties (rev 0)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/Msg_zh_CN.properties 2007-12-28 20:37:23 UTC (rev 1726)
@@ -0,0 +1,20 @@
+#Created by JInto - www.guh-software.de
+#Fri Dec 28 15:41:26 CST 2007
+HttpSwordInstaller.MissingFile=\u65E0\u6CD5\u627E\u5230\: {0}
+SwordInstaller.AuthRefused=Login failed\: User\={0}. FTP code\={1}, {2}
+SwordInstaller.CWDRefused=Failed to change to remote directory\: {0}. FTP code\={1}, {2}
+SwordInstaller.CacheError=Error loading from cache
+SwordInstaller.ConnectRefused=Failed to connect to remote server\: {0}. FTP code\={1}, {2}
+SwordInstaller.DownloadRefused=Failed to download index file\: {0}. FTP code\={1}, {2}
+SwordInstaller.InstallDone=\u4E66\u7C4D\u5B89\u88C5\u5B8C\u6210\: {0}
+SwordInstaller.Installed=\u5DF2\u5B89\u88C5\u4E66\u7C4D\: {0}
+SwordInstaller.Installing=\u6B63\u5728\u5B89\u88C5\u4E66\u7C4D\: {0}
+SwordInstaller.InvalidURL=\u9519\u52A1\u7684Url\: {0}
+SwordInstaller.JobConfig=\u8986\u5236\u8BBE\u5B9A\u6863
+SwordInstaller.JobDownloading=\u6863\u6848\u4E0B\u8F7D\u4E2D
+SwordInstaller.JobInit=\u521D\u59CB\u5316
+SwordInstaller.JobLogin=\u767B\u5165\u8FDC\u7AEF\u7AD9\u53F0
+SwordInstaller.UnknownError=Unexpected Error occurred
+SwordInstallerFactory.URLAtCount=Too many @ symbols in url\: {0}
+SwordInstallerFactory.URLColonCount=Wrong number of \: symbols in url\: {0}
+SwordInstallerFactory.URLFailed=\u7F51\u5740\u64CD\u7EB5\u5931\u62DC
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/Msg_zh_TW.properties
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/Msg_zh_TW.properties 2007-12-28 17:17:44 UTC (rev 1725)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/install/sword/Msg_zh_TW.properties 2007-12-28 20:37:23 UTC (rev 1726)
@@ -1,25 +1,20 @@
-# The naming convention for the keys in the file is ClassName.MessageName
-# Where ClassName is the name of the class using the property.
-# When the resource is used by more than one class it should be the one
-# that the resource is most closely associated.
-# The MessageName should be mixed case, with a leading capital.
-# It should have no spaces or other punctuation (e.g. _, -, ', ...)
-
-SwordInstaller.AuthRefused=Login failed: User={0}. FTP code={1}, {2}
-SwordInstaller.ConnectRefused=Failed to connect to remote server: {0}. FTP code={1}, {2}
-SwordInstaller.CWDRefused=Failed to change to remote directory: {0}. FTP code={1}, {2}
-SwordInstaller.DownloadRefused=Failed to download index file: {0}. FTP code={1}, {2}
-SwordInstaller.UnknownError=Unexpected Error occurred
+#Created by JInto - www.guh-software.de
+#Fri Dec 28 15:38:29 CST 2007
+HttpSwordInstaller.MissingFile=\u7121\u6CD5\u627E\u5230\: {0}
+SwordInstaller.AuthRefused=Login failed\: User\={0}. FTP code\={1}, {2}
+SwordInstaller.CWDRefused=Failed to change to remote directory\: {0}. FTP code\={1}, {2}
SwordInstaller.CacheError=Error loading from cache
-SwordInstaller.InvalidURL=Not enough / symbols in url: {0}
-SwordInstaller.Installed=Book already installed: {0}
-SwordInstaller.Installing=Installing book: {0}
-SwordInstaller.InstallDone=Finished installing book: {0}
-SwordInstaller.JobInit=Initializing
-SwordInstaller.JobConfig=Copying config file
-SwordInstaller.JobLogin=Logging on to remote site
-SwordInstaller.JobDownloading=Downloading files
-SwordInstallerFactory.URLFailed=URL manipulation failed
-SwordInstallerFactory.URLAtCount=Too many @ symbols in url: {0}
-SwordInstallerFactory.URLColonCount=Wrong number of : symbols in url: {0}
-HttpSwordInstaller.MissingFile=Unable to find: {0}
\ No newline at end of file
+SwordInstaller.ConnectRefused=Failed to connect to remote server\: {0}. FTP code\={1}, {2}
+SwordInstaller.DownloadRefused=Failed to download index file\: {0}. FTP code\={1}, {2}
+SwordInstaller.InstallDone=\u66F8\u7C4D\u5B89\u88DD\u5B8C\u6210\: {0}
+SwordInstaller.Installed=\u5DF2\u5B89\u88DD\u66F8\u7C4D\: {0}
+SwordInstaller.Installing=\u6B63\u5728\u5B89\u88DD\u66F8\u7C4D\: {0}
+SwordInstaller.InvalidURL=\u932F\u8AA4\u7684url\: {0}
+SwordInstaller.JobConfig=\u8986\u88FD\u8A2D\u5B9A\u6A94
+SwordInstaller.JobDownloading=\u6B63\u5728\u4E0B\u8F09\u6A94\u6848
+SwordInstaller.JobInit=\u521D\u59CB\u5316
+SwordInstaller.JobLogin=\u767B\u5165\u9060\u7AEF\u7AD9\u53F0
+SwordInstaller.UnknownError=Unexpected Error occurred
+SwordInstallerFactory.URLAtCount=Too many @ symbols in url\: {0}
+SwordInstallerFactory.URLColonCount=Wrong number of \: symbols in url\: {0}
+SwordInstallerFactory.URLFailed=\u7DB2\u5740\u64CD\u7E31\u5931\u6557
Added: trunk/jsword/src/main/java/org/crosswire/jsword/book/readings/Msg_zh_CN.properties
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/readings/Msg_zh_CN.properties (rev 0)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/readings/Msg_zh_CN.properties 2007-12-28 20:37:23 UTC (rev 1726)
@@ -0,0 +1,9 @@
+#Created by JInto - www.guh-software.de
+#Fri Dec 28 15:43:57 CST 2007
+ReadingsBook.DecodeError=Error decoding\: {0}
+ReadingsBook.FilterFail=Filtering input data failed.
+ReadingsBook.Heading=Readings for {0}
+ReadingsBook.NotFound=Key not found {0}
+ReadingsBookDriver.Title=\u9605\u8BFB
+ReadingsKey.DriverReadonly=\u53EA\u8BFB\u4E66\u672C
+ReadingsKey.ParseFail=Failed to parse {0}
Added: trunk/jsword/src/main/java/org/crosswire/jsword/util/Msg_zh_CN.properties
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/util/Msg_zh_CN.properties (rev 0)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/util/Msg_zh_CN.properties 2007-12-28 20:37:23 UTC (rev 1726)
@@ -0,0 +1,5 @@
+#Created by JInto - www.guh-software.de
+#Fri Dec 28 15:55:17 CST 2007
+ConverterFactory.NoConverter=No converter called\: {0}
+WebWarning.ShowWarning=Show this warning every time the Internet is accessed.
+WebWarning.Warning=\u4F60\u5C06\u4F7F\u7528\u56E0\u7279\u7F51.\u786E\u5B9A\u6216\u5426?
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/util/Msg_zh_TW.properties
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/util/Msg_zh_TW.properties 2007-12-28 17:17:44 UTC (rev 1725)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/util/Msg_zh_TW.properties 2007-12-28 20:37:23 UTC (rev 1726)
@@ -1,12 +1,5 @@
-# The naming convention for the keys in the file is ClassName.MessageName
-# Where ClassName is the name of the class using the property.
-# When the resource is used by more than one class it should be the one
-# that the resource is most closely associated.
-# The MessageName should be mixed case, with a leading capital.
-# It should have no spaces or other punctuation (e.g. _, -, ', ...)
-
-WebWarning.Warning=You are about to access the Internet. Are you sure you want to do this?
+#Created by JInto - www.guh-software.de
+#Fri Dec 28 15:55:18 CST 2007
+ConverterFactory.NoConverter=No converter called\: {0}
WebWarning.ShowWarning=Show this warning every time the Internet is accessed.
-
-# The following would be an internal error
-ConverterFactory.NoConverter=No converter called: {0}
+WebWarning.Warning=\u4F60\u5C07\u8981\u9032\u5165\u7DB2\u8DEF.\u78BA\u5B9A\u6216\u5426?
Modified: trunk/jsword/src/main/java/org/crosswire/jsword/versification/SectionNames_zh_TW.properties
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/versification/SectionNames_zh_TW.properties 2007-12-28 17:17:44 UTC (rev 1725)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/versification/SectionNames_zh_TW.properties 2007-12-28 20:37:23 UTC (rev 1726)
@@ -1,8 +1,10 @@
-Sections.1=Pentateuch
-Sections.2=History
-Sections.3=Poetry
-Sections.4=Major Prophets
-Sections.5=Minor Prophets
-Sections.6=Gospels And Acts
-Sections.7=Letters
-Sections.8=Revelation
\ No newline at end of file
+#Created by JInto - www.guh-software.de
+#Fri Dec 28 16:03:04 CST 2007
+Sections.1=\u6469\u897F\u4E94\u7D93
+Sections.2=\u6B77\u53F2\u66F8
+Sections.3=\u8A69\u6B4C\u66F8
+Sections.4=\u5927\u5148\u77E5\u66F8
+Sections.5=\u5C0F\u5148\u77E5\u66F8
+Sections.6=\u798F\u97F3\u66F8
+Sections.7=\u4F7F\u5F92\u66F8\u4FE1
+Sections.8=\u555F\u793A\u9304
More information about the jsword-svn
mailing list