如何将winetricks中文化?

sh/bash/dash/ksh/zsh等Shell脚本
回复
头像
biowee
帖子: 287
注册时间: 2006-07-31 22:55
联系:

如何将winetricks中文化?

#1

帖子 biowee » 2010-07-30 14:54

huang jiahua曾经提供wintricks的中文版本,不过这个版本是直接利用wintricks翻译的。这不太符合linux多语言软件支持的目标。一般而言,linux会采用gettext来本地化,但是这个基于shell的脚本如何做到这一点呢?本设想是通过gettext来读取winetrick中 echo语句中代翻译的文本,然后将其翻译为中文。

因此,现在对wineticks该如何修改,添加什么命令代码?另外,wietricks中zenity中的文本该如何采用gettext读取出,并翻译中文?请大家献言。

目前已经编写了wintrick的po文件:

代码: 全选

msgid ""
msgstr ""
"Project-Id-Version: winetricks\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-01-11 00:20+0100\n"
"PO-Revision-Date: 2010-07-30 13:41+0800\n"
"Last-Translator: Liu Mingwei <lmingwei@gmail.com>\n"
"Language-Team: BioInfoServ Team <>\n"
"MIME-Version: 120100618\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"

msgid "installing…"
msgstr "安装中…"

msgid "VERSION"
msgstr "版本"

msgid "Usage: $0 [options] package [package] ..."
msgstr "用法:$0 [选项] package [软件包] ..."

msgid "This script can help you prepare your system for Windows applications"
msgstr "本脚本可帮助您完成windows应用程序准备工作"

msgid "that mistakenly assume all users' systems have all the needed"
msgstr "当然,如果你认为所有用户都需要,这是错误的"

msgid "redistributable runtime libraries or fonts"
msgstr "可重新发布运行库或字体"

msgid "Some options require the Linux 'cabextract' program."
msgstr "某些选择,需要您安装'cabextract'"

msgid " -q         quiet.  You must have already agreed to the EULAs."
msgstr " -q         退出.  您必须遵守EULAs(最终用户许可协议)."

msgid " -v         verbose"
msgstr " -v         详情"

msgid " -V         display Version"
msgstr " -V         显示版本"

msgid "Packages:"
msgstr "软件包:"

msgid " 7zip          7-zip file archiver"
msgstr " 7zip          7-zip文件归档器(文件压缩器)"

msgid " adobeair      Adobe AIR runtime"
msgstr " adobeair      Adobe集成运行环境(AIR)"

msgid " art2kmin      MS Access 2007 runtime"
msgstr " art2kmin      MS Access 2007运行环境"

msgid " atmlib        Adobe Type Manager. Needed for Adobe CS4"
msgstr " atmlib        Adobe类型管理器。Adobe CS4所需"

msgid " autohotkey    Autohotkey (open source gui scripting language)"
msgstr " autohotkey    Autohotkey (开源图形用户界面脚本语言)"

msgid " cmake         CMake, the cross-platform, open-source build system"
msgstr " cmake         跨平台开源编译系统CMake"

msgid " colorprofile  Standard RGB color profile"
msgstr " colorprofile  标准RGB颜色配置文件"

msgid " comctl32      MS common controls 5.80"
msgstr " comctl32      微软通用控件5.80"

msgid ""
" comctl32.ocx  MS comctl32.ocx and mscomctl.ocx, comctl32 wrappers for VB6"
msgstr " comctl32.ocx  微软控件comctl32.ocx(VB6的封装库)和mscomctl.ocx。"

msgid " controlpad    MS ActiveX Control Pad"
msgstr " controlpad    微软ActiveX网页控件"

msgid " corefonts     MS Arial, Courier, Times fonts"
msgstr " corefonts     微软Arial、Courier、Times字体"

msgid " cygwin        Unix apps for Windows (needed by some build scripts)"
msgstr " cygwin        针对Windows的Linux应用环境(某些脚本构建时需要)"

msgid " d3dx9         MS d3dx9_??.dll (from DirectX 9 user redistributable)"
msgstr ""
" d3dx9         微软d3dx9系列动态链接库,为某些3D游戏软件运行必须,如极品飞车"
"9 (来自DirectX 9重发布)"

msgid " d3dx9_28      MS d3dx9_28.dll"
msgstr ""
" d3dx9_28      微软d3dx9_28动态链接库,为某些3D软件或游戏软件运行必须,如"
"3DMARKs"

msgid " d3dx9_36      MS d3dx9_36.dll"
msgstr ""
" d3dx9_36      微软d3dx9_36动态链接库,为某些游戏所必须,如三国无双,来自"
"directx9.0"

msgid " d3dx10        MS d3dx10_??.dll (from DirectX user redistributable)"
msgstr ""
" d3dx10        微软d3dx10系列动态链接库,为某些游戏运行所必须,如大富翁(来自"
"DirectX 9重发布)"

msgid " d3dxof        MS d3dxof.dll (from DirectX user redistributable)"
msgstr ""
" d3dxof        微软d3dxof动态组件,为游戏运行所需,如魔兽世界(来自DirectX 9重"
"发布)"

msgid ""
" dcom98        MS DCOM (ole32, oleaut32); requires Windows 98 license, but "
"does not check for one"
msgstr ""
" dcom98        微软网络数据传输组件DCOM(ole32, oleaut32)。尽管需要视窗98证"
"书, 但安装过程不会检查"

msgid " dinput8       MS dinput8.dll (from DirectX 9 user redistributable)"
msgstr ""
" dinput8       微软dinput8动态链接库,用于多媒体输入设备,如游戏手柄(来自"
"DirectX 9重发布)"

msgid " dirac0.8      the obsolete Dirac 0.8 directshow filter"
msgstr " dirac0.8      开源视频格式Dirac 0.8过滤器"

msgid " directmusic   MS DirectMusic (from DirectX 9 user redistributable)"
msgstr ""
" directmusic   微软DirectX 的交互式音频组件,用于处理声卡或内置软件合成器转换"
"成的数字音频(来自DirectX 9重发布)"

msgid " directplay    MS DirectPlay (from DirectX 9 user redistributable)"
msgstr ""
" directplay    微软游戏通信服务DirectPlay,基于调制解调器、Internet或局域网,"
"提供不受协议或联机服务限制的游戏链接通信方法(来自DirectX 9重发布)"

msgid ""
" directx9      MS DirectX 9 user redistributable (not recommended! use d3dx9 "
"instead)"
msgstr " directx9      微软DirectX 9重发布版本(不推荐使用!可使用d3dx9代替)"

msgid ""
" directx9-beta MS DirectX 9 user redistributable - beta verb (not "
"recommended! use d3dx9 instead)"
msgstr ""
" directx9-beta 微软DirectX 9重发布版本- beta版(不推荐使用!可使用d3dx9代替)"

msgid " divx          divx video codec"
msgstr ""
" divx          DivX视频编解码器,基于MPEG-4、类似于MP3的数字多媒体压缩技术。"

