{"id":16484871,"url":"https://github.com/laurentdardenne/measurelocalizeddata","last_synced_at":"2025-06-11T00:05:40.729Z","repository":{"id":174168717,"uuid":"67146822","full_name":"LaurentDardenne/MeasureLocalizedData","owner":"LaurentDardenne","description":"Control the localized keys used with Import-LocalizedData.","archived":false,"fork":false,"pushed_at":"2017-06-17T07:02:33.000Z","size":26,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-04T17:11:53.076Z","etag":null,"topics":["localisation","powershell","powershell-module","rule"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LaurentDardenne.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-01T16:09:50.000Z","updated_at":"2017-04-28T07:44:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"47bfe076-a6bc-41d1-b117-4b86c87f3534","html_url":"https://github.com/LaurentDardenne/MeasureLocalizedData","commit_stats":null,"previous_names":["laurentdardenne/measurelocalizeddata"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FMeasureLocalizedData","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FMeasureLocalizedData/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FMeasureLocalizedData/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FMeasureLocalizedData/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LaurentDardenne","download_url":"https://codeload.github.com/LaurentDardenne/MeasureLocalizedData/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LaurentDardenne%2FMeasureLocalizedData/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259172960,"owners_count":22816557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["localisation","powershell","powershell-module","rule"],"created_at":"2024-10-11T13:18:34.103Z","updated_at":"2025-06-11T00:05:40.711Z","avatar_url":"https://github.com/LaurentDardenne.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# MeasureLocalizedData\n\nControl the localized keys used with Import-LocalizedData.\nRetrieves the nonexistent keys and the unused keys.\n\nTo install this module :\n```Powershell\n$PSGalleryPublishUri = 'https://www.myget.org/F/ottomatt/api/v2/package'\n$PSGallerySourceUri = 'https://www.myget.org/F/ottomatt/api/v2'\n\nRegister-PSRepository -Name OttoMatt -SourceLocation $PSGallerySourceUri -PublishLocation $PSGalleryPublishUri #-InstallationPolicy Trusted\nInstall-Module MeasureLocalizedData -Repository OttoMatt\n```\n\nControl only one file, example a module :\n```Powershell\n #PowershellGet                                                                                                            \nImport-Module MeasureLocalizedData\n \n$Module='.\\PSModule.psm1'\nMeasure-ImportLocalizedData -Primary $Module\n```\nOr multiple files, example a module with several dot sourced scripts :\n```Powershell\n$Module='.\\Plaster.psm1'\n$Functions=@(\n  '.\\InvokePlaster.ps1',\n  '.\\TestPlasterManifest.ps1'\n)\n\nMeasure-ImportLocalizedData -Primary $Module -Secondary $Functions\n```\nThis call return the key nammed 'ShouldCreateNewPlasterManifest'  indicated as 'unused' :\n```Powershell\nScriptName    : \nKeys          : {ShouldCreateNewPlasterManifest}\nResourcesFile : C:\\Users\\Laurent\\Documents\\WindowsPowerShell\\Modules\\Plaster\\en-US\\Plaster.Resources.psd1\nType          : Unused\nCulture       : en-US\n```\nThe error relates to the resource file, so the 'ScriptName' property is not specified (not applicable).\n\nWhen the error relates a script this property is specified :\n```Powershell\nScriptName    : C:\\Users\\Laurent\\Documents\\WindowsPowerShell\\Modules\\Plaster\\InvokePlaster.ps1\nKeys          : {NotExist_in_Ressource_File}\nResourcesFile : C:\\Users\\Laurent\\Documents\\WindowsPowerShell\\Modules\\Plaster\\en-US\\Plaster.Resources.psd1\nType          : Nonexistent\nCulture       : en-US\n```\nTo solve the case 'unused' we must add all scripts \n```Powershell\n$Module='.\\Plaster.psm1'\n$Functions=@(\n  '.\\InvokePlaster.ps1',\n  '.\\TestPlasterManifest.ps1'\n  '.\\NewPlasterManifest.ps1'\n)\n\nMeasure-ImportLocalizedData -Primary $Module -Secondary $Functions\n```\nThis way, the call return no error.\n\n\nThis function returns a PSObject whose PSTypeName is 'LocalizedDataDiagnostic'.\nThis object contains the following properties :\n   * ScriptName    : Full name of the script containing the relevant keys\n         \n   * Keys          : Name of the relevant keys\n      \n   * ResourcesFile : Full Name of the localized resource file\n\n   * Type          : Error type\n\n                     - Unused      : Unused keys\n                     - Nonexistent : unknown keys\n\n   * Culture       : Name of culture tested","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurentdardenne%2Fmeasurelocalizeddata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaurentdardenne%2Fmeasurelocalizeddata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurentdardenne%2Fmeasurelocalizeddata/lists"}