/// <summary> /// Creates all TranlatorItems with the state translated /// </summary> private void DetermineTranslated(StringArray stringsTranslated, StringArray stringsOriginal) { foreach (StringItem item in stringsOriginal) { StringItem itemTranslated = null; if (stringsTranslated.GetStringById(item.Id, ref itemTranslated)) { Add(new TranslatorItem(itemTranslated, item, TranslationState.Translated)); } } }
/// <summary> /// Returns the ids of all changed strings /// of arr. /// </summary> public long[] GetStringsChangedIn(StringArray arr) { ArrayList ret = new ArrayList(); foreach (StringItem item in strings) { if (item.Id != 6) // "XBMC SVN" { StringItem stringItem = null; arr.GetStringById(item.Id, ref stringItem); if (stringItem != null && stringItem.Text != item.Text) { ret.Add(item.Id); } } } return((long[])ret.ToArray(typeof(long))); }
/// <summary> /// Returns a StringArray with all string not in /// arr. /// </summary> public StringArray GetStringsNotIn(StringArray arr) { StringArray ret = new StringArray(); foreach (StringItem item in strings) { if (item.Id != 6) // "XBMC SVN" { StringItem stringItem = null; arr.GetStringById(item.Id, ref stringItem); if (stringItem == null) { ret.Add(item); } } } return(ret); }
/// <summary> /// Returns a StringArray with all string not in /// arr. /// </summary> public StringArray GetStringsNotIn(StringArray arr) { StringArray ret=new StringArray(); foreach (StringItem item in strings) { if (item.Id!=6) // "XBMC SVN" { StringItem stringItem=null; arr.GetStringById(item.Id, ref stringItem); if (stringItem==null) ret.Add(item); } } return ret; }
/// <summary> /// Returns the ids of all changed strings /// of arr. /// </summary> public long[] GetStringsChangedIn(StringArray arr) { ArrayList ret=new ArrayList(); foreach (StringItem item in strings) { if (item.Id!=6) // "XBMC SVN" { StringItem stringItem=null; arr.GetStringById(item.Id, ref stringItem); if (stringItem!=null && stringItem.Text!=item.Text) ret.Add(item.Id); } } return (long[])ret.ToArray(typeof(long)); }
/// <summary> /// Creates all TranlatorItems with the state translated /// </summary> private void DetermineTranslated(StringArray stringsTranslated, StringArray stringsOriginal) { foreach (StringItem item in stringsOriginal) { StringItem itemTranslated=null; if (stringsTranslated.GetStringById(item.Id, ref itemTranslated)) { Add(new TranslatorItem(itemTranslated, item, TranslationState.Translated)); } } }