Skip to content

Commit

Permalink
allow to export json for neutral language
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-englert committed Mar 3, 2020
1 parent 7580f27 commit b4247df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ResXManager.Model/WebFilesExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private void Export()
File.WriteAllText(typeScriptFilePath, typescript.ToString());

var specificLanguages = _resourceManager.ResourceEntities
.SelectMany(entity => entity.Languages.Skip(1))
.SelectMany(entity => entity.Languages.Skip(config.ExportNeutralJson ? 0 : 1))
.GroupBy(lang => lang.CultureKey);

foreach (var languages in specificLanguages)
Expand Down Expand Up @@ -117,6 +117,8 @@ private class Configuration
public string TypeScriptFileDir { get; set; }
[JsonProperty("jsonFileDir")]
public string JsonFileDir { get; set; }
[JsonProperty("exportNeutralJson")]
public bool ExportNeutralJson { get; set; }
}
}
}

0 comments on commit b4247df

Please sign in to comment.