Skip to content

Commit e06db28

Browse files
committed
Internationalize dsc exe
1 parent 7ee6e7a commit e06db28

File tree

8 files changed

+554
-168
lines changed

8 files changed

+554
-168
lines changed

dsc/Cargo.lock

Lines changed: 258 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dsc/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ dsc_lib = { path = "../dsc_lib" }
1919
indicatif = { version = "0.17" }
2020
jsonschema = { version = "0.26", default-features = false }
2121
path-absolutize = { version = "3.1" }
22+
rust-i18n = { version = "3" }
2223
schemars = { version = "0.8" }
2324
serde = { version = "1.0", features = ["derive"] }
2425
serde_json = { version = "1.0", features = ["preserve_order"] }

dsc/locales/en-us.toml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
_version = 1
2+
3+
[args]
4+
about = "Apply configuration or invoke specific DSC resources"
5+
traceFormat = "Trace format to use"
6+
traceLevel = "Trace level to use"
7+
completer = "Generate a shell completion script"
8+
configAbout = "Apply a configuration document"
9+
parameters = "Parameters to pass to the configuration as JSON or YAML"
10+
parametersFile = "Parameters to pass to the configuration as a JSON or YAML file"
11+
systemRoot = "Specify the operating system root path if not targeting the current running OS"
12+
resourceAbout = "Invoke a specific DSC resource"
13+
schemaAbout = "Get the JSON schema for a DSC type"
14+
schemaType = "The type of DSC schema to get"
15+
outputFormat = "The output format to use"
16+
input = "The input document as JSON or YAML to pass to the configuration or resource"
17+
file = "The path to a file used as input to the configuration or resource. Use '-' for the file to read from STDIN."
18+
whatIf = "Run as a what-if operation instead of executing the configuration or resource"
19+
getAbout = "Retrieve the current configuration"
20+
setAbout = "Set the current configuration"
21+
testAbout = "Test the current configuration"
22+
validateAbout = "Validate the current configuration"
23+
exportAbout = "Export the current configuration"
24+
resolveAbout = "Resolve the current configuration"
25+
listAbout = "List or find resources"
26+
adapter = "Adapter filter to limit the resource search"
27+
description = "Description keyword to search for in the resource description"
28+
tags = "Tag to search for in the resource tags"
29+
resourceGet = "Invoke the get operation to a resource"
30+
getAll = "Get all instances of the resource"
31+
resource = "The name of the resource to invoke"
32+
33+
[main]
34+
ctrlCReceived = "Ctrl-C received"
35+
failedCtrlCHandler = "Failed to set Ctrl-C handler"
36+
failedReadingParametersFile = "Failed to read parameters file"
37+
generatingCompleter = "Generating completion script for"
38+
readingParametersFile = "Reading parameters from file"
39+
usingDscVersion = "Running DSC version"
40+
foundProcesses = "Found processes"
41+
failedToGetPid = "Could not get current process id"
42+
currentPid = "Current process id"
43+
failedToGetProcess = "Could not get current process"
44+
terminatingSubprocess ="Terminating subprocesses of process"
45+
terminatingProcess = "Terminating process"
46+
failedTerminatingProcess = "Failed to terminate process"
47+
storeMessage = """DSC.exe is a command-line tool and cannot be run directly from the Windows Store or Explorer.
48+
Visit https://aka.ms/dscv3-docs for more information on how to use DSC.exe.
49+
50+
Press any key to close this window"""
51+
52+
[resolve]
53+
processingInclude = "Processing Include input"
54+
invalidInclude = "Failed to deserialize Include input"
55+
failedToReadFile = "Failed to read file"
56+
failedToOpenFile = "Failed to open included file"
57+
invalidFileContent = "Invalid UTF-8 sequence in included file"
58+
invalidFile = "Failed to read the configuration file as YAML or JSON"
59+
resolvingParameters = "Resolving parameters from file"
60+
failedParseParametersFile = "Failed to parse parameters file to JSON"
61+
failedResolveParametersFile = "Failed to resolve parameters file"
62+
noParametersFile = "No parameters file found"
63+
invalidPath = "Include path must not contain '..'"
64+
failedGetCurrentDirectory = "Failed to get current directory"
65+
66+
[resource_command]
67+
implementedAs = "implemented as"
68+
invalidOperationOnAdapter = "Can not perform this operation on the adapter itself"
69+
adapterNotFound = "Adapter not found"
70+
setInputEmpty = "Desired input is empty"
71+
testInputEmpty = "Expected input is required"
72+
73+
[subcommand]
74+
actualStateNotObject = "actual_state is not an object"
75+
unexpectedTestResult = "Unexpected Group TestResult"
76+
message = "message"
77+
currentDirectory = "current directory"
78+
noParameters = "No parameters specified"
79+
parameters = "Parameters specified"
80+
failedConvertJson = "Failed to convert YAML to JSON"
81+
invalidParamters = "Parameters are not valid JSON or YAML"
82+
invalidPath = "Target path does not exist"
83+
failedSetParameters = "Parameter input failure"
84+
invalidInclude = "Failed to deserialize Include input"
85+
failedSerialize = "Failed to convert validation result to JSON"
86+
invalidConfiguration = "Failed to deserialize configuration"
87+
failedSerializeResolve = "Failed to serialize resolve result"
88+
validatingConfiguration = "Validating configuration against schema"
89+
noResources = "Resources not specified"
90+
resourceTypeNotSpecified = "Resource type not specified"
91+
validatingResource = "Validating resource named"
92+
resourceNotFound = "Resource type not found"
93+
resourceImplementsValidate = "Resource implements validation"
94+
noReason = "No reason provided"
95+
resourceValidationFailed = "Resource failed validation"
96+
resourceDoesNotImplementValidate = "Resource does not implement validation, using schema"
97+
noSchemaOrValidate = "Resource does not have a schema nor supports validation"
98+
noManifest = "Resource does not have a manifest"
99+
tableHeader_type = "Type"
100+
tableHeader_kind = "Kind"
101+
tableHeader_version = "Version"
102+
tableheader_capabilities = "Capabilities"
103+
tableHeader_adapter = "RequireAdapter"
104+
tableHeader_description = "Description"
105+
invalidManifest = "Error in manifest for"
106+
107+
[util]
108+
failedToConvertJsonToString = "Failed to convert JSON to string"
109+
failedToReadTracingSetting = "Could not read 'tracing' setting"
110+
invalidTraceLevel = "Default to 'warn', invalid DSC_TRACE_LEVEL value"
111+
failedToSetTracing = "Unable to set global default tracing subscriber. Tracing is diabled."
112+
validatingSchema = "Validating against schema"
113+
failedToCompileSchema = "JSON Schema Compilation"
114+
validationFailed = "Failed validation"
115+
readingInput = "Reading input from command line parameter"
116+
inputIsFile = "Document provided is a file path, use '--file' instead"
117+
readingInputFromFile = "Reading input from file"
118+
readingInputFromStdin = "Reading input from STDIN"
119+
invalidUtf8 = "Invalid utf-8 input"
120+
failedToReadStdin = "Failed to read input from STDIN"
121+
failedToReadFile = "Failed to read input file"
122+
noInput = "No input provided"
123+
emptyInput = "Empty input provided"
124+
failedToParseInput = "Invalid JSON or YAML"
125+
failedToAbsolutizePath = "Error making config path absolute"
126+
failedToGetParentPath = "Error reading config path parent"
127+
dscConfigRootAlreadySet = "The current value of DSC_CONFIG_ROOT env var will be overridden"
128+
settingDscConfigRoot = "Setting DSC_CONFIG_ROOT env var as"

0 commit comments

Comments
 (0)