public CultureAnalysisResultTreeNode(VSCulture sourceCulture, VSCulture targetCulture) : base() { this.ImageIndex = 5; this.SelectedImageIndex = 5; this.TargetCulture = targetCulture; this.SourceCulture = sourceCulture; }
private void loadNotExistings(TreeNode parent, VSCulture culture) { foreach (VSCulture targetCulture in Main.CurrentSolution.Cultures.Values) { if (targetCulture != culture) { var notexistingNode = new CultureAnalysisResultTreeNode(culture, targetCulture); parent.Nodes.Add(notexistingNode); loadNotExistings(notexistingNode); } } }
internal int fillTranslations(VSCulture sourceCulture, VSCulture targetCulture) { int found = 0; try { setToolbarStatusText(Properties.Resources.SearchingTranslations); List <ResourceDataBase> notexisting = sourceCulture.GetItemsNotExistingInCulture(targetCulture); var trans = new TranslationStorageManager(); int process = 1; foreach (var data in notexisting) { setToolbarStatusText(String.Format(Properties.Resources.SerachingTranslationsProcess, process, notexisting.Count())); var result = trans.Search(data, targetCulture.Culture); if (result.Count() > 0) { found++; data.ResxFile.FileGroup.SetResourceData(data.Name, result.First().Text, targetCulture.Culture); } process++; } setToolbarStatusText(String.Format(Properties.Resources.SearchingTranslationsResult, found), 4000); } catch { resetToolbarStatusText(); throw; } finally { } return(found); }
public CultureListBoxEntry(VSCulture culture) { this.Culture = culture; }
public CultureTreeNode(VSCulture culture) { this.culture = culture; setText(); }