Skip to content

Add support for displaying plugin language availability in the plugin gallery #12466

@israelcefrin

Description

@israelcefrin

This issue is a sub‑issue of #9961 and focuses on adding explicit support for exposing and displaying plugin language availability within the Plugin Gallery.

Currently, plugin translation availability is not surfaced in the gallery UI, making it difficult for administrators to understand whether a plugin is translated into the languages enabled on their site.


Goals

  • Allow plugins to declare which languages they support.
  • Display those languages in the Plugin Gallery info modal.
  • Align plugin metadata with OJS 3.6 language naming conventions.
  • Enable optional future links to Weblate translation pages.

Proposed Solution

1. Extend Plugin XML

Example:

<locales>
    <locale>en</locale>
    <locale>fr</locale>
    <locale>es</locale>
</locales>

2. Update plugins.xsd Schema

  • Add validation for the new <locales> and <locale> elements, and Weblate locales form.
  • Ensure compatibility with existing plugin release structures.

3. Update Plugin Gallery UI

  • Add a languages section to the plugin info modal.
  • Provide accessible and properly structured HTML (assigned to Israel).
  • Display all available languages (full OJS list is ~64).
  • When Weblate is available:
    • Link languages to Weblate project page.
  • When Weblate is not available:
    • Display static language list only.

4. Behavior Considerations

  • Ensure original plugin language is always shown.
  • Currently, if a plugin brings a new weblate locale, OJS supports it, i.e. admin can install and enable it, and journal manager can enable it. Thus, this locale will be displayed too. However, if a plugin brings a non Weblate locale, they are not supported by OJS, and will not be displayed.
  • Respect OJS installation’s enabled languages (admin must enable a language for plugin use). -- I think this is given, because the UI always uses only langauges enabled by the admin and journal manager.

5. Testing

  • Implement the new XML in a sample plugin.
  • Validate updated plugins.xsd.
  • Test UI changes on a local OJS installation.
  • Produce screenshots.

📘 Documentation Updates

  • Add instructions for developers on how to declare plugin languages.
  • Document required XML structure and locale naming conventions.
  • Update Plugin Gallery docs to describe new UI behavior.

PRs

Metadata

Metadata

Labels

AccessibilityAny issues that affect users with disabilities or compatibility with assistive technologies.

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions