diff --git a/demo/ReadText.LocalizedDemo/.cr/personal/Navigation/RecentFilesHistory.xml b/demo/ReadText.LocalizedDemo/.cr/personal/Navigation/RecentFilesHistory.xml
new file mode 100644
index 00000000..7b2b2ccb
--- /dev/null
+++ b/demo/ReadText.LocalizedDemo/.cr/personal/Navigation/RecentFilesHistory.xml
@@ -0,0 +1,16 @@
+
+
+
+
+ -
+ LocalizableAttributeProperty.cs
+ d:\work\arci\commandline\src\commandline\infrastructure\localizableattributeproperty.cs
+
+
- Infrastructure
+
+ d:\WORK\ARCI\commandline\src\CommandLine\CommandLine.csproj
+ CommandLine
+
+
+
+
\ No newline at end of file
diff --git a/demo/ReadText.LocalizedDemo/LocalizableSentenceBuilder.cs b/demo/ReadText.LocalizedDemo/LocalizableSentenceBuilder.cs
new file mode 100644
index 00000000..bf2b7c56
--- /dev/null
+++ b/demo/ReadText.LocalizedDemo/LocalizableSentenceBuilder.cs
@@ -0,0 +1,122 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using CommandLine;
+using CommandLine.Text;
+
+namespace ReadText.LocalizedDemo
+{
+ public class LocalizableSentenceBuilder : SentenceBuilder
+ {
+ public override Func RequiredWord
+ {
+ get { return () => Properties.Resources.SentenceRequiredWord; }
+ }
+
+ public override Func ErrorsHeadingText
+ {
+ // Cannot be pluralized
+ get { return () => Properties.Resources.SentenceErrorsHeadingText; }
+ }
+
+ public override Func UsageHeadingText
+ {
+ get { return () => Properties.Resources.SentenceUsageHeadingText; }
+ }
+
+ public override Func HelpCommandText
+ {
+ get
+ {
+ return isOption => isOption
+ ? Properties.Resources.SentenceHelpCommandTextOption
+ : Properties.Resources.SentenceHelpCommandTextVerb;
+ }
+ }
+
+ public override Func VersionCommandText
+ {
+ get { return _ => Properties.Resources.SentenceVersionCommandText; }
+ }
+
+ public override Func FormatError
+ {
+ get
+ {
+ return error =>
+ {
+ switch (error.Tag)
+ {
+ case ErrorType.BadFormatTokenError:
+ return String.Format(Properties.Resources.SentenceBadFormatTokenError, ((BadFormatTokenError)error).Token);
+ case ErrorType.MissingValueOptionError:
+ return String.Format(Properties.Resources.SentenceMissingValueOptionError, ((MissingValueOptionError)error).NameInfo.NameText);
+ case ErrorType.UnknownOptionError:
+ return String.Format(Properties.Resources.SentenceUnknownOptionError, ((UnknownOptionError)error).Token);
+ case ErrorType.MissingRequiredOptionError:
+ var errMisssing = ((MissingRequiredOptionError)error);
+ return errMisssing.NameInfo.Equals(NameInfo.EmptyName)
+ ? Properties.Resources.SentenceMissingRequiredOptionError
+ : String.Format(Properties.Resources.SentenceMissingRequiredOptionError, errMisssing.NameInfo.NameText);
+ case ErrorType.BadFormatConversionError:
+ var badFormat = ((BadFormatConversionError)error);
+ return badFormat.NameInfo.Equals(NameInfo.EmptyName)
+ ? Properties.Resources.SentenceBadFormatConversionErrorValue
+ : String.Format(Properties.Resources.SentenceBadFormatConversionErrorOption, badFormat.NameInfo.NameText);
+ case ErrorType.SequenceOutOfRangeError:
+ var seqOutRange = ((SequenceOutOfRangeError)error);
+ return seqOutRange.NameInfo.Equals(NameInfo.EmptyName)
+ ? Properties.Resources.SentenceSequenceOutOfRangeErrorValue
+ : String.Format(Properties.Resources.SentenceSequenceOutOfRangeErrorOption,
+ seqOutRange.NameInfo.NameText);
+ case ErrorType.BadVerbSelectedError:
+ return String.Format(Properties.Resources.SentenceBadVerbSelectedError, ((BadVerbSelectedError)error).Token);
+ case ErrorType.NoVerbSelectedError:
+ return Properties.Resources.SentenceNoVerbSelectedError;
+ case ErrorType.RepeatedOptionError:
+ return String.Format(Properties.Resources.SentenceRepeatedOptionError, ((RepeatedOptionError)error).NameInfo.NameText);
+ case ErrorType.SetValueExceptionError:
+ var setValueError = (SetValueExceptionError)error;
+ return String.Format(Properties.Resources.SentenceSetValueExceptionError, setValueError.NameInfo.NameText, setValueError.Exception.Message);
+ }
+ throw new InvalidOperationException();
+ };
+ }
+ }
+
+ public override Func, string> FormatMutuallyExclusiveSetErrors
+ {
+ get
+ {
+ return errors =>
+ {
+ var bySet = from e in errors
+ group e by e.SetName into g
+ select new { SetName = g.Key, Errors = g.ToList() };
+
+ var msgs = bySet.Select(
+ set =>
+ {
+ var names = String.Join(
+ String.Empty,
+ (from e in set.Errors select String.Format("'{0}', ", e.NameInfo.NameText)).ToArray());
+ var namesCount = set.Errors.Count();
+
+ var incompat = String.Join(
+ String.Empty,
+ (from x in
+ (from s in bySet where !s.SetName.Equals(set.SetName) from e in s.Errors select e)
+ .Distinct()
+ select String.Format("'{0}', ", x.NameInfo.NameText)).ToArray());
+ //TODO: Pluralize by namesCount
+ return
+ String.Format(Properties.Resources.SentenceMutuallyExclusiveSetErrors,
+ names.Substring(0, names.Length - 2), incompat.Substring(0, incompat.Length - 2));
+ }).ToArray();
+ return string.Join(Environment.NewLine, msgs);
+ };
+ }
+ }
+ }
+}
diff --git a/demo/ReadText.LocalizedDemo/Options.cs b/demo/ReadText.LocalizedDemo/Options.cs
new file mode 100644
index 00000000..6ab1e3ee
--- /dev/null
+++ b/demo/ReadText.LocalizedDemo/Options.cs
@@ -0,0 +1,69 @@
+using CommandLine;
+using CommandLine.Text;
+using System.Collections.Generic;
+
+namespace ReadText.LocalizedDemo
+{
+ interface IOptions
+ {
+ [Option('n', "lines",
+ Default = 5U,
+ SetName = "bylines",
+ HelpText = "HelpTextLines",
+ ResourceType = typeof(Properties.Resources))]
+ uint? Lines { get; set; }
+
+ [Option('c', "bytes",
+ SetName = "bybytes",
+ HelpText = "HelpTextBytes",
+ ResourceType = typeof(Properties.Resources))]
+ uint? Bytes { get; set; }
+
+ [Option('q', "quiet",
+ HelpText = "HelpTextQuiet",
+ ResourceType = typeof(Properties.Resources))]
+ bool Quiet { get; set; }
+
+ [Value(0, MetaName = "input file",
+ HelpText = "HelpTextFileName",
+ Required = true,
+ ResourceType = typeof(Properties.Resources))]
+ string FileName { get; set; }
+ }
+
+ [Verb("head", HelpText = "HelpTextVerbHead", ResourceType = typeof(Properties.Resources))]
+ class HeadOptions : IOptions
+ {
+ public uint? Lines { get; set; }
+
+ public uint? Bytes { get; set; }
+
+ public bool Quiet { get; set; }
+
+ public string FileName { get; set; }
+
+ [Usage(ApplicationAlias = "ReadText.LocalizedDemo.exe")]
+ public static IEnumerable Examples
+ {
+ get
+ {
+ yield return new Example(Properties.Resources.ExamplesNormalScenario, new HeadOptions { FileName = "file.bin"});
+ yield return new Example(Properties.Resources.ExamplesSpecifyBytes, new HeadOptions { FileName = "file.bin", Bytes=100 });
+ yield return new Example(Properties.Resources.ExamplesSuppressSummary, UnParserSettings.WithGroupSwitchesOnly(), new HeadOptions { FileName = "file.bin", Quiet = true });
+ yield return new Example(Properties.Resources.ExamplesReadMoreLines, new[] { UnParserSettings.WithGroupSwitchesOnly(), UnParserSettings.WithUseEqualTokenOnly() }, new HeadOptions { FileName = "file.bin", Lines = 10 });
+ }
+ }
+ }
+
+ [Verb("tail", HelpText = "HelpTextVerbTail", ResourceType = typeof(Properties.Resources))]
+ class TailOptions : IOptions
+ {
+ public uint? Lines { get; set; }
+
+ public uint? Bytes { get; set; }
+
+ public bool Quiet { get; set; }
+
+ public string FileName { get; set; }
+ }
+}
diff --git a/demo/ReadText.LocalizedDemo/Program.cs b/demo/ReadText.LocalizedDemo/Program.cs
new file mode 100644
index 00000000..defa6412
--- /dev/null
+++ b/demo/ReadText.LocalizedDemo/Program.cs
@@ -0,0 +1,83 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using CommandLine;
+using CommandLine.Text;
+
+namespace ReadText.LocalizedDemo
+{
+ class Program
+ {
+ public static int Main(string[] args)
+ {
+ // Set sentence builder to localizable
+ SentenceBuilder.Factory = () => new LocalizableSentenceBuilder();
+
+ Func reader = opts =>
+ {
+ var fromTop = opts.GetType() == typeof(HeadOptions);
+ return opts.Lines.HasValue
+ ? ReadLines(opts.FileName, fromTop, (int)opts.Lines)
+ : ReadBytes(opts.FileName, fromTop, (int)opts.Bytes);
+ };
+ Func header = opts =>
+ {
+ if (opts.Quiet)
+ {
+ return string.Empty;
+ }
+ var fromTop = opts.GetType() == typeof(HeadOptions);
+ var builder = new StringBuilder(Properties.Resources.Reading);
+ builder = opts.Lines.HasValue
+ ? builder.Append(opts.Lines).Append(Properties.Resources.Lines)
+ : builder.Append(opts.Bytes).Append(Properties.Resources.Bytes);
+ builder = fromTop ? builder.Append(Properties.Resources.FromTop) : builder.Append(Properties.Resources.FromBottom);
+ return builder.ToString();
+ };
+ Action printIfNotEmpty = text =>
+ {
+ if (text.Length == 0) { return; }
+ Console.WriteLine(text);
+ };
+
+ var result = Parser.Default.ParseArguments(args);
+ var texts = result
+ .MapResult(
+ (HeadOptions opts) => Tuple.Create(header(opts), reader(opts)),
+ (TailOptions opts) => Tuple.Create(header(opts), reader(opts)),
+ _ => MakeError());
+
+ printIfNotEmpty(texts.Item1);
+ printIfNotEmpty(texts.Item2);
+
+ return texts.Equals(MakeError()) ? 1 : 0;
+ }
+
+ private static string ReadLines(string fileName, bool fromTop, int count)
+ {
+ var lines = File.ReadAllLines(fileName);
+ if (fromTop)
+ {
+ return string.Join(Environment.NewLine, lines.Take(count));
+ }
+ return string.Join(Environment.NewLine, lines.Reverse().Take(count));
+ }
+
+ private static string ReadBytes(string fileName, bool fromTop, int count)
+ {
+ var bytes = File.ReadAllBytes(fileName);
+ if (fromTop)
+ {
+ return Encoding.UTF8.GetString(bytes, 0, count);
+ }
+ return Encoding.UTF8.GetString(bytes, bytes.Length - count, count);
+ }
+
+ private static Tuple MakeError()
+ {
+ return Tuple.Create("\0", "\0");
+ }
+ }
+}
diff --git a/demo/ReadText.LocalizedDemo/Properties/AssemblyInfo.cs b/demo/ReadText.LocalizedDemo/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..eaf1b66f
--- /dev/null
+++ b/demo/ReadText.LocalizedDemo/Properties/AssemblyInfo.cs
@@ -0,0 +1,11 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle("ReadText.Demo")]
+[assembly: AssemblyDescription("ReadText.Demo for Command Line Parser Library")]
+[assembly: AssemblyTrademark("")]
+#if DEBUG
+[assembly: AssemblyConfiguration("Debug")]
+#else
+[assembly: AssemblyConfiguration("Release")]
+#endif
diff --git a/demo/ReadText.LocalizedDemo/Properties/Resources.Designer.cs b/demo/ReadText.LocalizedDemo/Properties/Resources.Designer.cs
new file mode 100644
index 00000000..cc414359
--- /dev/null
+++ b/demo/ReadText.LocalizedDemo/Properties/Resources.Designer.cs
@@ -0,0 +1,378 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace ReadText.LocalizedDemo.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ public class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ReadText.LocalizedDemo.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to bytes.
+ ///
+ public static string Bytes {
+ get {
+ return ResourceManager.GetString("Bytes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to normal scenario.
+ ///
+ public static string ExamplesNormalScenario {
+ get {
+ return ResourceManager.GetString("ExamplesNormalScenario", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to read more lines.
+ ///
+ public static string ExamplesReadMoreLines {
+ get {
+ return ResourceManager.GetString("ExamplesReadMoreLines", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to specify bytes.
+ ///
+ public static string ExamplesSpecifyBytes {
+ get {
+ return ResourceManager.GetString("ExamplesSpecifyBytes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to suppress summary.
+ ///
+ public static string ExamplesSuppressSummary {
+ get {
+ return ResourceManager.GetString("ExamplesSuppressSummary", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to from bottom:.
+ ///
+ public static string FromBottom {
+ get {
+ return ResourceManager.GetString("FromBottom", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to from top:.
+ ///
+ public static string FromTop {
+ get {
+ return ResourceManager.GetString("FromTop", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Bytes to be printed from the beginning or end of the file..
+ ///
+ public static string HelpTextBytes {
+ get {
+ return ResourceManager.GetString("HelpTextBytes", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Input file to be processed..
+ ///
+ public static string HelpTextFileName {
+ get {
+ return ResourceManager.GetString("HelpTextFileName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Lines to be printed from the beginning or end of the file..
+ ///
+ public static string HelpTextLines {
+ get {
+ return ResourceManager.GetString("HelpTextLines", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Suppresses summary messages..
+ ///
+ public static string HelpTextQuiet {
+ get {
+ return ResourceManager.GetString("HelpTextQuiet", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Displays first lines of a file..
+ ///
+ public static string HelpTextVerbHead {
+ get {
+ return ResourceManager.GetString("HelpTextVerbHead", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Displays last lines of a file..
+ ///
+ public static string HelpTextVerbTail {
+ get {
+ return ResourceManager.GetString("HelpTextVerbTail", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to lines.
+ ///
+ public static string Lines {
+ get {
+ return ResourceManager.GetString("Lines", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Reading .
+ ///
+ public static string Reading {
+ get {
+ return ResourceManager.GetString("Reading", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Možnost '{0}' je definována ve špatném formátu..
+ ///
+ public static string SentenceBadFormatConversionErrorOption {
+ get {
+ return ResourceManager.GetString("SentenceBadFormatConversionErrorOption", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A value not bound to option name is defined with a bad format..
+ ///
+ public static string SentenceBadFormatConversionErrorValue {
+ get {
+ return ResourceManager.GetString("SentenceBadFormatConversionErrorValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Token '{0}' is not recognized..
+ ///
+ public static string SentenceBadFormatTokenError {
+ get {
+ return ResourceManager.GetString("SentenceBadFormatTokenError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Verb '{0}' is not recognized..
+ ///
+ public static string SentenceBadVerbSelectedError {
+ get {
+ return ResourceManager.GetString("SentenceBadVerbSelectedError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to ERROR(S):.
+ ///
+ public static string SentenceErrorsHeadingText {
+ get {
+ return ResourceManager.GetString("SentenceErrorsHeadingText", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Display this help screen..
+ ///
+ public static string SentenceHelpCommandTextOption {
+ get {
+ return ResourceManager.GetString("SentenceHelpCommandTextOption", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Display more information on a specific command..
+ ///
+ public static string SentenceHelpCommandTextVerb {
+ get {
+ return ResourceManager.GetString("SentenceHelpCommandTextVerb", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Required option '{0}' is missing..
+ ///
+ public static string SentenceMissingRequiredOptionError {
+ get {
+ return ResourceManager.GetString("SentenceMissingRequiredOptionError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A required value not bound to option name is missing..
+ ///
+ public static string SentenceMissingRequiredValueError {
+ get {
+ return ResourceManager.GetString("SentenceMissingRequiredValueError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Option '{0}' has no value..
+ ///
+ public static string SentenceMissingValueOptionError {
+ get {
+ return ResourceManager.GetString("SentenceMissingValueOptionError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Options: {0} are not compatible with {1}..
+ ///
+ public static string SentenceMutuallyExclusiveSetErrors {
+ get {
+ return ResourceManager.GetString("SentenceMutuallyExclusiveSetErrors", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to No verb selected..
+ ///
+ public static string SentenceNoVerbSelectedError {
+ get {
+ return ResourceManager.GetString("SentenceNoVerbSelectedError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Option '{0}' is defined multiple times..
+ ///
+ public static string SentenceRepeatedOptionError {
+ get {
+ return ResourceManager.GetString("SentenceRepeatedOptionError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Required..
+ ///
+ public static string SentenceRequiredWord {
+ get {
+ return ResourceManager.GetString("SentenceRequiredWord", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A sequence option '{0}' is defined with fewer or more items than required..
+ ///
+ public static string SentenceSequenceOutOfRangeErrorOption {
+ get {
+ return ResourceManager.GetString("SentenceSequenceOutOfRangeErrorOption", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to A sequence value not bound to option name is defined with few items than required..
+ ///
+ public static string SentenceSequenceOutOfRangeErrorValue {
+ get {
+ return ResourceManager.GetString("SentenceSequenceOutOfRangeErrorValue", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Error setting value to option '{0}': {1}.
+ ///
+ public static string SentenceSetValueExceptionError {
+ get {
+ return ResourceManager.GetString("SentenceSetValueExceptionError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Option '{0}' is unknown..
+ ///
+ public static string SentenceUnknownOptionError {
+ get {
+ return ResourceManager.GetString("SentenceUnknownOptionError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to USAGE:.
+ ///
+ public static string SentenceUsageHeadingText {
+ get {
+ return ResourceManager.GetString("SentenceUsageHeadingText", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Display version information..
+ ///
+ public static string SentenceVersionCommandText {
+ get {
+ return ResourceManager.GetString("SentenceVersionCommandText", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/demo/ReadText.LocalizedDemo/Properties/Resources.cs.resx b/demo/ReadText.LocalizedDemo/Properties/Resources.cs.resx
new file mode 100644
index 00000000..cae11e19
--- /dev/null
+++ b/demo/ReadText.LocalizedDemo/Properties/Resources.cs.resx
@@ -0,0 +1,225 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Čtení
+
+
+ řádků
+
+
+ bytů
+
+
+ od začátku:
+
+
+ ok konce:
+
+
+ Počet řádek zobrazených od začátku nebo konce souboru.
+
+
+ Počet bytů zobrazených od začátku nebo konce souboru.
+
+
+ Potlačit sumář.
+
+
+ Jméno vstupního souboru.
+
+
+ Zobrazit první řádky souboru.
+
+
+ normální scénář
+
+
+ specifikace počtu byte
+
+
+ potlačit sumář
+
+
+ přečíst více řádek
+
+
+ Zobrazit poslední řádky souboru.
+
+
+ CHYBY:
+
+
+ Povinné.
+
+
+ POUŽITÍ:
+
+
+ Zobrazit tuto nápovědu.
+
+
+ Zobrazit podrobnou nápovědu pro příkaz.
+
+
+ Zobrazit informaci o verzi.
+
+
+ Token '{0}' nebyl rozpoznán.
+
+
+ Přepínač '{0}' nemá hodnotu.
+
+
+ Neznámý přepínač '{0}'
+
+
+ Přepínač '{0}' je definován ve špatném formátu.
+
+
+ Hodnota nevázaná na přepínač je definována ve špatném formátu.
+
+
+ Příkaz '{0}' nebyl rozpoznán.
+
+
+ Chybí povinný přepínač '{0}'.
+
+
+ Chybí požadovaný přepínač, který není vázán na název možnosti.
+
+
+ Přepínače: {0} nejsou kompatibilní s {1}.
+
+
+ Nebyl vybrán příkaz.
+
+
+ Přepínač '{0}' je definován vícenásobně.
+
+
+ Přepínač sekvence '{0}' je definován méně nebo vícekrát než je povoleno.
+
+
+ Hodnota přepínače je definována méněkrát než je povoleno.
+
+
+ Chyba při nastavení hodnoty přepínače '{0}': {1}
+
+
\ No newline at end of file
diff --git a/demo/ReadText.LocalizedDemo/Properties/Resources.resx b/demo/ReadText.LocalizedDemo/Properties/Resources.resx
new file mode 100644
index 00000000..afdea3d0
--- /dev/null
+++ b/demo/ReadText.LocalizedDemo/Properties/Resources.resx
@@ -0,0 +1,225 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Reading
+
+
+ lines
+
+
+ bytes
+
+
+ from top:
+
+
+ from bottom:
+
+
+ Lines to be printed from the beginning or end of the file.
+
+
+ Bytes to be printed from the beginning or end of the file.
+
+
+ Suppresses summary messages.
+
+
+ Input file to be processed.
+
+
+ Displays first lines of a file.
+
+
+ normal scenario
+
+
+ specify bytes
+
+
+ suppress summary
+
+
+ read more lines
+
+
+ Displays last lines of a file.
+
+
+ Možnost '{0}' je definována ve špatném formátu.
+
+
+ A value not bound to option name is defined with a bad format.
+
+
+ Token '{0}' is not recognized.
+
+
+ Verb '{0}' is not recognized.
+
+
+ ERROR(S):
+
+
+ Display this help screen.
+
+
+ Display more information on a specific command.
+
+
+ Required option '{0}' is missing.
+
+
+ A required value not bound to option name is missing.
+
+
+ Option '{0}' has no value.
+
+
+ Options: {0} are not compatible with {1}.
+
+
+ No verb selected.
+
+
+ Option '{0}' is defined multiple times.
+
+
+ Required.
+
+
+ A sequence option '{0}' is defined with fewer or more items than required.
+
+
+ A sequence value not bound to option name is defined with few items than required.
+
+
+ Error setting value to option '{0}': {1}
+
+
+ Option '{0}' is unknown.
+
+
+ USAGE:
+
+
+ Display version information.
+
+
\ No newline at end of file
diff --git a/demo/ReadText.LocalizedDemo/Properties/launchSettings.json b/demo/ReadText.LocalizedDemo/Properties/launchSettings.json
new file mode 100644
index 00000000..a5627a1b
--- /dev/null
+++ b/demo/ReadText.LocalizedDemo/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "ReadText.LocalizedDemo": {
+ "commandName": "Project",
+ "commandLineArgs": "head"
+ }
+ }
+}
\ No newline at end of file
diff --git a/demo/ReadText.LocalizedDemo/ReadText.LocalizedDemo.csproj b/demo/ReadText.LocalizedDemo/ReadText.LocalizedDemo.csproj
new file mode 100644
index 00000000..57251e03
--- /dev/null
+++ b/demo/ReadText.LocalizedDemo/ReadText.LocalizedDemo.csproj
@@ -0,0 +1,23 @@
+
+
+ Exe
+ net40;net45;net461;netcoreapp2.1;netcoreapp2.0
+false
+
+
+
+
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+ PublicResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
\ No newline at end of file
diff --git a/demo/ReadText.LocalizedDemo/ReadText.LocalizedDemo.sln b/demo/ReadText.LocalizedDemo/ReadText.LocalizedDemo.sln
new file mode 100644
index 00000000..e769b7da
--- /dev/null
+++ b/demo/ReadText.LocalizedDemo/ReadText.LocalizedDemo.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28307.106
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReadText.LocalizedDemo", "ReadText.LocalizedDemo.csproj", "{F9D3B288-1A73-4C91-8ED7-11ED1704B817}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CommandLine", "..\..\src\CommandLine\CommandLine.csproj", "{A03AADAC-F7E5-44A6-8BCC-492B1697CCC9}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F9D3B288-1A73-4C91-8ED7-11ED1704B817}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F9D3B288-1A73-4C91-8ED7-11ED1704B817}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F9D3B288-1A73-4C91-8ED7-11ED1704B817}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F9D3B288-1A73-4C91-8ED7-11ED1704B817}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A03AADAC-F7E5-44A6-8BCC-492B1697CCC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A03AADAC-F7E5-44A6-8BCC-492B1697CCC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A03AADAC-F7E5-44A6-8BCC-492B1697CCC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A03AADAC-F7E5-44A6-8BCC-492B1697CCC9}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {FF14CDF0-EF51-448B-918C-47CD369568DF}
+ EndGlobalSection
+EndGlobal
diff --git a/demo/ReadText.LocalizedDemo/packages.config b/demo/ReadText.LocalizedDemo/packages.config
new file mode 100644
index 00000000..d34c1336
--- /dev/null
+++ b/demo/ReadText.LocalizedDemo/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file