ofbiz-framework icon indicating copy to clipboard operation
ofbiz-framework copied to clipboard

Improved: createPlugin - improve process and templates (OFBIZ-13048)

Open PierreSmits opened this issue 10 months ago • 5 comments

With the parameterization of the menu location, improvements to the createPlugin templates are warranted.

added: StaticProperties.properties template SystemPropertyData.xml template

modified: build.gradle

  • renamed 'minilang' folder to 'scripts', as minilang functions (XML) are deprecated in favour of groovy functions
  • added process to generate plugin.properties file from StaticProperties.properties template
  • added process to generate pluginSystemPropertyData.xml file from SystemPropertyData.xml template

modified: web.xml template

  • context-param for mainMenuLocation
  • improved legibility of other context-params

modified: ofbiz-component.xml template

  • added entity-resource loader for pluginSystemProperties.xml
  • addd

modified: CommonScreens.xml template

  • changed menu location
  • added decorator-section 'pre-body', having reference to MainActionMenu and decoration-section-include

modified: Menus.xml template

  • added MainActionMenu

modified: controller.xml template

  • added request-map and view-map for 'New' menu-item in MainActionMenu (Menus.xml template)

modified: Screens.xml template

  • added pre-body decorator section too main screen
  • added 'New' screen

modified: Forms.xml template

  • added 'New' form

modified: UiLabels.xml template

  • remove 'it' and 'zh*'' translations
  • updated 'en' translation for pluginCompanyName

modified: SecurityPermissionsSeedData.xml

  • reordering SecurityPermission record definitions

modified: SecurityGroupDemoData.xml

  • changed permission of BIZADMIN groupId

PierreSmits avatar Apr 19 '24 11:04 PierreSmits

Hi @PierreSmits,

This is a nice initiative, but why removing other languages than English in framework/resources/templates/UiLabels.xml? They may help some people.

JacquesLeRoux avatar Apr 20 '24 08:04 JacquesLeRoux

Hi @JacquesLeRoux,

Thank you for your time to evaluate these changes, and your question.

As you can see in https://github.com/apache/ofbiz-framework/pull/778/commits/5c2cdbeaf59e28edbed5ccd5129ed5e3009c818d in the UiLabels template I have changed the English description of

  • @component-resource-name@CompanyName, and
  • @component-resource-name@CompanySubtitle.

As with these two improvements the translations in the other languages became void, I decided that, with English being the lingua franca for software developers in general and for contributors of ASF projects particularly, it would be better to remove the non-English translations of the other labels too.

PierreSmits avatar Apr 20 '24 21:04 PierreSmits

Please use correct commit according to the template.

Scripts is deprecated also, Groovy files are now in src.

mbrohl avatar Apr 20 '24 23:04 mbrohl

Thanks @PierreSmits for your explanation

JacquesLeRoux avatar Apr 21 '24 06:04 JacquesLeRoux

Hi @JacquesLeRoux ,

Your latest change did to resolve the conflict.

For an explanation on choices made, see description of the ticket.

PierreSmits avatar May 20 '24 19:05 PierreSmits

Hi Pierre,

The 1st thing to do is to address Michael's comment:

Scripts is deprecated also, Groovy files are now in src.

Then update your branch by uploading from trunk the changes made with OFBIZ-13094. I thought that by deleting UiLabels.xml in this PR it would resolve the conflicts when it actually much complicated them.

JacquesLeRoux avatar May 25 '24 07:05 JacquesLeRoux

Michael's comment has been already addressed with OFBIZ-12813

JacquesLeRoux avatar May 25 '24 07:05 JacquesLeRoux

Note: I was started on this by trying to find documentation about createPlugin Gradle task. I did not find any but the explanation of the task itself. I have though to read 8 threads where I'll maybe get some ideas.

JacquesLeRoux avatar May 25 '24 07:05 JacquesLeRoux