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 settings language #91

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
81541a8
Add whatif support
Nov 2, 2024
b180c3a
Initial setup of Windows Setting Language
Gijsreyn Nov 4, 2024
51c2b63
Add examples
Gijsreyn Nov 4, 2024
83eb7a0
Update command to directly call language installer
Gijsreyn Nov 4, 2024
55b01a5
Update contribution
Gijsreyn Nov 4, 2024
c3847d2
Clarification
Gijsreyn Nov 4, 2024
251d306
Export test
Gijsreyn Nov 4, 2024
0f14f9d
Fix TODO
Gijsreyn Nov 4, 2024
b8dd560
Additional tip
Gijsreyn Nov 4, 2024
323d624
Initial module for Windows Update settings
Gijsreyn Nov 4, 2024
0ba034a
TODO task
Gijsreyn Nov 4, 2024
7ba6a69
Add assertions for delivery optimization
Gijsreyn Nov 4, 2024
81b64c3
Update the docs
Gijsreyn Nov 4, 2024
059b59b
Update table values
Gijsreyn Nov 4, 2024
4541bb4
Remove duplicate code
Gijsreyn Nov 4, 2024
102c763
Add whatif tests
Gijsreyn Nov 5, 2024
657e834
Merge branch 'main' into whatif-support
Gijsreyn Nov 5, 2024
5a06f85
Merge branch 'main' into windows-update-setting
Gijsreyn Nov 5, 2024
f8270f7
Small typo in docs
Gijsreyn Nov 5, 2024
5f01ee2
Initial setup for Microsoft.Windows.Setting.Time
Gijsreyn Nov 5, 2024
514868e
Fix up on validateset
Gijsreyn Nov 5, 2024
d74c29d
Merge branch 'main' into windows-setting-time
Gijsreyn Nov 5, 2024
506a589
Include Pester tests
Gijsreyn Nov 5, 2024
38a6184
Resolve remarks @Trenly
Gijsreyn Nov 5, 2024
e7a48b8
Merge branch 'main' into windows-settings-language
Gijsreyn Nov 5, 2024
e609482
Fix PSScriptAnalyzer rules
Gijsreyn Nov 5, 2024
48877f6
Comments
Gijsreyn Nov 5, 2024
41914ef
Resolve comments from Trenly
Nov 5, 2024
ba97203
Merge branch 'main' of https://github.com/Gijsreyn/winget-dsc into wh…
Gijsreyn Nov 6, 2024
8e9c8c5
Merge branch 'main' into windows-setting-time
Gijsreyn Nov 6, 2024
d816dc3
Re-add Invoke-Process
Gijsreyn Nov 6, 2024
cd15ed2
Fix spelling
Gijsreyn Nov 6, 2024
6370252
Spell checker test
Gijsreyn Nov 6, 2024
8539290
Merge branch 'main' into windows-update-setting
Gijsreyn Nov 6, 2024
fec4047
Merge branch 'main' of https://github.com/Gijsreyn/winget-dsc into wi…
Gijsreyn Nov 6, 2024
3bf7d6b
Merge branch 'windows-update-setting' of https://github.com/Gijsreyn/…
Gijsreyn Nov 6, 2024
7ed2c35
Add attributes for validation
Gijsreyn Nov 6, 2024
e7262b2
Merge branch 'whatif-support' of https://github.com/Gijsreyn/winget-d…
Gijsreyn Nov 6, 2024
6dfddf3
Spell checker words
Gijsreyn Nov 6, 2024
8d8ad12
Test
Gijsreyn Nov 6, 2024
1fbe8e2
Add line break for test
Gijsreyn Nov 6, 2024
872574f
Merge branch 'main' of https://github.com/Gijsreyn/winget-dsc into wi…
Gijsreyn Nov 6, 2024
70fae5c
Merge branch 'whatif-support' of https://github.com/Gijsreyn/winget-d…
Gijsreyn Nov 6, 2024
77cc13d
Merge branch 'windows-setting-time' of https://github.com/Gijsreyn/wi…
Gijsreyn Nov 6, 2024
5210dd3
Merge branch 'windows-update-setting' of https://github.com/Gijsreyn/…
Gijsreyn Nov 6, 2024
a00ec3e
Fix spelling
Gijsreyn Nov 6, 2024
35badfd
Temporary add names to pass spell checker
Gijsreyn Nov 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,31 @@ Once the team have approved an issue/spec, development can proceed. If no develo

### Fork, Clone, Branch and Create your PR

Once you've discussed your proposed feature/fix/etc. with a team member, and you've agreed an approach or a spec has been written and approved, it's time to start development:
Once you've discussed your proposed feature/fix/etc. with a team member, and you've agreed an approach or a spec has been written and approved, it's time to start development. There are two flows you can follow depending on the proposed feature or fix.

If you're feature (or module) has not yet been created, follow these steps:

1. Fork the repository if you haven't already.
2. Clone your fork locally.
3. Dot-source the `New-DscResourceModule.ps` in your PowerShell session.
4. Create a new module scaffolding by executing: `New-DscResourceModule -DscResourceModule '<moduleName>' -Description 'DSC Resource for <description>'`
5. Work on your changes and write tests.
6. Build and test to see if it works.
7. Create & push a feature branch.
8. Create a [Draft Pull Request (PR)](https://github.blog/2019-02-14-introducing-draft-pull-requests/).
9. If you are finished with your changes and you want a review, change the state.

> [!TIP]
> Don't forget to add the `DscResourcesToExport` and `Tags`.

When you are working on a fix or you want to add additional features to an existing module, you can follow the below steps:

1. Fork the repository if you haven't already.
1. Clone your fork locally.
1. Create & push a feature branch.
1. Create a [Draft Pull Request (PR)](https://github.blog/2019-02-14-introducing-draft-pull-requests/).
1. Work on your changes.
1. Build and see if it works.
2. Clone your fork locally.
3. Work on your fix or feature, and _optionally_ write tests
4. Build and test to see if it works.
5. Create & push a feature branch.
6. Create a [Pull Request (PR)](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) when you are finished with your changes

### Testing

Expand All @@ -126,7 +143,8 @@ Testing is a key component in the development workflow.

When you'd like the team to take a look, (even if the work is not yet fully-complete), mark the Draft PR as 'Ready For Review' so that the team can review your work and provide comments, suggestions, and request changes. It may take several cycles, but the end result will be solid, testable, conformant code that is safe for us to merge.

> ⚠ Remember: **changes you make may affect both the Windows Package Manager and the schema support implemented in our validation pipelines!** Because of this, we will treat community PR's with the same level of scrutiny and rigor as commits submitted to the official Windows source by team members and partners.
> [!CAUTION]
> Remember: **changes you make may affect both the Windows Package Manager and the schema support implemented in our validation pipelines!** Because of this, we will treat community PR's with the same level of scrutiny and rigor as commits submitted to the official Windows source by team members and partners.

### Merge

Expand Down
4 changes: 4 additions & 0 deletions pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ extends:
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 Microsoft.Windows.Setting.Language"
targetPath: $(Build.SourcesDirectory)\resources\Microsoft.Windows.Setting.Language\
artifactName: Microsoft.Windows.Setting.Language
- output: pipelineArtifact
displayName: "Publish Pipeline PythonPip3Dsc"
targetPath: $(Build.SourcesDirectory)\resources\PythonPip3Dsc\
Expand Down
2 changes: 1 addition & 1 deletion resources/Help/Microsoft.VSCode.Dsc/VSCodeExtension.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The `VSCodeExtension` DSC Resource allows you to install, update, and remove Vis

## EXAMPLES

### Example 1
### EXAMPLE 1

```powershell
# Install the latest version of the Visual Studio Code extension 'ms-python.python'
Expand Down
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. |
| `Exist` | Optional | Boolean | Indicates whether the extension 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 extension 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