mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Fixing RSS reading when the culture doesn't exist.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1900 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
2d88d8e588
commit
3e761d929e
1 changed files with 7 additions and 3 deletions
|
@ -161,11 +161,15 @@ namespace GreenshotPlugin.Core {
|
|||
LOG.DebugFormat("Found invalid version {0} in file {1}", version, file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type.Equals("Translations")) {
|
||||
string culture = Regex.Replace(file, @"[a-zA-Z]+-(..-..)\.(xml|html)", "$1");
|
||||
CultureInfo cultureInfo = new CultureInfo(culture);
|
||||
rssFile.Language = cultureInfo.NativeName;
|
||||
try {
|
||||
CultureInfo cultureInfo = new CultureInfo(culture);
|
||||
rssFile.Language = cultureInfo.NativeName;
|
||||
} catch (Exception ex) {
|
||||
LOG.WarnFormat("Can't read the native name of the culture {0}", culture);
|
||||
}
|
||||
}
|
||||
filesForType.Add(file, rssFile);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue