Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows setting language #120

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Next Next commit
Only Windows.Setting.Language
  • Loading branch information
G.Reijn authored and G.Reijn committed Nov 7, 2024
commit 1807452ac8049b52609b1d180461872bd3ea6761
34 changes: 19 additions & 15 deletions pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# winget-dsc pipeline to publish artifacts
name: '$(Build.DefinitionName)-$(Build.DefinitionVersion)-$(Date:yyyyMMdd)-$(Rev:r)'
name: "$(Build.DefinitionName)-$(Build.DefinitionVersion)-$(Date:yyyyMMdd)-$(Rev:r)"

# Commit triggers
trigger:
@@ -41,43 +41,47 @@ extends:
- stage: WinGet_DSC_Artifacts_Publish
jobs:
- job: Publish_WinGet_DSC_Resources
displayName: 'Publish WinGet DSC Resources'
displayName: "Publish WinGet DSC Resources"
templateContext:
outputs:
- output: pipelineArtifact
displayName: 'Publish Pipeline Microsoft.Windows.Developer'
displayName: "Publish Pipeline Microsoft.Windows.Developer"
targetPath: $(Build.SourcesDirectory)\resources\Microsoft.Windows.Developer\
artifactName: Microsoft.Windows.Developer
- output: pipelineArtifact
displayName: 'Publish Pipeline Microsoft.Windows.Setting.Accessibility'
displayName: "Publish Pipeline Microsoft.Windows.Setting.Accessibility"
targetPath: $(Build.SourcesDirectory)\resources\Microsoft.Windows.Setting.Accessibility\
artifactName: Microsoft.Windows.Setting.Accessibility
- output: pipelineArtifact
displayName: 'Publish Pipeline PythonPip3Dsc'
displayName: "Publish Pipeline PythonPip3Dsc"
targetPath: $(Build.SourcesDirectory)\resources\PythonPip3Dsc\
artifactName: PythonPip3Dsc
- output: pipelineArtifact
displayName: 'Publish Pipeline YarnDsc'
displayName: "Publish Pipeline YarnDsc"
targetPath: $(Build.SourcesDirectory)\resources\YarnDsc\
artifactName: YarnDsc
- output: pipelineArtifact
displayName: 'Publish Pipeline NpmDsc'
displayName: "Publish Pipeline NpmDsc"
targetPath: $(Build.SourcesDirectory)\resources\NpmDsc\
artifactName: NpmDsc
- output: pipelineArtifact
displayName: 'Publish Pipeline Microsoft.WindowsSandbox.DSC'
displayName: "Publish Pipeline Microsoft.Windows.Setting.Language"
targetPath: $(Build.SourcesDirectory)\resources\Microsoft.Windows.Setting.Language\
artifactName: Microsoft.Windows.Setting.Language
- output: pipelineArtifact
displayName: "Publish Pipeline Microsoft.WindowsSandbox.DSC"
targetPath: $(Build.SourcesDirectory)\resources\Microsoft.WindowsSandbox.DSC\
artifactName: Microsoft.WindowsSandbox.DSC
- output: pipelineArtifact
displayName: 'Publish Pipeline GitDsc'
displayName: "Publish Pipeline GitDsc"
targetPath: $(Build.SourcesDirectory)\resources\GitDsc\
artifactName: GitDsc
- output: pipelineArtifact
displayName: 'Publish Pipeline Microsoft.VSCode.Dsc'
displayName: "Publish Pipeline Microsoft.VSCode.Dsc"
targetPath: $(Build.SourcesDirectory)\resources\Microsoft.VSCode.Dsc\
artifactName: Microsoft.VSCode.Dsc
- output: pipelineArtifact
displayName: 'Publish Pipeline Microsoft.DotNet.Dsc'
displayName: "Publish Pipeline Microsoft.DotNet.Dsc"
targetPath: $(Build.SourcesDirectory)\resources\Microsoft.DotNet.Dsc\
artifactName: Microsoft.DotNet.Dsc

@@ -87,10 +91,10 @@ extends:
fetchTags: false

- task: PowerShell@2
displayName: 'Run Pester tests for DSC modules'
displayName: "Run Pester tests for DSC modules"
inputs:
pwsh: true
targetType: 'inline'
targetType: "inline"
script: |
$env:PSModulePath += ";$(Build.SourcesDirectory)\resources"
Invoke-Pester -CI
@@ -99,6 +103,6 @@ extends:

