LocUtil: add notice for auto-generated files, rebuild
This commit is contained in:
parent
6119d37dd5
commit
e06c8234a8
|
@ -282,6 +282,13 @@ namespace LocUtil
|
|||
|
||||
XmlDocument xmlDoc = new XmlDocument();
|
||||
xmlDoc.LoadXml(xmlBuffer.ToString());
|
||||
|
||||
// Add auto-generation note
|
||||
xmlDoc.GetElementsByTagName("root")[0].PrependChild(xmlDoc.CreateComment(@"
|
||||
This file is automatically generated. DO NOT edit it manually.
|
||||
Edit the relevant XML or CSV files, and run LocUtil.
|
||||
A Batch file is provided in the repository root for easy regeneration of the strings tables."));
|
||||
|
||||
foreach (XmlElement dataNode in xmlDoc.SelectNodes("/root/data"))
|
||||
{
|
||||
string name = dataNode.GetAttribute("name");
|
||||
|
@ -303,15 +310,22 @@ namespace LocUtil
|
|||
// @RIBBON TODO: For now the union of the command in Commands.xml and Ribbon.xml will go into the CommandId enum.
|
||||
private static bool GenerateEnum(HashSet commandIds, string enumName, string enumPath, Hashtable descriptions, Hashtable values)
|
||||
{
|
||||
const string TEMPLATE = @"namespace OpenLiveWriter.Localization
|
||||
{{
|
||||
public enum {0}
|
||||
{{
|
||||
None,
|
||||
{1}
|
||||
}}
|
||||
}}
|
||||
";
|
||||
const string TEMPLATE = @"// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for details.
|
||||
//
|
||||
// This file is automatically generated. DO NOT edit it manually.
|
||||
// Edit the relevant XML or CSV files, and run LocUtil.
|
||||
// A Batch file is provided in the repository root for easy regeneration of the strings tables.
|
||||
|
||||
namespace OpenLiveWriter.Localization
|
||||
{{
|
||||
public enum {0}
|
||||
{{
|
||||
None,
|
||||
{1}
|
||||
}}
|
||||
}}
|
||||
";
|
||||
|
||||
ArrayList commandList = commandIds.ToArrayList();
|
||||
commandList.Sort(new CaseInsensitiveComparer(CultureInfo.InvariantCulture));
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for details.
|
||||
//
|
||||
// This file is automatically generated. DO NOT edit it manually.
|
||||
// Edit the relevant XML or CSV files, and run LocUtil.
|
||||
// A Batch file is provided in the repository root for easy regeneration of the strings tables.
|
||||
|
||||
namespace OpenLiveWriter.Localization
|
||||
{
|
||||
public enum StringId
|
||||
{
|
||||
None,
|
||||
/// <summary>
|
||||
{
|
||||
public enum StringId
|
||||
{
|
||||
None,
|
||||
/// <summary>
|
||||
/// Abou&t {0}
|
||||
/// </summary>
|
||||
AboutAbout,
|
||||
|
@ -5355,6 +5362,5 @@ namespace OpenLiveWriter.Localization
|
|||
/// There was an unexpected error while uploading the video.
|
||||
/// </summary>
|
||||
YouTubeVideoError
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
This file is automatically generated. DO NOT edit it manually.
|
||||
Edit the relevant XML or CSV files, and run LocUtil.
|
||||
A Batch file is provided in the repository root for easy regeneration of the strings tables.-->
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
|
|
Loading…
Reference in New Issue