grid.locale-cn.js 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. /**
  2. * @license jqGrid Chinese Translation
  3. * 咖啡兔 yanhonglei@gmail.com
  4. * http://www.kafeitu.me
  5. * Dual licensed under the MIT and GPL licenses:
  6. * http://www.opensource.org/licenses/mit-license.php
  7. * http://www.gnu.org/licenses/gpl.html
  8. **/
  9. /*jslint white: true */
  10. /*global jQuery, module, require */
  11. (function (factory) {
  12. "use strict";
  13. if (typeof define === "function" && define.amd) {
  14. // AMD. Register as an anonymous module.
  15. define(["jquery"], factory);
  16. } else if (typeof module === "object" && module.exports) {
  17. // Node/CommonJS
  18. module.exports = function (root, $) {
  19. if ($ === undefined) {
  20. // require("jquery") returns a factory that requires window to
  21. // build a jQuery instance, we normalize how we use modules
  22. // that require this pattern but the window provided is a noop
  23. // if it's defined (how jquery works)
  24. $ = typeof window !== "undefined" ?
  25. require("jquery") :
  26. require("jquery")(root || window);
  27. }
  28. factory($);
  29. return $;
  30. };
  31. } else {
  32. // Browser globals
  33. factory(jQuery);
  34. }
  35. }(function ($) {
  36. "use strict";
  37. var locInfo = {
  38. isRTL: false,
  39. defaults: {
  40. recordtext: "{0} - {1}\u3000共 {2} 条", // 共字前是全角空格
  41. emptyrecords: "无数据显示",
  42. loadtext: "读取中...",
  43. pgtext: " {0} 共 {1} 页",
  44. pgfirst: "First Page",
  45. pglast: "Last Page",
  46. pgnext: "Next Page",
  47. pgprev: "Previous Page",
  48. pgrecs: "Records per Page",
  49. showhide: "Toggle Expand Collapse Grid",
  50. savetext: "正在保存..."
  51. },
  52. search: {
  53. caption: "搜索...",
  54. Find: "查找",
  55. Reset: "重置",
  56. odata: [
  57. {oper: "eq", text: "等于\u3000\u3000"},
  58. {oper: "ne", text: "不等\u3000\u3000"},
  59. {oper: "lt", text: "小于\u3000\u3000"},
  60. {oper: "le", text: "小于等于"},
  61. {oper: "gt", text: "大于\u3000\u3000"},
  62. {oper: "ge", text: "大于等于"},
  63. {oper: "bw", text: "开始于"},
  64. {oper: "bn", text: "不开始于"},
  65. {oper: "in", text: "属于\u3000\u3000"},
  66. {oper: "ni", text: "不属于"},
  67. {oper: "ew", text: "结束于"},
  68. {oper: "en", text: "不结束于"},
  69. {oper: "cn", text: "包含\u3000\u3000"},
  70. {oper: "nc", text: "不包含"},
  71. {oper: "nu", text: "不存在"},
  72. {oper: "nn", text: "存在"}
  73. ],
  74. groupOps: [
  75. {op: "AND", text: "所有"},
  76. {op: "OR", text: "任一"}
  77. ],
  78. addGroupTitle: "Add subgroup",
  79. deleteGroupTitle: "Delete group",
  80. addRuleTitle: "Add rule",
  81. deleteRuleTitle: "Delete rule",
  82. operandTitle: "Click to select search operation.",
  83. resetTitle: "Reset Search Value"
  84. },
  85. edit: {
  86. addCaption: "新增记录",
  87. editCaption: "编辑记录",
  88. bSubmit: "提交",
  89. bCancel: "取消",
  90. bClose: "关闭",
  91. saveData: "数据已改变,是否保存?",
  92. bYes: "是",
  93. bNo: "否",
  94. bExit: "取消",
  95. msg: {
  96. required: "此字段必需",
  97. number: "请输入有效数字",
  98. minValue: "输值必须大于等于 ",
  99. maxValue: "输值必须小于等于 ",
  100. email: "这不是有效的e-mail地址",
  101. integer: "请输入有效整数",
  102. date: "请输入有效时间",
  103. url: "无效网址。前缀必须为 ('http://' 或 'https://')",
  104. nodefined: " 未定义!",
  105. novalue: " 需要返回值!",
  106. customarray: "自定义函数需要返回数组!",
  107. customfcheck: "必须有自定义函数!"
  108. }
  109. },
  110. view: {
  111. caption: "查看记录",
  112. bClose: "关闭"
  113. },
  114. del: {
  115. caption: "删除",
  116. msg: "删除所选记录?",
  117. bSubmit: "删除",
  118. bCancel: "取消"
  119. },
  120. nav: {
  121. edittext: "",
  122. edittitle: "编辑所选记录",
  123. addtext: "",
  124. addtitle: "新增记录",
  125. deltext: "",
  126. deltitle: "删除所选记录",
  127. searchtext: "",
  128. searchtitle: "查找",
  129. refreshtext: "",
  130. refreshtitle: "刷新表格",
  131. alertcap: "注意",
  132. alerttext: "请选择记录",
  133. viewtext: "",
  134. viewtitle: "查看所选记录",
  135. savetext: "",
  136. savetitle: "Save row",
  137. canceltext: "",
  138. canceltitle: "Cancel row editing"
  139. },
  140. col: {
  141. caption: "选择列",
  142. bSubmit: "确定",
  143. bCancel: "取消"
  144. },
  145. errors: {
  146. errcap: "错误",
  147. nourl: "没有设置url",
  148. norecords: "没有要处理的记录",
  149. model: "colNames 和 colModel 长度不等!"
  150. },
  151. formatter: {
  152. integer: {thousandsSeparator: ",", defaultValue: "0"},
  153. number: {decimalSeparator: ".", thousandsSeparator: ",", decimalPlaces: 2, defaultValue: "0.00"},
  154. currency: {
  155. decimalSeparator: ".",
  156. thousandsSeparator: ",",
  157. decimalPlaces: 2,
  158. prefix: "",
  159. suffix: "",
  160. defaultValue: "0.00"
  161. },
  162. date: {
  163. dayNames: [
  164. "日", "一", "二", "三", "四", "五", "六",
  165. "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"
  166. ],
  167. monthNames: [
  168. "一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二",
  169. "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
  170. ],
  171. AmPm: ["am", "pm", "上午", "下午"],
  172. S: function () {
  173. return "";
  174. },
  175. srcformat: "Y-m-d",
  176. newformat: "Y-m-d",
  177. masks: {
  178. // see http://php.net/manual/en/function.date.php for PHP format used in jqGrid
  179. // and see http://docs.jquery.com/UI/Datepicker/formatDate
  180. // and https://github.com/jquery/globalize#dates for alternative formats used frequently
  181. // one can find on https://github.com/jquery/globalize/tree/master/lib/cultures many
  182. // information about date, time, numbers and currency formats used in different countries
  183. // one should just convert the information in PHP format
  184. // short date:
  185. // n - Numeric representation of a month, without leading zeros
  186. // j - Day of the month without leading zeros
  187. // Y - A full numeric representation of a year, 4 digits
  188. // example: 3/1/2012 which means 1 March 2012
  189. ShortDate: "n/j/Y", // in jQuery UI Datepicker: "M/d/yyyy"
  190. // long date:
  191. // l - A full textual representation of the day of the week
  192. // F - A full textual representation of a month
  193. // d - Day of the month, 2 digits with leading zeros
  194. // Y - A full numeric representation of a year, 4 digits
  195. LongDate: "l, F d, Y", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy"
  196. // long date with long time:
  197. // l - A full textual representation of the day of the week
  198. // F - A full textual representation of a month
  199. // d - Day of the month, 2 digits with leading zeros
  200. // Y - A full numeric representation of a year, 4 digits
  201. // g - 12-hour format of an hour without leading zeros
  202. // i - Minutes with leading zeros
  203. // s - Seconds, with leading zeros
  204. // A - Uppercase Ante meridiem and Post meridiem (AM or PM)
  205. FullDateTime: "l, F d, Y g:i:s A", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy h:mm:ss tt"
  206. // month day:
  207. // F - A full textual representation of a month
  208. // d - Day of the month, 2 digits with leading zeros
  209. MonthDay: "F d", // in jQuery UI Datepicker: "MMMM dd"
  210. // short time (without seconds)
  211. // g - 12-hour format of an hour without leading zeros
  212. // i - Minutes with leading zeros
  213. // A - Uppercase Ante meridiem and Post meridiem (AM or PM)
  214. ShortTime: "g:i A", // in jQuery UI Datepicker: "h:mm tt"
  215. // long time (with seconds)
  216. // g - 12-hour format of an hour without leading zeros
  217. // i - Minutes with leading zeros
  218. // s - Seconds, with leading zeros
  219. // A - Uppercase Ante meridiem and Post meridiem (AM or PM)
  220. LongTime: "g:i:s A", // in jQuery UI Datepicker: "h:mm:ss tt"
  221. // month with year
  222. // Y - A full numeric representation of a year, 4 digits
  223. // F - A full textual representation of a month
  224. YearMonth: "F, Y" // in jQuery UI Datepicker: "MMMM, yyyy"
  225. }
  226. }
  227. }
  228. };
  229. $.jgrid = $.jgrid || {};
  230. $.extend(true, $.jgrid, {
  231. defaults: {
  232. locale: "cn"
  233. },
  234. locales: {
  235. // In general the property name is free, but it's recommended to use the names based on
  236. // http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
  237. // http://rishida.net/utils/subtags/ and RFC 5646. See Appendix A of RFC 5646 for examples.
  238. // One can use the lang attribute to specify language tags in HTML, and the xml:lang attribute for XML
  239. // if it exists. See http://www.w3.org/International/articles/language-tags/#extlang
  240. cn: $.extend({}, locInfo, {name: "中文", nameEnglish: "Chinese"}),
  241. zh: $.extend({}, locInfo, {name: "中文", nameEnglish: "Chinese"}),
  242. "zh-CN": $.extend({}, locInfo, {name: "中文(中华人民共和国)", nameEnglish: "Chinese (Simplified, PRC)"})
  243. }
  244. });
  245. }));