public string FindMissingText(StringToken key, CultureInfo culture) { var defaultValue = culture.Name + "_" + key.ToLocalizationKey(); if (key.DefaultValue.IsNotEmpty() && culture.Equals(_defaultCulture)) { defaultValue = key.DefaultValue; } writeMissing(key.ToLocalizationKey().ToString(), defaultValue, culture); return defaultValue; }
public string GetTextForKey(StringToken key) { LocalizationKey localizationKey = key.ToLocalizationKey(); return(_localeCache .Retrieve(localizationKey, () => _missingHandler.FindMissingText(key, _localeCache.Culture))); }
public bool Equals(StringToken obj) { if (ReferenceEquals(null, obj)) { return(false); } if (ReferenceEquals(this, obj)) { return(true); } return(Equals(obj.ToLocalizationKey().ToString(), ToLocalizationKey().ToString())); }
public string FormatDescription(string matcherDescription, StringToken nodeKey) { return "Insert '{0}' before '{1}'".ToFormat(nodeKey.ToLocalizationKey(), matcherDescription); }
public bool Matches(StringToken token) { return token.ToLocalizationKey().ToString() == _name || token.Key == _name; }
public string FormatDescription(string parent, StringToken key) { return "Add '{0}' to menu '{1}'".ToFormat(key.ToLocalizationKey(), parent); }