************************************************************************
Translating the MySQL GUI Tools
Author : Michael G. Zinner <mzinner@mysql.com>
Revision by : Mike Lischke <mikel@mysql.com>
Created : 2005-11-04
Last edited : 2008-07-31
************************************************************************
This text explains how to translate the MySQL GUI tools. To add a new
language to one of the tools please follow this procedure.
Before you start the translation, please note that we can no longer accept
your translations to be included into the main line for our tools. So any
translation you do is just for you.
Once translated, the GUI tool will "speak" another language on all
supported platforms (at the moment, Windows, Linux/Gnome, and Mac OS).
The translation, however, should be done on Windows because part of the
process is to make sure that text lengths do not exceed the maximum
display width and get clipped. On Linux, some display elements have a
tendency of automatically adapting their size to the text they contain;
thus, things might be properly displayed on Linux but not on Windows.
If you cannot use Windows, please find instructions further below.
STEP-BY-STEP INSTRUCTIONS FOR WINDOWS
-------------------------------------
1) Make sure you have a recent version of the GUI tool you're about to
translate installed.
2) Create the proper subdirectories. To add the new translation you have
to create a subdirectory in the installation directory of the GUI
tool you're about to translate:
[InstallDir]\locale\[lang]
The name of the [lang] directory indicates the language and can be
found in the translation_list.txt file that you can find in the
locale subdirectory, or online:
http://www.us.debian.org/international/l10n/po/
For some languages, you have to use the 5-digit code, for example
to specify Simplified Chinese (zh_CN) or Traditional Chinese (zh_TW).
For other languages, you have a choice; for German, for example,
you may use either the 2-digit code de or the 5-digit code de_DE,
de_AT, etc.
If you want to translate a language that is not in that list, simply
add the language to the file [InstallDir]\locale\languages_list.txt
Under the [lang] directory you need to create a subdirectory named
LC_MESSAGES:
[InstallDir]\locale\[lang]\LC_MESSAGES\
Example: To translate MySQL Administrator into German, you would
have this directory layout (assuming Administrator is installed in
the default location):
C:\Program Files\MySQL\MySQL Administrator 1.1\
locale\
de\
LC_MESSAGES
3) Get the .po files from our public repositories that you can access
using a web browser. Each GUI tool has two associated .po files:
a) mysql-gui-common-template.po
This file is shared amoung all GUI tools. It can be obtained from
http://svn.mysql.com/svnpublic/mysql-gui-common/trunk/po/
b) The .po file of the specific tool.
For MySQL Administrator, this would be
mysql-administrator-template.po, which can be obtained from
http://svn.mysql.com/svnpublic/mysql-administrator/trunk/po/
For MySQL Query Browser, this would be
mysql-query-browser-template.po, which can be obtained from
http://svn.mysql.com/svnpublic/mysql-query-browser/trunk/po/
Download the files and place them in the LC_MESSAGES directory
created in step 1.
4) Download the GNU gettext binaries and dependencies for Windows from
http://gnuwin32.sourceforge.net/packages/gettext.htm
Make sure *not* to download the "complete package" which contains
an installer for windows, but doesn't allow you to place the files
where MakeMo.bat needs them (see below). Here are the download links:
http://gnuwin32.sourceforge.net/downlinks/gettext-bin-zip.php
http://gnuwin32.sourceforge.net/downlinks/gettext-dep-zip.php
After downloading, extract the .zip files under [InstallDir]\locale\.
Make sure you have the file [InstallDir]\locale\bin\msgcat.exe.
5) Install poEdit. It is best to use the 1.2.5 release which can be
downloaded from
http://prdownloads.sourceforge.net/poedit/poedit-1.2.5-setup.exe
6) Doubleclick a .po file to open it. For example, open this file:
C:\Program Files\MySQL\MySQL Administrator 1.1\locale\de\LC_MESSAGES\mysql-gui-common-template.po
6.1) From the menu, select Catalog > Settings... fill in "Project
info", and save the file:
- project name and version (e.g. MySQL Administrator 1.1.5),
- team name (e.g. MA translation team),
- mail address (e.g. stefan@mysql.com),
- language (e.g. German),
- country (e.g. Germany),
- character set (utf-8),
- source code character set (utf-8).
Make sure to use UTF-8, not any other character set!
Unless you want to change the Project info, this step has to be
performed only once, right before you start the translation.
6.2) Now start the translation by selecting a word in the upper list
and entering the translation in the lower area.
To search for a specific word, click the upper list and start typing
the word. For more information how to use the poEdit interface, see
the documentation shipped with the product.
!! Things to notice.
! The translated text needs to have about the same length as the
original English text. Use abbreviations if necessary.
! The translation needs to be verified in the GUI. If the translation
results in a messed up display it has to be corrected. See the
next step for information about how to prepare translated files
for the application.
! In the translation, preserve special characters that indicate a
tab (\t) or a new line (\n).
! In the translation, preserve spaces, as in the following string:
-h,--host=name Connect to host.\n
This example contains two spaces preceding the string, and 8 spaces
in the middle. It's command-line output, which is the reason why
it uses space characters, rather than tabs.
! In the translation, preserve variables like these:
%s: could not connect to MySQL:\n
%s (%i)\n
In that example, don't touch %s and %i.
Here's a more complex example:
%d row%s fetched in %.4fs (%.4fs)
In that example, you should not touch %d, %s, and %.4fs.
! When you start a translation, poEdit will report "xx bad tokens"
in the status bar. Don't worry, here's the explanation: poEdit
checks whether C style placeholders ("%1.3f" and the like) match
between the untranslated original and the translation. Initially,
with empty translations, there are many mismatches, of course,
but these get fewer and fewer as the translation proceeds. When
you're done with the translation, no "bad tokens" should be left.
7) To make the translations available to the application you have to
compile the .po files using this batch file:
[InstallDir]\locale\MakeMo.bat
That file takes one parameter: [lang] (see step 1)
Open a command-line window, change into [InstallDir]\locale, and
invoke the batch file with the appropriate language parameter.
Example for the German translation: MakeMo.bat de
The batch file creates a default.mo file in the
[InstallDir]\locale\[lang]\LC_MESSAGES directory.
Now the application can be (re)started, and the new language can be
selected (Tools > Options > General Options).
Note that after switching the interface language the application
has to be restarted once again for that change to take e
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
mysql 可视化界面 (207个子文件)
MySQLMigrationTool.chm 575KB
MySQLAdministrator.chm 545KB
MySQLQueryBrowser.chm 493KB
MigrationGeneric.class 46KB
ReverseEngineeringMaxdb.class 32KB
MigrationMaxdb.class 32KB
ReverseEngineeringOracle.class 29KB
ReverseEngineeringSybase.class 20KB
ReverseEngineeringMssql.class 20KB
ReverseEngineeringGeneric.class 19KB
ReverseEngineeringAccess.class 14KB
MigrationSybase.class 12KB
MigrationOracle.class 12KB
MigrationMssql.class 11KB
MigrationMysql.class 10KB
MigrationUtils.class 8KB
MigrationAccess.class 8KB
TransformationMysqlJdbc.class 8KB
JavaTestModuleTest.class 4KB
JavaTestModule.class 3KB
ReverseEngineeringMysqlJdbc.class 3KB
BaseJava.class 2KB
ReverseEngineeringOracleTest.class 2KB
MigrationOracleTest.class 2KB
ReverseEngineeringAccessTest.class 856B
ReverseEngineeringMssqlTest.class 358B
.classpath 335B
MakeMo.cmd 895B
COPYING 20KB
php5ts.dll 3.34MB
libmysql.dll 1.94MB
python24.dll 1.78MB
iconv.dll 872KB
libxml2.dll 711KB
cc3270mt.dll 643KB
libmysqlsqlparser.dll 610KB
libglib-2.0-0.dll 590KB
cc3270.dll 574KB
msvcp71.dll 488KB
msvcr71.dll 340KB
libmysqlgrt.dll 300KB
libpng12.dll 225KB
libmysqlx.dll 210KB
pcre3.dll 192KB
libexpat.dll 144KB
lua50.dll 140KB
libmysqladmin.dll 134KB
libmysqlqb.dll 121KB
libmysqlgrtbuiltinmodule.dll 91KB
zlib.dll 72KB
zlib1.dll 69KB
intl.dll 44KB
libgthread-2.0-0.dll 37KB
libfcgi.dll 33KB
libmysqlutil.dll 33KB
mysqladmin_startup_variables_description.dtd 2KB
MySQLQueryBrowser.exe 3.53MB
MySQLAdministrator.exe 3.51MB
MySQLMigrationTool.exe 3.02MB
MySQLSystemTrayMonitor.exe 1003KB
grtsh.exe 45KB
mysqlqb_statements.html 804KB
mysqlqb_functions.html 558KB
mysql-grt-java-1.0.0-bin.jar 709KB
mysql-connector-java-5.0.4-bin.jar 484KB
sapdbc-7_6_00_12_4339.jar 465KB
jtds-1.2.jar 279KB
junit.jar 118KB
MigrationGeneric.java 77KB
MigrationMaxdb.java 53KB
ReverseEngineeringMaxdb.java 43KB
ReverseEngineeringOracle.java 37KB
ReverseEngineeringMssql.java 23KB
ReverseEngineeringSybase.java 23KB
ReverseEngineeringGeneric.java 23KB
MigrationSybase.java 17KB
MigrationMssql.java 16KB
MigrationOracle.java 16KB
ReverseEngineeringAccess.java 15KB
MigrationMysql.java 13KB
MigrationUtils.java 10KB
MigrationAccess.java 10KB
TransformationMysqlJdbc.java 9KB
JavaTestModuleTest.java 4KB
JavaTestModule.java 4KB
ReverseEngineeringOracleTest.java 3KB
ReverseEngineeringMysqlJdbc.java 3KB
BaseJava.java 2KB
MigrationOracleTest.java 1KB
ReverseEngineeringAccessTest.java 963B
ReverseEngineeringMssqlTest.java 242B
libmysqlgrt.lib 16KB
libmysqlx.lib 9KB
libmysqlutil.lib 4KB
libmysqlsqlparser.lib 3KB
libmysqlqb.lib 1KB
libmysqlgrtbuiltinmodule.lib 948B
RdbmsInfoMysql.lua 44KB
TextMigrationScript.lua 32KB
MigrationScript.lua 27KB
共 207 条
- 1
- 2
- 3
资源评论
- ruby_is_a_beauty2015-11-18可以用,还可以
shawwin
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功