Skip to content

[Bug]: No app description translation in apps list #54646

@gh-igor

Description

@gh-igor

⚠️ This issue respects the following points: ⚠️

Bug description

On apps pages like
https://my.domain.com/index.php/settings/apps/installed
https://my.domain.com/index.php/settings/apps/enabled
https://my.domain.com/index.php/settings/apps/disabled
https://my.domain.com/index.php/settings/apps/app-bundles

there is a list of apps.

Once app is clicked the right sidebar appears and shows app description with no translation.

It turned out that there was no translation function used in the file in charge (apps/settings/src/components/AppStoreSidebar/AppDescriptionTab.vue)

Once added t(app.id, app.description) into the template there was still no translation

<script setup lang="ts">
...
import { translate as t } from '@nextcloud/l10n'
...
</script>

<template>
  ...
  <Markdown :text=" t(app.id, app.description)" :min-heading="4" />
  ...
</template>

I came up with an idea of importing localization file lazily

<script setup lang="ts">
...
watch(
	() => props.app.id,
	async (id: string) => {
		ready.value = false
		try {
			await import(/* webpackIgnore: true */`${window.location.origin}/apps/${id}/l10n/${language}.js`)
			ready.value = true
		} catch (e) {
			ready.value = false
		}
	},
	{ immediate: true },
)
...
</script>

but I believe there is still a bug in translate function which could have loaded localization file under the hood

Steps to reproduce

  1. Go to https://my.domain.com/index.php/settings/apps/installed
  2. Click on an app so the right sidebar would appear and show app description
  3. See no translation for the app description

Expected behavior

  1. Go to https://my.domain.com/index.php/settings/apps/installed
  2. Click on an app so the right sidebar would appear and show app description
  3. See the app description translated in accordance with selected language

Nextcloud Server version

31

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "my.domain.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "31.0.4.1",
        "overwrite.cli.url": "https:\/\/my.domain.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "updater.release.channel": "git",
        "installed": true,
        "maintenance": false,
        "force_language": "en",
        "force_locale": "en_GB",
        "loglevel": 2,
        "debug": true,
        "profiler": true,
        "defaultapp": "dashboard",
        "app_install_overwrite": []
    }
}

List of activated Apps

$ php occ app:list          
Enabled:
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - lookup_server_connector: 1.19.0
  - oauth2: 1.19.1
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - richdocuments: 8.6.5
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - systemtags: 1.21.1
  - tables: 1.0.0-beta.3
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - updatenotification: 1.21.0
  - user_status: 1.11.0
  - viewer: true
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - admin_audit: 1.21.0
  - encryption: 2.19.0
  - files_external: 1.23.0
  - profiler: 2.0.0 (installed 2.0.0)
  - testing: 1.21.0
  - user_ldap: 1.22.0

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions