File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -531,7 +531,7 @@ impl Configurator {
531
531
let mut before: Map < String , Value > = serde_json:: from_value ( before_response. actual_state ) ?;
532
532
// a `get` will return a `result` property, but an actual `set` will have that as `resources`
533
533
if before. contains_key ( "result" ) && !before. contains_key ( "resources" ) {
534
- before. insert ( "resources" . to_string ( ) , before[ "result" ] . clone ( ) ) ;
534
+ before. insert ( "resources" . to_string ( ) , before[ "result" ] . clone ( ) ) ;
535
535
before. remove ( "result" ) ;
536
536
}
537
537
let before_value = serde_json:: to_value ( & before) ?;
Original file line number Diff line number Diff line change @@ -15,5 +15,7 @@ unsupportedValueDataType = "Unsupported registry value data type"
15
15
16
16
[registry_helper ]
17
17
whatIfCreateKey = " Key '%{subkey}' not found, would create it"
18
+ whatIfDeleteValue = " Would delete value '%{value_name}'"
19
+ whatIfDeleteSubkey = " Would delete subkey '%{subkey_name}'"
18
20
removeErrorKeyNotExist = " Key already does not exist"
19
21
removeDeletingSubKey = " Deleting subkey '%{name}' using %{parent}"
Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ impl RegistryHelper {
274
274
275
275
if let Some ( value_name) = & self . config . value_name {
276
276
if self . what_if {
277
- what_if_metadata. push ( format ! ( "Would delete value '{ value_name}'" ) ) ;
277
+ what_if_metadata. push ( t ! ( "registry_helper.whatIfDeleteValue" , value_name = value_name) . to_string ( ) ) ;
278
278
return Ok ( Some ( Registry {
279
279
key_path : self . config . key_path . clone ( ) ,
280
280
value_name : Some ( value_name. clone ( ) ) ,
@@ -301,7 +301,7 @@ impl RegistryHelper {
301
301
let subkey_name = & self . config . key_path [ parent_path. len ( ) + 1 ..] ;
302
302
303
303
if self . what_if {
304
- what_if_metadata. push ( format ! ( "Would delete subkey '{ subkey_name}'" ) ) ;
304
+ what_if_metadata. push ( t ! ( "registry_helper.whatIfDeleteSubkey" , subkey_name = subkey_name) . to_string ( ) ) ;
305
305
return Ok ( Some ( Registry {
306
306
key_path : self . config . key_path . clone ( ) ,
307
307
metadata : Some ( Metadata { what_if : Some ( what_if_metadata) } ) ,
You can’t perform that action at this time.
0 commit comments