             break
         }
         return "window.wmf.themes.setTheme(document, window.wmf.themes.THEME.\(jsThemeConstant));" +
-            "window.wmf.imageDimming.dim(window, \(isDim ? "true" : "false"));"
+            "window.wmf.imageDimming.dim(window, \(isDim.toString()));"
     }
     
     @objc public func wmf_applyTheme(_ theme: Theme){


import WebKit
import WMF

@objc enum WMFArticleFooterMenuItem: Int {


        let langInfo = MWLanguageInfo(forCode: lang)
        let langCode = langInfo.code
        let langDir = langInfo.dir
        
        return "new window.wmf.sectionTransformation.Language('\(langCode)', '\(langDir)', \(UIApplication.shared.wmf_isRTL.toString()))"
    }

    private func articleJS(for article: MWKArticle) -> String {
        let articleTitle = (article.displaytitle ?? (article.url as NSURL).wmf_title) ?? ""
        let articleEntityDescription = (article.entityDescription ?? "").wmf_stringByCapitalizingFirstCharacter(usingWikipediaLanguage: article.url.wmf_language)
        
        return """
        new window.wmf.sectionTransformation.Article(
        \(article.isMain.toString()),
        '\(articleTitle.wmf_stringByReplacingApostrophesWithBackslashApostrophes())',
        '\(articleEntityDescription.wmf_stringByReplacingApostrophesWithBackslashApostrophes())',
        \(article.editable.toString()),
        \(languageJS(for: article)),
        \(article.hasReadMore.toString())
        )
        """
    }
