nextcloud / app_api

Nextcloud AppAPI
https://apps.nextcloud.com/apps/app_api
GNU Affero General Public License v3.0
81 stars 7 forks source link

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

Open StefanRichterHuber opened 10 months ago

StefanRichterHuber commented 10 months ago

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

bigcat88 commented 10 months ago

Questions related to translation support for ExApp

We know about this, perhaps this will be our next task, but specifically in this case it is not us who decide.

At the moment, we have not yet decided how ExApp will support translations...