Puzzlepart / prosjektportalen

Prosjektportal for SharePoint er et prosjektstyringsverktøy for SharePoint basert på prosjektveiviseren
Other
30 stars 16 forks source link

Use Language param to pick localization #173

Closed olemp closed 7 years ago

olemp commented 7 years ago

Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your needs please complete the below template to ensure we have the details to help. Thanks!

Category

[x] Enhancement

[ ] Bug

[ ] Question

Environment

[ ] SharePoint Online

[ ] SharePoint 2013

[ ] SharePoint 2016

Summary

Please summarize the issue.

Version

Please specify what version you are using: [ ]

You can find the version you are using in the bottom left corner of any page in the Project portal site.

If you are not using the latest release, please update and see if the issue is resolved before submitting an issue.

Expected / Desired Behavior / Question

If you are reporting an issue please describe the expected behavior. If you are suggesting an enhancement please describe thoroughly the enhancement, how it can be achieved, and expected benefit. If you are asking a question, ask away!

Observed Behavior

If you are reporting an issue please describe the behavior you expected to occur when performing the action. If you are making a suggestion or asking a question delete this section.

Steps to Reproduce

If you are reporting an issue please describe the steps to reproduce the bug in sufficient detail to allow testing. If you are making a suggestion or asking a question delete this section.

olemp commented 7 years ago

Looks like a wontfix.

tarjeieo commented 7 years ago

We need to handle this in some way or another, worst case we need two different root.xml files. It's not working as is.

olemp commented 7 years ago

Two root.xml is not the worstcase. That's not possible.

Convert-PnPFolderToProvisioningTemplate requires a folder with a template .xml file with the same name as the folder.

Worst case is a root folder for all languages we're going to support.

olemp commented 7 years ago

There is a way to just have several root xml files.

Let's say we have

in the folder root. Then we would have to create a copy of the root folder for each root-*.xml file residing in the root folder using gulp.

root-1044.xml

    <pnp:Localizations>
        <pnp:Localization LCID="1044" Name="Norwegian" ResourceFile="no-NB.resx" />
        <pnp:Localization LCID="1033" Name="English (US)" ResourceFile="no-NB.resx" />
    </pnp:Localizations>

root-1033.xml

    <pnp:Localizations>
        <pnp:Localization LCID="1044" Name="Norwegian" ResourceFile="en-US.resx" />
        <pnp:Localization LCID="1033" Name="English (US)" ResourceFile="en-US.resx" />
    </pnp:Localizations>
olemp commented 7 years ago

Could you report this in PnP-Sites-Core @tarjeieo https://github.com/SharePoint/PnP-Sites-Core/issues?

olemp commented 7 years ago

I attempted to use a parameter for ResourceFile

    <pnp:Localizations>
        <pnp:Localization LCID="1044" Name="Norwegian" ResourceFile="{parameter:Test1}" />
        <pnp:Localization LCID="1033" Name="English (US)" ResourceFile="{parameter:Test1}" />
    </pnp:Localizations>

but I got the following error

Apply-PnPProvisioningTemplate : The given path's format is not supported.
olemp commented 7 years ago

Take a look at https://github.com/Puzzlepart/prosjektportalen/pull/204.