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

Unable to submit common screenshot for all languages #28

Closed
DavidMebane opened this issue Mar 3, 2017 · 4 comments
Closed

Unable to submit common screenshot for all languages #28

DavidMebane opened this issue Mar 3, 2017 · 4 comments
Assignees

Comments

@DavidMebane
Copy link

My package has localized listing data, but the screenshots have nothing to localize - they are language/region agnostic. I'd like to be able to submit a common screenshot to be used everywhere, rather than creating required the folder structure per language and duplicating the file N times.

@HowardWolosky
Copy link
Member

@DaveMebs - Sorry for not responding to this earlier. I completely missed that this Issue was opened. That's an interesting scenario. So you're saying that even in your screenshot itself, there is no text or visual asset that would be localized/swapped out based on the user's language?

One way that I could see this being implemented would be to have a special "fallback" language folder during Convert-ListingToObject in PackageTool.ps1. When it gets to if ($null -eq $image), right now it errors out. We could have one last check for that file in a special common folder (at the same level as the other languages) and it would look for the image there before failing.

That would be a fairly minimally invasive change and produce the result that you're looking for. An additional change then to consider on top of that would be to copy it to a "common" language destination folder (as opposed to the language-specific sub-folder within the final StoreBroker payload) to reduce the size of the StoreBroker payload...otherwise the final payload will be larger than needed....we'd just have to check that the Submission API will allow shared screenshot files across languages (I'm not completely sure that it does).

@HowardWolosky
Copy link
Member

Hmmm...another option is to let users just specify an actual language to fallback to, and it would look there. So, users could specify en-us as the fallback language, and it would look for UK screenshot images in en-GB first, and if not found, would then try grabbing them from the en-us fallback folder before failing altogether. I feel like this is a more natural way of doing this. Wondering if you have any specific thoughts @DaveMebs

@DavidMebane
Copy link
Author

In my specific case, I have a common image that is used across all languages with no localization ever used. Since the visual components of my package are not relevant to the user, I also only have this one image to upload.

In many ways, I like the idea of a fallback language over a fallback folder and agree with you that it seems more natural. At the same time, would someone ever have a screenshot localized in 50% of their target languages? That seems a bit odd and not a great user experience to design for.

The most likely case to me is that some images are localized and some are not. And the images that are not localized are never localized. It might make the most sense to have a "neutral" folder to support these and then consider enforcing that you cannot have an asset in both a lang folder and the neutral folder.

Thoughts?

@HowardWolosky HowardWolosky self-assigned this Oct 2, 2017
HowardWolosky added a commit to hwbackup/StoreBroker that referenced this issue Dec 5, 2017
…s to reference the same media file across multiple elements. In other words, the same .png file can now be referenced as a screenshot for multiple languages.

Some applications choose not to localize their screenshots, only focusing on localizing the written metadata for their PDP's.  In these scenarios, they would have a smaller StoreBroker package (and a simpler authoring environment) if they could simply tell StoreBroker to use a different language's screenshots when language-specific ones are not available.

With this change, the following end-user features are now enabled:
  * The StoreBroker config file has been updated to support a `MediaFallbackLanguage` config option
    that allows users to specify a lang-code (e,g, `en-us`, `es-es`, etc...)
  * Users can specify a `-MediaFallbackLanguage` parameter to `New-SubmissionPackage` and
    `New-InAppProductSubmissionPackage`, specifying a lang-code (e,g, `en-us`, `es-es`, etc...) which will
    override any config file option that has been specified.
  * Users can specify a `FallbackLanguage` attribute on the `<caption />` and `<icon />` elements in
     PDP files to optionally choose a different fallback language on a per-element basis.

In any of these cases, if the language-specific media file cannot be found, and a fallback language has
been specified, StoreBroker will then look in the fallback language's Images/media sub-folder for the
same-named media file.  Only then, if still not found, will packaging fail.

It should be noted that there can only ever be _one_ designated fallback language for any given file.
The logic does not cascade.  Therefore, if a user specifies a fallback language in both the config file
_and_ at the command prompt, the command prompt always wins.  If a value has been specified via
the config file and/or command prompt, _as well as_ in a PDP file, the fallback language from the PDP
file will be the one that is used _for that element_, and then StoreBroker will revert back to using the
one from the config file / command prompt until it encounters another one defined specifically in
the PDP file.

Addresses microsoft#28: Unable to submit common screenshot for all languages
HowardWolosky added a commit to hwbackup/StoreBroker that referenced this issue Dec 5, 2017
The Store Submission API was recently updated to allow for submissions to reference the same media file across multiple elements.  In other words, the same .png file can now be referenced as a screenshot for multiple languages.

Some applications choose not to localize their screenshots, only focusing on localizing the written metadata for their PDP's.  In these scenarios, they would have a smaller StoreBroker package (and a simpler authoring environment) if they could simply tell StoreBroker to use a different language's screenshots when language-specific ones are not available.

With this change, the following end-user features are now enabled:
  * The StoreBroker config file has been updated to support a `MediaFallbackLanguage` config option
    that allows users to specify a lang-code (e,g, `en-us`, `es-es`, etc...)
  * Users can specify a `-MediaFallbackLanguage` parameter to `New-SubmissionPackage` and
    `New-InAppProductSubmissionPackage`, specifying a lang-code (e,g, `en-us`, `es-es`, etc...) which will
    override any config file option that has been specified.
  * Users can specify a `FallbackLanguage` attribute on the `<caption />` and `<icon />` elements in
     PDP files to optionally choose a different fallback language on a per-element basis.

In any of these cases, if the language-specific media file cannot be found, and a fallback language has
been specified, StoreBroker will then look in the fallback language's Images/media sub-folder for the
same-named media file.  Only then, if still not found, will packaging fail.

It should be noted that there can only ever be _one_ designated fallback language for any given file.
The logic does not cascade.  Therefore, if a user specifies a fallback language in both the config file
_and_ at the command prompt, the command prompt always wins.  If a value has been specified via
the config file and/or command prompt, _as well as_ in a PDP file, the fallback language from the PDP
file will be the one that is used _for that element_, and then StoreBroker will revert back to using the
one from the config file / command prompt until it encounters another one defined specifically in
the PDP file.

Addresses microsoft#28: Unable to submit common screenshot for all languages
HowardWolosky added a commit that referenced this issue Dec 5, 2017
The Store Submission API was recently updated to allow for submissions to reference the same media file across multiple elements.  In other words, the same .png file can now be referenced as a screenshot for multiple languages.

Some applications choose not to localize their screenshots, only focusing on localizing the written metadata for their PDP's.  In these scenarios, they would have a smaller StoreBroker package (and a simpler authoring environment) if they could simply tell StoreBroker to use a different language's screenshots when language-specific ones are not available.

With this change, the following end-user features are now enabled:
  * The StoreBroker config file has been updated to support a `MediaFallbackLanguage` config option
    that allows users to specify a lang-code (e,g, `en-us`, `es-es`, etc...)
  * Users can specify a `-MediaFallbackLanguage` parameter to `New-SubmissionPackage` and
    `New-InAppProductSubmissionPackage`, specifying a lang-code (e,g, `en-us`, `es-es`, etc...) which will
    override any config file option that has been specified.
  * Users can specify a `FallbackLanguage` attribute on the `<caption />` and `<icon />` elements in
     PDP files to optionally choose a different fallback language on a per-element basis.

In any of these cases, if the language-specific media file cannot be found, and a fallback language has
been specified, StoreBroker will then look in the fallback language's Images/media sub-folder for the
same-named media file.  Only then, if still not found, will packaging fail.

It should be noted that there can only ever be _one_ designated fallback language for any given file.
The logic does not cascade.  Therefore, if a user specifies a fallback language in both the config file
_and_ at the command prompt, the command prompt always wins.  If a value has been specified via
the config file and/or command prompt, _as well as_ in a PDP file, the fallback language from the PDP
file will be the one that is used _for that element_, and then StoreBroker will revert back to using the
one from the config file / command prompt until it encounters another one defined specifically in
the PDP file.

Addresses #28: Unable to submit common screenshot for all languages
@HowardWolosky
Copy link
Member

This was resolved a while ago with #80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants