Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated translation methods #6149

Open
juliushaertl opened this issue Jul 29, 2024 · 5 comments
Open

Replace deprecated translation methods #6149

juliushaertl opened this issue Jul 29, 2024 · 5 comments

Comments

@juliushaertl
Copy link
Member

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
nextcloud/server#46775

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

@marcelklehr
Copy link
Member

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
Copy link
Member Author

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

@marcelklehr
Copy link
Member

I would just migrate to the new one directly.

@juliushaertl
Copy link
Member Author

juliushaertl commented Aug 6, 2024

  • Migrate the FakeTranslationProvider to the new task api as it is used by our cypress tests
  • Migrate text initial state for translations to new task processing API
  • Migrate Translate.vue component to use task procesing API when doing the API call to translate

Notes from chat with Marcel:

@julien-nc
Copy link
Member

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 nextcloud/assistant#114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📄 To do (~10 entries)
Development

No branches or pull requests

3 participants