msgid ""
" dotnet11      MS .NET 1.1 (requires Windows license, but does not check for "
"one)"
msgstr ""
" dotnet11      微软.NET 1.1,类似于Java虚拟机的运行和管理编程平台,支持C#、"
"VB.NET、C++、Python等开发 (需要视窗证书,但安装过程不检查)"

msgid ""
" dotnet11sdk   MS .NET Framework SDK Version 1.1 (requires Windows license, "
"but does not check for one; may not work yet)"
msgstr ""
" dotnet11sdk   微软.NET Framework SDK版本1.1 (需要视窗证书,安装过程不检测,"
"但或许不能工作)"

msgid ""
" dotnet20      MS .NET 2.0 (requires Windows license, but does not check for "
"one)"
msgstr " dotnet20      微软.NET 2.0 (需要视窗证书,但安装过程不检测)"

msgid ""
" dotnet20sdk   MS .NET Framework SDK Version 2.0 (requires Windows license, "
"but does not check for one, may not work yet)"
msgstr ""
" dotnet20sdk   微软.NET Framework SDK版本2.0 (需要视窗证书,安装过程不检测,"
"但或许不能工作)"

msgid ""
" dotnet20sp2   MS .NET 2.0 sp2 (requires Windows license, but does not check "
"for one)"
msgstr ""
" dotnet20sp2   微软.NET 2.0补丁(需要视窗证书,安装过程不检测,但或许不能工作)"

msgid ""
" dotnet30      MS .NET 3.0 (requires Windows license, but does not check for "
"one, might not work yet)"
msgstr ""
" dotnet30      微软.NET 3.0 (需要视窗证书,安装过程不检测,但或许不能工作)"

msgid " droid         Droid fonts (on LCD, looks better with fontsmooth-rgb)"
msgstr ""
" droid         Droid字体,来自google手机平台,包括了Droid Sans、Droid Sans "
"Mono、Droid Serif等,由Ascender字型厂商设计(具备字体平滑RGB,使之在液晶屏上看"
"起来更好,)"

msgid " dxsdk_nov2006 DirectX Software Development Kit, November 2006 version"
msgstr " dxsdk_nov2006 DirectX软件开发套件, 2006版"

msgid " ffdshow       ffdshow video codecs"
msgstr ""
" ffdshow       ffdshow视频音频解码器,包含WMV、Xvid、DivX、mpeg2、mpeg4、"
"AC3、MP3等解码"

msgid " firefox       Firefox web browser"
msgstr " firefox       Firefox网页浏览器"

msgid " flash         Adobe Flash Player ActiveX and firefox plugins"
msgstr " flash         Adobe Flash播放器ActiveX控件和firefox浏览器插件"

msgid " fm20          MS Forms 2.0 Object Library"
msgstr " fm20          微软表单对象库2.0"

msgid ""
" fontfix       Fix bad fonts which cause crash in some apps (e.g. .net)."
msgstr " fontfix       修复由某些程序崩溃造成的字体难看(如.net崩溃造成的)."

msgid " fontsmooth-bgr        Enables subpixel smoothing for BGR LCDs"
msgstr " fontsmooth-bgr        为BGR液晶显示器启用亚像素平滑"

msgid " fontsmooth-disable    Disables font smoothing"
msgstr " fontsmooth-disable    禁用字体平滑"

msgid " fontsmooth-gray       Enables grayscale font smoothing"
msgstr " fontsmooth-gray       启用字体平滑灰度"

msgid " fontsmooth-rgb        Enables subpixel smoothing for RGB LCDs"
msgstr " fontsmooth-rgb        为RGB(三原色)液晶显示器启用亚像素字体平滑"

msgid " gdiplus       MS gdiplus.dll"
msgstr " gdiplus       微软GDI图形设备接口界面模块动态链接库"

msgid ""
" gecko-dbg     The HTML rendering Engine (Mozilla), with debugging symbols"
msgstr " gecko-dbg     HTML渲染引擎调试(Mozilla), 具有调试符号"

msgid " gecko         The HTML rendering Engine (Mozilla)"
msgstr " gecko         HTML渲染引擎(Mozilla)"

msgid ""
" hosts         Adds empty C: windows system32 drivers etc {hosts,services} "
"files"
msgstr ""
" hosts         向C: windows system32 drivers etc {hosts,services}添加文件"

msgid " ie6           Microsoft Internet Explorer 6.0"
msgstr " ie6           微软浏览器Internet Explorer 6.0"

msgid " ie7           Microsoft Internet Explorer 7.0"
msgstr " ie7           微软浏览器Internet Explorer 7.0"

msgid " jet40         MS Jet 4.0 Service Pack 8"
msgstr ""
" jet40         Windows XP 的 Jet 4.0 文件型数据库(如Microsoft Access、"
"Microsoft Excel、dBase等)引擎"

msgid " kde           KDE for Windows installer"
msgstr " kde           KDE桌面环境中的Windows安装器"

msgid " liberation    Red Hat Liberation fonts (Sans, Serif, Mono)"
msgstr " liberation    红帽子Liberation字体(Sans, Serif, Mono)"

msgid " mdac25        MS MDAC 2.5: Microsoft ODBC drivers, etc."
msgstr " mdac25        微软数据访问核心组件MDAC 2.5,如提供ODBC驱动。"

msgid " mdac27        MS MDAC 2.7"
msgstr " mdac27        微软数据访问核心组件MDAC 2.7"

msgid " mdac28        MS MDAC 2.8"
msgstr " mdac28        微软数据访问核心组件MDAC 2.7"

msgid ""
" mfc40         MS mfc40 (Microsoft Foundation Classes from Visual C++ 4)"
msgstr ""
" mfc40         微软基础类库mfc40 (源自Visual C++ 4),用于界面风格、语种、数据"
"库开发支持、打印支持、自动化支持、ActiveX支持、网络支持、基于HTML的帮助文档支"
"持等"

msgid " mfc42         MS mfc42 (same as vcrun6 below)"
msgstr " mfc42         微软基础类库mfc42 (与下面的vcrun6相同)"

msgid " mingw-gdb     GDB for MinGW"
msgstr " mingw-gdb     c|c++编译器MinGW组件GDB"

msgid " mingw         Minimalist GNU for Windows, including GCC for Windows!"
msgstr " mingw         c|c++编译器MinGW, 包含GCC的windows版本"

msgid " mono20        mono-2.0.1"
msgstr " mono20        Linux下的.NET开源工具mono-2.0.1"

msgid " mono22        mono-2.2"
msgstr " mono22        Linux下的.NET开源工具mono-2.2"

msgid " mono24        mono-2.4"
msgstr " mono22        Linux下的.NET开源工具mono-2.4"

msgid " mono26        mono-2.6"
msgstr " mono22        Linux下的.NET开源工具mono-2.6"

msgid " mozillabuild  Mozilla build environment"
msgstr " mozillabuild  Mozilla编译环境"

msgid " mpc           Media Player Classic"
msgstr ""
" mpc           媒体播放器MPC,与微软的媒体播放器Media Player不同,这是个开源"
"的播放器"

msgid " mshflxgd      MS Hierarchical Flex Grid Control"
msgstr " mshflxgd      微软分层Flex网格控件,"

