Ejemplo n.º 1
0
            public override string?Interpolate(LocalizedStringDictionary localized)
            {
                var str = localized[section, name];

                if (str == null)
                {
                    return(null);
                }

                for (int p = 1, i = 0, e = placeholders.Count / 2; i < e; ++p, i += 2)
                {
                    str = str.Replace(
                        $"__{p}__",
                        localized[placeholders[i],
                                  placeholders[i + 1]]);
                }

                return(str);
            }
Ejemplo n.º 2
0
 public abstract string?Interpolate(LocalizedStringDictionary localized);
Ejemplo n.º 3
0
 public override string?Interpolate(LocalizedStringDictionary localized)
 {
     return(localized[section, name]?.Replace(
                "__1__", localized[placeholderSection, placeholderName]));
 }