Simplify localization for existing packages
New commands and arguments to help with localization
As someone who prefers a language other than American English (en-US) I want to be able to add or modify localized content to manifests so I can read descriptions in my preferred language.
Proposed technical implementation details (optional)
Two new commands: wingetcreate new-locale and wingetcreate update-locale
wingetcreate new-locale
wingetcreate new-locale <PackageIdentifier>
Targets the latest version, and asks the user for the locale they would like to provide. If the locale is already present, the user should be prompted to use wingetcreate update-locale.
If the locale is not present then it provides the default locale for reference so the user can interactively provide the localized content for an additional locale.
wingetcreate update-locale
wingetcreate update-locale <PackageIdentifier>
Targets the latest version, and asks the user for the locale they would like to provide. If the locale is not already present, the user should be prompted to use wingetcreate new-locale.
If the locale is present then it provides the default locale and the current localized content so the user can interactively provide modified localized content for the locale.
Additional arguments
--locale <locale>: Specify the locale to add or update.
--reference-locale <locale>: Specify the locale for comparison other than the default locale.
--version <version>: Specify the version for an earlier version of the package .
How can I add a new-locale on an existing package now? e.g. I want to add fr-FR to thunderbird : https://github.com/microsoft/winget-pkgs/tree/master/manifests/m/Mozilla/Thunderbird/102.0
Can I use winget-create or I need to manually make a PR?
@NSO73
At this time, you would need to manually make a PR. If you take a look at https://github.com/microsoft/winget-pkgs/blob/master/manifests/m/Mozilla/Thunderbird/102.0/Mozilla.Thunderbird.locale.es-ES.yaml
It's an example of a "locale" as opposed to "defaultLocale". I've put the required (and optional schema line to help with autocomplete in Visual Studio Code) fields below for adding an fr-FR localization. The blank line in the middle is where you would put any of the optional fields from the locale file schema. A more human-readable overview may also be helpful.
# yaml-language-server: $schema=https://aka.ms/winget-manifest.locale.1.1.0.schema.json
PackageIdentifier: Mozilla.Thunderbird
PackageVersion: 102.0
PackageLocale: fr-Fr
ManifestType: locale
ManifestVersion: 1.1.0