Merge branch 'master' into production

This commit is contained in:
Scott Erickson 2014-07-12 10:17:54 -07:00
commit 57a2ce8306
5 changed files with 34 additions and 25 deletions

View file

@ -67,8 +67,10 @@ module.exports = class CoordinateDisplay extends createjs.Container
radius = 2.5 radius = 2.5
width = @label.getMeasuredWidth() + 2 * margin width = @label.getMeasuredWidth() + 2 * margin
height = @label.getMeasuredHeight() + 2 * margin height = @label.getMeasuredHeight() + 2 * margin
@label.regX = @background.regX = width / 2 - margin @label.regX = @background.regX = width / 2
@label.regY = @background.regY = height / 2 - margin @label.regY = @background.regY = height / 2
@label.regX -= margin
@label.regY -= margin
@background.graphics @background.graphics
.clear() .clear()
.beginFill('rgba(0,0,0,0.4)') .beginFill('rgba(0,0,0,0.4)')

View file

@ -1,11 +1,11 @@
module.exports = nativeDescription: "ไทย", englishDescription: "Thai", translation: module.exports = nativeDescription: "ไทย", englishDescription: "Thai", translation:
common: common:
loading: "รอสักครู่..." loading: "รอสักครู่..."
# saving: "Saving..." saving: "กำลังบันทึก..."
# sending: "Sending..." # sending: "Sending..."
# send: "Send" # send: "Send"
cancel: "ยกเลิก" cancel: "ยกเลิก"
# save: "Save" save: "บันทึก"
# publish: "Publish" # publish: "Publish"
# create: "Create" # create: "Create"
delay_1_sec: "1 วินาที" delay_1_sec: "1 วินาที"
@ -19,21 +19,21 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra
# unwatch: "Unwatch" # unwatch: "Unwatch"
# submit_patch: "Submit Patch" # submit_patch: "Submit Patch"
# units: units:
# second: "second" second: "วินาที"
# seconds: "seconds" seconds: "วินาที"
# minute: "minute" minute: "นาที"
# minutes: "minutes" minutes: "นาที"
# hour: "hour" hour: "ชั่วโมง"
# hours: "hours" hours: "ชั่วโมง"
# day: "day" day: "วัน"
# days: "days" days: "วัน"
# week: "week" week: "สัปดาห์"
# weeks: "weeks" weeks: "สัปดาห์"
# month: "month" month: "เดือน"
# months: "months" months: "เดือน"
# year: "year" year: "ปี"
# years: "years" years: "ปี"
modal: modal:
close: "ปิด" close: "ปิด"
@ -69,8 +69,8 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra
login: login:
sign_up: "ลงทะเบียนใหม่" sign_up: "ลงทะเบียนใหม่"
log_in: "ลงชื่อเข้าใช้" log_in: "ลงชื่อเข้าใช้"
# logging_in: "Logging In" logging_in: "กำลังเข้าสู่ระบบ"
log_out: "ลงชื่ื่อออก" log_out: "ลงชื่อออก"
recover: "กู้บัญชีการใช้งาน" recover: "กู้บัญชีการใช้งาน"
# recover: # recover:
@ -78,12 +78,12 @@ module.exports = nativeDescription: "ไทย", englishDescription: "Thai", tra
# send_password: "Send Recovery Password" # send_password: "Send Recovery Password"
signup: signup:
# create_account_title: "Create Account to Save Progress" create_account_title: "สร้างบัญชีใหม่เพื่อบันทึกความก้าวหน้า"
# description: "It's free. Just need a couple things and you'll be good to go:" # description: "It's free. Just need a couple things and you'll be good to go:"
email_announcements: "รับข่าวสารผ่านทางอีเมลล์" email_announcements: "รับข่าวสารผ่านทางอีเมลล์"
# coppa: "13+ or non-USA " # coppa: "13+ or non-USA "
coppa_why: "(ทำไม?)" coppa_why: "(ทำไม?)"
# creating: "Creating Account..." creating: "กำลังสร้างบัญชีใหม่..."
sign_up: "สมัคร" sign_up: "สมัคร"
log_in: "เข้าสู่ระบบด้วยรหัสผ่าน" log_in: "เข้าสู่ระบบด้วยรหัสผ่าน"
# social_signup: "Or, you can sign up through Facebook or G+:" # social_signup: "Or, you can sign up through Facebook or G+:"

View file

@ -237,7 +237,7 @@ class CocoModel extends Backbone.Model
data ?= $.extend true, {}, @attributes data ?= $.extend true, {}, @attributes
schema ?= @schema() or {} schema ?= @schema() or {}
if schema.properties?.i18n and _.isPlainObject(data) and not data.i18n? if schema.properties?.i18n and _.isPlainObject(data) and not data.i18n?
data.i18n = {} data.i18n = {'-':'-'} # mongoose doesn't work with empty objects
sum += 1 sum += 1
if _.isPlainObject data if _.isPlainObject data

View file

@ -248,7 +248,14 @@ class JavaScriptTreema extends CodeTreema
class InternationalizationNode extends TreemaNode.nodeMap.object class InternationalizationNode extends TreemaNode.nodeMap.object
findLanguageName: (languageCode) -> findLanguageName: (languageCode) ->
# to get around mongoose emtpy object bug, there's a prop in the object which needs to be ignored
return '' if languageCode is '-'
locale[languageCode]?.nativeDescription or "#{languageCode} Not Found" locale[languageCode]?.nativeDescription or "#{languageCode} Not Found"
getChildren: ->
res = super(arguments...)
res = (r for r in res when r[0] isnt '-')
res
getChildSchema: (key) -> getChildSchema: (key) ->
#construct the child schema here #construct the child schema here

View file

@ -46,7 +46,7 @@ db.users.find({anonymous:false}, params).sort({_id:1}).forEach(function (user) {
} }
update.slug = slug; update.slug = slug;
slugs[slug] = user.name; slugs[slug] = user.name;
if(user.slug) return; if(user.slug === slug) return;
print(_.str.sprintf('Setting user %s (%s) to slug %s with update %s', user.name, user.dateCreated, slug, JSON.stringify({$set:update}))); print(_.str.sprintf('Setting user %s (%s) to slug %s with update %s', user.name, user.dateCreated, slug, JSON.stringify({$set:update})));
var res = db.users.update({_id:user._id}, {$set:update}); var res = db.users.update({_id:user._id}, {$set:update});
if(res.hasWriteError()) { if(res.hasWriteError()) {