msgid " msi2          MS Installer 2.0"
msgstr " msi2          微软软件安装器 2.0"

msgid " msls31        MS Line Services 3.1 (needed by native riched?)"
msgstr " msls31        微软在线服务3.1 (为原生riched所需?)"

msgid " msmask        MS Masked Edit Control"
msgstr ""
" msmask        微软屏蔽编辑控件,类似文本框 (TextBox) 控件,提供受限制数据输"
"入和格式化数据输出"

msgid " mspaint       MS Paint (gotta draw stick figures somehow...)"
msgstr " mspaint       微软画图工具(如画棒状图形等)"

msgid " msscript      MS Script Control"
msgstr " msscript      微软应用程序脚本化ActiveX(R) 控件"

msgid " msxml3        MS XML version 3"
msgstr " msxml3        微软XML解析器3"

msgid " msxml4        MS XML version 4"
msgstr " msxml4        微软XML解析器4"

msgid " msxml6        MS XML version 6"
msgstr " msxml4        微软XML解析器6"

msgid ""
" ogg           ogg filters/codecs: flac, theora, speex, vorbis, schroedinger"
msgstr ""
" ogg           ogg过滤器/编码器: flac, theora, speex, vorbis, schroedinger"

msgid " ole2          MS 16 bit OLE"
msgstr " ole2          微软16位自动化链接和嵌入控件OLE"

msgid " openwatcom    Open Watcom C/C++ compiler (can compile win16 code!)"
msgstr " openwatcom    开源Watcom C/C++ 16/32位系统编译器Watcom"

msgid " pdh           MS pdh.dll (Performance Data Helper)"
msgstr " pdh           微软性能数据助手pdh动态链接库"

msgid " physx         NVIDIA/AGEIA PhysX runtime"
msgstr " physx         NVIDIA/AGEIA PhysX显卡物理加速运行环境"

msgid " psdk2003      MS Platform SDK 2003"
msgstr ""
" psdk2003      微软Windows操作系统开发包 PSDK 2003(不包括.NET框架编程模型,"
"适合与vista以前的系统)"

msgid " psdkvista     MS Vista SDK (does not install yet)"
msgstr " psdkvista     微软Windows vista操作系统开发包(目前已经替代了PSDK)"

msgid ""
" psdkwin7      MS Windows 7 SDK (installing just headers and c++ compiler "
"works)"
msgstr " psdkwin7      微软Windows 7操作系统开发包 (只安装头文件和c++编译环境)"

msgid " python26      Python 2.6.2 (and pywin32)"
msgstr " python26      Python 2.6.2 (及pywin32)"

msgid " python-comtypes Python 0.6.1-1 comtypes package"
msgstr " python-comtypes Python 0.6.1-1 Com类型包"

msgid " quartz        quartz.dll (from Directx 9 user redistributable)"
msgstr ""
" quartz        quartz调度动态链接库,解决WINDOWS多媒体和游戏流媒体调度(来自"
"Directx 9重发布)"

msgid " quicktime72   Apple Quicktime 7.2"
msgstr " quicktime72   苹果播放器Quicktime 7.2"

msgid " riched20      MS riched20 and riched32"
msgstr ""
" riched20      微软Richedit控件2.0/3.0,包含了iched20和riched32,用于文本的高"
"级输入与编辑控制"

msgid " riched30      MS riched30"
msgstr " riched30      微软Richedit控件,包含riched30"

msgid " richtx32      MS Rich TextBox Control 6.0"
msgstr " richtx32      微软富文本框控件 6.0"

msgid " shockwave     Adobe Shockwave Player"
msgstr ""
" shockwave     Adobe Shockwave播放器,用于播放Director Shockwave Studio制作的"
"网页,当然也包括flash网页"

msgid " steam         Steam Client App from Valve"
msgstr " steam         来自Valve公司的Steam客户端游戏程序"

msgid " tahoma        MS Tahoma font (not part of corefonts)"
msgstr ""
" tahoma        微软Tahoma字体(无衬线字体,字符间距较小,对Unicode字集支援范围"
"较大,非微软核心字体)"

msgid " urlmon        MS urlmon.dll"
msgstr " urlmon        微软网址监视服务动态链接库Urlmon"

msgid " usp10         MS usp10.dll (Uniscribe)"
msgstr ""
" usp10         微软Unicode文字正确演示动态链接库——Unicode文字系统处理器usp10"

msgid " utorrent      uTorrent"
msgstr " utorrent      小巧BT客户端程序uTorrent"

msgid " vb2run        MS Visual Basic 2 runtime"
msgstr " vb2run        微软Visual Basic 2运行环境"

msgid " vb3run        MS Visual Basic 3 runtime"
msgstr " vb3run        微软Visual Basic 3运行环境"

msgid " vb4run        MS Visual Basic 4 runtime"
msgstr " vb3run        微软Visual Basic 4运行环境"

msgid " vb5run        MS Visual Basic 5 runtime"
msgstr " vb3run        微软Visual Basic 5运行环境"

msgid " vb6run        MS Visual Basic 6 Service Pack 6 runtime"
msgstr " vb3run        微软Visual Basic 6运行环境"

msgid " vc2005express MS Visual C++ 2005 Express"
msgstr " vc2005express 微软Visual C++ 2005 Express"

msgid " vc2005expresssp1 MS Visual C++ 2005 Express SP1 (does not work yet)"
msgstr " vc2005expresssp1 微软Visual C++ 2005 Express补丁1(可能不能工作)"

msgid ""
" vc2005sp1     MS Visual C++ 2005 Service Pack 1 and ATL fix (install trial "
"1st)"
msgstr ""
" vc2005sp1     微软Visual C++ 2005Service Pack 1及ATL修复 (需先安装Service "
"Pack测试版)"

msgid " vc2005hotfix  MS Visual C++ 2005 hotfixes (install sp1 1st)"
msgstr " vc2005hotfix  微软Visual C++ 2005漏洞修复 (需首先安装补丁1)"

msgid " vc2005trial   MS Visual C++ 2005 Trial"
msgstr " vc2005trial   微软Visual C++ 2005测试版"

msgid " vcrun2003     MS Visual C++ 2003 libraries (mfc71,msvcp71,msvcr71)"
msgstr " vcrun2003     微软Visual C++ 2003库文件 (包括mfc71、msvcp71和msvcr71)"

msgid " vcrun2005     MS Visual C++ 2005 sp1 libraries (mfc80,msvcp80,msvcr80)"
msgstr ""
" vcrun2005     微软Visual C++ 2005补丁1库文件(包括mfc80、msvcp80和msvcr80)"

msgid " vcrun2008     MS Visual C++ 2008 libraries (mfc90,msvcp90,msvcr90)"
msgstr " vcrun2008     微软Visual C++ 2008库文件(包括mfc90、msvcp90和msvcr90)"

msgid " vcrun6        MS Visual C++ 6 sp4 libraries (mfc42, msvcp60, msvcrt)"
msgstr " vcrun6        微软Visual C++ 6补丁4库文件(包括mfc42、msvcp60和msvcrt)"

