* Account tipping
* Tryout full flow
* Add link params
* WIP
* Progress flow
* Fixes
* More progress
* Refresh user profile on notification
* Tweaks
* Fix follow button not refreshing
* Refactor proxy url
* Code cleanup
* Subscribe to a premium account from a standard linked account
* Premium posts tab on linked standard account
* Fix flow
* New domain
* Fix flow
* More fixes to follow flow
* Update so to sub.club
* Add colorScheme in URL
* rollback domain
* Back to sub.club
* Use SubClub API for Subscription info
* Fix
* Merge
* Merge branch 'iOS-18' + fixes
* Implement a first version of Apple's Translation
The user can now choose between his instance's server, DeepL (with API
key) and Apple's Translation framework. A translation is cleared if
the translation type is changed. The strings aren't yet written, but
the translations settings view's inconsistent background is now fixed.
* Transfer the old "always_use_deepl" setting
The "always_use_deepl"-setting is now deleted, but its content is
transferred to the equivalent value in "preferred_translation_type".
* Show the user if the DeepL-API key is still stored
The user is now shown a prompt if they've switched away from
.useDeepl, but there's still an API key stored. The API key is not
deleted if the user doesn't instruct the app to do so, so this change
makes it more transparent, since a user might not expect the key to
be stored and might not want this to be the case.
* Localize Labels
The labels for the buttons and options are now localized. "DeepL API Key" is written consistently (with uppercase Key)
* Run all the strings through localization
The strings "DeepL" and "Apple Translate" are now also saved in
localizable.strings and addressed through keys. They were taken
directly previously, which was inconsistent.
* Fix storage
The selected value for preferredTranslationType wasn't stored, the
synchronization between UserPreferences and Storage is now in place.
* Hide Apple Translate if not yet on iOS 17.4
The Apple Translate option is hidden if the user hasn't updated their
phone to at least iOS 17.4. If the Apple Translate option is selected
but the user has downgraded to before iOS 17.4, the standard instance
option is selected.
* Consistently show Apple Translate
Apple Translate was previously only shown if the standard translate
button was visible, that is now fixed. It's now attached to the
StatusRowView, which is always present.
* Animate the removal of translations
The reset of a translation when the translation type is changed is now
animated, which is important for iPad users if they've translated a
post in the sidebar.
* Add support for the Mac Catalyst build
The Mac Catalyst Version doesn't allow the import of the api, so
compiler flags now check if the import isn't allowed and then remove
all references to Apple Translate.
* Swift Format
* Revert "Run all the strings through localization"
This reverts commit 86c5099662.
# Conflicts:
# Packages/Env/Sources/Env/TranslationType.swift
* Remove the DeepL fallback
The DeepL fallback for the instance translation service is removed,
error messages are shown if a translation fails.
* Allow for the use of an User API Key as fallback
The DeepL fallback is reinstated if the user has put in their own API
Key
* Make the localization keys clear strings
* Make Apple and the instance a fallback
Apple Translate is now a fallback for both other translation types,
the instance service is a fallback for DeepL.
* - *WIP* Explore tab: Tap on tab to scroll to top.
* - Explore tab: Tap tab to scroll to top.
* - Explore: Tap tab again to focus on search bar.
- Explore: Set `.defaultMinListRowHeight` so scroll to view doesn't occupy more than 1pt height in grouped style list.
- Explore: Add padding to get Explore list view to look the same.
* - Explore: Minor adjust to padding.
* - Messages: Add tap tab to scroll to top.
* - Notifications: Add tap tab to scroll to top.
* - Profile: Add tap tab to scroll to top.
* Add `ScrollToView` that can be used across all views.
* Move scroll-to-top constants to ScrollToView.
* Format
---------
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
The crash will happen when you type something unexpected instance URL.
Example
```swift
let server = "mstdn.jp/"
var components = URLComponents()
components.scheme = "https"
components.host = server
components.path = "/api/v1/instance"
components.url! // 💥 error: Execution was interrupted, reason: EXC_BREAKPOINT (code=1, subcode=0x18c986650).
```
The bio (note) of an account can now be translated via DeepL. If the user has
put in his own DeepL API key, that is used, otherwise, the standard one is
used. See #1267
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
* 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>