Skip to content

[Bug]: I18n not possible for several classes #62376

Description

@fbausch

⚠️ This issue respects the following points: ⚠️

Bug description

The classes in /lib/public/Sharing/Property/ do not properly use the t() function for obtaining internationalized strings.
For example, in

return $l10nFactory->get(Application::APP_ID)->t('Invalid ISO date: ' . $value);
the string for i18n is concatenated, instead of using format strings.

Since

return $l10nFactory->get(Application::APP_ID)->t('Invalid ISO date: ' . $value);

is used, the string showing up in Transifex is Invalid ISO date: .

The correct usage would be something like:

return $l10nFactory->get(Application::APP_ID)->t('Invalid ISO date: %s', [$value]);

Steps to reproduce

  1. Log into Transifex
  2. Open the Nextcloud lib component and check for the strings of the classes in /lib/public/Sharing/Property/

Expected behavior

Transifex should show strings like

Invalid ISO date: %s

Nextcloud Server version

35 (master)

Operating system

No response

PHP engine version

No response

Web server

No response

Database engine version

No response

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

No response

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?

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

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Metadata

Metadata

Assignees

Labels

0. Needs triagePending check for reproducibility or if it fits our roadmap35-feedbackbug

Type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions