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

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

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.

Description

priority: normal Question for Meeting
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

Dominant language
PHP
Stars
202
Forks
30
Avg merge
3d 20h
Merged PRs (30d)
24

Getting set up

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.

More from nextcloud/app_api

All issues in nextcloud/app_api

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.