msgid ""
" vcrun6sp6     MS Visual C++ 6 sp6 libraries (mfc42, msvcp60, msvcrt; 64 MB "
"download)"
msgstr ""
" vcrun6sp6     微软Visual C++ 6补丁6库文件(包括mfc42、msvcp60和msvcrt,共需下"
"载64 MB)"

msgid " vjrun20       MS Visual J# 2.0 SE libraries (requires dotnet20)"
msgstr " vjrun20       微软Visual J# 2.0 SE库文件(需同时安装dotnet20)"

msgid " vlc           VLC media player"
msgstr ""
" vlc           VLC媒体播放器,可播放PEG-1、MPEG-2、MPEG-4、DivX、DVD/VCD、数"
"字卫星频道、数字地球电视频道、以及IPv4、IPv6网络影片"

msgid ""
" wenquanyi     WenQuanYi CJK font (on LCD looks better with fontsmooth-rgb)"
msgstr ""
" wenquanyi     WenQuanYi CJK字体(借助字体平滑-rgb,可使液晶显示器看起来更舒"
"服)"

msgid " windowscodecs MS Windows Imaging Component"
msgstr " windowscodecs 微软窗口图形处理组件"

msgid ""
" wininet       MS wininet.dll (requires Windows license, but does not check "
"for one)"
msgstr ""
" wininet       微软Win32网络扩展接口wininet动态链接库(需视窗证书,但安装过程"
"不会检测)"

msgid ""
" wme9          MS Windows Media Encoder 9 (requires Windows license, but "
"does not check for one)"
msgstr " wme9          微软媒体解码器9 (需视窗证书,但安装过程不会检测)"

msgid ""
" wmp10         MS Windows Media Player 10 (requires Windows license, but "
"does not check for one)"
msgstr " wmp10         微软媒体播放 10 (需视窗证书,但安装过程不会检测)"

msgid ""
" wmp9          MS Windows Media Player 9 (requires Windows license, but does "
"not check for one)"
msgstr " wmp9          微软媒体播放 9 (需视窗证书,但安装过程不会检测)"

msgid " wsh56js       MS Windows scripting 5.6, jscript only, no cscript"
msgstr " wsh56js       微软Windows脚本 5.6,仅含jscript,无cscript"

msgid " wsh56         MS Windows Scripting Host 5.6"
msgstr " wsh56         微软Windows脚本宿主 5.6"

msgid " wsh56vb       MS Windows scripting 5.6, vbscript only, no cscript"
msgstr " wsh56vb       微软Windows脚本 5.6,仅含vbscript,无cscript"

msgid " xact          MS XACT Engine (x3daudio?_?.dll, xactengine?_?.dll)"
msgstr ""
" xact          微软跨平台音效制作工具XACT引擎(包括x3daudio?_?.dll和"
"xactengine?_?.dll)"

msgid " xvid          xvid video codec"
msgstr " xvid          xvid视频编码,基于OpenDivX的mpeg-4解码器"

msgid "Pseudopackages:"
msgstr "虚拟包"

msgid ""
" alldlls=builtin  Force use of builtin dlls (even if loaded with absolute "
"path) (except for msvcp80 and d3dx9_*)"
msgstr ""
" alldlls=builtin  强制使用内置动态链接库文件dlls (即使装载的是绝对路径) (除"
"msvcp80和d3dx9_*外)"

msgid " alldlls=default  Remove all DLL overrides"
msgstr " alldlls=default  移除所有DLL覆盖"

msgid " allfonts      All listed fonts (corefonts, tahoma, liberation)"
msgstr " allfonts      所有字体(corefonts、tahoma和liberation)"

msgid " allcodecs     All listed codecs (xvid, ffdshow)"
msgstr " allcodecs     所有编码器 (xvid和ffdshow)"

msgid " ddr=gdi       Set DirectDrawRenderer to GDI (default)"
msgstr " ddr=gdi       开启GDI Direct绘制渲染模式(DirectDrawRenderer)(默认)"

msgid " ddr=opengl    Set DirectDrawRenderer to OpenGL"
msgstr " ddr=opengl    开启OpenGL Direct绘制渲染模式(DirectDrawRenderer)"

msgid " dsoundbug9612 Use DirectSound MaxShadowSize=0 workaround for bug #9612"
msgstr ""
" dsoundbug9612 使用DirectSound MaxShadowSize=0以获取解决(调试#9612错误)"

msgid " fakeie6       Set registry to claim IE6sp1 is installed"
msgstr " fakeie6       注册声明微软浏览器IE6sp1已安装"

msgid " forcemono     Force using mono instead of .Net (for debugging)"
msgstr " forcemono     强制使用Mono,而不使用.Net (调试用)"

msgid " glsl-disable  Disable GLSL use by Wine Direct3D"
msgstr " glsl-disable  禁用 Wine Direct3D使用OpenGL着色语言GLSL(默认)"

msgid " glsl-enable   Enable GLSL use by Wine Direct3D (default)"
msgstr " glsl-enable   启用 使Wine Direct3D使用OpenGL着色语言GLSL(默认)"

msgid " heapcheck     Enable heap checking"
msgstr " heapcheck     启用 堆检查"

msgid " multisampling=enabled  Enable Direct3D multisampling"
msgstr " multisampling=enabled  启用 Direct3D抗锯齿技术"

msgid " multisampling=disabled Disable Direct3D multisampling (default)"
msgstr " multisampling=disabled 禁用 Direct3D抗锯齿技术(默认)"

msgid " native_mdac   Override odbc32, odbccp32 and oledb32"
msgstr ""
" native_mdac   取消 odbc32(窗式驱动程序管理和数据源管理)、odbccp32(ODBC数"
"据库驱动安装动态链接库)和oledb32(.net接数据库用的库)"

msgid " native_oleaut32 Override oleaut32"
msgstr " native_oleaut32 取消 oleaut32(对象链接与嵌入OLE相关文件)"

msgid " nocrashdialog Disable the graphical crash dialog"
msgstr " nocrashdialog 禁用 图形崩溃对话框"

msgid " orm=backbuffer Registry tweak: OffscreenRenderingMode=backbuffer"
msgstr " orm=backbuffer 注册 调整: OffscreenRenderingMode=backbuffer"

msgid " orm=fbo        Registry tweak: OffscreenRenderingMode=fbo (default)"
msgstr " orm=fbo        注册 调整: OffscreenRenderingMode=fbo (默认)"

msgid " orm=pbuffer    Registry tweak: OffscreenRenderingMode=pbuffer"
msgstr " orm=pbuffer    注册 调整: OffscreenRenderingMode=pbuffer"

msgid " rtlm=auto      Set RenderTargetLockMode to auto (default)"
msgstr " rtlm=auto      自动开启渲染目标锁定模式(RenderTargetLockMode)(默认)"

msgid " rtlm=disabled  Set RenderTargetLockMode to disabled"
msgstr " rtlm=disabled  禁用渲染目标锁定模式(RenderTargetLockMode)"

msgid " rtlm=readdraw  Set RenderTargetLockMode to readdraw"
msgstr ""
" rtlm=readdraw  将渲染目标锁定模式(RenderTargetLockMode)为glReadPixels读取"
"及内存像素glDrawPixels绘制模式(readdraw)"

