Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 140
    • Merge requests 140
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !1151

Merged
Created Jun 08, 2020 by Jérome Perrin@jeromeOwner

renderjs: update translation data in post-upgrade

  • Overview 21
  • Commits 10
  • Pipelines 14
  • Changes 55

Firstly, rework a bit the action to create translation data, the action no longer allow choosing the translation data script to update, but uses the one referenced in the translation gadget html.

In post upgrade, compare the actual content of the translation data script with the expected content, calculated from web site languages, data-i18n attributes from referenced pages and Localizer messages.

This makes the requirement that web sites with different configurations for translations need to use different translation gadget stronger, when it's not met post upgrade will always report consistency issues. To address this, modify existing web sites so that they all use different translation gadgets - or at least don't use translation gadget explicitly.

This was made by:

  • all web sites by default do not have a translation gadget
  • smart_assistant use a dedicated translation gadget, to confirm that using a different translation gadget is possible with an officejs web site, where the translation gadget is defined in the "app" web section.
  • officejs_support_request_ui uses a dedicated translation gadget, because we need this for a customer project and for ourselves.
  • other web sites do not support translation by default, but enabling would be easy:
    • set the allowed languages on web site
    • create an empty web script ( {website}_translation_data.js )
    • create a translation gadget web page ( {website}_translation.html ) using same content as gadget_translation.html, except that the translation data script should be the one created above ( {website}_translation_data.js )
    • configure the web site to use translation gadget in layout properties. In the case of an OfficeJS web site, this should not be set on the web site but on the main web section
    • use "Update Translation Data" action on web site or run post-upgrade step of upgrader.

This revealed problems (page does not load with javascript error) when using different translation gadgets, that were addressed by not pre-loading the default translation gadget.

Edited Jun 23, 2020 by Jérome Perrin
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: feat/renderjs_translation_data_post_upgrade
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7