Tweaking the visuals for the i18n treema node to mostly ignore the property required to get around mongoose not handling empty objects.

This commit is contained in:
Scott Erickson 2014-07-12 09:55:26 -07:00
parent 8cb7cd770c
commit f4b22fedc9

View file

@ -248,7 +248,14 @@ class JavaScriptTreema extends CodeTreema
class InternationalizationNode extends TreemaNode.nodeMap.object
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"
getChildren: ->
res = super(arguments...)
res = (r for r in res when r[0] isnt '-')
res
getChildSchema: (key) ->
#construct the child schema here