msgid " rtlm=readtex   Set RenderTargetLockMode to readtex"
msgstr ""
" rtlm=readtex   将渲染目标锁定模式(RenderTargetLockMode)为纹理立方体"
"(textured quad)再绘制及glReadPixels像素读取模式(readtex)"

msgid " rtlm=texdraw   Set RenderTargetLockMode to texdraw"
msgstr ""
" rtlm=texdraw   将渲染目标锁定模式(RenderTargetLockMode)为内存像素"
"glDrawPixels绘制及纹理回读模式(texdraw)"

msgid " rtlm=textex    Set RenderTargetLockMode to textex"
msgstr ""
" rtlm=textex    将渲染目标锁定模式(RenderTargetLockMode)为纹理立方体"
"(textured quad)绘制及纹理回读模式(textex)"

msgid " sandbox        Sandbox the wineprefix - remove links to ~"
msgstr " sandbox        沙盘技术 wine前缀 - 将链接移动到 ~"

msgid " sound=alsa       Set sound driver to ALSA"
msgstr " sound=alsa       将声卡驱动设置为ALSA"

msgid " sound=audioio    Set sound driver to AudioIO"
msgstr " sound=audioio    将声卡驱动设置为AudioIO"

msgid " sound=coreaudio  Set sound driver to CoreAudio"
msgstr " sound=coreaudio  将声卡驱动设置为CoreAudio"

msgid " sound=esd        Set sound driver to Esound"
msgstr " sound=esd        将声卡驱动设置为Esound"

msgid " sound=jack       Set sound driver to Jack"
msgstr " sound=jack       将声卡驱动设置为Jack"

msgid " sound=nas        Set sound driver to Nas"
msgstr " sound=nas        将声卡驱动设置为Nas"

msgid " sound=oss        Set sound driver to OSS"
msgstr " sound=oss        将声卡驱动设置为OSS"

msgid " sound=disabled   Disable sound"
msgstr " sound=disabled   禁用 声音"

msgid " strictdrawordering=enabled Enable StrictDrawOrdering (default)"
msgstr " strictdrawordering=enabled 启用 严格的作图顺序(默认)"

msgid " strictdrawordering=disabled Disable StrictDrawOrdering"
msgstr " strictdrawordering=disabled 禁用 严格的作图顺序"

msgid " nt40          Set windows version to nt40"
msgstr ""

msgid " win98         Set windows version to Windows 98"
msgstr " win98         设置wine运行环境为Windows 98"

msgid " win2k         Set windows version to Windows 2000"
msgstr " win2k         设置wine运行环境为Windows 2000"

msgid " winxp         Set windows version to Windows XP"
msgstr " winxp         设置wine运行环境为Windows Xp"

msgid " vista         Set windows version to Windows Vista"
msgstr " vista         设置wine运行环境为Windows Vista"

msgid " win7          Set windows version to Windows 7"
msgstr " win7          设置wine运行环境为Windows 7"

msgid " winver=       Set windows version to default (winxp)"
msgstr " winver=       设置wine运行环境为默认Windows Xp"

msgid ""
" volnum        Rename drive_c to harddiskvolume0 (needed by some installers)"
msgstr "volnum        重链接虚拟 C: 盘 (某些安装程序需要)"

msgid " mwo=force\t Set MouseWarpOverride to force (needded by some games)"
msgstr ""
" mwo=force\t 强制打开鼠标变形忽略模式(MouseWarpOverride)(有些游戏需要)"

msgid " mwo=enabled   Set MouseWarpOverride to enabled (default)"
msgstr " mwo=enabled   打开鼠标变形忽略模式(MouseWarpOverride)(默认)"

msgid " mwo=disabled  Set MouseWarpOverride to disabled"
msgstr " mwo=disabled  禁用鼠标变形忽略模式(MouseWarpOverride)"

msgid " npm-repack    Set NonPower2Mode to repack"
msgstr ""
" npm-repack     打开动力丧失模式(NonPower2Mode)重填模式,该选项会启用游戏,"
"如“赛车/战车“(战锤 40K)动力丧失下的重恢复功能。"

msgid " psm=on        Set PixelShaderMode to enabled"
msgstr " psm=on        启用像素着色器模式(PixelShaderMode)"

msgid " psm=off       Set PixelShaderMode to disabled"
msgstr " psm=off       禁用像素着色器模式(PixelShaderMode)"

msgid " vsm-hard      Set VertexShaderMode to hardware"
msgstr " vsm-hard      打开硬件顶点着色器模式(VertexShaderMode)"

msgid "Select a package to install"
msgstr "选择要安装的 Windows依赖包"

msgid "Install the dependent packges into wine enviroment"
msgstr "安装 Windows依赖包到Wine虚拟环境"

msgid "Package"
msgstr "依赖包"

msgid "Description"
msgstr "描述"
头像
xiooli
帖子: 6956
注册时间: 2007-11-19 21:51
来自: 成都
联系:

Re: 如何将winetricks中文化?

#2

帖子 xiooli » 2010-07-30 15:02

头像
biowee
帖子: 287
注册时间: 2006-07-31 22:55
联系:

Re: 如何将winetricks中文化?

#3

帖子 biowee » 2010-07-30 21:23

你提及到的示例实现中文化,没有问题。我在winetricks脚本中加入了下面的语句

代码: 全选

export TEXTDOMAINDIR=/usr/share/locale
export TEXTDOMAIN=winetricks
并把winetricks脚本中的echo对应的语句修改为echo "$(gettext -s xxxx)",随后,将对应的winetricks.po(见附件)转为winetricks.mo放置到/usr/share/locale/zh_CN之下。随即,运行winetricks脚本(脚本见附件),但却显示./winetricks: 456: Syntax error: "}" unexpected (expecting ")")。于是,根据错误提示,看到winetricks中需要翻译的字段位于下面语法中:

代码: 全选

