dotnet-passbook icon indicating copy to clipboard operation
dotnet-passbook copied to clipboard

Add support for localized image

Open cyrildurand opened this issue 1 year ago • 4 comments

fix #182

need further test

Let me know what you think about it

cyrildurand avatar Jun 13 '23 23:06 cyrildurand

Thanks for this - sorry I've not looked it before now.

I'll review this week and let you know!

tomasmcguinness avatar Oct 10 '23 06:10 tomasmcguinness

Sorry - I've not gotten around to this yet!

tomasmcguinness avatar Oct 26 '23 09:10 tomasmcguinness

It didn't initially compile - I think the Culture and LanguageCode properties got mixed up?

The filename doesn't include the lproj extension that was shown in your screenshot. I guess that should be there?

The API for adding the images doesn't allow you to specify the language code for a particular image. We currently allow images to be added like this:

request.Images.Add(PassbookImage.Icon, System.IO.File.ReadAllBytes(Server.MapPath("~/Icons/icon.png")));

We probably need a new way to add images, perhaps a method like:

request.AddImage(PassbookImage.Icon, System.IO.File.ReadAllBytes(Server.MapPath("~/Icons/icon.png")));
request.AddImage(PassbookImage.Icon, "en", System.IO.File.ReadAllBytes(Server.MapPath("~/Icons/icon.png")));

What do you think?

tomasmcguinness avatar Oct 26 '23 09:10 tomasmcguinness