Beispiel #1
0
 static LMLiteral createLiteral(string txt) {
   LMLiteral res = new LMLiteral();
   res.text = txt;
   return res;
 }
Beispiel #2
0
 protected void doFinishTree(LMLiteral localItems) {
   string txt = LMLiteral.getText(localItems);// html.HtmlText;
   string[] parts = txt.Split(del, StringSplitOptions.RemoveEmptyEntries);
   List<OrderItem> strs = new List<OrderItem>();
   for (int i = 0; i < parts.Length; i++) {
     string s = parts[i].Trim(' ');
     if (string.IsNullOrEmpty(s)) continue;
     strs.Add(new OrderItem(i, this, s));
   }
   OrderItems = new OrderItem[strs.Count];
   strs.CopyTo(OrderItems);
   fillDisplayIndexes();
 }
Beispiel #3
0
 public LMLiteral toLocalizedLiteral() {
   LMLiteral res = new LMLiteral();
   LocalizeExtension ext = new LocalizeExtension();
   if (pathsBuf.Count > 0) {
     ext.paths = new Dictionary<string, imgProps>(pathsBuf);
     ext.images = new List<img>(images);
   }
   ext.data = buffs[defaultLang].ToString();
   if (hasTransObject) {
     ext.datas = new Dictionary<string, string>();
     foreach (KeyValuePair<string, StringBuilder> kp in buffs)
       if (kp.Key != defaultLang)
         ext.datas.Add(kp.Key, kp.Value.ToString());
   }
   res.Extension = ext;
   return res;
 }