pnp / pnp/pnpframework

Problem with translations with Get-PnPSiteTemplate and Invoke-PnPSiteTemplate

Open
#656 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
259
Forks
161
Avg merge
10h 33m
Merged PRs (30d)
1

Description

Expected behaviour
In a multilingual site, when using Get-PnPSiteTemplate and Invoke-PnPSiteTemplate all translatable elements must be exported and imported using resx resources.

Actual behaviour
Navigation nodes and listview titles are only taken into account with the site default language.

Steps to reproduce behaviour

(Using a user with owner permissions and default language set to Spanish)

  1. Create a communication site with default language set to Spanish
  2. Ensure that English is enabled in site languages
  3. Create a navigation node and set its title un Spanish and English
  4. Create a list and set its default view title in Spanish and English
  5. Connect to the site with PnP.PowerShell (1.10) using the same user that creates the site
  6. Execute Get-PnPSiteTemplate -Out site-template.pnp
  7. Extract site-template.pnp file content to a folder and check the content of the en-US resx file to view that the expected values for the navigation node and the list view title are in English and see that they are in Spanish.
  8. Set the correct values in the en-US resx file, and compress the folder in a new site-template.pnp file
  9. Create a new communication site with default language set to Spanish (with the same user)
  10. Connect to the new site with PnP.PowerShell (1.10) using the same user that creates the site
  11. Execute Invoke-PnPSiteTemplate with the modified site-template.pnp
  12. Check the result and see that the corrected text values are not applied and only texts in Spanish are applied.

Which operating system/environment are you running PnP PowerShell on?
Windows 11
SharePoint Online
PnP.PowerShell 1.10

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the export and import flow with Get-PnPSiteTemplate and Invoke-PnPSiteTemplate on multilingual SharePoint communication sites, using the Spanish default language and English translations described in the steps. Inspect the generated en-US resx content and the resulting navigation node and list view titles; done means both languages are exported and the corrected English values are applied during import.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, localization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.