usage() {
    set +x
    # WARNING: do not use single quote in any package description; that breaks the gui menu.
    echo "Usage: $0 [options] package [package] ..."
    echo "This script can help you prepare your system for Windows applications"
    echo "that mistakenly assume all users' systems have all the needed"
    echo "redistributable runtime libraries or fonts."
    echo "Some options require the Linux 'cabextract' program."
    echo ""
    echo "Options:"
    echo " -q         quiet.  You must have already agreed to the EULAs."
    echo " -v         verbose"
    echo " -V         display Version"
    echo "Packages:"
    echo " 7zip          7-zip file archiver"
    echo " adobeair      Adobe AIR runtime"
    echo " art2kmin      MS Access 2007 runtime"
    echo " atmlib        Adobe Type Manager. Needed for Adobe CS4"
    echo " autohotkey    Autohotkey (open source gui scripting language)"
    echo " cmake         CMake, the cross-platform, open-source build system"
    echo " colorprofile  Standard RGB color profile"
    echo " comctl32      MS common controls 5.80"
    echo " comctl32.ocx  MS comctl32.ocx and mscomctl.ocx, comctl32 wrappers for VB6"
    echo " controlpad    MS ActiveX Control Pad"
    echo " corefonts     MS Arial, Courier, Times fonts"
    echo " cygwin        Unix apps for Windows (needed by some build scripts)"
    echo " d3dx9         MS d3dx9_??.dll (from DirectX 9 user redistributable)"
    echo " d3dx9_28      MS d3dx9_28.dll"
    echo " d3dx9_36      MS d3dx9_36.dll"
    echo " d3dx10        MS d3dx10_??.dll (from DirectX user redistributable)"
    echo " d3dxof        MS d3dxof.dll (from DirectX user redistributable)"
    echo " dcom98        MS DCOM (ole32, oleaut32); requires Windows 98 license, but does not check for one"
    echo " dinput8       MS dinput8.dll (from DirectX 9 user redistributable)"
    echo " dirac0.8      the obsolete Dirac 0.8 directshow filter"
    echo " directmusic   MS DirectMusic (from DirectX 9 user redistributable)"
    echo " directplay    MS DirectPlay (from DirectX 9 user redistributable)"
    echo " directx9      MS DirectX 9 user redistributable (not recommended! use d3dx9 instead)"
    echo " directx9-beta MS DirectX 9 user redistributable - beta verb (not recommended! use d3dx9 instead)"
    echo " divx          divx video codec"
    echo " dotnet11      MS .NET 1.1 (requires Windows license, but does not check for one)"
    echo " dotnet20      MS .NET 2.0 (requires Windows license, but does not check for one)"
    echo " dotnet20sp2   MS .NET 2.0 sp2 (requires Windows license, but does not check for one)"
    echo " dotnet30      MS .NET 3.0 (requires Windows license, but does not check for one, might not work yet)"
    echo " droid         Droid fonts (on LCD, looks better with fontsmooth-rgb)"
    echo " dxsdk_nov2006 DirectX Software Development Kit, November 2006 version"
    echo " ffdshow       ffdshow video codecs"
    echo " firefox       Firefox web browser"
    echo " flash         Adobe Flash Player ActiveX and firefox plugins"
    echo " fm20          MS Forms 2.0 Object Library"
    echo " fontfix       Fix bad fonts which cause crash in some apps (e.g. .net)."
    echo " fontsmooth-bgr        Enables subpixel smoothing for BGR LCDs"
    echo " fontsmooth-disable    Disables font smoothing"
    echo " fontsmooth-gray       Enables grayscale font smoothing"
    echo " fontsmooth-rgb        Enables subpixel smoothing for RGB LCDs"
    echo " gdiplus       MS gdiplus.dll"
    echo " gecko-dbg     The HTML rendering Engine (Mozilla), with debugging symbols"
    echo " gecko         The HTML rendering Engine (Mozilla)"
    echo " hosts         Adds empty C:\windows\system32\drivers\etc\{hosts,services} files"
    echo " ie6           Microsoft Internet Explorer 6.0"
    echo " ie7           Microsoft Internet Explorer 7.0"
    echo " jet40         MS Jet 4.0 Service Pack 8"
    echo " kde           KDE for Windows installer"
    echo " liberation    Red Hat Liberation fonts (Sans, Serif, Mono)"
    echo " mdac25        MS MDAC 2.5: Microsoft ODBC drivers, etc."
    echo " mdac27        MS MDAC 2.7"
    echo " mdac28        MS MDAC 2.8"
    echo " mfc40         MS mfc40 (Microsoft Foundation Classes from Visual C++ 4)"
    echo " mfc42         MS mfc42 (same as vcrun6 below)"
    echo " mingw-gdb     GDB for MinGW"
    echo " mingw         Minimalist GNU for Windows, including GCC for Windows!"
    echo " mono20        mono-2.0.1"
    echo " mono22        mono-2.2"
    echo " mono24        mono-2.4"
    echo " mono26        mono-2.6"
    echo " mozillabuild  Mozilla build environment"
    echo " mpc           Media Player Classic"
    echo " mshflxgd      MS Hierarchical Flex Grid Control"
    echo " msi2          MS Installer 2.0"
    echo " msls31        MS Line Services 3.1 (needed by native riched?)"
    echo " msmask        MS Masked Edit Control"
    echo " mspaint       MS Paint (gotta draw stick figures somehow...)"
    echo " msscript      MS Script Control"
    echo " msxml3        MS XML version 3"
    echo " msxml4        MS XML version 4"
    echo " msxml6        MS XML version 6"
    echo " ogg           ogg filters/codecs: flac, theora, speex, vorbis, schroedinger"
    echo " ole2          MS 16 bit OLE"
    echo " openwatcom    Open Watcom C/C++ compiler (can compile win16 code!)"
    echo " pdh           MS pdh.dll (Performance Data Helper)"
    echo " physx         NVIDIA/AGEIA PhysX runtime"
    echo " psdk2003      MS Platform SDK 2003"
    echo " psdkvista     MS Vista SDK (does not install yet)"
    echo " psdkwin7      MS Windows 7 SDK (installing just headers and c++ compiler works)"
    echo " python26      Python 2.6.2 (and pywin32)"
    echo " python-comtypes Python 0.6.1-1 comtypes package"
    echo " quartz        quartz.dll (from Directx 9 user redistributable)"
    echo " quicktime72   Apple Quicktime 7.2"
    echo " riched20      MS riched20 and riched32"
    echo " riched30      MS riched30"
    echo " richtx32      MS Rich TextBox Control 6.0"
    echo " shockwave     Adobe Shockwave Player"
    echo " steam         Steam Client App from Valve"
    echo " tahoma        MS Tahoma font (not part of corefonts)"
    echo " urlmon        MS urlmon.dll"
    echo " usp10         MS usp10.dll (Uniscribe)"
    echo " utorrent      uTorrent"
    echo " vb2run        MS Visual Basic 2 runtime"
    echo " vb3run        MS Visual Basic 3 runtime"
    echo " vb4run        MS Visual Basic 4 runtime"
    echo " vb5run        MS Visual Basic 5 runtime"
    echo " vb6run        MS Visual Basic 6 Service Pack 6 runtime"
    echo " vc2005express MS Visual C++ 2005 Express"
    echo " vc2005expresssp1 MS Visual C++ 2005 Express SP1 (does not work yet)"
    echo " vc2005sp1     MS Visual C++ 2005 Service Pack 1 and ATL fix (install trial 1st)"
    echo " vc2005hotfix  MS Visual C++ 2005 hotfixes (install sp1 1st)"
    echo " vc2005trial   MS Visual C++ 2005 Trial"
    echo " vcrun2003     MS Visual C++ 2003 libraries (mfc71,msvcp71,msvcr71)"
    echo " vcrun2005     MS Visual C++ 2005 sp1 libraries (mfc80,msvcp80,msvcr80)"
    echo " vcrun2008     MS Visual C++ 2008 libraries (mfc90,msvcp90,msvcr90)"
    echo " vcrun6        MS Visual C++ 6 sp4 libraries (mfc42, msvcp60, msvcrt)"
    echo " vcrun6sp6     MS Visual C++ 6 sp6 libraries (mfc42, msvcp60, msvcrt; 64 MB download)"
    echo " vjrun20       MS Visual J# 2.0 SE libraries (requires dotnet20)"
    echo " vlc           VLC media player"
    echo " wenquanyi     WenQuanYi CJK font (on LCD looks better with fontsmooth-rgb)"
    echo " windowscodecs MS Windows Imaging Component"
    echo " wininet       MS wininet.dll (requires Windows license, but does not check for one)"
    echo " wme9          MS Windows Media Encoder 9 (requires Windows license, but does not check for one)"
    echo " wmp10         MS Windows Media Player 10 (requires Windows license, but does not check for one)"
    echo " wmp9          MS Windows Media Player 9 (requires Windows license, but does not check for one)"
    echo " wsh56js       MS Windows scripting 5.6, jscript only, no cscript"
    echo " wsh56         MS Windows Scripting Host 5.6"
    echo " wsh56vb       MS Windows scripting 5.6, vbscript only, no cscript"
    echo " xact          MS XACT Engine (x3daudio?_?.dll, xactengine?_?.dll)"
    echo " xvid          xvid video codec"
    echo "Pseudopackages:"
    echo " alldlls=builtin  Force use of builtin dlls (even if loaded with absolute path) (except for msvcp80 and d3dx9_*)"
    echo " alldlls=default  Remove all DLL overrides"
    echo " allfonts      All listed fonts (corefonts, tahoma, liberation)"
    echo " allcodecs     All listed codecs (xvid, ffdshow)"
    echo " ddr=gdi       Set DirectDrawRenderer to GDI (default)"
    echo " ddr=opengl    Set DirectDrawRenderer to OpenGL"
    echo " dsoundbug9612 Use DirectSound MaxShadowSize=0 workaround for bug #9612"
    echo " fakeie6       Set registry to claim IE6sp1 is installed"
    echo " forcemono     Force using mono instead of .Net (for debugging)"
    echo " glsl-disable  Disable GLSL use by Wine Direct3D"
    echo " glsl-enable   Enable GLSL use by Wine Direct3D (default)"
    echo " heapcheck     Enable heap checking"
    echo " multisampling=enabled  Enable Direct3D multisampling"
    echo " multisampling=disabled Disable Direct3D multisampling (default)"
    echo " native_mdac   Override odbc32, odbccp32 and oledb32"
    echo " native_oleaut32 Override oleaut32"
    echo " nocrashdialog Disable the graphical crash dialog"
    echo " orm=backbuffer Registry tweak: OffscreenRenderingMode=backbuffer"
    echo " orm=fbo        Registry tweak: OffscreenRenderingMode=fbo (default)"
    echo " orm=pbuffer    Registry tweak: OffscreenRenderingMode=pbuffer"
    echo " rtlm=auto      Set RenderTargetLockMode to auto (default)"
    echo " rtlm=disabled  Set RenderTargetLockMode to disabled"
    echo " rtlm=readdraw  Set RenderTargetLockMode to readdraw"
    echo " rtlm=readtex   Set RenderTargetLockMode to readtex"
    echo " rtlm=texdraw   Set RenderTargetLockMode to texdraw"
    echo " rtlm=textex    Set RenderTargetLockMode to textex"
    echo " sandbox        Sandbox the wineprefix - remove links to ~"
    echo " sound=alsa       Set sound driver to ALSA"
    echo " sound=audioio    Set sound driver to AudioIO"
    echo " sound=coreaudio  Set sound driver to CoreAudio"
    echo " sound=esd        Set sound driver to Esound"
    echo " sound=jack       Set sound driver to Jack"
    echo " sound=nas        Set sound driver to Nas"
    echo " sound=oss        Set sound driver to OSS"
    echo " sound=disabled   Disable sound"
    echo " strictdrawordering=enabled Enable StrictDrawOrdering (default)"
    echo " strictdrawordering=disabled Disable StrictDrawOrdering"
    echo " nt40          Set windows version to nt40"
    echo " win98         Set windows version to Windows 98"
    echo " win2k         Set windows version to Windows 2000"
    echo " winxp         Set windows version to Windows XP"
    echo " vista         Set windows version to Windows Vista"
    echo " win7          Set windows version to Windows 7"
    echo " winver=       Set windows version to default (winxp)"
    echo " volnum        Rename drive_c to harddiskvolume0 (needed by some installers)"
    echo " mwo=force	 Set MouseWarpOverride to force (needded by some games"
    echo " mwo=enabled   Set MouseWarpOverride to enabled (default)"
    echo " mwo=disabled  Set MouseWarpOverride to disabled"
    echo " npm-repack    Set NonPower2Mode to repack"
    echo " psm=on        Set PixelShaderMode to enabled"
    echo " psm=off       Set PixelShaderMode to disabled"
    echo " vsm-hard      Set VertexShaderMode to hardware"
}
错误提示,echo "$(gettext -s xxxx)"不适合放在这个语法结构中,无法将要翻译的字段提取出来。那么,在winetricks这个脚本中应该加入怎样的语法语句,才能使gettext从中将字段提取出来,并自动到/usr/share/locale寻找其汉化文件,显示为中文界面结果?
附件
winetricks.tar.gz
(44.09 KiB) 已下载 108 次
winetricks.po.tar.gz
(8.94 KiB) 已下载 117 次
tusooa
帖子: 6548
注册时间: 2008-10-31 22:12
系统: 践兔
联系:

