* 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.
Previously, if the app was not already running when the Safari action extension was used to open a post in the app, the post would open in the in-app Safari instead of using the Ice Cubes UI.
The action extension only worked well if Ice Cubes was already running but backgrounded when it was used.
This was because of the `hasConnection(with:)` check used to ensure that the current server has a federation relationship with the server the post is on.
Early in app launch, the list of federated peers has not come back from the API request yet, so `hasConnection(with:)` was always returning `false`.
To fix, issue a request to fetch the peers as part of the URL handling process, before checking `hasConnection(with:)` to make the final navigation decision.
As an optimization, only do this if `hasConnection(with:)` returns `false` initially -- if it returns `true`, we already know a connection exists so no need to check again.
* Resolve#359 Optional Missing Alt-Text warning
Add toggle in settings to require alt text (default off)
If setting is enabled, posting show an error if any attached media is missing alt text
* Re-localized strings
* add a setting to disable the account popover on hover
- not entirely pleased with the AnyView() cast but don't really know of a less invasive change
* Fixes
---------
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
* Allow the user to customize the thread indentation
The user can now select if they want to indent threads/replies, and how much
the replies should be indented.
* Make the wording clearer
The wording is now clearer since "thread" is replaced by "reply".
* Fix localizations
---------
Co-authored-by: Thomas Ricouard <ricouard77@gmail.com>
If the content settings specify their own post settings and override the
instance settings, a hint (and link to the content settings) is added to the
instance settings (infos) since that setting might introduce confusion (As
happened in #1677).
Threads/replies are now shown more clearly. Each reply has an indentation level
(and therefore the number of vertical lines) one more than its direct parent.
This leads to siblings having the same indentation level. It makes
understanding somewhat complex thread structures way easier. Previously, a
reply was only indented if it came directly after its parent. If a toot had
more than one reply, the structure was nearly indecipherable, as it wasn't
clear which the parent post of the second (or later) toot was. An example is
"https://mastodon.social/@mhoye/110452462852364819" and all of its replies.
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
The pending-button can now be shown in any corner the user prefers. This is
accomplished by allowing the user to move the counter left in addition to the
already present option to move it down. Fixes#1637
Signed-off-by: Paul Schuetz <pa.schuetz@web.de>