From 2234eeef07772d9f8d47c097c2fdf2e5dd894c84 Mon Sep 17 00:00:00 2001 From: Ruochen Date: Mon, 13 Oct 2014 14:10:16 +0800 Subject: [PATCH] add i18n --- lib/gallery.js | 15 ++++++++++++++- src/gallery.coffee | 15 ++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/lib/gallery.js b/lib/gallery.js index 1667eae..7550c5f 100644 --- a/lib/gallery.js +++ b/lib/gallery.js @@ -37,8 +37,21 @@ Gallery = (function(_super) { wrapCls: "" }; + Gallery.i18n = { + 'zh-CN': { + rotate_image: '旋转图片方向', + download_image: '下载图片', + view_full_size: '在新窗口查看原图' + }, + 'en': { + rotate_image: 'Rotate this image', + download_image: 'Download this image', + view_full_size: 'View full size' + } + }; + Gallery._tpl = { - gallery: "", + gallery: "", thumbs: "
", thumb: "

" }; diff --git a/src/gallery.coffee b/src/gallery.coffee index 61aceca..2cbec3e 100644 --- a/src/gallery.coffee +++ b/src/gallery.coffee @@ -5,6 +5,15 @@ class Gallery extends SimpleModule itemCls: "" wrapCls: "" + @i18n: + 'zh-CN': + rotate_image: '旋转图片方向' + download_image: '下载图片' + view_full_size: '在新窗口查看原图' + 'en': + rotate_image: 'Rotate this image' + download_image: 'Download this image' + view_full_size: 'View full size' @_tpl: gallery: """ @@ -16,9 +25,9 @@ class Gallery extends SimpleModule