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:
parent
8cb7cd770c
commit
f4b22fedc9
1 changed files with 7 additions and 0 deletions
|
@ -248,8 +248,15 @@ 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
|
||||||
|
|
||||||
|
|
Reference in a new issue