Re: 如何将winetricks中文化?

#4

帖子 tusooa » 2010-07-30 22:15

用Bash-Libraries吧。
改很小一点就行了。
把echo改成echog不就行了
ps:

代码: 全选

quiet
居然翻译成退出

代码: 全选

] ls -ld //
头像
biowee
帖子: 287
注册时间: 2006-07-31 22:55
联系:

Re: 如何将winetricks中文化?

#5

帖子 biowee » 2010-07-31 9:31

quiet
呵呵,将这个单词看错。谢谢提醒。正在查看你所提到的Bash-Libraries。
头像
biowee
帖子: 287
注册时间: 2006-07-31 22:55
联系:

Re: 如何将winetricks中文化?

#6

帖子 biowee » 2010-08-01 11:55

还是搞不定这个怎么做,没学编程,看来是不得要领,呵呵。请援手,谢谢!下面的代码,加入了几行,需要提取的字段区域已经标注在代码里。winetricks的原代码,见上面那个压缩文件。

代码: 全选

#!/bin/sh

####加入的代码,但不得要领
export TEXTDOMAINDIR=/usr/share/locale
export TEXTDOMAIN="winetricks"

i18n()
{
    gettext -- "winetricks"
}


#################
# Name of this version of winetricks (YYYYMMDD)
VERSION=20100618

early_wine()
{
    WINEDLLOVERRIDES=mshtml= $WINE "$@"
}

