翻译的Sencha Touch 2.0.0版本,主要是看源码的,在看的同时进行翻译,Ext 4.1.0 API翻译同步进行,
说明:由于个人英语水平有限,错误之处,敬请指正,
联系方式:QQ:349571251 邮箱:QQ邮箱即可
其他可能部分会根据源码的意思来说明,(EXT4.1.0貌似没有翻译这个方法)示例:
Number.js中
/**
???? * Snaps the passed number between stopping points based upon a passed increment value.
???? * @param {Number} value The unsnapped value.
???? * @param {Number} increment The increment by which the value must move.
???? * @param {Number} minValue The minimum value to which the returned value must be constrained. Overrides the increment..
???? * @param {Number} maxValue The maximum value to which the returned value must be constrained. Overrides the increment..
???? * @return {Number} The value of the nearest snap target.
???? */
??? snap : function(value, increment, minValue, maxValue) {
??????? var newValue = value,
??????????? m;
??????? if (!(increment && value)) {
??????????? return value;
??????? }
??????? m = value % increment;
??????? if (m !== 0) {
??????????? newValue -= m;
??????????? if (m * 2 >= increment) {
??????????????? newValue += increment;
??????????? } else if (m * 2 < -increment) {
??????????????? newValue -= increment;
??????????? }
??????? }
??????? return Ext.Number.constrain(newValue, minValue,? maxValue);
??? },
snap意思是“截断”(问的‘大漠穷秋’老师),源码中其实就是四舍五入,在Slider中用到了,故作如下解释:'四舍五入'算法求值,根据增量因子进行运算后调用constrain方法得出。常用于Slider相关类来获得滑块的值。
?
其他:源码中的翻译(包含行注释)及CHM版本会在最终完成时发布。去掉了source文件包。
?
目前翻译的文件如下所示:红色表示未完成,绿色表示完成,每2周进行更新。
| src | 367 | ? | ? | ? | ? | 
| app | ? | ? | ? | ? | |
| Action.js | ? | ? | ? | ||
| Application.js | ? | ? | ? | ||
| Controller.js | ? | ? | ? | ||
| History.js | ? | ? | ? | ||
| Profile.js | ? | ? | ? | ||
| Route.js | ? | ? | ? | ||
| Router.js | ? | ? | ? | ||
| behavior | ? | ? | ? | ? | |
| Behavior.js | ? | ? | ? | ||
| Draggable.js | ? | ? | ? | ||
| Droppable.js | ? | ? | ? | ||
| Scrollable.js | ? | ? | ? | ||
| Sortable.js | ? | ? | ? | ||
| Translatable.js | ? | ? | ? | ||
| carousel | ? | ? | ? | ? | |
| Carousel.js | ? | ? | ? | ||
| Indicator.js | ? | ? | ? | ||
| Infinite.js | ? | ? | ? | ||
| Item.js | ? | ? | ? | ||
| core | ? | ? | ? | ? | |
| class | ? | ? | ? | ||
| Base.js | ? | ? | |||
| Class.js | ? | ? | |||
| ClassManager.js | ? | ? | |||
| Loader.js | ? | ? | |||
| lang | ? | ? | ? | ||
| Array.js | ? | ? | |||
| Date.js | ? | ? | |||
| Error.js | ? | ? | |||
| Function.js | ? | ? | |||
| JSON.js | ? | ? | |||
| Number.js | ? | ? | |||
| Object.js | ? | ? | |||
| String.js | ? | ? | |||
| version | ? | ? | ? | ||
| Version.js | ? | ? | |||
| EventManager.js | ? | ? | ? | ||
| Ext.js | ? | ? | ? | ||
| Ext-more.js | ? | ? | ? | ||
| data | ? | ? | ? | ? | |
| association | ? | ? | ? | ||
| Association.js | ? | ? | |||
| BelongsTo.js | ? | ? | |||
| HasMany.js | ? | ? | |||
| HasOne.js | ? | ? | |||
| identifier | ? | ? | ? | ||
| Sequential.js | ? | ? | |||
| Simple.js | ? | ? | |||
| Uuid.js | ? | ? | |||
| proxy | ? | ? | ? | ||
| Ajax.js | ? | ? | |||
| Client.js | ? | ? | |||
| Direct.js | ? | ? | |||
| JsonP.js | ? | ? | |||
| LocalStorage.js | ? | ? | |||
| Memory.js | ? | ? | |||
| Proxy.js | ? | ? | |||
| Rest.js | ? | ? | |||
| Server.js | ? | ? | |||
| SessionStorage.js | ? | ? | |||
| WebStorage.js | ? | ? | |||
| reader | ? | ? | ? | ||
| Array.js | ? | ? | |||
| Json.js | ? | ? | |||
| Reader.js | ? | ? | |||
| Xml.js | ? | ? | |||
| writer | ? | ? | ? | ||
| Json.js | ? | ? | |||
| Writer.js | ? | ? | |||
| Xml.js | ? | ? | |||
| ArrayStore.js | ? | ? | ? | ||
| Batch.js | ? | ? | ? | ||
| Connection.js | ? | ? | ? | ||
| DirectStore.js | ? | ? | ? | ||
| Error.js | ? | ? | ? | ||
| Errors.js | ? | ? | ? | ||
| Field.js | ? | ? | ? | ||
| JsonP.js | ? | ? | ? | ||
| JsonStore.js | ? | ? | ? | ||
| Model.js | ? | ? | ? | ||
| ModelManager.js | ? | ? | ? | ||
| NodeInterface.js | ? | ? | ? | ||
| NodeStore.js | ? | ? | ? | ||
| Operation.js | ? | ? | ? | ||
| Request.js | ? | ? | ? | ||
| ResultSet.js | ? | ? | ? | ||
| SortTypes.js | ? | ? | ?< |