- task: PublishTestResults@2
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: '**/Test*.xml'
testResultsFormat: "NUnit"
testResultsFiles: "**/Test*.xml"
failTaskOnFailedTests: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
external help file: Microsoft.Windows.Setting.Language.psm1-Help.xml
Module Name: Microsoft.Windows.Setting.Language
ms.date: 11/04/2024
online version:
schema: 2.0.0
title: DisplayLanguage
---

# DisplayLanguage

## SYNOPSIS

The `DisplayLanguage` DSC Resource allows you to set the display language on your local Windows machine.

## DESCRIPTION

The `DisplayLanguage` DSC Resource allows you to set the display language on your local Windows machine.

## PARAMETERS

| **Parameter** | **Attribute** | **DataType** | **Description** | **Allowed Values** |
| ------------- | ------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `LocaleName` | Mandatory | String | The name of the language. This is the language tag that represents the language. For example, `en-US` represents English (United States). | Use the `Get-WinUserLanguageList` to see what language pack have been installed. |
Gijsreyn marked this conversation as resolved.
Show resolved Hide resolved
| `Exist` | Optional | Boolean | Indicates whether the language should exist. The default value is `$true`. | `$true`, `$false` |

## EXAMPLES

### EXAMPLE 1

```powershell
$params = @{
LocaleName = 'en-US'
}
Invoke-DscResource -Name DisplayLanguage -Method Set -Property $params -ModuleName Microsoft.Windows.Setting.Language
```
36 changes: 36 additions & 0 deletions resources/Help/Microsoft.Windows.Setting.Language/Language.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
external help file: Microsoft.Windows.Setting.Language.psm1-Help.xml
Module Name: Microsoft.Windows.Setting.Language
ms.date: 11/04/2024
online version:
schema: 2.0.0
title: Language
---

# Language

## SYNOPSIS

The `Language` DSC Resource allows you to install, update, and uninstall languages on your local Windows machine.

## DESCRIPTION

The `Language` DSC Resource allows you to install, update, and uninstall languages on your local Windows machine.

## PARAMETERS

| **Parameter** | **Attribute** | **DataType** | **Description** | **Allowed Values** |
| ------------- | ------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `LocaleName` | Mandatory | String | The name of the language. This is the language tag that represents the language. For example, `en-US` represents English (United States). | Use the `Get-LocaleList` function or Export() method to get a list of allowed values. |
| `Exist` | Optional | Boolean | Indicates whether the language should exist. The default value is `$true`. | `$true`, `$false` |

## EXAMPLES

### EXAMPLE 1

```powershell
$params = @{
LocaleName = 'en-US'
}
Invoke-DscResource -Name Language -Method Set -Property $params -ModuleName Microsoft.Windows.Setting.Language
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
#
# Module manifest for module 'Microsoft.Windows.Setting.Language'
#
# Generated by: Microsoft Corporation
#
# Generated on: 04/11/2024
#

@{

# Script module or binary module file associated with this manifest.
RootModule = 'Microsoft.Windows.Setting.Language.psm1'

# Version number of this module.
ModuleVersion = '0.1.0'

# Supported PSEditions
# CompatiblePSEditions = @()

# ID used to uniquely identify this module
GUID = '6ab8bbf6-ce28-4d33-a3ce-04c1cc16f139'

# Author of this module
Author = 'Microsoft Corporation'

# Company or vendor of this module
CompanyName = 'Microsoft Corporation'

# Copyright statement for this module
Copyright = '(c) Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'DSC Resource for Windows Setting Language'

# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '7.2'

# Name of the PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
# RequiredModules = @()

# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
# FormatsToProcess = @()

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
# FunctionsToExport = '*'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
# CmdletsToExport = '*'

# Variables to export from this module
# VariablesToExport = '*'

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
# AliasesToExport = '*'

# DSC resources to export from this module
DscResourcesToExport = @('Language', 'DisplayLanguage')

# List of all modules packaged with this module
# ModuleList = @()

# List of all files packaged with this module
# FileList = @()

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{

PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = @(
'PSDscResource_Language',
'PSDscResource_DisplayLanguage'
)

# A URL to the license for this module.
LicenseUri = 'https://github.com/microsoft/winget-dsc/blob/main/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/microsoft/winget-dsc'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
# ReleaseNotes = ''

# Prerelease string of this module
Prerelease = 'alpha'

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false

# External dependent modules of this module
# ExternalModuleDependencies = @()

} # End of PSData hashtable

} # End of PrivateData hashtable

# HelpInfo URI of this module
# HelpInfoURI = ''

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''

}

Loading