IceCubesApp/Packages
Paul Schuetz baf853f46e
Add the ability to translate using deepl even if the instance offers its own service (#1237)
* Allow forced translation with DeepL

Translation with DeepL can now be forced either per post or on the system level.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Require the use of a private API key

A private API key of the user is now required to allow "always translate via
DeepL".

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Persist a stored API key

An API key is stored even if useOnlyDeepL is disabled. If the API key is empty,
the setting is still disabled.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Localize the texts

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Save API key while writing

The API key is now saved, even if the app is closed before leaving the
translation settings view.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Fix build

* Fix theme

* Transition to KeychainSwift, clean up

KeychainHelper is replaced with the already-used KeychainSwift package, the
functions are cleaned up so that the process is easier to understand. The
deactivateToggleIfNoKey function doesn't change the behavior of the buttons or
context menus in the timeline, only demonstrates the necessity of an API key to
the user. Consequently, it's only called when the settings view is shown.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Swiftformat + fixes

---------

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
2023-03-14 18:50:19 +01:00
..
Account SwiftFormat 2023-03-13 13:38:28 +01:00
AppAccount Use 'Done' text on accounts selector (#1245) 2023-03-14 12:17:05 +01:00
Conversations SwiftFormat 2023-03-13 13:38:28 +01:00
DesignSystem SwiftFormat 2023-03-13 13:38:28 +01:00
Env Add the ability to translate using deepl even if the instance offers its own service (#1237) 2023-03-14 18:50:19 +01:00
Explore SwiftFormat 2023-03-13 13:38:28 +01:00
Lists Fix CustomEmoji Baseline Offset (#1188) 2023-03-06 15:21:26 +01:00
Models ServerError: Fix 2023-03-13 13:42:32 +01:00
Network Add the ability to translate using deepl even if the instance offers its own service (#1237) 2023-03-14 18:50:19 +01:00
Notifications SwiftFormat 2023-03-13 13:38:28 +01:00
Status Add the ability to translate using deepl even if the instance offers its own service (#1237) 2023-03-14 18:50:19 +01:00
Timeline SwiftFormat 2023-03-13 13:38:28 +01:00