nextcloud / text

📑 Collaborative document editing using Markdown
GNU Affero General Public License v3.0
540 stars 87 forks source link

Replace deprecated translation methods #6149

Open juliushaertl opened 1 month ago

juliushaertl commented 1 month ago

Error: lib/Service/InitialStateProvider.php:28:3: DeprecatedInterface: Interface OCP\Translation\ITranslationManager is marked as deprecated (see https://psalm.dev/152) Error: lib/Service/InitialStateProvider.php:62:4: DeprecatedClass: Class OCP\Translation\LanguageTuple is marked as deprecated (see https://psalm.dev/098)

https://github.com/nextcloud/documentation/pull/12063/files#diff-aaf8198084ab58336e1610260ae3ca96a1afee796cb21a305d03f2bf442948ea https://github.com/nextcloud/server/pull/46775

@marcelklehr Do the old APIs still work or do we need to move this for 30?

marcelklehr commented 1 month ago

The old APIs still work, but we're moving most apps to the TaskProcessing API now, so the old APIs will not be used by most providers anymore.

juliushaertl commented 1 month ago

Do you think we need to keep both APIs in parallel then or just just migrating to the new one fine?

marcelklehr commented 1 month ago

I would just migrate to the new one directly.

juliushaertl commented 1 month ago

Notes from chat with Marcel:

julien-nc commented 2 weeks ago

Hey there,

The testing app now has a task processing translation provider: OCA\Testing\TaskProcessing\FakeTranslateProvider

More details on how to run translation tasks and get the available languages in the translate section of https://github.com/nextcloud/assistant/issues/114