Skip to content

Commit ac71fd7

Browse files
authored
Merge pull request #123 from PlagueHO/Issue-122
Moved Common Module Resource strings to Localization File - Fixes #122
2 parents 286ae32 + 2cc9491 commit ac71fd7

File tree

16 files changed

+1042
-447
lines changed

16 files changed

+1042
-447
lines changed

DSCResources/CommonResourceHelper.psm1

Lines changed: 0 additions & 425 deletions
This file was deleted.

DSCResources/MSFT_xComputer/MSFT_xComputer.psm1

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,22 @@ param
33
(
44
)
55

6-
Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) `
7-
-ChildPath 'CommonResourceHelper.psm1')
8-
$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xComputer'
6+
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules'
7+
8+
# Import the ComputerManagementDsc Common Modules
9+
Import-Module -Name (Join-Path -Path $modulePath `
10+
-ChildPath (Join-Path -Path 'ComputerManagementDsc.Common' `
11+
-ChildPath 'ComputerManagementDsc.Common.psm1'))
12+
13+
# Import the ComputerManagementDsc Resource Helper Module
14+
Import-Module -Name (Join-Path -Path $modulePath `
15+
-ChildPath (Join-Path -Path 'ComputerManagementDsc.ResourceHelper' `
16+
-ChildPath 'ComputerManagementDsc.ResourceHelper.psm1'))
17+
18+
# Import Localization Strings
19+
$script:localizedData = Get-LocalizedData `
20+
-ResourceName 'MSFT_xComputer' `
21+
-ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)
922

1023
<#
1124
.SYNOPSIS

DSCResources/MSFT_xOfflineDomainJoin/MSFT_xOfflineDomainJoin.psm1

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,22 @@ param
33
(
44
)
55

6-
Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) `
7-
-ChildPath 'CommonResourceHelper.psm1')
8-
$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xOfflineDomainJoin'
6+
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules'
7+
8+
# Import the ComputerManagementDsc Common Modules
9+
Import-Module -Name (Join-Path -Path $modulePath `
10+
-ChildPath (Join-Path -Path 'ComputerManagementDsc.Common' `
11+
-ChildPath 'ComputerManagementDsc.Common.psm1'))
12+
13+
# Import the ComputerManagementDsc Resource Helper Module
14+
Import-Module -Name (Join-Path -Path $modulePath `
15+
-ChildPath (Join-Path -Path 'ComputerManagementDsc.ResourceHelper' `
16+
-ChildPath 'ComputerManagementDsc.ResourceHelper.psm1'))
17+
18+
# Import Localization Strings
19+
$script:localizedData = Get-LocalizedData `
20+
-ResourceName 'MSFT_xOfflineDomainJoin' `
21+
-ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)
922

1023
<#
1124
.SYNOPSIS

DSCResources/MSFT_xPowerPlan/MSFT_xPowerPlan.psm1

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
1-
Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) `
2-
-ChildPath 'CommonResourceHelper.psm1')
3-
$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xPowerPlan'
1+
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules'
2+
3+
# Import the ComputerManagementDsc Common Modules
4+
Import-Module -Name (Join-Path -Path $modulePath `
5+
-ChildPath (Join-Path -Path 'ComputerManagementDsc.Common' `
6+
-ChildPath 'ComputerManagementDsc.Common.psm1'))
7+
8+
# Import the ComputerManagementDsc Resource Helper Module
9+
Import-Module -Name (Join-Path -Path $modulePath `
10+
-ChildPath (Join-Path -Path 'ComputerManagementDsc.ResourceHelper' `
11+
-ChildPath 'ComputerManagementDsc.ResourceHelper.psm1'))
12+
13+
# Import Localization Strings
14+
$script:localizedData = Get-LocalizedData `
15+
-ResourceName 'MSFT_xPowerPlan' `
16+
-ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)
417

518
<#
619
.SYNOPSIS

DSCResources/MSFT_xScheduledTask/MSFT_xScheduledTask.psm1

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,17 @@ namespace xScheduledTask
1414
}
1515
'@
1616

17-
Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) `
18-
-ChildPath 'CommonResourceHelper.psm1')
17+
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules'
18+
19+
# Import the ComputerManagementDsc Common Modules
20+
Import-Module -Name (Join-Path -Path $modulePath `
21+
-ChildPath (Join-Path -Path 'ComputerManagementDsc.Common' `
22+
-ChildPath 'ComputerManagementDsc.Common.psm1'))
23+
24+
# Import the ComputerManagementDsc Resource Helper Module
25+
Import-Module -Name (Join-Path -Path $modulePath `
26+
-ChildPath (Join-Path -Path 'ComputerManagementDsc.ResourceHelper' `
27+
-ChildPath 'ComputerManagementDsc.ResourceHelper.psm1'))
1928

2029
<#
2130
.SYNOPSIS

DSCResources/MSFT_xVirtualMemory/MSFT_xVirtualMemory.psm1

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,22 @@ param
33
(
44
)
55

6-
Import-Module -Name (Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) `
7-
-ChildPath 'CommonResourceHelper.psm1')
8-
$script:localizedData = Get-LocalizedData -ResourceName 'MSFT_xVirtualMemory'
6+
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules'
7+
8+
# Import the ComputerManagementDsc Common Modules
9+
Import-Module -Name (Join-Path -Path $modulePath `
10+
-ChildPath (Join-Path -Path 'ComputerManagementDsc.Common' `
11+
-ChildPath 'ComputerManagementDsc.Common.psm1'))
12+
13+
# Import the ComputerManagementDsc Resource Helper Module
14+
Import-Module -Name (Join-Path -Path $modulePath `
15+
-ChildPath (Join-Path -Path 'ComputerManagementDsc.ResourceHelper' `
16+
-ChildPath 'ComputerManagementDsc.ResourceHelper.psm1'))
17+
18+
# Import Localization Strings
19+
$script:localizedData = Get-LocalizedData `
20+
-ResourceName 'MSFT_xVirtualMemory' `
21+
-ResourcePath (Split-Path -Parent $Script:MyInvocation.MyCommand.Path)
922

1023
<#
1124
.SYNOPSIS

0 commit comments

Comments
 (0)