资源简介
52695064ext-2.2.zip
代码片段和文件信息
#!/usr/bin/env python
import sys os re
try:
import chardet
except ImportError:
print “You need universal encoding detector for this script“
print “ http://chardet.feedparser.org or apt-get install python-chardet“
sys.exit()
regexp_language = re.compile(“\* +(.+) +translation“ re.IGNORECASE)
js_template = “““/* This file is automaticly generated by create_language_js.py */
// some data used in the examples
Ext.namespace(‘Ext.exampledata‘);
// TODO: complete and sort the list
Ext.exampledata.languages = [
%s
];
“““
lang_dubs = {}
def lang_name(file):
language = os.path.basename(file)
m = regexp_language.search(open(file).read(512))
if m:
language = m.groups()[0]
if not lang_dubs.has_key(language):
lang_dubs[language] = file
else:
raise Exception(‘Duplicate language ‘+language+‘ for file ‘+file)
return language
def print_locale(lang_code):
print lang_code
sys.stdout.flush()
return True
def main():
base_dir = “../../src/locale“
base_file = lambda f: os.path.join(base_dir f)
try:
locales = os.listdir(base_dir)
except IOError:
print “Cannot find source locale directory: %s ... exiting“ % base_dir
sys.exit()
valid_file = lambda e: e.endswith(“.js“) and e.startswith(“ext-lang-“)
char_set = lambda f: chardet.detect(open(f).read())[‘encoding‘]
lang_code = lambda f: f[9:f.rfind(“.js“)]
info_set = lambda f: (lang_name(base_file(f)) (lang_code(f) char_set(base_file(f))))
locales = dict(info_set(file) for file in locales if valid_file(file) and print_locale(lang_code(file)))
print “... done“
locale_strarray = ‘\n‘.join([“\t[%r %r %r]“ % (code name charset) \
for name (code charset) in sorted(locales.items())])
# create languages.js
open(“languages.js“ “w“).write(js_template % locale_strarray)
print “saved %d languages to languages.js“ % len(locales)
if __name__==“__main__“:
main()
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2010-03-13 16:05 ext-2.2\
文件 11548 2008-08-04 19:30 ext-2.2\CHANGES.html
文件 974145 2008-08-04 18:54 ext-2.2\ext-all-debug.js
文件 538956 2008-08-04 19:33 ext-2.2\ext-all.js
文件 163794 2008-08-04 18:54 ext-2.2\ext-core-debug.js
文件 87524 2008-08-04 18:54 ext-2.2\ext-core.js
文件 893 2008-02-24 21:54 ext-2.2\INCLUDE_ORDER.txt
文件 1513 2008-08-04 19:51 ext-2.2\license.txt
目录 0 2010-03-13 16:05 ext-2.2\source\
文件 13881 2008-08-04 18:54 ext-2.2\source\debug.js
文件 59229 2008-08-04 18:52 ext-2.2\source\ext.jsb
文件 1513 2008-08-04 19:51 ext-2.2\source\license.txt
目录 0 2010-03-13 16:05 ext-2.2\source\widgets\
文件 7710 2008-08-04 18:54 ext-2.2\source\widgets\Action.js
文件 11651 2008-08-04 18:54 ext-2.2\source\widgets\BoxComponent.js
文件 18888 2008-08-04 18:54 ext-2.2\source\widgets\Button.js
文件 5075 2008-08-04 18:54 ext-2.2\source\widgets\ColorPalette.js
文件 33496 2008-08-04 18:54 ext-2.2\source\widgets\Component.js
文件 4143 2008-08-04 18:54 ext-2.2\source\widgets\ComponentMgr.js
文件 24985 2008-08-04 18:54 ext-2.2\source\widgets\Container.js
文件 6453 2008-08-04 18:54 ext-2.2\source\widgets\CycleButton.js
文件 25168 2008-08-04 18:54 ext-2.2\source\widgets\DataView.js
文件 25641 2008-08-04 18:54 ext-2.2\source\widgets\DatePicker.js
文件 12276 2008-08-04 18:54 ext-2.2\source\widgets\Editor.js
文件 13217 2008-08-04 18:54 ext-2.2\source\widgets\la
文件 3755 2008-08-04 18:54 ext-2.2\source\widgets\LoadMask.js
文件 26907 2008-08-04 18:54 ext-2.2\source\widgets\MessageBox.js
文件 10145 2008-08-04 18:54 ext-2.2\source\widgets\PagingToolbar.js
文件 49577 2008-08-04 18:54 ext-2.2\source\widgets\Panel.js
文件 4407 2008-08-04 18:54 ext-2.2\source\widgets\PanelDD.js
文件 11498 2008-08-04 18:54 ext-2.2\source\widgets\ProgressBar.js
............此处省略2115个文件信息
- 上一篇:How Spirent iTest Works
- 下一篇:安卓简单投票界面
相关资源
- GBT21061-2007国家电子政务网络技术和运
- Control.rar
- 信道建模与仿真.doc
- 特征工程指南完整版--------翻译来自毕
- 欺骗的艺术.pdf
- c高飞.rar
- lpm4xj.pdf
- TCPIP-杨宁.rar
- 有码神器Video-Enhancer-ha.zip
- sjfmuse_10513923.rar
- haproxy-1.7.8稳定绿色版.rar
- SpeedPan.exe
- at20000.rar
- AE创建各种类型的featureclass代码.doc
- CHUSEI3DWebcam.zip
- 信息简史.epub
- Puzzle.zip
- 例解回归分析中文第3版.pdf
- DSC_v1.2a.pdf
- bisa3.zip
- 1913557ListControl.rar
- 层次聚类.zip
- 英文版uml
- password_silence_4090716.zip
- 离散数学及其应用.rar
- SFHelper-Setup.exe
- STM32F103双ADC模式同步采集两通道电压
- DLT645_2007forkeil4.rar
- 1117325模型车牌生成器.rar
- _61850规约服务.pdf
评论
共有 条评论