# Default values for important settings if not already in environment.
# These settings should not need editing here.
case "$OS" in
 "Windows_NT")
    # Cheezy fix for getting rid of double slashes when running cygwin in wine
    case $HOME in
      /) HOME="" ;;
    esac
    WINE=""
    WINEPREFIX=${WINEPREFIX:-$HOME/.wine}
    DRIVE_C="C:/"
    XXXPATH=cygpath
    ;;
 *)
    WINE=${WINE:-wine}
    WINEPREFIX=${WINEPREFIX:-$HOME/.wine}
    DRIVE_C="$WINEPREFIX/dosdevices/c:"
    XXXPATH="early_wine winepath"
    ;;
esac

# Internal variables; these locations are not too important
WINETRICKS_CACHE="${WINETRICKS_CACHE:-$HOME/.winetrickscache}"
WINETRICKS_CACHE_WIN="`$XXXPATH -w $WINETRICKS_CACHE | tr '\012' ' ' | sed 's/ $//'`"
WINETRICKS_TMP="$DRIVE_C"/winetrickstmp
WINETRICKS_TMP_WIN='c:\winetrickstmp'
mkdir -p $WINETRICKS_TMP

# Handle case where z: doesn't exist
if test "$WINETRICKS_CACHE_WIN" = ""
then
    # WINETRICKS_CACHE isn't accessible via a drive letter mapping, so make one,
    # but be sure to clean it up later.
    for letter in y x w v u t s r q
    do
        if ! test -d "$WINEPREFIX"/dosdevices/${letter}:
        then
            WINETRICKS_CACHE_SYMLINK="$WINEPREFIX"/dosdevices/${letter}:
            ln -sf "$WINETRICKS_CACHE" "$WINETRICKS_CACHE_SYMLINK"
            break
        fi
    done
fi

# Overridden for windows
ISO_MOUNT_ROOT=/mnt/winetricks

WINDIR="$DRIVE_C/windows"

# Which sourceforge mirror to use.  Rotate based on time, since
# their mirror picker sometimes persistantly sends you to a broken
# mirror.
case `date +%S` in
*[01]) SOURCEFORGE=http://internap.dl.sourceforge.net/sourceforge ;;
*[23]) SOURCEFORGE=http://easynews.dl.sourceforge.net/sourceforge ;;
*)     SOURCEFORGE=http://downloads.sourceforge.net;;
esac

#---- Functions -------------------------------------------------

# Detect which sudo to use
detect_sudo() {
    SUDO=sudo
    test "$GUI" = 1 || return
    if test x"$DISPLAY" != x""
    then
        if test -x "`which gksudo 2>/dev/null`"
        then
            SUDO=gksudo
        elif test -x "`which kdesudo 2>/dev/null`"
        then
            SUDO=kdesudo
        fi
    fi
}

# Detect which menu program to use
detect_menu() {
    # TODO: add 'dialog'
    MENU=xmessage
    if test -x "`which zenity 2>/dev/null`"
    then
        MENU=zenity
    elif test -x "`which kdialog 2>/dev/null`"
    then
        MENU=kdialog
    fi
}

warn() {
    echo "------------------------------------------------------"
    echo "$@"
    echo "------------------------------------------------------"

    test "$GUI" = 1 || return

    # For some reason, nulls were showing up in $@?!, causing truncated output in zenity
    msg="`echo $@ | tr '\000' ' '`"
    case $MENU in
    *zenity) zenity --error --title=Winetricks --text="$msg" --no-wrap;;
    *kdialog) kdialog --title Winetricks --error "$msg" ;;
    *xmessage) xmessage -title Winetricks -center "  Error: $msg  " ;;
    esac
}

die() {
    warn "$@"

    exit 1
}

# Abort if user doesn't own the given directory (or its parent, if it doesn't exist yet)
die_if_user_not_dirowner() {
    if test -d "$1"
    then
        checkdir="$1"
    else
        # fixme: quoting problem?
        checkdir=`dirname "$1"`
    fi
    nuser=`id -u`
    nowner=`ls -l -n -d -L "$checkdir" | awk '{print $3}'`
    if test x$nuser != x$nowner
    then
        die "You (`id -un`) don't own $checkdir. Don't run winetricks as another user!"
    fi
}

#----------------------------------------------------------------

usage() {
    set +x
    # WARNING: do not use single quote in any package description; that breaks the gui menu.
#######需要提取出来的字段翻译#################
    echo "Usage: $0 [options] package [package] ..."
    echo "This script can help you prepare your system for Windows applications"
    echo "that mistakenly assume all users' systems have all the needed"
    echo "redistributable runtime libraries or fonts."
    echo "Some options require the Linux 'cabextract' program."
    echo ""
    echo "Options:"
    echo " -q         quiet.  You must have already agreed to the EULAs."
    echo " -v         verbose"
    echo " -V         display Version"
    echo "Packages:"
    echo " 7zip          7-zip file archiver)"
    echo " adobeair      Adobe AIR runtime"
    echo " art2kmin      MS Access 2007 runtime"
    echo " atmlib        Adobe Type Manager. Needed for Adobe CS4"
    echo " autohotkey    Autohotkey (open source gui scripting language)"
    echo " cmake         CMake, the cross-platform, open-source build system"
    echo " colorprofile  Standard RGB color profile"
    echo " comctl32      MS common controls 5.80"
    echo " comctl32.ocx  MS comctl32.ocx and mscomctl.ocx, comctl32 wrappers for VB6"
    echo " controlpad    MS ActiveX Control Pad"
    echo " corefonts     MS Arial, Courier, Times fonts"
    echo " cygwin        Unix apps for Windows (needed by some build scripts)"
    echo " d3dx9         MS d3dx9_??.dll (from DirectX 9 user redistributable)"
    echo " d3dx9_28      MS d3dx9_28.dll"
    echo " d3dx9_36      MS d3dx9_36.dll"
    echo " d3dx10        MS d3dx10_??.dll (from DirectX user redistributable)"
    echo " d3dxof        MS d3dxof.dll (from DirectX user redistributable)"
    echo " dcom98        MS DCOM (ole32, oleaut32); requires Windows 98 license, but does not check for one"
    echo " dinput8       MS dinput8.dll (from DirectX 9 user redistributable)"
    echo " dirac0.8      the obsolete Dirac 0.8 directshow filter"
    echo " directmusic   MS DirectMusic (from DirectX 9 user redistributable)"
    echo " directplay    MS DirectPlay (from DirectX 9 user redistributable)"
    echo " directx9      MS DirectX 9 user redistributable (not recommended! use d3dx9 instead)"
    echo " directx9-beta MS DirectX 9 user redistributable - beta verb (not recommended! use d3dx9 instead)"
    echo " divx          divx video codec"
}
....
.....
...
Misaka__main
帖子: 1
注册时间: 2014-09-11 18:43
系统: BSD/Mach-XNU

Re: 如何将winetricks中文化?

#7

帖子 Misaka__main » 2014-09-11 18:46

实际上 Bash 有一个一直存在的但是没人写进文档的特性,那就是用 $"foo" 包裹字符串就可以 gettext 了……并且还有 bash --dump-op-strings <脚本名> 这种玩意可以生成 pot……

用的时候
TEXTDOMAIN="winetricks"
TEXTDOMAINDIR="/usr/share/locale"
就可以了……

似乎挖了楼主祖坟…………
回复