@@ -363,34 +363,37 @@ public Application(IAppxManifestApplication manifestApp, UWP package)
363363 BackgroundColor = manifestApp . GetStringValue ( "BackgroundColor" ) ;
364364 Package = package ;
365365
366- DisplayName = ResourceFromPri ( package . FullName , DisplayName ) ;
367- Description = ResourceFromPri ( package . FullName , Description ) ;
366+ DisplayName = ResourceFromPri ( package . FullName , package . Name , DisplayName ) ;
367+ Description = ResourceFromPri ( package . FullName , package . Name , Description ) ;
368368 LogoUri = LogoUriFromManifest ( manifestApp ) ;
369369 LogoPath = LogoPathFromUri ( LogoUri ) ;
370370
371371 Enabled = true ;
372372 }
373373
374- internal string ResourceFromPri ( string packageFullName , string resourceReference )
374+ internal string ResourceFromPri ( string packageFullName , string packageName , string resourceReference )
375375 {
376376 const string prefix = "ms-resource:" ;
377377 if ( ! string . IsNullOrWhiteSpace ( resourceReference ) && resourceReference . StartsWith ( prefix ) )
378378 {
379- // magic comes from @talynone
380- // https://github.com/talynone/Wox.Plugin.WindowsUniversalAppLauncher/blob/master/StoreAppLauncher/Helpers/NativeApiHelper.cs#L139-L153
381379 string key = resourceReference . Substring ( prefix . Length ) ;
382380 string parsed ;
383381 if ( key . StartsWith ( "//" ) )
384382 {
385- parsed = prefix + key ;
386- }
387- else if ( key . StartsWith ( "/" ) )
388- {
389- parsed = prefix + "//" + key ;
383+ parsed = $ "{ prefix } { key } ";
390384 }
391385 else
392386 {
393- parsed = prefix + "///resources/" + key ;
387+ if ( ! key . StartsWith ( "/" ) )
388+ {
389+ key = $ "/{ key } ";
390+ }
391+
392+ if ( ! key . ToLower ( ) . Contains ( "resources" ) )
393+ {
394+ key = $ "/Resources{ key } ";
395+ }
396+ parsed = $ "{ prefix } //{ packageName } { key } ";
394397 }
395398
396399 var outBuffer = new StringBuilder ( 128 ) ;
0 commit comments