src/BloomExe/Spreadsheet/SpreadsheetImporter.cs
/// <summary>
/// This is where all the excitement happens. We update the specified group
/// with the data from the spreadsheet row.
/// </summary>
/// <param name="row"></param>
/// <param name="group"></param>
This is where all the excitement happens. We update the specified group
with the data from the spreadsheet row.
This is where all the excitement happens . We update the specified group with the data from the spreadsheet row .
private void PutRowInGroup(ContentRow row, XmlElement group)
		{
			var sheetLanguages = _sheet.Languages;
			foreach (var lang in sheetLanguages)
			{
				var colIndex = _sheet.GetRequiredColumnForLang(lang);
				var content = row.GetCell(colIndex).Content;
				var editable = HtmlDom.GetEditableChildInLang(group, lang);
				if (editable == null)
				{
					if (IsEmptyCell(content))
						continue; 
					editable = TranslationGroupManager.MakeElementWithLanguageForOneGroup(group, lang);
				}
				if (IsEmptyCell(content))
				{
					editable.ParentNode.RemoveChild(editable);
				}
				else
				{
					editable.InnerXml = content;
				}
			}
			if (RemoveOtherLanguages)
			{
				HtmlDom.RemoveOtherLanguages(@group, sheetLanguages);
			}
		}
private void PutRowInGroup ( ContentRow row , XmlElement group ) { var sheetLanguages = _sheet . Languages ; foreach ( var lang in sheetLanguages ) { var colIndex = _sheet . GetRequiredColumnForLang ( lang ) ; var content = row . GetCell ( colIndex ) . Content ; var editable = HtmlDom . GetEditableChildInLang ( group , lang ) ; if ( editable == null ) { if ( IsEmptyCell ( content ) ) continue ; editable = TranslationGroupManager . MakeElementWithLanguageForOneGroup ( group , lang ) ; } if ( IsEmptyCell ( content ) ) { editable . ParentNode . RemoveChild ( editable ) ; } else { editable . InnerXml = content ; } } if ( RemoveOtherLanguages ) { HtmlDom . RemoveOtherLanguages ( @group , sheetLanguages ) ; } }
This is where all the excitement happens.
This is where all the excitement happens .
// Review: or make an empty one?
row
ContentRow
None
group
XmlElement
None