File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ int updateScripts(Proxy.Node root) {
4949 errors << " The root node ${ root.plainText} has no 'scripts' child. Please create it or better run 'Check Add-on'"
5050 return 0
5151 }
52+ Proxy.Node englishTranslationsNode = root. children. find{ it. plainText == ' translations' }?. children?. find{ it. plainText == ' en' }
53+ if (! englishTranslationsNode) {
54+ errors << " There are no English translations. Please create them or better run 'Check Add-on'"
55+ return 0
56+ }
5257 scriptsNode. children. findAll{ it. plainText. matches(' .*\\ .\\ w+' ) }. each {
5358 File scriptFile = new File (scriptsDir, expand(root, it. plainText))
5459 if (! scriptFile. exists()) {
@@ -60,6 +65,9 @@ int updateScripts(Proxy.Node root) {
6065 count++
6166 }
6267 it. folded = true
68+ def menuTitleKey = it. attributes. getFirst(' menuTitleKey' )
69+ if (! englishTranslationsNode. attributes. getFirst(menuTitleKey))
70+ errors << " Missing English translation for '${ menuTitleKey} '. 'Check Add-on' may help."
6371 }
6472 return count
6573}
You can’t perform that action at this time.
0 commit comments