Add empty scope for localization string without scope

This commit is contained in:
neTp9c
2016-02-09 14:57:20 +03:00
parent 51ad9fc792
commit ca2605bb50

View File

@@ -39,6 +39,9 @@ namespace Orchard.Localization.Services {
var translation = ParseTranslation(poLine);
// ignore incomplete localizations (empty msgid or msgstr)
if (!string.IsNullOrWhiteSpace(id) && !string.IsNullOrWhiteSpace(translation)) {
if(scopes.Count == 0) {
scopes.Add(string.Empty);
}
foreach (var scope in scopes) {
var scopedKey = (scope + "|" + id).ToLowerInvariant();
if (!translations.ContainsKey(scopedKey)) {