nextcloud / nextcloud/app_api

I18N for File actions menu (Top Menu Entry and Talk bots)

Open
#162 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

priority: normal Question for Meeting
Dominant language
PHP
Stars
196
Forks
26
Avg merge
4d 15h
Merged PRs (30d)
31

Description

Describe why it is important and where it will be useful

In Nextcloud each user can set the applications language to have the best user experience and lowest entry barrier. Unfortunately the current implementation of the registration of File Actions Menu, Top Menu Entry and Talk Bots does only support to register a menu in one single language without any hint which is the (preferred) language of the Nextcloud instance.

Describe your proposed solution

Enhance the registration of menu entries like that. If you check if displayName is a plain string or an object this solution is downwards compatible,too.

{
        "name": "unique_name_of_file_actions_menu",
        "displayName": [
            {
                "lang": "en",
                "text": "Display name (for UI listing)"
            },
            {
                "lang": "de",
                "text": "Anzeige name"
            },
            {
                "lang": "default",
                "text": "Display name (for UI listing)"
            }
        ],
        "actionHandler": "/action_handler_route"
        "mime": "mime of files where to display action menu",
        "icon": "img/icon.svg",
        "permissions": "permissions",
        "order": "order_in_file_actions_menu",
}

Describe alternatives you've considered, if relevant

No response

Additional context

No response

Contributor guide

Open the contributing guide

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

Locate the registration handling for File Actions Menu, Top Menu Entry, and Talk Bots, then trace how displayName is currently processed. Support localized displayName entries while retaining plain-string compatibility, including the proposed default-language fallback; verify the registration behavior for all three menu types.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, internationalization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.