public static void PrepareDataBookTranslationGroups(XmlNode pageOrDocumentNode, IEnumerable<string> languageCodes)
{
//At first, I set out to select all translationGroups that have child .bloomEditables that have data-book attributes
//however this has implications on other fields, noticeably the acknowledgments. So in order to get this fixed
//and not open another can of worms, I've reduce the scope of this
//fix to just the bookTitle, so I'm going with findOnlyBookTitleFields for now
var findAllDataBookFields = "descendant-or-self::*[contains(@class,'bloom-translationGroup') and descendant::div[@data-book and contains(@class,'bloom-editable')]]";
var findOnlyBookTitleFields = "descendant-or-self::*[contains(@class,'bloom-translationGroup') and descendant::div[@data-book='bookTitle' and contains(@class,'bloom-editable')]]";
foreach (XmlElement groupElement in
pageOrDocumentNode.SafeSelectNodes(findOnlyBookTitleFields))
{
foreach (var lang in languageCodes)
{
MakeElementWithLanguageForOneGroup(groupElement, lang);
}
}
}