From 346f3b33bf40f1cba4655015cafa8d7473234cfe Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Tue, 28 Oct 2014 09:41:51 -0700 Subject: [PATCH] Added context to the i18n editor for components. --- app/views/i18n/I18NEditComponentView.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/i18n/I18NEditComponentView.coffee b/app/views/i18n/I18NEditComponentView.coffee index 4750ea1af..455b1a1aa 100644 --- a/app/views/i18n/I18NEditComponentView.coffee +++ b/app/views/i18n/I18NEditComponentView.coffee @@ -20,6 +20,9 @@ module.exports = class I18NEditComponentView extends I18NEditModelView @wrapRow "#{propDoc.name} description (#{progLang})", [progLang, 'description'], description, i18n[lang]?[progLang]?.description, path, 'markdown' else if _.isString propDoc.description @wrapRow "#{propDoc.name} description", ['description'], propDoc.description, i18n[lang]?.description, path, 'markdown' + if context = propDoc.context + for key, value of context + @wrapRow "#{propDoc.name} context value", ["context", key], value, i18n[lang]?.context[key], path #- Component return value descriptions if i18n = propDoc.returns?.i18n @@ -41,4 +44,4 @@ module.exports = class I18NEditComponentView extends I18NEditModelView @wrapRow "#{propDoc.name} arg description #{argDoc.name} (#{progLang})", [progLang, 'description'], description, i18n[lang]?[progLang]?.description, path, 'markdown' else if _.isString argDoc.description @wrapRow "#{propDoc.name} arg description #{argDoc.name}", ['description'], argDoc.description, i18n[lang]?.description, path, 'markdown' - \ No newline at end of file +