Lokalize/zh-cn: Difference between revisions

From KDE UserBase Wiki
m (Created page with "==Windows 下的 Lokalize==")
(Updating to match new version of source page)
(23 intermediate revisions by 3 users not shown)
Line 2: Line 2:


{|class="tablecenter vertical-centered"
{|class="tablecenter vertical-centered"
|[[Image:Lokalize.png|128px|left|Lokalize]]||    ||'''Lokalize 是为KDE SC 4设计的本地化工具'''
|[[Image:Lokalize.png|128px|left|Lokalize]]||    ||'''Lokalize is the localization tool for KDE and other open source software'''
|}
|}
Lokalize is a replacement for KBabel which is now discontinued.
 
'''Lokalize''' is also a general computer-aided translation system (CAT) with which you can translate OpenDocument files (*.odt). [https://translate-toolkit.readthedocs.org Translate-Toolkit] is used internally to extract text for translation from .odt to .xliff files and to merge translation back into .odt file.


__TOC__
__TOC__
Line 10: Line 11:
[[Image:Lokalize-scr-1.png|thumb|500px|center|用Lokalize进行Konqueror的法语翻译]]
[[Image:Lokalize-scr-1.png|thumb|500px|center|用Lokalize进行Konqueror的法语翻译]]


关于 Lokalize 更多信息可以在[http://techbase.kde.org/Projects/Summer_of_Code/2007/Projects/KAider Lokalize summer of code 页面]找到
==Windows 下的 Lokalize==
Install KDE using '''kdewin-installer''':
{{Input|1=http://www.winkde.org/pub/kde/ports/win32/installer/kdewin-installer-gui-latest.exe}}




Leave defaults in all steps except package list.
==从 KDE trunk 编译 Lokalize==
In package list select <menuchoice>kdesdk</menuchoice> (all dependencies will be installed automatically). Complete '''kdewin-installation''' process.


Technical details: you install KDE 4.3 or later in standard way,
Install '''libkf5i18n-dev''',  '''libkf5completion-dev''', '''libkf5itemviews-dev''', '''libkf5sonnet-dev''', '''kross-dev''' headers packages and '''libhunspell-dev'''. Then:
and then add custom-compiled '''Lokalize''' binaries and data.


{{Input|1= git clone <nowiki>git://anongit.kde.org/lokalize</nowiki>}}or


==Compiling Lokalize from KDE trunk==
{{Input|1=git clone <nowiki>git@git.kde.org:lokalize</nowiki>}}
 
Install '''kdelibs''' headers package (for example in Debian it's '''kdelibs5-dev'''). Then:
 
{{Input|1= svn checkout --depth=files <nowiki>svn://anonsvn.kde.org/home/kde/trunk/KDE/kdesdk/</nowiki>}}or
 
{{Input|1=svn checkout --depth=files svn+ssh://[email protected]/home/kde/trunk/KDE/kdesdk}}
and
and
{{Input|1=cd kdesdk && svn up cmake doc lokalize
{{Input|1=cd lokalize
  mkdir build
  mkdir build
  cd build
  cd build
mkdir $HOME/mykde
  cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
  cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/kde43 -DCMAKE_BUILD_TYPE=RelWithDebInfo
cd lokalize
  make -j2
  make -j2
  make install
  ./src/lokalize
}}
}}


Then run Lokalize via {{Input|1=$HOME/mykde/bin/lokalize}}
==Downloading Lokalize binaries for Windows==
The latest release build of Lokalize for Windows is available [https://binary-factory.kde.org/job/Lokalize_Release_win32/ on the KDE Binary Factory]
 
The latest nightly build of Lokalize for Windows is also available [https://binary-factory.kde.org/job/Lokalize_Nightly_win32/ on the KDE Binary Factory]


==Tips and tricks==
==提示和技巧==


=== Search in files ===
=== 搜寻档案 ===


Translation Memory (TM) now keeps track of where each translation pair came from. So when you want to <menuchoice>search</menuchoice> for string in the files on disk, you just drag the directory with those files onto <menuchoice>translation memory</menuchoice>  tab (<keycap>F7</keycap>) to update TM, wait a minute or two, then type your string into right field of <menuchoice>Translation Memory tab</menuchoice>, then press <keycap>Enter</keycap>.
翻译内存会不断追踪每个翻译。所以,当你要搜寻在硬盘上档案的字符串,您只需拖动这些档案的目录到翻译内存分页(F7)来更新翻译内存。等待一两分钟后,输入您的字符串到翻译内存分页的正确区域,然后按下 Enter。


Then you click on one of results and this opens appropriate file, on the appropriate entry. When you want to do another search during the same day, you skip the updating step and just type what you're searching for. You can filter TM search results by filename using the field left side of the <keycap>F7</keycap> panel (<menuchoice>Filemask</menuchoice>).
然后您点击其中一个结果,这将在适当的输入框打开相应的档案。当你想在同一天做另一次搜寻,你可以跳过更新的步骤,只需输入您想搜寻的。您可以在 F7 面板的右侧(档案屏蔽)使用文件名过滤翻译内存的搜寻结果。




== Author ==
== 作者 ==
Nick Shaforostoff <shaforostoff AT kde.ru>
Nick Shaforostoff [http://www.facebook.com/shaforostoff Facebook page]
   
   
== External links ==
== 外部链接 ==


:* [http://docs.kde.org/development/en/kdesdk/lokalize/index.html Handbook]
* [http://docs.kde.org/development/en/kdesdk/lokalize/index.html Handbook]
:* [http://api.kde.org/4.x-api/kdesdk-apidocs/lokalize/html/index.html KDE SC 4 API Reference]
* [http://api.kde.org/4.14-api/kdesdk-apidocs/lokalize/html/annotated.html KDE SC 5 API Reference]
* [https://bugs.kde.org/enter_bug.cgi?product=lokalize&format=guided Report a bug]


[[Category:Development]]
[[Category:开发/zh-cn]]

Revision as of 19:10, 8 April 2019

Lokalize
Lokalize
Lokalize is the localization tool for KDE and other open source software

Lokalize is also a general computer-aided translation system (CAT) with which you can translate OpenDocument files (*.odt). Translate-Toolkit is used internally to extract text for translation from .odt to .xliff files and to merge translation back into .odt file.

用Lokalize进行Konqueror的法语翻译


从 KDE trunk 编译 Lokalize

Install libkf5i18n-dev, libkf5completion-dev, libkf5itemviews-dev, libkf5sonnet-dev, kross-dev headers packages and libhunspell-dev. Then:

git clone git://anongit.kde.org/lokalize

or

git clone [email protected]:lokalize

and

cd lokalize
 mkdir build
 cd build
 cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
 make -j2
 ./src/lokalize

Downloading Lokalize binaries for Windows

The latest release build of Lokalize for Windows is available on the KDE Binary Factory

The latest nightly build of Lokalize for Windows is also available on the KDE Binary Factory

提示和技巧

搜寻档案

翻译内存会不断追踪每个翻译。所以,当你要搜寻在硬盘上档案的字符串,您只需拖动这些档案的目录到翻译内存分页(F7)来更新翻译内存。等待一两分钟后,输入您的字符串到翻译内存分页的正确区域,然后按下 Enter。

然后您点击其中一个结果,这将在适当的输入框打开相应的档案。当你想在同一天做另一次搜寻,你可以跳过更新的步骤,只需输入您想搜寻的。您可以在 F7 面板的右侧(档案屏蔽)使用文件名过滤翻译内存的搜寻结果。


作者

Nick Shaforostoff Facebook page

外部链接