diff --git a/Documentation/Snapshot.md b/Documentation/Snapshot.md index 7140f7a0b..857c1b586 100644 --- a/Documentation/Snapshot.md +++ b/Documentation/Snapshot.md @@ -14,7 +14,7 @@ We use `xcodebuild` CLI tool to trigger UITest. Set the `name` in `-destination` option to add device for snapshot. For example: `-destination 'platform=iOS Simulator,name=iPad Pro (12.9-inch) (5th generation)' \` -You can list the avaiable simulator: +You can list the available simulators: ```zsh # list the destinations xcodebuild \ diff --git a/Localization/README.md b/Localization/README.md index ac32319cc..93bf290bc 100644 --- a/Localization/README.md +++ b/Localization/README.md @@ -1,23 +1,34 @@ # Localization [![Crowdin](https://badges.crowdin.net/mastodon-for-ios/localized.svg)](https://crowdin.com/project/mastodon-for-ios) -Mastodon localization template file +We use Crowdin for translations and some automation. +## How to contribute -## How to contribute? +### Help with translations -Please use the [Crodwin](https://crowdin.com/project/mastodon-for-ios) to contribute. If your language is not in the list. Please feel free to open the issue. +Head over [Crowdin][crowdin-mastodon-ios] for that. To help with translations, select your language and translate :-) If your language is not in the list, please feel free to [open a topic on Crowdin](crowdin-mastodon-ios-discussions). -## How to maintains +Please note: You need to have an account on Crowdin to help with translations. -The project use a script to generate Xcode localized strings files. +### Add new strings -```zsh -// enter workdir -cd Mastodon +This is mainly for developers. -// merge PR from Crowdin bot +1. Add new strings in `Localization/app.json` **and** the `Localizable.strings` for English. +2. Run `swiftgen` to generate the `Strings.swift`-file **or** have Xcode build the app (`swiftgen` is a Build phase, too). +3. Use `import MastodonLocalization` and its (new) `L10n`-enum and its properties where ever you need them in the app. +4. Once the updated `Localization/app.json` hits `develop`, it gets synced to Crowdin, where people can help with translations. `Localization/app.json` must be a valid json. -// update resource -./update_localization.sh -``` \ No newline at end of file +## How to update translations + +If there are new translations, Crowdin pushes new commits to a branch called `l10n_develop` and creates a new Pull Request. Both, the branch and the PR might be updated once an hour. The project itself uses a script to generate the various `Localizable.strings`-files etc. for Xcode. + +To update or add new translations, the workflow is as follows: + +1. Merge the PR with `l10n_develop` into `develop`. It's usually called `New Crowdin Updates` +2. Run `update.localization.sh` on your computer. +3. Commit the changes and push `develop`. + +[crowdin-mastodon-ios]: https://crowdin.com/project/mastodon-for-ios +[crowdin-mastodon-ios-discussions]: https://crowdin.com/project/mastodon-for-ios/discussions diff --git a/Localization/StringsConvertor/Intents/input/cs.lproj/Intents.strings b/Localization/StringsConvertor/Intents/input/cs.lproj/Intents.strings new file mode 100644 index 000000000..6877490ba --- /dev/null +++ b/Localization/StringsConvertor/Intents/input/cs.lproj/Intents.strings @@ -0,0 +1,51 @@ +"16wxgf" = "Post on Mastodon"; + +"751xkl" = "Text Content"; + +"CsR7G2" = "Post on Mastodon"; + +"HZSGTr" = "What content to post?"; + +"HdGikU" = "Posting failed"; + +"KDNTJ4" = "Failure Reason"; + +"RHxKOw" = "Send Post with text content"; + +"RxSqsb" = "Post"; + +"WCIR3D" = "Post ${content} on Mastodon"; + +"ZKJSNu" = "Post"; + +"ZS1XaK" = "${content}"; + +"ZbSjzC" = "Visibility"; + +"Zo4jgJ" = "Post Visibility"; + +"apSxMG-dYQ5NN" = "There are ${count} options matching ‘Public’."; + +"apSxMG-ehFLjY" = "There are ${count} options matching ‘Followers Only’."; + +"ayoYEb-dYQ5NN" = "${content}, Public"; + +"ayoYEb-ehFLjY" = "${content}, Followers Only"; + +"dUyuGg" = "Post on Mastodon"; + +"dYQ5NN" = "Public"; + +"ehFLjY" = "Followers Only"; + +"gfePDu" = "Posting failed. ${failureReason}"; + +"k7dbKQ" = "Post was sent successfully."; + +"oGiqmY-dYQ5NN" = "Just to confirm, you wanted ‘Public’?"; + +"oGiqmY-ehFLjY" = "Just to confirm, you wanted ‘Followers Only’?"; + +"rM6dvp" = "URL"; + +"ryJLwG" = "Post was sent successfully. "; diff --git a/Localization/StringsConvertor/Intents/input/cs.lproj/Intents.stringsdict b/Localization/StringsConvertor/Intents/input/cs.lproj/Intents.stringsdict new file mode 100644 index 000000000..a739f778f --- /dev/null +++ b/Localization/StringsConvertor/Intents/input/cs.lproj/Intents.stringsdict @@ -0,0 +1,46 @@ + + + + + There are ${count} options matching ‘${content}’. - 2 + + NSStringLocalizedFormatKey + There are %#@count_option@ matching ‘${content}’. + count_option + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + %ld + one + 1 option + few + %ld options + many + %ld options + other + %ld options + + + There are ${count} options matching ‘${visibility}’. + + NSStringLocalizedFormatKey + There are %#@count_option@ matching ‘${visibility}’. + count_option + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + %ld + one + 1 option + few + %ld options + many + %ld options + other + %ld options + + + + diff --git a/Localization/StringsConvertor/Intents/input/ko.lproj/Intents.strings b/Localization/StringsConvertor/Intents/input/ko.lproj/Intents.strings index 6877490ba..5ea6fd363 100644 --- a/Localization/StringsConvertor/Intents/input/ko.lproj/Intents.strings +++ b/Localization/StringsConvertor/Intents/input/ko.lproj/Intents.strings @@ -34,18 +34,18 @@ "dUyuGg" = "Post on Mastodon"; -"dYQ5NN" = "Public"; +"dYQ5NN" = "공개"; -"ehFLjY" = "Followers Only"; +"ehFLjY" = "팔로워 전용"; -"gfePDu" = "Posting failed. ${failureReason}"; +"gfePDu" = "게시를 실패했습니다. ${failureReason}"; -"k7dbKQ" = "Post was sent successfully."; +"k7dbKQ" = "성공적으로 게시물을 전송했습니다."; -"oGiqmY-dYQ5NN" = "Just to confirm, you wanted ‘Public’?"; +"oGiqmY-dYQ5NN" = "확인차 물어보건데, '공개'로 게시하시길 원합니까?"; -"oGiqmY-ehFLjY" = "Just to confirm, you wanted ‘Followers Only’?"; +"oGiqmY-ehFLjY" = "확인차 물어보건데, '팔로워 전용'으로 게시하시길 원합니까?"; "rM6dvp" = "URL"; -"ryJLwG" = "Post was sent successfully. "; +"ryJLwG" = "성공적으로 게시물을 전송했습니다. "; diff --git a/Localization/StringsConvertor/Intents/input/ko.lproj/Intents.stringsdict b/Localization/StringsConvertor/Intents/input/ko.lproj/Intents.stringsdict index a14f8b9ff..86a8eac72 100644 --- a/Localization/StringsConvertor/Intents/input/ko.lproj/Intents.stringsdict +++ b/Localization/StringsConvertor/Intents/input/ko.lproj/Intents.stringsdict @@ -13,7 +13,7 @@ NSStringFormatValueTypeKey %ld other - %ld options + %ld 개의 옵션 There are ${count} options matching ‘${visibility}’. @@ -27,7 +27,7 @@ NSStringFormatValueTypeKey %ld other - %ld options + %ld 개의 옵션 diff --git a/Localization/StringsConvertor/Intents/input/lv.lproj/Intents.strings b/Localization/StringsConvertor/Intents/input/lv.lproj/Intents.strings new file mode 100644 index 000000000..eddd2026f --- /dev/null +++ b/Localization/StringsConvertor/Intents/input/lv.lproj/Intents.strings @@ -0,0 +1,51 @@ +"16wxgf" = "Post on Mastodon"; + +"751xkl" = "Text Content"; + +"CsR7G2" = "Post on Mastodon"; + +"HZSGTr" = "What content to post?"; + +"HdGikU" = "Posting failed"; + +"KDNTJ4" = "Failure Reason"; + +"RHxKOw" = "Send Post with text content"; + +"RxSqsb" = "Ziņa"; + +"WCIR3D" = "Post ${content} on Mastodon"; + +"ZKJSNu" = "Post"; + +"ZS1XaK" = "${content}"; + +"ZbSjzC" = "Visibility"; + +"Zo4jgJ" = "Post Visibility"; + +"apSxMG-dYQ5NN" = "There are ${count} options matching ‘Public’."; + +"apSxMG-ehFLjY" = "There are ${count} options matching ‘Followers Only’."; + +"ayoYEb-dYQ5NN" = "${content}, Public"; + +"ayoYEb-ehFLjY" = "${content}, Followers Only"; + +"dUyuGg" = "Post on Mastodon"; + +"dYQ5NN" = "Publisks"; + +"ehFLjY" = "Tikai sekotājiem"; + +"gfePDu" = "Posting failed. ${failureReason}"; + +"k7dbKQ" = "Post was sent successfully."; + +"oGiqmY-dYQ5NN" = "Just to confirm, you wanted ‘Public’?"; + +"oGiqmY-ehFLjY" = "Just to confirm, you wanted ‘Followers Only’?"; + +"rM6dvp" = "URL"; + +"ryJLwG" = "Post was sent successfully. "; diff --git a/Localization/StringsConvertor/Intents/input/lv.lproj/Intents.stringsdict b/Localization/StringsConvertor/Intents/input/lv.lproj/Intents.stringsdict new file mode 100644 index 000000000..8926678aa --- /dev/null +++ b/Localization/StringsConvertor/Intents/input/lv.lproj/Intents.stringsdict @@ -0,0 +1,42 @@ + + + + + There are ${count} options matching ‘${content}’. - 2 + + NSStringLocalizedFormatKey + There are %#@count_option@ matching ‘${content}’. + count_option + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + %ld + zero + %ld options + one + 1 option + other + %ld options + + + There are ${count} options matching ‘${visibility}’. + + NSStringLocalizedFormatKey + There are %#@count_option@ matching ‘${visibility}’. + count_option + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + %ld + zero + %ld options + one + 1 option + other + %ld options + + + + diff --git a/Localization/StringsConvertor/Intents/input/si.lproj/Intents.strings b/Localization/StringsConvertor/Intents/input/si.lproj/Intents.strings new file mode 100644 index 000000000..6877490ba --- /dev/null +++ b/Localization/StringsConvertor/Intents/input/si.lproj/Intents.strings @@ -0,0 +1,51 @@ +"16wxgf" = "Post on Mastodon"; + +"751xkl" = "Text Content"; + +"CsR7G2" = "Post on Mastodon"; + +"HZSGTr" = "What content to post?"; + +"HdGikU" = "Posting failed"; + +"KDNTJ4" = "Failure Reason"; + +"RHxKOw" = "Send Post with text content"; + +"RxSqsb" = "Post"; + +"WCIR3D" = "Post ${content} on Mastodon"; + +"ZKJSNu" = "Post"; + +"ZS1XaK" = "${content}"; + +"ZbSjzC" = "Visibility"; + +"Zo4jgJ" = "Post Visibility"; + +"apSxMG-dYQ5NN" = "There are ${count} options matching ‘Public’."; + +"apSxMG-ehFLjY" = "There are ${count} options matching ‘Followers Only’."; + +"ayoYEb-dYQ5NN" = "${content}, Public"; + +"ayoYEb-ehFLjY" = "${content}, Followers Only"; + +"dUyuGg" = "Post on Mastodon"; + +"dYQ5NN" = "Public"; + +"ehFLjY" = "Followers Only"; + +"gfePDu" = "Posting failed. ${failureReason}"; + +"k7dbKQ" = "Post was sent successfully."; + +"oGiqmY-dYQ5NN" = "Just to confirm, you wanted ‘Public’?"; + +"oGiqmY-ehFLjY" = "Just to confirm, you wanted ‘Followers Only’?"; + +"rM6dvp" = "URL"; + +"ryJLwG" = "Post was sent successfully. "; diff --git a/Localization/StringsConvertor/Intents/input/si.lproj/Intents.stringsdict b/Localization/StringsConvertor/Intents/input/si.lproj/Intents.stringsdict new file mode 100644 index 000000000..18422c772 --- /dev/null +++ b/Localization/StringsConvertor/Intents/input/si.lproj/Intents.stringsdict @@ -0,0 +1,38 @@ + + + + + There are ${count} options matching ‘${content}’. - 2 + + NSStringLocalizedFormatKey + There are %#@count_option@ matching ‘${content}’. + count_option + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + %ld + one + 1 option + other + %ld options + + + There are ${count} options matching ‘${visibility}’. + + NSStringLocalizedFormatKey + There are %#@count_option@ matching ‘${visibility}’. + count_option + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + %ld + one + 1 option + other + %ld options + + + + diff --git a/Localization/StringsConvertor/Intents/input/sl.lproj/Intents.strings b/Localization/StringsConvertor/Intents/input/sl.lproj/Intents.strings new file mode 100644 index 000000000..72de87df2 --- /dev/null +++ b/Localization/StringsConvertor/Intents/input/sl.lproj/Intents.strings @@ -0,0 +1,51 @@ +"16wxgf" = "Objavi na Mastodonu"; + +"751xkl" = "besedilo"; + +"CsR7G2" = "Objavi na Mastodonu"; + +"HZSGTr" = "Kakšno vsebino želite objaviti?"; + +"HdGikU" = "Objava ni uspela"; + +"KDNTJ4" = "Vzrok za neuspeh"; + +"RHxKOw" = "Pošlji objavo z besedilom"; + +"RxSqsb" = "Objavi"; + +"WCIR3D" = "Objavite ${content} na Mastodonu"; + +"ZKJSNu" = "Objavi"; + +"ZS1XaK" = "${content}"; + +"ZbSjzC" = "Vidnost"; + +"Zo4jgJ" = "Vidnost objave"; + +"apSxMG-dYQ5NN" = "Z \"Javno\" se ujema ${count} možnosti."; + +"apSxMG-ehFLjY" = "S \"Samo sledilci\" se ujema ${count} možnosti."; + +"ayoYEb-dYQ5NN" = "${content}, javno"; + +"ayoYEb-ehFLjY" = "${content}, samo sledilci"; + +"dUyuGg" = "Objavi na Mastodonu"; + +"dYQ5NN" = "Javno"; + +"ehFLjY" = "Samo sledilci"; + +"gfePDu" = "Objava je spodletela. ${failureReason}"; + +"k7dbKQ" = "Uspešno poslana objava."; + +"oGiqmY-dYQ5NN" = "Da ne bo nesporazuma - želeli ste \"Javno\"?"; + +"oGiqmY-ehFLjY" = "Da ne bo nesporazuma - želeli ste \"Samo sledilci\"?"; + +"rM6dvp" = "URL"; + +"ryJLwG" = "Uspešno poslana objava. "; diff --git a/Localization/StringsConvertor/Intents/input/sl.lproj/Intents.stringsdict b/Localization/StringsConvertor/Intents/input/sl.lproj/Intents.stringsdict new file mode 100644 index 000000000..5b8deba51 --- /dev/null +++ b/Localization/StringsConvertor/Intents/input/sl.lproj/Intents.stringsdict @@ -0,0 +1,46 @@ + + + + + There are ${count} options matching ‘${content}’. - 2 + + NSStringLocalizedFormatKey + Na voljo: %#@count_option@, ki se ujema z "${content}". + count_option + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + %ld + one + %ld možnost + two + %ld možnosti + few + %ld možnosti + other + %ld možnosti + + + There are ${count} options matching ‘${visibility}’. + + NSStringLocalizedFormatKey + Na voljo: %#@count_option@, ki se ujema z "${visibility}". + count_option + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + %ld + one + %ld možnost + two + %ld možnosti + few + %ld možnosti + other + %ld možnosti + + + + diff --git a/Localization/StringsConvertor/Intents/input/sv.lproj/Intents.strings b/Localization/StringsConvertor/Intents/input/sv.lproj/Intents.strings index 526e495d2..793922506 100644 --- a/Localization/StringsConvertor/Intents/input/sv.lproj/Intents.strings +++ b/Localization/StringsConvertor/Intents/input/sv.lproj/Intents.strings @@ -38,7 +38,7 @@ "ehFLjY" = "Endast följare"; -"gfePDu" = "Publicering misslyckades. ${failureReason}"; +"gfePDu" = "Kunde inte publicera. ${failureReason}"; "k7dbKQ" = "Inlägget har publicerats."; diff --git a/Localization/StringsConvertor/Intents/input/uk.lproj/Intents.strings b/Localization/StringsConvertor/Intents/input/uk.lproj/Intents.strings new file mode 100644 index 000000000..6877490ba --- /dev/null +++ b/Localization/StringsConvertor/Intents/input/uk.lproj/Intents.strings @@ -0,0 +1,51 @@ +"16wxgf" = "Post on Mastodon"; + +"751xkl" = "Text Content"; + +"CsR7G2" = "Post on Mastodon"; + +"HZSGTr" = "What content to post?"; + +"HdGikU" = "Posting failed"; + +"KDNTJ4" = "Failure Reason"; + +"RHxKOw" = "Send Post with text content"; + +"RxSqsb" = "Post"; + +"WCIR3D" = "Post ${content} on Mastodon"; + +"ZKJSNu" = "Post"; + +"ZS1XaK" = "${content}"; + +"ZbSjzC" = "Visibility"; + +"Zo4jgJ" = "Post Visibility"; + +"apSxMG-dYQ5NN" = "There are ${count} options matching ‘Public’."; + +"apSxMG-ehFLjY" = "There are ${count} options matching ‘Followers Only’."; + +"ayoYEb-dYQ5NN" = "${content}, Public"; + +"ayoYEb-ehFLjY" = "${content}, Followers Only"; + +"dUyuGg" = "Post on Mastodon"; + +"dYQ5NN" = "Public"; + +"ehFLjY" = "Followers Only"; + +"gfePDu" = "Posting failed. ${failureReason}"; + +"k7dbKQ" = "Post was sent successfully."; + +"oGiqmY-dYQ5NN" = "Just to confirm, you wanted ‘Public’?"; + +"oGiqmY-ehFLjY" = "Just to confirm, you wanted ‘Followers Only’?"; + +"rM6dvp" = "URL"; + +"ryJLwG" = "Post was sent successfully. "; diff --git a/Localization/StringsConvertor/Intents/input/uk.lproj/Intents.stringsdict b/Localization/StringsConvertor/Intents/input/uk.lproj/Intents.stringsdict new file mode 100644 index 000000000..a739f778f --- /dev/null +++ b/Localization/StringsConvertor/Intents/input/uk.lproj/Intents.stringsdict @@ -0,0 +1,46 @@ + + + + + There are ${count} options matching ‘${content}’. - 2 + + NSStringLocalizedFormatKey + There are %#@count_option@ matching ‘${content}’. + count_option + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + %ld + one + 1 option + few + %ld options + many + %ld options + other + %ld options + + + There are ${count} options matching ‘${visibility}’. + + NSStringLocalizedFormatKey + There are %#@count_option@ matching ‘${visibility}’. + count_option + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + %ld + one + 1 option + few + %ld options + many + %ld options + other + %ld options + + + + diff --git a/Localization/StringsConvertor/Intents/input/vi.lproj/Intents.strings b/Localization/StringsConvertor/Intents/input/vi.lproj/Intents.strings index a95337317..80c01c640 100644 --- a/Localization/StringsConvertor/Intents/input/vi.lproj/Intents.strings +++ b/Localization/StringsConvertor/Intents/input/vi.lproj/Intents.strings @@ -30,7 +30,7 @@ "ayoYEb-dYQ5NN" = "${content}, Công khai"; -"ayoYEb-ehFLjY" = "${content}, Riêng tư"; +"ayoYEb-ehFLjY" = "${content}, Chỉ người theo dõi"; "dUyuGg" = "Đăng lên Mastodon"; diff --git a/Localization/StringsConvertor/input/ar.lproj/app.json b/Localization/StringsConvertor/input/ar.lproj/app.json index 732b5acb2..ce68229ac 100644 --- a/Localization/StringsConvertor/input/ar.lproj/app.json +++ b/Localization/StringsConvertor/input/ar.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "رفع الكتم", "unmute_user": "رفع الكتم عن %s", "muted": "مكتوم", - "edit_info": "تَحريرُ المَعلُومات" + "edit_info": "تَحريرُ المَعلُومات", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "مُصفَّى", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "رَفعُ الحَظرِ عَنِ الحِساب", "message": "تأكيدُ رَفع الحَظرِ عَن %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "جديد في ماستودون", "multiple_account_switch_intro_description": "بدِّل بين حسابات متعددة عبر الاستمرار بالضغط على زر الملف الشخصي.", "accessibility_hint": "انقر نقرًا مزدوجًا لتجاهُل النافذة المنبثقة" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/ca.lproj/app.json b/Localization/StringsConvertor/input/ca.lproj/app.json index da78cf285..4766eb31b 100644 --- a/Localization/StringsConvertor/input/ca.lproj/app.json +++ b/Localization/StringsConvertor/input/ca.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Deixa de silenciar", "unmute_user": "Treure silenci de %s", "muted": "Silenciat", - "edit_info": "Edita" + "edit_info": "Edita", + "show_reblogs": "Mostra els impulsos", + "hide_reblogs": "Amaga els impulsos" }, "timeline": { "filtered": "Filtrat", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Desbloqueja el Compte", "message": "Confirma per a desbloquejar %s" + }, + "confirm_show_reblogs": { + "title": "Mostra els Impulsos", + "message": "Confirma per a mostrar els impulsos" + }, + "confirm_hide_reblogs": { + "title": "Amaga Impulsos", + "message": "Confirma per a amagar els impulsos" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Nou a Mastodon", "multiple_account_switch_intro_description": "Commuta entre diversos comptes mantenint premut el botó del perfil.", "accessibility_hint": "Toca dues vegades per descartar l'assistent" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/ckb.lproj/app.json b/Localization/StringsConvertor/input/ckb.lproj/app.json index 926590d74..49f72d7a3 100644 --- a/Localization/StringsConvertor/input/ckb.lproj/app.json +++ b/Localization/StringsConvertor/input/ckb.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "بێدەنگی مەکە", "unmute_user": "%s بێدەنگ مەکە", "muted": "بێدەنگ کراوە", - "edit_info": "دەستکاری" + "edit_info": "دەستکاری", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "پاڵێوراو", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "ئاستەنگی مەکە", "message": "دڵنیا ببەوە بۆ لابردنی ئاستەنگی %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "نوێ", "multiple_account_switch_intro_description": "هەژمارەکەت بگۆڕە بە دەستڕاگرتن لەسەر دوگمەی پرۆفایلەکە.", "accessibility_hint": "دوو جار دەستی پیا بنێ بۆ داخستنی" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/cs.lproj/Localizable.stringsdict b/Localization/StringsConvertor/input/cs.lproj/Localizable.stringsdict new file mode 100644 index 000000000..cdf35477e --- /dev/null +++ b/Localization/StringsConvertor/input/cs.lproj/Localizable.stringsdict @@ -0,0 +1,561 @@ + + + + + a11y.plural.count.unread.notification + + NSStringLocalizedFormatKey + %#@notification_count_unread_notification@ + notification_count_unread_notification + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 unread notification + few + %ld unread notification + many + %ld unread notification + other + %ld unread notification + + + a11y.plural.count.input_limit_exceeds + + NSStringLocalizedFormatKey + Input limit exceeds %#@character_count@ + character_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 character + few + %ld characters + many + %ld characters + other + %ld characters + + + a11y.plural.count.input_limit_remains + + NSStringLocalizedFormatKey + Input limit remains %#@character_count@ + character_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 character + few + %ld characters + many + %ld characters + other + %ld characters + + + plural.count.followed_by_and_mutual + + NSStringLocalizedFormatKey + %#@names@%#@count_mutual@ + names + + one + + few + + many + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + other + + + count_mutual + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + Followed by %1$@, and another mutual + few + Followed by %1$@, and %ld mutuals + many + Followed by %1$@, and %ld mutuals + other + Followed by %1$@, and %ld mutuals + + + plural.count.metric_formatted.post + + NSStringLocalizedFormatKey + %@ %#@post_count@ + post_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + post + few + posts + many + posts + other + posts + + + plural.count.media + + NSStringLocalizedFormatKey + %#@media_count@ + media_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 media + few + %ld media + many + %ld media + other + %ld media + + + plural.count.post + + NSStringLocalizedFormatKey + %#@post_count@ + post_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 post + few + %ld posts + many + %ld posts + other + %ld posts + + + plural.count.favorite + + NSStringLocalizedFormatKey + %#@favorite_count@ + favorite_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 favorite + few + %ld favorites + many + %ld favorites + other + %ld favorites + + + plural.count.reblog + + NSStringLocalizedFormatKey + %#@reblog_count@ + reblog_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 reblog + few + %ld reblogs + many + %ld reblogs + other + %ld reblogs + + + plural.count.reply + + NSStringLocalizedFormatKey + %#@reply_count@ + reply_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 reply + few + %ld replies + many + %ld replies + other + %ld replies + + + plural.count.vote + + NSStringLocalizedFormatKey + %#@vote_count@ + vote_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 vote + few + %ld votes + many + %ld votes + other + %ld votes + + + plural.count.voter + + NSStringLocalizedFormatKey + %#@voter_count@ + voter_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 voter + few + %ld voters + many + %ld voters + other + %ld voters + + + plural.people_talking + + NSStringLocalizedFormatKey + %#@count_people_talking@ + count_people_talking + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 people talking + few + %ld people talking + many + %ld people talking + other + %ld people talking + + + plural.count.following + + NSStringLocalizedFormatKey + %#@count_following@ + count_following + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 following + few + %ld following + many + %ld following + other + %ld following + + + plural.count.follower + + NSStringLocalizedFormatKey + %#@count_follower@ + count_follower + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 follower + few + %ld followers + many + %ld followers + other + %ld followers + + + date.year.left + + NSStringLocalizedFormatKey + %#@count_year_left@ + count_year_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 year left + few + %ld years left + many + %ld years left + other + %ld years left + + + date.month.left + + NSStringLocalizedFormatKey + %#@count_month_left@ + count_month_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 months left + few + %ld months left + many + %ld months left + other + %ld months left + + + date.day.left + + NSStringLocalizedFormatKey + %#@count_day_left@ + count_day_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 day left + few + %ld days left + many + %ld days left + other + %ld days left + + + date.hour.left + + NSStringLocalizedFormatKey + %#@count_hour_left@ + count_hour_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 hour left + few + %ld hours left + many + %ld hours left + other + %ld hours left + + + date.minute.left + + NSStringLocalizedFormatKey + %#@count_minute_left@ + count_minute_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 minute left + few + %ld minutes left + many + %ld minutes left + other + %ld minutes left + + + date.second.left + + NSStringLocalizedFormatKey + %#@count_second_left@ + count_second_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 second left + few + %ld seconds left + many + %ld seconds left + other + %ld seconds left + + + date.year.ago.abbr + + NSStringLocalizedFormatKey + %#@count_year_ago_abbr@ + count_year_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1y ago + few + %ldy ago + many + %ldy ago + other + %ldy ago + + + date.month.ago.abbr + + NSStringLocalizedFormatKey + %#@count_month_ago_abbr@ + count_month_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1M ago + few + %ldM ago + many + %ldM ago + other + %ldM ago + + + date.day.ago.abbr + + NSStringLocalizedFormatKey + %#@count_day_ago_abbr@ + count_day_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1d ago + few + %ldd ago + many + %ldd ago + other + %ldd ago + + + date.hour.ago.abbr + + NSStringLocalizedFormatKey + %#@count_hour_ago_abbr@ + count_hour_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1h ago + few + %ldh ago + many + %ldh ago + other + %ldh ago + + + date.minute.ago.abbr + + NSStringLocalizedFormatKey + %#@count_minute_ago_abbr@ + count_minute_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1m ago + few + %ldm ago + many + %ldm ago + other + %ldm ago + + + date.second.ago.abbr + + NSStringLocalizedFormatKey + %#@count_second_ago_abbr@ + count_second_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1s ago + few + %lds ago + many + %lds ago + other + %lds ago + + + + diff --git a/Localization/StringsConvertor/input/cs.lproj/app.json b/Localization/StringsConvertor/input/cs.lproj/app.json new file mode 100644 index 000000000..550f71808 --- /dev/null +++ b/Localization/StringsConvertor/input/cs.lproj/app.json @@ -0,0 +1,702 @@ +{ + "common": { + "alerts": { + "common": { + "please_try_again": "Zkuste to prosím znovu.", + "please_try_again_later": "Zkuste to prosím znovu později." + }, + "sign_up_failure": { + "title": "Registrace selhala" + }, + "server_error": { + "title": "Chyba serveru" + }, + "vote_failure": { + "title": "Selhání hlasování", + "poll_ended": "Anketa skončila" + }, + "discard_post_content": { + "title": "Zahodit koncept", + "message": "Potvrďte odstranění obsahu složeného příspěvku." + }, + "publish_post_failure": { + "title": "Publikování selhalo", + "message": "Nepodařilo se publikovat příspěvek.\nZkontrolujte prosím připojení k internetu.", + "attachments_message": { + "video_attach_with_photo": "K příspěvku, který již obsahuje obrázky, nelze připojit video.", + "more_than_one_video": "Nelze připojit více než jedno video." + } + }, + "edit_profile_failure": { + "title": "Chyba při úpravě profilu", + "message": "Nelze upravit profil. Zkuste to prosím znovu." + }, + "sign_out": { + "title": "Odhlásit se", + "message": "Opravdu se chcete odhlásit?", + "confirm": "Odhlásit se" + }, + "block_domain": { + "title": "Are you really, really sure you want to block the entire %s? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain and any of your followers from that domain will be removed.", + "block_entire_domain": "Blokovat doménu" + }, + "save_photo_failure": { + "title": "Uložení fotografie se nezdařilo", + "message": "Please enable the photo library access permission to save the photo." + }, + "delete_post": { + "title": "Odstranit příspěvek", + "message": "Opravdu chcete smazat tento příspěvek?" + }, + "clean_cache": { + "title": "Vyčistit mezipaměť", + "message": "Úspěšně vyčištěno %s mezipaměti." + } + }, + "controls": { + "actions": { + "back": "Zpět", + "next": "Další", + "previous": "Předchozí", + "open": "Otevřít", + "add": "Přidat", + "remove": "Odstranit", + "edit": "Upravit", + "save": "Uložit", + "ok": "OK", + "done": "Hotovo", + "confirm": "Potvrdit", + "continue": "Pokračovat", + "compose": "Napsat", + "cancel": "Zrušit", + "discard": "Zahodit", + "try_again": "Zkusit znovu", + "take_photo": "Vyfotit", + "save_photo": "Uložit fotku", + "copy_photo": "Kopírovat fotografii", + "sign_in": "Přihlásit se", + "sign_up": "Zaregistrovat se", + "see_more": "Zobrazit více", + "preview": "Náhled", + "share": "Sdílet", + "share_user": "Share %s", + "share_post": "Sdílet příspěvek", + "open_in_safari": "Otevřít v Safari", + "open_in_browser": "Otevřít v prohlížeči", + "find_people": "Najít lidi ke sledování", + "manually_search": "Místo toho ručně vyhledat", + "skip": "Přeskočit", + "reply": "Odpovědět", + "report_user": "Nahlásit %s", + "block_domain": "Blokovat %s", + "unblock_domain": "Odblokovat %s", + "settings": "Nastavení", + "delete": "Smazat" + }, + "tabs": { + "home": "Domů", + "search": "Hledat", + "notification": "Oznamování", + "profile": "Profil" + }, + "keyboard": { + "common": { + "switch_to_tab": "Přepnout na %s", + "compose_new_post": "Vytvořit nový příspěvek", + "show_favorites": "Zobrazit Oblíbené", + "open_settings": "Otevřít Nastavení" + }, + "timeline": { + "previous_status": "Předchozí příspěvek", + "next_status": "Další příspěvek", + "open_status": "Otevřít příspěvek", + "open_author_profile": "Otevřít profil autora", + "open_reblogger_profile": "Otevřít rebloggerův profil", + "reply_status": "Odpovědět na příspěvek", + "toggle_reblog": "Toggle Reblog on Post", + "toggle_favorite": "Toggle Favorite on Post", + "toggle_content_warning": "Přepnout varování obsahu", + "preview_image": "Náhled obrázku" + }, + "segmented_control": { + "previous_section": "Předchozí sekce", + "next_section": "Další sekce" + } + }, + "status": { + "user_reblogged": "%s reblogged", + "user_replied_to": "Replied to %s", + "show_post": "Zobrazit příspěvek", + "show_user_profile": "Zobrazit profil uživatele", + "content_warning": "Varování o obsahu", + "sensitive_content": "Citlivý obsah", + "media_content_warning": "Klepnutím kdekoli zobrazíte", + "tap_to_reveal": "Klepnutím zobrazit", + "poll": { + "vote": "Hlasovat", + "closed": "Uzavřeno" + }, + "actions": { + "reply": "Odpovědět", + "reblog": "Boostnout", + "unreblog": "Undo reblog", + "favorite": "Favorite", + "unfavorite": "Odebrat z oblízených", + "menu": "Nabídka", + "hide": "Skrýt", + "show_image": "Zobrazit obrázek", + "show_gif": "Zobrazit GIF", + "show_video_player": "Zobrazit video přehrávač", + "tap_then_hold_to_show_menu": "Tap then hold to show menu" + }, + "tag": { + "url": "URL", + "mention": "Zmínka", + "link": "Odkaz", + "hashtag": "Hashtag", + "email": "E-mail", + "emoji": "Emoji" + }, + "visibility": { + "unlisted": "Každý může vidět tento příspěvek, ale nezobrazovat ve veřejné časové ose.", + "private": "Only their followers can see this post.", + "private_from_me": "Only my followers can see this post.", + "direct": "Only mentioned user can see this post." + } + }, + "friendship": { + "follow": "Sledovat", + "following": "Following", + "request": "Request", + "pending": "Čekající", + "block": "Blokovat", + "block_user": "Blokovat %s", + "block_domain": "Blokovat %s", + "unblock": "Odblokovat", + "unblock_user": "Odblokovat %s", + "blocked": "Blocked", + "mute": "Skrýt", + "mute_user": "Skrýt %s", + "unmute": "Odkrýt", + "unmute_user": "Odkrýt %s", + "muted": "Skrytý", + "edit_info": "Upravit informace", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" + }, + "timeline": { + "filtered": "Filtered", + "timestamp": { + "now": "Nyní" + }, + "loader": { + "load_missing_posts": "Načíst chybějící příspěvky", + "loading_missing_posts": "Načíst chybějící příspěvky...", + "show_more_replies": "Zobrazit více odovědí" + }, + "header": { + "no_status_found": "Nebyl nalezen žádný příspěvek", + "blocking_warning": "You can’t view this user's profile\nuntil you unblock them.\nYour profile looks like this to them.", + "user_blocking_warning": "You can’t view %s’s profile\nuntil you unblock them.\nYour profile looks like this to them.", + "blocked_warning": "You can’t view this user’s profile\nuntil they unblock you.", + "user_blocked_warning": "You can’t view %s’s profile\nuntil they unblock you.", + "suspended_warning": "This user has been suspended.", + "user_suspended_warning": "%s’s account has been suspended." + } + } + } + }, + "scene": { + "welcome": { + "slogan": "Social networking\nback in your hands.", + "get_started": "Začínáme", + "log_in": "Přihlásit se" + }, + "server_picker": { + "title": "Mastodon tvoří uživatelé z různých serverů.", + "subtitle": "Pick a server based on your interests, region, or a general purpose one.", + "subtitle_extend": "Pick a server based on your interests, region, or a general purpose one. Each server is operated by an entirely independent organization or individual.", + "button": { + "category": { + "all": "Vše", + "all_accessiblity_description": "Kategorie: Vše", + "academia": "akademická sféra", + "activism": "aktivismus", + "food": "jídlo", + "furry": "furry", + "games": "games", + "general": "obecné", + "journalism": "žurnalistika", + "lgbt": "lgbt", + "regional": "regionální", + "art": "umění", + "music": "hudba", + "tech": "technologie" + }, + "see_less": "Zobrazit méně", + "see_more": "Zobrazit více" + }, + "label": { + "language": "JAZYK", + "users": "UŽIVATELÉ", + "category": "KATEGORIE" + }, + "input": { + "placeholder": "Hledat servery", + "search_servers_or_enter_url": "Hledat servery nebo zadat URL" + }, + "empty_state": { + "finding_servers": "Hledání dostupných serverů...", + "bad_network": "Při načítání dat nastala chyba. Zkontrolujte připojení k internetu.", + "no_results": "Žádné výsledky" + } + }, + "register": { + "title": "Let’s get you set up on %s", + "lets_get_you_set_up_on_domain": "Let’s get you set up on %s", + "input": { + "avatar": { + "delete": "Smazat" + }, + "username": { + "placeholder": "uživatelské jméno", + "duplicate_prompt": "Toto uživatelské jméno je použito." + }, + "display_name": { + "placeholder": "zobrazované jméno" + }, + "email": { + "placeholder": "e-mail" + }, + "password": { + "placeholder": "heslo", + "require": "Heslo musí být alespoň:", + "character_limit": "8 znaků", + "accessibility": { + "checked": "zaškrtnuto", + "unchecked": "nezaškrtnuto" + }, + "hint": "Vaše heslo musí obsahovat alespoň 8 znaků" + }, + "invite": { + "registration_user_invite_request": "Proč se chcete připojit?" + } + }, + "error": { + "item": { + "username": "Uživatelské jméno", + "email": "E-mail", + "password": "Heslo", + "agreement": "Souhlas", + "locale": "Jazyk", + "reason": "Důvod" + }, + "reason": { + "blocked": "%s contains a disallowed email provider", + "unreachable": "%s does not seem to exist", + "taken": "%s se již používá", + "reserved": "%s je rezervované klíčové slovo", + "accepted": "%s musí být přijato", + "blank": "%s je vyžadováno", + "invalid": "%s is invalid", + "too_long": "%s is too long", + "too_short": "%s is too short", + "inclusion": "%s is not a supported value" + }, + "special": { + "username_invalid": "Username must only contain alphanumeric characters and underscores", + "username_too_long": "Username is too long (can’t be longer than 30 characters)", + "email_invalid": "Toto není platná e-mailová adresa", + "password_too_short": "Password is too short (must be at least 8 characters)" + } + } + }, + "server_rules": { + "title": "Some ground rules.", + "subtitle": "These are set and enforced by the %s moderators.", + "prompt": "By continuing, you’re subject to the terms of service and privacy policy for %s.", + "terms_of_service": "terms of service", + "privacy_policy": "privacy policy", + "button": { + "confirm": "I Agree" + } + }, + "confirm_email": { + "title": "One last thing.", + "subtitle": "Tap the link we emailed to you to verify your account.", + "tap_the_link_we_emailed_to_you_to_verify_your_account": "Tap the link we emailed to you to verify your account", + "button": { + "open_email_app": "Open Email App", + "resend": "Resend" + }, + "dont_receive_email": { + "title": "Check your email", + "description": "Check if your email address is correct as well as your junk folder if you haven’t.", + "resend_email": "Resend Email" + }, + "open_email_app": { + "title": "Check your inbox.", + "description": "We just sent you an email. Check your junk folder if you haven’t.", + "mail": "Pošta", + "open_email_client": "Otevřít e-mailového klienta" + } + }, + "home_timeline": { + "title": "Domů", + "navigation_bar_state": { + "offline": "Offline", + "new_posts": "Nové příspěvky", + "published": "Publikováno!", + "Publishing": "Publikování příspěvku...", + "accessibility": { + "logo_label": "Logo Button", + "logo_hint": "Tap to scroll to top and tap again to previous location" + } + } + }, + "suggestion_account": { + "title": "Find People to Follow", + "follow_explain": "When you follow someone, you’ll see their posts in your home feed." + }, + "compose": { + "title": { + "new_post": "Nový příspěvek", + "new_reply": "New Reply" + }, + "media_selection": { + "camera": "Take Photo", + "photo_library": "Photo Library", + "browse": "Browse" + }, + "content_input_placeholder": "Type or paste what’s on your mind", + "compose_action": "Publish", + "replying_to_user": "replying to %s", + "attachment": { + "photo": "photo", + "video": "video", + "attachment_broken": "This %s is broken and can’t be\nuploaded to Mastodon.", + "description_photo": "Describe the photo for the visually-impaired...", + "description_video": "Describe the video for the visually-impaired..." + }, + "poll": { + "duration_time": "Duration: %s", + "thirty_minutes": "30 minut", + "one_hour": "1 hodina", + "six_hours": "6 hodin", + "one_day": "1 den", + "three_days": "3 dny", + "seven_days": "7 dní", + "option_number": "Možnost %ld" + }, + "content_warning": { + "placeholder": "Write an accurate warning here..." + }, + "visibility": { + "public": "Veřejný", + "unlisted": "Neuvedeno", + "private": "Pouze sledující", + "direct": "Pouze lidé, které zmíním" + }, + "auto_complete": { + "space_to_add": "Space to add" + }, + "accessibility": { + "append_attachment": "Přidat přílohu", + "append_poll": "Přidat anketu", + "remove_poll": "Odstranit anketu", + "custom_emoji_picker": "Vlastní výběr Emoji", + "enable_content_warning": "Povolit upozornění na obsah", + "disable_content_warning": "Vypnout upozornění na obsah", + "post_visibility_menu": "Menu viditelnosti příspěvku" + }, + "keyboard": { + "discard_post": "Zahodit příspěvek", + "publish_post": "Publikovat příspěvek", + "toggle_poll": "Přepnout anketu", + "toggle_content_warning": "Toggle Content Warning", + "append_attachment_entry": "Přidat přílohu - %s", + "select_visibility_entry": "Vyberte viditelnost - %s" + } + }, + "profile": { + "header": { + "follows_you": "Sleduje vás" + }, + "dashboard": { + "posts": "příspěvky", + "following": "following", + "followers": "sledující" + }, + "fields": { + "add_row": "Přidat řádek", + "placeholder": { + "label": "Label", + "content": "Obsah" + } + }, + "segmented_control": { + "posts": "Příspěvky", + "replies": "Odpovědí", + "posts_and_replies": "Příspěvky a odpovědi", + "media": "Média", + "about": "About" + }, + "relationship_action_alert": { + "confirm_mute_user": { + "title": "Skrýt účet", + "message": "Potvrdit skrytí %s" + }, + "confirm_unmute_user": { + "title": "Zrušit skrytí účtu", + "message": "Confirm to unmute %s" + }, + "confirm_block_user": { + "title": "Blokovat účet", + "message": "Potvrdit blokování %s" + }, + "confirm_unblock_user": { + "title": "Odblokovat účet", + "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" + } + }, + "accessibility": { + "show_avatar_image": "Show avatar image", + "edit_avatar_image": "Edit avatar image", + "show_banner_image": "Show banner image", + "double_tap_to_open_the_list": "Double tap to open the list" + } + }, + "follower": { + "title": "follower", + "footer": "Followers from other servers are not displayed." + }, + "following": { + "title": "following", + "footer": "Follows from other servers are not displayed." + }, + "familiarFollowers": { + "title": "Followers you familiar", + "followed_by_names": "Followed by %s" + }, + "favorited_by": { + "title": "Favorited By" + }, + "reblogged_by": { + "title": "Reblogged By" + }, + "search": { + "title": "Search", + "search_bar": { + "placeholder": "Search hashtags and users", + "cancel": "Cancel" + }, + "recommend": { + "button_text": "See All", + "hash_tag": { + "title": "Trending on Mastodon", + "description": "Hashtags that are getting quite a bit of attention", + "people_talking": "%s people are talking" + }, + "accounts": { + "title": "Accounts you might like", + "description": "You may like to follow these accounts", + "follow": "Follow" + } + }, + "searching": { + "segment": { + "all": "All", + "people": "People", + "hashtags": "Hashtags", + "posts": "Posts" + }, + "empty_state": { + "no_results": "No results" + }, + "recent_search": "Recent searches", + "clear": "Clear" + } + }, + "discovery": { + "tabs": { + "posts": "Posts", + "hashtags": "Hashtags", + "news": "News", + "community": "Community", + "for_you": "For You" + }, + "intro": "These are the posts gaining traction in your corner of Mastodon." + }, + "favorite": { + "title": "Your Favorites" + }, + "notification": { + "title": { + "Everything": "Everything", + "Mentions": "Mentions" + }, + "notification_description": { + "followed_you": "followed you", + "favorited_your_post": "favorited your post", + "reblogged_your_post": "reblogged your post", + "mentioned_you": "mentioned you", + "request_to_follow_you": "request to follow you", + "poll_has_ended": "poll has ended" + }, + "keyobard": { + "show_everything": "Show Everything", + "show_mentions": "Show Mentions" + }, + "follow_request": { + "accept": "Accept", + "accepted": "Accepted", + "reject": "reject", + "rejected": "Rejected" + } + }, + "thread": { + "back_title": "Post", + "title": "Post from %s" + }, + "settings": { + "title": "Settings", + "section": { + "appearance": { + "title": "Appearance", + "automatic": "Automatic", + "light": "Always Light", + "dark": "Always Dark" + }, + "look_and_feel": { + "title": "Look and Feel", + "use_system": "Use System", + "really_dark": "Really Dark", + "sorta_dark": "Sorta Dark", + "light": "Light" + }, + "notifications": { + "title": "Notifications", + "favorites": "Favorites my post", + "follows": "Follows me", + "boosts": "Reblogs my post", + "mentions": "Mentions me", + "trigger": { + "anyone": "anyone", + "follower": "a follower", + "follow": "anyone I follow", + "noone": "no one", + "title": "Notify me when" + } + }, + "preference": { + "title": "Preferences", + "true_black_dark_mode": "True black dark mode", + "disable_avatar_animation": "Disable animated avatars", + "disable_emoji_animation": "Disable animated emojis", + "using_default_browser": "Use default browser to open links", + "open_links_in_mastodon": "Open links in Mastodon" + }, + "boring_zone": { + "title": "The Boring Zone", + "account_settings": "Account Settings", + "terms": "Terms of Service", + "privacy": "Privacy Policy" + }, + "spicy_zone": { + "title": "The Spicy Zone", + "clear": "Clear Media Cache", + "signout": "Sign Out" + } + }, + "footer": { + "mastodon_description": "Mastodon is open source software. You can report issues on GitHub at %s (%s)" + }, + "keyboard": { + "close_settings_window": "Close Settings Window" + } + }, + "report": { + "title_report": "Report", + "title": "Report %s", + "step1": "Step 1 of 2", + "step2": "Step 2 of 2", + "content1": "Are there any other posts you’d like to add to the report?", + "content2": "Is there anything the moderators should know about this report?", + "report_sent_title": "Thanks for reporting, we’ll look into this.", + "send": "Send Report", + "skip_to_send": "Send without comment", + "text_placeholder": "Type or paste additional comments", + "reported": "REPORTED", + "step_one": { + "step_1_of_4": "Step 1 of 4", + "whats_wrong_with_this_post": "What's wrong with this post?", + "whats_wrong_with_this_account": "What's wrong with this account?", + "whats_wrong_with_this_username": "What's wrong with %s?", + "select_the_best_match": "Select the best match", + "i_dont_like_it": "I don’t like it", + "it_is_not_something_you_want_to_see": "It is not something you want to see", + "its_spam": "It’s spam", + "malicious_links_fake_engagement_or_repetetive_replies": "Malicious links, fake engagement, or repetetive replies", + "it_violates_server_rules": "It violates server rules", + "you_are_aware_that_it_breaks_specific_rules": "You are aware that it breaks specific rules", + "its_something_else": "It’s something else", + "the_issue_does_not_fit_into_other_categories": "The issue does not fit into other categories" + }, + "step_two": { + "step_2_of_4": "Step 2 of 4", + "which_rules_are_being_violated": "Which rules are being violated?", + "select_all_that_apply": "Select all that apply", + "i_just_don’t_like_it": "I just don’t like it" + }, + "step_three": { + "step_3_of_4": "Step 3 of 4", + "are_there_any_posts_that_back_up_this_report": "Are there any posts that back up this report?", + "select_all_that_apply": "Select all that apply" + }, + "step_four": { + "step_4_of_4": "Step 4 of 4", + "is_there_anything_else_we_should_know": "Is there anything else we should know?" + }, + "step_final": { + "dont_want_to_see_this": "Don’t want to see this?", + "when_you_see_something_you_dont_like_on_mastodon_you_can_remove_the_person_from_your_experience.": "When you see something you don’t like on Mastodon, you can remove the person from your experience.", + "unfollow": "Unfollow", + "unfollowed": "Unfollowed", + "unfollow_user": "Unfollow %s", + "mute_user": "Mute %s", + "you_wont_see_their_posts_or_reblogs_in_your_home_feed_they_wont_know_they_ve_been_muted": "You won’t see their posts or reblogs in your home feed. They won’t know they’ve been muted.", + "block_user": "Block %s", + "they_will_no_longer_be_able_to_follow_or_see_your_posts_but_they_can_see_if_theyve_been_blocked": "They will no longer be able to follow or see your posts, but they can see if they’ve been blocked.", + "while_we_review_this_you_can_take_action_against_user": "While we review this, you can take action against %s" + } + }, + "preview": { + "keyboard": { + "close_preview": "Close Preview", + "show_next": "Show Next", + "show_previous": "Show Previous" + } + }, + "account_list": { + "tab_bar_hint": "Current selected profile: %s. Double tap then hold to show account switcher", + "dismiss_account_switcher": "Dismiss Account Switcher", + "add_account": "Add Account" + }, + "wizard": { + "new_in_mastodon": "New in Mastodon", + "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", + "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" + } + } +} diff --git a/Localization/StringsConvertor/input/cs.lproj/ios-infoPlist.json b/Localization/StringsConvertor/input/cs.lproj/ios-infoPlist.json new file mode 100644 index 000000000..c6db73de0 --- /dev/null +++ b/Localization/StringsConvertor/input/cs.lproj/ios-infoPlist.json @@ -0,0 +1,6 @@ +{ + "NSCameraUsageDescription": "Used to take photo for post status", + "NSPhotoLibraryAddUsageDescription": "Used to save photo into the Photo Library", + "NewPostShortcutItemTitle": "New Post", + "SearchShortcutItemTitle": "Search" +} diff --git a/Localization/StringsConvertor/input/cy.lproj/app.json b/Localization/StringsConvertor/input/cy.lproj/app.json index 710f42b93..bc7f75d96 100644 --- a/Localization/StringsConvertor/input/cy.lproj/app.json +++ b/Localization/StringsConvertor/input/cy.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Unmute", "unmute_user": "Unmute %s", "muted": "Muted", - "edit_info": "Edit Info" + "edit_info": "Edit Info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Filtered", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Unblock Account", "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "New in Mastodon", "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/da.lproj/app.json b/Localization/StringsConvertor/input/da.lproj/app.json index a965b23ae..80b0882d9 100644 --- a/Localization/StringsConvertor/input/da.lproj/app.json +++ b/Localization/StringsConvertor/input/da.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Unmute", "unmute_user": "Unmute %s", "muted": "Muted", - "edit_info": "Edit Info" + "edit_info": "Edit Info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Filtered", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Unblock Account", "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "New in Mastodon", "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/de.lproj/Localizable.stringsdict b/Localization/StringsConvertor/input/de.lproj/Localizable.stringsdict index 3ea0fd0e3..c6a8a4297 100644 --- a/Localization/StringsConvertor/input/de.lproj/Localizable.stringsdict +++ b/Localization/StringsConvertor/input/de.lproj/Localizable.stringsdict @@ -21,7 +21,7 @@ a11y.plural.count.input_limit_exceeds NSStringLocalizedFormatKey - Eingabelimit überschritten %#@character_count@ + Zeichenanzahl um %#@character_count@ überschritten character_count NSStringFormatSpecTypeKey @@ -37,7 +37,7 @@ a11y.plural.count.input_limit_remains NSStringLocalizedFormatKey - Eingabelimit eingehalten %#@character_count@ + Noch %#@character_count@ übrig character_count NSStringFormatSpecTypeKey @@ -72,9 +72,9 @@ NSStringFormatValueTypeKey ld one - Followed by %1$@, and another mutual + Gefolgt von %1$@ und einer weiteren Person, der du folgst other - Followed by %1$@, and %ld mutuals + Gefolgt von %1$@ und %ld weiteren Personen, denen du folgst plural.count.metric_formatted.post @@ -104,9 +104,9 @@ NSStringFormatValueTypeKey ld one - 1 media + 1 Datei other - %ld media + %ld Dateien plural.count.post @@ -200,7 +200,7 @@ NSStringFormatValueTypeKey ld one - 1 Wähler + 1 Wähler:in other %ld Wähler @@ -216,9 +216,9 @@ NSStringFormatValueTypeKey ld one - 1 Mensch spricht + Eine Person redet other - %ld Leute reden + %ld Personen reden plural.count.following @@ -360,7 +360,7 @@ NSStringFormatValueTypeKey ld one - vor 1 Jahr + vor einem Jahr other vor %ld Jahren @@ -376,7 +376,7 @@ NSStringFormatValueTypeKey ld one - vor 1 M + vor einem Monat other vor %ld Monaten @@ -392,7 +392,7 @@ NSStringFormatValueTypeKey ld one - vor 1 Tag + vor einem Tag other vor %ld Tagen @@ -408,7 +408,7 @@ NSStringFormatValueTypeKey ld one - vor 1 Stunde + vor einer Stunde other vor %ld Stunden @@ -424,7 +424,7 @@ NSStringFormatValueTypeKey ld one - vor 1 Minute + vor einer Minute other vor %ld Minuten @@ -440,7 +440,7 @@ NSStringFormatValueTypeKey ld one - vor 1 Sekunde + vor einer Sekunde other vor %ld Sekuden diff --git a/Localization/StringsConvertor/input/de.lproj/app.json b/Localization/StringsConvertor/input/de.lproj/app.json index 1633a7aba..355bfcc1b 100644 --- a/Localization/StringsConvertor/input/de.lproj/app.json +++ b/Localization/StringsConvertor/input/de.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Nicht mehr stummschalten", "unmute_user": "%s nicht mehr stummschalten", "muted": "Stummgeschaltet", - "edit_info": "Information bearbeiten" + "edit_info": "Information bearbeiten", + "show_reblogs": "Reblogs anzeigen", + "hide_reblogs": "Reblogs ausblenden" }, "timeline": { "filtered": "Gefiltert", @@ -241,7 +243,7 @@ }, "input": { "placeholder": "Nach Server suchen oder URL eingeben", - "search_servers_or_enter_url": "Search servers or enter URL" + "search_servers_or_enter_url": "Nach Server suchen oder URL eingeben" }, "empty_state": { "finding_servers": "Verfügbare Server werden gesucht...", @@ -251,7 +253,7 @@ }, "register": { "title": "Erzähle uns von dir.", - "lets_get_you_set_up_on_domain": "Let’s get you set up on %s", + "lets_get_you_set_up_on_domain": "Okay, lass uns mit %s anfangen", "input": { "avatar": { "delete": "Löschen" @@ -322,7 +324,7 @@ "confirm_email": { "title": "Noch eine letzte Sache.", "subtitle": "Schaue kurz in dein E-Mail-Postfach und tippe den Link an, den wir dir gesendet haben.", - "tap_the_link_we_emailed_to_you_to_verify_your_account": "Tap the link we emailed to you to verify your account", + "tap_the_link_we_emailed_to_you_to_verify_your_account": "Schaue kurz in dein E-Mail-Postfach und tippe den Link an, den wir dir gesendet haben", "button": { "open_email_app": "E-Mail-App öffnen", "resend": "Erneut senden" @@ -347,8 +349,8 @@ "published": "Veröffentlicht!", "Publishing": "Beitrag wird veröffentlicht...", "accessibility": { - "logo_label": "Logo Button", - "logo_hint": "Tap to scroll to top and tap again to previous location" + "logo_label": "Logo-Button", + "logo_hint": "Zum Scrollen nach oben tippen und zum vorherigen Ort erneut tippen" } } }, @@ -418,7 +420,7 @@ }, "profile": { "header": { - "follows_you": "Follows You" + "follows_you": "Folgt dir" }, "dashboard": { "posts": "Beiträge", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Konto entsperren", "message": "Bestätige %s zu entsperren" + }, + "confirm_show_reblogs": { + "title": "Reblogs anzeigen", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Reblogs ausblenden", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -465,22 +475,22 @@ } }, "follower": { - "title": "follower", + "title": "Follower", "footer": "Follower von anderen Servern werden nicht angezeigt." }, "following": { - "title": "following", + "title": "Folgende", "footer": "Wem das Konto folgt wird von anderen Servern werden nicht angezeigt." }, "familiarFollowers": { - "title": "Followers you familiar", - "followed_by_names": "Followed by %s" + "title": "Follower, die dir bekannt vorkommen", + "followed_by_names": "Gefolgt von %s" }, "favorited_by": { - "title": "Favorited By" + "title": "Favorisiert von" }, "reblogged_by": { - "title": "Reblogged By" + "title": "Geteilt von" }, "search": { "title": "Suche", @@ -546,10 +556,10 @@ "show_mentions": "Erwähnungen anzeigen" }, "follow_request": { - "accept": "Accept", - "accepted": "Accepted", - "reject": "reject", - "rejected": "Rejected" + "accept": "Akzeptieren", + "accepted": "Akzeptiert", + "reject": "Ablehnen", + "rejected": "Abgelehnt" } }, "thread": { @@ -626,46 +636,46 @@ "text_placeholder": "Zusätzliche Kommentare eingeben oder einfügen", "reported": "GEMELDET", "step_one": { - "step_1_of_4": "Step 1 of 4", - "whats_wrong_with_this_post": "What's wrong with this post?", - "whats_wrong_with_this_account": "What's wrong with this account?", - "whats_wrong_with_this_username": "What's wrong with %s?", - "select_the_best_match": "Select the best match", - "i_dont_like_it": "I don’t like it", - "it_is_not_something_you_want_to_see": "It is not something you want to see", - "its_spam": "It’s spam", - "malicious_links_fake_engagement_or_repetetive_replies": "Malicious links, fake engagement, or repetetive replies", - "it_violates_server_rules": "It violates server rules", - "you_are_aware_that_it_breaks_specific_rules": "You are aware that it breaks specific rules", - "its_something_else": "It’s something else", - "the_issue_does_not_fit_into_other_categories": "The issue does not fit into other categories" + "step_1_of_4": "Schritt 1 von 4", + "whats_wrong_with_this_post": "Was stimmt mit diesem Beitrag nicht?", + "whats_wrong_with_this_account": "Was stimmt mit diesem Konto nicht?", + "whats_wrong_with_this_username": "Was ist los mit %s?", + "select_the_best_match": "Wähle die passende Kategorie", + "i_dont_like_it": "Mir gefällt das nicht", + "it_is_not_something_you_want_to_see": "Das ist etwas, das man nicht sehen möchte", + "its_spam": "Das ist Spam", + "malicious_links_fake_engagement_or_repetetive_replies": "Bösartige Links, gefälschtes Engagement oder wiederholte Antworten", + "it_violates_server_rules": "Es verstößt gegen Serverregeln", + "you_are_aware_that_it_breaks_specific_rules": "Du weißt, welche Regeln verletzt werden", + "its_something_else": "Das ist was anderes", + "the_issue_does_not_fit_into_other_categories": "Das Problem passt nicht in die Kategorien" }, "step_two": { - "step_2_of_4": "Step 2 of 4", - "which_rules_are_being_violated": "Which rules are being violated?", - "select_all_that_apply": "Select all that apply", - "i_just_don’t_like_it": "I just don’t like it" + "step_2_of_4": "Schritt 2 von 4", + "which_rules_are_being_violated": "Welche Regeln werden verletzt?", + "select_all_that_apply": "Alles Zutreffende auswählen", + "i_just_don’t_like_it": "Das gefällt mir einfach nicht" }, "step_three": { - "step_3_of_4": "Step 3 of 4", - "are_there_any_posts_that_back_up_this_report": "Are there any posts that back up this report?", - "select_all_that_apply": "Select all that apply" + "step_3_of_4": "Schritt 3 von 4", + "are_there_any_posts_that_back_up_this_report": "Gibt es Beiträge, die diesen Bericht unterstützen?", + "select_all_that_apply": "Alles Zutreffende auswählen" }, "step_four": { - "step_4_of_4": "Step 4 of 4", - "is_there_anything_else_we_should_know": "Is there anything else we should know?" + "step_4_of_4": "Schritt 4 von 4", + "is_there_anything_else_we_should_know": "Gibt es etwas anderes, was wir wissen sollten?" }, "step_final": { - "dont_want_to_see_this": "Don’t want to see this?", - "when_you_see_something_you_dont_like_on_mastodon_you_can_remove_the_person_from_your_experience.": "When you see something you don’t like on Mastodon, you can remove the person from your experience.", - "unfollow": "Unfollow", - "unfollowed": "Unfollowed", - "unfollow_user": "Unfollow %s", - "mute_user": "Mute %s", - "you_wont_see_their_posts_or_reblogs_in_your_home_feed_they_wont_know_they_ve_been_muted": "You won’t see their posts or reblogs in your home feed. They won’t know they’ve been muted.", - "block_user": "Block %s", - "they_will_no_longer_be_able_to_follow_or_see_your_posts_but_they_can_see_if_theyve_been_blocked": "They will no longer be able to follow or see your posts, but they can see if they’ve been blocked.", - "while_we_review_this_you_can_take_action_against_user": "While we review this, you can take action against %s" + "dont_want_to_see_this": "Du willst das nicht mehr sehen?", + "when_you_see_something_you_dont_like_on_mastodon_you_can_remove_the_person_from_your_experience.": "Wenn du etwas auf Mastodon nicht sehen willst, kannst du den Nutzer aus deiner Erfahrung streichen.", + "unfollow": "Entfolgen", + "unfollowed": "Entfolgt", + "unfollow_user": "%s entfolgen", + "mute_user": "%s stummschalten", + "you_wont_see_their_posts_or_reblogs_in_your_home_feed_they_wont_know_they_ve_been_muted": "Du wirst die Beiträge vom Konto nicht mehr sehen. Das Konto kann dir immer noch folgen, und die Person hinter dem Konto wird deine Beiträge sehen können und nicht wissen, dass du sie stummgeschaltet hast.", + "block_user": "%s blockieren", + "they_will_no_longer_be_able_to_follow_or_see_your_posts_but_they_can_see_if_theyve_been_blocked": "Du wirst die Beiträge von diesem Konto nicht sehen. Das Konto wird nicht in der Lage sein, deine Beiträge zu sehen oder dir zu folgen. Die Person hinter dem Konto wird wissen, dass du das Konto blockiert hast.", + "while_we_review_this_you_can_take_action_against_user": "Während wir dies überprüfen, kannst du gegen %s vorgehen" } }, "preview": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Neu in Mastodon", "multiple_account_switch_intro_description": "Wechsel zwischen mehreren Konten durch Drücken der Profil-Schaltfläche.", "accessibility_hint": "Doppeltippen, um diesen Assistenten zu schließen" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/en-US.lproj/app.json b/Localization/StringsConvertor/input/en-US.lproj/app.json index a965b23ae..80b0882d9 100644 --- a/Localization/StringsConvertor/input/en-US.lproj/app.json +++ b/Localization/StringsConvertor/input/en-US.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Unmute", "unmute_user": "Unmute %s", "muted": "Muted", - "edit_info": "Edit Info" + "edit_info": "Edit Info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Filtered", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Unblock Account", "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "New in Mastodon", "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/en.lproj/app.json b/Localization/StringsConvertor/input/en.lproj/app.json index 69b71b0e9..2d23d5b91 100644 --- a/Localization/StringsConvertor/input/en.lproj/app.json +++ b/Localization/StringsConvertor/input/en.lproj/app.json @@ -136,6 +136,12 @@ "vote": "Vote", "closed": "Closed" }, + "meta_entity": { + "url": "Link: %s", + "hashtag": "Hastag %s", + "mention": "Show Profile: %s", + "email": "Email address: %s" + }, "actions": { "reply": "Reply", "reblog": "Reblog", @@ -180,7 +186,9 @@ "unmute": "Unmute", "unmute_user": "Unmute %s", "muted": "Muted", - "edit_info": "Edit Info" + "edit_info": "Edit Info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Filtered", @@ -457,6 +465,14 @@ "confirm_unblock_user": { "title": "Unblock Account", "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -686,6 +702,9 @@ "new_in_mastodon": "New in Mastodon", "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/es-AR.lproj/app.json b/Localization/StringsConvertor/input/es-AR.lproj/app.json index 9b9f8de5a..62d439a3c 100644 --- a/Localization/StringsConvertor/input/es-AR.lproj/app.json +++ b/Localization/StringsConvertor/input/es-AR.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Dejar de silenciar", "unmute_user": "Dejar de silenciar a %s", "muted": "Silenciado", - "edit_info": "Editar" + "edit_info": "Editar", + "show_reblogs": "Mostrar adhesiones", + "hide_reblogs": "Ocultar adhesiones" }, "timeline": { "filtered": "Filtrado", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Desbloquear cuenta", "message": "Confirmá para desbloquear a %s" + }, + "confirm_show_reblogs": { + "title": "Mostrar adhesiones", + "message": "Confirmá para mostrar adhesiones" + }, + "confirm_hide_reblogs": { + "title": "Ocultar adhesiones", + "message": "Confirmá para ocultar adhesiones" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Novedad en Mastodon", "multiple_account_switch_intro_description": "Cambiá entre varias cuentas manteniendo presionado el botón del perfil.", "accessibility_hint": "Tocá dos veces para descartar este asistente" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/es.lproj/app.json b/Localization/StringsConvertor/input/es.lproj/app.json index a6d0225d3..39e0f37d1 100644 --- a/Localization/StringsConvertor/input/es.lproj/app.json +++ b/Localization/StringsConvertor/input/es.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Desmutear", "unmute_user": "Desmutear a %s", "muted": "Silenciado", - "edit_info": "Editar Info" + "edit_info": "Editar Info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Filtrado", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Desbloquear cuenta", "message": "Confirmar para desbloquear a %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Nuevo en Mastodon", "multiple_account_switch_intro_description": "Cambie entre varias cuentas manteniendo presionado el botón de perfil.", "accessibility_hint": "Haz doble toque para descartar este asistente" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/eu.lproj/app.json b/Localization/StringsConvertor/input/eu.lproj/app.json index 40b4bd623..5c2e16601 100644 --- a/Localization/StringsConvertor/input/eu.lproj/app.json +++ b/Localization/StringsConvertor/input/eu.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Desmututu", "unmute_user": "Desmututu %s", "muted": "Mutututa", - "edit_info": "Editatu informazioa" + "edit_info": "Editatu informazioa", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Iragazita", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Desblokeatu kontua", "message": "Berretsi %s desblokeatzea" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Berria Mastodonen", "multiple_account_switch_intro_description": "Aldatu hainbat konturen artean profilaren botoia sakatuta edukiz.", "accessibility_hint": "Ukitu birritan morroi hau baztertzeko" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/fi.lproj/app.json b/Localization/StringsConvertor/input/fi.lproj/app.json index 353ba989f..d6210c4d5 100644 --- a/Localization/StringsConvertor/input/fi.lproj/app.json +++ b/Localization/StringsConvertor/input/fi.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Poista mykistys", "unmute_user": "Poista mykistys tililtä %s", "muted": "Mykistetty", - "edit_info": "Muokkaa profiilia" + "edit_info": "Muokkaa profiilia", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Suodatettu", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Unblock Account", "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Uutta Mastodonissa", "multiple_account_switch_intro_description": "Vaihda useiden tilien välillä pitämällä profiilipainiketta painettuna.", "accessibility_hint": "Hylkää tämä ohjattu toiminto kaksoisnapauttamalla" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/fr.lproj/app.json b/Localization/StringsConvertor/input/fr.lproj/app.json index 6ae2ebb2b..ed53d1096 100644 --- a/Localization/StringsConvertor/input/fr.lproj/app.json +++ b/Localization/StringsConvertor/input/fr.lproj/app.json @@ -9,10 +9,10 @@ "title": "Échec de l'inscription" }, "server_error": { - "title": "Erreur du serveur" + "title": "Erreur serveur" }, "vote_failure": { - "title": "Le vote n’a pas pu être enregistré", + "title": "Échec du vote", "poll_ended": "Le sondage est terminé" }, "discard_post_content": { @@ -180,7 +180,9 @@ "unmute": "Ne plus ignorer", "unmute_user": "Ne plus masquer %s", "muted": "Masqué", - "edit_info": "Éditer les infos" + "edit_info": "Éditer les infos", + "show_reblogs": "Afficher les Reblogs", + "hide_reblogs": "Masquer les Reblogs" }, "timeline": { "filtered": "Filtré", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Débloquer le compte", "message": "Confirmer le déblocage de %s" + }, + "confirm_show_reblogs": { + "title": "Afficher les Reblogs", + "message": "Confirmer pour afficher les reblogs" + }, + "confirm_hide_reblogs": { + "title": "Masquer les Reblogs", + "message": "Confirmer pour masquer les reblogs" } }, "accessibility": { @@ -469,7 +479,7 @@ "footer": "Les abonné·e·s issus des autres serveurs ne sont pas affiché·e·s." }, "following": { - "title": "following", + "title": "abonnement", "footer": "Les abonnés issus des autres serveurs ne sont pas affichés." }, "familiarFollowers": { @@ -477,10 +487,10 @@ "followed_by_names": "Suivi·e par %s" }, "favorited_by": { - "title": "Favorited By" + "title": "Favoris par" }, "reblogged_by": { - "title": "Reblogged By" + "title": "Reblogué par" }, "search": { "title": "Rechercher", @@ -659,7 +669,7 @@ "dont_want_to_see_this": "Vous ne voulez pas voir cela ?", "when_you_see_something_you_dont_like_on_mastodon_you_can_remove_the_person_from_your_experience.": "Quand vous voyez quelque chose que vous n’aimez pas sur Mastodon, vous pouvez retirer la personne de votre expérience.", "unfollow": "Se désabonner", - "unfollowed": "Unfollowed", + "unfollowed": "Non-suivi", "unfollow_user": "Ne plus suivre %s", "mute_user": "Masquer %s", "you_wont_see_their_posts_or_reblogs_in_your_home_feed_they_wont_know_they_ve_been_muted": "Vous ne verrez plus leurs messages ou leurs partages dans votre flux personnel. Iels ne sauront pas qu’iels ont été mis en sourdine.", @@ -684,6 +694,9 @@ "new_in_mastodon": "Nouveau dans Mastodon", "multiple_account_switch_intro_description": "Basculez entre plusieurs comptes en appuyant de maniere prolongée sur le bouton profil.", "accessibility_hint": "Tapotez deux fois pour fermer cet assistant" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/gd.lproj/Localizable.stringsdict b/Localization/StringsConvertor/input/gd.lproj/Localizable.stringsdict index f041677fa..d0ccb5f41 100644 --- a/Localization/StringsConvertor/input/gd.lproj/Localizable.stringsdict +++ b/Localization/StringsConvertor/input/gd.lproj/Localizable.stringsdict @@ -88,13 +88,13 @@ NSStringFormatValueTypeKey ld one - Followed by %1$@, and another mutual + ’Ga leantainn le %1$@ ’s %ld eile an cumantas two - Followed by %1$@, and %ld mutuals + ’Ga leantainn le %1$@ ’s %ld eile an cumantas few - Followed by %1$@, and %ld mutuals + ’Ga leantainn le %1$@ ’s %ld eile an cumantas other - Followed by %1$@, and %ld mutuals + ’Ga leantainn le %1$@ ’s %ld eile an cumantas plural.count.metric_formatted.post @@ -128,13 +128,13 @@ NSStringFormatValueTypeKey ld one - 1 media + %ld mheadhan two - %ld media + %ld mheadhan few - %ld media + %ld meadhanan other - %ld media + %ld meadhan plural.count.post @@ -308,13 +308,13 @@ NSStringFormatValueTypeKey ld one - Tha %ld a’ leantainn air + Tha %ld ’ga leantainn two - Tha %ld a’ leantainn air + Tha %ld ’ga leantainn few - Tha %ld a’ leantainn air + Tha %ld ’ga leantainn other - Tha %ld a’ leantainn air + Tha %ld ’ga leantainn date.year.left diff --git a/Localization/StringsConvertor/input/gd.lproj/app.json b/Localization/StringsConvertor/input/gd.lproj/app.json index e2da7d6a9..a2062a89b 100644 --- a/Localization/StringsConvertor/input/gd.lproj/app.json +++ b/Localization/StringsConvertor/input/gd.lproj/app.json @@ -37,7 +37,7 @@ "confirm": "Clàraich a-mach" }, "block_domain": { - "title": "A bheil thu cinnteach dha-rìribh gu bheil thu airson an àrainn %s a bhacadh uile gu lèir? Mar as trice, foghnaidh gun dèan thu bacadh no mùchadh no dhà gu sònraichte agus bhiod sin na b’ fheàrr. Chan fhaic thu susbaint on àrainn ud agus thèid an luchd-leantainn agad on àrainn ud a thoirt air falbh.", + "title": "A bheil thu cinnteach dha-rìribh gu bheil thu airson an àrainn %s a bhacadh uile gu lèir? Mar as trice, foghnaidh gun dèan thu bacadh no mùchadh no dhà gu sònraichte agus bhiodh sin na b’ fheàrr. Chan fhaic thu susbaint on àrainn ud agus thèid an luchd-leantainn agad on àrainn ud a thoirt air falbh.", "block_entire_domain": "Bac an àrainn" }, "save_photo_failure": { @@ -45,7 +45,7 @@ "message": "Cuir cead inntrigidh do thasg-lann nan dealbhan an comas gus an dealbh a shàbhaladh." }, "delete_post": { - "title": "A bheil thu cinnteach gu bheil thu airson am post seo a sguabadh às?", + "title": "Sguab às am post", "message": "A bheil thu cinnteach gu bheil thu airson am post seo a sguabadh às?" }, "clean_cache": { @@ -165,7 +165,7 @@ } }, "friendship": { - "follow": "Lean air", + "follow": "Lean", "following": "’Ga leantainn", "request": "Iarrtas", "pending": "Ri dhèiligeadh", @@ -180,7 +180,9 @@ "unmute": "Dì-mhùch", "unmute_user": "Dì-mhùch %s", "muted": "’Ga mhùchadh", - "edit_info": "Deasaich" + "edit_info": "Deasaich", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Criathraichte", @@ -211,9 +213,9 @@ "log_in": "Clàraich a-steach" }, "server_picker": { - "title": "Tagh frithealaiche sam bith.", - "subtitle": "Tagh coimhearsnachd stèidhichte air d’ ùidhean no an roinn-dùthcha agad no tè choitcheann.", - "subtitle_extend": "Tagh coimhearsnachd stèidhichte air d’ ùidhean no an roinn-dùthcha agad no tè choitcheann. Tha gach coimhearsnachd ’ga stiùireadh le buidheann no neach gu neo-eisimeileach.", + "title": "Tha cleachdaichean Mhastodon air iomadh frithealaiche eadar-dhealaichte.", + "subtitle": "Tagh frithealaiche stèidhichte air d’ ùidhean, air far a bheil thu no fear coitcheann.", + "subtitle_extend": "Tagh frithealaiche stèidhichte air d’ ùidhean, air far a bheil thu no fear coitcheann. Tha gach frithealaiche fo stiùireadh buidhinn no neach neo-eisimeilich fa leth.", "button": { "category": { "all": "Na h-uile", @@ -240,8 +242,8 @@ "category": "ROINN-SEÒRSA" }, "input": { - "placeholder": "Lorg frithealaiche no gabh pàirt san fhear agad fhèin…", - "search_servers_or_enter_url": "Search servers or enter URL" + "placeholder": "Lorg frithealaiche", + "search_servers_or_enter_url": "Lorg frithealaiche no cuir a-steach URL" }, "empty_state": { "finding_servers": "A’ lorg nam frithealaichean ri am faighinn…", @@ -250,8 +252,8 @@ } }, "register": { - "title": "Innis dhuinn mu do dhèidhinn.", - "lets_get_you_set_up_on_domain": "Let’s get you set up on %s", + "title": "’Gad rèiteachadh air %s", + "lets_get_you_set_up_on_domain": "’Gad rèiteachadh air %s", "input": { "avatar": { "delete": "Sguab às" @@ -310,8 +312,8 @@ } }, "server_rules": { - "title": "Riaghailt bhunasach no dhà.", - "subtitle": "Shuidhich rianairean %s na riaghailtean seo.", + "title": "Riaghailtean bunasach.", + "subtitle": "Tha na riaghailtean seo ’gan stèidheachadh is a chur an gnìomh leis na maoir aig %s.", "prompt": "Ma leanas tu air adhart, bidh thu fo bhuaidh teirmichean seirbheise is poileasaidh prìobhaideachd %s.", "terms_of_service": "teirmichean na seirbheise", "privacy_policy": "poileasaidh prìobhaideachd", @@ -321,8 +323,8 @@ }, "confirm_email": { "title": "Aon rud eile.", - "subtitle": "Tha sinn air post-d a chur gu %s,\nthoir gnogag air a’ chunntas a dhearbhadh a’ chunntais agad.", - "tap_the_link_we_emailed_to_you_to_verify_your_account": "Tap the link we emailed to you to verify your account", + "subtitle": "Thoir gnogag air a’ cheangal a chuir sinn thugad air a’ phost-d airson an cunntas agad a dhearbhadh.", + "tap_the_link_we_emailed_to_you_to_verify_your_account": "Thoir gnogag air a’ cheangal a chuir sinn thugad air a’ phost-d airson an cunntas agad a dhearbhadh", "button": { "open_email_app": "Fosgail aplacaid a’ phuist-d", "resend": "Ath-chuir" @@ -347,14 +349,14 @@ "published": "Chaidh fhoillseachadh!", "Publishing": "A’ foillseachadh a’ phuist…", "accessibility": { - "logo_label": "Logo Button", - "logo_hint": "Tap to scroll to top and tap again to previous location" + "logo_label": "Putan an t-suaicheantais", + "logo_hint": "Thoir gnogag a sgroladh dhan bhàrr is thoir gnogag a-rithist a dhol dhan ionad roimhe" } } }, "suggestion_account": { "title": "Lorg daoine a leanas tu", - "follow_explain": "Nuair a leanas tu air cuideigin, chì thu na puist aca air inbhir na dachaigh agad." + "follow_explain": "Nuair a leanas tu cuideigin, chì thu na puist aca air inbhir na dachaigh agad." }, "compose": { "title": { @@ -418,7 +420,7 @@ }, "profile": { "header": { - "follows_you": "Follows You" + "follows_you": "’Gad leantainn" }, "dashboard": { "posts": "postaichean", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Dì-bhac an cunntas", "message": "Dearbh dì-bhacadh %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -465,22 +475,22 @@ } }, "follower": { - "title": "follower", + "title": "neach-leantainn", "footer": "Cha dèid luchd-leantainn o fhrithealaichean eile a shealltainn." }, "following": { - "title": "following", - "footer": "Cha dèid cò air a leanas tu air frithealaichean eile a shealltainn." + "title": "’ga leantainn", + "footer": "Cha dèid cò a leanas tu air frithealaichean eile a shealltainn." }, "familiarFollowers": { - "title": "Followers you familiar", - "followed_by_names": "Followed by %s" + "title": "Luchd-leantainn aithnichte", + "followed_by_names": "’Ga leantainn le %s" }, "favorited_by": { - "title": "Favorited By" + "title": "’Na annsachd aig" }, "reblogged_by": { - "title": "Reblogged By" + "title": "’Ga bhrosnachadh le" }, "search": { "title": "Lorg", @@ -497,8 +507,8 @@ }, "accounts": { "title": "Cunntasan a chòrdas riut ma dh’fhaoidte", - "description": "Saoil am bu toigh leat leantainn air na cunntasan seo?", - "follow": "Lean air" + "description": "Saoil am bu toigh leat na cunntasan seo a leantainn?", + "follow": "Lean" } }, "searching": { @@ -538,7 +548,7 @@ "favorited_your_post": "– is annsa leotha am post agad", "reblogged_your_post": "– ’s iad air am post agad a bhrosnachadh", "mentioned_you": "– ’s iad air iomradh a thoirt ort", - "request_to_follow_you": "iarrtas leantainn ort", + "request_to_follow_you": "iarrtas leantainn", "poll_has_ended": "thàinig cunntas-bheachd gu crìoch" }, "keyobard": { @@ -546,10 +556,10 @@ "show_mentions": "Seall na h-iomraidhean" }, "follow_request": { - "accept": "Accept", - "accepted": "Accepted", - "reject": "reject", - "rejected": "Rejected" + "accept": "Gabh ris", + "accepted": "Air a ghabhail ris", + "reject": "diùlt", + "rejected": "Chaidh a dhiùltadh" } }, "thread": { @@ -575,13 +585,13 @@ "notifications": { "title": "Brathan", "favorites": "Nuair as annsa leotha am post agam", - "follows": "Nuair a leanas iad orm", + "follows": "Nuair a leanas iad mi", "boosts": "Nuair a bhrosnaicheas iad post uam", "mentions": "Nuair a bheir iad iomradh orm", "trigger": { "anyone": "Airson duine sam bith, cuir brath thugam", "follower": "Airson luchd-leantainn, cuir brath thugam", - "follow": "Airson daoine air a leanas mi, cuir brath thugam", + "follow": "Airson daoine a leanas mi, cuir brath thugam", "noone": "Na cuir brath thugam idir", "title": " " } @@ -626,46 +636,46 @@ "text_placeholder": "Sgrìobh no cuir ann beachdan a bharrachd", "reported": "CHAIDH GEARAN A DHÈANAMH", "step_one": { - "step_1_of_4": "Step 1 of 4", - "whats_wrong_with_this_post": "What's wrong with this post?", - "whats_wrong_with_this_account": "What's wrong with this account?", - "whats_wrong_with_this_username": "What's wrong with %s?", - "select_the_best_match": "Select the best match", - "i_dont_like_it": "I don’t like it", - "it_is_not_something_you_want_to_see": "It is not something you want to see", - "its_spam": "It’s spam", - "malicious_links_fake_engagement_or_repetetive_replies": "Malicious links, fake engagement, or repetetive replies", - "it_violates_server_rules": "It violates server rules", - "you_are_aware_that_it_breaks_specific_rules": "You are aware that it breaks specific rules", - "its_something_else": "It’s something else", - "the_issue_does_not_fit_into_other_categories": "The issue does not fit into other categories" + "step_1_of_4": "Ceum 1 à 4", + "whats_wrong_with_this_post": "Dè tha ceàrr leis a’ phost seo?", + "whats_wrong_with_this_account": "Dè tha ceàrr leis an cunntas seo?", + "whats_wrong_with_this_username": "Dè tha ceàrr le %s?", + "select_the_best_match": "Tagh a’ mhaids as fheàrr", + "i_dont_like_it": "Cha toigh leam e", + "it_is_not_something_you_want_to_see": "Chan eil thu airson seo fhaicinn", + "its_spam": "’S e spama a th’ ann", + "malicious_links_fake_engagement_or_repetetive_replies": "Ceanglaichean droch-rùnach, conaltradh fuadain no an dearbh fhreagairt a-rithist ’s a-rithist", + "it_violates_server_rules": "Tha e a’ briseadh riaghailtean an fhrithealaiche", + "you_are_aware_that_it_breaks_specific_rules": "Mhothaich thu gu bheil e a’ briseadh riaghailtean sònraichte", + "its_something_else": "’S rud eile a tha ann", + "the_issue_does_not_fit_into_other_categories": "Chan eil na roinnean-seòrsa eile iomchaidh dhan chùis" }, "step_two": { - "step_2_of_4": "Step 2 of 4", - "which_rules_are_being_violated": "Which rules are being violated?", - "select_all_that_apply": "Select all that apply", - "i_just_don’t_like_it": "I just don’t like it" + "step_2_of_4": "Ceum 2 à 4", + "which_rules_are_being_violated": "Dè na riaghailtean a tha ’gam briseadh?", + "select_all_that_apply": "Tagh a h-uile gin a tha iomchaidh", + "i_just_don’t_like_it": "’S ann nach toigh leam e" }, "step_three": { - "step_3_of_4": "Step 3 of 4", - "are_there_any_posts_that_back_up_this_report": "Are there any posts that back up this report?", - "select_all_that_apply": "Select all that apply" + "step_3_of_4": "Ceum 3 à 4", + "are_there_any_posts_that_back_up_this_report": "A bheil postaichean sam bith ann a tha ’nam fianais dhan ghearan seo?", + "select_all_that_apply": "Tagh a h-uile gin a tha iomchaidh" }, "step_four": { - "step_4_of_4": "Step 4 of 4", - "is_there_anything_else_we_should_know": "Is there anything else we should know?" + "step_4_of_4": "Ceum 4 à 4", + "is_there_anything_else_we_should_know": "A bheil rud sam bith eile a bu toigh leat innse dhuinn?" }, "step_final": { - "dont_want_to_see_this": "Don’t want to see this?", - "when_you_see_something_you_dont_like_on_mastodon_you_can_remove_the_person_from_your_experience.": "When you see something you don’t like on Mastodon, you can remove the person from your experience.", - "unfollow": "Unfollow", - "unfollowed": "Unfollowed", - "unfollow_user": "Unfollow %s", - "mute_user": "Mute %s", - "you_wont_see_their_posts_or_reblogs_in_your_home_feed_they_wont_know_they_ve_been_muted": "You won’t see their posts or reblogs in your home feed. They won’t know they’ve been muted.", - "block_user": "Block %s", - "they_will_no_longer_be_able_to_follow_or_see_your_posts_but_they_can_see_if_theyve_been_blocked": "They will no longer be able to follow or see your posts, but they can see if they’ve been blocked.", - "while_we_review_this_you_can_take_action_against_user": "While we review this, you can take action against %s" + "dont_want_to_see_this": "Nach eil thu airson seo fhaicinn?", + "when_you_see_something_you_dont_like_on_mastodon_you_can_remove_the_person_from_your_experience.": "Nuair a chì thu rudeigin nach toigh leat air Mastodon, ’s urrainn dhut an neach a chumail fad air falbh uat.", + "unfollow": "Na lean tuilleadh", + "unfollowed": "Chan eil thu ’ga leantainn tuilleadh", + "unfollow_user": "Na lean %s tuilleadh", + "mute_user": "Mùch %s", + "you_wont_see_their_posts_or_reblogs_in_your_home_feed_they_wont_know_they_ve_been_muted": "Chan fhaic thu na postaichean aca is dè a bhrosnaich iad air inbhir na dachaigh agad tuilleadh. Cha bhi fios aca gun do mhùch thu iad.", + "block_user": "Bac %s", + "they_will_no_longer_be_able_to_follow_or_see_your_posts_but_they_can_see_if_theyve_been_blocked": "Chan urrainn dhaibh ’gad leantainn is chan fhaic iad na postaichean agad tuilleadh ach chì iad gun deach am bacadh.", + "while_we_review_this_you_can_take_action_against_user": "Fhad ’s a bhios sinn a’ toirt sùil air, seo nas urrainn dhut dèanamh an aghaidh %s" } }, "preview": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Na tha ùr ann am Mastodon", "multiple_account_switch_intro_description": "Geàrr leum eadar iomadh cunntas le cumail sìos putan na pròifil.", "accessibility_hint": "Thoir gnogag dhùbailte a’ leigeil seachad an draoidh seo" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/gl.lproj/app.json b/Localization/StringsConvertor/input/gl.lproj/app.json index 3df2d70bc..513573f79 100644 --- a/Localization/StringsConvertor/input/gl.lproj/app.json +++ b/Localization/StringsConvertor/input/gl.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Non Acalar", "unmute_user": "Deixar de acalar a @%s", "muted": "Acalada", - "edit_info": "Editar info" + "edit_info": "Editar info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Filtrado", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Desbloquear Conta", "message": "Confirma o desbloqueo de %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Novidade en Mastodon", "multiple_account_switch_intro_description": "Cambia dunha conta a outra mantendo preso o botón do perfil.", "accessibility_hint": "Dobre toque para desbotar este asistente" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/hi.lproj/app.json b/Localization/StringsConvertor/input/hi.lproj/app.json index 23cfa481f..d9ef32b3a 100644 --- a/Localization/StringsConvertor/input/hi.lproj/app.json +++ b/Localization/StringsConvertor/input/hi.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Unmute", "unmute_user": "Unmute %s", "muted": "Muted", - "edit_info": "Edit Info" + "edit_info": "Edit Info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Filtered", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Unblock Account", "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "New in Mastodon", "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/id.lproj/app.json b/Localization/StringsConvertor/input/id.lproj/app.json index f56306e5d..607e9a638 100644 --- a/Localization/StringsConvertor/input/id.lproj/app.json +++ b/Localization/StringsConvertor/input/id.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Berhenti membisukan", "unmute_user": "Berhenti membisukan %s", "muted": "Dibisukan", - "edit_info": "Sunting Info" + "edit_info": "Sunting Info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Tersaring", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Unblock Account", "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "New in Mastodon", "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/it.lproj/app.json b/Localization/StringsConvertor/input/it.lproj/app.json index b5121b23f..269d299ec 100644 --- a/Localization/StringsConvertor/input/it.lproj/app.json +++ b/Localization/StringsConvertor/input/it.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Riattiva", "unmute_user": "Riattiva %s", "muted": "Silenziato", - "edit_info": "Modifica info" + "edit_info": "Modifica info", + "show_reblogs": "Mostra le condivisioni", + "hide_reblogs": "Nascondi le condivisioni" }, "timeline": { "filtered": "Filtrato", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Sblocca account", "message": "Conferma per sbloccare %s" + }, + "confirm_show_reblogs": { + "title": "Mostra le condivisioni", + "message": "Conferma di mostrare le condivisioni" + }, + "confirm_hide_reblogs": { + "title": "Nascondi le condivisioni", + "message": "Conferma di nascondere le condivisioni" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Nuovo su Mastodon", "multiple_account_switch_intro_description": "Passa tra più account tenendo premuto il pulsante del profilo.", "accessibility_hint": "Doppio tocco per eliminare questa procedura guidata" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/ja.lproj/app.json b/Localization/StringsConvertor/input/ja.lproj/app.json index 039ef19fc..b7615abf3 100644 --- a/Localization/StringsConvertor/input/ja.lproj/app.json +++ b/Localization/StringsConvertor/input/ja.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "ミュートを解除", "unmute_user": "%sのミュートを解除", "muted": "ミュート済み", - "edit_info": "編集" + "edit_info": "編集", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "フィルター済み", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "アカウントのブロックを解除", "message": "%sのブロックを解除しますか?" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Mastodon の新機能", "multiple_account_switch_intro_description": "プロフィールボタンを押して複数のアカウントを切り替えます。", "accessibility_hint": "チュートリアルを閉じるには、ダブルタップしてください" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/kab.lproj/app.json b/Localization/StringsConvertor/input/kab.lproj/app.json index 4ca5e0411..2cff3d68d 100644 --- a/Localization/StringsConvertor/input/kab.lproj/app.json +++ b/Localization/StringsConvertor/input/kab.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Kkes asgugem", "unmute_user": "Kkes asgugem ɣef %s", "muted": "Yettwasgugem", - "edit_info": "Ẓreg talɣut" + "edit_info": "Ẓreg talɣut", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Yettwasizdeg", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Kkes asewḥel i umiḍan", "message": "Sentem tukksa n usgugem i %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -548,7 +558,7 @@ "follow_request": { "accept": "Accept", "accepted": "Accepted", - "reject": "reject", + "reject": "agi", "rejected": "Rejected" } }, @@ -684,6 +694,9 @@ "new_in_mastodon": "Amaynut deg Maṣṭudun", "multiple_account_switch_intro_description": "Beddel gar waṭas n yimiḍanen s tussda ɣezzifen ɣef tqeffalt n umaɣnu.", "accessibility_hint": "Sin isitiyen i usefsex n umarag-a" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/kmr.lproj/app.json b/Localization/StringsConvertor/input/kmr.lproj/app.json index df87daffe..d48edf3ae 100644 --- a/Localization/StringsConvertor/input/kmr.lproj/app.json +++ b/Localization/StringsConvertor/input/kmr.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Bêdeng neke", "unmute_user": "%s bêdeng neke", "muted": "Bêdengkirî", - "edit_info": "Zanyariyan serrast bike" + "edit_info": "Zanyariyan serrast bike", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Parzûnkirî", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Astengiyê li ser ajimêr rake", "message": "Ji bo rakirina astengkirinê %s bipejirîne" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Nû di Mastodon de", "multiple_account_switch_intro_description": "Dest bide ser bişkoja profîlê da ku di navbera gelek ajimêrann de biguherînî.", "accessibility_hint": "Du caran bitikîne da ku çarçoveyahilpekok ji holê rakî" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/ko.lproj/Localizable.stringsdict b/Localization/StringsConvertor/input/ko.lproj/Localizable.stringsdict index d03431fa0..9628be614 100644 --- a/Localization/StringsConvertor/input/ko.lproj/Localizable.stringsdict +++ b/Localization/StringsConvertor/input/ko.lproj/Localizable.stringsdict @@ -13,7 +13,7 @@ NSStringFormatValueTypeKey ld other - %ld unread notification + 읽지 않은 알림 %ld개 a11y.plural.count.input_limit_exceeds @@ -27,7 +27,7 @@ NSStringFormatValueTypeKey ld other - %ld characters + %ld 글자 a11y.plural.count.input_limit_remains @@ -41,7 +41,7 @@ NSStringFormatValueTypeKey ld other - %ld characters + %ld 글자 plural.count.followed_by_and_mutual @@ -106,7 +106,7 @@ NSStringFormatValueTypeKey ld other - %ld posts + %ld 개의 게시물 plural.count.favorite @@ -148,7 +148,7 @@ NSStringFormatValueTypeKey ld other - %ld replies + %ld 개의 답글 plural.count.vote @@ -204,7 +204,7 @@ NSStringFormatValueTypeKey ld other - %ld following + %ld 팔로잉 plural.count.follower @@ -218,7 +218,7 @@ NSStringFormatValueTypeKey ld other - %ld followers + %ld 팔로워 date.year.left @@ -232,7 +232,7 @@ NSStringFormatValueTypeKey ld other - %ld years left + %ld 년 남음 date.month.left @@ -246,7 +246,7 @@ NSStringFormatValueTypeKey ld other - %ld months left + %ld 달 남음 date.day.left @@ -260,7 +260,7 @@ NSStringFormatValueTypeKey ld other - %ld days left + %ld 일 남음 date.hour.left @@ -274,7 +274,7 @@ NSStringFormatValueTypeKey ld other - %ld hours left + %ld 시간 남음 date.minute.left @@ -288,7 +288,7 @@ NSStringFormatValueTypeKey ld other - %ld minutes left + %ld 분 남음 date.second.left @@ -302,7 +302,7 @@ NSStringFormatValueTypeKey ld other - %ld seconds left + %ld 초 남음 date.year.ago.abbr @@ -316,7 +316,7 @@ NSStringFormatValueTypeKey ld other - %ldy ago + %ld 년 전 date.month.ago.abbr @@ -330,7 +330,7 @@ NSStringFormatValueTypeKey ld other - %ldM ago + %ld 달 전 date.day.ago.abbr @@ -344,7 +344,7 @@ NSStringFormatValueTypeKey ld other - %ldd ago + %ld 일 전 date.hour.ago.abbr @@ -358,7 +358,7 @@ NSStringFormatValueTypeKey ld other - %ldh ago + %ld 시간 전 date.minute.ago.abbr @@ -372,7 +372,7 @@ NSStringFormatValueTypeKey ld other - %ldm ago + %ld 분 전 date.second.ago.abbr @@ -386,7 +386,7 @@ NSStringFormatValueTypeKey ld other - %lds ago + %ld 초 전 diff --git a/Localization/StringsConvertor/input/ko.lproj/app.json b/Localization/StringsConvertor/input/ko.lproj/app.json index b66808919..bbb4d1dea 100644 --- a/Localization/StringsConvertor/input/ko.lproj/app.json +++ b/Localization/StringsConvertor/input/ko.lproj/app.json @@ -130,7 +130,7 @@ "show_user_profile": "사용자 프로필 보기", "content_warning": "열람 주의", "sensitive_content": "Sensitive Content", - "media_content_warning": "Tap anywhere to reveal", + "media_content_warning": "아무 곳이나 눌러서 보기", "tap_to_reveal": "눌러서 확인", "poll": { "vote": "투표", @@ -145,8 +145,8 @@ "menu": "메뉴", "hide": "숨기기", "show_image": "이미지 표시", - "show_gif": "Show GIF", - "show_video_player": "Show video player", + "show_gif": "GIF 보기", + "show_video_player": "비디오 플레이어 보기", "tap_then_hold_to_show_menu": "Tap then hold to show menu" }, "tag": { @@ -180,7 +180,9 @@ "unmute": "뮤트 해제", "unmute_user": "%s 뮤트 해제", "muted": "뮤트됨", - "edit_info": "정보 편집" + "edit_info": "정보 편집", + "show_reblogs": "리블로그 보기", + "hide_reblogs": "리블로그 가리기" }, "timeline": { "filtered": "필터됨", @@ -207,8 +209,8 @@ "scene": { "welcome": { "slogan": "소셜 네트워킹을\n여러분의 손에 돌려드립니다.", - "get_started": "Get Started", - "log_in": "Log In" + "get_started": "시작하기", + "log_in": "로그인" }, "server_picker": { "title": "서버를 고르세요,\n아무 서버나 좋습니다.", @@ -240,18 +242,18 @@ "category": "분류" }, "input": { - "placeholder": "Search servers", - "search_servers_or_enter_url": "Search servers or enter URL" + "placeholder": "서버 검색", + "search_servers_or_enter_url": "서버를 검색하거나 URL을 입력하세요" }, "empty_state": { - "finding_servers": "Finding available servers...", + "finding_servers": "사용 가능한 서버를 찾는 중입니다...", "bad_network": "Something went wrong while loading the data. Check your internet connection.", "no_results": "결과 없음" } }, "register": { - "title": "Let’s get you set up on %s", - "lets_get_you_set_up_on_domain": "Let’s get you set up on %s", + "title": "%s에 가입하기 위한 정보들을 입력하세요", + "lets_get_you_set_up_on_domain": "%s에 가입하기 위한 정보들을 입력하세요", "input": { "avatar": { "delete": "삭제" @@ -268,11 +270,11 @@ }, "password": { "placeholder": "암호", - "require": "Your password needs at least:", - "character_limit": "8 characters", + "require": "암호의 최소 요구사항:", + "character_limit": "8글자", "accessibility": { - "checked": "checked", - "unchecked": "unchecked" + "checked": "확인됨", + "unchecked": "확인되지 않음" }, "hint": "암호는 최소 8글자 이상이어야 합니다" }, @@ -285,7 +287,7 @@ "username": "사용자명", "email": "이메일", "password": "암호", - "agreement": "Agreement", + "agreement": "약관", "locale": "지역설정", "reason": "사유" }, @@ -295,26 +297,26 @@ "taken": "%s는 이미 사용 중입니다", "reserved": "%s는 예약된 키워드입니다", "accepted": "%s는 반드시 동의해야 합니다", - "blank": "%s is required", - "invalid": "%s is invalid", - "too_long": "%s is too long", - "too_short": "%s is too short", - "inclusion": "%s is not a supported value" + "blank": "%s 항목은 필수입니다", + "invalid": "%s 항목이 잘못되었습니다", + "too_long": "%s 항목이 너무 깁니다", + "too_short": "%s 항목이 너무 짧습니다", + "inclusion": "%s 는 지원되는 값이 아닙니다" }, "special": { - "username_invalid": "Username must only contain alphanumeric characters and underscores", - "username_too_long": "Username is too long (can’t be longer than 30 characters)", - "email_invalid": "This is not a valid email address", - "password_too_short": "Password is too short (must be at least 8 characters)" + "username_invalid": "사용자명은 라틴문자와 숫자 그리고 밑줄만 사용할 수 있습니다", + "username_too_long": "사용자명이 너무 깁니다 (30글자를 넘을 수 없습니다)", + "email_invalid": "올바른 이메일 주소가 아닙니다", + "password_too_short": "암호가 너무 짧습니다 (최소 8글자 이상이어야 합니다)" } } }, "server_rules": { - "title": "Some ground rules.", - "subtitle": "These are set and enforced by the %s moderators.", + "title": "몇 개의 규칙이 있습니다.", + "subtitle": "다음은 %s의 중재자들에 의해 설정되고 적용되는 규칙들입니다.", "prompt": "By continuing, you’re subject to the terms of service and privacy policy for %s.", - "terms_of_service": "terms of service", - "privacy_policy": "privacy policy", + "terms_of_service": "이용약관", + "privacy_policy": "개인정보 정책", "button": { "confirm": "동의합니다" } @@ -325,29 +327,29 @@ "tap_the_link_we_emailed_to_you_to_verify_your_account": "Tap the link we emailed to you to verify your account", "button": { "open_email_app": "Open Email App", - "resend": "Resend" + "resend": "재전송" }, "dont_receive_email": { - "title": "Check your email", + "title": "이메일을 확인하세요", "description": "Check if your email address is correct as well as your junk folder if you haven’t.", - "resend_email": "Resend Email" + "resend_email": "이메일 재전송" }, "open_email_app": { - "title": "Check your inbox.", - "description": "We just sent you an email. Check your junk folder if you haven’t.", - "mail": "Mail", - "open_email_client": "Open Email Client" + "title": "받은 편지함을 확인하세요.", + "description": "이메일을 보냈습니다. 만약 받지 못했다면 스팸메일함을 확인하세요.", + "mail": "메일", + "open_email_client": "이메일 앱 열기" } }, "home_timeline": { - "title": "Home", + "title": "홈", "navigation_bar_state": { "offline": "오프라인", "new_posts": "새 글 보기", "published": "게시됨!", - "Publishing": "Publishing post...", + "Publishing": "게시물 게시중...", "accessibility": { - "logo_label": "Logo Button", + "logo_label": "로고 버튼", "logo_hint": "Tap to scroll to top and tap again to previous location" } } @@ -358,20 +360,20 @@ }, "compose": { "title": { - "new_post": "New Post", - "new_reply": "New Reply" + "new_post": "새 게시물", + "new_reply": "새 답글" }, "media_selection": { - "camera": "Take Photo", - "photo_library": "Photo Library", - "browse": "Browse" + "camera": "사진 촬영", + "photo_library": "사진 보관함", + "browse": "둘러보기" }, - "content_input_placeholder": "Type or paste what’s on your mind", - "compose_action": "Publish", - "replying_to_user": "replying to %s", + "content_input_placeholder": "무슨 생각을 하고 있는지 입력하거나 붙여넣으세요", + "compose_action": "게시", + "replying_to_user": "%s 님에게 답장 중", "attachment": { - "photo": "photo", - "video": "video", + "photo": "사진", + "video": "동영상", "attachment_broken": "This %s is broken and can’t be\nuploaded to Mastodon.", "description_photo": "시각장애인을 위한 사진 설명…", "description_video": "시각장애인을 위한 영상 설명…" @@ -437,7 +439,7 @@ "replies": "답글", "posts_and_replies": "Posts and Replies", "media": "미디어", - "about": "About" + "about": "정보" }, "relationship_action_alert": { "confirm_mute_user": { @@ -449,38 +451,46 @@ "message": "%s 뮤트 해제 확인" }, "confirm_block_user": { - "title": "Block Account", + "title": "계정 차단", "message": "Confirm to block %s" }, "confirm_unblock_user": { - "title": "Unblock Account", + "title": "계정 차단 해제", "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "리블로그 보기", + "message": "리블로그를 보기 전 확인" + }, + "confirm_hide_reblogs": { + "title": "리블로그 가리기", + "message": "리블로그를 가리기 전 확인" } }, "accessibility": { "show_avatar_image": "Show avatar image", - "edit_avatar_image": "Edit avatar image", - "show_banner_image": "Show banner image", - "double_tap_to_open_the_list": "Double tap to open the list" + "edit_avatar_image": "아바타 이미지 변경", + "show_banner_image": "배너 이미지 표시", + "double_tap_to_open_the_list": "두 번 탭하여 리스트 표시" } }, "follower": { - "title": "follower", - "footer": "Followers from other servers are not displayed." + "title": "팔로워", + "footer": "다른 서버의 팔로워 표시는 할 수 없습니다." }, "following": { - "title": "following", + "title": "팔로잉", "footer": "Follows from other servers are not displayed." }, "familiarFollowers": { "title": "Followers you familiar", - "followed_by_names": "Followed by %s" + "followed_by_names": "%s 님이 팔로우함" }, "favorited_by": { - "title": "Favorited By" + "title": "마음에 들어한 사람들" }, "reblogged_by": { - "title": "Reblogged By" + "title": "리블로그한 사람들" }, "search": { "title": "검색", @@ -489,61 +499,61 @@ "cancel": "취소" }, "recommend": { - "button_text": "See All", + "button_text": "모두 보기", "hash_tag": { - "title": "Trending on Mastodon", + "title": "마스토돈에서 유행 중", "description": "Hashtags that are getting quite a bit of attention", - "people_talking": "%s people are talking" + "people_talking": "%s 명의 사람들이 말하고 있음" }, "accounts": { - "title": "Accounts you might like", + "title": "마음에 들어할만한 계정", "description": "You may like to follow these accounts", - "follow": "Follow" + "follow": "팔로우" } }, "searching": { "segment": { - "all": "All", - "people": "People", - "hashtags": "Hashtags", - "posts": "Posts" + "all": "전부", + "people": "사람", + "hashtags": "해시태그", + "posts": "게시물" }, "empty_state": { - "no_results": "No results" + "no_results": "결과가 없습니다" }, - "recent_search": "Recent searches", - "clear": "Clear" + "recent_search": "최근 검색", + "clear": "모두 지우기" } }, "discovery": { "tabs": { - "posts": "Posts", - "hashtags": "Hashtags", - "news": "News", - "community": "Community", - "for_you": "For You" + "posts": "게시물", + "hashtags": "해시태그", + "news": "소식", + "community": "커뮤니티", + "for_you": "당신을 위한 추천" }, "intro": "These are the posts gaining traction in your corner of Mastodon." }, "favorite": { - "title": "Your Favorites" + "title": "내 즐겨찾기" }, "notification": { "title": { - "Everything": "Everything", - "Mentions": "Mentions" + "Everything": "모두", + "Mentions": "멘션" }, "notification_description": { - "followed_you": "followed you", - "favorited_your_post": "favorited your post", - "reblogged_your_post": "reblogged your post", - "mentioned_you": "mentioned you", - "request_to_follow_you": "request to follow you", - "poll_has_ended": "poll has ended" + "followed_you": "나를 팔로우 했습니다", + "favorited_your_post": "내 게시물을 마음에 들어했습니다", + "reblogged_your_post": "내 게시물을 리블로그 했습니다", + "mentioned_you": "나를 언급했습니다", + "request_to_follow_you": "팔로우를 요청합니다", + "poll_has_ended": "투표가 끝났습니다" }, "keyobard": { - "show_everything": "Show Everything", - "show_mentions": "Show Mentions" + "show_everything": "모두 보기", + "show_mentions": "멘션 보기" }, "follow_request": { "accept": "수락", @@ -553,37 +563,37 @@ } }, "thread": { - "back_title": "Post", - "title": "Post from %s" + "back_title": "게시물", + "title": "%s 님의 게시물" }, "settings": { - "title": "Settings", + "title": "설정", "section": { "appearance": { - "title": "Appearance", - "automatic": "Automatic", - "light": "Always Light", - "dark": "Always Dark" + "title": "외관", + "automatic": "자동", + "light": "항상 밝음", + "dark": "항상 어두움" }, "look_and_feel": { - "title": "Look and Feel", - "use_system": "Use System", - "really_dark": "Really Dark", - "sorta_dark": "Sorta Dark", - "light": "Light" + "title": "인터페이스", + "use_system": "시스템 설정 사용", + "really_dark": "진짜 어두움", + "sorta_dark": "좀 어두움", + "light": "밝음" }, "notifications": { - "title": "Notifications", - "favorites": "Favorites my post", - "follows": "Follows me", - "boosts": "Reblogs my post", - "mentions": "Mentions me", + "title": "알림", + "favorites": "내 게시물을 마음에 들어할 때", + "follows": "나를 팔로우 할 때", + "boosts": "내 게시물을 리블로그 할 때", + "mentions": "나를 언급할 때", "trigger": { - "anyone": "anyone", - "follower": "a follower", - "follow": "anyone I follow", - "noone": "no one", - "title": "Notify me when" + "anyone": "누구든", + "follower": "팔로워가", + "follow": "내가 팔로우하는 사람이", + "noone": "아무도 못 하게", + "title": "알림을 보낼 조건은" } }, "preference": { @@ -592,7 +602,7 @@ "disable_avatar_animation": "움직이는 아바타 비활성화", "disable_emoji_animation": "움직이는 에모지 비활성화", "using_default_browser": "기본 브라우저로 링크 열기", - "open_links_in_mastodon": "Open links in Mastodon" + "open_links_in_mastodon": "마스토돈에서 링크 열기" }, "boring_zone": { "title": "지루한 영역", @@ -614,57 +624,57 @@ } }, "report": { - "title_report": "Report", + "title_report": "신고", "title": "%s 신고하기", "step1": "1단계 (총 2단계)", "step2": "2단계 (총 2단계)", "content1": "신고에 추가하고 싶은 다른 게시물이 존재하나요?", "content2": "이 신고에 대해 중재자들이 알아야 할 것이 있나요?", - "report_sent_title": "Thanks for reporting, we’ll look into this.", + "report_sent_title": "신고해주셔서 감사합니다, 중재자분들이 확인할 예정입니다.", "send": "신고 전송", "skip_to_send": "추가설명 없이 보내기", "text_placeholder": "추가 설명을 적거나 붙여넣으세요", - "reported": "REPORTED", + "reported": "신고됨", "step_one": { - "step_1_of_4": "Step 1 of 4", - "whats_wrong_with_this_post": "What's wrong with this post?", - "whats_wrong_with_this_account": "What's wrong with this account?", - "whats_wrong_with_this_username": "What's wrong with %s?", - "select_the_best_match": "Select the best match", - "i_dont_like_it": "I don’t like it", - "it_is_not_something_you_want_to_see": "It is not something you want to see", - "its_spam": "It’s spam", - "malicious_links_fake_engagement_or_repetetive_replies": "Malicious links, fake engagement, or repetetive replies", - "it_violates_server_rules": "It violates server rules", - "you_are_aware_that_it_breaks_specific_rules": "You are aware that it breaks specific rules", - "its_something_else": "It’s something else", - "the_issue_does_not_fit_into_other_categories": "The issue does not fit into other categories" + "step_1_of_4": "1단계 (총 4단계)", + "whats_wrong_with_this_post": "이 게시물에 어떤 문제가 있나요?", + "whats_wrong_with_this_account": "이 계정에 어떤 문제가 있나요?", + "whats_wrong_with_this_username": "%s에 어떤 문제가 있나요?", + "select_the_best_match": "가장 알맞은 것을 선택하세요", + "i_dont_like_it": "마음에 안 듭니다", + "it_is_not_something_you_want_to_see": "내가 보기 싫은 종류에 속합니다", + "its_spam": "스팸입니다", + "malicious_links_fake_engagement_or_repetetive_replies": "악성 링크, 반응 스팸, 또는 반복적인 답글", + "it_violates_server_rules": "서버 규칙을 위반합니다", + "you_are_aware_that_it_breaks_specific_rules": "특정 규칙을 위반합니다", + "its_something_else": "기타", + "the_issue_does_not_fit_into_other_categories": "이슈가 다른 분류에 속하지 않습니다" }, "step_two": { - "step_2_of_4": "Step 2 of 4", - "which_rules_are_being_violated": "Which rules are being violated?", - "select_all_that_apply": "Select all that apply", - "i_just_don’t_like_it": "I just don’t like it" + "step_2_of_4": "2단계 (총 4단계)", + "which_rules_are_being_violated": "어떤 규칙을 위반했나요?", + "select_all_that_apply": "해당하는 사항을 모두 선택하세요", + "i_just_don’t_like_it": "그냥 마음에 들지 않아요." }, "step_three": { - "step_3_of_4": "Step 3 of 4", - "are_there_any_posts_that_back_up_this_report": "Are there any posts that back up this report?", - "select_all_that_apply": "Select all that apply" + "step_3_of_4": "3단계 (총 4단계)", + "are_there_any_posts_that_back_up_this_report": "이 신고에 대해서 더 참고해야 할 게시물이 있나요?", + "select_all_that_apply": "해당하는 사항을 모두 선택하세요" }, "step_four": { - "step_4_of_4": "Step 4 of 4", - "is_there_anything_else_we_should_know": "Is there anything else we should know?" + "step_4_of_4": "4단계 (총 4단계)", + "is_there_anything_else_we_should_know": "우리가 더 알아야 할 내용이 있나요?" }, "step_final": { - "dont_want_to_see_this": "Don’t want to see this?", - "when_you_see_something_you_dont_like_on_mastodon_you_can_remove_the_person_from_your_experience.": "When you see something you don’t like on Mastodon, you can remove the person from your experience.", - "unfollow": "Unfollow", - "unfollowed": "Unfollowed", - "unfollow_user": "Unfollow %s", - "mute_user": "Mute %s", - "you_wont_see_their_posts_or_reblogs_in_your_home_feed_they_wont_know_they_ve_been_muted": "You won’t see their posts or reblogs in your home feed. They won’t know they’ve been muted.", - "block_user": "Block %s", - "they_will_no_longer_be_able_to_follow_or_see_your_posts_but_they_can_see_if_theyve_been_blocked": "They will no longer be able to follow or see your posts, but they can see if they’ve been blocked.", + "dont_want_to_see_this": "이런 것을 보지 않길 원하나요?", + "when_you_see_something_you_dont_like_on_mastodon_you_can_remove_the_person_from_your_experience.": "마스토돈에서 보기 싫은 것을 보았다면, 해당하는 사람을 지울 수 있습니다.", + "unfollow": "팔로우 해제", + "unfollowed": "팔로우 해제함", + "unfollow_user": "%s 팔로우 해제", + "mute_user": "%s 뮤트", + "you_wont_see_their_posts_or_reblogs_in_your_home_feed_they_wont_know_they_ve_been_muted": "그의 게시물이나 리블로그가 내 홈 피드에 보이지 않습니다. 그는 뮤트 당했다는 사실을 알지 못합니다.", + "block_user": "%s 차단", + "they_will_no_longer_be_able_to_follow_or_see_your_posts_but_they_can_see_if_theyve_been_blocked": "그는 나를 팔로우 하거나 내 게시물을 볼 수 없게 됩니다, 하지만 내가 차단한 사실은 알 수 있습니다.", "while_we_review_this_you_can_take_action_against_user": "서버의 중재자들이 이것을 심사하는 동안, 당신은 %s에 대한 행동을 취할 수 있습니다" } }, @@ -678,12 +688,15 @@ "account_list": { "tab_bar_hint": "Current selected profile: %s. Double tap then hold to show account switcher", "dismiss_account_switcher": "Dismiss Account Switcher", - "add_account": "Add Account" + "add_account": "계정 추가" }, "wizard": { - "new_in_mastodon": "New in Mastodon", - "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", - "accessibility_hint": "Double tap to dismiss this wizard" + "new_in_mastodon": "마스토돈의 새 기능", + "multiple_account_switch_intro_description": "프로필 버튼을 꾹 눌러서 여러 계정 사이를 전환할 수 있습니다.", + "accessibility_hint": "두 번 탭하여 팝업 닫기" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/ko.lproj/ios-infoPlist.json b/Localization/StringsConvertor/input/ko.lproj/ios-infoPlist.json index 1b073eb0f..23194a120 100644 --- a/Localization/StringsConvertor/input/ko.lproj/ios-infoPlist.json +++ b/Localization/StringsConvertor/input/ko.lproj/ios-infoPlist.json @@ -1,5 +1,5 @@ { - "NSCameraUsageDescription": "Used to take photo for post status", + "NSCameraUsageDescription": "게시물에 사용할 사진을 찍기 위해 쓰임", "NSPhotoLibraryAddUsageDescription": "갤러리에 사진을 저장하기 위해 쓰임", "NewPostShortcutItemTitle": "새 글", "SearchShortcutItemTitle": "검색" diff --git a/Localization/StringsConvertor/input/lv.lproj/Localizable.stringsdict b/Localization/StringsConvertor/input/lv.lproj/Localizable.stringsdict new file mode 100644 index 000000000..25f32c98d --- /dev/null +++ b/Localization/StringsConvertor/input/lv.lproj/Localizable.stringsdict @@ -0,0 +1,505 @@ + + + + + a11y.plural.count.unread.notification + + NSStringLocalizedFormatKey + %#@notification_count_unread_notification@ + notification_count_unread_notification + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld unread notification + one + 1 unread notification + other + %ld unread notification + + + a11y.plural.count.input_limit_exceeds + + NSStringLocalizedFormatKey + Input limit exceeds %#@character_count@ + character_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld characters + one + 1 character + other + %ld characters + + + a11y.plural.count.input_limit_remains + + NSStringLocalizedFormatKey + Input limit remains %#@character_count@ + character_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld characters + one + 1 character + other + %ld characters + + + plural.count.followed_by_and_mutual + + NSStringLocalizedFormatKey + %#@names@%#@count_mutual@ + names + + zero + + one + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + other + + + count_mutual + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + Followed by %1$@, and %ld mutuals + one + Followed by %1$@, and another mutual + other + Followed by %1$@, and %ld mutuals + + + plural.count.metric_formatted.post + + NSStringLocalizedFormatKey + %@ %#@post_count@ + post_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + posts + one + post + other + posts + + + plural.count.media + + NSStringLocalizedFormatKey + %#@media_count@ + media_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld media + one + 1 media + other + %ld media + + + plural.count.post + + NSStringLocalizedFormatKey + %#@post_count@ + post_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld posts + one + 1 post + other + %ld posts + + + plural.count.favorite + + NSStringLocalizedFormatKey + %#@favorite_count@ + favorite_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld favorites + one + 1 favorite + other + %ld favorites + + + plural.count.reblog + + NSStringLocalizedFormatKey + %#@reblog_count@ + reblog_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld reblogs + one + 1 reblog + other + %ld reblogs + + + plural.count.reply + + NSStringLocalizedFormatKey + %#@reply_count@ + reply_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld replies + one + 1 reply + other + %ld replies + + + plural.count.vote + + NSStringLocalizedFormatKey + %#@vote_count@ + vote_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld votes + one + 1 vote + other + %ld votes + + + plural.count.voter + + NSStringLocalizedFormatKey + %#@voter_count@ + voter_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld voters + one + 1 voter + other + %ld voters + + + plural.people_talking + + NSStringLocalizedFormatKey + %#@count_people_talking@ + count_people_talking + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld people talking + one + 1 people talking + other + %ld people talking + + + plural.count.following + + NSStringLocalizedFormatKey + %#@count_following@ + count_following + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld following + one + 1 following + other + %ld following + + + plural.count.follower + + NSStringLocalizedFormatKey + %#@count_follower@ + count_follower + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld followers + one + 1 follower + other + %ld followers + + + date.year.left + + NSStringLocalizedFormatKey + %#@count_year_left@ + count_year_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld years left + one + 1 year left + other + %ld years left + + + date.month.left + + NSStringLocalizedFormatKey + %#@count_month_left@ + count_month_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld months left + one + 1 months left + other + %ld months left + + + date.day.left + + NSStringLocalizedFormatKey + %#@count_day_left@ + count_day_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld days left + one + 1 day left + other + %ld days left + + + date.hour.left + + NSStringLocalizedFormatKey + %#@count_hour_left@ + count_hour_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld hours left + one + 1 hour left + other + %ld hours left + + + date.minute.left + + NSStringLocalizedFormatKey + %#@count_minute_left@ + count_minute_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld minutes left + one + 1 minute left + other + %ld minutes left + + + date.second.left + + NSStringLocalizedFormatKey + %#@count_second_left@ + count_second_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ld seconds left + one + 1 second left + other + %ld seconds left + + + date.year.ago.abbr + + NSStringLocalizedFormatKey + %#@count_year_ago_abbr@ + count_year_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ldy ago + one + 1y ago + other + %ldy ago + + + date.month.ago.abbr + + NSStringLocalizedFormatKey + %#@count_month_ago_abbr@ + count_month_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ldM ago + one + 1M ago + other + %ldM ago + + + date.day.ago.abbr + + NSStringLocalizedFormatKey + %#@count_day_ago_abbr@ + count_day_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ldd ago + one + 1d ago + other + %ldd ago + + + date.hour.ago.abbr + + NSStringLocalizedFormatKey + %#@count_hour_ago_abbr@ + count_hour_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ldh ago + one + 1h ago + other + %ldh ago + + + date.minute.ago.abbr + + NSStringLocalizedFormatKey + %#@count_minute_ago_abbr@ + count_minute_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %ldm ago + one + 1m ago + other + %ldm ago + + + date.second.ago.abbr + + NSStringLocalizedFormatKey + %#@count_second_ago_abbr@ + count_second_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + zero + %lds ago + one + 1s ago + other + %lds ago + + + + diff --git a/Localization/StringsConvertor/input/lv.lproj/app.json b/Localization/StringsConvertor/input/lv.lproj/app.json new file mode 100644 index 000000000..0051383db --- /dev/null +++ b/Localization/StringsConvertor/input/lv.lproj/app.json @@ -0,0 +1,702 @@ +{ + "common": { + "alerts": { + "common": { + "please_try_again": "Lūdzu, mēģiniet vēlreiz.", + "please_try_again_later": "Lūdzu, mēģiniet vēlreiz vēlāk." + }, + "sign_up_failure": { + "title": "Sign Up Failure" + }, + "server_error": { + "title": "Servera kļūda" + }, + "vote_failure": { + "title": "Vote Failure", + "poll_ended": "Balsošana beidzās" + }, + "discard_post_content": { + "title": "Atmest malnrakstu", + "message": "Confirm to discard composed post content." + }, + "publish_post_failure": { + "title": "Publish Failure", + "message": "Failed to publish the post.\nPlease check your internet connection.", + "attachments_message": { + "video_attach_with_photo": "Cannot attach a video to a post that already contains images.", + "more_than_one_video": "Cannot attach more than one video." + } + }, + "edit_profile_failure": { + "title": "Edit Profile Error", + "message": "Cannot edit profile. Please try again." + }, + "sign_out": { + "title": "Iziet", + "message": "Vai tiešām vēlaties iziet?", + "confirm": "Iziet" + }, + "block_domain": { + "title": "Are you really, really sure you want to block the entire %s? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain and any of your followers from that domain will be removed.", + "block_entire_domain": "Block Domain" + }, + "save_photo_failure": { + "title": "Save Photo Failure", + "message": "Please enable the photo library access permission to save the photo." + }, + "delete_post": { + "title": "Dzēst ierakstu", + "message": "Vai tiešām vēlies dzēst ierakstu?" + }, + "clean_cache": { + "title": "Clean Cache", + "message": "Successfully cleaned %s cache." + } + }, + "controls": { + "actions": { + "back": "Atpakaļ", + "next": "Nākamais", + "previous": "Iepriekšējais", + "open": "Atvērt", + "add": "Pievienot", + "remove": "Noņemt", + "edit": "Rediģēt", + "save": "Saglabāt", + "ok": "Labi", + "done": "Pabeigts", + "confirm": "Apstiprināt", + "continue": "Turpināt", + "compose": "Rakstīt", + "cancel": "Atcelt", + "discard": "Atmest", + "try_again": "Mēģināt vēlreiz", + "take_photo": "Uzņemt bildi", + "save_photo": "Saglabāt bildi", + "copy_photo": "Kopēt bildi", + "sign_in": "Pieteikties", + "sign_up": "Reģistrēties", + "see_more": "Skatīt vairāk", + "preview": "Priekšskatījums", + "share": "Dalīties", + "share_user": "Share %s", + "share_post": "Share Post", + "open_in_safari": "Atvērt Safari", + "open_in_browser": "Atvērt pārlūkprogrammā", + "find_people": "Atrodi cilvēkus kam sekot", + "manually_search": "Manually search instead", + "skip": "Izlaist", + "reply": "Atbildēt", + "report_user": "Ziņot par lietotāju @%s", + "block_domain": "Bloķēt %s", + "unblock_domain": "Atbloķēt %s", + "settings": "Iestatījumi", + "delete": "Dzēst" + }, + "tabs": { + "home": "Sākums", + "search": "Meklēšana", + "notification": "Paziņojums", + "profile": "Profils" + }, + "keyboard": { + "common": { + "switch_to_tab": "Pārslēgties uz: %s", + "compose_new_post": "Veidot jaunu ziņu", + "show_favorites": "Show Favorites", + "open_settings": "Atvērt iestatījumus" + }, + "timeline": { + "previous_status": "Previous Post", + "next_status": "Next Post", + "open_status": "Open Post", + "open_author_profile": "Open Author's Profile", + "open_reblogger_profile": "Open Reblogger's Profile", + "reply_status": "Reply to Post", + "toggle_reblog": "Toggle Reblog on Post", + "toggle_favorite": "Toggle Favorite on Post", + "toggle_content_warning": "Toggle Content Warning", + "preview_image": "Priekšskata attēls" + }, + "segmented_control": { + "previous_section": "Iepriekšējā sadaļa", + "next_section": "Nākamā sadaļa" + } + }, + "status": { + "user_reblogged": "%s reblogged", + "user_replied_to": "Replied to %s", + "show_post": "Show Post", + "show_user_profile": "Parādīt lietotāja profilu", + "content_warning": "Satura brīdinājums", + "sensitive_content": "Sensitīvs saturs", + "media_content_warning": "Tap anywhere to reveal", + "tap_to_reveal": "Tap to reveal", + "poll": { + "vote": "Balsot", + "closed": "Aizvērts" + }, + "actions": { + "reply": "Atbildēt", + "reblog": "Reblogot", + "unreblog": "Undo reblog", + "favorite": "Izlase", + "unfavorite": "Izņemt no izlases", + "menu": "Izvēlne", + "hide": "Slēpt", + "show_image": "Rādīt attēlu", + "show_gif": "Rādīt GIF", + "show_video_player": "Show video player", + "tap_then_hold_to_show_menu": "Tap then hold to show menu" + }, + "tag": { + "url": "URL", + "mention": "Pieminēt", + "link": "Saite", + "hashtag": "Hashtag", + "email": "E-pasts", + "emoji": "Emocijzīmes" + }, + "visibility": { + "unlisted": "Everyone can see this post but not display in the public timeline.", + "private": "Only their followers can see this post.", + "private_from_me": "Only my followers can see this post.", + "direct": "Only mentioned user can see this post." + } + }, + "friendship": { + "follow": "Sekot", + "following": "Seko", + "request": "Pieprasījums", + "pending": "Gaida", + "block": "Bloķēt", + "block_user": "Bloķēt %s", + "block_domain": "Bloķēt %s", + "unblock": "Atbloķēt", + "unblock_user": "Atbloķēt %s", + "blocked": "Bloķēts", + "mute": "Apklusināt", + "mute_user": "Aplusināt %s", + "unmute": "Noņemt apklusinājumu", + "unmute_user": "Noņemt apklusinājumu @%s", + "muted": "Apklusināts", + "edit_info": "Edit Info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" + }, + "timeline": { + "filtered": "Filtrēts", + "timestamp": { + "now": "Tagad" + }, + "loader": { + "load_missing_posts": "Load missing posts", + "loading_missing_posts": "Loading missing posts...", + "show_more_replies": "Rādīt vairāk atbildes" + }, + "header": { + "no_status_found": "No Post Found", + "blocking_warning": "You can’t view this user's profile\nuntil you unblock them.\nYour profile looks like this to them.", + "user_blocking_warning": "You can’t view %s’s profile\nuntil you unblock them.\nYour profile looks like this to them.", + "blocked_warning": "You can’t view this user’s profile\nuntil they unblock you.", + "user_blocked_warning": "You can’t view %s’s profile\nuntil they unblock you.", + "suspended_warning": "This user has been suspended.", + "user_suspended_warning": "%s’s account has been suspended." + } + } + } + }, + "scene": { + "welcome": { + "slogan": "Social networking\nback in your hands.", + "get_started": "Get Started", + "log_in": "Pieteikties" + }, + "server_picker": { + "title": "Mastodon is made of users in different servers.", + "subtitle": "Pick a server based on your interests, region, or a general purpose one.", + "subtitle_extend": "Pick a server based on your interests, region, or a general purpose one. Each server is operated by an entirely independent organization or individual.", + "button": { + "category": { + "all": "Visi", + "all_accessiblity_description": "Katekorija: Visi", + "academia": "academia", + "activism": "activism", + "food": "ēdiens", + "furry": "furry", + "games": "spēles", + "general": "general", + "journalism": "žurnālisms", + "lgbt": "lgbt", + "regional": "regionāli", + "art": "māksla", + "music": "mūzika", + "tech": "tehnoloģija" + }, + "see_less": "Rādīt mazāk", + "see_more": "Skatīt vairāk" + }, + "label": { + "language": "VALODA", + "users": "LIETOTĀJI", + "category": "KATEGORIJA" + }, + "input": { + "placeholder": "Meklēt serverus", + "search_servers_or_enter_url": "Search servers or enter URL" + }, + "empty_state": { + "finding_servers": "Finding available servers...", + "bad_network": "Something went wrong while loading the data. Check your internet connection.", + "no_results": "Nav rezultātu" + } + }, + "register": { + "title": "Let’s get you set up on %s", + "lets_get_you_set_up_on_domain": "Let’s get you set up on %s", + "input": { + "avatar": { + "delete": "Dzēst" + }, + "username": { + "placeholder": "lietotājvārds", + "duplicate_prompt": "Šis lietotājvārds jau ir aizņemts." + }, + "display_name": { + "placeholder": "parādāmais vārds" + }, + "email": { + "placeholder": "e-pasts" + }, + "password": { + "placeholder": "parole", + "require": "Your password needs at least:", + "character_limit": "8 rakstzīmes", + "accessibility": { + "checked": "atzīmēts", + "unchecked": "neatzīmēts" + }, + "hint": "Parolei jābūt vismaz 8 simboliem" + }, + "invite": { + "registration_user_invite_request": "Kāpēc tu vēlies pievienoties?" + } + }, + "error": { + "item": { + "username": "Lietotājvārds", + "email": "E-pasts", + "password": "Parole", + "agreement": "Līgums", + "locale": "Lokalizācija", + "reason": "Iemesls" + }, + "reason": { + "blocked": "%s contains a disallowed email provider", + "unreachable": "%s šķiet, ka neeksistē", + "taken": "%s jau tiek izmantots", + "reserved": "%s is a reserved keyword", + "accepted": "%s must be accepted", + "blank": "%s ir obligāts", + "invalid": "%s ir nederīgs", + "too_long": "%s ir pārāk garaš", + "too_short": "%s ir pārāk īs", + "inclusion": "%s is not a supported value" + }, + "special": { + "username_invalid": "Username must only contain alphanumeric characters and underscores", + "username_too_long": "Username is too long (can’t be longer than 30 characters)", + "email_invalid": "This is not a valid email address", + "password_too_short": "Password is too short (must be at least 8 characters)" + } + } + }, + "server_rules": { + "title": "Some ground rules.", + "subtitle": "These are set and enforced by the %s moderators.", + "prompt": "By continuing, you’re subject to the terms of service and privacy policy for %s.", + "terms_of_service": "pakalpojuma noteikumi", + "privacy_policy": "privātuma nosacījumi", + "button": { + "confirm": "Es piekrītu" + } + }, + "confirm_email": { + "title": "One last thing.", + "subtitle": "Tap the link we emailed to you to verify your account.", + "tap_the_link_we_emailed_to_you_to_verify_your_account": "Tap the link we emailed to you to verify your account", + "button": { + "open_email_app": "Open Email App", + "resend": "Nosūtīt atkārtoti" + }, + "dont_receive_email": { + "title": "Pārbaudi savu e-pastu", + "description": "Check if your email address is correct as well as your junk folder if you haven’t.", + "resend_email": "Atkārtoti nosūtīt e-pastu" + }, + "open_email_app": { + "title": "Check your inbox.", + "description": "We just sent you an email. Check your junk folder if you haven’t.", + "mail": "Mail", + "open_email_client": "Open Email Client" + } + }, + "home_timeline": { + "title": "Home", + "navigation_bar_state": { + "offline": "Offline", + "new_posts": "See new posts", + "published": "Published!", + "Publishing": "Publishing post...", + "accessibility": { + "logo_label": "Logo Button", + "logo_hint": "Tap to scroll to top and tap again to previous location" + } + } + }, + "suggestion_account": { + "title": "Find People to Follow", + "follow_explain": "When you follow someone, you’ll see their posts in your home feed." + }, + "compose": { + "title": { + "new_post": "New Post", + "new_reply": "Jauna atbilde" + }, + "media_selection": { + "camera": "Uzņemt bildi", + "photo_library": "Attēlu krātuve", + "browse": "Pārlūkot" + }, + "content_input_placeholder": "Type or paste what’s on your mind", + "compose_action": "Publicēt", + "replying_to_user": "replying to %s", + "attachment": { + "photo": "attēls", + "video": "video", + "attachment_broken": "This %s is broken and can’t be\nuploaded to Mastodon.", + "description_photo": "Describe the photo for the visually-impaired...", + "description_video": "Describe the video for the visually-impaired..." + }, + "poll": { + "duration_time": "Duration: %s", + "thirty_minutes": "30 minūtes", + "one_hour": "1 Stunda", + "six_hours": "6 stundas", + "one_day": "1 Diena", + "three_days": "3 Dienas", + "seven_days": "7 Dienas", + "option_number": "Option %ld" + }, + "content_warning": { + "placeholder": "Write an accurate warning here..." + }, + "visibility": { + "public": "Publisks", + "unlisted": "Neiekļautie", + "private": "Tikai sekotājiem", + "direct": "Tikai cilvēki, kurus es pieminu" + }, + "auto_complete": { + "space_to_add": "Space to add" + }, + "accessibility": { + "append_attachment": "Pievienot pielikumu", + "append_poll": "Pievienot aptauju", + "remove_poll": "Noņemt aptauju", + "custom_emoji_picker": "Custom Emoji Picker", + "enable_content_warning": "Enable Content Warning", + "disable_content_warning": "Disable Content Warning", + "post_visibility_menu": "Post Visibility Menu" + }, + "keyboard": { + "discard_post": "Discard Post", + "publish_post": "Publish Post", + "toggle_poll": "Toggle Poll", + "toggle_content_warning": "Toggle Content Warning", + "append_attachment_entry": "Pievienot pielikumu - %s", + "select_visibility_entry": "Select Visibility - %s" + } + }, + "profile": { + "header": { + "follows_you": "Seko tev" + }, + "dashboard": { + "posts": "posts", + "following": "seko", + "followers": "sekottāji" + }, + "fields": { + "add_row": "Pievienot rindu", + "placeholder": { + "label": "Label", + "content": "Saturs" + } + }, + "segmented_control": { + "posts": "Posts", + "replies": "Atbildes", + "posts_and_replies": "Ziņas un atbildes", + "media": "Multivide", + "about": "Par" + }, + "relationship_action_alert": { + "confirm_mute_user": { + "title": "Mute Account", + "message": "Confirm to mute %s" + }, + "confirm_unmute_user": { + "title": "Unmute Account", + "message": "Confirm to unmute %s" + }, + "confirm_block_user": { + "title": "Bloķēts kontu", + "message": "Confirm to block %s" + }, + "confirm_unblock_user": { + "title": "Atbloķēt kontu", + "message": "Apstiprini lai atbloķētu %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" + } + }, + "accessibility": { + "show_avatar_image": "Show avatar image", + "edit_avatar_image": "Edit avatar image", + "show_banner_image": "Show banner image", + "double_tap_to_open_the_list": "Double tap to open the list" + } + }, + "follower": { + "title": "sekottājs", + "footer": "Followers from other servers are not displayed." + }, + "following": { + "title": "seko", + "footer": "Follows from other servers are not displayed." + }, + "familiarFollowers": { + "title": "Followers you familiar", + "followed_by_names": "Followed by %s" + }, + "favorited_by": { + "title": "Favorited By" + }, + "reblogged_by": { + "title": "Reblogged By" + }, + "search": { + "title": "Meklēt", + "search_bar": { + "placeholder": "Search hashtags and users", + "cancel": "Atcelt" + }, + "recommend": { + "button_text": "Skatīt visu", + "hash_tag": { + "title": "Trending on Mastodon", + "description": "Hashtags that are getting quite a bit of attention", + "people_talking": "%s people are talking" + }, + "accounts": { + "title": "Accounts you might like", + "description": "You may like to follow these accounts", + "follow": "Follow" + } + }, + "searching": { + "segment": { + "all": "All", + "people": "People", + "hashtags": "Hashtags", + "posts": "Posts" + }, + "empty_state": { + "no_results": "No results" + }, + "recent_search": "Recent searches", + "clear": "Clear" + } + }, + "discovery": { + "tabs": { + "posts": "Ziņas", + "hashtags": "Hashtags", + "news": "Ziņas", + "community": "Community", + "for_you": "Priekš tevis" + }, + "intro": "These are the posts gaining traction in your corner of Mastodon." + }, + "favorite": { + "title": "Tava izlase" + }, + "notification": { + "title": { + "Everything": "Visi", + "Mentions": "Pieminējumi" + }, + "notification_description": { + "followed_you": "followed you", + "favorited_your_post": "favorited your post", + "reblogged_your_post": "reblogged your post", + "mentioned_you": "pieminēja tevi", + "request_to_follow_you": "request to follow you", + "poll_has_ended": "balsošana beidzās" + }, + "keyobard": { + "show_everything": "Parādīt man visu", + "show_mentions": "Show Mentions" + }, + "follow_request": { + "accept": "Pieņemt", + "accepted": "Pieņemts", + "reject": "noraidīt", + "rejected": "Noraidīts" + } + }, + "thread": { + "back_title": "Ziņa", + "title": "Post from %s" + }, + "settings": { + "title": "Iestatījumi", + "section": { + "appearance": { + "title": "Izskats", + "automatic": "Automātiski", + "light": "Vienmēr gaišs", + "dark": "Vienmēr tumšs" + }, + "look_and_feel": { + "title": "Izskats", + "use_system": "Use System", + "really_dark": "Ļoti tumšs", + "sorta_dark": "Itkā tumšs", + "light": "Gaišs" + }, + "notifications": { + "title": "Paziņojumi", + "favorites": "Favorites my post", + "follows": "Seko man", + "boosts": "Reblogs my post", + "mentions": "Pieminējumi", + "trigger": { + "anyone": "jebkurš", + "follower": "sekottājs", + "follow": "anyone I follow", + "noone": "neviens", + "title": "Notify me when" + } + }, + "preference": { + "title": "Uzstādījumi", + "true_black_dark_mode": "True black dark mode", + "disable_avatar_animation": "Disable animated avatars", + "disable_emoji_animation": "Disable animated emojis", + "using_default_browser": "Use default browser to open links", + "open_links_in_mastodon": "Open links in Mastodon" + }, + "boring_zone": { + "title": "The Boring Zone", + "account_settings": "Konta iestatījumi", + "terms": "Pakalpojuma noteikumi", + "privacy": "Privātuma politika" + }, + "spicy_zone": { + "title": "The Spicy Zone", + "clear": "Clear Media Cache", + "signout": "Iziet" + } + }, + "footer": { + "mastodon_description": "Mastodon ir atvērtā koda programmatūra. Tu vari ziņot par problēmām GitHub %s (%s)" + }, + "keyboard": { + "close_settings_window": "Close Settings Window" + } + }, + "report": { + "title_report": "Ziņot", + "title": "Ziņot %s", + "step1": "1. solis no 2", + "step2": "2. solis no 2", + "content1": "Are there any other posts you’d like to add to the report?", + "content2": "Is there anything the moderators should know about this report?", + "report_sent_title": "Thanks for reporting, we’ll look into this.", + "send": "Nosūtīt Sūdzību", + "skip_to_send": "Sūtīt bez komentāra", + "text_placeholder": "Type or paste additional comments", + "reported": "REPORTED", + "step_one": { + "step_1_of_4": "1. solis no 4", + "whats_wrong_with_this_post": "What's wrong with this post?", + "whats_wrong_with_this_account": "What's wrong with this account?", + "whats_wrong_with_this_username": "What's wrong with %s?", + "select_the_best_match": "Izvēlieties labāko atbilstību", + "i_dont_like_it": "Man tas nepatīk", + "it_is_not_something_you_want_to_see": "Tas nav kaut kas, ko tu vēlies redzēt", + "its_spam": "Tas ir spams", + "malicious_links_fake_engagement_or_repetetive_replies": "Malicious links, fake engagement, or repetetive replies", + "it_violates_server_rules": "It violates server rules", + "you_are_aware_that_it_breaks_specific_rules": "Tu zini, ka tas pārkāpj īpašus noteikumus", + "its_something_else": "Tas ir kaut kas cits", + "the_issue_does_not_fit_into_other_categories": "Šis jautājums neietilpst citās kategorijās" + }, + "step_two": { + "step_2_of_4": "2. solis no 4", + "which_rules_are_being_violated": "Kuri noteikumi tiek pārkāpti?", + "select_all_that_apply": "Atlasi visus atbilstošos", + "i_just_don’t_like_it": "I just don’t like it" + }, + "step_three": { + "step_3_of_4": "3. solis no 4", + "are_there_any_posts_that_back_up_this_report": "Vai ir kādas ziņas, kas atbalsta šo ziņojumu?", + "select_all_that_apply": "Atlasi visus atbilstošos" + }, + "step_four": { + "step_4_of_4": "4. solis no 4", + "is_there_anything_else_we_should_know": "Vai ir vēl kas mums būtu jāzina?" + }, + "step_final": { + "dont_want_to_see_this": "Vai nevēlies to redzēt?", + "when_you_see_something_you_dont_like_on_mastodon_you_can_remove_the_person_from_your_experience.": "When you see something you don’t like on Mastodon, you can remove the person from your experience.", + "unfollow": "Atsekot", + "unfollowed": "Atsekoja", + "unfollow_user": "Atsekot %s", + "mute_user": "Apklusināt %s", + "you_wont_see_their_posts_or_reblogs_in_your_home_feed_they_wont_know_they_ve_been_muted": "You won’t see their posts or reblogs in your home feed. They won’t know they’ve been muted.", + "block_user": "Bloķēt %s", + "they_will_no_longer_be_able_to_follow_or_see_your_posts_but_they_can_see_if_theyve_been_blocked": "They will no longer be able to follow or see your posts, but they can see if they’ve been blocked.", + "while_we_review_this_you_can_take_action_against_user": "Kamēr mēs to izskatām, tu vari veikt darbības pret @%s" + } + }, + "preview": { + "keyboard": { + "close_preview": "Close Preview", + "show_next": "Show Next", + "show_previous": "Show Previous" + } + }, + "account_list": { + "tab_bar_hint": "Current selected profile: %s. Double tap then hold to show account switcher", + "dismiss_account_switcher": "Dismiss Account Switcher", + "add_account": "Pievienot kontu" + }, + "wizard": { + "new_in_mastodon": "New in Mastodon", + "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", + "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" + } + } +} diff --git a/Localization/StringsConvertor/input/lv.lproj/ios-infoPlist.json b/Localization/StringsConvertor/input/lv.lproj/ios-infoPlist.json new file mode 100644 index 000000000..c6db73de0 --- /dev/null +++ b/Localization/StringsConvertor/input/lv.lproj/ios-infoPlist.json @@ -0,0 +1,6 @@ +{ + "NSCameraUsageDescription": "Used to take photo for post status", + "NSPhotoLibraryAddUsageDescription": "Used to save photo into the Photo Library", + "NewPostShortcutItemTitle": "New Post", + "SearchShortcutItemTitle": "Search" +} diff --git a/Localization/StringsConvertor/input/nl.lproj/app.json b/Localization/StringsConvertor/input/nl.lproj/app.json index 91e651e04..649fe5064 100644 --- a/Localization/StringsConvertor/input/nl.lproj/app.json +++ b/Localization/StringsConvertor/input/nl.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Niet langer negeren", "unmute_user": "%s niet langer negeren", "muted": "Genegeerd", - "edit_info": "Bewerken" + "edit_info": "Bewerken", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Gefilterd", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Deblokkeer Account", "message": "Bevestig om %s te deblokkeren" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Nieuw in Mastodon", "multiple_account_switch_intro_description": "Schakel tussen meerdere accounts door de profielknop in te drukken en vast te houden.", "accessibility_hint": "Tik tweemaal om het popup-scherm te sluiten" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/pt-BR.lproj/app.json b/Localization/StringsConvertor/input/pt-BR.lproj/app.json index 872be790b..063ed346c 100644 --- a/Localization/StringsConvertor/input/pt-BR.lproj/app.json +++ b/Localization/StringsConvertor/input/pt-BR.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Unmute", "unmute_user": "Unmute %s", "muted": "Muted", - "edit_info": "Edit Info" + "edit_info": "Edit Info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Filtered", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Unblock Account", "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "New in Mastodon", "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/pt.lproj/app.json b/Localization/StringsConvertor/input/pt.lproj/app.json index a965b23ae..80b0882d9 100644 --- a/Localization/StringsConvertor/input/pt.lproj/app.json +++ b/Localization/StringsConvertor/input/pt.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Unmute", "unmute_user": "Unmute %s", "muted": "Muted", - "edit_info": "Edit Info" + "edit_info": "Edit Info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Filtered", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Unblock Account", "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "New in Mastodon", "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/ro.lproj/app.json b/Localization/StringsConvertor/input/ro.lproj/app.json index 3a97d2222..8b9da0903 100644 --- a/Localization/StringsConvertor/input/ro.lproj/app.json +++ b/Localization/StringsConvertor/input/ro.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Unmute", "unmute_user": "Unmute %s", "muted": "Muted", - "edit_info": "Edit Info" + "edit_info": "Edit Info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Filtered", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Unblock Account", "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "New in Mastodon", "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/ru.lproj/app.json b/Localization/StringsConvertor/input/ru.lproj/app.json index fa6377a2c..7a4833554 100644 --- a/Localization/StringsConvertor/input/ru.lproj/app.json +++ b/Localization/StringsConvertor/input/ru.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Убрать из игнорируемых", "unmute_user": "Убрать %s из игнорируемых", "muted": "В игнорируемых", - "edit_info": "Изменить" + "edit_info": "Изменить", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Отфильтровано", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Unblock Account", "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Новое в Мастодоне", "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/si.lproj/Localizable.stringsdict b/Localization/StringsConvertor/input/si.lproj/Localizable.stringsdict new file mode 100644 index 000000000..bdcae6ac9 --- /dev/null +++ b/Localization/StringsConvertor/input/si.lproj/Localizable.stringsdict @@ -0,0 +1,449 @@ + + + + + a11y.plural.count.unread.notification + + NSStringLocalizedFormatKey + %#@notification_count_unread_notification@ + notification_count_unread_notification + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 unread notification + other + %ld unread notification + + + a11y.plural.count.input_limit_exceeds + + NSStringLocalizedFormatKey + Input limit exceeds %#@character_count@ + character_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 character + other + %ld characters + + + a11y.plural.count.input_limit_remains + + NSStringLocalizedFormatKey + Input limit remains %#@character_count@ + character_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 character + other + %ld characters + + + plural.count.followed_by_and_mutual + + NSStringLocalizedFormatKey + %#@names@%#@count_mutual@ + names + + one + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + other + + + count_mutual + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + Followed by %1$@, and another mutual + other + Followed by %1$@, and %ld mutuals + + + plural.count.metric_formatted.post + + NSStringLocalizedFormatKey + %@ %#@post_count@ + post_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + post + other + posts + + + plural.count.media + + NSStringLocalizedFormatKey + %#@media_count@ + media_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 media + other + %ld media + + + plural.count.post + + NSStringLocalizedFormatKey + %#@post_count@ + post_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 post + other + %ld posts + + + plural.count.favorite + + NSStringLocalizedFormatKey + %#@favorite_count@ + favorite_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 favorite + other + %ld favorites + + + plural.count.reblog + + NSStringLocalizedFormatKey + %#@reblog_count@ + reblog_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 reblog + other + %ld reblogs + + + plural.count.reply + + NSStringLocalizedFormatKey + %#@reply_count@ + reply_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 reply + other + %ld replies + + + plural.count.vote + + NSStringLocalizedFormatKey + %#@vote_count@ + vote_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 vote + other + %ld votes + + + plural.count.voter + + NSStringLocalizedFormatKey + %#@voter_count@ + voter_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 voter + other + %ld voters + + + plural.people_talking + + NSStringLocalizedFormatKey + %#@count_people_talking@ + count_people_talking + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 people talking + other + %ld people talking + + + plural.count.following + + NSStringLocalizedFormatKey + %#@count_following@ + count_following + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 following + other + %ld following + + + plural.count.follower + + NSStringLocalizedFormatKey + %#@count_follower@ + count_follower + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 follower + other + %ld followers + + + date.year.left + + NSStringLocalizedFormatKey + %#@count_year_left@ + count_year_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 year left + other + %ld years left + + + date.month.left + + NSStringLocalizedFormatKey + %#@count_month_left@ + count_month_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 months left + other + %ld months left + + + date.day.left + + NSStringLocalizedFormatKey + %#@count_day_left@ + count_day_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 day left + other + %ld days left + + + date.hour.left + + NSStringLocalizedFormatKey + %#@count_hour_left@ + count_hour_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 hour left + other + %ld hours left + + + date.minute.left + + NSStringLocalizedFormatKey + %#@count_minute_left@ + count_minute_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 minute left + other + %ld minutes left + + + date.second.left + + NSStringLocalizedFormatKey + %#@count_second_left@ + count_second_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 second left + other + %ld seconds left + + + date.year.ago.abbr + + NSStringLocalizedFormatKey + %#@count_year_ago_abbr@ + count_year_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1y ago + other + %ldy ago + + + date.month.ago.abbr + + NSStringLocalizedFormatKey + %#@count_month_ago_abbr@ + count_month_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1M ago + other + %ldM ago + + + date.day.ago.abbr + + NSStringLocalizedFormatKey + %#@count_day_ago_abbr@ + count_day_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1d ago + other + %ldd ago + + + date.hour.ago.abbr + + NSStringLocalizedFormatKey + %#@count_hour_ago_abbr@ + count_hour_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1h ago + other + %ldh ago + + + date.minute.ago.abbr + + NSStringLocalizedFormatKey + %#@count_minute_ago_abbr@ + count_minute_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1m ago + other + %ldm ago + + + date.second.ago.abbr + + NSStringLocalizedFormatKey + %#@count_second_ago_abbr@ + count_second_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1s ago + other + %lds ago + + + + diff --git a/Localization/StringsConvertor/input/si.lproj/app.json b/Localization/StringsConvertor/input/si.lproj/app.json new file mode 100644 index 000000000..f42e91ae1 --- /dev/null +++ b/Localization/StringsConvertor/input/si.lproj/app.json @@ -0,0 +1,702 @@ +{ + "common": { + "alerts": { + "common": { + "please_try_again": "යළි උත්සාහ කරන්න.", + "please_try_again_later": "Please try again later." + }, + "sign_up_failure": { + "title": "Sign Up Failure" + }, + "server_error": { + "title": "Server Error" + }, + "vote_failure": { + "title": "Vote Failure", + "poll_ended": "The poll has ended" + }, + "discard_post_content": { + "title": "Discard Draft", + "message": "Confirm to discard composed post content." + }, + "publish_post_failure": { + "title": "Publish Failure", + "message": "Failed to publish the post.\nPlease check your internet connection.", + "attachments_message": { + "video_attach_with_photo": "Cannot attach a video to a post that already contains images.", + "more_than_one_video": "Cannot attach more than one video." + } + }, + "edit_profile_failure": { + "title": "Edit Profile Error", + "message": "Cannot edit profile. Please try again." + }, + "sign_out": { + "title": "Sign Out", + "message": "Are you sure you want to sign out?", + "confirm": "Sign Out" + }, + "block_domain": { + "title": "Are you really, really sure you want to block the entire %s? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain and any of your followers from that domain will be removed.", + "block_entire_domain": "Block Domain" + }, + "save_photo_failure": { + "title": "Save Photo Failure", + "message": "Please enable the photo library access permission to save the photo." + }, + "delete_post": { + "title": "Delete Post", + "message": "Are you sure you want to delete this post?" + }, + "clean_cache": { + "title": "Clean Cache", + "message": "Successfully cleaned %s cache." + } + }, + "controls": { + "actions": { + "back": "ආපසු", + "next": "ඊළඟ", + "previous": "කලින්", + "open": "අරින්න", + "add": "එකතු", + "remove": "ඉවත් කරන්න", + "edit": "සංස්කරණය", + "save": "සුරකින්න", + "ok": "හරි", + "done": "අහවරයි", + "confirm": "තහවුරු", + "continue": "ඉදිරියට", + "compose": "Compose", + "cancel": "අවලංගු", + "discard": "ඉවතලන්න", + "try_again": "Try Again", + "take_photo": "Take Photo", + "save_photo": "Save Photo", + "copy_photo": "Copy Photo", + "sign_in": "පිවිසෙන්න", + "sign_up": "ලියාපදිංචිය", + "see_more": "තව බලන්න", + "preview": "පෙරදසුන", + "share": "බෙදාගන්න", + "share_user": "%s බෙදාගන්න", + "share_post": "Share Post", + "open_in_safari": "Open in Safari", + "open_in_browser": "Open in Browser", + "find_people": "Find people to follow", + "manually_search": "Manually search instead", + "skip": "Skip", + "reply": "Reply", + "report_user": "Report %s", + "block_domain": "Block %s", + "unblock_domain": "Unblock %s", + "settings": "Settings", + "delete": "Delete" + }, + "tabs": { + "home": "Home", + "search": "Search", + "notification": "Notification", + "profile": "Profile" + }, + "keyboard": { + "common": { + "switch_to_tab": "Switch to %s", + "compose_new_post": "Compose New Post", + "show_favorites": "Show Favorites", + "open_settings": "Open Settings" + }, + "timeline": { + "previous_status": "Previous Post", + "next_status": "Next Post", + "open_status": "Open Post", + "open_author_profile": "Open Author's Profile", + "open_reblogger_profile": "Open Reblogger's Profile", + "reply_status": "Reply to Post", + "toggle_reblog": "Toggle Reblog on Post", + "toggle_favorite": "Toggle Favorite on Post", + "toggle_content_warning": "Toggle Content Warning", + "preview_image": "Preview Image" + }, + "segmented_control": { + "previous_section": "Previous Section", + "next_section": "Next Section" + } + }, + "status": { + "user_reblogged": "%s reblogged", + "user_replied_to": "Replied to %s", + "show_post": "Show Post", + "show_user_profile": "Show user profile", + "content_warning": "Content Warning", + "sensitive_content": "Sensitive Content", + "media_content_warning": "Tap anywhere to reveal", + "tap_to_reveal": "Tap to reveal", + "poll": { + "vote": "ඡන්දය", + "closed": "වසා ඇත" + }, + "actions": { + "reply": "පිළිතුරු", + "reblog": "Reblog", + "unreblog": "Undo reblog", + "favorite": "ප්‍රියතමය", + "unfavorite": "Unfavorite", + "menu": "Menu", + "hide": "සඟවන්න", + "show_image": "Show image", + "show_gif": "Show GIF", + "show_video_player": "Show video player", + "tap_then_hold_to_show_menu": "Tap then hold to show menu" + }, + "tag": { + "url": "ඒ.ස.නි.", + "mention": "සැඳහුම", + "link": "සබැඳිය", + "hashtag": "Hashtag", + "email": "වි-තැපෑල", + "emoji": "ඉමෝජි" + }, + "visibility": { + "unlisted": "Everyone can see this post but not display in the public timeline.", + "private": "Only their followers can see this post.", + "private_from_me": "Only my followers can see this post.", + "direct": "Only mentioned user can see this post." + } + }, + "friendship": { + "follow": "අනුගමනය", + "following": "Following", + "request": "Request", + "pending": "Pending", + "block": "අවහිර", + "block_user": "%s අවහිර", + "block_domain": "%s අවහිර", + "unblock": "අනවහිර", + "unblock_user": "Unblock %s", + "blocked": "Blocked", + "mute": "Mute", + "mute_user": "Mute %s", + "unmute": "Unmute", + "unmute_user": "Unmute %s", + "muted": "Muted", + "edit_info": "Edit Info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" + }, + "timeline": { + "filtered": "Filtered", + "timestamp": { + "now": "Now" + }, + "loader": { + "load_missing_posts": "Load missing posts", + "loading_missing_posts": "Loading missing posts...", + "show_more_replies": "Show more replies" + }, + "header": { + "no_status_found": "No Post Found", + "blocking_warning": "You can’t view this user's profile\nuntil you unblock them.\nYour profile looks like this to them.", + "user_blocking_warning": "You can’t view %s’s profile\nuntil you unblock them.\nYour profile looks like this to them.", + "blocked_warning": "You can’t view this user’s profile\nuntil they unblock you.", + "user_blocked_warning": "You can’t view %s’s profile\nuntil they unblock you.", + "suspended_warning": "This user has been suspended.", + "user_suspended_warning": "%s’s account has been suspended." + } + } + } + }, + "scene": { + "welcome": { + "slogan": "Social networking\nback in your hands.", + "get_started": "පටන් ගන්න", + "log_in": "පිවිසෙන්න" + }, + "server_picker": { + "title": "Mastodon is made of users in different servers.", + "subtitle": "Pick a server based on your interests, region, or a general purpose one.", + "subtitle_extend": "Pick a server based on your interests, region, or a general purpose one. Each server is operated by an entirely independent organization or individual.", + "button": { + "category": { + "all": "සියල්ල", + "all_accessiblity_description": "Category: All", + "academia": "academia", + "activism": "activism", + "food": "food", + "furry": "furry", + "games": "games", + "general": "general", + "journalism": "journalism", + "lgbt": "lgbt", + "regional": "regional", + "art": "art", + "music": "music", + "tech": "tech" + }, + "see_less": "See Less", + "see_more": "තව බලන්න" + }, + "label": { + "language": "භාෂාව", + "users": "USERS", + "category": "CATEGORY" + }, + "input": { + "placeholder": "Search servers", + "search_servers_or_enter_url": "Search servers or enter URL" + }, + "empty_state": { + "finding_servers": "Finding available servers...", + "bad_network": "Something went wrong while loading the data. Check your internet connection.", + "no_results": "ප්‍රතිඵල නැත" + } + }, + "register": { + "title": "Let’s get you set up on %s", + "lets_get_you_set_up_on_domain": "Let’s get you set up on %s", + "input": { + "avatar": { + "delete": "මකන්න" + }, + "username": { + "placeholder": "පරිශීලක නාමය", + "duplicate_prompt": "නම දැනටමත් ගෙන ඇත." + }, + "display_name": { + "placeholder": "display name" + }, + "email": { + "placeholder": "වි-තැපෑල" + }, + "password": { + "placeholder": "මුරපදය", + "require": "Your password needs at least:", + "character_limit": "8 characters", + "accessibility": { + "checked": "checked", + "unchecked": "unchecked" + }, + "hint": "Your password needs at least eight characters" + }, + "invite": { + "registration_user_invite_request": "Why do you want to join?" + } + }, + "error": { + "item": { + "username": "පරිශීලක නාමය", + "email": "Email", + "password": "Password", + "agreement": "Agreement", + "locale": "Locale", + "reason": "Reason" + }, + "reason": { + "blocked": "%s contains a disallowed email provider", + "unreachable": "%s does not seem to exist", + "taken": "%s is already in use", + "reserved": "%s is a reserved keyword", + "accepted": "%s must be accepted", + "blank": "%s is required", + "invalid": "%s is invalid", + "too_long": "%s දිග වැඩිය", + "too_short": "%s is too short", + "inclusion": "%s is not a supported value" + }, + "special": { + "username_invalid": "Username must only contain alphanumeric characters and underscores", + "username_too_long": "Username is too long (can’t be longer than 30 characters)", + "email_invalid": "This is not a valid email address", + "password_too_short": "Password is too short (must be at least 8 characters)" + } + } + }, + "server_rules": { + "title": "Some ground rules.", + "subtitle": "These are set and enforced by the %s moderators.", + "prompt": "By continuing, you’re subject to the terms of service and privacy policy for %s.", + "terms_of_service": "සේවාවේ නියම", + "privacy_policy": "රහස්‍යතා ප්‍රතිපත්තිය", + "button": { + "confirm": "මම එකඟයි" + } + }, + "confirm_email": { + "title": "One last thing.", + "subtitle": "Tap the link we emailed to you to verify your account.", + "tap_the_link_we_emailed_to_you_to_verify_your_account": "Tap the link we emailed to you to verify your account", + "button": { + "open_email_app": "Open Email App", + "resend": "Resend" + }, + "dont_receive_email": { + "title": "Check your email", + "description": "Check if your email address is correct as well as your junk folder if you haven’t.", + "resend_email": "Resend Email" + }, + "open_email_app": { + "title": "Check your inbox.", + "description": "We just sent you an email. Check your junk folder if you haven’t.", + "mail": "Mail", + "open_email_client": "Open Email Client" + } + }, + "home_timeline": { + "title": "මුල් පිටුව", + "navigation_bar_state": { + "offline": "Offline", + "new_posts": "See new posts", + "published": "Published!", + "Publishing": "Publishing post...", + "accessibility": { + "logo_label": "Logo Button", + "logo_hint": "Tap to scroll to top and tap again to previous location" + } + } + }, + "suggestion_account": { + "title": "Find People to Follow", + "follow_explain": "When you follow someone, you’ll see their posts in your home feed." + }, + "compose": { + "title": { + "new_post": "New Post", + "new_reply": "New Reply" + }, + "media_selection": { + "camera": "Take Photo", + "photo_library": "Photo Library", + "browse": "පිරික්සන්න" + }, + "content_input_placeholder": "Type or paste what’s on your mind", + "compose_action": "ප්‍රකාශනය", + "replying_to_user": "replying to %s", + "attachment": { + "photo": "photo", + "video": "video", + "attachment_broken": "This %s is broken and can’t be\nuploaded to Mastodon.", + "description_photo": "Describe the photo for the visually-impaired...", + "description_video": "Describe the video for the visually-impaired..." + }, + "poll": { + "duration_time": "Duration: %s", + "thirty_minutes": "විනාඩි 30", + "one_hour": "පැය 1", + "six_hours": "6 Hours", + "one_day": "1 Day", + "three_days": "3 Days", + "seven_days": "7 Days", + "option_number": "Option %ld" + }, + "content_warning": { + "placeholder": "Write an accurate warning here..." + }, + "visibility": { + "public": "Public", + "unlisted": "Unlisted", + "private": "Followers only", + "direct": "Only people I mention" + }, + "auto_complete": { + "space_to_add": "Space to add" + }, + "accessibility": { + "append_attachment": "Add Attachment", + "append_poll": "Add Poll", + "remove_poll": "Remove Poll", + "custom_emoji_picker": "Custom Emoji Picker", + "enable_content_warning": "Enable Content Warning", + "disable_content_warning": "Disable Content Warning", + "post_visibility_menu": "Post Visibility Menu" + }, + "keyboard": { + "discard_post": "Discard Post", + "publish_post": "Publish Post", + "toggle_poll": "Toggle Poll", + "toggle_content_warning": "Toggle Content Warning", + "append_attachment_entry": "Add Attachment - %s", + "select_visibility_entry": "Select Visibility - %s" + } + }, + "profile": { + "header": { + "follows_you": "Follows You" + }, + "dashboard": { + "posts": "posts", + "following": "following", + "followers": "followers" + }, + "fields": { + "add_row": "Add Row", + "placeholder": { + "label": "නම්පත", + "content": "අන්තර්ගතය" + } + }, + "segmented_control": { + "posts": "Posts", + "replies": "Replies", + "posts_and_replies": "Posts and Replies", + "media": "මාධ්‍ය", + "about": "පිලිබඳව" + }, + "relationship_action_alert": { + "confirm_mute_user": { + "title": "Mute Account", + "message": "Confirm to mute %s" + }, + "confirm_unmute_user": { + "title": "Unmute Account", + "message": "Confirm to unmute %s" + }, + "confirm_block_user": { + "title": "Block Account", + "message": "Confirm to block %s" + }, + "confirm_unblock_user": { + "title": "Unblock Account", + "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" + } + }, + "accessibility": { + "show_avatar_image": "Show avatar image", + "edit_avatar_image": "Edit avatar image", + "show_banner_image": "Show banner image", + "double_tap_to_open_the_list": "Double tap to open the list" + } + }, + "follower": { + "title": "follower", + "footer": "Followers from other servers are not displayed." + }, + "following": { + "title": "following", + "footer": "Follows from other servers are not displayed." + }, + "familiarFollowers": { + "title": "Followers you familiar", + "followed_by_names": "Followed by %s" + }, + "favorited_by": { + "title": "Favorited By" + }, + "reblogged_by": { + "title": "Reblogged By" + }, + "search": { + "title": "සොයන්න", + "search_bar": { + "placeholder": "Search hashtags and users", + "cancel": "අවලංගු" + }, + "recommend": { + "button_text": "See All", + "hash_tag": { + "title": "Trending on Mastodon", + "description": "Hashtags that are getting quite a bit of attention", + "people_talking": "%s people are talking" + }, + "accounts": { + "title": "Accounts you might like", + "description": "You may like to follow these accounts", + "follow": "Follow" + } + }, + "searching": { + "segment": { + "all": "සියල්ල", + "people": "මිනිසුන්", + "hashtags": "Hashtags", + "posts": "Posts" + }, + "empty_state": { + "no_results": "ප්‍රතිඵල නැත" + }, + "recent_search": "Recent searches", + "clear": "මකන්න" + } + }, + "discovery": { + "tabs": { + "posts": "Posts", + "hashtags": "Hashtags", + "news": "පුවත්", + "community": "ප්‍රජාව", + "for_you": "For You" + }, + "intro": "These are the posts gaining traction in your corner of Mastodon." + }, + "favorite": { + "title": "Your Favorites" + }, + "notification": { + "title": { + "Everything": "Everything", + "Mentions": "Mentions" + }, + "notification_description": { + "followed_you": "followed you", + "favorited_your_post": "favorited your post", + "reblogged_your_post": "reblogged your post", + "mentioned_you": "mentioned you", + "request_to_follow_you": "request to follow you", + "poll_has_ended": "poll has ended" + }, + "keyobard": { + "show_everything": "Show Everything", + "show_mentions": "Show Mentions" + }, + "follow_request": { + "accept": "පිළිගන්න", + "accepted": "Accepted", + "reject": "ප්‍රතික්‍ෂේප", + "rejected": "Rejected" + } + }, + "thread": { + "back_title": "Post", + "title": "Post from %s" + }, + "settings": { + "title": "සැකසුම්", + "section": { + "appearance": { + "title": "පෙනුම", + "automatic": "ස්වයංක්‍රීය", + "light": "Always Light", + "dark": "Always Dark" + }, + "look_and_feel": { + "title": "Look and Feel", + "use_system": "Use System", + "really_dark": "Really Dark", + "sorta_dark": "Sorta Dark", + "light": "Light" + }, + "notifications": { + "title": "දැනුම්දීම්", + "favorites": "Favorites my post", + "follows": "Follows me", + "boosts": "Reblogs my post", + "mentions": "Mentions me", + "trigger": { + "anyone": "anyone", + "follower": "a follower", + "follow": "anyone I follow", + "noone": "no one", + "title": "Notify me when" + } + }, + "preference": { + "title": "Preferences", + "true_black_dark_mode": "True black dark mode", + "disable_avatar_animation": "Disable animated avatars", + "disable_emoji_animation": "Disable animated emojis", + "using_default_browser": "Use default browser to open links", + "open_links_in_mastodon": "Open links in Mastodon" + }, + "boring_zone": { + "title": "The Boring Zone", + "account_settings": "Account Settings", + "terms": "Terms of Service", + "privacy": "Privacy Policy" + }, + "spicy_zone": { + "title": "The Spicy Zone", + "clear": "Clear Media Cache", + "signout": "නික්මෙන්න" + } + }, + "footer": { + "mastodon_description": "Mastodon is open source software. You can report issues on GitHub at %s (%s)" + }, + "keyboard": { + "close_settings_window": "Close Settings Window" + } + }, + "report": { + "title_report": "වාර්තාව", + "title": "%s වාර්තාව", + "step1": "Step 1 of 2", + "step2": "Step 2 of 2", + "content1": "Are there any other posts you’d like to add to the report?", + "content2": "Is there anything the moderators should know about this report?", + "report_sent_title": "Thanks for reporting, we’ll look into this.", + "send": "Send Report", + "skip_to_send": "Send without comment", + "text_placeholder": "Type or paste additional comments", + "reported": "REPORTED", + "step_one": { + "step_1_of_4": "Step 1 of 4", + "whats_wrong_with_this_post": "What's wrong with this post?", + "whats_wrong_with_this_account": "What's wrong with this account?", + "whats_wrong_with_this_username": "What's wrong with %s?", + "select_the_best_match": "Select the best match", + "i_dont_like_it": "I don’t like it", + "it_is_not_something_you_want_to_see": "It is not something you want to see", + "its_spam": "It’s spam", + "malicious_links_fake_engagement_or_repetetive_replies": "Malicious links, fake engagement, or repetetive replies", + "it_violates_server_rules": "It violates server rules", + "you_are_aware_that_it_breaks_specific_rules": "You are aware that it breaks specific rules", + "its_something_else": "It’s something else", + "the_issue_does_not_fit_into_other_categories": "The issue does not fit into other categories" + }, + "step_two": { + "step_2_of_4": "Step 2 of 4", + "which_rules_are_being_violated": "Which rules are being violated?", + "select_all_that_apply": "Select all that apply", + "i_just_don’t_like_it": "I just don’t like it" + }, + "step_three": { + "step_3_of_4": "Step 3 of 4", + "are_there_any_posts_that_back_up_this_report": "Are there any posts that back up this report?", + "select_all_that_apply": "Select all that apply" + }, + "step_four": { + "step_4_of_4": "Step 4 of 4", + "is_there_anything_else_we_should_know": "Is there anything else we should know?" + }, + "step_final": { + "dont_want_to_see_this": "Don’t want to see this?", + "when_you_see_something_you_dont_like_on_mastodon_you_can_remove_the_person_from_your_experience.": "When you see something you don’t like on Mastodon, you can remove the person from your experience.", + "unfollow": "Unfollow", + "unfollowed": "Unfollowed", + "unfollow_user": "Unfollow %s", + "mute_user": "Mute %s", + "you_wont_see_their_posts_or_reblogs_in_your_home_feed_they_wont_know_they_ve_been_muted": "You won’t see their posts or reblogs in your home feed. They won’t know they’ve been muted.", + "block_user": "Block %s", + "they_will_no_longer_be_able_to_follow_or_see_your_posts_but_they_can_see_if_theyve_been_blocked": "They will no longer be able to follow or see your posts, but they can see if they’ve been blocked.", + "while_we_review_this_you_can_take_action_against_user": "While we review this, you can take action against %s" + } + }, + "preview": { + "keyboard": { + "close_preview": "Close Preview", + "show_next": "Show Next", + "show_previous": "Show Previous" + } + }, + "account_list": { + "tab_bar_hint": "Current selected profile: %s. Double tap then hold to show account switcher", + "dismiss_account_switcher": "Dismiss Account Switcher", + "add_account": "Add Account" + }, + "wizard": { + "new_in_mastodon": "New in Mastodon", + "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", + "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" + } + } +} diff --git a/Localization/StringsConvertor/input/si.lproj/ios-infoPlist.json b/Localization/StringsConvertor/input/si.lproj/ios-infoPlist.json new file mode 100644 index 000000000..c6db73de0 --- /dev/null +++ b/Localization/StringsConvertor/input/si.lproj/ios-infoPlist.json @@ -0,0 +1,6 @@ +{ + "NSCameraUsageDescription": "Used to take photo for post status", + "NSPhotoLibraryAddUsageDescription": "Used to save photo into the Photo Library", + "NewPostShortcutItemTitle": "New Post", + "SearchShortcutItemTitle": "Search" +} diff --git a/Localization/StringsConvertor/input/sl.lproj/Localizable.stringsdict b/Localization/StringsConvertor/input/sl.lproj/Localizable.stringsdict new file mode 100644 index 000000000..8f0bcb42b --- /dev/null +++ b/Localization/StringsConvertor/input/sl.lproj/Localizable.stringsdict @@ -0,0 +1,561 @@ + + + + + a11y.plural.count.unread.notification + + NSStringLocalizedFormatKey + %#@notification_count_unread_notification@ + notification_count_unread_notification + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + %ld neprebrano obvestilo + two + %ld neprebrani obvestili + few + %ld neprebrana obvestila + other + %ld neprebranih obvestil + + + a11y.plural.count.input_limit_exceeds + + NSStringLocalizedFormatKey + Omejitev vnosa presega %#@character_count@ + character_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + %ld znak + two + %ld znaka + few + %ld znaki + other + %ld znakov + + + a11y.plural.count.input_limit_remains + + NSStringLocalizedFormatKey + Omejitev vnosa ostaja %#@character_count@ + character_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + %ld znak + two + %ld znaka + few + %ld znaki + other + %ld znakov + + + plural.count.followed_by_and_mutual + + NSStringLocalizedFormatKey + %#@names@%#@count_mutual@ + names + + one + + two + + few + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + other + + + count_mutual + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + Sledijo %1$@ in %ld skupni + two + Sledijo %1$@ in %ld skupna + few + Sledijo %1$@ in %ld skupni + other + Sledijo %1$@ in %ld skupnih + + + plural.count.metric_formatted.post + + NSStringLocalizedFormatKey + %@ %#@post_count@ + post_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + objava + two + objavi + few + objave + other + objav + + + plural.count.media + + NSStringLocalizedFormatKey + %#@media_count@ + media_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + %ld medij + two + %ld medija + few + %ld mediji + other + %ld medijev + + + plural.count.post + + NSStringLocalizedFormatKey + %#@post_count@ + post_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + %ld objava + two + %ld objavi + few + %ld objave + other + %ld objav + + + plural.count.favorite + + NSStringLocalizedFormatKey + %#@favorite_count@ + favorite_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + %ld priljubljeni + two + %ld priljubljena + few + %ld priljubljeni + other + %ld priljubljenih + + + plural.count.reblog + + NSStringLocalizedFormatKey + %#@reblog_count@ + reblog_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + %ld poobjava + two + %ld poobjavi + few + %ld poobjave + other + %ld poobjav + + + plural.count.reply + + NSStringLocalizedFormatKey + %#@reply_count@ + reply_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + %ld odgovor + two + %ld odgovora + few + %ld odgovori + other + %ld odgovorov + + + plural.count.vote + + NSStringLocalizedFormatKey + %#@vote_count@ + vote_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + %ld glas + two + %ld glasova + few + %ld glasovi + other + %ld glasov + + + plural.count.voter + + NSStringLocalizedFormatKey + %#@voter_count@ + voter_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + %ld glasovalec + two + %ld glasovalca + few + %ld glasovalci + other + %ld glasovalcev + + + plural.people_talking + + NSStringLocalizedFormatKey + %#@count_people_talking@ + count_people_talking + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + %ld oseba se pogovarja + two + %ld osebi se pogovarjata + few + %ld osebe se pogovarjajo + other + %ld oseb se pogovarja + + + plural.count.following + + NSStringLocalizedFormatKey + %#@count_following@ + count_following + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + %ld sledi + two + %ld sledita + few + %ld sledijo + other + %ld sledijo + + + plural.count.follower + + NSStringLocalizedFormatKey + %#@count_follower@ + count_follower + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + %ld sledilec + two + %ld sledilca + few + %ld sledilci + other + %ld sledilcev + + + date.year.left + + NSStringLocalizedFormatKey + %#@count_year_left@ + count_year_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + na voljo še %ld leto + two + na voljo še %ld leti + few + na voljo še %ld leta + other + na voljo še %ld let + + + date.month.left + + NSStringLocalizedFormatKey + %#@count_month_left@ + count_month_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + na voljo še %ld mesec + two + na voljo še %ld meseca + few + na voljo še %ld mesece + other + na voljo še %ld mesecev + + + date.day.left + + NSStringLocalizedFormatKey + %#@count_day_left@ + count_day_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + še %ld dan + two + še %ld dneva + few + še %ld dnevi + other + še %ld dni + + + date.hour.left + + NSStringLocalizedFormatKey + %#@count_hour_left@ + count_hour_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + na voljo še %ld uro + two + na voljo še %ld uri + few + na voljo še %ld ure + other + na voljo še %ld ur + + + date.minute.left + + NSStringLocalizedFormatKey + %#@count_minute_left@ + count_minute_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + Še %ld min. + two + Še %ld min. + few + Še %ld min. + other + Še %ld min. + + + date.second.left + + NSStringLocalizedFormatKey + %#@count_second_left@ + count_second_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + Preostane še %ld s + two + Preostaneta še %ld s + few + Preostanejo še %ld s + other + Preostane še %ld s + + + date.year.ago.abbr + + NSStringLocalizedFormatKey + %#@count_year_ago_abbr@ + count_year_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + pred %ld letom + two + pred %ld letoma + few + pred %ld leti + other + pred %ld leti + + + date.month.ago.abbr + + NSStringLocalizedFormatKey + %#@count_month_ago_abbr@ + count_month_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + pred %ld mesecem + two + pred %ld mesecema + few + pred %ld meseci + other + pred %ld meseci + + + date.day.ago.abbr + + NSStringLocalizedFormatKey + %#@count_day_ago_abbr@ + count_day_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + pred %ld dnem + two + pred %ld dnevoma + few + pred %ld dnemi + other + pred %ld dnemi + + + date.hour.ago.abbr + + NSStringLocalizedFormatKey + %#@count_hour_ago_abbr@ + count_hour_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + pred %ld uro + two + pred %ld urama + few + pred %ld urami + other + pred %ld urami + + + date.minute.ago.abbr + + NSStringLocalizedFormatKey + %#@count_minute_ago_abbr@ + count_minute_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + pred %ld min + two + pred %ld min + few + pred %ld min + other + pred %ld min + + + date.second.ago.abbr + + NSStringLocalizedFormatKey + %#@count_second_ago_abbr@ + count_second_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + pred %ld s + two + pred %ld s + few + pred %ld s + other + pred %ld s + + + + diff --git a/Localization/StringsConvertor/input/sl.lproj/app.json b/Localization/StringsConvertor/input/sl.lproj/app.json new file mode 100644 index 000000000..99a823feb --- /dev/null +++ b/Localization/StringsConvertor/input/sl.lproj/app.json @@ -0,0 +1,702 @@ +{ + "common": { + "alerts": { + "common": { + "please_try_again": "Poskusite znova.", + "please_try_again_later": "Poskusite znova pozneje." + }, + "sign_up_failure": { + "title": "Neuspela registracija" + }, + "server_error": { + "title": "Napaka strežnika" + }, + "vote_failure": { + "title": "Napaka glasovanja", + "poll_ended": "Anketa je zaključena" + }, + "discard_post_content": { + "title": "Zavrzi osnutek", + "message": "Potrdite za opustitev sestavljene vsebine objave." + }, + "publish_post_failure": { + "title": "Spodletela objava", + "message": "Objava je spodletela.\nPreverite svojo internetno povezavo.", + "attachments_message": { + "video_attach_with_photo": "Videoposnetka ni mogoče priložiti objavi, ki že vsebuje slike.", + "more_than_one_video": "Ni možno priložiti več kot enega videoposnetka." + } + }, + "edit_profile_failure": { + "title": "Napaka urejanja profila", + "message": "Profila ni mogoče urejati. Poskusite znova." + }, + "sign_out": { + "title": "Odjava", + "message": "Ali ste prepričani, da se želite odjaviti?", + "confirm": "Odjava" + }, + "block_domain": { + "title": "Ali ste res, res prepričani, da želite blokirati celotno %s? V večini primerov je nekaj ciljnih blokiranj ali utišanj dovolj in boljše. Vsebine iz te domene ne boste videli na javnih časovnicah ali obvestilih. Vaši sledilci iz te domene bodo odstranjeni.", + "block_entire_domain": "Blokiraj domeno" + }, + "save_photo_failure": { + "title": "Neuspelo shranjevanje fotografije", + "message": "Za shranjevanje fotografije omogočite pravice za dostop do knjižnice fotografij." + }, + "delete_post": { + "title": "Izbriši objavo", + "message": "Ali ste prepričani, da želite izbrisati to objavo?" + }, + "clean_cache": { + "title": "Počisti predpomnilnik", + "message": "Uspešno počiščem predpomnilnik %s." + } + }, + "controls": { + "actions": { + "back": "Nazaj", + "next": "Naslednji", + "previous": "Prejšnji", + "open": "Odpri", + "add": "Dodaj", + "remove": "Odstrani", + "edit": "Uredi", + "save": "Shrani", + "ok": "V redu", + "done": "Opravljeno", + "confirm": "Potrdi", + "continue": "Nadaljuj", + "compose": "Sestavi", + "cancel": "Prekliči", + "discard": "Opusti", + "try_again": "Poskusi ponovno", + "take_photo": "Posnemi fotografijo", + "save_photo": "Shrani fotografijo", + "copy_photo": "Kopiraj fotografijo", + "sign_in": "Prijava", + "sign_up": "Registracija", + "see_more": "Pokaži več", + "preview": "Predogled", + "share": "Deli", + "share_user": "Deli %s", + "share_post": "Deli objavo", + "open_in_safari": "Odpri v Safariju", + "open_in_browser": "Odpri v brskalniku", + "find_people": "Poiščite osebe, ki jim želite slediti", + "manually_search": "Raje išči ročno", + "skip": "Preskoči", + "reply": "Odgovori", + "report_user": "Prijavi %s", + "block_domain": "Blokiraj %s", + "unblock_domain": "Odblokiraj %s", + "settings": "Nastavitve", + "delete": "Izbriši" + }, + "tabs": { + "home": "Domov", + "search": "Iskanje", + "notification": "Obvestilo", + "profile": "Profil" + }, + "keyboard": { + "common": { + "switch_to_tab": "Preklopi na %s", + "compose_new_post": "Sestavi novo objavo", + "show_favorites": "Pokaži priljubljene", + "open_settings": "Odpri nastavitve" + }, + "timeline": { + "previous_status": "Prejšnja objava", + "next_status": "Naslednja objava", + "open_status": "Odpri objavo", + "open_author_profile": "Pokaži profil avtorja", + "open_reblogger_profile": "Odpri profil poobjavitelja", + "reply_status": "Odgovori", + "toggle_reblog": "Preklopi poobjavo za objavo", + "toggle_favorite": "Preklopi priljubljenost objave", + "toggle_content_warning": "Preklopi opozorilo o vsebini", + "preview_image": "Predogled slike" + }, + "segmented_control": { + "previous_section": "Prejšnji odsek", + "next_section": "Naslednji odsek" + } + }, + "status": { + "user_reblogged": "%s je poobjavil_a", + "user_replied_to": "Odgovarja %s", + "show_post": "Pokaži objavo", + "show_user_profile": "Prikaži uporabnikov profil", + "content_warning": "Opozorilo o vsebini", + "sensitive_content": "Občutljiva vsebina", + "media_content_warning": "Tapnite kamorkoli, da razkrijete", + "tap_to_reveal": "Tapnite za razkritje", + "poll": { + "vote": "Glasuj", + "closed": "Zaprto" + }, + "actions": { + "reply": "Odgovori", + "reblog": "Poobjavi", + "unreblog": "Razveljavi poobjavo", + "favorite": "Priljubljen", + "unfavorite": "Odstrani iz priljubljenih", + "menu": "Meni", + "hide": "Skrij", + "show_image": "Pokaži sliko", + "show_gif": "Pokaži GIF", + "show_video_player": "Pokaži predvajalnik", + "tap_then_hold_to_show_menu": "Tapnite, nato držite, da se pojavi meni" + }, + "tag": { + "url": "URL", + "mention": "Omeni", + "link": "Povezava", + "hashtag": "Ključnik", + "email": "E-naslov", + "emoji": "Emotikon" + }, + "visibility": { + "unlisted": "Vsak lahko vidi to objavo, ni pa prikazana na javni časovnici.", + "private": "Samo sledilci osebe lahko vidijo to objavo.", + "private_from_me": "Samo moji sledilci lahko vidijo to objavo.", + "direct": "Samo omenjeni uporabnik lahko vidi to objavo." + } + }, + "friendship": { + "follow": "Sledi", + "following": "Sledi", + "request": "Zahteva", + "pending": "Na čakanju", + "block": "Blokiraj", + "block_user": "Blokiraj %s", + "block_domain": "Blokiraj %s", + "unblock": "Odblokiraj", + "unblock_user": "Odblokiraj %s", + "blocked": "Blokirano", + "mute": "Utišaj", + "mute_user": "Utišaj %s", + "unmute": "Odtišaj", + "unmute_user": "Odtišaj %s", + "muted": "Utišan", + "edit_info": "Uredi podatke", + "show_reblogs": "Pokaži poobjave", + "hide_reblogs": "Skrij poobjave" + }, + "timeline": { + "filtered": "Filtrirano", + "timestamp": { + "now": "Zdaj" + }, + "loader": { + "load_missing_posts": "Naloži manjkajoče objave", + "loading_missing_posts": "Nalaganje manjkajočih objav ...", + "show_more_replies": "Pokaži več odgovorov" + }, + "header": { + "no_status_found": "Ne najdem nobenih objav", + "blocking_warning": "Profila tega uporabnika ne morete\nvideti, dokler jih ne odblokirate.\nVaš profil je zanje videti tako.", + "user_blocking_warning": "Profila uporabnika %s ne morete\nvideti, dokler jih ne odblokirate.\nVaš profil je zanje videti tako.", + "blocked_warning": "Profila tega uporabnika ne morete\nvideti, dokler vas ne odblokirajo.", + "user_blocked_warning": "Profila uporabnika %s ne morete\nvideti, dokler vas ne odblokirajo.", + "suspended_warning": "Ta oseba je bila suspendirana.", + "user_suspended_warning": "Račun osebe %s je suspendiran." + } + } + } + }, + "scene": { + "welcome": { + "slogan": "Družbeno mreženje\nspet v vaših rokah.", + "get_started": "Začnite", + "log_in": "Prijava" + }, + "server_picker": { + "title": "Mastodon tvorijo uporabniki z različnih strežnikov.", + "subtitle": "Strežnik izberite glede na svoje interese, regijo ali pa izberite splošnega.", + "subtitle_extend": "Strežnik izberite glede na svoje interese, regijo ali pa izberite splošnega. Z vsakim strežnikom upravlja povsem neodvisna organizacija ali posameznik.", + "button": { + "category": { + "all": "Vse", + "all_accessiblity_description": "Kategorija: vse", + "academia": "akademsko", + "activism": "aktivizem", + "food": "hrana", + "furry": "Kosmato", + "games": "igre", + "general": "splošno", + "journalism": "novinarstvo", + "lgbt": "lgbq+", + "regional": "regionalno", + "art": "umetnost", + "music": "glasba", + "tech": "tehnologija" + }, + "see_less": "Pokaži manj", + "see_more": "Pokaži več" + }, + "label": { + "language": "JEZIK", + "users": "UPORABNIKI", + "category": "KATEGORIJA" + }, + "input": { + "placeholder": "Išči strežnike", + "search_servers_or_enter_url": "Iščite strežnike ali vnesite URL" + }, + "empty_state": { + "finding_servers": "Iskanje razpoložljivih strežnikov ...", + "bad_network": "Med nalaganjem podatkov je prišlo do napake. Preverite svojo internetno povezavo.", + "no_results": "Ni rezultatov" + } + }, + "register": { + "title": "Naj vas namestimo na %s", + "lets_get_you_set_up_on_domain": "Naj vas namestimo na %s", + "input": { + "avatar": { + "delete": "Izbriši" + }, + "username": { + "placeholder": "uporabniško ime", + "duplicate_prompt": "To ime je že zasedeno." + }, + "display_name": { + "placeholder": "pojavno ime" + }, + "email": { + "placeholder": "e-pošta" + }, + "password": { + "placeholder": "geslo", + "require": "Vaše geslo potrebuje vsaj:", + "character_limit": "8 znakov", + "accessibility": { + "checked": "potrjeno", + "unchecked": "nepotrjeno" + }, + "hint": "Geslo mora biti dolgo najmanj 8 znakov." + }, + "invite": { + "registration_user_invite_request": "Zakaj se želite pridružiti?" + } + }, + "error": { + "item": { + "username": "Uporabniško ime", + "email": "E-pošta", + "password": "Geslo", + "agreement": "Sporazum", + "locale": "Krajevne nastavitve", + "reason": "Razlog" + }, + "reason": { + "blocked": "%s vsebuje nedovoljenega ponudnika e-poštnih storitev", + "unreachable": "%s kot kaže ne obstaja", + "taken": "%s je že v uporabi", + "reserved": "%s je rezervirana ključna beseda", + "accepted": "%s mora biti sprejet", + "blank": "%s je zahtevan", + "invalid": "%s ni veljavno", + "too_long": "%s je predolgo", + "too_short": "%s je prekratko", + "inclusion": "%s ni podprta vrednost" + }, + "special": { + "username_invalid": "Uporabniško ime lahko vsebuje samo alfanumerične znake ter podčrtaje.", + "username_too_long": "Uporabniško ime je predolgo (ne more biti daljše od 30 znakov)", + "email_invalid": "E-naslov ni veljaven", + "password_too_short": "Geslo je prekratko (dolgo mora biti vsaj 8 znakov)" + } + } + }, + "server_rules": { + "title": "Nekaj osnovnih pravil.", + "subtitle": "Slednje določajo in njihovo spoštovanje zagotavljajo moderatorji %s.", + "prompt": "Če boste nadaljevali, za vas veljajo pogoji storitve in pravilnik o zasebnosti za %s.", + "terms_of_service": "pogoji uporabe", + "privacy_policy": "pravilnik o zasebnosti", + "button": { + "confirm": "Strinjam se" + } + }, + "confirm_email": { + "title": "Še zadnja stvar.", + "subtitle": "Tapnite povezavo, ki smo vam jo poslali po e-pošti, da overite svoj račun.", + "tap_the_link_we_emailed_to_you_to_verify_your_account": "Tapnite povezavo, ki smo vam jo poslali po e-pošti, da overite svoj račun", + "button": { + "open_email_app": "Odpri aplikacijo za e-pošto", + "resend": "Ponovno pošlji" + }, + "dont_receive_email": { + "title": "Preverite svojo e-pošto", + "description": "Preverite, ali je vaš e-naslov pravilen, pa tudi vsebino mape neželene pošte, če tega še niste storili.", + "resend_email": "Ponovno pošlji e-pošto" + }, + "open_email_app": { + "title": "Preverite svojo dohodno e-pošto.", + "description": "Ravnokar smo vam poslali e-sporočilo. Preverite neželeno pošto, če sporočila ne najdete med dohodno pošto.", + "mail": "E-pošta", + "open_email_client": "Odpri odjemalca e-pošte" + } + }, + "home_timeline": { + "title": "Domov", + "navigation_bar_state": { + "offline": "Nepovezan", + "new_posts": "Pokaži nove objave", + "published": "Objavljeno!", + "Publishing": "Objavljanje objave ...", + "accessibility": { + "logo_label": "Gumb logotipa", + "logo_hint": "Tapnite, da podrsate na vrh; tapnite znova, da se pomaknete na prejšnji položaj" + } + } + }, + "suggestion_account": { + "title": "Poiščite osebe, ki jim želite slediti", + "follow_explain": "Ko nekomu sledite, vidite njihove objave v svojem domačem viru." + }, + "compose": { + "title": { + "new_post": "Nova objava", + "new_reply": "Nov odgovor" + }, + "media_selection": { + "camera": "Posnemi fotografijo", + "photo_library": "Knjižnica fotografij", + "browse": "Prebrskaj" + }, + "content_input_placeholder": "Vnesite ali prilepite, kar vam leži na duši", + "compose_action": "Objavi", + "replying_to_user": "odgovarja %s", + "attachment": { + "photo": "fotografija", + "video": "video", + "attachment_broken": "To %s je okvarjeno in ga ni\nmožno naložiti v Mastodon.", + "description_photo": "Opiši fotografijo za slabovidne in osebe z okvaro vida ...", + "description_video": "Opiši video za slabovidne in osebe z okvaro vida ..." + }, + "poll": { + "duration_time": "Trajanje: %s", + "thirty_minutes": "30 minut", + "one_hour": "1 ura", + "six_hours": "6 ur", + "one_day": "1 dan", + "three_days": "3 dni", + "seven_days": "7 dni", + "option_number": "Možnost %ld" + }, + "content_warning": { + "placeholder": "Tukaj zapišite opozorilo ..." + }, + "visibility": { + "public": "Javno", + "unlisted": "Ni prikazano", + "private": "Samo sledilci", + "direct": "Samo osebe, ki jih omenjam" + }, + "auto_complete": { + "space_to_add": "Preslednica za dodajanje" + }, + "accessibility": { + "append_attachment": "Dodaj priponko", + "append_poll": "Dodaj anketo", + "remove_poll": "Odstrani anketo", + "custom_emoji_picker": "Izbirnik čustvenčkov po meri", + "enable_content_warning": "Omogoči opozorilo o vsebini", + "disable_content_warning": "Onemogoči opozorilo o vsebini", + "post_visibility_menu": "Meni vidnosti objave" + }, + "keyboard": { + "discard_post": "Opusti objavo", + "publish_post": "Objavi objavo", + "toggle_poll": "Preklopi anketo", + "toggle_content_warning": "Preklopi opozorilo o vsebini", + "append_attachment_entry": "Dodaj priponko - %s", + "select_visibility_entry": "Izberite vidnost - %s" + } + }, + "profile": { + "header": { + "follows_you": "Vam sledi" + }, + "dashboard": { + "posts": "Objave", + "following": "sledi", + "followers": "sledilcev" + }, + "fields": { + "add_row": "Dodaj vrstico", + "placeholder": { + "label": "Oznaka", + "content": "Vsebina" + } + }, + "segmented_control": { + "posts": "Objave", + "replies": "Odgovori", + "posts_and_replies": "Objave in odgovori", + "media": "Mediji", + "about": "O programu" + }, + "relationship_action_alert": { + "confirm_mute_user": { + "title": "Utišaj račun", + "message": "Potrdite utišanje %s" + }, + "confirm_unmute_user": { + "title": "Odtišaj račun", + "message": "Potrdite umik utišanja %s" + }, + "confirm_block_user": { + "title": "Blokiraj račun", + "message": "Potrdite za blokado %s" + }, + "confirm_unblock_user": { + "title": "Odblokiraj račun", + "message": "Potrdite za umik blokade %s" + }, + "confirm_show_reblogs": { + "title": "Pokaži poobjave", + "message": "Potrdite, da bodo poobjave prikazane" + }, + "confirm_hide_reblogs": { + "title": "Skrij poobjave", + "message": "Potrdite, da poobjave ne bodo prikazane" + } + }, + "accessibility": { + "show_avatar_image": "Pokaži sliko avatarja", + "edit_avatar_image": "Uredi sliko avatarja", + "show_banner_image": "Pokaži sliko pasice", + "double_tap_to_open_the_list": "Dvakrat tapnite, da se odpre seznam" + } + }, + "follower": { + "title": "sledilec", + "footer": "Sledilci z drugih strežnikov niso prikazani." + }, + "following": { + "title": "sledi", + "footer": "Sledenje z drugih strežnikov ni prikazano." + }, + "familiarFollowers": { + "title": "Znani sledilci", + "followed_by_names": "Sledijo %s" + }, + "favorited_by": { + "title": "Med priljubljene dal_a" + }, + "reblogged_by": { + "title": "Poobjavil_a" + }, + "search": { + "title": "Iskanje", + "search_bar": { + "placeholder": "Išči ključnike in uporabnike", + "cancel": "Prekliči" + }, + "recommend": { + "button_text": "Prikaži vse", + "hash_tag": { + "title": "V trendu na Mastodonu", + "description": "Ključniki, ki imajo veliko pozornosti", + "people_talking": "%s oseb se pogovarja" + }, + "accounts": { + "title": "Računi, ki vam bi bili morda všeč", + "description": "Morda želite slediti tem računom", + "follow": "Sledi" + } + }, + "searching": { + "segment": { + "all": "Vse", + "people": "Ljudje", + "hashtags": "Ključniki", + "posts": "Objave" + }, + "empty_state": { + "no_results": "Ni rezultatov" + }, + "recent_search": "Nedavna iskanja", + "clear": "Počisti" + } + }, + "discovery": { + "tabs": { + "posts": "Objave", + "hashtags": "Ključniki", + "news": "Novice", + "community": "Skupnost", + "for_you": "Za vas" + }, + "intro": "To so objave, ki plenijo pozornost na vašem koncu Mastodona." + }, + "favorite": { + "title": "Vaši priljubljeni" + }, + "notification": { + "title": { + "Everything": "Vse", + "Mentions": "Omembe" + }, + "notification_description": { + "followed_you": "vam sledi", + "favorited_your_post": "je vzljubil/a vašo objavo", + "reblogged_your_post": "je poobjavil_a vašo objavo", + "mentioned_you": "vas je omenil/a", + "request_to_follow_you": "vas je zaprosil za sledenje", + "poll_has_ended": "anketa je zaključena" + }, + "keyobard": { + "show_everything": "Pokaži vse", + "show_mentions": "Pokaži omembe" + }, + "follow_request": { + "accept": "Sprejmi", + "accepted": "Sprejeto", + "reject": "Zavrni", + "rejected": "Zavrnjeno" + } + }, + "thread": { + "back_title": "Objavi", + "title": "Objavil/a" + }, + "settings": { + "title": "Nastavitve", + "section": { + "appearance": { + "title": "Videz", + "automatic": "Samodejno", + "light": "Vedno svetlo", + "dark": "Vedno temno" + }, + "look_and_feel": { + "title": "Videz in občutek", + "use_system": "Uporabi sistemsko", + "really_dark": "Zares temno", + "sorta_dark": "Nekako temno", + "light": "Svetlo" + }, + "notifications": { + "title": "Obvestila", + "favorites": "mojo objavo da med priljubljene", + "follows": "me sledi", + "boosts": "prepošlje mojo objavo", + "mentions": "me omeni", + "trigger": { + "anyone": "kdor koli", + "follower": "sledilec/ka", + "follow": "nekdo, ki mu sledim,", + "noone": "nihče", + "title": "Obvesti me, ko" + } + }, + "preference": { + "title": "Nastavitve", + "true_black_dark_mode": "Resnično črni temni način", + "disable_avatar_animation": "Onemogoči animirane avatarje", + "disable_emoji_animation": "Onemogoči animirane emotikone", + "using_default_browser": "Uporabi privzeti brskalnik za odpiranje povezav", + "open_links_in_mastodon": "Odpri povezave v Mastodonu" + }, + "boring_zone": { + "title": "Cona dolgočasja", + "account_settings": "Nastavitve računa", + "terms": "Pogoji uporabe", + "privacy": "Pravilnik o zasebnosti" + }, + "spicy_zone": { + "title": "Pikantna cona", + "clear": "Počisti medijski predpomnilnik", + "signout": "Odjava" + } + }, + "footer": { + "mastodon_description": "Mastodon je odprtokodna programska oprema. Na GitHubu na %s (%s) lahko poročate o napakah" + }, + "keyboard": { + "close_settings_window": "Zapri okno nastavitev" + } + }, + "report": { + "title_report": "Poročaj", + "title": "Prijavi %s", + "step1": "Korak 1 od 2", + "step2": "Korak 2 od 2", + "content1": "Ali so še kakšne druge objave, ki bi jih želeli dodati k prijavi?", + "content2": "Je kaj, kar bi moderatorji morali vedeti o tem poročilu?", + "report_sent_title": "Hvala za poročilo, bomo preverili.", + "send": "Pošlji poročilo", + "skip_to_send": "Pošlji brez komentarja", + "text_placeholder": "Vnesite ali prilepite dodatne komentarje", + "reported": "PRIJAVLJEN", + "step_one": { + "step_1_of_4": "Korak 1 od 4", + "whats_wrong_with_this_post": "Kaj je narobe s to objavo?", + "whats_wrong_with_this_account": "Kaj je narobe s tem računom?", + "whats_wrong_with_this_username": "Kaj je narobe s/z %s?", + "select_the_best_match": "Izberite najboljši zadetek", + "i_dont_like_it": "Ni mi všeč", + "it_is_not_something_you_want_to_see": "To ni tisto, kar želite videti", + "its_spam": "To je neželena vsebina", + "malicious_links_fake_engagement_or_repetetive_replies": "Škodljive povezave, lažno prizadevanje ali ponavljajoči se odgovori", + "it_violates_server_rules": "Krši strežniška pravila", + "you_are_aware_that_it_breaks_specific_rules": "Zavedate se, da krši določena pravila", + "its_something_else": "Gre za nekaj drugega", + "the_issue_does_not_fit_into_other_categories": "Težava ne sodi v druge kategorije" + }, + "step_two": { + "step_2_of_4": "Korak 2 od 4", + "which_rules_are_being_violated": "Katera pravila so kršena?", + "select_all_that_apply": "Izberite vse, kar ustreza", + "i_just_don’t_like_it": "Ni mi všeč" + }, + "step_three": { + "step_3_of_4": "Korak 3 od 4", + "are_there_any_posts_that_back_up_this_report": "Ali so kakšne objave, ki dokazujejo trditve iz tega poročila?", + "select_all_that_apply": "Izberite vse, kar ustreza" + }, + "step_four": { + "step_4_of_4": "Korak 4 od 4", + "is_there_anything_else_we_should_know": "Je še kaj, za kar menite, da bi morali vedeti?" + }, + "step_final": { + "dont_want_to_see_this": "Ne želite videti tega?", + "when_you_see_something_you_dont_like_on_mastodon_you_can_remove_the_person_from_your_experience.": "Če vidite nekaj, česar na Masodonu ne želite, lahko odstranite osebo iz svoje izkušnje.", + "unfollow": "Prenehaj slediti", + "unfollowed": "Ne sledi več", + "unfollow_user": "Prenehaj slediti %s", + "mute_user": "Utišaj %s", + "you_wont_see_their_posts_or_reblogs_in_your_home_feed_they_wont_know_they_ve_been_muted": "Njihovih objav ali poobjav ne boste videli v svojem domačem viru. Ne bodo vedeli, da so utišani.", + "block_user": "Blokiraj %s", + "they_will_no_longer_be_able_to_follow_or_see_your_posts_but_they_can_see_if_theyve_been_blocked": "Nič več ne bodo mogli slediti ali videti vaše objave, lahko pa vidijo, če so blokirani.", + "while_we_review_this_you_can_take_action_against_user": "Medtem, ko to pregledujemo, lahko proti %s ukrepate" + } + }, + "preview": { + "keyboard": { + "close_preview": "Zapri predogled", + "show_next": "Pokaži naslednje", + "show_previous": "Pokaži prejšnje" + } + }, + "account_list": { + "tab_bar_hint": "Trenutno izbran profil: %s. Dvakrat tapnite, nato držite, da se pojavi preklopnik med računi.", + "dismiss_account_switcher": "Umakni preklopnik med računi", + "add_account": "Dodaj račun" + }, + "wizard": { + "new_in_mastodon": "Novo v Mastodonu", + "multiple_account_switch_intro_description": "Preklopite med več računi s pritiskom gumba profila.", + "accessibility_hint": "Dvakrat tapnite, da zapustite tega čarovnika" + }, + "bookmark": { + "title": "Bookmarks" + } + } +} diff --git a/Localization/StringsConvertor/input/sl.lproj/ios-infoPlist.json b/Localization/StringsConvertor/input/sl.lproj/ios-infoPlist.json new file mode 100644 index 000000000..82c65a50a --- /dev/null +++ b/Localization/StringsConvertor/input/sl.lproj/ios-infoPlist.json @@ -0,0 +1,6 @@ +{ + "NSCameraUsageDescription": "Uporabljeno za zajem fotografij za stanje objave", + "NSPhotoLibraryAddUsageDescription": "Uporabljeno za shranjevanje fotografije v knjižnico fotografij", + "NewPostShortcutItemTitle": "Nova objava", + "SearchShortcutItemTitle": "Iskanje" +} diff --git a/Localization/StringsConvertor/input/sv.lproj/Localizable.stringsdict b/Localization/StringsConvertor/input/sv.lproj/Localizable.stringsdict index 27ef9fb53..048af4732 100644 --- a/Localization/StringsConvertor/input/sv.lproj/Localizable.stringsdict +++ b/Localization/StringsConvertor/input/sv.lproj/Localizable.stringsdict @@ -90,7 +90,7 @@ one inlägg other - inläggen + inlägg plural.count.media @@ -152,9 +152,9 @@ NSStringFormatValueTypeKey ld one - %ld ompostning + %ld puff other - %ld ompostningar + %ld puffar plural.count.reply diff --git a/Localization/StringsConvertor/input/sv.lproj/app.json b/Localization/StringsConvertor/input/sv.lproj/app.json index 537d6a270..85f243b03 100644 --- a/Localization/StringsConvertor/input/sv.lproj/app.json +++ b/Localization/StringsConvertor/input/sv.lproj/app.json @@ -28,7 +28,7 @@ } }, "edit_profile_failure": { - "title": "Profilredigering misslyckades", + "title": "Kunde inte redigera profil", "message": "Kan inte redigera profil. Var god försök igen." }, "sign_out": { @@ -113,7 +113,7 @@ "open_author_profile": "Öppna författarens profil", "open_reblogger_profile": "Öppna ompostarens profil", "reply_status": "Svara på inlägg", - "toggle_reblog": "Växla ompostning på inlägg", + "toggle_reblog": "Växla puff på inlägg", "toggle_favorite": "Växla favorit på inlägg", "toggle_content_warning": "Växla innehållsvarning", "preview_image": "Förhandsgranska bild" @@ -124,7 +124,7 @@ } }, "status": { - "user_reblogged": "%s ompostade", + "user_reblogged": "%s puffade", "user_replied_to": "Svarade på %s", "show_post": "Visa inlägg", "show_user_profile": "Visa användarprofil", @@ -138,8 +138,8 @@ }, "actions": { "reply": "Svara", - "reblog": "Omposta", - "unreblog": "Ångra ompostning", + "reblog": "Puffa", + "unreblog": "Ångra puff", "favorite": "Favorit", "unfavorite": "Ta bort favorit", "menu": "Meny", @@ -180,7 +180,9 @@ "unmute": "Avtysta", "unmute_user": "Avtysta %s", "muted": "Tystad", - "edit_info": "Redigera info" + "edit_info": "Redigera info", + "show_reblogs": "Visa knuffar", + "hide_reblogs": "Dölj puffar" }, "timeline": { "filtered": "Filtrerat", @@ -418,7 +420,7 @@ }, "profile": { "header": { - "follows_you": "Follows You" + "follows_you": "Följer dig" }, "dashboard": { "posts": "inlägg", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Avblockera konto", "message": "Bekräfta för att avblockera %s" + }, + "confirm_show_reblogs": { + "title": "Visa puffar", + "message": "Bekräfta för att visa puffar" + }, + "confirm_hide_reblogs": { + "title": "Dölj puffar", + "message": "Bekräfta för att dölja puffar" } }, "accessibility": { @@ -480,7 +490,7 @@ "title": "Favoriserad av" }, "reblogged_by": { - "title": "Ompostat av" + "title": "Puffat av" }, "search": { "title": "Sök", @@ -536,7 +546,7 @@ "notification_description": { "followed_you": "följde dig", "favorited_your_post": "favoriserade ditt inlägg", - "reblogged_your_post": "ompostade ditt inlägg", + "reblogged_your_post": "puffade ditt inlägg", "mentioned_you": "nämnde dig", "request_to_follow_you": "begär att följa dig", "poll_has_ended": "omröstningen har avslutats" @@ -546,10 +556,10 @@ "show_mentions": "Visa omnämningar" }, "follow_request": { - "accept": "Accept", - "accepted": "Accepted", - "reject": "reject", - "rejected": "Rejected" + "accept": "Godkänn", + "accepted": "Godkänd", + "reject": "avvisa", + "rejected": "Avvisad" } }, "thread": { @@ -577,7 +587,7 @@ "favorites": "Favoriserar mitt inlägg", "follows": "Följer mig", "boosts": "Ompostar mitt inlägg", - "mentions": "Omnämner mig", + "mentions": "Nämner mig", "trigger": { "anyone": "alla", "follower": "en följare", @@ -684,6 +694,9 @@ "new_in_mastodon": "Nytt i Mastodon", "multiple_account_switch_intro_description": "Växla mellan flera konton genom att hålla inne profilknappen.", "accessibility_hint": "Dubbeltryck för att avvisa den här guiden" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/th.lproj/app.json b/Localization/StringsConvertor/input/th.lproj/app.json index 85d2d52ae..763b827cd 100644 --- a/Localization/StringsConvertor/input/th.lproj/app.json +++ b/Localization/StringsConvertor/input/th.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "เลิกซ่อน", "unmute_user": "เลิกซ่อน %s", "muted": "ซ่อนอยู่", - "edit_info": "แก้ไขข้อมูล" + "edit_info": "แก้ไขข้อมูล", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "กรองอยู่", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "เลิกปิดกั้นบัญชี", "message": "ยืนยันเพื่อเลิกปิดกั้น %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "มาใหม่ใน Mastodon", "multiple_account_switch_intro_description": "สลับระหว่างหลายบัญชีโดยกดปุ่มโปรไฟล์ค้างไว้", "accessibility_hint": "แตะสองครั้งเพื่อปิดตัวช่วยสร้างนี้" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/tr.lproj/Localizable.stringsdict b/Localization/StringsConvertor/input/tr.lproj/Localizable.stringsdict index 3da12ee4e..29df92c2b 100644 --- a/Localization/StringsConvertor/input/tr.lproj/Localizable.stringsdict +++ b/Localization/StringsConvertor/input/tr.lproj/Localizable.stringsdict @@ -234,7 +234,7 @@ one 1 takip edilen other - %ld takip edilen + %ld takip plural.count.follower diff --git a/Localization/StringsConvertor/input/tr.lproj/app.json b/Localization/StringsConvertor/input/tr.lproj/app.json index 27fb4e2b6..cef7fd7f4 100644 --- a/Localization/StringsConvertor/input/tr.lproj/app.json +++ b/Localization/StringsConvertor/input/tr.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Susturmayı kaldır", "unmute_user": "Sesini aç %s", "muted": "Susturuldu", - "edit_info": "Bilgiyi Düzenle" + "edit_info": "Bilgiyi Düzenle", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "Filtrelenmiş", @@ -241,7 +243,7 @@ }, "input": { "placeholder": "Toplulukları ara", - "search_servers_or_enter_url": "Search servers or enter URL" + "search_servers_or_enter_url": "Sunucuları ara ya da bir bağlantı gir" }, "empty_state": { "finding_servers": "Mevcut sunucular aranıyor...", @@ -251,7 +253,7 @@ }, "register": { "title": "%s için kurulumunuzu yapalım", - "lets_get_you_set_up_on_domain": "Let’s get you set up on %s", + "lets_get_you_set_up_on_domain": "%s için kurulumunuzu yapalım", "input": { "avatar": { "delete": "Sil" @@ -286,7 +288,7 @@ "email": "E-posta", "password": "Parola", "agreement": "Anlaşma", - "locale": "Locale", + "locale": "Yerel", "reason": "Sebep" }, "reason": { @@ -322,7 +324,7 @@ "confirm_email": { "title": "Son bir şey.", "subtitle": "Hesabınızı doğrulamak için size e-postayla gönderdiğimiz bağlantıya dokunun.", - "tap_the_link_we_emailed_to_you_to_verify_your_account": "Tap the link we emailed to you to verify your account", + "tap_the_link_we_emailed_to_you_to_verify_your_account": "Hesabınızı doğrulamak için size e-postayla gönderdiğimiz bağlantıya dokunun", "button": { "open_email_app": "E-posta Uygulamasını Aç", "resend": "Yeniden gönder" @@ -347,7 +349,7 @@ "published": "Yayınlandı!", "Publishing": "Gönderi yayınlanıyor...", "accessibility": { - "logo_label": "Logo Button", + "logo_label": "Logo Düğmesi", "logo_hint": "Tap to scroll to top and tap again to previous location" } } @@ -418,7 +420,7 @@ }, "profile": { "header": { - "follows_you": "Follows You" + "follows_you": "Seni takip ediyor" }, "dashboard": { "posts": "gönderiler", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "Hesabın Engelini Kaldır", "message": "%s engellemeyi kaldırmayı onaylayın" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -465,11 +475,11 @@ } }, "follower": { - "title": "follower", + "title": "takipçi", "footer": "Diğer sunucudaki takipçiler gösterilemiyor." }, "following": { - "title": "following", + "title": "takip", "footer": "Diğer sunucudaki takip edilenler gösterilemiyor." }, "familiarFollowers": { @@ -660,8 +670,8 @@ "when_you_see_something_you_dont_like_on_mastodon_you_can_remove_the_person_from_your_experience.": "When you see something you don’t like on Mastodon, you can remove the person from your experience.", "unfollow": "Takibi bırak", "unfollowed": "Unfollowed", - "unfollow_user": "Unfollow %s", - "mute_user": "Mute %s", + "unfollow_user": "Takipten çık %s", + "mute_user": "Sustur %s", "you_wont_see_their_posts_or_reblogs_in_your_home_feed_they_wont_know_they_ve_been_muted": "You won’t see their posts or reblogs in your home feed. They won’t know they’ve been muted.", "block_user": "Block %s", "they_will_no_longer_be_able_to_follow_or_see_your_posts_but_they_can_see_if_theyve_been_blocked": "They will no longer be able to follow or see your posts, but they can see if they’ve been blocked.", @@ -684,6 +694,9 @@ "new_in_mastodon": "Mastodon'da Yeni", "multiple_account_switch_intro_description": "Profil butonuna basılı tutarak birden fazla hesap arasında geçiş yapın.", "accessibility_hint": "Bu yardımı kapatmak için çift tıklayın" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/uk.lproj/Localizable.stringsdict b/Localization/StringsConvertor/input/uk.lproj/Localizable.stringsdict new file mode 100644 index 000000000..cdf35477e --- /dev/null +++ b/Localization/StringsConvertor/input/uk.lproj/Localizable.stringsdict @@ -0,0 +1,561 @@ + + + + + a11y.plural.count.unread.notification + + NSStringLocalizedFormatKey + %#@notification_count_unread_notification@ + notification_count_unread_notification + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 unread notification + few + %ld unread notification + many + %ld unread notification + other + %ld unread notification + + + a11y.plural.count.input_limit_exceeds + + NSStringLocalizedFormatKey + Input limit exceeds %#@character_count@ + character_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 character + few + %ld characters + many + %ld characters + other + %ld characters + + + a11y.plural.count.input_limit_remains + + NSStringLocalizedFormatKey + Input limit remains %#@character_count@ + character_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 character + few + %ld characters + many + %ld characters + other + %ld characters + + + plural.count.followed_by_and_mutual + + NSStringLocalizedFormatKey + %#@names@%#@count_mutual@ + names + + one + + few + + many + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + other + + + count_mutual + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + Followed by %1$@, and another mutual + few + Followed by %1$@, and %ld mutuals + many + Followed by %1$@, and %ld mutuals + other + Followed by %1$@, and %ld mutuals + + + plural.count.metric_formatted.post + + NSStringLocalizedFormatKey + %@ %#@post_count@ + post_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + post + few + posts + many + posts + other + posts + + + plural.count.media + + NSStringLocalizedFormatKey + %#@media_count@ + media_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 media + few + %ld media + many + %ld media + other + %ld media + + + plural.count.post + + NSStringLocalizedFormatKey + %#@post_count@ + post_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 post + few + %ld posts + many + %ld posts + other + %ld posts + + + plural.count.favorite + + NSStringLocalizedFormatKey + %#@favorite_count@ + favorite_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 favorite + few + %ld favorites + many + %ld favorites + other + %ld favorites + + + plural.count.reblog + + NSStringLocalizedFormatKey + %#@reblog_count@ + reblog_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 reblog + few + %ld reblogs + many + %ld reblogs + other + %ld reblogs + + + plural.count.reply + + NSStringLocalizedFormatKey + %#@reply_count@ + reply_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 reply + few + %ld replies + many + %ld replies + other + %ld replies + + + plural.count.vote + + NSStringLocalizedFormatKey + %#@vote_count@ + vote_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 vote + few + %ld votes + many + %ld votes + other + %ld votes + + + plural.count.voter + + NSStringLocalizedFormatKey + %#@voter_count@ + voter_count + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 voter + few + %ld voters + many + %ld voters + other + %ld voters + + + plural.people_talking + + NSStringLocalizedFormatKey + %#@count_people_talking@ + count_people_talking + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 people talking + few + %ld people talking + many + %ld people talking + other + %ld people talking + + + plural.count.following + + NSStringLocalizedFormatKey + %#@count_following@ + count_following + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 following + few + %ld following + many + %ld following + other + %ld following + + + plural.count.follower + + NSStringLocalizedFormatKey + %#@count_follower@ + count_follower + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 follower + few + %ld followers + many + %ld followers + other + %ld followers + + + date.year.left + + NSStringLocalizedFormatKey + %#@count_year_left@ + count_year_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 year left + few + %ld years left + many + %ld years left + other + %ld years left + + + date.month.left + + NSStringLocalizedFormatKey + %#@count_month_left@ + count_month_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 months left + few + %ld months left + many + %ld months left + other + %ld months left + + + date.day.left + + NSStringLocalizedFormatKey + %#@count_day_left@ + count_day_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 day left + few + %ld days left + many + %ld days left + other + %ld days left + + + date.hour.left + + NSStringLocalizedFormatKey + %#@count_hour_left@ + count_hour_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 hour left + few + %ld hours left + many + %ld hours left + other + %ld hours left + + + date.minute.left + + NSStringLocalizedFormatKey + %#@count_minute_left@ + count_minute_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 minute left + few + %ld minutes left + many + %ld minutes left + other + %ld minutes left + + + date.second.left + + NSStringLocalizedFormatKey + %#@count_second_left@ + count_second_left + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1 second left + few + %ld seconds left + many + %ld seconds left + other + %ld seconds left + + + date.year.ago.abbr + + NSStringLocalizedFormatKey + %#@count_year_ago_abbr@ + count_year_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1y ago + few + %ldy ago + many + %ldy ago + other + %ldy ago + + + date.month.ago.abbr + + NSStringLocalizedFormatKey + %#@count_month_ago_abbr@ + count_month_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1M ago + few + %ldM ago + many + %ldM ago + other + %ldM ago + + + date.day.ago.abbr + + NSStringLocalizedFormatKey + %#@count_day_ago_abbr@ + count_day_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1d ago + few + %ldd ago + many + %ldd ago + other + %ldd ago + + + date.hour.ago.abbr + + NSStringLocalizedFormatKey + %#@count_hour_ago_abbr@ + count_hour_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1h ago + few + %ldh ago + many + %ldh ago + other + %ldh ago + + + date.minute.ago.abbr + + NSStringLocalizedFormatKey + %#@count_minute_ago_abbr@ + count_minute_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1m ago + few + %ldm ago + many + %ldm ago + other + %ldm ago + + + date.second.ago.abbr + + NSStringLocalizedFormatKey + %#@count_second_ago_abbr@ + count_second_ago_abbr + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + ld + one + 1s ago + few + %lds ago + many + %lds ago + other + %lds ago + + + + diff --git a/Localization/StringsConvertor/input/uk.lproj/app.json b/Localization/StringsConvertor/input/uk.lproj/app.json new file mode 100644 index 000000000..80b0882d9 --- /dev/null +++ b/Localization/StringsConvertor/input/uk.lproj/app.json @@ -0,0 +1,702 @@ +{ + "common": { + "alerts": { + "common": { + "please_try_again": "Please try again.", + "please_try_again_later": "Please try again later." + }, + "sign_up_failure": { + "title": "Sign Up Failure" + }, + "server_error": { + "title": "Server Error" + }, + "vote_failure": { + "title": "Vote Failure", + "poll_ended": "The poll has ended" + }, + "discard_post_content": { + "title": "Discard Draft", + "message": "Confirm to discard composed post content." + }, + "publish_post_failure": { + "title": "Publish Failure", + "message": "Failed to publish the post.\nPlease check your internet connection.", + "attachments_message": { + "video_attach_with_photo": "Cannot attach a video to a post that already contains images.", + "more_than_one_video": "Cannot attach more than one video." + } + }, + "edit_profile_failure": { + "title": "Edit Profile Error", + "message": "Cannot edit profile. Please try again." + }, + "sign_out": { + "title": "Sign Out", + "message": "Are you sure you want to sign out?", + "confirm": "Sign Out" + }, + "block_domain": { + "title": "Are you really, really sure you want to block the entire %s? In most cases a few targeted blocks or mutes are sufficient and preferable. You will not see content from that domain and any of your followers from that domain will be removed.", + "block_entire_domain": "Block Domain" + }, + "save_photo_failure": { + "title": "Save Photo Failure", + "message": "Please enable the photo library access permission to save the photo." + }, + "delete_post": { + "title": "Delete Post", + "message": "Are you sure you want to delete this post?" + }, + "clean_cache": { + "title": "Clean Cache", + "message": "Successfully cleaned %s cache." + } + }, + "controls": { + "actions": { + "back": "Back", + "next": "Next", + "previous": "Previous", + "open": "Open", + "add": "Add", + "remove": "Remove", + "edit": "Edit", + "save": "Save", + "ok": "OK", + "done": "Done", + "confirm": "Confirm", + "continue": "Continue", + "compose": "Compose", + "cancel": "Cancel", + "discard": "Discard", + "try_again": "Try Again", + "take_photo": "Take Photo", + "save_photo": "Save Photo", + "copy_photo": "Copy Photo", + "sign_in": "Sign In", + "sign_up": "Sign Up", + "see_more": "See More", + "preview": "Preview", + "share": "Share", + "share_user": "Share %s", + "share_post": "Share Post", + "open_in_safari": "Open in Safari", + "open_in_browser": "Open in Browser", + "find_people": "Find people to follow", + "manually_search": "Manually search instead", + "skip": "Skip", + "reply": "Reply", + "report_user": "Report %s", + "block_domain": "Block %s", + "unblock_domain": "Unblock %s", + "settings": "Settings", + "delete": "Delete" + }, + "tabs": { + "home": "Home", + "search": "Search", + "notification": "Notification", + "profile": "Profile" + }, + "keyboard": { + "common": { + "switch_to_tab": "Switch to %s", + "compose_new_post": "Compose New Post", + "show_favorites": "Show Favorites", + "open_settings": "Open Settings" + }, + "timeline": { + "previous_status": "Previous Post", + "next_status": "Next Post", + "open_status": "Open Post", + "open_author_profile": "Open Author's Profile", + "open_reblogger_profile": "Open Reblogger's Profile", + "reply_status": "Reply to Post", + "toggle_reblog": "Toggle Reblog on Post", + "toggle_favorite": "Toggle Favorite on Post", + "toggle_content_warning": "Toggle Content Warning", + "preview_image": "Preview Image" + }, + "segmented_control": { + "previous_section": "Previous Section", + "next_section": "Next Section" + } + }, + "status": { + "user_reblogged": "%s reblogged", + "user_replied_to": "Replied to %s", + "show_post": "Show Post", + "show_user_profile": "Show user profile", + "content_warning": "Content Warning", + "sensitive_content": "Sensitive Content", + "media_content_warning": "Tap anywhere to reveal", + "tap_to_reveal": "Tap to reveal", + "poll": { + "vote": "Vote", + "closed": "Closed" + }, + "actions": { + "reply": "Reply", + "reblog": "Reblog", + "unreblog": "Undo reblog", + "favorite": "Favorite", + "unfavorite": "Unfavorite", + "menu": "Menu", + "hide": "Hide", + "show_image": "Show image", + "show_gif": "Show GIF", + "show_video_player": "Show video player", + "tap_then_hold_to_show_menu": "Tap then hold to show menu" + }, + "tag": { + "url": "URL", + "mention": "Mention", + "link": "Link", + "hashtag": "Hashtag", + "email": "Email", + "emoji": "Emoji" + }, + "visibility": { + "unlisted": "Everyone can see this post but not display in the public timeline.", + "private": "Only their followers can see this post.", + "private_from_me": "Only my followers can see this post.", + "direct": "Only mentioned user can see this post." + } + }, + "friendship": { + "follow": "Follow", + "following": "Following", + "request": "Request", + "pending": "Pending", + "block": "Block", + "block_user": "Block %s", + "block_domain": "Block %s", + "unblock": "Unblock", + "unblock_user": "Unblock %s", + "blocked": "Blocked", + "mute": "Mute", + "mute_user": "Mute %s", + "unmute": "Unmute", + "unmute_user": "Unmute %s", + "muted": "Muted", + "edit_info": "Edit Info", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" + }, + "timeline": { + "filtered": "Filtered", + "timestamp": { + "now": "Now" + }, + "loader": { + "load_missing_posts": "Load missing posts", + "loading_missing_posts": "Loading missing posts...", + "show_more_replies": "Show more replies" + }, + "header": { + "no_status_found": "No Post Found", + "blocking_warning": "You can’t view this user's profile\nuntil you unblock them.\nYour profile looks like this to them.", + "user_blocking_warning": "You can’t view %s’s profile\nuntil you unblock them.\nYour profile looks like this to them.", + "blocked_warning": "You can’t view this user’s profile\nuntil they unblock you.", + "user_blocked_warning": "You can’t view %s’s profile\nuntil they unblock you.", + "suspended_warning": "This user has been suspended.", + "user_suspended_warning": "%s’s account has been suspended." + } + } + } + }, + "scene": { + "welcome": { + "slogan": "Social networking\nback in your hands.", + "get_started": "Get Started", + "log_in": "Log In" + }, + "server_picker": { + "title": "Mastodon is made of users in different servers.", + "subtitle": "Pick a server based on your interests, region, or a general purpose one.", + "subtitle_extend": "Pick a server based on your interests, region, or a general purpose one. Each server is operated by an entirely independent organization or individual.", + "button": { + "category": { + "all": "All", + "all_accessiblity_description": "Category: All", + "academia": "academia", + "activism": "activism", + "food": "food", + "furry": "furry", + "games": "games", + "general": "general", + "journalism": "journalism", + "lgbt": "lgbt", + "regional": "regional", + "art": "art", + "music": "music", + "tech": "tech" + }, + "see_less": "See Less", + "see_more": "See More" + }, + "label": { + "language": "LANGUAGE", + "users": "USERS", + "category": "CATEGORY" + }, + "input": { + "placeholder": "Search servers", + "search_servers_or_enter_url": "Search servers or enter URL" + }, + "empty_state": { + "finding_servers": "Finding available servers...", + "bad_network": "Something went wrong while loading the data. Check your internet connection.", + "no_results": "No results" + } + }, + "register": { + "title": "Let’s get you set up on %s", + "lets_get_you_set_up_on_domain": "Let’s get you set up on %s", + "input": { + "avatar": { + "delete": "Delete" + }, + "username": { + "placeholder": "username", + "duplicate_prompt": "This username is taken." + }, + "display_name": { + "placeholder": "display name" + }, + "email": { + "placeholder": "email" + }, + "password": { + "placeholder": "password", + "require": "Your password needs at least:", + "character_limit": "8 characters", + "accessibility": { + "checked": "checked", + "unchecked": "unchecked" + }, + "hint": "Your password needs at least eight characters" + }, + "invite": { + "registration_user_invite_request": "Why do you want to join?" + } + }, + "error": { + "item": { + "username": "Username", + "email": "Email", + "password": "Password", + "agreement": "Agreement", + "locale": "Locale", + "reason": "Reason" + }, + "reason": { + "blocked": "%s contains a disallowed email provider", + "unreachable": "%s does not seem to exist", + "taken": "%s is already in use", + "reserved": "%s is a reserved keyword", + "accepted": "%s must be accepted", + "blank": "%s is required", + "invalid": "%s is invalid", + "too_long": "%s is too long", + "too_short": "%s is too short", + "inclusion": "%s is not a supported value" + }, + "special": { + "username_invalid": "Username must only contain alphanumeric characters and underscores", + "username_too_long": "Username is too long (can’t be longer than 30 characters)", + "email_invalid": "This is not a valid email address", + "password_too_short": "Password is too short (must be at least 8 characters)" + } + } + }, + "server_rules": { + "title": "Some ground rules.", + "subtitle": "These are set and enforced by the %s moderators.", + "prompt": "By continuing, you’re subject to the terms of service and privacy policy for %s.", + "terms_of_service": "terms of service", + "privacy_policy": "privacy policy", + "button": { + "confirm": "I Agree" + } + }, + "confirm_email": { + "title": "One last thing.", + "subtitle": "Tap the link we emailed to you to verify your account.", + "tap_the_link_we_emailed_to_you_to_verify_your_account": "Tap the link we emailed to you to verify your account", + "button": { + "open_email_app": "Open Email App", + "resend": "Resend" + }, + "dont_receive_email": { + "title": "Check your email", + "description": "Check if your email address is correct as well as your junk folder if you haven’t.", + "resend_email": "Resend Email" + }, + "open_email_app": { + "title": "Check your inbox.", + "description": "We just sent you an email. Check your junk folder if you haven’t.", + "mail": "Mail", + "open_email_client": "Open Email Client" + } + }, + "home_timeline": { + "title": "Home", + "navigation_bar_state": { + "offline": "Offline", + "new_posts": "See new posts", + "published": "Published!", + "Publishing": "Publishing post...", + "accessibility": { + "logo_label": "Logo Button", + "logo_hint": "Tap to scroll to top and tap again to previous location" + } + } + }, + "suggestion_account": { + "title": "Find People to Follow", + "follow_explain": "When you follow someone, you’ll see their posts in your home feed." + }, + "compose": { + "title": { + "new_post": "New Post", + "new_reply": "New Reply" + }, + "media_selection": { + "camera": "Take Photo", + "photo_library": "Photo Library", + "browse": "Browse" + }, + "content_input_placeholder": "Type or paste what’s on your mind", + "compose_action": "Publish", + "replying_to_user": "replying to %s", + "attachment": { + "photo": "photo", + "video": "video", + "attachment_broken": "This %s is broken and can’t be\nuploaded to Mastodon.", + "description_photo": "Describe the photo for the visually-impaired...", + "description_video": "Describe the video for the visually-impaired..." + }, + "poll": { + "duration_time": "Duration: %s", + "thirty_minutes": "30 minutes", + "one_hour": "1 Hour", + "six_hours": "6 Hours", + "one_day": "1 Day", + "three_days": "3 Days", + "seven_days": "7 Days", + "option_number": "Option %ld" + }, + "content_warning": { + "placeholder": "Write an accurate warning here..." + }, + "visibility": { + "public": "Public", + "unlisted": "Unlisted", + "private": "Followers only", + "direct": "Only people I mention" + }, + "auto_complete": { + "space_to_add": "Space to add" + }, + "accessibility": { + "append_attachment": "Add Attachment", + "append_poll": "Add Poll", + "remove_poll": "Remove Poll", + "custom_emoji_picker": "Custom Emoji Picker", + "enable_content_warning": "Enable Content Warning", + "disable_content_warning": "Disable Content Warning", + "post_visibility_menu": "Post Visibility Menu" + }, + "keyboard": { + "discard_post": "Discard Post", + "publish_post": "Publish Post", + "toggle_poll": "Toggle Poll", + "toggle_content_warning": "Toggle Content Warning", + "append_attachment_entry": "Add Attachment - %s", + "select_visibility_entry": "Select Visibility - %s" + } + }, + "profile": { + "header": { + "follows_you": "Follows You" + }, + "dashboard": { + "posts": "posts", + "following": "following", + "followers": "followers" + }, + "fields": { + "add_row": "Add Row", + "placeholder": { + "label": "Label", + "content": "Content" + } + }, + "segmented_control": { + "posts": "Posts", + "replies": "Replies", + "posts_and_replies": "Posts and Replies", + "media": "Media", + "about": "About" + }, + "relationship_action_alert": { + "confirm_mute_user": { + "title": "Mute Account", + "message": "Confirm to mute %s" + }, + "confirm_unmute_user": { + "title": "Unmute Account", + "message": "Confirm to unmute %s" + }, + "confirm_block_user": { + "title": "Block Account", + "message": "Confirm to block %s" + }, + "confirm_unblock_user": { + "title": "Unblock Account", + "message": "Confirm to unblock %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" + } + }, + "accessibility": { + "show_avatar_image": "Show avatar image", + "edit_avatar_image": "Edit avatar image", + "show_banner_image": "Show banner image", + "double_tap_to_open_the_list": "Double tap to open the list" + } + }, + "follower": { + "title": "follower", + "footer": "Followers from other servers are not displayed." + }, + "following": { + "title": "following", + "footer": "Follows from other servers are not displayed." + }, + "familiarFollowers": { + "title": "Followers you familiar", + "followed_by_names": "Followed by %s" + }, + "favorited_by": { + "title": "Favorited By" + }, + "reblogged_by": { + "title": "Reblogged By" + }, + "search": { + "title": "Search", + "search_bar": { + "placeholder": "Search hashtags and users", + "cancel": "Cancel" + }, + "recommend": { + "button_text": "See All", + "hash_tag": { + "title": "Trending on Mastodon", + "description": "Hashtags that are getting quite a bit of attention", + "people_talking": "%s people are talking" + }, + "accounts": { + "title": "Accounts you might like", + "description": "You may like to follow these accounts", + "follow": "Follow" + } + }, + "searching": { + "segment": { + "all": "All", + "people": "People", + "hashtags": "Hashtags", + "posts": "Posts" + }, + "empty_state": { + "no_results": "No results" + }, + "recent_search": "Recent searches", + "clear": "Clear" + } + }, + "discovery": { + "tabs": { + "posts": "Posts", + "hashtags": "Hashtags", + "news": "News", + "community": "Community", + "for_you": "For You" + }, + "intro": "These are the posts gaining traction in your corner of Mastodon." + }, + "favorite": { + "title": "Your Favorites" + }, + "notification": { + "title": { + "Everything": "Everything", + "Mentions": "Mentions" + }, + "notification_description": { + "followed_you": "followed you", + "favorited_your_post": "favorited your post", + "reblogged_your_post": "reblogged your post", + "mentioned_you": "mentioned you", + "request_to_follow_you": "request to follow you", + "poll_has_ended": "poll has ended" + }, + "keyobard": { + "show_everything": "Show Everything", + "show_mentions": "Show Mentions" + }, + "follow_request": { + "accept": "Accept", + "accepted": "Accepted", + "reject": "reject", + "rejected": "Rejected" + } + }, + "thread": { + "back_title": "Post", + "title": "Post from %s" + }, + "settings": { + "title": "Settings", + "section": { + "appearance": { + "title": "Appearance", + "automatic": "Automatic", + "light": "Always Light", + "dark": "Always Dark" + }, + "look_and_feel": { + "title": "Look and Feel", + "use_system": "Use System", + "really_dark": "Really Dark", + "sorta_dark": "Sorta Dark", + "light": "Light" + }, + "notifications": { + "title": "Notifications", + "favorites": "Favorites my post", + "follows": "Follows me", + "boosts": "Reblogs my post", + "mentions": "Mentions me", + "trigger": { + "anyone": "anyone", + "follower": "a follower", + "follow": "anyone I follow", + "noone": "no one", + "title": "Notify me when" + } + }, + "preference": { + "title": "Preferences", + "true_black_dark_mode": "True black dark mode", + "disable_avatar_animation": "Disable animated avatars", + "disable_emoji_animation": "Disable animated emojis", + "using_default_browser": "Use default browser to open links", + "open_links_in_mastodon": "Open links in Mastodon" + }, + "boring_zone": { + "title": "The Boring Zone", + "account_settings": "Account Settings", + "terms": "Terms of Service", + "privacy": "Privacy Policy" + }, + "spicy_zone": { + "title": "The Spicy Zone", + "clear": "Clear Media Cache", + "signout": "Sign Out" + } + }, + "footer": { + "mastodon_description": "Mastodon is open source software. You can report issues on GitHub at %s (%s)" + }, + "keyboard": { + "close_settings_window": "Close Settings Window" + } + }, + "report": { + "title_report": "Report", + "title": "Report %s", + "step1": "Step 1 of 2", + "step2": "Step 2 of 2", + "content1": "Are there any other posts you’d like to add to the report?", + "content2": "Is there anything the moderators should know about this report?", + "report_sent_title": "Thanks for reporting, we’ll look into this.", + "send": "Send Report", + "skip_to_send": "Send without comment", + "text_placeholder": "Type or paste additional comments", + "reported": "REPORTED", + "step_one": { + "step_1_of_4": "Step 1 of 4", + "whats_wrong_with_this_post": "What's wrong with this post?", + "whats_wrong_with_this_account": "What's wrong with this account?", + "whats_wrong_with_this_username": "What's wrong with %s?", + "select_the_best_match": "Select the best match", + "i_dont_like_it": "I don’t like it", + "it_is_not_something_you_want_to_see": "It is not something you want to see", + "its_spam": "It’s spam", + "malicious_links_fake_engagement_or_repetetive_replies": "Malicious links, fake engagement, or repetetive replies", + "it_violates_server_rules": "It violates server rules", + "you_are_aware_that_it_breaks_specific_rules": "You are aware that it breaks specific rules", + "its_something_else": "It’s something else", + "the_issue_does_not_fit_into_other_categories": "The issue does not fit into other categories" + }, + "step_two": { + "step_2_of_4": "Step 2 of 4", + "which_rules_are_being_violated": "Which rules are being violated?", + "select_all_that_apply": "Select all that apply", + "i_just_don’t_like_it": "I just don’t like it" + }, + "step_three": { + "step_3_of_4": "Step 3 of 4", + "are_there_any_posts_that_back_up_this_report": "Are there any posts that back up this report?", + "select_all_that_apply": "Select all that apply" + }, + "step_four": { + "step_4_of_4": "Step 4 of 4", + "is_there_anything_else_we_should_know": "Is there anything else we should know?" + }, + "step_final": { + "dont_want_to_see_this": "Don’t want to see this?", + "when_you_see_something_you_dont_like_on_mastodon_you_can_remove_the_person_from_your_experience.": "When you see something you don’t like on Mastodon, you can remove the person from your experience.", + "unfollow": "Unfollow", + "unfollowed": "Unfollowed", + "unfollow_user": "Unfollow %s", + "mute_user": "Mute %s", + "you_wont_see_their_posts_or_reblogs_in_your_home_feed_they_wont_know_they_ve_been_muted": "You won’t see their posts or reblogs in your home feed. They won’t know they’ve been muted.", + "block_user": "Block %s", + "they_will_no_longer_be_able_to_follow_or_see_your_posts_but_they_can_see_if_theyve_been_blocked": "They will no longer be able to follow or see your posts, but they can see if they’ve been blocked.", + "while_we_review_this_you_can_take_action_against_user": "While we review this, you can take action against %s" + } + }, + "preview": { + "keyboard": { + "close_preview": "Close Preview", + "show_next": "Show Next", + "show_previous": "Show Previous" + } + }, + "account_list": { + "tab_bar_hint": "Current selected profile: %s. Double tap then hold to show account switcher", + "dismiss_account_switcher": "Dismiss Account Switcher", + "add_account": "Add Account" + }, + "wizard": { + "new_in_mastodon": "New in Mastodon", + "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", + "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" + } + } +} diff --git a/Localization/StringsConvertor/input/uk.lproj/ios-infoPlist.json b/Localization/StringsConvertor/input/uk.lproj/ios-infoPlist.json new file mode 100644 index 000000000..c6db73de0 --- /dev/null +++ b/Localization/StringsConvertor/input/uk.lproj/ios-infoPlist.json @@ -0,0 +1,6 @@ +{ + "NSCameraUsageDescription": "Used to take photo for post status", + "NSPhotoLibraryAddUsageDescription": "Used to save photo into the Photo Library", + "NewPostShortcutItemTitle": "New Post", + "SearchShortcutItemTitle": "Search" +} diff --git a/Localization/StringsConvertor/input/vi.lproj/app.json b/Localization/StringsConvertor/input/vi.lproj/app.json index 5d6df6910..b857399b3 100644 --- a/Localization/StringsConvertor/input/vi.lproj/app.json +++ b/Localization/StringsConvertor/input/vi.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "Bỏ ẩn", "unmute_user": "Bỏ ẩn %s", "muted": "Đã ẩn", - "edit_info": "Chỉnh sửa" + "edit_info": "Chỉnh sửa", + "show_reblogs": "Hiện đăng lại", + "hide_reblogs": "Ẩn đăng lại" }, "timeline": { "filtered": "Bộ lọc", @@ -198,7 +200,7 @@ "user_blocking_warning": "Bạn không thể xem trang %s\ncho tới khi bạn bỏ chặn họ.\nHọ sẽ thấy trang của bạn như thế này.", "blocked_warning": "Bạn không thể xem trang người này\ncho tới khi họ bỏ chặn bạn.", "user_blocked_warning": "Bạn không thể xem trang %s\ncho tới khi họ bỏ chặn bạn.", - "suspended_warning": "Người dùng đã bị vô hiệu hóa.", + "suspended_warning": "Người này đã bị vô hiệu hóa.", "user_suspended_warning": "%s đã bị vô hiệu hóa." } } @@ -236,7 +238,7 @@ }, "label": { "language": "NGÔN NGỮ", - "users": "NGƯỜI DÙNG", + "users": "NGƯỜI", "category": "PHÂN LOẠI" }, "input": { @@ -261,7 +263,7 @@ "duplicate_prompt": "Tên người dùng đã tồn tại." }, "display_name": { - "placeholder": "tên hiển thị" + "placeholder": "biệt danh" }, "email": { "placeholder": "email" @@ -392,7 +394,7 @@ "visibility": { "public": "Công khai", "unlisted": "Hạn chế", - "private": "Riêng tư", + "private": "Chỉ người theo dõi", "direct": "Nhắn riêng" }, "auto_complete": { @@ -441,20 +443,28 @@ }, "relationship_action_alert": { "confirm_mute_user": { - "title": "Ẩn người dùng", + "title": "Ẩn người này", "message": "Xác nhận ẩn %s" }, "confirm_unmute_user": { - "title": "Bỏ ẩn người dùng", + "title": "Bỏ ẩn người này", "message": "Xác nhận bỏ ẩn %s" }, "confirm_block_user": { - "title": "Chặn người dùng", + "title": "Chặn người này", "message": "Xác nhận chặn %s" }, "confirm_unblock_user": { - "title": "Bỏ chặn người dùng", + "title": "Bỏ chặn người này", "message": "Xác nhận bỏ chặn %s" + }, + "confirm_show_reblogs": { + "title": "Hiện đăng lại", + "message": "Xác nhận hiện đăng lại" + }, + "confirm_hide_reblogs": { + "title": "Ẩn đăng lại", + "message": "Xác nhận ẩn đăng lại" } }, "accessibility": { @@ -485,13 +495,13 @@ "search": { "title": "Tìm kiếm", "search_bar": { - "placeholder": "Tìm hashtag và người dùng", + "placeholder": "Tìm hashtag và mọi người", "cancel": "Hủy bỏ" }, "recommend": { "button_text": "Xem tất cả", "hash_tag": { - "title": "Xu hướng trên Mastodon", + "title": "Nổi bật trên Mastodon", "description": "Những hashtag đang được sử dụng nhiều nhất", "people_talking": "%s người đang thảo luận" }, @@ -504,7 +514,7 @@ "searching": { "segment": { "all": "Tất cả", - "people": "Người dùng", + "people": "Mọi người", "hashtags": "Hashtag", "posts": "Tút" }, @@ -684,6 +694,9 @@ "new_in_mastodon": "Mới trên Mastodon", "multiple_account_switch_intro_description": "Chuyển đổi giữa nhiều tài khoản bằng cách đè giữ nút tài khoản.", "accessibility_hint": "Nhấn hai lần để bỏ qua" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/zh-Hans.lproj/app.json b/Localization/StringsConvertor/input/zh-Hans.lproj/app.json index 90dbfc60e..7f3703b8a 100644 --- a/Localization/StringsConvertor/input/zh-Hans.lproj/app.json +++ b/Localization/StringsConvertor/input/zh-Hans.lproj/app.json @@ -180,7 +180,9 @@ "unmute": "取消静音", "unmute_user": "取消静音 %s", "muted": "已静音", - "edit_info": "编辑" + "edit_info": "编辑", + "show_reblogs": "Show Reblogs", + "hide_reblogs": "Hide Reblogs" }, "timeline": { "filtered": "已过滤", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "解除屏蔽帐户", "message": "确认取消屏蔽 %s" + }, + "confirm_show_reblogs": { + "title": "Show Reblogs", + "message": "Confirm to show reblogs" + }, + "confirm_hide_reblogs": { + "title": "Hide Reblogs", + "message": "Confirm to hide reblogs" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "新功能", "multiple_account_switch_intro_description": "按住个人资料标签按钮,即可在多个账户之间进行切换。", "accessibility_hint": "双击关闭此向导" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/StringsConvertor/input/zh-Hant.lproj/app.json b/Localization/StringsConvertor/input/zh-Hant.lproj/app.json index b146a2942..ae497109e 100644 --- a/Localization/StringsConvertor/input/zh-Hant.lproj/app.json +++ b/Localization/StringsConvertor/input/zh-Hant.lproj/app.json @@ -37,7 +37,7 @@ "confirm": "登出" }, "block_domain": { - "title": "真的非常確定封鎖整個 %s 網域嗎?大部分情況下,您只需要封鎖或靜音少數特定的帳帳戶能滿足需求了。您將不能看到來自此網域的內容。您來自該網域的跟隨者也將被移除。", + "title": "真的非常確定要封鎖整個 %s 網域嗎?大部分情況下,您只需要封鎖或靜音少數特定的帳號能滿足需求了。您將不能看到來自此網域的內容。您來自該網域的跟隨者也將被移除。", "block_entire_domain": "封鎖網域" }, "save_photo_failure": { @@ -180,7 +180,9 @@ "unmute": "取消靜音", "unmute_user": "取消靜音 %s", "muted": "已靜音", - "edit_info": "編輯" + "edit_info": "編輯", + "show_reblogs": "顯示轉嘟", + "hide_reblogs": "隱藏轉嘟" }, "timeline": { "filtered": "已過濾", @@ -455,6 +457,14 @@ "confirm_unblock_user": { "title": "取消封鎖", "message": "確認將 %s 取消封鎖" + }, + "confirm_show_reblogs": { + "title": "顯示轉嘟", + "message": "確認顯示轉嘟" + }, + "confirm_hide_reblogs": { + "title": "隱藏轉嘟", + "message": "確認隱藏轉嘟" } }, "accessibility": { @@ -684,6 +694,9 @@ "new_in_mastodon": "Mastodon 新功能", "multiple_account_switch_intro_description": "按住個人檔案按鈕以於多個帳號間切換。", "accessibility_hint": "點兩下以關閉此設定精靈" + }, + "bookmark": { + "title": "Bookmarks" } } -} \ No newline at end of file +} diff --git a/Localization/app.json b/Localization/app.json index c6fe2b980..25f06ad83 100644 --- a/Localization/app.json +++ b/Localization/app.json @@ -136,6 +136,12 @@ "vote": "Vote", "closed": "Closed" }, + "meta_entity": { + "url": "Link: %s", + "hashtag": "Hashtag: %s", + "mention": "Show Profile: %s", + "email": "Email address: %s" + }, "actions": { "reply": "Reply", "reblog": "Reblog", @@ -376,7 +382,11 @@ "video": "video", "attachment_broken": "This %s is broken and can’t be\nuploaded to Mastodon.", "description_photo": "Describe the photo for the visually-impaired...", - "description_video": "Describe the video for the visually-impaired..." + "description_video": "Describe the video for the visually-impaired...", + "load_failed": "Load Failed", + "upload_failed": "Upload Failed", + "can_not_recognize_this_media_attachment": "Can not regonize this media attachment", + "attachment_too_large": "Attachment too large" }, "poll": { "duration_time": "Duration: %s", @@ -696,6 +706,9 @@ "new_in_mastodon": "New in Mastodon", "multiple_account_switch_intro_description": "Switch between multiple accounts by holding the profile button.", "accessibility_hint": "Double tap to dismiss this wizard" + }, + "bookmark": { + "title": "Bookmarks" } } } diff --git a/Mastodon.xcodeproj/project.pbxproj b/Mastodon.xcodeproj/project.pbxproj index 380f21eac..434926d94 100644 --- a/Mastodon.xcodeproj/project.pbxproj +++ b/Mastodon.xcodeproj/project.pbxproj @@ -151,7 +151,6 @@ DB1FD44425F26CCC004CFCFC /* PickServerSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB1FD44325F26CCC004CFCFC /* PickServerSection.swift */; }; DB1FD45025F26FA1004CFCFC /* MastodonPickServerViewModel+Diffable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB1FD44F25F26FA1004CFCFC /* MastodonPickServerViewModel+Diffable.swift */; }; DB1FD45A25F27898004CFCFC /* CategoryPickerItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB1FD45925F27898004CFCFC /* CategoryPickerItem.swift */; }; - DB221B16260C395900AEFE46 /* CustomEmojiPickerInputViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB221B15260C395900AEFE46 /* CustomEmojiPickerInputViewModel.swift */; }; DB22C92228E700A10082A9E9 /* MastodonSDK in Frameworks */ = {isa = PBXBuildFile; productRef = DB22C92128E700A10082A9E9 /* MastodonSDK */; }; DB22C92428E700A80082A9E9 /* MastodonSDK in Frameworks */ = {isa = PBXBuildFile; productRef = DB22C92328E700A80082A9E9 /* MastodonSDK */; }; DB22C92628E700AF0082A9E9 /* MastodonSDK in Frameworks */ = {isa = PBXBuildFile; productRef = DB22C92528E700AF0082A9E9 /* MastodonSDK */; }; @@ -185,9 +184,6 @@ DB427DED25BAA00100D1B89D /* MastodonTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB427DEC25BAA00100D1B89D /* MastodonTests.swift */; }; DB427DF825BAA00100D1B89D /* MastodonUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB427DF725BAA00100D1B89D /* MastodonUITests.swift */; }; DB443CD42694627B00159B29 /* AppearanceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB443CD32694627B00159B29 /* AppearanceView.swift */; }; - DB44767B260B3B8C00B66B82 /* CustomEmojiPickerInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB44767A260B3B8C00B66B82 /* CustomEmojiPickerInputView.swift */; }; - DB447691260B406600B66B82 /* CustomEmojiPickerItemCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB447690260B406600B66B82 /* CustomEmojiPickerItemCollectionViewCell.swift */; }; - DB447697260B439000B66B82 /* CustomEmojiPickerHeaderCollectionReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB447696260B439000B66B82 /* CustomEmojiPickerHeaderCollectionReusableView.swift */; }; DB4481B925EE289600BEFB67 /* UITableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB4481B825EE289600BEFB67 /* UITableView.swift */; }; DB45FAB625CA5485005A8AC7 /* UIAlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB45FAB525CA5485005A8AC7 /* UIAlertController.swift */; }; DB45FAD725CA6C76005A8AC7 /* UIBarButtonItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB45FAD625CA6C76005A8AC7 /* UIBarButtonItem.swift */; }; @@ -257,7 +253,6 @@ DB64BA452851F23000ADF1B7 /* MastodonAuthentication+Fetch.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB64BA442851F23000ADF1B7 /* MastodonAuthentication+Fetch.swift */; }; DB64BA482851F29300ADF1B7 /* Account+Fetch.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB64BA472851F29300ADF1B7 /* Account+Fetch.swift */; }; DB65C63727A2AF6C008BAC2E /* ReportItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB65C63627A2AF6C008BAC2E /* ReportItem.swift */; }; - DB66728C25F9F8DC00D60309 /* ComposeViewModel+DataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB66728B25F9F8DC00D60309 /* ComposeViewModel+DataSource.swift */; }; DB6746EB278ED8B0008A6B94 /* PollOptionView+Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB6746EA278ED8B0008A6B94 /* PollOptionView+Configuration.swift */; }; DB6746ED278F45F0008A6B94 /* AutoGenerateProtocolRelayDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB6746EC278F45F0008A6B94 /* AutoGenerateProtocolRelayDelegate.swift */; }; DB6746F0278F463B008A6B94 /* AutoGenerateProtocolDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB6746EF278F463B008A6B94 /* AutoGenerateProtocolDelegate.swift */; }; @@ -337,7 +332,6 @@ DB98EB6927B21A7C0082E365 /* ReportResultActionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB98EB6827B21A7C0082E365 /* ReportResultActionTableViewCell.swift */; }; DB98EB6B27B243470082E365 /* SettingsAppearanceTableViewCell+ViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB98EB6A27B243470082E365 /* SettingsAppearanceTableViewCell+ViewModel.swift */; }; DB9A486C26032AC1008B817C /* AttachmentContainerView+EmptyStateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB9A486B26032AC1008B817C /* AttachmentContainerView+EmptyStateView.swift */; }; - DB9A488A26034D40008B817C /* ComposeViewModel+PublishState.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB9A488926034D40008B817C /* ComposeViewModel+PublishState.swift */; }; DB9D6BE925E4F5340051B173 /* SearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB9D6BE825E4F5340051B173 /* SearchViewController.swift */; }; DB9D6BF825E4F5690051B173 /* NotificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB9D6BF725E4F5690051B173 /* NotificationViewController.swift */; }; DB9D6BFF25E4F5940051B173 /* ProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB9D6BFE25E4F5940051B173 /* ProfileViewController.swift */; }; @@ -376,12 +370,11 @@ DBB8AB4626AECDE200F6D281 /* SendPostIntentHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBB8AB4526AECDE200F6D281 /* SendPostIntentHandler.swift */; }; DBB8AB4F26AED13F00F6D281 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DB427DDE25BAA00100D1B89D /* Assets.xcassets */; }; DBB9759C262462E1004620BD /* ThreadMetaView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBB9759B262462E1004620BD /* ThreadMetaView.swift */; }; - DBBC24DC26A54BCB00398BB9 /* MastodonRegex.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBBC24D626A54BCB00398BB9 /* MastodonRegex.swift */; }; DBBE1B4525F3474B0081417A /* MastodonPickServerAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBBE1B4425F3474B0081417A /* MastodonPickServerAppearance.swift */; }; - DBC6461526A170AB00B0E31B /* ComposeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBC6461426A170AB00B0E31B /* ComposeViewController.swift */; }; + DBC3872429214121001EC0FD /* ShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBC3872329214121001EC0FD /* ShareViewController.swift */; }; DBC6461826A170AB00B0E31B /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DBC6461626A170AB00B0E31B /* MainInterface.storyboard */; }; DBC6461C26A170AB00B0E31B /* ShareActionExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = DBC6461226A170AB00B0E31B /* ShareActionExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - DBC6462326A1712000B0E31B /* ComposeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBC6462226A1712000B0E31B /* ComposeViewModel.swift */; }; + DBC6462326A1712000B0E31B /* ShareViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBC6462226A1712000B0E31B /* ShareViewModel.swift */; }; DBC6462826A1736300B0E31B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DB427DDE25BAA00100D1B89D /* Assets.xcassets */; }; DBC7A672260C897100E57475 /* StatusContentWarningEditorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBC7A671260C897100E57475 /* StatusContentWarningEditorView.swift */; }; DBCA0EBC282BB38A0029E2B0 /* PageboyNavigateable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DBCA0EBB282BB38A0029E2B0 /* PageboyNavigateable.swift */; }; @@ -681,7 +674,6 @@ DB1FD44F25F26FA1004CFCFC /* MastodonPickServerViewModel+Diffable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MastodonPickServerViewModel+Diffable.swift"; sourceTree = ""; }; DB1FD45925F27898004CFCFC /* CategoryPickerItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategoryPickerItem.swift; sourceTree = ""; }; DB1FD45F25F278AF004CFCFC /* CategoryPickerSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CategoryPickerSection.swift; sourceTree = ""; }; - DB221B15260C395900AEFE46 /* CustomEmojiPickerInputViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomEmojiPickerInputViewModel.swift; sourceTree = ""; }; DB2B3ABD25E37E15007045F9 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; DB2F073325E8ECF000957B2D /* AuthenticationViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthenticationViewModel.swift; sourceTree = ""; }; DB2FF50F260B113300ADA9FE /* ComposeStatusPollExpiresOptionCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposeStatusPollExpiresOptionCollectionViewCell.swift; sourceTree = ""; }; @@ -718,9 +710,6 @@ DB427DF725BAA00100D1B89D /* MastodonUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MastodonUITests.swift; sourceTree = ""; }; DB427DF925BAA00100D1B89D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DB443CD32694627B00159B29 /* AppearanceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppearanceView.swift; sourceTree = ""; }; - DB44767A260B3B8C00B66B82 /* CustomEmojiPickerInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomEmojiPickerInputView.swift; sourceTree = ""; }; - DB447690260B406600B66B82 /* CustomEmojiPickerItemCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomEmojiPickerItemCollectionViewCell.swift; sourceTree = ""; }; - DB447696260B439000B66B82 /* CustomEmojiPickerHeaderCollectionReusableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomEmojiPickerHeaderCollectionReusableView.swift; sourceTree = ""; }; DB4481B825EE289600BEFB67 /* UITableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UITableView.swift; sourceTree = ""; }; DB45FAB525CA5485005A8AC7 /* UIAlertController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIAlertController.swift; sourceTree = ""; }; DB45FAD625CA6C76005A8AC7 /* UIBarButtonItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIBarButtonItem.swift; sourceTree = ""; }; @@ -820,7 +809,6 @@ DB64BA442851F23000ADF1B7 /* MastodonAuthentication+Fetch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MastodonAuthentication+Fetch.swift"; sourceTree = ""; }; DB64BA472851F29300ADF1B7 /* Account+Fetch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Account+Fetch.swift"; sourceTree = ""; }; DB65C63627A2AF6C008BAC2E /* ReportItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportItem.swift; sourceTree = ""; }; - DB66728B25F9F8DC00D60309 /* ComposeViewModel+DataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ComposeViewModel+DataSource.swift"; sourceTree = ""; }; DB6746EA278ED8B0008A6B94 /* PollOptionView+Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PollOptionView+Configuration.swift"; sourceTree = ""; }; DB6746EC278F45F0008A6B94 /* AutoGenerateProtocolRelayDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoGenerateProtocolRelayDelegate.swift; sourceTree = ""; }; DB6746EF278F463B008A6B94 /* AutoGenerateProtocolDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoGenerateProtocolDelegate.swift; sourceTree = ""; }; @@ -912,7 +900,6 @@ DB98EB6827B21A7C0082E365 /* ReportResultActionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReportResultActionTableViewCell.swift; sourceTree = ""; }; DB98EB6A27B243470082E365 /* SettingsAppearanceTableViewCell+ViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SettingsAppearanceTableViewCell+ViewModel.swift"; sourceTree = ""; }; DB9A486B26032AC1008B817C /* AttachmentContainerView+EmptyStateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "AttachmentContainerView+EmptyStateView.swift"; sourceTree = ""; }; - DB9A488926034D40008B817C /* ComposeViewModel+PublishState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ComposeViewModel+PublishState.swift"; sourceTree = ""; }; DB9D6BE825E4F5340051B173 /* SearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchViewController.swift; sourceTree = ""; }; DB9D6BF725E4F5690051B173 /* NotificationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationViewController.swift; sourceTree = ""; }; DB9D6BFE25E4F5940051B173 /* ProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewController.swift; sourceTree = ""; }; @@ -961,14 +948,12 @@ DBB525632612C988002F1F29 /* MeProfileViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MeProfileViewModel.swift; sourceTree = ""; }; DBB8AB4526AECDE200F6D281 /* SendPostIntentHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendPostIntentHandler.swift; sourceTree = ""; }; DBB9759B262462E1004620BD /* ThreadMetaView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThreadMetaView.swift; sourceTree = ""; }; - DBBC24A726A52F9000398BB9 /* ComposeToolbarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposeToolbarView.swift; sourceTree = ""; }; - DBBC24D626A54BCB00398BB9 /* MastodonRegex.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MastodonRegex.swift; sourceTree = ""; }; DBBE1B4425F3474B0081417A /* MastodonPickServerAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MastodonPickServerAppearance.swift; sourceTree = ""; }; + DBC3872329214121001EC0FD /* ShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShareViewController.swift; sourceTree = ""; }; DBC6461226A170AB00B0E31B /* ShareActionExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ShareActionExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; - DBC6461426A170AB00B0E31B /* ComposeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposeViewController.swift; sourceTree = ""; }; DBC6461726A170AB00B0E31B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; DBC6461926A170AB00B0E31B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DBC6462226A1712000B0E31B /* ComposeViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComposeViewModel.swift; sourceTree = ""; }; + DBC6462226A1712000B0E31B /* ShareViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShareViewModel.swift; sourceTree = ""; }; DBC7A671260C897100E57475 /* StatusContentWarningEditorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusContentWarningEditorView.swift; sourceTree = ""; }; DBC9E3A3282E13BB0063A4D9 /* eu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = eu; path = eu.lproj/Intents.strings; sourceTree = ""; }; DBC9E3A4282E13BB0063A4D9 /* eu */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = eu; path = eu.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -1042,15 +1027,7 @@ DBFEEC98279BDCDE004F81DD /* ProfileAboutViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileAboutViewModel.swift; sourceTree = ""; }; DBFEEC9A279BDDD9004F81DD /* ProfileAboutViewModel+Diffable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ProfileAboutViewModel+Diffable.swift"; sourceTree = ""; }; DBFEEC9C279C12C1004F81DD /* ProfileFieldEditCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileFieldEditCollectionViewCell.swift; sourceTree = ""; }; - DBFEF05526A576EE006D7ED1 /* StatusEditorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusEditorView.swift; sourceTree = ""; }; - DBFEF05626A576EE006D7ED1 /* ComposeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposeView.swift; sourceTree = ""; }; - DBFEF05726A576EE006D7ED1 /* ComposeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposeViewModel.swift; sourceTree = ""; }; - DBFEF05826A576EE006D7ED1 /* ContentWarningEditorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentWarningEditorView.swift; sourceTree = ""; }; - DBFEF05926A576EE006D7ED1 /* StatusAuthorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusAuthorView.swift; sourceTree = ""; }; - DBFEF05A26A576EE006D7ED1 /* StatusAttachmentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusAttachmentView.swift; sourceTree = ""; }; - DBFEF06226A577F2006D7ED1 /* StatusAttachmentViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StatusAttachmentViewModel.swift; sourceTree = ""; }; DBFEF06726A58D07006D7ED1 /* ShareActionExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ShareActionExtension.entitlements; sourceTree = ""; }; - DBFEF06C26A67FB7006D7ED1 /* StatusAttachmentViewModel+UploadState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "StatusAttachmentViewModel+UploadState.swift"; sourceTree = ""; }; DDB1B139FA8EA26F510D58B6 /* Pods-AppShared.asdk - release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppShared.asdk - release.xcconfig"; path = "Target Support Files/Pods-AppShared/Pods-AppShared.asdk - release.xcconfig"; sourceTree = ""; }; DF65937EC1FF64462BC002EE /* Pods-MastodonTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MastodonTests.profile.xcconfig"; path = "Target Support Files/Pods-MastodonTests/Pods-MastodonTests.profile.xcconfig"; sourceTree = ""; }; E5C7236E58D14A0322FE00F2 /* Pods-Mastodon-MastodonUITests.asdk - debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Mastodon-MastodonUITests.asdk - debug.xcconfig"; path = "Target Support Files/Pods-Mastodon-MastodonUITests/Pods-Mastodon-MastodonUITests.asdk - debug.xcconfig"; sourceTree = ""; }; @@ -1342,7 +1319,7 @@ path = Protocol; sourceTree = ""; }; - 2D76319C25C151DE00929FB9 /* Diffiable */ = { + 2D76319C25C151DE00929FB9 /* Diffable */ = { isa = PBXGroup; children = ( DB4F097826A039B400D62E92 /* Onboarding */, @@ -1357,7 +1334,7 @@ DB3E6FE52806A5BA00B035AE /* Discovery */, DB0617FA27855B660030EE79 /* Settings */, ); - path = Diffiable; + path = Diffable; sourceTree = ""; }; 2D7631A425C1532200929FB9 /* Share */ = { @@ -1762,7 +1739,7 @@ children = ( DB89BA1025C10FF5008580ED /* Mastodon.entitlements */, DB427DE325BAA00100D1B89D /* Info.plist */, - 2D76319C25C151DE00929FB9 /* Diffiable */, + 2D76319C25C151DE00929FB9 /* Diffable */, DB8AF55525C1379F002E6C99 /* Scene */, DB8AF54125C13647002E6C99 /* Coordinator */, DB8AF56225C138BC002E6C99 /* Extension */, @@ -1878,8 +1855,6 @@ DBA0A11225FB3FC10079C110 /* ComposeToolbarView.swift */, DB8190C52601FF0400020C08 /* AttachmentContainerView.swift */, DB9A486B26032AC1008B817C /* AttachmentContainerView+EmptyStateView.swift */, - DB44767A260B3B8C00B66B82 /* CustomEmojiPickerInputView.swift */, - DB221B15260C395900AEFE46 /* CustomEmojiPickerInputViewModel.swift */, DBC7A671260C897100E57475 /* StatusContentWarningEditorView.swift */, ); path = View; @@ -2146,8 +2121,6 @@ DB789A2125F9F76D0071ACA0 /* CollectionViewCell */, DB789A0A25F9F2950071ACA0 /* ComposeViewController.swift */, DB789A1125F9F2CC0071ACA0 /* ComposeViewModel.swift */, - DB66728B25F9F8DC00D60309 /* ComposeViewModel+DataSource.swift */, - DB9A488926034D40008B817C /* ComposeViewModel+PublishState.swift */, ); path = Compose; sourceTree = ""; @@ -2159,8 +2132,6 @@ DB87D4442609BE0500D12C0D /* ComposeStatusPollOptionCollectionViewCell.swift */, DB87D4502609CF1E00D12C0D /* ComposeStatusPollOptionAppendEntryCollectionViewCell.swift */, DB2FF50F260B113300ADA9FE /* ComposeStatusPollExpiresOptionCollectionViewCell.swift */, - DB447690260B406600B66B82 /* CustomEmojiPickerItemCollectionViewCell.swift */, - DB447696260B439000B66B82 /* CustomEmojiPickerHeaderCollectionReusableView.swift */, ); path = CollectionViewCell; sourceTree = ""; @@ -2520,7 +2491,6 @@ DBBC24D526A54BCB00398BB9 /* Helper */ = { isa = PBXGroup; children = ( - DBBC24D626A54BCB00398BB9 /* MastodonRegex.swift */, DBF3B7402733EB9400E21627 /* MastodonLocalCode.swift */, ); path = Helper; @@ -2687,28 +2657,11 @@ path = Cell; sourceTree = ""; }; - DBFEF05426A576EE006D7ED1 /* View */ = { - isa = PBXGroup; - children = ( - DBBC24A726A52F9000398BB9 /* ComposeToolbarView.swift */, - DBFEF05526A576EE006D7ED1 /* StatusEditorView.swift */, - DBFEF05626A576EE006D7ED1 /* ComposeView.swift */, - DBFEF05726A576EE006D7ED1 /* ComposeViewModel.swift */, - DBFEF05826A576EE006D7ED1 /* ContentWarningEditorView.swift */, - DBFEF05926A576EE006D7ED1 /* StatusAuthorView.swift */, - DBFEF05A26A576EE006D7ED1 /* StatusAttachmentView.swift */, - DBFEF06226A577F2006D7ED1 /* StatusAttachmentViewModel.swift */, - DBFEF06C26A67FB7006D7ED1 /* StatusAttachmentViewModel+UploadState.swift */, - ); - path = View; - sourceTree = ""; - }; DBFEF06126A57721006D7ED1 /* Scene */ = { isa = PBXGroup; children = ( - DBFEF05426A576EE006D7ED1 /* View */, - DBC6462226A1712000B0E31B /* ComposeViewModel.swift */, - DBC6461426A170AB00B0E31B /* ComposeViewController.swift */, + DBC6462226A1712000B0E31B /* ShareViewModel.swift */, + DBC3872329214121001EC0FD /* ShareViewController.swift */, ); path = Scene; sourceTree = ""; @@ -3198,7 +3151,6 @@ 0F1E2D0B2615C39400C38565 /* DoubleTitleLabelNavigationBarTitleView.swift in Sources */, DBDFF1902805543100557A48 /* DiscoveryPostsViewController.swift in Sources */, DB697DD9278F4CED004EF2F7 /* HomeTimelineViewController+DataSourceProvider.swift in Sources */, - DB9A488A26034D40008B817C /* ComposeViewModel+PublishState.swift in Sources */, DB45FAD725CA6C76005A8AC7 /* UIBarButtonItem.swift in Sources */, 2D8434F525FF465D00EECE90 /* HomeTimelineNavigationBarTitleViewModel.swift in Sources */, DB938F0F2624119800E5B6C1 /* ThreadViewModel+LoadThreadState.swift in Sources */, @@ -3246,7 +3198,6 @@ DBFEEC9D279C12C1004F81DD /* ProfileFieldEditCollectionViewCell.swift in Sources */, DB3E6FEC2806D7F100B035AE /* DiscoveryNewsViewController.swift in Sources */, DB2FF510260B113300ADA9FE /* ComposeStatusPollExpiresOptionCollectionViewCell.swift in Sources */, - DBBC24DC26A54BCB00398BB9 /* MastodonRegex.swift in Sources */, DBCBED1726132DB500B49291 /* UserTimelineViewModel+Diffable.swift in Sources */, 2DE0FACE2615F7AD00CDF649 /* RecommendAccountSection.swift in Sources */, 2DAC9E3E262FC2400062E1A6 /* SuggestionAccountViewModel.swift in Sources */, @@ -3301,7 +3252,6 @@ DB63F7492799126300455B82 /* FollowerListViewController+DataSourceProvider.swift in Sources */, 2D198643261BF09500F0B013 /* SearchResultItem.swift in Sources */, 2DAC9E38262FC2320062E1A6 /* SuggestionAccountViewController.swift in Sources */, - DB66728C25F9F8DC00D60309 /* ComposeViewModel+DataSource.swift in Sources */, DB6180E02639194B0018D199 /* MediaPreviewPagingViewController.swift in Sources */, DBE0822425CD3F1E00FD6BBD /* MastodonRegisterViewModel.swift in Sources */, 5B90C45E262599800002E742 /* SettingsViewModel.swift in Sources */, @@ -3339,7 +3289,6 @@ DB98EB6227B215EB0082E365 /* ReportResultViewController.swift in Sources */, DB6B74F4272FBAE700C70B6E /* FollowerListViewModel+Diffable.swift in Sources */, DB6B74F2272FB67600C70B6E /* FollowerListViewModel.swift in Sources */, - DB44767B260B3B8C00B66B82 /* CustomEmojiPickerInputView.swift in Sources */, 0F20222D261457EE000C64BF /* HashtagTimelineViewModel+State.swift in Sources */, DB0009A626AEE5DC009B9D2D /* Intents.intentdefinition in Sources */, 5B90C462262599800002E742 /* SettingsSectionHeader.swift in Sources */, @@ -3353,7 +3302,6 @@ DBFEEC9B279BDDD9004F81DD /* ProfileAboutViewModel+Diffable.swift in Sources */, DBB525562611EDCA002F1F29 /* UserTimelineViewModel.swift in Sources */, DB0618012785732C0030EE79 /* ServerRulesTableViewCell.swift in Sources */, - DB221B16260C395900AEFE46 /* CustomEmojiPickerInputViewModel.swift in Sources */, DB98EB5C27B10A730082E365 /* ReportSupplementaryViewModel.swift in Sources */, DB0617EF277F12720030EE79 /* NavigationActionView.swift in Sources */, DB1FD43625F26899004CFCFC /* MastodonPickServerViewModel+LoadIndexedServerState.swift in Sources */, @@ -3437,7 +3385,6 @@ 2D35237A26256D920031AF25 /* NotificationSection.swift in Sources */, 2D4AD89C263165B500613EFC /* SuggestionAccountCollectionViewCell.swift in Sources */, DB98EB6927B21A7C0082E365 /* ReportResultActionTableViewCell.swift in Sources */, - DB447691260B406600B66B82 /* CustomEmojiPickerItemCollectionViewCell.swift in Sources */, DB9282B225F3222800823B15 /* PickServerEmptyStateView.swift in Sources */, DB697DDF278F524F004EF2F7 /* DataSourceFacade+Profile.swift in Sources */, DB1FD45025F26FA1004CFCFC /* MastodonPickServerViewModel+Diffable.swift in Sources */, @@ -3461,7 +3408,6 @@ DB63F74D27993F5B00455B82 /* SearchHistoryUserCollectionViewCell.swift in Sources */, DB8AF54425C13647002E6C99 /* SceneCoordinator.swift in Sources */, DB1D84382657B275000346B3 /* SegmentedControlNavigateable.swift in Sources */, - DB447697260B439000B66B82 /* CustomEmojiPickerHeaderCollectionReusableView.swift in Sources */, 0F20220726134DA4000C64BF /* HashtagTimelineViewModel+Diffable.swift in Sources */, DB7A9F932818F33C0016AF98 /* MastodonServerRulesViewController+Debug.swift in Sources */, 2D5A3D2825CF8BC9002347D6 /* HomeTimelineViewModel+Diffable.swift in Sources */, @@ -3567,9 +3513,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DBC6462326A1712000B0E31B /* ComposeViewModel.swift in Sources */, + DBC6462326A1712000B0E31B /* ShareViewModel.swift in Sources */, DBB3BA2B26A81D060004F2D4 /* FLAnimatedImageView.swift in Sources */, - DBC6461526A170AB00B0E31B /* ComposeViewController.swift in Sources */, + DBC3872429214121001EC0FD /* ShareViewController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist index 979c8c0e6..78a3a9e70 100644 --- a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist @@ -117,7 +117,7 @@ NotificationService.xcscheme_^#shared#^_ orderHint - 18 + 16 ShareActionExtension.xcscheme_^#shared#^_ diff --git a/Mastodon.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Mastodon.xcworkspace/xcshareddata/swiftpm/Package.resolved index 64dc691bb..409b8820d 100644 --- a/Mastodon.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Mastodon.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -90,6 +90,15 @@ "version" : "2.2.5" } }, + { + "identity" : "nextlevelsessionexporter", + "kind" : "remoteSourceControl", + "location" : "https://github.com/NextLevel/NextLevelSessionExporter.git", + "state" : { + "revision" : "b6c0cce1aa37fe1547d694f958fac3c3524b74da", + "version" : "0.4.6" + } + }, { "identity" : "nuke", "kind" : "remoteSourceControl", diff --git a/Mastodon/Diffiable/Account/SelectedAccountItem.swift b/Mastodon/Diffable/Account/SelectedAccountItem.swift similarity index 100% rename from Mastodon/Diffiable/Account/SelectedAccountItem.swift rename to Mastodon/Diffable/Account/SelectedAccountItem.swift diff --git a/Mastodon/Diffiable/Account/SelectedAccountSection.swift b/Mastodon/Diffable/Account/SelectedAccountSection.swift similarity index 100% rename from Mastodon/Diffiable/Account/SelectedAccountSection.swift rename to Mastodon/Diffable/Account/SelectedAccountSection.swift diff --git a/Mastodon/Diffiable/Discovery/DiscoveryItem.swift b/Mastodon/Diffable/Discovery/DiscoveryItem.swift similarity index 100% rename from Mastodon/Diffiable/Discovery/DiscoveryItem.swift rename to Mastodon/Diffable/Discovery/DiscoveryItem.swift diff --git a/Mastodon/Diffiable/Discovery/DiscoverySection.swift b/Mastodon/Diffable/Discovery/DiscoverySection.swift similarity index 100% rename from Mastodon/Diffiable/Discovery/DiscoverySection.swift rename to Mastodon/Diffable/Discovery/DiscoverySection.swift diff --git a/Mastodon/Diffiable/Notification/NotificationItem.swift b/Mastodon/Diffable/Notification/NotificationItem.swift similarity index 100% rename from Mastodon/Diffiable/Notification/NotificationItem.swift rename to Mastodon/Diffable/Notification/NotificationItem.swift diff --git a/Mastodon/Diffiable/Notification/NotificationSection.swift b/Mastodon/Diffable/Notification/NotificationSection.swift similarity index 100% rename from Mastodon/Diffiable/Notification/NotificationSection.swift rename to Mastodon/Diffable/Notification/NotificationSection.swift diff --git a/Mastodon/Diffiable/Onboarding/CategoryPickerItem.swift b/Mastodon/Diffable/Onboarding/CategoryPickerItem.swift similarity index 100% rename from Mastodon/Diffiable/Onboarding/CategoryPickerItem.swift rename to Mastodon/Diffable/Onboarding/CategoryPickerItem.swift diff --git a/Mastodon/Diffiable/Onboarding/CategoryPickerSection.swift b/Mastodon/Diffable/Onboarding/CategoryPickerSection.swift similarity index 100% rename from Mastodon/Diffiable/Onboarding/CategoryPickerSection.swift rename to Mastodon/Diffable/Onboarding/CategoryPickerSection.swift diff --git a/Mastodon/Diffiable/Onboarding/PickServerItem.swift b/Mastodon/Diffable/Onboarding/PickServerItem.swift similarity index 100% rename from Mastodon/Diffiable/Onboarding/PickServerItem.swift rename to Mastodon/Diffable/Onboarding/PickServerItem.swift diff --git a/Mastodon/Diffiable/Onboarding/PickServerSection.swift b/Mastodon/Diffable/Onboarding/PickServerSection.swift similarity index 100% rename from Mastodon/Diffiable/Onboarding/PickServerSection.swift rename to Mastodon/Diffable/Onboarding/PickServerSection.swift diff --git a/Mastodon/Diffiable/Onboarding/RegisterItem.swift b/Mastodon/Diffable/Onboarding/RegisterItem.swift similarity index 100% rename from Mastodon/Diffiable/Onboarding/RegisterItem.swift rename to Mastodon/Diffable/Onboarding/RegisterItem.swift diff --git a/Mastodon/Diffiable/Onboarding/RegisterSection.swift b/Mastodon/Diffable/Onboarding/RegisterSection.swift similarity index 100% rename from Mastodon/Diffiable/Onboarding/RegisterSection.swift rename to Mastodon/Diffable/Onboarding/RegisterSection.swift diff --git a/Mastodon/Diffiable/Onboarding/ServerRuleItem.swift b/Mastodon/Diffable/Onboarding/ServerRuleItem.swift similarity index 100% rename from Mastodon/Diffiable/Onboarding/ServerRuleItem.swift rename to Mastodon/Diffable/Onboarding/ServerRuleItem.swift diff --git a/Mastodon/Diffiable/Onboarding/ServerRuleSection.swift b/Mastodon/Diffable/Onboarding/ServerRuleSection.swift similarity index 100% rename from Mastodon/Diffiable/Onboarding/ServerRuleSection.swift rename to Mastodon/Diffable/Onboarding/ServerRuleSection.swift diff --git a/Mastodon/Diffiable/Profile/ProfileFieldItem.swift b/Mastodon/Diffable/Profile/ProfileFieldItem.swift similarity index 100% rename from Mastodon/Diffiable/Profile/ProfileFieldItem.swift rename to Mastodon/Diffable/Profile/ProfileFieldItem.swift diff --git a/Mastodon/Diffiable/Profile/ProfileFieldSection.swift b/Mastodon/Diffable/Profile/ProfileFieldSection.swift similarity index 100% rename from Mastodon/Diffiable/Profile/ProfileFieldSection.swift rename to Mastodon/Diffable/Profile/ProfileFieldSection.swift diff --git a/Mastodon/Diffiable/RecommandAccount/RecommendAccountItem.swift b/Mastodon/Diffable/RecommandAccount/RecommendAccountItem.swift similarity index 100% rename from Mastodon/Diffiable/RecommandAccount/RecommendAccountItem.swift rename to Mastodon/Diffable/RecommandAccount/RecommendAccountItem.swift diff --git a/Mastodon/Diffiable/RecommandAccount/RecommendAccountSection.swift b/Mastodon/Diffable/RecommandAccount/RecommendAccountSection.swift similarity index 100% rename from Mastodon/Diffiable/RecommandAccount/RecommendAccountSection.swift rename to Mastodon/Diffable/RecommandAccount/RecommendAccountSection.swift diff --git a/Mastodon/Diffiable/Report/ReportItem.swift b/Mastodon/Diffable/Report/ReportItem.swift similarity index 100% rename from Mastodon/Diffiable/Report/ReportItem.swift rename to Mastodon/Diffable/Report/ReportItem.swift diff --git a/Mastodon/Diffiable/Report/ReportSection.swift b/Mastodon/Diffable/Report/ReportSection.swift similarity index 100% rename from Mastodon/Diffiable/Report/ReportSection.swift rename to Mastodon/Diffable/Report/ReportSection.swift diff --git a/Mastodon/Diffiable/Search/SearchHistoryItem.swift b/Mastodon/Diffable/Search/SearchHistoryItem.swift similarity index 100% rename from Mastodon/Diffiable/Search/SearchHistoryItem.swift rename to Mastodon/Diffable/Search/SearchHistoryItem.swift diff --git a/Mastodon/Diffiable/Search/SearchHistorySection.swift b/Mastodon/Diffable/Search/SearchHistorySection.swift similarity index 100% rename from Mastodon/Diffiable/Search/SearchHistorySection.swift rename to Mastodon/Diffable/Search/SearchHistorySection.swift diff --git a/Mastodon/Diffiable/Search/SearchItem.swift b/Mastodon/Diffable/Search/SearchItem.swift similarity index 100% rename from Mastodon/Diffiable/Search/SearchItem.swift rename to Mastodon/Diffable/Search/SearchItem.swift diff --git a/Mastodon/Diffiable/Search/SearchResultItem.swift b/Mastodon/Diffable/Search/SearchResultItem.swift similarity index 100% rename from Mastodon/Diffiable/Search/SearchResultItem.swift rename to Mastodon/Diffable/Search/SearchResultItem.swift diff --git a/Mastodon/Diffiable/Search/SearchResultSection.swift b/Mastodon/Diffable/Search/SearchResultSection.swift similarity index 100% rename from Mastodon/Diffiable/Search/SearchResultSection.swift rename to Mastodon/Diffable/Search/SearchResultSection.swift diff --git a/Mastodon/Diffiable/Search/SearchSection.swift b/Mastodon/Diffable/Search/SearchSection.swift similarity index 100% rename from Mastodon/Diffiable/Search/SearchSection.swift rename to Mastodon/Diffable/Search/SearchSection.swift diff --git a/Mastodon/Diffiable/Settings/SettingsItem.swift b/Mastodon/Diffable/Settings/SettingsItem.swift similarity index 100% rename from Mastodon/Diffiable/Settings/SettingsItem.swift rename to Mastodon/Diffable/Settings/SettingsItem.swift diff --git a/Mastodon/Diffiable/Settings/SettingsSection.swift b/Mastodon/Diffable/Settings/SettingsSection.swift similarity index 100% rename from Mastodon/Diffiable/Settings/SettingsSection.swift rename to Mastodon/Diffable/Settings/SettingsSection.swift diff --git a/Mastodon/Diffiable/Status/StatusItem.swift b/Mastodon/Diffable/Status/StatusItem.swift similarity index 100% rename from Mastodon/Diffiable/Status/StatusItem.swift rename to Mastodon/Diffable/Status/StatusItem.swift diff --git a/Mastodon/Diffiable/Status/StatusSection.swift b/Mastodon/Diffable/Status/StatusSection.swift similarity index 100% rename from Mastodon/Diffiable/Status/StatusSection.swift rename to Mastodon/Diffable/Status/StatusSection.swift diff --git a/Mastodon/Diffiable/User/UserItem.swift b/Mastodon/Diffable/User/UserItem.swift similarity index 100% rename from Mastodon/Diffiable/User/UserItem.swift rename to Mastodon/Diffable/User/UserItem.swift diff --git a/Mastodon/Diffiable/User/UserSection.swift b/Mastodon/Diffable/User/UserSection.swift similarity index 100% rename from Mastodon/Diffiable/User/UserSection.swift rename to Mastodon/Diffable/User/UserSection.swift diff --git a/Mastodon/Scene/Compose/ComposeViewController.swift b/Mastodon/Scene/Compose/ComposeViewController.swift index bf9145d6c..6de17e31f 100644 --- a/Mastodon/Scene/Compose/ComposeViewController.swift +++ b/Mastodon/Scene/Compose/ComposeViewController.swift @@ -86,34 +86,7 @@ final class ComposeViewController: UIViewController, NeedsDependency { publishButton.setBackgroundImage(.placeholder(color: Asset.Colors.Button.disabled.color), for: .disabled) publishButton.setTitleColor(Asset.Colors.Label.primaryReverse.color, for: .normal) } - -// var systemKeyboardHeight: CGFloat = .zero { -// didSet { -// // note: some system AutoLayout warning here -// let height = max(300, systemKeyboardHeight) -// customEmojiPickerInputView.frame.size.height = height -// } -// } -// -// // CustomEmojiPickerView -// let customEmojiPickerInputView: CustomEmojiPickerInputView = { -// let view = CustomEmojiPickerInputView(frame: CGRect(x: 0, y: 0, width: 0, height: 300), inputViewStyle: .keyboard) -// return view -// }() -// -// let composeToolbarView = ComposeToolbarView() -// var composeToolbarViewBottomLayoutConstraint: NSLayoutConstraint! -// let composeToolbarBackgroundView = UIView() -// -// -// private(set) lazy var autoCompleteViewController: AutoCompleteViewController = { -// let viewController = AutoCompleteViewController() -// viewController.viewModel = AutoCompleteViewModel(context: context, authContext: viewModel.authContext) -// viewController.delegate = self -// viewController.viewModel.customEmojiViewModel.value = viewModel.customEmojiViewModel -// return viewController -// }() - + deinit { os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) } @@ -147,9 +120,9 @@ extension ComposeViewController { guard let self = self else { return } guard self.traitCollection.userInterfaceIdiom == .pad else { return } var items = [self.publishBarButtonItem] - if self.traitCollection.horizontalSizeClass == .regular { - items.append(self.characterCountBarButtonItem) - } + // if self.traitCollection.horizontalSizeClass == .regular { + // items.append(self.characterCountBarButtonItem) + // } self.navigationItem.rightBarButtonItems = items } .store(in: &disposeBag) @@ -166,380 +139,56 @@ extension ComposeViewController { ]) composeContentViewController.didMove(toParent: self) -// configureNavigationBarTitleStyle() -// viewModel.traitCollectionDidChangePublisher -// .receive(on: DispatchQueue.main) -// .sink { [weak self] _ in -// guard let self = self else { return } -// self.configureNavigationBarTitleStyle() -// } -// .store(in: &disposeBag) -// -// viewModel.$title -// .receive(on: DispatchQueue.main) -// .sink { [weak self] title in -// guard let self = self else { return } -// self.title = title -// } -// .store(in: &disposeBag) -// -// composeToolbarView.translatesAutoresizingMaskIntoConstraints = false -// view.addSubview(composeToolbarView) -// composeToolbarViewBottomLayoutConstraint = view.bottomAnchor.constraint(equalTo: composeToolbarView.bottomAnchor) -// NSLayoutConstraint.activate([ -// composeToolbarView.leadingAnchor.constraint(equalTo: view.leadingAnchor), -// composeToolbarView.trailingAnchor.constraint(equalTo: view.trailingAnchor), -// composeToolbarViewBottomLayoutConstraint, -// composeToolbarView.heightAnchor.constraint(equalToConstant: ComposeToolbarView.toolbarHeight), -// ]) -// composeToolbarView.preservesSuperviewLayoutMargins = true -// composeToolbarView.delegate = self -// -// composeToolbarBackgroundView.translatesAutoresizingMaskIntoConstraints = false -// view.insertSubview(composeToolbarBackgroundView, belowSubview: composeToolbarView) -// NSLayoutConstraint.activate([ -// composeToolbarBackgroundView.topAnchor.constraint(equalTo: composeToolbarView.topAnchor), -// composeToolbarBackgroundView.leadingAnchor.constraint(equalTo: composeToolbarView.leadingAnchor), -// composeToolbarBackgroundView.trailingAnchor.constraint(equalTo: composeToolbarView.trailingAnchor), -// view.bottomAnchor.constraint(equalTo: composeToolbarBackgroundView.bottomAnchor), -// ]) + // bind navigation bar style + // configureNavigationBarTitleStyle() + viewModel.traitCollectionDidChangePublisher + .receive(on: DispatchQueue.main) + .sink { [weak self] _ in + guard let self = self else { return } + self.configureNavigationBarTitleStyle() + } + .store(in: &disposeBag) -// tableView.delegate = self -// viewModel.setupDataSource( -// tableView: tableView, -// metaTextDelegate: self, -// metaTextViewDelegate: self, -// customEmojiPickerInputViewModel: viewModel.customEmojiPickerInputViewModel, -// composeStatusAttachmentCollectionViewCellDelegate: self, -// composeStatusPollOptionCollectionViewCellDelegate: self, -// composeStatusPollOptionAppendEntryCollectionViewCellDelegate: self, -// composeStatusPollExpiresOptionCollectionViewCellDelegate: self -// ) + // bind title + viewModel.$title + .receive(on: DispatchQueue.main) + .sink { [weak self] title in + guard let self = self else { return } + self.title = title + } + .store(in: &disposeBag) -// viewModel.composeStatusAttribute.$composeContent -// .removeDuplicates() -// .receive(on: DispatchQueue.main) -// .sink { [weak self] _ in -// guard let self = self else { return } -// guard self.view.window != nil else { return } -// UIView.performWithoutAnimation { -// self.tableView.beginUpdates() -// self.tableView.setNeedsLayout() -// self.tableView.layoutIfNeeded() -// self.tableView.endUpdates() -// } -// } -// .store(in: &disposeBag) - -// customEmojiPickerInputView.collectionView.delegate = self -// viewModel.customEmojiPickerInputViewModel.customEmojiPickerInputView = customEmojiPickerInputView -// viewModel.setupCustomEmojiPickerDiffableDataSource( -// for: customEmojiPickerInputView.collectionView, -// dependency: self -// ) - -// viewModel.composeStatusContentTableViewCell.delegate = self -// -// // update layout when keyboard show/dismiss -// view.layoutIfNeeded() -// - -// -// // bind auto-complete -// viewModel.$autoCompleteInfo -// .receive(on: DispatchQueue.main) -// .sink { [weak self] info in -// guard let self = self else { return } -// let textEditorView = self.textEditorView -// if self.autoCompleteViewController.view.superview == nil { -// self.autoCompleteViewController.view.frame = self.view.bounds -// // add to container view. seealso: `viewDidLayoutSubviews()` -// self.viewModel.composeStatusContentTableViewCell.textEditorViewContainerView.addSubview(self.autoCompleteViewController.view) -// self.addChild(self.autoCompleteViewController) -// self.autoCompleteViewController.didMove(toParent: self) -// self.autoCompleteViewController.view.isHidden = true -// self.tableView.autoCompleteViewController = self.autoCompleteViewController -// } -// self.updateAutoCompleteViewControllerLayout() -// self.autoCompleteViewController.view.isHidden = info == nil -// guard let info = info else { return } -// let symbolBoundingRectInContainer = textEditorView.textView.convert(info.symbolBoundingRect, to: self.autoCompleteViewController.chevronView) -// self.autoCompleteViewController.view.frame.origin.y = info.textBoundingRect.maxY -// self.autoCompleteViewController.viewModel.symbolBoundingRect.value = symbolBoundingRectInContainer -// self.autoCompleteViewController.viewModel.inputText.value = String(info.inputText) -// } -// .store(in: &disposeBag) -// -// // bind publish bar button state -// viewModel.$isPublishBarButtonItemEnabled -// .receive(on: DispatchQueue.main) -// .assign(to: \.isEnabled, on: publishButton) -// .store(in: &disposeBag) -// -// // bind media button toolbar state -// viewModel.$isMediaToolbarButtonEnabled -// .receive(on: DispatchQueue.main) -// .sink { [weak self] isMediaToolbarButtonEnabled in -// guard let self = self else { return } -// self.composeToolbarView.mediaBarButtonItem.isEnabled = isMediaToolbarButtonEnabled -// self.composeToolbarView.mediaButton.isEnabled = isMediaToolbarButtonEnabled -// } -// .store(in: &disposeBag) -// -// // bind poll button toolbar state -// viewModel.$isPollToolbarButtonEnabled -// .receive(on: DispatchQueue.main) -// .sink { [weak self] isPollToolbarButtonEnabled in -// guard let self = self else { return } -// self.composeToolbarView.pollBarButtonItem.isEnabled = isPollToolbarButtonEnabled -// self.composeToolbarView.pollButton.isEnabled = isPollToolbarButtonEnabled -// } -// .store(in: &disposeBag) -// -// Publishers.CombineLatest( -// viewModel.$isPollComposing, -// viewModel.$isPollToolbarButtonEnabled -// ) -// .receive(on: DispatchQueue.main) -// .sink { [weak self] isPollComposing, isPollToolbarButtonEnabled in -// guard let self = self else { return } -// guard isPollToolbarButtonEnabled else { -// let accessibilityLabel = L10n.Scene.Compose.Accessibility.appendPoll -// self.composeToolbarView.pollBarButtonItem.accessibilityLabel = accessibilityLabel -// self.composeToolbarView.pollButton.accessibilityLabel = accessibilityLabel -// return -// } -// let accessibilityLabel = isPollComposing ? L10n.Scene.Compose.Accessibility.removePoll : L10n.Scene.Compose.Accessibility.appendPoll -// self.composeToolbarView.pollBarButtonItem.accessibilityLabel = accessibilityLabel -// self.composeToolbarView.pollButton.accessibilityLabel = accessibilityLabel -// } -// .store(in: &disposeBag) -// -// // bind image picker toolbar state -// viewModel.$attachmentServices -// .receive(on: DispatchQueue.main) -// .sink { [weak self] attachmentServices in -// guard let self = self else { return } -// let isEnabled = attachmentServices.count < self.viewModel.maxMediaAttachments -// self.composeToolbarView.mediaBarButtonItem.isEnabled = isEnabled -// self.composeToolbarView.mediaButton.isEnabled = isEnabled -// self.resetImagePicker() -// } -// .store(in: &disposeBag) -// -// // bind content warning button state -// viewModel.$isContentWarningComposing -// .receive(on: DispatchQueue.main) -// .sink { [weak self] isContentWarningComposing in -// guard let self = self else { return } -// let accessibilityLabel = isContentWarningComposing ? L10n.Scene.Compose.Accessibility.disableContentWarning : L10n.Scene.Compose.Accessibility.enableContentWarning -// self.composeToolbarView.contentWarningBarButtonItem.accessibilityLabel = accessibilityLabel -// self.composeToolbarView.contentWarningButton.accessibilityLabel = accessibilityLabel -// } -// .store(in: &disposeBag) -// -// // bind visibility toolbar UI -// Publishers.CombineLatest( -// viewModel.$selectedStatusVisibility, -// viewModel.traitCollectionDidChangePublisher -// ) -// .receive(on: DispatchQueue.main) -// .sink { [weak self] type, _ in -// guard let self = self else { return } -// let image = type.image(interfaceStyle: self.traitCollection.userInterfaceStyle) -// self.composeToolbarView.visibilityBarButtonItem.image = image -// self.composeToolbarView.visibilityButton.setImage(image, for: .normal) -// self.composeToolbarView.activeVisibilityType.value = type -// } -// .store(in: &disposeBag) -// -// viewModel.$characterCount -// .receive(on: DispatchQueue.main) -// .sink { [weak self] characterCount in -// guard let self = self else { return } -// let count = self.viewModel.composeContentLimit - characterCount -// self.composeToolbarView.characterCountLabel.text = "\(count)" -// self.characterCountLabel.text = "\(count)" -// let font: UIFont -// let textColor: UIColor -// let accessibilityLabel: String -// switch count { -// case _ where count < 0: -// font = .monospacedDigitSystemFont(ofSize: 24, weight: .bold) -// textColor = Asset.Colors.danger.color -// accessibilityLabel = L10n.A11y.Plural.Count.inputLimitExceeds(abs(count)) -// default: -// font = .monospacedDigitSystemFont(ofSize: 15, weight: .regular) -// textColor = Asset.Colors.Label.secondary.color -// accessibilityLabel = L10n.A11y.Plural.Count.inputLimitRemains(count) -// } -// self.composeToolbarView.characterCountLabel.font = font -// self.composeToolbarView.characterCountLabel.textColor = textColor -// self.composeToolbarView.characterCountLabel.accessibilityLabel = accessibilityLabel -// self.characterCountLabel.font = font -// self.characterCountLabel.textColor = textColor -// self.characterCountLabel.accessibilityLabel = accessibilityLabel -// self.characterCountLabel.sizeToFit() -// } -// .store(in: &disposeBag) -// -// // bind custom emoji picker UI -// viewModel.customEmojiViewModel?.emojis -// .receive(on: DispatchQueue.main) -// .sink(receiveValue: { [weak self] emojis in -// guard let self = self else { return } -// if emojis.isEmpty { -// self.customEmojiPickerInputView.activityIndicatorView.startAnimating() -// } else { -// self.customEmojiPickerInputView.activityIndicatorView.stopAnimating() -// } -// }) -// .store(in: &disposeBag) -// -// configureToolbarDisplay(keyboardHasShortcutBar: keyboardHasShortcutBar.value) -// Publishers.CombineLatest( -// keyboardHasShortcutBar, -// viewModel.traitCollectionDidChangePublisher -// ) -// .receive(on: DispatchQueue.main) -// .sink { [weak self] keyboardHasShortcutBar, _ in -// guard let self = self else { return } -// self.configureToolbarDisplay(keyboardHasShortcutBar: keyboardHasShortcutBar) -// } -// .store(in: &disposeBag) - } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - -// // update MetaText without trigger call underlaying `UITextStorage.processEditing` -// _ = textEditorView.processEditing(textEditorView.textStorage) - -// markTextEditorViewBecomeFirstResponser() - } - - override func viewDidAppear(_ animated: Bool) { - super.viewDidAppear(animated) - -// viewModel.isViewAppeared = true + // bind publish bar button state + composeContentViewModel.$isPublishBarButtonItemEnabled + .receive(on: DispatchQueue.main) + .assign(to: \.isEnabled, on: publishButton) + .store(in: &disposeBag) } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) -// configurePublishButtonApperance() -// viewModel.traitCollectionDidChangePublisher.send() - } - - override func viewDidLayoutSubviews() { - super.viewDidLayoutSubviews() - - updateAutoCompleteViewControllerLayout() - } - - private func updateAutoCompleteViewControllerLayout() { - // pin autoCompleteViewController frame to current view -// if let containerView = autoCompleteViewController.view.superview { -// let viewFrameInWindow = containerView.convert(autoCompleteViewController.view.frame, to: view) -// if viewFrameInWindow.origin.x != 0 { -// autoCompleteViewController.view.frame.origin.x = -viewFrameInWindow.origin.x -// } -// autoCompleteViewController.view.frame.size.width = view.frame.width -// } + configurePublishButtonApperance() + viewModel.traitCollectionDidChangePublisher.send() } } -//extension ComposeViewController { -// -// private var textEditorView: MetaText { -// return viewModel.composeStatusContentTableViewCell.metaText -// } -// -// private func markTextEditorViewBecomeFirstResponser() { -// textEditorView.textView.becomeFirstResponder() -// } -// -// private func contentWarningEditorTextView() -> UITextView? { -// viewModel.composeStatusContentTableViewCell.statusContentWarningEditorView.textView -// } -// -// private func pollOptionCollectionViewCell(of item: ComposeStatusPollItem) -> ComposeStatusPollOptionCollectionViewCell? { -// guard case .pollOption = item else { return nil } -// guard let dataSource = viewModel.composeStatusPollTableViewCell.dataSource else { return nil } -// guard let indexPath = dataSource.indexPath(for: item), -// let cell = viewModel.composeStatusPollTableViewCell.collectionView.cellForItem(at: indexPath) as? ComposeStatusPollOptionCollectionViewCell else { -// return nil -// } -// -// return cell -// } -// -// private func firstPollOptionCollectionViewCell() -> ComposeStatusPollOptionCollectionViewCell? { -// guard let dataSource = viewModel.composeStatusPollTableViewCell.dataSource else { return nil } -// let items = dataSource.snapshot().itemIdentifiers(inSection: .main) -// let firstPollItem = items.first { item -> Bool in -// guard case .pollOption = item else { return false } -// return true -// } -// -// guard let item = firstPollItem else { -// return nil -// } -// -// return pollOptionCollectionViewCell(of: item) -// } -// -// private func lastPollOptionCollectionViewCell() -> ComposeStatusPollOptionCollectionViewCell? { -// guard let dataSource = viewModel.composeStatusPollTableViewCell.dataSource else { return nil } -// let items = dataSource.snapshot().itemIdentifiers(inSection: .main) -// let lastPollItem = items.last { item -> Bool in -// guard case .pollOption = item else { return false } -// return true -// } -// -// guard let item = lastPollItem else { -// return nil -// } -// -// return pollOptionCollectionViewCell(of: item) -// } -// -// private func markFirstPollOptionCollectionViewCellBecomeFirstResponser() { -// guard let cell = firstPollOptionCollectionViewCell() else { return } -// cell.pollOptionView.optionTextField.becomeFirstResponder() -// } -// -// private func markLastPollOptionCollectionViewCellBecomeFirstResponser() { -// guard let cell = lastPollOptionCollectionViewCell() else { return } -// cell.pollOptionView.optionTextField.becomeFirstResponder() -// } -// -// private func showDismissConfirmAlertController() { -// let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) -// let discardAction = UIAlertAction(title: L10n.Common.Controls.Actions.discard, style: .destructive) { [weak self] _ in -// guard let self = self else { return } -// self.dismiss(animated: true, completion: nil) -// } -// alertController.addAction(discardAction) -// let cancelAction = UIAlertAction(title: L10n.Common.Controls.Actions.cancel, style: .cancel) -// alertController.addAction(cancelAction) -// alertController.popoverPresentationController?.barButtonItem = cancelBarButtonItem -// present(alertController, animated: true, completion: nil) -// } -// -// private func resetImagePicker() { -// let selectionLimit = max(1, viewModel.maxMediaAttachments - viewModel.attachmentServices.count) -// let configuration = ComposeViewController.createPhotoLibraryPickerConfiguration(selectionLimit: selectionLimit) -// photoLibraryPicker = createImagePicker(configuration: configuration) -// } -// -// private func createImagePicker(configuration: PHPickerConfiguration) -> PHPickerViewController { -// let imagePicker = PHPickerViewController(configuration: configuration) -// imagePicker.delegate = self -// return imagePicker -// } -// +extension ComposeViewController { + + private func showDismissConfirmAlertController() { + let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) + let discardAction = UIAlertAction(title: L10n.Common.Controls.Actions.discard, style: .destructive) { [weak self] _ in + guard let self = self else { return } + self.dismiss(animated: true, completion: nil) + } + alertController.addAction(discardAction) + let cancelAction = UIAlertAction(title: L10n.Common.Controls.Actions.cancel, style: .cancel) + alertController.addAction(cancelAction) + alertController.popoverPresentationController?.barButtonItem = cancelBarButtonItem + present(alertController, animated: true, completion: nil) + } + // private func setupBackgroundColor(theme: Theme) { // let backgroundColor = UIColor(dynamicProvider: { traitCollection in // switch traitCollection.userInterfaceStyle { @@ -578,46 +227,40 @@ extension ComposeViewController { // } // } // -// private func configureNavigationBarTitleStyle() { -// switch traitCollection.userInterfaceIdiom { -// case .pad: -// navigationController?.navigationBar.prefersLargeTitles = traitCollection.horizontalSizeClass == .regular -// default: -// break -// } -// } -// -//} -// + private func configureNavigationBarTitleStyle() { + switch traitCollection.userInterfaceIdiom { + case .pad: + navigationController?.navigationBar.prefersLargeTitles = traitCollection.horizontalSizeClass == .regular + default: + break + } + } + +} + extension ComposeViewController { @objc private func cancelBarButtonItemPressed(_ sender: UIBarButtonItem) { logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public)") -// guard viewModel.shouldDismiss else { -// showDismissConfirmAlertController() -// return -// } + guard composeContentViewModel.shouldDismiss else { + showDismissConfirmAlertController() + return + } dismiss(animated: true, completion: nil) } @objc private func publishBarButtonItemPressed(_ sender: UIBarButtonItem) { os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) -// do { -// try viewModel.checkAttachmentPrecondition() -// } catch { -// let alertController = UIAlertController(for: error, title: nil, preferredStyle: .alert) -// let okAction = UIAlertAction(title: L10n.Common.Controls.Actions.ok, style: .default, handler: nil) -// alertController.addAction(okAction) -// coordinator.present(scene: .alertController(alertController: alertController), from: nil, transition: .alertController(animated: true, completion: nil)) -// return -// } -// guard viewModel.publishStateMachine.enter(ComposeViewModel.PublishState.Publishing.self) else { -// // TODO: handle error -// return -// } - - // context.statusPublishService.publish(composeViewModel: viewModel) + do { + try composeContentViewModel.checkAttachmentPrecondition() + } catch { + let alertController = UIAlertController(for: error, title: nil, preferredStyle: .alert) + let okAction = UIAlertAction(title: L10n.Common.Controls.Actions.ok, style: .default, handler: nil) + alertController.addAction(okAction) + coordinator.present(scene: .alertController(alertController: alertController), from: nil, transition: .alertController(animated: true, completion: nil)) + return + } do { let statusPublisher = try composeContentViewModel.statusPublisher() @@ -640,249 +283,35 @@ extension ComposeViewController { } -//// MARK: - MetaTextDelegate -//extension ComposeViewController: MetaTextDelegate { -// func metaText(_ metaText: MetaText, processEditing textStorage: MetaTextStorage) -> MetaContent? { -// let string = metaText.textStorage.string -// let content = MastodonContent( -// content: string, -// emojis: viewModel.customEmojiViewModel?.emojiMapping.value ?? [:] -// ) -// let metaContent = MastodonMetaContent.convert(text: content) -// return metaContent -// } -//} -// -//// MARK: - UITextViewDelegate -//extension ComposeViewController: UITextViewDelegate { -// -// func textViewShouldBeginEditing(_ textView: UITextView) -> Bool { -// setupInputAssistantItem(item: textView.inputAssistantItem) -// return true -// } -// -// func textViewDidChange(_ textView: UITextView) { -// switch textView { -// case textEditorView.textView: -// // update model -// let metaText = self.textEditorView -// let backedString = metaText.backedString -// viewModel.composeStatusAttribute.composeContent = backedString -// logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): \(backedString)") -// -// // configure auto completion -// setupAutoComplete(for: textView) -// default: -// assertionFailure() -// } -// } -// -// struct AutoCompleteInfo { -// // model -// let inputText: Substring -// // range -// let symbolRange: Range -// let symbolString: Substring -// let toCursorRange: Range -// let toCursorString: Substring -// let toHighlightEndRange: Range -// let toHighlightEndString: Substring -// // geometry -// var textBoundingRect: CGRect = .zero -// var symbolBoundingRect: CGRect = .zero -// } -// -// private func setupAutoComplete(for textView: UITextView) { -// guard var autoCompletion = ComposeViewController.scanAutoCompleteInfo(textView: textView) else { -// viewModel.autoCompleteInfo = nil -// return -// } -// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: auto complete %s (%s)", ((#file as NSString).lastPathComponent), #line, #function, String(autoCompletion.toHighlightEndString), String(autoCompletion.toCursorString)) -// -// // get layout text bounding rect -// var glyphRange = NSRange() -// textView.layoutManager.characterRange(forGlyphRange: NSRange(autoCompletion.toCursorRange, in: textView.text), actualGlyphRange: &glyphRange) -// let textContainer = textView.layoutManager.textContainers[0] -// let textBoundingRect = textView.layoutManager.boundingRect(forGlyphRange: glyphRange, in: textContainer) -// -// let retryLayoutTimes = viewModel.autoCompleteRetryLayoutTimes -// guard textBoundingRect.size != .zero else { -// viewModel.autoCompleteRetryLayoutTimes += 1 -// // avoid infinite loop -// guard retryLayoutTimes < 3 else { return } -// // needs retry calculate layout when the rect position changing -// DispatchQueue.main.async { -// self.setupAutoComplete(for: textView) -// } -// return -// } -// viewModel.autoCompleteRetryLayoutTimes = 0 -// -// // get symbol bounding rect -// textView.layoutManager.characterRange(forGlyphRange: NSRange(autoCompletion.symbolRange, in: textView.text), actualGlyphRange: &glyphRange) -// let symbolBoundingRect = textView.layoutManager.boundingRect(forGlyphRange: glyphRange, in: textContainer) -// -// // set bounding rect and trigger layout -// autoCompletion.textBoundingRect = textBoundingRect -// autoCompletion.symbolBoundingRect = symbolBoundingRect -// viewModel.autoCompleteInfo = autoCompletion -// } -// -// private static func scanAutoCompleteInfo(textView: UITextView) -> AutoCompleteInfo? { -// guard let text = textView.text, -// textView.selectedRange.location > 0, !text.isEmpty, -// let selectedRange = Range(textView.selectedRange, in: text) else { -// return nil -// } -// let cursorIndex = selectedRange.upperBound -// let _highlightStartIndex: String.Index? = { -// var index = text.index(before: cursorIndex) -// while index > text.startIndex { -// let char = text[index] -// if char == "@" || char == "#" || char == ":" { -// return index -// } -// index = text.index(before: index) -// } -// assert(index == text.startIndex) -// let char = text[index] -// if char == "@" || char == "#" || char == ":" { -// return index -// } else { -// return nil -// } -// }() -// -// guard let highlightStartIndex = _highlightStartIndex else { return nil } -// let scanRange = NSRange(highlightStartIndex..= cursorIndex else { return nil } -// let symbolRange = highlightStartIndex.. Bool { -// switch textView { -// case textEditorView.textView: -// return false -// default: -// return true -// } -// } -// -// func textView(_ textView: UITextView, shouldInteractWith textAttachment: NSTextAttachment, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool { -// switch textView { -// case textEditorView.textView: -// return false -// default: -// return true -// } -// } -// -//} -// -//// MARK: - ComposeToolbarViewDelegate -//extension ComposeViewController: ComposeToolbarViewDelegate { +extension ComposeViewController { + public override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool { + + // Enable pasting images + if (action == #selector(UIResponderStandardEditActions.paste(_:))) { + return UIPasteboard.general.hasStrings || UIPasteboard.general.hasImages; + } -// func composeToolbarView(_ composeToolbarView: ComposeToolbarView, pollButtonDidPressed sender: Any) { -// // toggle poll composing state -// viewModel.isPollComposing.toggle() -// -// // cancel custom picker input -// viewModel.isCustomEmojiComposing = false -// -// // setup initial poll option if needs -// if viewModel.isPollComposing, viewModel.pollOptionAttributes.isEmpty { -// viewModel.pollOptionAttributes = [ComposeStatusPollItem.PollOptionAttribute(), ComposeStatusPollItem.PollOptionAttribute()] -// } -// -// if viewModel.isPollComposing { -// // Magic RunLoop -// DispatchQueue.main.async { -// self.markFirstPollOptionCollectionViewCellBecomeFirstResponser() -// } -// } else { -// markTextEditorViewBecomeFirstResponser() -// } -// } -// -// func composeToolbarView(_ composeToolbarView: ComposeToolbarView, emojiButtonDidPressed sender: Any) { -// viewModel.isCustomEmojiComposing.toggle() -// } -// -// func composeToolbarView(_ composeToolbarView: ComposeToolbarView, contentWarningButtonDidPressed sender: Any) { -// // cancel custom picker input -// viewModel.isCustomEmojiComposing = false -// -// // restore first responder for text editor when content warning dismiss -// if viewModel.isContentWarningComposing { -// if contentWarningEditorTextView()?.isFirstResponder == true { -// markTextEditorViewBecomeFirstResponser() -// } -// } -// -// // toggle composing status -// viewModel.isContentWarningComposing.toggle() -// -// // active content warning after toggled -// if viewModel.isContentWarningComposing { -// contentWarningEditorTextView()?.becomeFirstResponder() -// } -// } -// -// func composeToolbarView(_ composeToolbarView: ComposeToolbarView, visibilityButtonDidPressed sender: Any, visibilitySelectionType type: ComposeToolbarView.VisibilitySelectionType) { -// viewModel.selectedStatusVisibility = type -// } -// -//} + return super.canPerformAction(action, withSender: sender); + } + + override func paste(_ sender: Any?) { + logger.debug("Paste event received") -//// MARK: - UITableViewDelegate -//extension ComposeViewController: UITableViewDelegate { } -// -//// MARK: - UICollectionViewDelegate -//extension ComposeViewController: UICollectionViewDelegate { -// -// func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { -// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: select %s", ((#file as NSString).lastPathComponent), #line, #function, indexPath.debugDescription) -// -// if collectionView === customEmojiPickerInputView.collectionView { -// guard let diffableDataSource = viewModel.customEmojiPickerDiffableDataSource else { return } -// let item = diffableDataSource.itemIdentifier(for: indexPath) -// guard case let .emoji(attribute) = item else { return } -// let emoji = attribute.emoji -// -// // make click sound -// UIDevice.current.playInputClick() -// -// // retrieve active text input and insert emoji -// // the trailing space is REQUIRED to make regex happy -// _ = viewModel.customEmojiPickerInputViewModel.insertText(":\(emoji.shortcode): ") -// } else { -// // do nothing -// } -// } -//} + // Look for images on the clipboard + if UIPasteboard.general.hasImages, let images = UIPasteboard.general.images { + logger.warning("Got image paste event, however attachments are not yet re-implemented."); + let attachmentViewModels = images.map { image in + return AttachmentViewModel( + api: viewModel.context.apiService, + authContext: viewModel.authContext, + input: .image(image), + delegate: composeContentViewModel + ) + } + composeContentViewModel.attachmentViewModels += attachmentViewModels + } + } +} // MARK: - UIAdaptivePresentationControllerDelegate extension ComposeViewController: UIAdaptivePresentationControllerDelegate { @@ -895,15 +324,15 @@ extension ComposeViewController: UIAdaptivePresentationControllerDelegate { return .pageSheet } } - -// func presentationControllerShouldDismiss(_ presentationController: UIPresentationController) -> Bool { -// return viewModel.shouldDismiss -// } -// func presentationControllerDidAttemptToDismiss(_ presentationController: UIPresentationController) { -// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) -// showDismissConfirmAlertController() -// } + func presentationControllerShouldDismiss(_ presentationController: UIPresentationController) -> Bool { + return composeContentViewModel.shouldDismiss + } + + func presentationControllerDidAttemptToDismiss(_ presentationController: UIPresentationController) { + os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) + showDismissConfirmAlertController() + } func presentationControllerDidDismiss(_ presentationController: UIPresentationController) { os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) @@ -911,180 +340,6 @@ extension ComposeViewController: UIAdaptivePresentationControllerDelegate { } -//// MARK: - ComposeStatusAttachmentTableViewCellDelegate -//extension ComposeViewController: ComposeStatusAttachmentCollectionViewCellDelegate { -// -// func composeStatusAttachmentCollectionViewCell(_ cell: ComposeStatusAttachmentCollectionViewCell, removeButtonDidPressed button: UIButton) { -// guard let diffableDataSource = viewModel.composeStatusAttachmentTableViewCell.dataSource else { return } -// guard let indexPath = viewModel.composeStatusAttachmentTableViewCell.collectionView.indexPath(for: cell) else { return } -// guard let item = diffableDataSource.itemIdentifier(for: indexPath) else { return } -// guard case let .attachment(attachmentService) = item else { return } -// -// var attachmentServices = viewModel.attachmentServices -// guard let index = attachmentServices.firstIndex(of: attachmentService) else { return } -// let removedItem = attachmentServices[index] -// attachmentServices.remove(at: index) -// viewModel.attachmentServices = attachmentServices -// -// // cancel task -// removedItem.disposeBag.removeAll() -// } -// -//} -// -//// MARK: - ComposeStatusPollOptionCollectionViewCellDelegate -//extension ComposeViewController: ComposeStatusPollOptionCollectionViewCellDelegate { -// -// func composeStatusPollOptionCollectionViewCell(_ cell: ComposeStatusPollOptionCollectionViewCell, textFieldDidBeginEditing textField: UITextField) { -// -// setupInputAssistantItem(item: textField.inputAssistantItem) -// -// // FIXME: make poll section visible -// // DispatchQueue.main.async { -// // self.collectionView.scroll(to: .bottom, animated: true) -// // } -// } -// -// -// // handle delete backward event for poll option input -// func composeStatusPollOptionCollectionViewCell(_ cell: ComposeStatusPollOptionCollectionViewCell, textBeforeDeleteBackward text: String?) { -// guard (text ?? "").isEmpty else { return } -// guard let dataSource = viewModel.composeStatusPollTableViewCell.dataSource else { return } -// guard let indexPath = viewModel.composeStatusPollTableViewCell.collectionView.indexPath(for: cell) else { return } -// guard let item = dataSource.itemIdentifier(for: indexPath) else { return } -// guard case let .pollOption(attribute) = item else { return } -// -// var pollAttributes = viewModel.pollOptionAttributes -// guard let index = pollAttributes.firstIndex(of: attribute) else { return } -// -// // mark previous (fallback to next) item of removed middle poll option become first responder -// let pollItems = dataSource.snapshot().itemIdentifiers(inSection: .main) -// if let indexOfItem = pollItems.firstIndex(of: item), index > 0 { -// func cellBeforeRemoved() -> ComposeStatusPollOptionCollectionViewCell? { -// guard index > 0 else { return nil } -// let indexBeforeRemoved = pollItems.index(before: indexOfItem) -// let itemBeforeRemoved = pollItems[indexBeforeRemoved] -// return pollOptionCollectionViewCell(of: itemBeforeRemoved) -// } -// -// func cellAfterRemoved() -> ComposeStatusPollOptionCollectionViewCell? { -// guard index < pollItems.count - 1 else { return nil } -// let indexAfterRemoved = pollItems.index(after: index) -// let itemAfterRemoved = pollItems[indexAfterRemoved] -// return pollOptionCollectionViewCell(of: itemAfterRemoved) -// } -// -// var cell: ComposeStatusPollOptionCollectionViewCell? = cellBeforeRemoved() -// if cell == nil { -// cell = cellAfterRemoved() -// } -// cell?.pollOptionView.optionTextField.becomeFirstResponder() -// } -// -// guard pollAttributes.count > 2 else { -// return -// } -// pollAttributes.remove(at: index) -// -// // update data source -// viewModel.pollOptionAttributes = pollAttributes -// } -// -// // handle keyboard return event for poll option input -// func composeStatusPollOptionCollectionViewCell(_ cell: ComposeStatusPollOptionCollectionViewCell, pollOptionTextFieldDidReturn: UITextField) { -// guard let dataSource = viewModel.composeStatusPollTableViewCell.dataSource else { return } -// guard let indexPath = viewModel.composeStatusPollTableViewCell.collectionView.indexPath(for: cell) else { return } -// let pollItems = dataSource.snapshot().itemIdentifiers(inSection: .main).filter { item in -// guard case .pollOption = item else { return false } -// return true -// } -// guard let item = dataSource.itemIdentifier(for: indexPath) else { return } -// guard let index = pollItems.firstIndex(of: item) else { return } -// -// if index == pollItems.count - 1 { -// // is the last -// viewModel.createNewPollOptionIfPossible() -// DispatchQueue.main.async { -// self.markLastPollOptionCollectionViewCellBecomeFirstResponser() -// } -// } else { -// // not the last -// let indexAfter = pollItems.index(after: index) -// let itemAfter = pollItems[indexAfter] -// let cell = pollOptionCollectionViewCell(of: itemAfter) -// cell?.pollOptionView.optionTextField.becomeFirstResponder() -// } -// } -// -//} -// -//// MARK: - ComposeStatusPollOptionAppendEntryCollectionViewCellDelegate -//extension ComposeViewController: ComposeStatusPollOptionAppendEntryCollectionViewCellDelegate { -// func composeStatusPollOptionAppendEntryCollectionViewCellDidPressed(_ cell: ComposeStatusPollOptionAppendEntryCollectionViewCell) { -// viewModel.createNewPollOptionIfPossible() -// DispatchQueue.main.async { -// self.markLastPollOptionCollectionViewCellBecomeFirstResponser() -// } -// } -//} -// -//// MARK: - ComposeStatusPollExpiresOptionCollectionViewCellDelegate -//extension ComposeViewController: ComposeStatusPollExpiresOptionCollectionViewCellDelegate { -// func composeStatusPollExpiresOptionCollectionViewCell(_ cell: ComposeStatusPollExpiresOptionCollectionViewCell, didSelectExpiresOption expiresOption: ComposeStatusPollItem.PollExpiresOptionAttribute.ExpiresOption) { -// viewModel.pollExpiresOptionAttribute.expiresOption.value = expiresOption -// } -//} -// -//// MARK: - ComposeStatusContentTableViewCellDelegate -//extension ComposeViewController: ComposeStatusContentTableViewCellDelegate { -// func composeStatusContentTableViewCell(_ cell: ComposeStatusContentTableViewCell, textViewShouldBeginEditing textView: UITextView) -> Bool { -// setupInputAssistantItem(item: textView.inputAssistantItem) -// return true -// } -//} -// -//// MARK: - AutoCompleteViewControllerDelegate -//extension ComposeViewController: AutoCompleteViewControllerDelegate { -// func autoCompleteViewController(_ viewController: AutoCompleteViewController, didSelectItem item: AutoCompleteItem) { -// guard let info = viewModel.autoCompleteInfo else { return } -// let _replacedText: String? = { -// var text: String -// switch item { -// case .hashtag(let hashtag): -// text = "#" + hashtag.name -// case .hashtagV1(let hashtagName): -// text = "#" + hashtagName -// case .account(let account): -// text = "@" + account.acct -// case .emoji(let emoji): -// text = ":" + emoji.shortcode + ":" -// case .bottomLoader: -// return nil -// } -// return text -// }() -// guard let replacedText = _replacedText else { return } -// guard let text = textEditorView.textView.text else { return } -// -// let range = NSRange(info.toHighlightEndRange, in: text) -// textEditorView.textStorage.replaceCharacters(in: range, with: replacedText) -// DispatchQueue.main.async { -// self.textEditorView.textView.insertText(" ") // trigger textView delegate update -// } -// viewModel.autoCompleteInfo = nil -// -// switch item { -// case .emoji, .bottomLoader: -// break -// default: -// // set selected range except emoji -// let newRange = NSRange(location: range.location + (replacedText as NSString).length, length: 0) -// guard textEditorView.textStorage.length <= newRange.location else { return } -// textEditorView.textView.selectedRange = newRange -// } -// } -//} -// //extension ComposeViewController { // override var keyCommands: [UIKeyCommand]? { // composeKeyCommands diff --git a/Mastodon/Scene/Compose/ComposeViewModel+DataSource.swift b/Mastodon/Scene/Compose/ComposeViewModel+DataSource.swift deleted file mode 100644 index b3d8f52dc..000000000 --- a/Mastodon/Scene/Compose/ComposeViewModel+DataSource.swift +++ /dev/null @@ -1,490 +0,0 @@ -// -// ComposeViewModel+Diffable.swift -// Mastodon -// -// Created by MainasuK Cirno on 2021-3-11. -// - -import os.log -import UIKit -import Combine -import CoreDataStack -import MetaTextKit -import MastodonMeta -import MastodonAsset -import MastodonCore -import MastodonLocalization -import MastodonSDK - -extension ComposeViewModel { - -// func setupDataSource( -// tableView: UITableView, -// metaTextDelegate: MetaTextDelegate, -// metaTextViewDelegate: UITextViewDelegate, -// customEmojiPickerInputViewModel: CustomEmojiPickerInputViewModel, -// composeStatusAttachmentCollectionViewCellDelegate: ComposeStatusAttachmentCollectionViewCellDelegate, -// composeStatusPollOptionCollectionViewCellDelegate: ComposeStatusPollOptionCollectionViewCellDelegate, -// composeStatusPollOptionAppendEntryCollectionViewCellDelegate: ComposeStatusPollOptionAppendEntryCollectionViewCellDelegate, -// composeStatusPollExpiresOptionCollectionViewCellDelegate: ComposeStatusPollExpiresOptionCollectionViewCellDelegate -// ) { -// // UI -// bind() -// -// // content -// bind(cell: composeStatusContentTableViewCell, tableView: tableView) -// composeStatusContentTableViewCell.metaText.delegate = metaTextDelegate -// composeStatusContentTableViewCell.metaText.textView.delegate = metaTextViewDelegate -// -// // attachment -// bind(cell: composeStatusAttachmentTableViewCell, tableView: tableView) -// composeStatusAttachmentTableViewCell.composeStatusAttachmentCollectionViewCellDelegate = composeStatusAttachmentCollectionViewCellDelegate -// -// // poll -// bind(cell: composeStatusPollTableViewCell, tableView: tableView) -// composeStatusPollTableViewCell.delegate = self -// composeStatusPollTableViewCell.customEmojiPickerInputViewModel = customEmojiPickerInputViewModel -// composeStatusPollTableViewCell.composeStatusPollOptionCollectionViewCellDelegate = composeStatusPollOptionCollectionViewCellDelegate -// composeStatusPollTableViewCell.composeStatusPollOptionAppendEntryCollectionViewCellDelegate = composeStatusPollOptionAppendEntryCollectionViewCellDelegate -// composeStatusPollTableViewCell.composeStatusPollExpiresOptionCollectionViewCellDelegate = composeStatusPollExpiresOptionCollectionViewCellDelegate -// -// // setup data source -// tableView.dataSource = self -// } -// -// func setupCustomEmojiPickerDiffableDataSource( -// for collectionView: UICollectionView, -// dependency: NeedsDependency -// ) { -// let diffableDataSource = CustomEmojiPickerSection.collectionViewDiffableDataSource( -// for: collectionView, -// dependency: dependency -// ) -// self.customEmojiPickerDiffableDataSource = diffableDataSource -// -// let _domain = customEmojiViewModel?.domain -// customEmojiViewModel?.emojis -// .receive(on: DispatchQueue.main) -// .sink { [weak self, weak diffableDataSource] emojis in -// guard let _ = self else { return } -// guard let diffableDataSource = diffableDataSource else { return } -// -// var snapshot = NSDiffableDataSourceSnapshot() -// let domain = _domain?.uppercased() ?? " " -// let customEmojiSection = CustomEmojiPickerSection.emoji(name: domain) -// snapshot.appendSections([customEmojiSection]) -// let items: [CustomEmojiPickerItem] = { -// var items = [CustomEmojiPickerItem]() -// for emoji in emojis where emoji.visibleInPicker { -// let attribute = CustomEmojiPickerItem.CustomEmojiAttribute(emoji: emoji) -// let item = CustomEmojiPickerItem.emoji(attribute: attribute) -// items.append(item) -// } -// return items -// }() -// snapshot.appendItems(items, toSection: customEmojiSection) -// -// diffableDataSource.apply(snapshot) -// } -// .store(in: &disposeBag) -// } - -} - -//// MARK: - UITableViewDataSource -//extension ComposeViewModel: UITableViewDataSource { - -// func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { -// switch Section.allCases[indexPath.section] { -// case .repliedTo: -// let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: ComposeRepliedToStatusContentTableViewCell.self), for: indexPath) as! ComposeRepliedToStatusContentTableViewCell -// guard case let .reply(record) = composeKind else { return cell } -// -// // bind frame publisher -// cell.framePublisher -// .receive(on: DispatchQueue.main) -// .assign(to: \.repliedToCellFrame, on: self) -// .store(in: &cell.disposeBag) -// -// // set initial width -// if cell.statusView.frame.width == .zero { -// cell.statusView.frame.size.width = tableView.frame.width -// } -// -// // configure status -// context.managedObjectContext.performAndWait { -// guard let replyTo = record.object(in: context.managedObjectContext) else { return } -// cell.statusView.configure(status: replyTo) -// } -// -// return cell -// case .status: -// return composeStatusContentTableViewCell -// case .attachment: -// return composeStatusAttachmentTableViewCell -// case .poll: -// return composeStatusPollTableViewCell -// } -// } -//} - -//// MARK: - ComposeStatusPollTableViewCellDelegate -//extension ComposeViewModel: ComposeStatusPollTableViewCellDelegate { -// func composeStatusPollTableViewCell(_ cell: ComposeStatusPollTableViewCell, pollOptionAttributesDidReorder options: [ComposeStatusPollItem.PollOptionAttribute]) { -// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) -// -// self.pollOptionAttributes = options -// } -//} -// -//extension ComposeViewModel { -// private func bind() { -// $isCustomEmojiComposing -// .assign(to: \.value, on: customEmojiPickerInputViewModel.isCustomEmojiComposing) -// .store(in: &disposeBag) -// -// $isContentWarningComposing -// .assign(to: \.isContentWarningComposing, on: composeStatusAttribute) -// .store(in: &disposeBag) -// -// // bind compose toolbar UI state -// Publishers.CombineLatest( -// $isPollComposing, -// $attachmentServices -// ) -// .receive(on: DispatchQueue.main) -// .sink(receiveValue: { [weak self] isPollComposing, attachmentServices in -// guard let self = self else { return } -// let shouldMediaDisable = isPollComposing || attachmentServices.count >= self.maxMediaAttachments -// let shouldPollDisable = attachmentServices.count > 0 -// -// self.isMediaToolbarButtonEnabled = !shouldMediaDisable -// self.isPollToolbarButtonEnabled = !shouldPollDisable -// }) -// .store(in: &disposeBag) -// -// // calculate `Idempotency-Key` -// let content = Publishers.CombineLatest3( -// composeStatusAttribute.$isContentWarningComposing, -// composeStatusAttribute.$contentWarningContent, -// composeStatusAttribute.$composeContent -// ) -// .map { isContentWarningComposing, contentWarningContent, composeContent -> String in -// if isContentWarningComposing { -// return contentWarningContent + (composeContent ?? "") -// } else { -// return composeContent ?? "" -// } -// } -// let attachmentIDs = $attachmentServices.map { attachments -> String in -// let attachmentIDs = attachments.compactMap { $0.attachment.value?.id } -// return attachmentIDs.joined(separator: ",") -// } -// let pollOptionsAndDuration = Publishers.CombineLatest3( -// $isPollComposing, -// $pollOptionAttributes, -// pollExpiresOptionAttribute.expiresOption -// ) -// .map { isPollComposing, pollOptionAttributes, expiresOption -> String in -// guard isPollComposing else { -// return "" -// } -// -// let pollOptions = pollOptionAttributes.map { $0.option.value }.joined(separator: ",") -// return pollOptions + expiresOption.rawValue -// } -// -// Publishers.CombineLatest4( -// content, -// attachmentIDs, -// pollOptionsAndDuration, -// $selectedStatusVisibility -// ) -// .map { content, attachmentIDs, pollOptionsAndDuration, selectedStatusVisibility -> String in -// var hasher = Hasher() -// hasher.combine(content) -// hasher.combine(attachmentIDs) -// hasher.combine(pollOptionsAndDuration) -// hasher.combine(selectedStatusVisibility.visibility.rawValue) -// let hashValue = hasher.finalize() -// return "\(hashValue)" -// } -// .assign(to: \.value, on: idempotencyKey) -// .store(in: &disposeBag) -// -// // bind modal dismiss state -// composeStatusAttribute.$composeContent -// .receive(on: DispatchQueue.main) -// .map { [weak self] content in -// let content = content ?? "" -// if content.isEmpty { -// return true -// } -// // if preInsertedContent plus a space is equal to the content, simply dismiss the modal -// if let preInsertedContent = self?.preInsertedContent { -// return content == preInsertedContent -// } -// return false -// } -// .assign(to: &$shouldDismiss) -// -// // bind compose bar button item UI state -// let isComposeContentEmpty = composeStatusAttribute.$composeContent -// .map { ($0 ?? "").isEmpty } -// let isComposeContentValid = $characterCount -// .compactMap { [weak self] characterCount -> Bool in -// guard let self = self else { return characterCount <= 500 } -// return characterCount <= self.composeContentLimit -// } -// let isMediaEmpty = $attachmentServices -// .map { $0.isEmpty } -// let isMediaUploadAllSuccess = $attachmentServices -// .map { services in -// services.allSatisfy { $0.uploadStateMachineSubject.value is MastodonAttachmentService.UploadState.Finish } -// } -// let isPollAttributeAllValid = $pollOptionAttributes -// .map { pollAttributes in -// pollAttributes.allSatisfy { attribute -> Bool in -// !attribute.option.value.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty -// } -// } -// -// let isPublishBarButtonItemEnabledPrecondition1 = Publishers.CombineLatest4( -// isComposeContentEmpty, -// isComposeContentValid, -// isMediaEmpty, -// isMediaUploadAllSuccess -// ) -// .map { isComposeContentEmpty, isComposeContentValid, isMediaEmpty, isMediaUploadAllSuccess -> Bool in -// if isMediaEmpty { -// return isComposeContentValid && !isComposeContentEmpty -// } else { -// return isComposeContentValid && isMediaUploadAllSuccess -// } -// } -// .eraseToAnyPublisher() -// -// let isPublishBarButtonItemEnabledPrecondition2 = Publishers.CombineLatest4( -// isComposeContentEmpty, -// isComposeContentValid, -// $isPollComposing, -// isPollAttributeAllValid -// ) -// .map { isComposeContentEmpty, isComposeContentValid, isPollComposing, isPollAttributeAllValid -> Bool in -// if isPollComposing { -// return isComposeContentValid && !isComposeContentEmpty && isPollAttributeAllValid -// } else { -// return isComposeContentValid && !isComposeContentEmpty -// } -// } -// .eraseToAnyPublisher() -// -// Publishers.CombineLatest( -// isPublishBarButtonItemEnabledPrecondition1, -// isPublishBarButtonItemEnabledPrecondition2 -// ) -// .map { $0 && $1 } -// .assign(to: &$isPublishBarButtonItemEnabled) -// } -//} -// -//extension ComposeViewModel { -// private func bind( -// cell: ComposeStatusContentTableViewCell, -// tableView: UITableView -// ) { -// // bind status content character count -// Publishers.CombineLatest3( -// composeStatusAttribute.$composeContent, -// composeStatusAttribute.$isContentWarningComposing, -// composeStatusAttribute.$contentWarningContent -// ) -// .map { composeContent, isContentWarningComposing, contentWarningContent -> Int in -// let composeContent = composeContent ?? "" -// var count = composeContent.count -// if isContentWarningComposing { -// count += contentWarningContent.count -// } -// return count -// } -// .assign(to: &$characterCount) -// -// // bind content warning -// composeStatusAttribute.$isContentWarningComposing -// .receive(on: DispatchQueue.main) -// .sink { [weak cell, weak tableView] isContentWarningComposing in -// guard let cell = cell else { return } -// guard let tableView = tableView else { return } -// -// // self size input cell -// cell.statusContentWarningEditorView.isHidden = !isContentWarningComposing -// cell.statusContentWarningEditorView.alpha = 0 -// UIView.animate(withDuration: 0.33, delay: 0, options: [.curveEaseOut]) { -// cell.statusContentWarningEditorView.alpha = 1 -// tableView.beginUpdates() -// tableView.endUpdates() -// } completion: { _ in -// // do nothing -// } -// } -// .store(in: &disposeBag) -// -// cell.contentWarningContent -// .removeDuplicates() -// .receive(on: DispatchQueue.main) -// .sink { [weak tableView, weak self] text in -// guard let self = self else { return } -// // bind input data -// self.composeStatusAttribute.contentWarningContent = text -// -// // self size input cell -// guard let tableView = tableView else { return } -// UIView.performWithoutAnimation { -// tableView.beginUpdates() -// tableView.endUpdates() -// } -// } -// .store(in: &cell.disposeBag) -// -// // configure custom emoji picker -// ComposeStatusSection.configureCustomEmojiPicker( -// viewModel: customEmojiPickerInputViewModel, -// customEmojiReplaceableTextInput: cell.metaText.textView, -// disposeBag: &disposeBag -// ) -// ComposeStatusSection.configureCustomEmojiPicker( -// viewModel: customEmojiPickerInputViewModel, -// customEmojiReplaceableTextInput: cell.statusContentWarningEditorView.textView, -// disposeBag: &disposeBag -// ) -// } -//} -// -//extension ComposeViewModel { -// private func bind( -// cell: ComposeStatusPollTableViewCell, -// tableView: UITableView -// ) { -// Publishers.CombineLatest( -// $isPollComposing, -// $pollOptionAttributes -// ) -// .receive(on: DispatchQueue.main) -// .sink { [weak self] isPollComposing, pollOptionAttributes in -// guard let self = self else { return } -// guard self.isViewAppeared else { return } -// -// let cell = self.composeStatusPollTableViewCell -// guard let dataSource = cell.dataSource else { return } -// -// var snapshot = NSDiffableDataSourceSnapshot() -// snapshot.appendSections([.main]) -// var items: [ComposeStatusPollItem] = [] -// if isPollComposing { -// for attribute in pollOptionAttributes { -// items.append(.pollOption(attribute: attribute)) -// } -// if pollOptionAttributes.count < self.maxPollOptions { -// items.append(.pollOptionAppendEntry) -// } -// items.append(.pollExpiresOption(attribute: self.pollExpiresOptionAttribute)) -// } -// snapshot.appendItems(items, toSection: .main) -// -// tableView.performBatchUpdates { -// if #available(iOS 15.0, *) { -// dataSource.apply(snapshot, animatingDifferences: false) -// } else { -// dataSource.apply(snapshot, animatingDifferences: true) -// } -// } -// } -// .store(in: &disposeBag) -// -// // bind delegate -// $pollOptionAttributes -// .sink { [weak self] pollAttributes in -// guard let self = self else { return } -// pollAttributes.forEach { $0.delegate = self } -// } -// .store(in: &disposeBag) -// } -//} -// -//extension ComposeViewModel { -// private func bind( -// cell: ComposeStatusAttachmentTableViewCell, -// tableView: UITableView -// ) { -// cell.collectionViewHeightDidUpdate -// .receive(on: DispatchQueue.main) -// .sink { [weak self] _ in -// guard let _ = self else { return } -// tableView.beginUpdates() -// tableView.endUpdates() -// } -// .store(in: &disposeBag) -// -// $attachmentServices -// .removeDuplicates() -// .receive(on: DispatchQueue.main) -// .sink { [weak self] attachmentServices in -// guard let self = self else { return } -// guard self.isViewAppeared else { return } -// -// let cell = self.composeStatusAttachmentTableViewCell -// guard let dataSource = cell.dataSource else { return } -// -// var snapshot = NSDiffableDataSourceSnapshot() -// snapshot.appendSections([.main]) -// let items = attachmentServices.map { ComposeStatusAttachmentItem.attachment(attachmentService: $0) } -// snapshot.appendItems(items, toSection: .main) -// -// if #available(iOS 15.0, *) { -// dataSource.applySnapshotUsingReloadData(snapshot) -// } else { -// dataSource.apply(snapshot, animatingDifferences: false) -// } -// } -// .store(in: &disposeBag) -// -// // setup attribute updater -// $attachmentServices -// .receive(on: DispatchQueue.main) -// .debounce(for: 0.3, scheduler: DispatchQueue.main) -// .sink { attachmentServices in -// // drive service upload state -// // make image upload in the queue -// for attachmentService in attachmentServices { -// // skip when prefix N task when task finish OR fail OR uploading -// guard let currentState = attachmentService.uploadStateMachine.currentState else { break } -// if currentState is MastodonAttachmentService.UploadState.Fail { -// continue -// } -// if currentState is MastodonAttachmentService.UploadState.Finish { -// continue -// } -// if currentState is MastodonAttachmentService.UploadState.Processing { -// continue -// } -// if currentState is MastodonAttachmentService.UploadState.Uploading { -// break -// } -// // trigger uploading one by one -// if currentState is MastodonAttachmentService.UploadState.Initial { -// attachmentService.uploadStateMachine.enter(MastodonAttachmentService.UploadState.Uploading.self) -// break -// } -// } -// } -// .store(in: &disposeBag) -// -// // bind delegate -// $attachmentServices -// .sink { [weak self] attachmentServices in -// guard let self = self else { return } -// attachmentServices.forEach { $0.delegate = self } -// } -// .store(in: &disposeBag) -// } -//} diff --git a/Mastodon/Scene/Compose/ComposeViewModel+PublishState.swift b/Mastodon/Scene/Compose/ComposeViewModel+PublishState.swift deleted file mode 100644 index b9ed18c45..000000000 --- a/Mastodon/Scene/Compose/ComposeViewModel+PublishState.swift +++ /dev/null @@ -1,164 +0,0 @@ -// -// ComposeViewModel+PublishState.swift -// Mastodon -// -// Created by MainasuK Cirno on 2021-3-18. -// - -import os.log -import Foundation -import Combine -import CoreDataStack -import GameplayKit -import MastodonSDK - -//extension ComposeViewModel { -// class PublishState: GKState { -// weak var viewModel: ComposeViewModel? -// -// init(viewModel: ComposeViewModel) { -// self.viewModel = viewModel -// } -// -// override func didEnter(from previousState: GKState?) { -// os_log("%{public}s[%{public}ld], %{public}s: enter %s, previous: %s", ((#file as NSString).lastPathComponent), #line, #function, self.debugDescription, previousState.debugDescription) -// viewModel?.publishStateMachinePublisher.value = self -// } -// } -//} - -//extension ComposeViewModel.PublishState { -// class Initial: ComposeViewModel.PublishState { -// override func isValidNextState(_ stateClass: AnyClass) -> Bool { -// return stateClass == Publishing.self -// } -// } -// -// class Publishing: ComposeViewModel.PublishState { -// -// var publishingSubscription: AnyCancellable? -// -// override func isValidNextState(_ stateClass: AnyClass) -> Bool { -// return stateClass == Fail.self || stateClass == Finish.self -// } -// -// override func didEnter(from previousState: GKState?) { -// super.didEnter(from: previousState) -// guard let viewModel = viewModel, let stateMachine = stateMachine else { return } -// -// viewModel.updatePublishDate() -// -// let authenticationBox = viewModel.authenticationBox -// let domain = authenticationBox.domain -// let attachmentServices = viewModel.attachmentServices -// let mediaIDs = attachmentServices.compactMap { attachmentService in -// attachmentService.attachment.value?.id -// } -// let pollOptions: [String]? = { -// guard viewModel.isPollComposing else { return nil } -// return viewModel.pollOptionAttributes.map { attribute in attribute.option.value } -// }() -// let pollExpiresIn: Int? = { -// guard viewModel.isPollComposing else { return nil } -// return viewModel.pollExpiresOptionAttribute.expiresOption.value.seconds -// }() -// let inReplyToID: Mastodon.Entity.Status.ID? = { -// guard case let .reply(status) = viewModel.composeKind else { return nil } -// var id: Mastodon.Entity.Status.ID? -// viewModel.context.managedObjectContext.performAndWait { -// guard let replyTo = status.object(in: viewModel.context.managedObjectContext) else { return } -// id = replyTo.id -// } -// return id -// }() -// let sensitive: Bool = viewModel.isContentWarningComposing -// let spoilerText: String? = { -// let text = viewModel.composeStatusAttribute.contentWarningContent.trimmingCharacters(in: .whitespacesAndNewlines) -// guard !text.isEmpty else { -// return nil -// } -// return text -// }() -// let visibility = viewModel.selectedStatusVisibility.visibility -// -// let updateMediaQuerySubscriptions: [AnyPublisher, Error>] = { -// var subscriptions: [AnyPublisher, Error>] = [] -// for attachmentService in attachmentServices { -// guard let attachmentID = attachmentService.attachment.value?.id else { continue } -// let description = attachmentService.description.value?.trimmingCharacters(in: .whitespacesAndNewlines) ?? "" -// guard !description.isEmpty else { continue } -// let query = Mastodon.API.Media.UpdateMediaQuery( -// file: nil, -// thumbnail: nil, -// description: description, -// focus: nil -// ) -// let subscription = viewModel.context.apiService.updateMedia( -// domain: domain, -// attachmentID: attachmentID, -// query: query, -// mastodonAuthenticationBox: authenticationBox -// ) -// subscriptions.append(subscription) -// } -// return subscriptions -// }() -// -// let idempotencyKey = viewModel.idempotencyKey.value -// -// publishingSubscription = Publishers.MergeMany(updateMediaQuerySubscriptions) -// .collect() -// .asyncMap { attachments -> Mastodon.Response.Content in -// let query = Mastodon.API.Statuses.PublishStatusQuery( -// status: viewModel.composeStatusAttribute.composeContent, -// mediaIDs: mediaIDs.isEmpty ? nil : mediaIDs, -// pollOptions: pollOptions, -// pollExpiresIn: pollExpiresIn, -// inReplyToID: inReplyToID, -// sensitive: sensitive, -// spoilerText: spoilerText, -// visibility: visibility -// ) -// return try await viewModel.context.apiService.publishStatus( -// domain: domain, -// idempotencyKey: idempotencyKey, -// query: query, -// authenticationBox: authenticationBox -// ) -// } -// .receive(on: DispatchQueue.main) -// .sink { completion in -// switch completion { -// case .failure(let error): -// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: publish status %s", ((#file as NSString).lastPathComponent), #line, #function, error.localizedDescription) -// stateMachine.enter(Fail.self) -// case .finished: -// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: publish status success", ((#file as NSString).lastPathComponent), #line, #function) -// stateMachine.enter(Finish.self) -// } -// } receiveValue: { response in -// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: status %s published: %s", ((#file as NSString).lastPathComponent), #line, #function, response.value.id, response.value.uri) -// } -// } -// } -// -// class Fail: ComposeViewModel.PublishState { -// override func isValidNextState(_ stateClass: AnyClass) -> Bool { -// // allow discard publishing -// return stateClass == Publishing.self || stateClass == Discard.self -// } -// } -// -// class Discard: ComposeViewModel.PublishState { -// override func isValidNextState(_ stateClass: AnyClass) -> Bool { -// return false -// } -// } -// -// class Finish: ComposeViewModel.PublishState { -// override func isValidNextState(_ stateClass: AnyClass) -> Bool { -// return false -// } -// } -// -//} diff --git a/Mastodon/Scene/Compose/ComposeViewModel.swift b/Mastodon/Scene/Compose/ComposeViewModel.swift index 45c9f1e93..bf234b095 100644 --- a/Mastodon/Scene/Compose/ComposeViewModel.swift +++ b/Mastodon/Scene/Compose/ComposeViewModel.swift @@ -18,7 +18,7 @@ import MastodonLocalization import MastodonMeta import MastodonUI -final class ComposeViewModel: NSObject { +final class ComposeViewModel { let logger = Logger(subsystem: "ComposeViewModel", category: "ViewModel") @@ -30,91 +30,13 @@ final class ComposeViewModel: NSObject { let context: AppContext let authContext: AuthContext let kind: ComposeContentViewModel.Kind - -// var authenticationBox: MastodonAuthenticationBox { -// authContext.mastodonAuthenticationBox -// } -// -// @Published var isPollComposing = false -// @Published var isCustomEmojiComposing = false -// @Published var isContentWarningComposing = false -// -// @Published var selectedStatusVisibility: ComposeToolbarView.VisibilitySelectionType -// @Published var repliedToCellFrame: CGRect = .zero -// @Published var autoCompleteRetryLayoutTimes = 0 -// @Published var autoCompleteInfo: ComposeViewController.AutoCompleteInfo? = nil let traitCollectionDidChangePublisher = CurrentValueSubject(Void()) // use CurrentValueSubject to make initial event emit -// var isViewAppeared = false // output -// let instanceConfiguration: Mastodon.Entity.Instance.Configuration? -// var composeContentLimit: Int { -// guard let maxCharacters = instanceConfiguration?.statuses?.maxCharacters else { return 500 } -// return max(1, maxCharacters) -// } -// var maxMediaAttachments: Int { -// guard let maxMediaAttachments = instanceConfiguration?.statuses?.maxMediaAttachments else { -// return 4 -// } -// // FIXME: update timeline media preview UI -// return min(4, max(1, maxMediaAttachments)) -// // return max(1, maxMediaAttachments) -// } -// var maxPollOptions: Int { -// guard let maxOptions = instanceConfiguration?.polls?.maxOptions else { return 4 } -// return max(2, maxOptions) -// } -// -// let composeStatusAttribute = ComposeStatusItem.ComposeStatusAttribute() -// let composeStatusContentTableViewCell = ComposeStatusContentTableViewCell() -// let composeStatusAttachmentTableViewCell = ComposeStatusAttachmentTableViewCell() -// let composeStatusPollTableViewCell = ComposeStatusPollTableViewCell() -// -// // var dataSource: UITableViewDiffableDataSource? -// var customEmojiPickerDiffableDataSource: UICollectionViewDiffableDataSource? -// private(set) lazy var publishStateMachine: GKStateMachine = { -// // exclude timeline middle fetcher state -// let stateMachine = GKStateMachine(states: [ -// PublishState.Initial(viewModel: self), -// PublishState.Publishing(viewModel: self), -// PublishState.Fail(viewModel: self), -// PublishState.Discard(viewModel: self), -// PublishState.Finish(viewModel: self), -// ]) -// stateMachine.enter(PublishState.Initial.self) -// return stateMachine -// }() -// private(set) lazy var publishStateMachinePublisher = CurrentValueSubject(nil) -// private(set) var publishDate = Date() // update it when enter Publishing state -// -// // TODO: group post material into Hashable class -// var idempotencyKey = CurrentValueSubject(UUID().uuidString) -// -// // UI & UX -// @Published var title: String -// @Published var shouldDismiss = true -// @Published var isPublishBarButtonItemEnabled = false -// @Published var isMediaToolbarButtonEnabled = true -// @Published var isPollToolbarButtonEnabled = true -// @Published var characterCount = 0 -// @Published var collectionViewState: CollectionViewState = .fold -// -// // for hashtag: "# " -// // for mention: "@ " -// var preInsertedContent: String? -// -// // custom emojis -// let customEmojiViewModel: EmojiService.CustomEmojiViewModel? -// let customEmojiPickerInputViewModel = CustomEmojiPickerInputViewModel() -// @Published var isLoadingCustomEmoji = false -// -// // attachment -// @Published var attachmentServices: [MastodonAttachmentService] = [] -// -// // polls -// @Published var pollOptionAttributes: [ComposeStatusPollItem.PollOptionAttribute] = [] -// let pollExpiresOptionAttribute = ComposeStatusPollItem.PollExpiresOptionAttribute() + + // UI & UX + @Published var title: String init( context: AppContext, @@ -124,63 +46,14 @@ final class ComposeViewModel: NSObject { self.context = context self.authContext = authContext self.kind = kind + // end init -// self.title = { -// switch composeKind { -// case .post, .hashtag, .mention: return L10n.Scene.Compose.Title.newPost -// case .reply: return L10n.Scene.Compose.Title.newReply -// } -// }() -// self.selectedStatusVisibility = { -// // default private when user locked -// var visibility: ComposeToolbarView.VisibilitySelectionType = { -// guard let author = authContext.mastodonAuthenticationBox.authenticationRecord.object(in: context.managedObjectContext)?.user -// else { -// return .public -// } -// return author.locked ? .private : .public -// }() -// // set visibility for reply post -// switch composeKind { -// case .reply(let record): -// context.managedObjectContext.performAndWait { -// guard let status = record.object(in: context.managedObjectContext) else { -// assertionFailure() -// return -// } -// let repliedStatusVisibility = status.visibility -// switch repliedStatusVisibility { -// case .public, .unlisted: -// // keep default -// break -// case .private: -// visibility = .private -// case .direct: -// visibility = .direct -// case ._other: -// assertionFailure() -// break -// } -// } -// default: -// break -// } -// return visibility -// }() -// // set limit -// self.instanceConfiguration = { -// var configuration: Mastodon.Entity.Instance.Configuration? = nil -// context.managedObjectContext.performAndWait { -// guard let authentication = authContext.mastodonAuthenticationBox.authenticationRecord.object(in: context.managedObjectContext) else { return } -// configuration = authentication.instance?.configuration -// } -// return configuration -// }() -// self.customEmojiViewModel = context.emojiService.dequeueCustomEmojiViewModel(for: authContext.mastodonAuthenticationBox.domain) -// super.init() -// // end init -// -// setup(cell: composeStatusContentTableViewCell) + self.title = { + switch kind { + case .post, .hashtag, .mention: return L10n.Scene.Compose.Title.newPost + case .reply: return L10n.Scene.Compose.Title.newReply + } + }() } deinit { @@ -188,194 +61,3 @@ final class ComposeViewModel: NSObject { } } - -extension ComposeViewModel { -// func createNewPollOptionIfPossible() { -// guard pollOptionAttributes.count < maxPollOptions else { return } -// -// let attribute = ComposeStatusPollItem.PollOptionAttribute() -// pollOptionAttributes = pollOptionAttributes + [attribute] -// } -// -// func updatePublishDate() { -// publishDate = Date() -// } -} - -//extension ComposeViewModel { -// -// enum AttachmentPrecondition: Error, LocalizedError { -// case videoAttachWithPhoto -// case moreThanOneVideo -// -// var errorDescription: String? { -// return L10n.Common.Alerts.PublishPostFailure.title -// } -// -// var failureReason: String? { -// switch self { -// case .videoAttachWithPhoto: -// return L10n.Common.Alerts.PublishPostFailure.AttachmentsMessage.videoAttachWithPhoto -// case .moreThanOneVideo: -// return L10n.Common.Alerts.PublishPostFailure.AttachmentsMessage.moreThanOneVideo -// } -// } -// } -// -// // check exclusive limit: -// // - up to 1 video -// // - up to N photos -// func checkAttachmentPrecondition() throws { -// let attachmentServices = self.attachmentServices -// guard !attachmentServices.isEmpty else { return } -// var photoAttachmentServices: [MastodonAttachmentService] = [] -// var videoAttachmentServices: [MastodonAttachmentService] = [] -// attachmentServices.forEach { service in -// guard let file = service.file.value else { -// assertionFailure() -// return -// } -// switch file { -// case .jpeg, .png, .gif: -// photoAttachmentServices.append(service) -// case .other: -// videoAttachmentServices.append(service) -// } -// } -// -// if !videoAttachmentServices.isEmpty { -// guard videoAttachmentServices.count == 1 else { -// throw AttachmentPrecondition.moreThanOneVideo -// } -// guard photoAttachmentServices.isEmpty else { -// throw AttachmentPrecondition.videoAttachWithPhoto -// } -// } -// } -// -//} -// -//// MARK: - MastodonAttachmentServiceDelegate -//extension ComposeViewModel: MastodonAttachmentServiceDelegate { -// func mastodonAttachmentService(_ service: MastodonAttachmentService, uploadStateDidChange state: MastodonAttachmentService.UploadState?) { -// // trigger new output event -// attachmentServices = attachmentServices -// } -//} -// -//// MARK: - ComposePollAttributeDelegate -//extension ComposeViewModel: ComposePollAttributeDelegate { -// func composePollAttribute(_ attribute: ComposeStatusPollItem.PollOptionAttribute, pollOptionDidChange: String?) { -// // trigger update -// pollOptionAttributes = pollOptionAttributes -// } -//} -// -//extension ComposeViewModel { -// private func setup( -// cell: ComposeStatusContentTableViewCell -// ) { -// setupStatusHeader(cell: cell) -// setupStatusAuthor(cell: cell) -// setupStatusContent(cell: cell) -// } -// -// private func setupStatusHeader( -// cell: ComposeStatusContentTableViewCell -// ) { -// // configure header -// let managedObjectContext = context.managedObjectContext -// managedObjectContext.performAndWait { -// guard case let .reply(record) = self.composeKind, -// let replyTo = record.object(in: managedObjectContext) -// else { -// cell.statusView.viewModel.header = .none -// return -// } -// -// let info: StatusView.ViewModel.Header.ReplyInfo -// do { -// let content = MastodonContent( -// content: replyTo.author.displayNameWithFallback, -// emojis: replyTo.author.emojis.asDictionary -// ) -// let metaContent = try MastodonMetaContent.convert(document: content) -// info = .init(header: metaContent) -// } catch { -// let metaContent = PlaintextMetaContent(string: replyTo.author.displayNameWithFallback) -// info = .init(header: metaContent) -// } -// cell.statusView.viewModel.header = .reply(info: info) -// } -// } -// -// private func setupStatusAuthor( -// cell: ComposeStatusContentTableViewCell -// ) { -// self.context.managedObjectContext.performAndWait { -// guard let author = authenticationBox.authenticationRecord.object(in: self.context.managedObjectContext)?.user else { return } -// cell.statusView.configureAuthor(author: author) -// } -// } -// -// private func setupStatusContent( -// cell: ComposeStatusContentTableViewCell -// ) { -// switch composeKind { -// case .reply(let record): -// context.managedObjectContext.performAndWait { -// guard let status = record.object(in: context.managedObjectContext) else { return } -// let author = self.authenticationBox.authenticationRecord.object(in: context.managedObjectContext)?.user -// -// var mentionAccts: [String] = [] -// if author?.id != status.author.id { -// mentionAccts.append("@" + status.author.acct) -// } -// let mentions = status.mentions -// .filter { author?.id != $0.id } -// for mention in mentions { -// let acct = "@" + mention.acct -// guard !mentionAccts.contains(acct) else { continue } -// mentionAccts.append(acct) -// } -// for acct in mentionAccts { -// UITextChecker.learnWord(acct) -// } -// if let spoilerText = status.spoilerText, !spoilerText.isEmpty { -// self.isContentWarningComposing = true -// self.composeStatusAttribute.contentWarningContent = spoilerText -// } -// -// let initialComposeContent = mentionAccts.joined(separator: " ") -// let preInsertedContent: String? = initialComposeContent.isEmpty ? nil : initialComposeContent + " " -// self.preInsertedContent = preInsertedContent -// self.composeStatusAttribute.composeContent = preInsertedContent -// } -// case .hashtag(let hashtag): -// let initialComposeContent = "#" + hashtag -// UITextChecker.learnWord(initialComposeContent) -// let preInsertedContent = initialComposeContent + " " -// self.preInsertedContent = preInsertedContent -// self.composeStatusAttribute.composeContent = preInsertedContent -// case .mention(let record): -// context.managedObjectContext.performAndWait { -// guard let user = record.object(in: context.managedObjectContext) else { return } -// let initialComposeContent = "@" + user.acct -// UITextChecker.learnWord(initialComposeContent) -// let preInsertedContent = initialComposeContent + " " -// self.preInsertedContent = preInsertedContent -// self.composeStatusAttribute.composeContent = preInsertedContent -// } -// case .post: -// self.preInsertedContent = nil -// } -// -// // configure content warning -// if let composeContent = composeStatusAttribute.composeContent { -// cell.metaText.textView.text = composeContent -// } -// -// // configure content warning -// cell.statusContentWarningEditorView.textView.text = composeStatusAttribute.contentWarningContent -// } -//} diff --git a/Mastodon/Scene/Profile/Follower/FollowerListViewModel.swift b/Mastodon/Scene/Profile/Follower/FollowerListViewModel.swift index 1b0d505b5..f96a02ddc 100644 --- a/Mastodon/Scene/Profile/Follower/FollowerListViewModel.swift +++ b/Mastodon/Scene/Profile/Follower/FollowerListViewModel.swift @@ -7,7 +7,6 @@ import Foundation import Combine -import Combine import CoreData import CoreDataStack import GameplayKit diff --git a/Mastodon/Scene/Report/ReportResult/ReportResultView.swift b/Mastodon/Scene/Report/ReportResult/ReportResultView.swift index 75021934b..361f5db24 100644 --- a/Mastodon/Scene/Report/ReportResult/ReportResultView.swift +++ b/Mastodon/Scene/Report/ReportResult/ReportResultView.swift @@ -8,7 +8,6 @@ import UIKit import SwiftUI import MastodonSDK -import MastodonUI import MastodonAsset import MastodonCore import MastodonUI diff --git a/Mastodon/Scene/Share/View/TableviewCell/StatusTableViewCell.swift b/Mastodon/Scene/Share/View/TableviewCell/StatusTableViewCell.swift index a3315211e..c9850a0d3 100644 --- a/Mastodon/Scene/Share/View/TableviewCell/StatusTableViewCell.swift +++ b/Mastodon/Scene/Share/View/TableviewCell/StatusTableViewCell.swift @@ -99,6 +99,10 @@ extension StatusTableViewCell { return true } + override var accessibilityCustomActions: [UIAccessibilityCustomAction]? { + get { statusView.accessibilityCustomActions } + set { } + } } // MARK: - AdaptiveContainerMarginTableViewCell diff --git a/MastodonIntent/sv.lproj/Intents.strings b/MastodonIntent/sv.lproj/Intents.strings index 526e495d2..793922506 100644 --- a/MastodonIntent/sv.lproj/Intents.strings +++ b/MastodonIntent/sv.lproj/Intents.strings @@ -38,7 +38,7 @@ "ehFLjY" = "Endast följare"; -"gfePDu" = "Publicering misslyckades. ${failureReason}"; +"gfePDu" = "Kunde inte publicera. ${failureReason}"; "k7dbKQ" = "Inlägget har publicerats."; diff --git a/MastodonIntent/vi.lproj/Intents.strings b/MastodonIntent/vi.lproj/Intents.strings index a95337317..80c01c640 100644 --- a/MastodonIntent/vi.lproj/Intents.strings +++ b/MastodonIntent/vi.lproj/Intents.strings @@ -30,7 +30,7 @@ "ayoYEb-dYQ5NN" = "${content}, Công khai"; -"ayoYEb-ehFLjY" = "${content}, Riêng tư"; +"ayoYEb-ehFLjY" = "${content}, Chỉ người theo dõi"; "dUyuGg" = "Đăng lên Mastodon"; diff --git a/MastodonSDK/Package.swift b/MastodonSDK/Package.swift index ca241038b..7a4201894 100644 --- a/MastodonSDK/Package.swift +++ b/MastodonSDK/Package.swift @@ -25,9 +25,9 @@ let package = Package( ], dependencies: [ .package(name: "ArkanaKeys", path: "../dependencies/ArkanaKeys"), - .package(name: "FaviconFinder", url: "https://github.com/will-lumley/FaviconFinder.git", from: "3.2.2"), - .package(name: "Introspect", url: "https://github.com/siteline/SwiftUI-Introspect.git", from: "0.1.3"), - .package(name: "UITextView+Placeholder", url: "https://github.com/MainasuK/UITextView-Placeholder.git", from: "1.4.1"), + .package(url: "https://github.com/will-lumley/FaviconFinder.git", from: "3.2.2"), + .package(url: "https://github.com/siteline/SwiftUI-Introspect.git", from: "0.1.3"), + .package(url: "https://github.com/MainasuK/UITextView-Placeholder.git", from: "1.4.1"), .package(url: "https://github.com/Alamofire/Alamofire.git", from: "5.4.0"), .package(url: "https://github.com/Alamofire/AlamofireImage.git", from: "4.1.0"), .package(url: "https://github.com/apple/swift-collections.git", from: "1.0.3"), @@ -49,6 +49,7 @@ let package = Package( .package(url: "https://github.com/SDWebImage/SDWebImage.git", from: "5.12.0"), .package(url: "https://github.com/eneko/Stripes.git", from: "0.2.0"), .package(url: "https://github.com/onevcat/Kingfisher.git", from: "7.4.1"), + .package(url: "https://github.com/NextLevel/NextLevelSessionExporter.git", from: "0.4.6"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -112,8 +113,8 @@ let package = Package( .product(name: "FLAnimatedImage", package: "FLAnimatedImage"), .product(name: "FaviconFinder", package: "FaviconFinder"), .product(name: "Nuke", package: "Nuke"), - .product(name: "Introspect", package: "Introspect"), - .product(name: "UITextView+Placeholder", package: "UITextView+Placeholder"), + .product(name: "Introspect", package: "SwiftUI-Introspect"), + .product(name: "UITextView+Placeholder", package: "UITextView-Placeholder"), .product(name: "UIHostingConfigurationBackport", package: "UIHostingConfigurationBackport"), .product(name: "TabBarPager", package: "TabBarPager"), .product(name: "ThirdPartyMailer", package: "ThirdPartyMailer"), @@ -124,6 +125,7 @@ let package = Package( .product(name: "PanModal", package: "PanModal"), .product(name: "Stripes", package: "Stripes"), .product(name: "Kingfisher", package: "Kingfisher"), + .product(name: "NextLevelSessionExporter", package: "NextLevelSessionExporter"), ] ), .testTarget( diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/Contents.json new file mode 100644 index 000000000..6e965652d --- /dev/null +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/Contents.json @@ -0,0 +1,9 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "provides-namespace" : true + } +} diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/indicator.button.background.colorset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/indicator.button.background.colorset/Contents.json new file mode 100644 index 000000000..7a1c8d9e2 --- /dev/null +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/indicator.button.background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.400", + "green" : "0.275", + "red" : "0.275" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.400", + "green" : "0.275", + "red" : "0.275" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/retry.imageset/Arrow Clockwise.pdf b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/retry.imageset/Arrow Clockwise.pdf new file mode 100644 index 000000000..a15c522d8 --- /dev/null +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/retry.imageset/Arrow Clockwise.pdf @@ -0,0 +1,91 @@ +%PDF-1.7 + +1 0 obj + << >> +endobj + +2 0 obj + << /Length 3 0 R >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 2.750000 2.750000 cm +0.000000 0.000000 0.000000 scn +9.250000 16.500000 m +5.245935 16.500000 2.000000 13.254065 2.000000 9.250000 c +2.000000 5.245935 5.245935 2.000000 9.250000 2.000000 c +13.254065 2.000000 16.500000 5.245935 16.500000 9.250000 c +16.500000 9.535608 16.483484 9.817360 16.451357 10.094351 c +16.383255 10.681498 16.809317 11.250000 17.400400 11.250000 c +17.916018 11.250000 18.369314 10.891933 18.431660 10.380100 c +18.476776 10.009713 18.500000 9.632568 18.500000 9.250000 c +18.500000 4.141366 14.358634 0.000000 9.250000 0.000000 c +4.141366 0.000000 0.000000 4.141366 0.000000 9.250000 c +0.000000 14.358634 4.141366 18.500000 9.250000 18.500000 c +11.423139 18.500000 13.421247 17.750608 15.000000 16.496151 c +15.000000 17.000000 l +15.000000 17.552284 15.447716 18.000000 16.000000 18.000000 c +16.552284 18.000000 17.000000 17.552284 17.000000 17.000000 c +17.000000 14.301708 l +17.011232 14.284512 17.022409 14.267276 17.033529 14.250000 c +17.000000 14.250000 l +17.000000 14.000000 l +17.000000 13.447716 16.552284 13.000000 16.000000 13.000000 c +13.000000 13.000000 l +12.447715 13.000000 12.000000 13.447716 12.000000 14.000000 c +12.000000 14.552284 12.447715 15.000000 13.000000 15.000000 c +13.666476 15.000000 l +12.443584 15.940684 10.912110 16.500000 9.250000 16.500000 c +h +f +n +Q + +endstream +endobj + +3 0 obj + 1365 +endobj + +4 0 obj + << /Annots [] + /Type /Page + /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ] + /Resources 1 0 R + /Contents 2 0 R + /Parent 5 0 R + >> +endobj + +5 0 obj + << /Kids [ 4 0 R ] + /Count 1 + /Type /Pages + >> +endobj + +6 0 obj + << /Pages 5 0 R + /Type /Catalog + >> +endobj + +xref +0 7 +0000000000 65535 f +0000000010 00000 n +0000000034 00000 n +0000001455 00000 n +0000001478 00000 n +0000001651 00000 n +0000001725 00000 n +trailer +<< /ID [ (some) (id) ] + /Root 6 0 R + /Size 7 +>> +startxref +1784 +%%EOF \ No newline at end of file diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/retry.imageset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/retry.imageset/Contents.json new file mode 100644 index 000000000..92bff3aca --- /dev/null +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/retry.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "Arrow Clockwise.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/stop.imageset/Contents.json b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/stop.imageset/Contents.json new file mode 100644 index 000000000..b2b588d4d --- /dev/null +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/stop.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "Dismiss.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/stop.imageset/Dismiss.pdf b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/stop.imageset/Dismiss.pdf new file mode 100644 index 000000000..0616f6275 --- /dev/null +++ b/MastodonSDK/Sources/MastodonAsset/Assets.xcassets/Scene/Compose/Attachment/stop.imageset/Dismiss.pdf @@ -0,0 +1,89 @@ +%PDF-1.7 + +1 0 obj + << >> +endobj + +2 0 obj + << /Length 3 0 R >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 4.000000 3.804749 cm +0.000000 0.000000 0.000000 scn +0.209704 15.808150 m +0.292893 15.902358 l +0.653377 16.262842 1.220608 16.290571 1.612899 15.985547 c +1.707107 15.902358 l +8.000000 9.610251 l +14.292892 15.902358 l +14.683416 16.292883 15.316584 16.292883 15.707108 15.902358 c +16.097631 15.511834 16.097631 14.878669 15.707108 14.488145 c +9.415000 8.195251 l +15.707108 1.902359 l +16.067591 1.541875 16.095320 0.974643 15.790295 0.582352 c +15.707108 0.488144 l +15.346623 0.127661 14.779391 0.099932 14.387100 0.404957 c +14.292892 0.488144 l +8.000000 6.780252 l +1.707107 0.488144 l +1.316582 0.097620 0.683418 0.097620 0.292893 0.488144 c +-0.097631 0.878668 -0.097631 1.511835 0.292893 1.902359 c +6.585000 8.195251 l +0.292893 14.488145 l +-0.067591 14.848629 -0.095320 15.415859 0.209704 15.808150 c +0.292893 15.902358 l +0.209704 15.808150 l +h +f +n +Q + +endstream +endobj + +3 0 obj + 914 +endobj + +4 0 obj + << /Annots [] + /Type /Page + /MediaBox [ 0.000000 0.000000 24.000000 24.000000 ] + /Resources 1 0 R + /Contents 2 0 R + /Parent 5 0 R + >> +endobj + +5 0 obj + << /Kids [ 4 0 R ] + /Count 1 + /Type /Pages + >> +endobj + +6 0 obj + << /Pages 5 0 R + /Type /Catalog + >> +endobj + +xref +0 7 +0000000000 65535 f +0000000010 00000 n +0000000034 00000 n +0000001004 00000 n +0000001026 00000 n +0000001199 00000 n +0000001273 00000 n +trailer +<< /ID [ (some) (id) ] + /Root 6 0 R + /Size 7 +>> +startxref +1332 +%%EOF \ No newline at end of file diff --git a/MastodonSDK/Sources/MastodonAsset/Generated/Assets.swift b/MastodonSDK/Sources/MastodonAsset/Generated/Assets.swift index 5cd0059d8..fc47acdfd 100644 --- a/MastodonSDK/Sources/MastodonAsset/Generated/Assets.swift +++ b/MastodonSDK/Sources/MastodonAsset/Generated/Assets.swift @@ -130,6 +130,11 @@ public enum Asset { } public enum Scene { public enum Compose { + public enum Attachment { + public static let indicatorButtonBackground = ColorAsset(name: "Scene/Compose/Attachment/indicator.button.background") + public static let retry = ImageAsset(name: "Scene/Compose/Attachment/retry") + public static let stop = ImageAsset(name: "Scene/Compose/Attachment/stop") + } public static let earth = ImageAsset(name: "Scene/Compose/Earth") public static let mention = ImageAsset(name: "Scene/Compose/Mention") public static let more = ImageAsset(name: "Scene/Compose/More") diff --git a/MastodonSDK/Sources/MastodonCore/Model/Compose/CustomEmojiPickerItem.swift b/MastodonSDK/Sources/MastodonCore/Model/Compose/CustomEmojiPickerItem.swift index 52f522703..6174f4687 100644 --- a/MastodonSDK/Sources/MastodonCore/Model/Compose/CustomEmojiPickerItem.swift +++ b/MastodonSDK/Sources/MastodonCore/Model/Compose/CustomEmojiPickerItem.swift @@ -8,28 +8,28 @@ import Foundation import MastodonSDK -enum CustomEmojiPickerItem { +public enum CustomEmojiPickerItem { case emoji(attribute: CustomEmojiAttribute) } extension CustomEmojiPickerItem: Equatable, Hashable { } extension CustomEmojiPickerItem { - final class CustomEmojiAttribute: Equatable, Hashable { - let id = UUID() + public final class CustomEmojiAttribute: Equatable, Hashable { + public let id = UUID() - let emoji: Mastodon.Entity.Emoji + public let emoji: Mastodon.Entity.Emoji - init(emoji: Mastodon.Entity.Emoji) { + public init(emoji: Mastodon.Entity.Emoji) { self.emoji = emoji } - static func == (lhs: CustomEmojiPickerItem.CustomEmojiAttribute, rhs: CustomEmojiPickerItem.CustomEmojiAttribute) -> Bool { + public static func == (lhs: CustomEmojiPickerItem.CustomEmojiAttribute, rhs: CustomEmojiPickerItem.CustomEmojiAttribute) -> Bool { return lhs.id == rhs.id && lhs.emoji.shortcode == rhs.emoji.shortcode } - func hash(into hasher: inout Hasher) { + public func hash(into hasher: inout Hasher) { hasher.combine(id) } } diff --git a/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift b/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift index d6a2d2579..b9afdf8eb 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift +++ b/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift @@ -291,8 +291,6 @@ public enum L10n { return L10n.tr("Localizable", "Common.Controls.Status.UserRepliedTo", String(describing: p1)) } public enum Actions { - /// Bookmark - public static let bookmark = L10n.tr("Localizable", "Common.Controls.Status.Actions.Bookmark") /// Favorite public static let favorite = L10n.tr("Localizable", "Common.Controls.Status.Actions.Favorite") /// Hide @@ -311,13 +309,29 @@ public enum L10n { public static let showVideoPlayer = L10n.tr("Localizable", "Common.Controls.Status.Actions.ShowVideoPlayer") /// Tap then hold to show menu public static let tapThenHoldToShowMenu = L10n.tr("Localizable", "Common.Controls.Status.Actions.TapThenHoldToShowMenu") - /// Unbookmark - public static let unbookmark = L10n.tr("Localizable", "Common.Controls.Status.Actions.Unbookmark") /// Unfavorite public static let unfavorite = L10n.tr("Localizable", "Common.Controls.Status.Actions.Unfavorite") /// Undo reblog public static let unreblog = L10n.tr("Localizable", "Common.Controls.Status.Actions.Unreblog") } + public enum MetaEntity { + /// Email address: %@ + public static func email(_ p1: Any) -> String { + return L10n.tr("Localizable", "Common.Controls.Status.MetaEntity.Email", String(describing: p1)) + } + /// Hastag %@ + public static func hashtag(_ p1: Any) -> String { + return L10n.tr("Localizable", "Common.Controls.Status.MetaEntity.Hashtag", String(describing: p1)) + } + /// Show Profile: %@ + public static func mention(_ p1: Any) -> String { + return L10n.tr("Localizable", "Common.Controls.Status.MetaEntity.Mention", String(describing: p1)) + } + /// Link: %@ + public static func url(_ p1: Any) -> String { + return L10n.tr("Localizable", "Common.Controls.Status.MetaEntity.Url", String(describing: p1)) + } + } public enum Poll { /// Closed public static let closed = L10n.tr("Localizable", "Common.Controls.Status.Poll.Closed") @@ -412,7 +426,7 @@ public enum L10n { } } public enum Bookmark { - /// Your Bookmarks + /// Bookmarks public static let title = L10n.tr("Localizable", "Scene.Bookmark.Title") } public enum Compose { @@ -722,7 +736,7 @@ public enum L10n { public enum ConfirmHideReblogs { /// Confirm to hide reblogs public static let message = L10n.tr("Localizable", "Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message") - /// Hide reblogs + /// Hide Reblogs public static let title = L10n.tr("Localizable", "Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title") } public enum ConfirmMuteUser { diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/ar.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/ar.lproj/Localizable.strings index 3814c14a7..9ecfa450e 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/ar.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/ar.lproj/Localizable.strings @@ -68,11 +68,13 @@ "Common.Controls.Friendship.EditInfo" = "تَحريرُ المَعلُومات"; "Common.Controls.Friendship.Follow" = "مُتابَعَة"; "Common.Controls.Friendship.Following" = "مُتابَع"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "كَتم"; "Common.Controls.Friendship.MuteUser" = "كَتمُ %@"; "Common.Controls.Friendship.Muted" = "مكتوم"; "Common.Controls.Friendship.Pending" = "قيد المُراجعة"; "Common.Controls.Friendship.Request" = "إرسال طَلَب"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "رفع الحَظر"; "Common.Controls.Friendship.UnblockUser" = "رفع الحَظر عن %@"; "Common.Controls.Friendship.Unmute" = "رفع الكتم"; @@ -149,6 +151,7 @@ "Scene.AccountList.AddAccount" = "إضافَةُ حِساب"; "Scene.AccountList.DismissAccountSwitcher" = "تجاهُل مبدِّل الحِساب"; "Scene.AccountList.TabBarHint" = "المِلَفُّ المُحدَّدُ حالِيًّا: %@. اُنقُر نَقرًا مُزدَوَجًا مَعَ الاِستِمرارِ لِإظهارِ مُبدِّلِ الحِساب"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "إضافة مُرفَق"; "Scene.Compose.Accessibility.AppendPoll" = "اضافة استطلاع رأي"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "منتقي الرموز التعبيرية المُخصَّص"; @@ -253,8 +256,12 @@ "Scene.Profile.Header.FollowsYou" = "يُتابِعُك"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "تأكيدُ حَظر %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "حَظرُ الحِساب"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "تأكيدُ كَتم %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "كَتمُ الحِساب"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "تأكيدُ رَفع الحَظرِ عَن %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "رَفعُ الحَظرِ عَنِ الحِساب"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "أكِّد لرفع الكتمْ عن %@"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/ca.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/ca.lproj/Localizable.strings index 5e11b147a..1e691f8a9 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/ca.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/ca.lproj/Localizable.strings @@ -68,11 +68,13 @@ Comprova la teva connexió a Internet."; "Common.Controls.Friendship.EditInfo" = "Edita"; "Common.Controls.Friendship.Follow" = "Segueix"; "Common.Controls.Friendship.Following" = "Seguint"; +"Common.Controls.Friendship.HideReblogs" = "Amaga els impulsos"; "Common.Controls.Friendship.Mute" = "Silencia"; "Common.Controls.Friendship.MuteUser" = "Silencia %@"; "Common.Controls.Friendship.Muted" = "Silenciat"; "Common.Controls.Friendship.Pending" = "Pendent"; "Common.Controls.Friendship.Request" = "Petició"; +"Common.Controls.Friendship.ShowReblogs" = "Mostra els impulsos"; "Common.Controls.Friendship.Unblock" = "Desbloqueja"; "Common.Controls.Friendship.UnblockUser" = "Desbloqueja %@"; "Common.Controls.Friendship.Unmute" = "Deixa de silenciar"; @@ -149,6 +151,7 @@ El teu perfil els sembla així."; "Scene.AccountList.AddAccount" = "Afegir compte"; "Scene.AccountList.DismissAccountSwitcher" = "Descartar el commutador de comptes"; "Scene.AccountList.TabBarHint" = "Perfil actual seleccionat: %@. Toca dues vegades i manté el dit per a mostrar el commutador de comptes"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Afegeix Adjunt"; "Scene.Compose.Accessibility.AppendPoll" = "Afegir enquesta"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Selector d'Emoji Personalitzat"; @@ -253,8 +256,12 @@ carregat a Mastodon."; "Scene.Profile.Header.FollowsYou" = "Et segueix"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Confirma per a bloquejar %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Bloqueja el Compte"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirma per a amagar els impulsos"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Amaga Impulsos"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Confirma per a silenciar %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Silencia el Compte"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirma per a mostrar els impulsos"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Mostra els Impulsos"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Confirma per a desbloquejar %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Desbloqueja el Compte"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Confirma deixar de silenciar a %@"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/ckb.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/ckb.lproj/Localizable.strings index 3653f3810..053211f28 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/ckb.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/ckb.lproj/Localizable.strings @@ -68,11 +68,13 @@ "Common.Controls.Friendship.EditInfo" = "دەستکاری"; "Common.Controls.Friendship.Follow" = "شوێنی بکەوە"; "Common.Controls.Friendship.Following" = "شوێنی دەکەویت"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "بێدەنگی بکە"; "Common.Controls.Friendship.MuteUser" = "%@ بێدەنگە"; "Common.Controls.Friendship.Muted" = "بێدەنگ کراوە"; "Common.Controls.Friendship.Pending" = "داوات کردووە"; "Common.Controls.Friendship.Request" = "داوای لێ بکە"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "ئاستەنگی مەکە"; "Common.Controls.Friendship.UnblockUser" = "%@ ئاستەنگ مەکە"; "Common.Controls.Friendship.Unmute" = "بێدەنگی مەکە"; @@ -149,6 +151,7 @@ "Scene.AccountList.AddAccount" = "هەژمارێک زیاد بکە"; "Scene.AccountList.DismissAccountSwitcher" = "پێڕستی هەژمارەکان دابخە"; "Scene.AccountList.TabBarHint" = "هەژماری ئێستا: %@. دوو جا دەستی پیا بنێ بۆ کردنەوەی پێڕستی هەژمارەکان."; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "پێوەکراوی پێوە بکە"; "Scene.Compose.Accessibility.AppendPoll" = "دەنگدان زیاد بکە"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "هەڵبژێری ئیمۆجی"; @@ -252,8 +255,12 @@ "Scene.Profile.Header.FollowsYou" = "Follows You"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "دڵنیا ببەوە بۆ ئاستەنگکردنی %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "ئاستەنگی بکە"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "دڵیا ببەوە بۆ بێدەنگکردنی %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "بێدەنگی بکە"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "دڵنیا ببەوە بۆ لابردنی ئاستەنگی %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "ئاستەنگی مەکە"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "دڵنیا ببەوە بۆ بێدەنگنەکردنی %@"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/de.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/de.lproj/Localizable.strings index 3b1622945..0a78adc48 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/de.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/de.lproj/Localizable.strings @@ -68,11 +68,13 @@ Bitte überprüfe deine Internetverbindung."; "Common.Controls.Friendship.EditInfo" = "Information bearbeiten"; "Common.Controls.Friendship.Follow" = "Folgen"; "Common.Controls.Friendship.Following" = "Folge Ich"; +"Common.Controls.Friendship.HideReblogs" = "Reblogs ausblenden"; "Common.Controls.Friendship.Mute" = "Stummschalten"; "Common.Controls.Friendship.MuteUser" = "%@ stummschalten"; "Common.Controls.Friendship.Muted" = "Stummgeschaltet"; "Common.Controls.Friendship.Pending" = "In Warteschlange"; "Common.Controls.Friendship.Request" = "Anfragen"; +"Common.Controls.Friendship.ShowReblogs" = "Reblogs anzeigen"; "Common.Controls.Friendship.Unblock" = "Blockierung aufheben"; "Common.Controls.Friendship.UnblockUser" = "Blockierung von %@ aufheben"; "Common.Controls.Friendship.Unmute" = "Nicht mehr stummschalten"; @@ -149,6 +151,7 @@ Dein Profil sieht für diesen Benutzer auch so aus."; "Scene.AccountList.AddAccount" = "Konto hinzufügen"; "Scene.AccountList.DismissAccountSwitcher" = "Dialog zum Wechseln des Kontos schließen"; "Scene.AccountList.TabBarHint" = "Aktuell ausgewähltes Profil: %@. Doppeltippen dann gedrückt halten, um den Kontoschalter anzuzeigen"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Anhang hinzufügen"; "Scene.Compose.Accessibility.AppendPoll" = "Umfrage hinzufügen"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Benutzerdefinierter Emojiwähler"; @@ -200,7 +203,7 @@ kann nicht auf Mastodon hochgeladen werden."; "Scene.ConfirmEmail.OpenEmailApp.OpenEmailClient" = "E-Mail-Client öffnen"; "Scene.ConfirmEmail.OpenEmailApp.Title" = "Überprüfe deinen Posteingang."; "Scene.ConfirmEmail.Subtitle" = "Schaue kurz in dein E-Mail-Postfach und tippe den Link an, den wir dir gesendet haben."; -"Scene.ConfirmEmail.TapTheLinkWeEmailedToYouToVerifyYourAccount" = "Tap the link we emailed to you to verify your account"; +"Scene.ConfirmEmail.TapTheLinkWeEmailedToYouToVerifyYourAccount" = "Schaue kurz in dein E-Mail-Postfach und tippe den Link an, den wir dir gesendet haben"; "Scene.ConfirmEmail.Title" = "Noch eine letzte Sache."; "Scene.Discovery.Intro" = "Dies sind die Beiträge, die in deiner Umgebung auf Mastodon beliebter werden."; "Scene.Discovery.Tabs.Community" = "Community"; @@ -208,25 +211,25 @@ kann nicht auf Mastodon hochgeladen werden."; "Scene.Discovery.Tabs.Hashtags" = "Hashtags"; "Scene.Discovery.Tabs.News" = "Nachrichten"; "Scene.Discovery.Tabs.Posts" = "Beiträge"; -"Scene.Familiarfollowers.FollowedByNames" = "Followed by %@"; -"Scene.Familiarfollowers.Title" = "Followers you familiar"; +"Scene.Familiarfollowers.FollowedByNames" = "Gefolgt von %@"; +"Scene.Familiarfollowers.Title" = "Follower, die dir bekannt vorkommen"; "Scene.Favorite.Title" = "Deine Favoriten"; -"Scene.FavoritedBy.Title" = "Favorited By"; +"Scene.FavoritedBy.Title" = "Favorisiert von"; "Scene.Follower.Footer" = "Follower von anderen Servern werden nicht angezeigt."; -"Scene.Follower.Title" = "follower"; +"Scene.Follower.Title" = "Follower"; "Scene.Following.Footer" = "Wem das Konto folgt wird von anderen Servern werden nicht angezeigt."; -"Scene.Following.Title" = "following"; -"Scene.HomeTimeline.NavigationBarState.Accessibility.LogoHint" = "Tap to scroll to top and tap again to previous location"; -"Scene.HomeTimeline.NavigationBarState.Accessibility.LogoLabel" = "Logo Button"; +"Scene.Following.Title" = "Folgende"; +"Scene.HomeTimeline.NavigationBarState.Accessibility.LogoHint" = "Zum Scrollen nach oben tippen und zum vorherigen Ort erneut tippen"; +"Scene.HomeTimeline.NavigationBarState.Accessibility.LogoLabel" = "Logo-Button"; "Scene.HomeTimeline.NavigationBarState.NewPosts" = "Neue Beiträge anzeigen"; "Scene.HomeTimeline.NavigationBarState.Offline" = "Offline"; "Scene.HomeTimeline.NavigationBarState.Published" = "Veröffentlicht!"; "Scene.HomeTimeline.NavigationBarState.Publishing" = "Beitrag wird veröffentlicht..."; "Scene.HomeTimeline.Title" = "Startseite"; -"Scene.Notification.FollowRequest.Accept" = "Accept"; -"Scene.Notification.FollowRequest.Accepted" = "Accepted"; -"Scene.Notification.FollowRequest.Reject" = "reject"; -"Scene.Notification.FollowRequest.Rejected" = "Rejected"; +"Scene.Notification.FollowRequest.Accept" = "Akzeptieren"; +"Scene.Notification.FollowRequest.Accepted" = "Akzeptiert"; +"Scene.Notification.FollowRequest.Reject" = "Ablehnen"; +"Scene.Notification.FollowRequest.Rejected" = "Abgelehnt"; "Scene.Notification.Keyobard.ShowEverything" = "Alles anzeigen"; "Scene.Notification.Keyobard.ShowMentions" = "Erwähnungen anzeigen"; "Scene.Notification.NotificationDescription.FavoritedYourPost" = "hat deinen Beitrag favorisiert"; @@ -250,11 +253,15 @@ kann nicht auf Mastodon hochgeladen werden."; "Scene.Profile.Fields.AddRow" = "Zeile hinzufügen"; "Scene.Profile.Fields.Placeholder.Content" = "Inhalt"; "Scene.Profile.Fields.Placeholder.Label" = "Bezeichnung"; -"Scene.Profile.Header.FollowsYou" = "Follows You"; +"Scene.Profile.Header.FollowsYou" = "Folgt dir"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Bestätige %@ zu blockieren"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Konto blockieren"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Reblogs ausblenden"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Bestätige %@ stumm zu schalten"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Konto stummschalten"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Reblogs anzeigen"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Bestätige %@ zu entsperren"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Konto entsperren"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Bestätige um %@ nicht mehr stummzuschalten"; @@ -264,7 +271,7 @@ kann nicht auf Mastodon hochgeladen werden."; "Scene.Profile.SegmentedControl.Posts" = "Beiträge"; "Scene.Profile.SegmentedControl.PostsAndReplies" = "Beiträge und Antworten"; "Scene.Profile.SegmentedControl.Replies" = "Antworten"; -"Scene.RebloggedBy.Title" = "Reblogged By"; +"Scene.RebloggedBy.Title" = "Geteilt von"; "Scene.Register.Error.Item.Agreement" = "Vereinbarung"; "Scene.Register.Error.Item.Email" = "E-Mail"; "Scene.Register.Error.Item.Locale" = "Sprache"; @@ -297,7 +304,7 @@ kann nicht auf Mastodon hochgeladen werden."; "Scene.Register.Input.Password.Require" = "Anforderungen an dein Passwort:"; "Scene.Register.Input.Username.DuplicatePrompt" = "Dieser Benutzername ist vergeben."; "Scene.Register.Input.Username.Placeholder" = "Benutzername"; -"Scene.Register.LetsGetYouSetUpOnDomain" = "Let’s get you set up on %@"; +"Scene.Register.LetsGetYouSetUpOnDomain" = "Okay, lass uns mit %@ anfangen"; "Scene.Register.Title" = "Erzähle uns von dir."; "Scene.Report.Content1" = "Gibt es noch weitere Beiträge, die du der Meldung hinzufügen möchtest?"; "Scene.Report.Content2" = "Gibt es etwas, was die Moderatoren über diese Meldung wissen sollten?"; @@ -307,38 +314,38 @@ kann nicht auf Mastodon hochgeladen werden."; "Scene.Report.SkipToSend" = "Ohne Kommentar abschicken"; "Scene.Report.Step1" = "Schritt 1 von 2"; "Scene.Report.Step2" = "Schritt 2 von 2"; -"Scene.Report.StepFinal.BlockUser" = "Block %@"; -"Scene.Report.StepFinal.DontWantToSeeThis" = "Don’t want to see this?"; -"Scene.Report.StepFinal.MuteUser" = "Mute %@"; -"Scene.Report.StepFinal.TheyWillNoLongerBeAbleToFollowOrSeeYourPostsButTheyCanSeeIfTheyveBeenBlocked" = "They will no longer be able to follow or see your posts, but they can see if they’ve been blocked."; -"Scene.Report.StepFinal.Unfollow" = "Unfollow"; -"Scene.Report.StepFinal.UnfollowUser" = "Unfollow %@"; -"Scene.Report.StepFinal.Unfollowed" = "Unfollowed"; -"Scene.Report.StepFinal.WhenYouSeeSomethingYouDontLikeOnMastodonYouCanRemoveThePersonFromYourExperience." = "When you see something you don’t like on Mastodon, you can remove the person from your experience."; -"Scene.Report.StepFinal.WhileWeReviewThisYouCanTakeActionAgainstUser" = "While we review this, you can take action against %@"; -"Scene.Report.StepFinal.YouWontSeeTheirPostsOrReblogsInYourHomeFeedTheyWontKnowTheyVeBeenMuted" = "You won’t see their posts or reblogs in your home feed. They won’t know they’ve been muted."; -"Scene.Report.StepFour.IsThereAnythingElseWeShouldKnow" = "Is there anything else we should know?"; -"Scene.Report.StepFour.Step4Of4" = "Step 4 of 4"; -"Scene.Report.StepOne.IDontLikeIt" = "I don’t like it"; -"Scene.Report.StepOne.ItIsNotSomethingYouWantToSee" = "It is not something you want to see"; -"Scene.Report.StepOne.ItViolatesServerRules" = "It violates server rules"; -"Scene.Report.StepOne.ItsSomethingElse" = "It’s something else"; -"Scene.Report.StepOne.ItsSpam" = "It’s spam"; -"Scene.Report.StepOne.MaliciousLinksFakeEngagementOrRepetetiveReplies" = "Malicious links, fake engagement, or repetetive replies"; -"Scene.Report.StepOne.SelectTheBestMatch" = "Select the best match"; -"Scene.Report.StepOne.Step1Of4" = "Step 1 of 4"; -"Scene.Report.StepOne.TheIssueDoesNotFitIntoOtherCategories" = "The issue does not fit into other categories"; -"Scene.Report.StepOne.WhatsWrongWithThisAccount" = "What's wrong with this account?"; -"Scene.Report.StepOne.WhatsWrongWithThisPost" = "What's wrong with this post?"; -"Scene.Report.StepOne.WhatsWrongWithThisUsername" = "What's wrong with %@?"; -"Scene.Report.StepOne.YouAreAwareThatItBreaksSpecificRules" = "You are aware that it breaks specific rules"; -"Scene.Report.StepThree.AreThereAnyPostsThatBackUpThisReport" = "Are there any posts that back up this report?"; -"Scene.Report.StepThree.SelectAllThatApply" = "Select all that apply"; -"Scene.Report.StepThree.Step3Of4" = "Step 3 of 4"; -"Scene.Report.StepTwo.IJustDon’tLikeIt" = "I just don’t like it"; -"Scene.Report.StepTwo.SelectAllThatApply" = "Select all that apply"; -"Scene.Report.StepTwo.Step2Of4" = "Step 2 of 4"; -"Scene.Report.StepTwo.WhichRulesAreBeingViolated" = "Which rules are being violated?"; +"Scene.Report.StepFinal.BlockUser" = "%@ blockieren"; +"Scene.Report.StepFinal.DontWantToSeeThis" = "Du willst das nicht mehr sehen?"; +"Scene.Report.StepFinal.MuteUser" = "%@ stummschalten"; +"Scene.Report.StepFinal.TheyWillNoLongerBeAbleToFollowOrSeeYourPostsButTheyCanSeeIfTheyveBeenBlocked" = "Du wirst die Beiträge von diesem Konto nicht sehen. Das Konto wird nicht in der Lage sein, deine Beiträge zu sehen oder dir zu folgen. Die Person hinter dem Konto wird wissen, dass du das Konto blockiert hast."; +"Scene.Report.StepFinal.Unfollow" = "Entfolgen"; +"Scene.Report.StepFinal.UnfollowUser" = "%@ entfolgen"; +"Scene.Report.StepFinal.Unfollowed" = "Entfolgt"; +"Scene.Report.StepFinal.WhenYouSeeSomethingYouDontLikeOnMastodonYouCanRemoveThePersonFromYourExperience." = "Wenn du etwas auf Mastodon nicht sehen willst, kannst du den Nutzer aus deiner Erfahrung streichen."; +"Scene.Report.StepFinal.WhileWeReviewThisYouCanTakeActionAgainstUser" = "Während wir dies überprüfen, kannst du gegen %@ vorgehen"; +"Scene.Report.StepFinal.YouWontSeeTheirPostsOrReblogsInYourHomeFeedTheyWontKnowTheyVeBeenMuted" = "Du wirst die Beiträge vom Konto nicht mehr sehen. Das Konto kann dir immer noch folgen, und die Person hinter dem Konto wird deine Beiträge sehen können und nicht wissen, dass du sie stummgeschaltet hast."; +"Scene.Report.StepFour.IsThereAnythingElseWeShouldKnow" = "Gibt es etwas anderes, was wir wissen sollten?"; +"Scene.Report.StepFour.Step4Of4" = "Schritt 4 von 4"; +"Scene.Report.StepOne.IDontLikeIt" = "Mir gefällt das nicht"; +"Scene.Report.StepOne.ItIsNotSomethingYouWantToSee" = "Das ist etwas, das man nicht sehen möchte"; +"Scene.Report.StepOne.ItViolatesServerRules" = "Es verstößt gegen Serverregeln"; +"Scene.Report.StepOne.ItsSomethingElse" = "Das ist was anderes"; +"Scene.Report.StepOne.ItsSpam" = "Das ist Spam"; +"Scene.Report.StepOne.MaliciousLinksFakeEngagementOrRepetetiveReplies" = "Bösartige Links, gefälschtes Engagement oder wiederholte Antworten"; +"Scene.Report.StepOne.SelectTheBestMatch" = "Wähle die passende Kategorie"; +"Scene.Report.StepOne.Step1Of4" = "Schritt 1 von 4"; +"Scene.Report.StepOne.TheIssueDoesNotFitIntoOtherCategories" = "Das Problem passt nicht in die Kategorien"; +"Scene.Report.StepOne.WhatsWrongWithThisAccount" = "Was stimmt mit diesem Konto nicht?"; +"Scene.Report.StepOne.WhatsWrongWithThisPost" = "Was stimmt mit diesem Beitrag nicht?"; +"Scene.Report.StepOne.WhatsWrongWithThisUsername" = "Was ist los mit %@?"; +"Scene.Report.StepOne.YouAreAwareThatItBreaksSpecificRules" = "Du weißt, welche Regeln verletzt werden"; +"Scene.Report.StepThree.AreThereAnyPostsThatBackUpThisReport" = "Gibt es Beiträge, die diesen Bericht unterstützen?"; +"Scene.Report.StepThree.SelectAllThatApply" = "Alles Zutreffende auswählen"; +"Scene.Report.StepThree.Step3Of4" = "Schritt 3 von 4"; +"Scene.Report.StepTwo.IJustDon’tLikeIt" = "Das gefällt mir einfach nicht"; +"Scene.Report.StepTwo.SelectAllThatApply" = "Alles Zutreffende auswählen"; +"Scene.Report.StepTwo.Step2Of4" = "Schritt 2 von 4"; +"Scene.Report.StepTwo.WhichRulesAreBeingViolated" = "Welche Regeln werden verletzt?"; "Scene.Report.TextPlaceholder" = "Zusätzliche Kommentare eingeben oder einfügen"; "Scene.Report.Title" = "%@ melden"; "Scene.Report.TitleReport" = "Melden"; @@ -379,7 +386,7 @@ kann nicht auf Mastodon hochgeladen werden."; "Scene.ServerPicker.EmptyState.FindingServers" = "Verfügbare Server werden gesucht..."; "Scene.ServerPicker.EmptyState.NoResults" = "Keine Ergebnisse"; "Scene.ServerPicker.Input.Placeholder" = "Nach Server suchen oder URL eingeben"; -"Scene.ServerPicker.Input.SearchServersOrEnterUrl" = "Search servers or enter URL"; +"Scene.ServerPicker.Input.SearchServersOrEnterUrl" = "Nach Server suchen oder URL eingeben"; "Scene.ServerPicker.Label.Category" = "KATEGORIE"; "Scene.ServerPicker.Label.Language" = "SPRACHE"; "Scene.ServerPicker.Label.Users" = "BENUTZER"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/de.lproj/Localizable.stringsdict b/MastodonSDK/Sources/MastodonLocalization/Resources/de.lproj/Localizable.stringsdict index 3ea0fd0e3..c6a8a4297 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/de.lproj/Localizable.stringsdict +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/de.lproj/Localizable.stringsdict @@ -21,7 +21,7 @@ a11y.plural.count.input_limit_exceeds NSStringLocalizedFormatKey - Eingabelimit überschritten %#@character_count@ + Zeichenanzahl um %#@character_count@ überschritten character_count NSStringFormatSpecTypeKey @@ -37,7 +37,7 @@ a11y.plural.count.input_limit_remains NSStringLocalizedFormatKey - Eingabelimit eingehalten %#@character_count@ + Noch %#@character_count@ übrig character_count NSStringFormatSpecTypeKey @@ -72,9 +72,9 @@ NSStringFormatValueTypeKey ld one - Followed by %1$@, and another mutual + Gefolgt von %1$@ und einer weiteren Person, der du folgst other - Followed by %1$@, and %ld mutuals + Gefolgt von %1$@ und %ld weiteren Personen, denen du folgst plural.count.metric_formatted.post @@ -104,9 +104,9 @@ NSStringFormatValueTypeKey ld one - 1 media + 1 Datei other - %ld media + %ld Dateien plural.count.post @@ -200,7 +200,7 @@ NSStringFormatValueTypeKey ld one - 1 Wähler + 1 Wähler:in other %ld Wähler @@ -216,9 +216,9 @@ NSStringFormatValueTypeKey ld one - 1 Mensch spricht + Eine Person redet other - %ld Leute reden + %ld Personen reden plural.count.following @@ -360,7 +360,7 @@ NSStringFormatValueTypeKey ld one - vor 1 Jahr + vor einem Jahr other vor %ld Jahren @@ -376,7 +376,7 @@ NSStringFormatValueTypeKey ld one - vor 1 M + vor einem Monat other vor %ld Monaten @@ -392,7 +392,7 @@ NSStringFormatValueTypeKey ld one - vor 1 Tag + vor einem Tag other vor %ld Tagen @@ -408,7 +408,7 @@ NSStringFormatValueTypeKey ld one - vor 1 Stunde + vor einer Stunde other vor %ld Stunden @@ -424,7 +424,7 @@ NSStringFormatValueTypeKey ld one - vor 1 Minute + vor einer Minute other vor %ld Minuten @@ -440,7 +440,7 @@ NSStringFormatValueTypeKey ld one - vor 1 Sekunde + vor einer Sekunde other vor %ld Sekuden diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings index 494d49fdc..0522c6b8c 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings @@ -68,18 +68,17 @@ Please check your internet connection."; "Common.Controls.Friendship.EditInfo" = "Edit Info"; "Common.Controls.Friendship.Follow" = "Follow"; "Common.Controls.Friendship.Following" = "Following"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "Mute"; "Common.Controls.Friendship.MuteUser" = "Mute %@"; "Common.Controls.Friendship.Muted" = "Muted"; "Common.Controls.Friendship.Pending" = "Pending"; "Common.Controls.Friendship.Request" = "Request"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "Unblock"; "Common.Controls.Friendship.UnblockUser" = "Unblock %@"; "Common.Controls.Friendship.Unmute" = "Unmute"; "Common.Controls.Friendship.UnmuteUser" = "Unmute %@"; -"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; -"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; - "Common.Controls.Keyboard.Common.ComposeNewPost" = "Compose New Post"; "Common.Controls.Keyboard.Common.OpenSettings" = "Open Settings"; "Common.Controls.Keyboard.Common.ShowFavorites" = "Show Favorites"; @@ -107,10 +106,12 @@ Please check your internet connection."; "Common.Controls.Status.Actions.TapThenHoldToShowMenu" = "Tap then hold to show menu"; "Common.Controls.Status.Actions.Unfavorite" = "Unfavorite"; "Common.Controls.Status.Actions.Unreblog" = "Undo reblog"; -"Common.Controls.Status.Actions.Bookmark" = "Bookmark"; -"Common.Controls.Status.Actions.Unbookmark" = "Unbookmark"; "Common.Controls.Status.ContentWarning" = "Content Warning"; "Common.Controls.Status.MediaContentWarning" = "Tap anywhere to reveal"; +"Common.Controls.Status.MetaEntity.Email" = "Email address: %@"; +"Common.Controls.Status.MetaEntity.Hashtag" = "Hastag %@"; +"Common.Controls.Status.MetaEntity.Mention" = "Show Profile: %@"; +"Common.Controls.Status.MetaEntity.Url" = "Link: %@"; "Common.Controls.Status.Poll.Closed" = "Closed"; "Common.Controls.Status.Poll.Vote" = "Vote"; "Common.Controls.Status.SensitiveContent" = "Sensitive Content"; @@ -154,7 +155,7 @@ Your profile looks like this to them."; "Scene.AccountList.AddAccount" = "Add Account"; "Scene.AccountList.DismissAccountSwitcher" = "Dismiss Account Switcher"; "Scene.AccountList.TabBarHint" = "Current selected profile: %@. Double tap then hold to show account switcher"; -"Scene.Bookmark.Title" = "Your Bookmarks"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Add Attachment"; "Scene.Compose.Accessibility.AppendPoll" = "Add Poll"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Custom Emoji Picker"; @@ -261,16 +262,16 @@ uploaded to Mastodon."; "Scene.Profile.Header.FollowsYou" = "Follows You"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Confirm to block %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Block Account"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Confirm to mute %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Mute Account"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Confirm to unblock %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Unblock Account"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Confirm to unmute %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Title" = "Unmute Account"; -"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; -"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; -"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; -"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide reblogs"; "Scene.Profile.SegmentedControl.About" = "About"; "Scene.Profile.SegmentedControl.Media" = "Media"; "Scene.Profile.SegmentedControl.Posts" = "Posts"; @@ -449,4 +450,4 @@ uploaded to Mastodon."; back in your hands."; "Scene.Wizard.AccessibilityHint" = "Double tap to dismiss this wizard"; "Scene.Wizard.MultipleAccountSwitchIntroDescription" = "Switch between multiple accounts by holding the profile button."; -"Scene.Wizard.NewInMastodon" = "New in Mastodon"; +"Scene.Wizard.NewInMastodon" = "New in Mastodon"; \ No newline at end of file diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/es.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/es.lproj/Localizable.strings index 0e6ba2582..47ed11bb9 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/es.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/es.lproj/Localizable.strings @@ -68,11 +68,13 @@ Por favor, revise su conexión a internet."; "Common.Controls.Friendship.EditInfo" = "Editar Info"; "Common.Controls.Friendship.Follow" = "Seguir"; "Common.Controls.Friendship.Following" = "Siguiendo"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "Silenciar"; "Common.Controls.Friendship.MuteUser" = "Silenciar a %@"; "Common.Controls.Friendship.Muted" = "Silenciado"; "Common.Controls.Friendship.Pending" = "Pendiente"; "Common.Controls.Friendship.Request" = "Solicitud"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "Desbloquear"; "Common.Controls.Friendship.UnblockUser" = "Desbloquear a %@"; "Common.Controls.Friendship.Unmute" = "Desmutear"; @@ -149,6 +151,7 @@ Tu perfil se ve así para él."; "Scene.AccountList.AddAccount" = "Añadir cuenta"; "Scene.AccountList.DismissAccountSwitcher" = "Descartar el selector de cuentas"; "Scene.AccountList.TabBarHint" = "Perfil seleccionado actualmente: %@. Haz un doble toque y mantén pulsado para mostrar el selector de cuentas"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Añadir Adjunto"; "Scene.Compose.Accessibility.AppendPoll" = "Añadir Encuesta"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Selector de Emojis Personalizados"; @@ -254,8 +257,12 @@ pulsa en el enlace para confirmar tu cuenta."; "Scene.Profile.Header.FollowsYou" = "Te sigue"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Confirmar para bloquear a %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Bloquear cuenta"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Confirmar para silenciar %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Silenciar cuenta"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Confirmar para desbloquear a %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Desbloquear cuenta"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Confirmar para dejar de silenciar a %@"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/eu.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/eu.lproj/Localizable.strings index aad4ad238..e2be3068d 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/eu.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/eu.lproj/Localizable.strings @@ -68,11 +68,13 @@ Egiaztatu Interneteko konexioa."; "Common.Controls.Friendship.EditInfo" = "Editatu informazioa"; "Common.Controls.Friendship.Follow" = "Jarraitu"; "Common.Controls.Friendship.Following" = "Jarraitzen"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "Mututu"; "Common.Controls.Friendship.MuteUser" = "Mututu %@"; "Common.Controls.Friendship.Muted" = "Mutututa"; "Common.Controls.Friendship.Pending" = "Zain"; "Common.Controls.Friendship.Request" = "Eskaera"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "Desblokeatu"; "Common.Controls.Friendship.UnblockUser" = "Desblokeatu %@"; "Common.Controls.Friendship.Unmute" = "Desmututu"; @@ -149,6 +151,7 @@ Zure profilak itxura hau du berarentzat."; "Scene.AccountList.AddAccount" = "Gehitu kontua"; "Scene.AccountList.DismissAccountSwitcher" = "Baztertu kontu-aldatzailea"; "Scene.AccountList.TabBarHint" = "Unean hautatutako profila: %@. Ukitu birritan, ondoren eduki sakatuta kontu-aldatzailea erakusteko"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Gehitu eranskina"; "Scene.Compose.Accessibility.AppendPoll" = "Gehitu inkesta"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Emoji pertsonalizatuen hautatzailea"; @@ -253,8 +256,12 @@ Mastodonera igo."; "Scene.Profile.Header.FollowsYou" = "Follows You"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Berretsi %@ blokeatzea"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Blokeatu kontua"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Berretsi %@ mututzea"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Mututu kontua"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Berretsi %@ desblokeatzea"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Desblokeatu kontua"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Berretsi %@ desmututzea"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/fi.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/fi.lproj/Localizable.strings index 3987e7749..fbf48fa83 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/fi.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/fi.lproj/Localizable.strings @@ -68,11 +68,13 @@ Tarkista internet-yhteytesi."; "Common.Controls.Friendship.EditInfo" = "Muokkaa profiilia"; "Common.Controls.Friendship.Follow" = "Seuraa"; "Common.Controls.Friendship.Following" = "Seurataan"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "Mykistä"; "Common.Controls.Friendship.MuteUser" = "Mykistä %@"; "Common.Controls.Friendship.Muted" = "Mykistetty"; "Common.Controls.Friendship.Pending" = "Pyydetty"; "Common.Controls.Friendship.Request" = "Pyydä"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "Poista esto"; "Common.Controls.Friendship.UnblockUser" = "Unblock %@"; "Common.Controls.Friendship.Unmute" = "Poista mykistys"; @@ -149,6 +151,7 @@ Profiilisi näyttää tältä hänelle."; "Scene.AccountList.AddAccount" = "Lisää tili"; "Scene.AccountList.DismissAccountSwitcher" = "Sulje tilin vaihtaja"; "Scene.AccountList.TabBarHint" = "Nykyinen valittu profiili: %@. Kaksoisnapauta ja pidä sitten painettuna näytääksesi tilin vaihtajan"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Lisää liite"; "Scene.Compose.Accessibility.AppendPoll" = "Lisää kysely"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Mukautettu emojivalitsin"; @@ -253,8 +256,12 @@ uploaded to Mastodon."; "Scene.Profile.Header.FollowsYou" = "Follows You"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Confirm to block %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Block Account"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Confirm to mute %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Mute Account"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Confirm to unblock %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Unblock Account"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Vahvista, että haluat poistaa mykistyksen tililtä %@"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/fr.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/fr.lproj/Localizable.strings index 5e0b9be61..03efc3549 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/fr.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/fr.lproj/Localizable.strings @@ -17,13 +17,13 @@ Veuillez vérifier votre accès à Internet."; "Common.Alerts.PublishPostFailure.Title" = "La publication a échoué"; "Common.Alerts.SavePhotoFailure.Message" = "Veuillez activer la permission d'accès à la photothèque pour enregistrer la photo."; "Common.Alerts.SavePhotoFailure.Title" = "Échec de l'enregistrement de la photo"; -"Common.Alerts.ServerError.Title" = "Erreur du serveur"; +"Common.Alerts.ServerError.Title" = "Erreur serveur"; "Common.Alerts.SignOut.Confirm" = "Se déconnecter"; "Common.Alerts.SignOut.Message" = "Voulez-vous vraiment vous déconnecter ?"; "Common.Alerts.SignOut.Title" = "Se déconnecter"; "Common.Alerts.SignUpFailure.Title" = "Échec de l'inscription"; "Common.Alerts.VoteFailure.PollEnded" = "Le sondage est terminé"; -"Common.Alerts.VoteFailure.Title" = "Le vote n’a pas pu être enregistré"; +"Common.Alerts.VoteFailure.Title" = "Échec du vote"; "Common.Controls.Actions.Add" = "Ajouter"; "Common.Controls.Actions.Back" = "Retour"; "Common.Controls.Actions.BlockDomain" = "Bloquer %@"; @@ -68,11 +68,13 @@ Veuillez vérifier votre accès à Internet."; "Common.Controls.Friendship.EditInfo" = "Éditer les infos"; "Common.Controls.Friendship.Follow" = "Suivre"; "Common.Controls.Friendship.Following" = "Suivi"; +"Common.Controls.Friendship.HideReblogs" = "Masquer les Reblogs"; "Common.Controls.Friendship.Mute" = "Masquer"; "Common.Controls.Friendship.MuteUser" = "Ignorer %@"; "Common.Controls.Friendship.Muted" = "Masqué"; "Common.Controls.Friendship.Pending" = "En attente"; "Common.Controls.Friendship.Request" = "Requête"; +"Common.Controls.Friendship.ShowReblogs" = "Afficher les Reblogs"; "Common.Controls.Friendship.Unblock" = "Débloquer"; "Common.Controls.Friendship.UnblockUser" = "Débloquer %@"; "Common.Controls.Friendship.Unmute" = "Ne plus ignorer"; @@ -149,6 +151,7 @@ Votre profil ressemble à ça pour lui."; "Scene.AccountList.AddAccount" = "Ajouter un compte"; "Scene.AccountList.DismissAccountSwitcher" = "Rejeter le commutateur de compte"; "Scene.AccountList.TabBarHint" = "Profil sélectionné actuel: %@. Double appui puis maintenez enfoncé pour afficher le changement de compte"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Joindre un document"; "Scene.Compose.Accessibility.AppendPoll" = "Ajouter un Sondage"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Sélecteur d’émojis personnalisés"; @@ -211,11 +214,11 @@ téléversé sur Mastodon."; "Scene.Familiarfollowers.FollowedByNames" = "Suivi·e par %@"; "Scene.Familiarfollowers.Title" = "Abonné·e·s que vous connaissez"; "Scene.Favorite.Title" = "Vos favoris"; -"Scene.FavoritedBy.Title" = "Favorited By"; +"Scene.FavoritedBy.Title" = "Favoris par"; "Scene.Follower.Footer" = "Les abonné·e·s issus des autres serveurs ne sont pas affiché·e·s."; "Scene.Follower.Title" = "abonné·e"; "Scene.Following.Footer" = "Les abonnés issus des autres serveurs ne sont pas affichés."; -"Scene.Following.Title" = "following"; +"Scene.Following.Title" = "abonnement"; "Scene.HomeTimeline.NavigationBarState.Accessibility.LogoHint" = "Appuyez pour faire défiler vers le haut et appuyez à nouveau vers l'emplacement précédent"; "Scene.HomeTimeline.NavigationBarState.Accessibility.LogoLabel" = "Bouton logo"; "Scene.HomeTimeline.NavigationBarState.NewPosts" = "Voir les nouvelles publications"; @@ -253,8 +256,12 @@ téléversé sur Mastodon."; "Scene.Profile.Header.FollowsYou" = "Vous suit"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Confirmer le blocage de %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Bloquer le compte"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirmer pour masquer les reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Masquer les Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Êtes-vous sûr de vouloir mettre en sourdine %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Masquer le compte"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirmer pour afficher les reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Afficher les Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Confirmer le déblocage de %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Débloquer le compte"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Êtes-vous sûr de vouloir désactiver la sourdine de %@"; @@ -264,7 +271,7 @@ téléversé sur Mastodon."; "Scene.Profile.SegmentedControl.Posts" = "Publications"; "Scene.Profile.SegmentedControl.PostsAndReplies" = "Messages et réponses"; "Scene.Profile.SegmentedControl.Replies" = "Réponses"; -"Scene.RebloggedBy.Title" = "Reblogged By"; +"Scene.RebloggedBy.Title" = "Reblogué par"; "Scene.Register.Error.Item.Agreement" = "Accord"; "Scene.Register.Error.Item.Email" = "Courriel"; "Scene.Register.Error.Item.Locale" = "Lieu"; @@ -313,7 +320,7 @@ téléversé sur Mastodon."; "Scene.Report.StepFinal.TheyWillNoLongerBeAbleToFollowOrSeeYourPostsButTheyCanSeeIfTheyveBeenBlocked" = "Ils ne seront plus en mesure de suivre ou de voir vos messages, mais iels peuvent voir s’iels ont été bloqué·e·s."; "Scene.Report.StepFinal.Unfollow" = "Se désabonner"; "Scene.Report.StepFinal.UnfollowUser" = "Ne plus suivre %@"; -"Scene.Report.StepFinal.Unfollowed" = "Unfollowed"; +"Scene.Report.StepFinal.Unfollowed" = "Non-suivi"; "Scene.Report.StepFinal.WhenYouSeeSomethingYouDontLikeOnMastodonYouCanRemoveThePersonFromYourExperience." = "Quand vous voyez quelque chose que vous n’aimez pas sur Mastodon, vous pouvez retirer la personne de votre expérience."; "Scene.Report.StepFinal.WhileWeReviewThisYouCanTakeActionAgainstUser" = "Pendant que nous étudions votre requête, vous pouvez prendre des mesures contre %@"; "Scene.Report.StepFinal.YouWontSeeTheirPostsOrReblogsInYourHomeFeedTheyWontKnowTheyVeBeenMuted" = "Vous ne verrez plus leurs messages ou leurs partages dans votre flux personnel. Iels ne sauront pas qu’iels ont été mis en sourdine."; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/gd.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/gd.lproj/Localizable.strings index 1bb94dc2c..2d1964d81 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/gd.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/gd.lproj/Localizable.strings @@ -1,11 +1,11 @@ "Common.Alerts.BlockDomain.BlockEntireDomain" = "Bac an àrainn"; -"Common.Alerts.BlockDomain.Title" = "A bheil thu cinnteach dha-rìribh gu bheil thu airson an àrainn %@ a bhacadh uile gu lèir? Mar as trice, foghnaidh gun dèan thu bacadh no mùchadh no dhà gu sònraichte agus bhiod sin na b’ fheàrr. Chan fhaic thu susbaint on àrainn ud agus thèid an luchd-leantainn agad on àrainn ud a thoirt air falbh."; +"Common.Alerts.BlockDomain.Title" = "A bheil thu cinnteach dha-rìribh gu bheil thu airson an àrainn %@ a bhacadh uile gu lèir? Mar as trice, foghnaidh gun dèan thu bacadh no mùchadh no dhà gu sònraichte agus bhiodh sin na b’ fheàrr. Chan fhaic thu susbaint on àrainn ud agus thèid an luchd-leantainn agad on àrainn ud a thoirt air falbh."; "Common.Alerts.CleanCache.Message" = "Chaidh %@ a thasgadan fhalamhachadh."; "Common.Alerts.CleanCache.Title" = "Falamhaich an tasgadan"; "Common.Alerts.Common.PleaseTryAgain" = "Feuch ris a-rithist."; "Common.Alerts.Common.PleaseTryAgainLater" = "Feuch ris a-rithist an ceann greis."; "Common.Alerts.DeletePost.Message" = "A bheil thu cinnteach gu bheil thu airson am post seo a sguabadh às?"; -"Common.Alerts.DeletePost.Title" = "A bheil thu cinnteach gu bheil thu airson am post seo a sguabadh às?"; +"Common.Alerts.DeletePost.Title" = "Sguab às am post"; "Common.Alerts.DiscardPostContent.Message" = "Dearbh tilgeil air falbh susbaint a’ phuist a sgrìobh thu."; "Common.Alerts.DiscardPostContent.Title" = "Tilg air falbh an dreachd"; "Common.Alerts.EditProfileFailure.Message" = "Cha b’ urrainn dhuinn a’ pròifil a dheasachadh. Feuch ris a-rithist."; @@ -66,13 +66,15 @@ Thoir sùil air a’ cheangal agad ris an eadar-lìon."; "Common.Controls.Friendship.BlockUser" = "Bac %@"; "Common.Controls.Friendship.Blocked" = "’Ga bhacadh"; "Common.Controls.Friendship.EditInfo" = "Deasaich"; -"Common.Controls.Friendship.Follow" = "Lean air"; +"Common.Controls.Friendship.Follow" = "Lean"; "Common.Controls.Friendship.Following" = "’Ga leantainn"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "Mùch"; "Common.Controls.Friendship.MuteUser" = "Mùch %@"; "Common.Controls.Friendship.Muted" = "’Ga mhùchadh"; "Common.Controls.Friendship.Pending" = "Ri dhèiligeadh"; "Common.Controls.Friendship.Request" = "Iarrtas"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "Dì-bhac"; "Common.Controls.Friendship.UnblockUser" = "Dì-bhac %@"; "Common.Controls.Friendship.Unmute" = "Dì-mhùch"; @@ -149,6 +151,7 @@ Seo an coltas a th’ air a’ phròifil agad dhaibh-san."; "Scene.AccountList.AddAccount" = "Cuir cunntas ris"; "Scene.AccountList.DismissAccountSwitcher" = "Leig seachad taghadh a’ chunntais"; "Scene.AccountList.TabBarHint" = "A’ phròifil air a taghadh: %@. Thoir gnogag dhùbailte is cùm sìos a ghearradh leum gu cunntas eile"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Cuir ceanglachan ris"; "Scene.Compose.Accessibility.AppendPoll" = "Cuir cunntas-bheachd ris"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Roghnaichear nan Emoji gnàthaichte"; @@ -199,9 +202,8 @@ a luchdadh suas gu Mastodon."; "Scene.ConfirmEmail.OpenEmailApp.Mail" = "Post"; "Scene.ConfirmEmail.OpenEmailApp.OpenEmailClient" = "Fosgail cliant puist-d"; "Scene.ConfirmEmail.OpenEmailApp.Title" = "Thoir sùil air a’ bhogsa a-steach agad."; -"Scene.ConfirmEmail.Subtitle" = "Tha sinn air post-d a chur gu %@, -thoir gnogag air a’ chunntas a dhearbhadh a’ chunntais agad."; -"Scene.ConfirmEmail.TapTheLinkWeEmailedToYouToVerifyYourAccount" = "Tap the link we emailed to you to verify your account"; +"Scene.ConfirmEmail.Subtitle" = "Thoir gnogag air a’ cheangal a chuir sinn thugad air a’ phost-d airson an cunntas agad a dhearbhadh."; +"Scene.ConfirmEmail.TapTheLinkWeEmailedToYouToVerifyYourAccount" = "Thoir gnogag air a’ cheangal a chuir sinn thugad air a’ phost-d airson an cunntas agad a dhearbhadh"; "Scene.ConfirmEmail.Title" = "Aon rud eile."; "Scene.Discovery.Intro" = "Seo na postaichean fèillmhor ’nad cheàrnaidh de Mhastodon."; "Scene.Discovery.Tabs.Community" = "Coimhearsnachd"; @@ -209,25 +211,25 @@ thoir gnogag air a’ chunntas a dhearbhadh a’ chunntais agad."; "Scene.Discovery.Tabs.Hashtags" = "Tagaichean hais"; "Scene.Discovery.Tabs.News" = "Naidheachdan"; "Scene.Discovery.Tabs.Posts" = "Postaichean"; -"Scene.Familiarfollowers.FollowedByNames" = "Followed by %@"; -"Scene.Familiarfollowers.Title" = "Followers you familiar"; +"Scene.Familiarfollowers.FollowedByNames" = "’Ga leantainn le %@"; +"Scene.Familiarfollowers.Title" = "Luchd-leantainn aithnichte"; "Scene.Favorite.Title" = "Na h-annsachdan agad"; -"Scene.FavoritedBy.Title" = "Favorited By"; +"Scene.FavoritedBy.Title" = "’Na annsachd aig"; "Scene.Follower.Footer" = "Cha dèid luchd-leantainn o fhrithealaichean eile a shealltainn."; -"Scene.Follower.Title" = "follower"; -"Scene.Following.Footer" = "Cha dèid cò air a leanas tu air frithealaichean eile a shealltainn."; -"Scene.Following.Title" = "following"; -"Scene.HomeTimeline.NavigationBarState.Accessibility.LogoHint" = "Tap to scroll to top and tap again to previous location"; -"Scene.HomeTimeline.NavigationBarState.Accessibility.LogoLabel" = "Logo Button"; +"Scene.Follower.Title" = "neach-leantainn"; +"Scene.Following.Footer" = "Cha dèid cò a leanas tu air frithealaichean eile a shealltainn."; +"Scene.Following.Title" = "’ga leantainn"; +"Scene.HomeTimeline.NavigationBarState.Accessibility.LogoHint" = "Thoir gnogag a sgroladh dhan bhàrr is thoir gnogag a-rithist a dhol dhan ionad roimhe"; +"Scene.HomeTimeline.NavigationBarState.Accessibility.LogoLabel" = "Putan an t-suaicheantais"; "Scene.HomeTimeline.NavigationBarState.NewPosts" = "Seall na postaichean ùra"; "Scene.HomeTimeline.NavigationBarState.Offline" = "Far loidhne"; "Scene.HomeTimeline.NavigationBarState.Published" = "Chaidh fhoillseachadh!"; "Scene.HomeTimeline.NavigationBarState.Publishing" = "A’ foillseachadh a’ phuist…"; "Scene.HomeTimeline.Title" = "Dachaigh"; -"Scene.Notification.FollowRequest.Accept" = "Accept"; -"Scene.Notification.FollowRequest.Accepted" = "Accepted"; -"Scene.Notification.FollowRequest.Reject" = "reject"; -"Scene.Notification.FollowRequest.Rejected" = "Rejected"; +"Scene.Notification.FollowRequest.Accept" = "Gabh ris"; +"Scene.Notification.FollowRequest.Accepted" = "Air a ghabhail ris"; +"Scene.Notification.FollowRequest.Reject" = "diùlt"; +"Scene.Notification.FollowRequest.Rejected" = "Chaidh a dhiùltadh"; "Scene.Notification.Keyobard.ShowEverything" = "Seall a h-uile càil"; "Scene.Notification.Keyobard.ShowMentions" = "Seall na h-iomraidhean"; "Scene.Notification.NotificationDescription.FavoritedYourPost" = "– is annsa leotha am post agad"; @@ -235,7 +237,7 @@ thoir gnogag air a’ chunntas a dhearbhadh a’ chunntais agad."; "Scene.Notification.NotificationDescription.MentionedYou" = "– ’s iad air iomradh a thoirt ort"; "Scene.Notification.NotificationDescription.PollHasEnded" = "thàinig cunntas-bheachd gu crìoch"; "Scene.Notification.NotificationDescription.RebloggedYourPost" = "– ’s iad air am post agad a bhrosnachadh"; -"Scene.Notification.NotificationDescription.RequestToFollowYou" = "iarrtas leantainn ort"; +"Scene.Notification.NotificationDescription.RequestToFollowYou" = "iarrtas leantainn"; "Scene.Notification.Title.Everything" = "A h-uile rud"; "Scene.Notification.Title.Mentions" = "Iomraidhean"; "Scene.Preview.Keyboard.ClosePreview" = "Dùin an ro-shealladh"; @@ -251,11 +253,15 @@ thoir gnogag air a’ chunntas a dhearbhadh a’ chunntais agad."; "Scene.Profile.Fields.AddRow" = "Cuir ràgh ris"; "Scene.Profile.Fields.Placeholder.Content" = "Susbaint"; "Scene.Profile.Fields.Placeholder.Label" = "Leubail"; -"Scene.Profile.Header.FollowsYou" = "Follows You"; +"Scene.Profile.Header.FollowsYou" = "’Gad leantainn"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Dearbh bacadh %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Bac an cunntas"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Dearbh mùchadh %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Mùch an cunntas"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Dearbh dì-bhacadh %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Dì-bhac an cunntas"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Dearbh dì-mhùchadh %@"; @@ -265,7 +271,7 @@ thoir gnogag air a’ chunntas a dhearbhadh a’ chunntais agad."; "Scene.Profile.SegmentedControl.Posts" = "Postaichean"; "Scene.Profile.SegmentedControl.PostsAndReplies" = "Postaichean ’s freagairtean"; "Scene.Profile.SegmentedControl.Replies" = "Freagairtean"; -"Scene.RebloggedBy.Title" = "Reblogged By"; +"Scene.RebloggedBy.Title" = "’Ga bhrosnachadh le"; "Scene.Register.Error.Item.Agreement" = "Aonta"; "Scene.Register.Error.Item.Email" = "Post-d"; "Scene.Register.Error.Item.Locale" = "Sgeama ionadail"; @@ -298,8 +304,8 @@ thoir gnogag air a’ chunntas a dhearbhadh a’ chunntais agad."; "Scene.Register.Input.Password.Require" = "Feumaidh am facal-faire agad co-dhiù:"; "Scene.Register.Input.Username.DuplicatePrompt" = "Tha an t-ainm-cleachdaiche seo aig cuideigin eile."; "Scene.Register.Input.Username.Placeholder" = "ainm-cleachdaiche"; -"Scene.Register.LetsGetYouSetUpOnDomain" = "Let’s get you set up on %@"; -"Scene.Register.Title" = "Innis dhuinn mu do dhèidhinn."; +"Scene.Register.LetsGetYouSetUpOnDomain" = "’Gad rèiteachadh air %@"; +"Scene.Register.Title" = "’Gad rèiteachadh air %@"; "Scene.Report.Content1" = "A bheil post sam bith eile ann a bu mhiann leat cur ris a’ ghearan?"; "Scene.Report.Content2" = "A bheil rud sam bith ann a bu mhiann leat innse dha na maoir mun ghearan seo?"; "Scene.Report.ReportSentTitle" = "Mòran taing airson a’ ghearain, bheir sinn sùil air."; @@ -308,43 +314,43 @@ thoir gnogag air a’ chunntas a dhearbhadh a’ chunntais agad."; "Scene.Report.SkipToSend" = "Cuir gun bheachd ris"; "Scene.Report.Step1" = "Ceum 1 à 2"; "Scene.Report.Step2" = "Ceum 2 à 2"; -"Scene.Report.StepFinal.BlockUser" = "Block %@"; -"Scene.Report.StepFinal.DontWantToSeeThis" = "Don’t want to see this?"; -"Scene.Report.StepFinal.MuteUser" = "Mute %@"; -"Scene.Report.StepFinal.TheyWillNoLongerBeAbleToFollowOrSeeYourPostsButTheyCanSeeIfTheyveBeenBlocked" = "They will no longer be able to follow or see your posts, but they can see if they’ve been blocked."; -"Scene.Report.StepFinal.Unfollow" = "Unfollow"; -"Scene.Report.StepFinal.UnfollowUser" = "Unfollow %@"; -"Scene.Report.StepFinal.Unfollowed" = "Unfollowed"; -"Scene.Report.StepFinal.WhenYouSeeSomethingYouDontLikeOnMastodonYouCanRemoveThePersonFromYourExperience." = "When you see something you don’t like on Mastodon, you can remove the person from your experience."; -"Scene.Report.StepFinal.WhileWeReviewThisYouCanTakeActionAgainstUser" = "While we review this, you can take action against %@"; -"Scene.Report.StepFinal.YouWontSeeTheirPostsOrReblogsInYourHomeFeedTheyWontKnowTheyVeBeenMuted" = "You won’t see their posts or reblogs in your home feed. They won’t know they’ve been muted."; -"Scene.Report.StepFour.IsThereAnythingElseWeShouldKnow" = "Is there anything else we should know?"; -"Scene.Report.StepFour.Step4Of4" = "Step 4 of 4"; -"Scene.Report.StepOne.IDontLikeIt" = "I don’t like it"; -"Scene.Report.StepOne.ItIsNotSomethingYouWantToSee" = "It is not something you want to see"; -"Scene.Report.StepOne.ItViolatesServerRules" = "It violates server rules"; -"Scene.Report.StepOne.ItsSomethingElse" = "It’s something else"; -"Scene.Report.StepOne.ItsSpam" = "It’s spam"; -"Scene.Report.StepOne.MaliciousLinksFakeEngagementOrRepetetiveReplies" = "Malicious links, fake engagement, or repetetive replies"; -"Scene.Report.StepOne.SelectTheBestMatch" = "Select the best match"; -"Scene.Report.StepOne.Step1Of4" = "Step 1 of 4"; -"Scene.Report.StepOne.TheIssueDoesNotFitIntoOtherCategories" = "The issue does not fit into other categories"; -"Scene.Report.StepOne.WhatsWrongWithThisAccount" = "What's wrong with this account?"; -"Scene.Report.StepOne.WhatsWrongWithThisPost" = "What's wrong with this post?"; -"Scene.Report.StepOne.WhatsWrongWithThisUsername" = "What's wrong with %@?"; -"Scene.Report.StepOne.YouAreAwareThatItBreaksSpecificRules" = "You are aware that it breaks specific rules"; -"Scene.Report.StepThree.AreThereAnyPostsThatBackUpThisReport" = "Are there any posts that back up this report?"; -"Scene.Report.StepThree.SelectAllThatApply" = "Select all that apply"; -"Scene.Report.StepThree.Step3Of4" = "Step 3 of 4"; -"Scene.Report.StepTwo.IJustDon’tLikeIt" = "I just don’t like it"; -"Scene.Report.StepTwo.SelectAllThatApply" = "Select all that apply"; -"Scene.Report.StepTwo.Step2Of4" = "Step 2 of 4"; -"Scene.Report.StepTwo.WhichRulesAreBeingViolated" = "Which rules are being violated?"; +"Scene.Report.StepFinal.BlockUser" = "Bac %@"; +"Scene.Report.StepFinal.DontWantToSeeThis" = "Nach eil thu airson seo fhaicinn?"; +"Scene.Report.StepFinal.MuteUser" = "Mùch %@"; +"Scene.Report.StepFinal.TheyWillNoLongerBeAbleToFollowOrSeeYourPostsButTheyCanSeeIfTheyveBeenBlocked" = "Chan urrainn dhaibh ’gad leantainn is chan fhaic iad na postaichean agad tuilleadh ach chì iad gun deach am bacadh."; +"Scene.Report.StepFinal.Unfollow" = "Na lean tuilleadh"; +"Scene.Report.StepFinal.UnfollowUser" = "Na lean %@ tuilleadh"; +"Scene.Report.StepFinal.Unfollowed" = "Chan eil thu ’ga leantainn tuilleadh"; +"Scene.Report.StepFinal.WhenYouSeeSomethingYouDontLikeOnMastodonYouCanRemoveThePersonFromYourExperience." = "Nuair a chì thu rudeigin nach toigh leat air Mastodon, ’s urrainn dhut an neach a chumail fad air falbh uat."; +"Scene.Report.StepFinal.WhileWeReviewThisYouCanTakeActionAgainstUser" = "Fhad ’s a bhios sinn a’ toirt sùil air, seo nas urrainn dhut dèanamh an aghaidh %@"; +"Scene.Report.StepFinal.YouWontSeeTheirPostsOrReblogsInYourHomeFeedTheyWontKnowTheyVeBeenMuted" = "Chan fhaic thu na postaichean aca is dè a bhrosnaich iad air inbhir na dachaigh agad tuilleadh. Cha bhi fios aca gun do mhùch thu iad."; +"Scene.Report.StepFour.IsThereAnythingElseWeShouldKnow" = "A bheil rud sam bith eile a bu toigh leat innse dhuinn?"; +"Scene.Report.StepFour.Step4Of4" = "Ceum 4 à 4"; +"Scene.Report.StepOne.IDontLikeIt" = "Cha toigh leam e"; +"Scene.Report.StepOne.ItIsNotSomethingYouWantToSee" = "Chan eil thu airson seo fhaicinn"; +"Scene.Report.StepOne.ItViolatesServerRules" = "Tha e a’ briseadh riaghailtean an fhrithealaiche"; +"Scene.Report.StepOne.ItsSomethingElse" = "’S rud eile a tha ann"; +"Scene.Report.StepOne.ItsSpam" = "’S e spama a th’ ann"; +"Scene.Report.StepOne.MaliciousLinksFakeEngagementOrRepetetiveReplies" = "Ceanglaichean droch-rùnach, conaltradh fuadain no an dearbh fhreagairt a-rithist ’s a-rithist"; +"Scene.Report.StepOne.SelectTheBestMatch" = "Tagh a’ mhaids as fheàrr"; +"Scene.Report.StepOne.Step1Of4" = "Ceum 1 à 4"; +"Scene.Report.StepOne.TheIssueDoesNotFitIntoOtherCategories" = "Chan eil na roinnean-seòrsa eile iomchaidh dhan chùis"; +"Scene.Report.StepOne.WhatsWrongWithThisAccount" = "Dè tha ceàrr leis an cunntas seo?"; +"Scene.Report.StepOne.WhatsWrongWithThisPost" = "Dè tha ceàrr leis a’ phost seo?"; +"Scene.Report.StepOne.WhatsWrongWithThisUsername" = "Dè tha ceàrr le %@?"; +"Scene.Report.StepOne.YouAreAwareThatItBreaksSpecificRules" = "Mhothaich thu gu bheil e a’ briseadh riaghailtean sònraichte"; +"Scene.Report.StepThree.AreThereAnyPostsThatBackUpThisReport" = "A bheil postaichean sam bith ann a tha ’nam fianais dhan ghearan seo?"; +"Scene.Report.StepThree.SelectAllThatApply" = "Tagh a h-uile gin a tha iomchaidh"; +"Scene.Report.StepThree.Step3Of4" = "Ceum 3 à 4"; +"Scene.Report.StepTwo.IJustDon’tLikeIt" = "’S ann nach toigh leam e"; +"Scene.Report.StepTwo.SelectAllThatApply" = "Tagh a h-uile gin a tha iomchaidh"; +"Scene.Report.StepTwo.Step2Of4" = "Ceum 2 à 4"; +"Scene.Report.StepTwo.WhichRulesAreBeingViolated" = "Dè na riaghailtean a tha ’gam briseadh?"; "Scene.Report.TextPlaceholder" = "Sgrìobh no cuir ann beachdan a bharrachd"; "Scene.Report.Title" = "Dèan gearan mu %@"; "Scene.Report.TitleReport" = "Dèan gearan"; -"Scene.Search.Recommend.Accounts.Description" = "Saoil am bu toigh leat leantainn air na cunntasan seo?"; -"Scene.Search.Recommend.Accounts.Follow" = "Lean air"; +"Scene.Search.Recommend.Accounts.Description" = "Saoil am bu toigh leat na cunntasan seo a leantainn?"; +"Scene.Search.Recommend.Accounts.Follow" = "Lean"; "Scene.Search.Recommend.Accounts.Title" = "Cunntasan a chòrdas riut ma dh’fhaoidte"; "Scene.Search.Recommend.ButtonText" = "Seall na h-uile"; "Scene.Search.Recommend.HashTag.Description" = "Tagaichean hais le aire orra an-dràsta"; @@ -379,20 +385,20 @@ thoir gnogag air a’ chunntas a dhearbhadh a’ chunntais agad."; "Scene.ServerPicker.EmptyState.BadNetwork" = "Chaidh rudeigin ceàrr le luchdadh an dàta. Thoir sùil air a’ cheangal agad ris an eadar-lìon."; "Scene.ServerPicker.EmptyState.FindingServers" = "A’ lorg nam frithealaichean ri am faighinn…"; "Scene.ServerPicker.EmptyState.NoResults" = "Gun toradh"; -"Scene.ServerPicker.Input.Placeholder" = "Lorg frithealaiche no gabh pàirt san fhear agad fhèin…"; -"Scene.ServerPicker.Input.SearchServersOrEnterUrl" = "Search servers or enter URL"; +"Scene.ServerPicker.Input.Placeholder" = "Lorg frithealaiche"; +"Scene.ServerPicker.Input.SearchServersOrEnterUrl" = "Lorg frithealaiche no cuir a-steach URL"; "Scene.ServerPicker.Label.Category" = "ROINN-SEÒRSA"; "Scene.ServerPicker.Label.Language" = "CÀNAN"; "Scene.ServerPicker.Label.Users" = "CLEACHDAICHEAN"; -"Scene.ServerPicker.Subtitle" = "Tagh coimhearsnachd stèidhichte air d’ ùidhean no an roinn-dùthcha agad no tè choitcheann."; -"Scene.ServerPicker.SubtitleExtend" = "Tagh coimhearsnachd stèidhichte air d’ ùidhean no an roinn-dùthcha agad no tè choitcheann. Tha gach coimhearsnachd ’ga stiùireadh le buidheann no neach gu neo-eisimeileach."; -"Scene.ServerPicker.Title" = "Tagh frithealaiche sam bith."; +"Scene.ServerPicker.Subtitle" = "Tagh frithealaiche stèidhichte air d’ ùidhean, air far a bheil thu no fear coitcheann."; +"Scene.ServerPicker.SubtitleExtend" = "Tagh frithealaiche stèidhichte air d’ ùidhean, air far a bheil thu no fear coitcheann. Tha gach frithealaiche fo stiùireadh buidhinn no neach neo-eisimeilich fa leth."; +"Scene.ServerPicker.Title" = "Tha cleachdaichean Mhastodon air iomadh frithealaiche eadar-dhealaichte."; "Scene.ServerRules.Button.Confirm" = "Gabhaidh mi ris"; "Scene.ServerRules.PrivacyPolicy" = "poileasaidh prìobhaideachd"; "Scene.ServerRules.Prompt" = "Ma leanas tu air adhart, bidh thu fo bhuaidh teirmichean seirbheise is poileasaidh prìobhaideachd %@."; -"Scene.ServerRules.Subtitle" = "Shuidhich rianairean %@ na riaghailtean seo."; +"Scene.ServerRules.Subtitle" = "Tha na riaghailtean seo ’gan stèidheachadh is a chur an gnìomh leis na maoir aig %@."; "Scene.ServerRules.TermsOfService" = "teirmichean na seirbheise"; -"Scene.ServerRules.Title" = "Riaghailt bhunasach no dhà."; +"Scene.ServerRules.Title" = "Riaghailtean bunasach."; "Scene.Settings.Footer.MastodonDescription" = "’S e bathar-bog le bun-tùs fosgailte a th’ ann am Mastodon. ’S urrainn dhut aithris a dhèanamh air duilgheadasan air GitHub fo %@ (%@)"; "Scene.Settings.Keyboard.CloseSettingsWindow" = "Dùin uinneag nan roghainnean"; "Scene.Settings.Section.Appearance.Automatic" = "Fèin-obrachail"; @@ -410,11 +416,11 @@ thoir gnogag air a’ chunntas a dhearbhadh a’ chunntais agad."; "Scene.Settings.Section.LookAndFeel.UseSystem" = "Cleachd coltas an t-siostaim"; "Scene.Settings.Section.Notifications.Boosts" = "Nuair a bhrosnaicheas iad post uam"; "Scene.Settings.Section.Notifications.Favorites" = "Nuair as annsa leotha am post agam"; -"Scene.Settings.Section.Notifications.Follows" = "Nuair a leanas iad orm"; +"Scene.Settings.Section.Notifications.Follows" = "Nuair a leanas iad mi"; "Scene.Settings.Section.Notifications.Mentions" = "Nuair a bheir iad iomradh orm"; "Scene.Settings.Section.Notifications.Title" = "Brathan"; "Scene.Settings.Section.Notifications.Trigger.Anyone" = "Airson duine sam bith, cuir brath thugam"; -"Scene.Settings.Section.Notifications.Trigger.Follow" = "Airson daoine air a leanas mi, cuir brath thugam"; +"Scene.Settings.Section.Notifications.Trigger.Follow" = "Airson daoine a leanas mi, cuir brath thugam"; "Scene.Settings.Section.Notifications.Trigger.Follower" = "Airson luchd-leantainn, cuir brath thugam"; "Scene.Settings.Section.Notifications.Trigger.Noone" = "Na cuir brath thugam idir"; "Scene.Settings.Section.Notifications.Trigger.Title" = " "; @@ -428,7 +434,7 @@ thoir gnogag air a’ chunntas a dhearbhadh a’ chunntais agad."; "Scene.Settings.Section.SpicyZone.Signout" = "Clàraich a-mach"; "Scene.Settings.Section.SpicyZone.Title" = "Gnìomhan"; "Scene.Settings.Title" = "Roghainnean"; -"Scene.SuggestionAccount.FollowExplain" = "Nuair a leanas tu air cuideigin, chì thu na puist aca air inbhir na dachaigh agad."; +"Scene.SuggestionAccount.FollowExplain" = "Nuair a leanas tu cuideigin, chì thu na puist aca air inbhir na dachaigh agad."; "Scene.SuggestionAccount.Title" = "Lorg daoine a leanas tu"; "Scene.Thread.BackTitle" = "Post"; "Scene.Thread.Title" = "Post le %@"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/gd.lproj/Localizable.stringsdict b/MastodonSDK/Sources/MastodonLocalization/Resources/gd.lproj/Localizable.stringsdict index f041677fa..d0ccb5f41 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/gd.lproj/Localizable.stringsdict +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/gd.lproj/Localizable.stringsdict @@ -88,13 +88,13 @@ NSStringFormatValueTypeKey ld one - Followed by %1$@, and another mutual + ’Ga leantainn le %1$@ ’s %ld eile an cumantas two - Followed by %1$@, and %ld mutuals + ’Ga leantainn le %1$@ ’s %ld eile an cumantas few - Followed by %1$@, and %ld mutuals + ’Ga leantainn le %1$@ ’s %ld eile an cumantas other - Followed by %1$@, and %ld mutuals + ’Ga leantainn le %1$@ ’s %ld eile an cumantas plural.count.metric_formatted.post @@ -128,13 +128,13 @@ NSStringFormatValueTypeKey ld one - 1 media + %ld mheadhan two - %ld media + %ld mheadhan few - %ld media + %ld meadhanan other - %ld media + %ld meadhan plural.count.post @@ -308,13 +308,13 @@ NSStringFormatValueTypeKey ld one - Tha %ld a’ leantainn air + Tha %ld ’ga leantainn two - Tha %ld a’ leantainn air + Tha %ld ’ga leantainn few - Tha %ld a’ leantainn air + Tha %ld ’ga leantainn other - Tha %ld a’ leantainn air + Tha %ld ’ga leantainn date.year.left diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/gl.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/gl.lproj/Localizable.strings index dfb88a006..c76089221 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/gl.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/gl.lproj/Localizable.strings @@ -68,11 +68,13 @@ Comproba a conexión a internet."; "Common.Controls.Friendship.EditInfo" = "Editar info"; "Common.Controls.Friendship.Follow" = "Seguir"; "Common.Controls.Friendship.Following" = "Seguindo"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "Acalar"; "Common.Controls.Friendship.MuteUser" = "Acalar a %@"; "Common.Controls.Friendship.Muted" = "Acalada"; "Common.Controls.Friendship.Pending" = "Pendente"; "Common.Controls.Friendship.Request" = "Solicitar"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "Desbloquear"; "Common.Controls.Friendship.UnblockUser" = "Desbloquear a %@"; "Common.Controls.Friendship.Unmute" = "Non Acalar"; @@ -149,6 +151,7 @@ Así se ve o teu perfil."; "Scene.AccountList.AddAccount" = "Engadir conta"; "Scene.AccountList.DismissAccountSwitcher" = "Desbotar intercambiador de contas"; "Scene.AccountList.TabBarHint" = "Perfil seleccionado: %@. Dobre toque e manter para mostrar o intercambiador de contas"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Engadir anexo"; "Scene.Compose.Accessibility.AppendPoll" = "Engadir enquisa"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Selector emoji personalizado"; @@ -253,8 +256,12 @@ ser subido a Mastodon."; "Scene.Profile.Header.FollowsYou" = "Séguete"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Confirma o bloqueo de %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Bloquear Conta"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Confirma Acalar a %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Acalar conta"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Confirma o desbloqueo de %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Desbloquear Conta"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Confirma restablecer a %@"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/it.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/it.lproj/Localizable.strings index cff8374cf..c83cb7458 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/it.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/it.lproj/Localizable.strings @@ -68,11 +68,13 @@ Per favore verifica la tua connessione internet."; "Common.Controls.Friendship.EditInfo" = "Modifica info"; "Common.Controls.Friendship.Follow" = "Segui"; "Common.Controls.Friendship.Following" = "Stai seguendo"; +"Common.Controls.Friendship.HideReblogs" = "Nascondi le condivisioni"; "Common.Controls.Friendship.Mute" = "Silenzia"; "Common.Controls.Friendship.MuteUser" = "Silenzia %@"; "Common.Controls.Friendship.Muted" = "Silenziato"; "Common.Controls.Friendship.Pending" = "In attesa"; "Common.Controls.Friendship.Request" = "Richiesta"; +"Common.Controls.Friendship.ShowReblogs" = "Mostra le condivisioni"; "Common.Controls.Friendship.Unblock" = "Sblocca"; "Common.Controls.Friendship.UnblockUser" = "Sblocca %@"; "Common.Controls.Friendship.Unmute" = "Riattiva"; @@ -149,6 +151,7 @@ Il tuo profilo sembra questo per loro."; "Scene.AccountList.AddAccount" = "Aggiungi account"; "Scene.AccountList.DismissAccountSwitcher" = "Ignora il cambio account"; "Scene.AccountList.TabBarHint" = "Profilo corrente selezionato: %@. Doppio tocco e tieni premuto per mostrare il cambio account"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Aggiungi allegato"; "Scene.Compose.Accessibility.AppendPoll" = "Aggiungi sondaggio"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Selettore Emoji personalizzato"; @@ -253,8 +256,12 @@ caricato su Mastodon."; "Scene.Profile.Header.FollowsYou" = "Ti segue"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Confermi di bloccare %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Blocca account"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Conferma di nascondere le condivisioni"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Nascondi le condivisioni"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Confermi di silenziare %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Silenzia account"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Conferma di mostrare le condivisioni"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Mostra le condivisioni"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Conferma per sbloccare %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Sblocca account"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Confermi di riattivare %@"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/ja.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/ja.lproj/Localizable.strings index de61ef1d9..080624f06 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/ja.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/ja.lproj/Localizable.strings @@ -68,11 +68,13 @@ "Common.Controls.Friendship.EditInfo" = "編集"; "Common.Controls.Friendship.Follow" = "フォロー"; "Common.Controls.Friendship.Following" = "フォロー中"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "ミュート"; "Common.Controls.Friendship.MuteUser" = "%@をミュート"; "Common.Controls.Friendship.Muted" = "ミュート済み"; "Common.Controls.Friendship.Pending" = "保留"; "Common.Controls.Friendship.Request" = "リクエスト"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "ブロックを解除"; "Common.Controls.Friendship.UnblockUser" = "%@のブロックを解除"; "Common.Controls.Friendship.Unmute" = "ミュートを解除"; @@ -145,6 +147,7 @@ "Scene.AccountList.AddAccount" = "アカウントを追加"; "Scene.AccountList.DismissAccountSwitcher" = "アカウント切替画面を閉じます"; "Scene.AccountList.TabBarHint" = "現在のアカウント: %@. ダブルタップしてアカウント切替画面を表示します"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "アタッチメントの追加"; "Scene.Compose.Accessibility.AppendPoll" = "投票を追加"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "カスタム絵文字ピッカー"; @@ -248,8 +251,12 @@ "Scene.Profile.Header.FollowsYou" = "フォローされています"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "%@をブロックしますか?"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "アカウントをブロック"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "%@をミュートしますか?"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "アカウントをミュート"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "%@のブロックを解除しますか?"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "アカウントのブロックを解除"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "%@をミュートしますか?"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/kab.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/kab.lproj/Localizable.strings index 4db503495..1339af4cf 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/kab.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/kab.lproj/Localizable.strings @@ -68,11 +68,13 @@ Ma ulac aɣilif, senqed tuqqna-inek internet."; "Common.Controls.Friendship.EditInfo" = "Ẓreg talɣut"; "Common.Controls.Friendship.Follow" = "Ḍfeṛ"; "Common.Controls.Friendship.Following" = "Yettwaḍfar"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "Sgugem"; "Common.Controls.Friendship.MuteUser" = "Sgugem %@"; "Common.Controls.Friendship.Muted" = "Yettwasgugem"; "Common.Controls.Friendship.Pending" = "Yegguni"; "Common.Controls.Friendship.Request" = "Tuttra"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "Serreḥ"; "Common.Controls.Friendship.UnblockUser" = "Serreḥ i %@"; "Common.Controls.Friendship.Unmute" = "Kkes asgugem"; @@ -149,6 +151,7 @@ Akka i as-d-yettban umaɣnu-inek."; "Scene.AccountList.AddAccount" = "Rnu amiḍan"; "Scene.AccountList.DismissAccountSwitcher" = "Sefsex abeddel n umiḍan"; "Scene.AccountList.TabBarHint" = "Amaɣnu amiran yettwafernen: %@. Sit berdayen syen teǧǧeḍ aḍad-ik·im i uskan abeddel n umiḍan"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Rnu taceqquft yeddan"; "Scene.Compose.Accessibility.AppendPoll" = "Rnu asenqed"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Amefran n yimujiten udmawanen"; @@ -225,7 +228,7 @@ Ad d-yettwasali ɣef Mastodon."; "Scene.HomeTimeline.Title" = "Agejdan"; "Scene.Notification.FollowRequest.Accept" = "Accept"; "Scene.Notification.FollowRequest.Accepted" = "Accepted"; -"Scene.Notification.FollowRequest.Reject" = "reject"; +"Scene.Notification.FollowRequest.Reject" = "agi"; "Scene.Notification.FollowRequest.Rejected" = "Rejected"; "Scene.Notification.Keyobard.ShowEverything" = "Sken yal taɣawsa"; "Scene.Notification.Keyobard.ShowMentions" = "Sken tisedmirin"; @@ -253,8 +256,12 @@ Ad d-yettwasali ɣef Mastodon."; "Scene.Profile.Header.FollowsYou" = "Yeṭṭafaṛ-ik•im"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Sentem asewḥel n %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Sewḥel amiḍan"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Sentem asgugem i %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Sgugem amiḍan"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Sentem tukksa n usgugem i %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Kkes asewḥel i umiḍan"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Sentem tukksa n usgugem i %@"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/ku.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/ku.lproj/Localizable.strings index 6c323adfe..a72543a3e 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/ku.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/ku.lproj/Localizable.strings @@ -68,11 +68,13 @@ Jkx girêdana înternetê xwe kontrol bike."; "Common.Controls.Friendship.EditInfo" = "Zanyariyan serrast bike"; "Common.Controls.Friendship.Follow" = "Bişopîne"; "Common.Controls.Friendship.Following" = "Dişopîne"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "Bêdeng bike"; "Common.Controls.Friendship.MuteUser" = "%@ bêdeng bike"; "Common.Controls.Friendship.Muted" = "Bêdengkirî"; "Common.Controls.Friendship.Pending" = "Tê nirxandin"; "Common.Controls.Friendship.Request" = "Daxwaz bike"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "Astengiyê rake"; "Common.Controls.Friendship.UnblockUser" = "%@ asteng neke"; "Common.Controls.Friendship.Unmute" = "Bêdeng neke"; @@ -149,6 +151,7 @@ Profîla te ji wan ra wiha xuya dike."; "Scene.AccountList.AddAccount" = "Ajimêr tevlî bike"; "Scene.AccountList.DismissAccountSwitcher" = "Guherkera ajimêrê paş guh bike"; "Scene.AccountList.TabBarHint" = "Profîla hilbijartî ya niha: %@. Du caran bitikîne û paşê dest bide ser da ku guhêrbara ajimêr were nîşandan"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Pêvek tevlî bike"; "Scene.Compose.Accessibility.AppendPoll" = "Rapirsî tevlî bike"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Hilbijêrê emojî yên kesanekirî"; @@ -254,8 +257,12 @@ girêdanê bitikne da ku ajimêra xwe bidî piştrastkirin."; "Scene.Profile.Header.FollowsYou" = "Te dişopîne"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Ji bo rakirina astengkirinê %@ bipejirîne"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Ajimêr asteng bike"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Ji bo bêdengkirina %@ bipejirîne"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Ajimêrê bêdeng bike"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Ji bo rakirina astengkirinê %@ bipejirîne"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Astengiyê li ser ajimêr rake"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Ji bo vekirina bêdengkirinê %@ bipejirîne"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/nl.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/nl.lproj/Localizable.strings index cea8ce7e7..3bcc33bf5 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/nl.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/nl.lproj/Localizable.strings @@ -67,11 +67,13 @@ "Common.Controls.Friendship.EditInfo" = "Bewerken"; "Common.Controls.Friendship.Follow" = "Volgen"; "Common.Controls.Friendship.Following" = "Gevolgd"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "Negeren"; "Common.Controls.Friendship.MuteUser" = "Negeer %@"; "Common.Controls.Friendship.Muted" = "Genegeerd"; "Common.Controls.Friendship.Pending" = "In afwachting"; "Common.Controls.Friendship.Request" = "Verzoeken"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "Deblokkeer"; "Common.Controls.Friendship.UnblockUser" = "Deblokkeer %@"; "Common.Controls.Friendship.Unmute" = "Niet langer negeren"; @@ -144,6 +146,7 @@ Uw profiel ziet er zo uit voor hen."; "Scene.AccountList.AddAccount" = "Voeg account toe"; "Scene.AccountList.DismissAccountSwitcher" = "Annuleer account wisselen"; "Scene.AccountList.TabBarHint" = "Huidige geselecteerde profiel: %@. Dubbel-tik en houd vast om account te wisselen"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Bijlage Toevoegen"; "Scene.Compose.Accessibility.AppendPoll" = "Peiling Toevoegen"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Eigen Emojikiezer"; @@ -248,8 +251,12 @@ klik op de link om uw account te bevestigen."; "Scene.Profile.Header.FollowsYou" = "Follows You"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Bevestig om %@ te blokkeren"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Blokkeer account"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Bevestig om %@ te negeren"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Negeer account"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Bevestig om %@ te deblokkeren"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Deblokkeer Account"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Bevestig om %@ te negeren"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/ru.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/ru.lproj/Localizable.strings index 8b5adf626..0513a955b 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/ru.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/ru.lproj/Localizable.strings @@ -68,11 +68,13 @@ "Common.Controls.Friendship.EditInfo" = "Изменить"; "Common.Controls.Friendship.Follow" = "Подписаться"; "Common.Controls.Friendship.Following" = "В подписках"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "Игнорировать"; "Common.Controls.Friendship.MuteUser" = "Игнорировать %@"; "Common.Controls.Friendship.Muted" = "В игнорируемых"; "Common.Controls.Friendship.Pending" = "Отправлен"; "Common.Controls.Friendship.Request" = "Отправить запрос"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "Разблокировать"; "Common.Controls.Friendship.UnblockUser" = "Разблокировать %@"; "Common.Controls.Friendship.Unmute" = "Убрать из игнорируемых"; @@ -157,6 +159,7 @@ "Scene.AccountList.AddAccount" = "Add Account"; "Scene.AccountList.DismissAccountSwitcher" = "Dismiss Account Switcher"; "Scene.AccountList.TabBarHint" = "Current selected profile: %@. Double tap then hold to show account switcher"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Прикрепить файл"; "Scene.Compose.Accessibility.AppendPoll" = "Добавить опрос"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Меню пользовательских эмодзи"; @@ -264,8 +267,12 @@ "Scene.Profile.Header.FollowsYou" = "Подписан(а) на вас"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Confirm to block %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Block Account"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Confirm to mute %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Mute Account"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Confirm to unblock %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Unblock Account"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Убрать %@ из игнорируемых?"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/sv.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/sv.lproj/Localizable.strings index 51b18d908..849d88284 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/sv.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/sv.lproj/Localizable.strings @@ -9,7 +9,7 @@ "Common.Alerts.DiscardPostContent.Message" = "Bekräfta för att slänga inläggsutkast."; "Common.Alerts.DiscardPostContent.Title" = "Släng utkast"; "Common.Alerts.EditProfileFailure.Message" = "Kan inte redigera profil. Var god försök igen."; -"Common.Alerts.EditProfileFailure.Title" = "Profilredigering misslyckades"; +"Common.Alerts.EditProfileFailure.Title" = "Kunde inte redigera profil"; "Common.Alerts.PublishPostFailure.AttachmentsMessage.MoreThanOneVideo" = "Det går inte att bifoga mer än en video."; "Common.Alerts.PublishPostFailure.AttachmentsMessage.VideoAttachWithPhoto" = "Det går inte att bifoga en video till ett inlägg som redan innehåller bilder."; "Common.Alerts.PublishPostFailure.Message" = "Det gick inte att publicera inlägget. @@ -68,11 +68,13 @@ Kontrollera din internetanslutning."; "Common.Controls.Friendship.EditInfo" = "Redigera info"; "Common.Controls.Friendship.Follow" = "Följ"; "Common.Controls.Friendship.Following" = "Följer"; +"Common.Controls.Friendship.HideReblogs" = "Dölj puffar"; "Common.Controls.Friendship.Mute" = "Tysta"; "Common.Controls.Friendship.MuteUser" = "Tysta %@"; "Common.Controls.Friendship.Muted" = "Tystad"; "Common.Controls.Friendship.Pending" = "Väntande"; "Common.Controls.Friendship.Request" = "Följ"; +"Common.Controls.Friendship.ShowReblogs" = "Visa knuffar"; "Common.Controls.Friendship.Unblock" = "Avblockera"; "Common.Controls.Friendship.UnblockUser" = "Avblockera %@"; "Common.Controls.Friendship.Unmute" = "Avtysta"; @@ -92,18 +94,18 @@ Kontrollera din internetanslutning."; "Common.Controls.Keyboard.Timeline.ReplyStatus" = "Svara på inlägg"; "Common.Controls.Keyboard.Timeline.ToggleContentWarning" = "Växla innehållsvarning"; "Common.Controls.Keyboard.Timeline.ToggleFavorite" = "Växla favorit på inlägg"; -"Common.Controls.Keyboard.Timeline.ToggleReblog" = "Växla ompostning på inlägg"; +"Common.Controls.Keyboard.Timeline.ToggleReblog" = "Växla puff på inlägg"; "Common.Controls.Status.Actions.Favorite" = "Favorit"; "Common.Controls.Status.Actions.Hide" = "Dölj"; "Common.Controls.Status.Actions.Menu" = "Meny"; -"Common.Controls.Status.Actions.Reblog" = "Omposta"; +"Common.Controls.Status.Actions.Reblog" = "Puffa"; "Common.Controls.Status.Actions.Reply" = "Svara"; "Common.Controls.Status.Actions.ShowGif" = "Visa GIF"; "Common.Controls.Status.Actions.ShowImage" = "Visa bild"; "Common.Controls.Status.Actions.ShowVideoPlayer" = "Visa videospelare"; "Common.Controls.Status.Actions.TapThenHoldToShowMenu" = "Tryck och håll ned för att visa menyn"; "Common.Controls.Status.Actions.Unfavorite" = "Ta bort favorit"; -"Common.Controls.Status.Actions.Unreblog" = "Ångra ompostning"; +"Common.Controls.Status.Actions.Unreblog" = "Ångra puff"; "Common.Controls.Status.ContentWarning" = "Innehållsvarning"; "Common.Controls.Status.MediaContentWarning" = "Tryck var som helst för att visa"; "Common.Controls.Status.Poll.Closed" = "Stängd"; @@ -118,7 +120,7 @@ Kontrollera din internetanslutning."; "Common.Controls.Status.Tag.Mention" = "Omnämn"; "Common.Controls.Status.Tag.Url" = "URL"; "Common.Controls.Status.TapToReveal" = "Tryck för att visa"; -"Common.Controls.Status.UserReblogged" = "%@ ompostade"; +"Common.Controls.Status.UserReblogged" = "%@ puffade"; "Common.Controls.Status.UserRepliedTo" = "Svarade på %@"; "Common.Controls.Status.Visibility.Direct" = "Endast omnämnda användare kan se detta inlägg."; "Common.Controls.Status.Visibility.Private" = "Endast deras följare kan se detta inlägg."; @@ -149,6 +151,7 @@ Din profil ser ut så här för dem."; "Scene.AccountList.AddAccount" = "Lägg till konto"; "Scene.AccountList.DismissAccountSwitcher" = "Stäng kontoväxlare"; "Scene.AccountList.TabBarHint" = "Nuvarande vald profil: %@. Dubbeltryck och håll för att visa kontoväxlare"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Lägg till bilaga"; "Scene.Compose.Accessibility.AppendPoll" = "Lägg till omröstning"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Anpassad emoji-väljare"; @@ -223,17 +226,17 @@ laddas upp till Mastodon."; "Scene.HomeTimeline.NavigationBarState.Published" = "Publicerat!"; "Scene.HomeTimeline.NavigationBarState.Publishing" = "Publicerar inlägget..."; "Scene.HomeTimeline.Title" = "Hem"; -"Scene.Notification.FollowRequest.Accept" = "Accept"; -"Scene.Notification.FollowRequest.Accepted" = "Accepted"; -"Scene.Notification.FollowRequest.Reject" = "reject"; -"Scene.Notification.FollowRequest.Rejected" = "Rejected"; +"Scene.Notification.FollowRequest.Accept" = "Godkänn"; +"Scene.Notification.FollowRequest.Accepted" = "Godkänd"; +"Scene.Notification.FollowRequest.Reject" = "avvisa"; +"Scene.Notification.FollowRequest.Rejected" = "Avvisad"; "Scene.Notification.Keyobard.ShowEverything" = "Visa allt"; "Scene.Notification.Keyobard.ShowMentions" = "Visa omnämningar"; "Scene.Notification.NotificationDescription.FavoritedYourPost" = "favoriserade ditt inlägg"; "Scene.Notification.NotificationDescription.FollowedYou" = "följde dig"; "Scene.Notification.NotificationDescription.MentionedYou" = "nämnde dig"; "Scene.Notification.NotificationDescription.PollHasEnded" = "omröstningen har avslutats"; -"Scene.Notification.NotificationDescription.RebloggedYourPost" = "ompostade ditt inlägg"; +"Scene.Notification.NotificationDescription.RebloggedYourPost" = "puffade ditt inlägg"; "Scene.Notification.NotificationDescription.RequestToFollowYou" = "begär att följa dig"; "Scene.Notification.Title.Everything" = "Allting"; "Scene.Notification.Title.Mentions" = "Omnämningar"; @@ -250,11 +253,15 @@ laddas upp till Mastodon."; "Scene.Profile.Fields.AddRow" = "Lägg till rad"; "Scene.Profile.Fields.Placeholder.Content" = "Innehåll"; "Scene.Profile.Fields.Placeholder.Label" = "Etikett"; -"Scene.Profile.Header.FollowsYou" = "Follows You"; +"Scene.Profile.Header.FollowsYou" = "Följer dig"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Bekräfta för att blockera %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Blockera konto"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Bekräfta för att dölja puffar"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Dölj puffar"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Bekräfta för att tysta %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Tysta konto"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Bekräfta för att visa puffar"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Visa puffar"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Bekräfta för att avblockera %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Avblockera konto"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Bekräfta för att avtysta %@"; @@ -264,7 +271,7 @@ laddas upp till Mastodon."; "Scene.Profile.SegmentedControl.Posts" = "Inlägg"; "Scene.Profile.SegmentedControl.PostsAndReplies" = "Inlägg och svar"; "Scene.Profile.SegmentedControl.Replies" = "Svar"; -"Scene.RebloggedBy.Title" = "Ompostat av"; +"Scene.RebloggedBy.Title" = "Puffat av"; "Scene.Register.Error.Item.Agreement" = "Avtal"; "Scene.Register.Error.Item.Email" = "E-post"; "Scene.Register.Error.Item.Locale" = "Språk"; @@ -410,7 +417,7 @@ laddas upp till Mastodon."; "Scene.Settings.Section.Notifications.Boosts" = "Ompostar mitt inlägg"; "Scene.Settings.Section.Notifications.Favorites" = "Favoriserar mitt inlägg"; "Scene.Settings.Section.Notifications.Follows" = "Följer mig"; -"Scene.Settings.Section.Notifications.Mentions" = "Omnämner mig"; +"Scene.Settings.Section.Notifications.Mentions" = "Nämner mig"; "Scene.Settings.Section.Notifications.Title" = "Notiser"; "Scene.Settings.Section.Notifications.Trigger.Anyone" = "alla"; "Scene.Settings.Section.Notifications.Trigger.Follow" = "någon jag följer"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/sv.lproj/Localizable.stringsdict b/MastodonSDK/Sources/MastodonLocalization/Resources/sv.lproj/Localizable.stringsdict index 27ef9fb53..048af4732 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/sv.lproj/Localizable.stringsdict +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/sv.lproj/Localizable.stringsdict @@ -90,7 +90,7 @@ one inlägg other - inläggen + inlägg plural.count.media @@ -152,9 +152,9 @@ NSStringFormatValueTypeKey ld one - %ld ompostning + %ld puff other - %ld ompostningar + %ld puffar plural.count.reply diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/th.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/th.lproj/Localizable.strings index f29e08d82..15514928c 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/th.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/th.lproj/Localizable.strings @@ -68,11 +68,13 @@ "Common.Controls.Friendship.EditInfo" = "แก้ไขข้อมูล"; "Common.Controls.Friendship.Follow" = "ติดตาม"; "Common.Controls.Friendship.Following" = "กำลังติดตาม"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "ซ่อน"; "Common.Controls.Friendship.MuteUser" = "ซ่อน %@"; "Common.Controls.Friendship.Muted" = "ซ่อนอยู่"; "Common.Controls.Friendship.Pending" = "รอดำเนินการ"; "Common.Controls.Friendship.Request" = "ขอ"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "เลิกปิดกั้น"; "Common.Controls.Friendship.UnblockUser" = "เลิกปิดกั้น %@"; "Common.Controls.Friendship.Unmute" = "เลิกซ่อน"; @@ -149,6 +151,7 @@ "Scene.AccountList.AddAccount" = "เพิ่มบัญชี"; "Scene.AccountList.DismissAccountSwitcher" = "ปิดตัวสลับบัญชี"; "Scene.AccountList.TabBarHint" = "โปรไฟล์ที่เลือกในปัจจุบัน: %@ แตะสองครั้งแล้วกดค้างไว้เพื่อแสดงตัวสลับบัญชี"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "เพิ่มไฟล์แนบ"; "Scene.Compose.Accessibility.AppendPoll" = "เพิ่มการสำรวจความคิดเห็น"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "ตัวเลือกอีโมจิที่กำหนดเอง"; @@ -253,8 +256,12 @@ "Scene.Profile.Header.FollowsYou" = "ติดตามคุณ"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "ยืนยันเพื่อปิดกั้น %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "ปิดกั้นบัญชี"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "ยืนยันเพื่อซ่อน %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "ซ่อนบัญชี"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "ยืนยันเพื่อเลิกปิดกั้น %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "เลิกปิดกั้นบัญชี"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "ยืนยันเพื่อเลิกซ่อน %@"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/tr.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/tr.lproj/Localizable.strings index 814969c39..eec4a2940 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/tr.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/tr.lproj/Localizable.strings @@ -67,11 +67,13 @@ "Common.Controls.Friendship.EditInfo" = "Bilgiyi Düzenle"; "Common.Controls.Friendship.Follow" = "Takip et"; "Common.Controls.Friendship.Following" = "Takip ediliyor"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "Sessize al"; "Common.Controls.Friendship.MuteUser" = "Sustur %@"; "Common.Controls.Friendship.Muted" = "Susturuldu"; "Common.Controls.Friendship.Pending" = "Bekliyor"; "Common.Controls.Friendship.Request" = "İstek"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "Engeli kaldır"; "Common.Controls.Friendship.UnblockUser" = "%@ kişisinin engelini kaldır"; "Common.Controls.Friendship.Unmute" = "Susturmayı kaldır"; @@ -148,6 +150,7 @@ Bu kişiye göre profiliniz böyle gözüküyor."; "Scene.AccountList.AddAccount" = "Hesap Ekle"; "Scene.AccountList.DismissAccountSwitcher" = "Hesap Değiştiriciyi Kapat"; "Scene.AccountList.TabBarHint" = "Şu anki seçili profil: %@. Hesap değiştiriciyi göstermek için iki kez dokunun ve basılı tutun"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Dosya Ekle"; "Scene.Compose.Accessibility.AppendPoll" = "Anket Ekle"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Özel Emoji Seçici"; @@ -199,7 +202,7 @@ yüklenemiyor."; "Scene.ConfirmEmail.OpenEmailApp.OpenEmailClient" = "E-posta İstemcisini Aç"; "Scene.ConfirmEmail.OpenEmailApp.Title" = "Gelen kutunuzu kontrol edin."; "Scene.ConfirmEmail.Subtitle" = "Hesabınızı doğrulamak için size e-postayla gönderdiğimiz bağlantıya dokunun."; -"Scene.ConfirmEmail.TapTheLinkWeEmailedToYouToVerifyYourAccount" = "Tap the link we emailed to you to verify your account"; +"Scene.ConfirmEmail.TapTheLinkWeEmailedToYouToVerifyYourAccount" = "Hesabınızı doğrulamak için size e-postayla gönderdiğimiz bağlantıya dokunun"; "Scene.ConfirmEmail.Title" = "Son bir şey."; "Scene.Discovery.Intro" = "Bunlar, Mastodon'un köşesinde ilgi çeken gönderilerdir."; "Scene.Discovery.Tabs.Community" = "Topluluk"; @@ -212,11 +215,11 @@ yüklenemiyor."; "Scene.Favorite.Title" = "Favorilerin"; "Scene.FavoritedBy.Title" = "Favorited By"; "Scene.Follower.Footer" = "Diğer sunucudaki takipçiler gösterilemiyor."; -"Scene.Follower.Title" = "follower"; +"Scene.Follower.Title" = "takipçi"; "Scene.Following.Footer" = "Diğer sunucudaki takip edilenler gösterilemiyor."; -"Scene.Following.Title" = "following"; +"Scene.Following.Title" = "takip"; "Scene.HomeTimeline.NavigationBarState.Accessibility.LogoHint" = "Tap to scroll to top and tap again to previous location"; -"Scene.HomeTimeline.NavigationBarState.Accessibility.LogoLabel" = "Logo Button"; +"Scene.HomeTimeline.NavigationBarState.Accessibility.LogoLabel" = "Logo Düğmesi"; "Scene.HomeTimeline.NavigationBarState.NewPosts" = "Yeni gönderiler gör"; "Scene.HomeTimeline.NavigationBarState.Offline" = "Çevrimdışı"; "Scene.HomeTimeline.NavigationBarState.Published" = "Yayınlandı!"; @@ -249,11 +252,15 @@ yüklenemiyor."; "Scene.Profile.Fields.AddRow" = "Satır Ekle"; "Scene.Profile.Fields.Placeholder.Content" = "İçerik"; "Scene.Profile.Fields.Placeholder.Label" = "Etiket"; -"Scene.Profile.Header.FollowsYou" = "Follows You"; +"Scene.Profile.Header.FollowsYou" = "Seni takip ediyor"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "%@ engellemeyi onayla"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Hesabı Engelle"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "%@ susturmak için onaylayın"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Hesabı sustur"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "%@ engellemeyi kaldırmayı onaylayın"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Hesabın Engelini Kaldır"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "%@ susturmasını kaldırmak için onaylayın"; @@ -266,7 +273,7 @@ yüklenemiyor."; "Scene.RebloggedBy.Title" = "Reblogged By"; "Scene.Register.Error.Item.Agreement" = "Anlaşma"; "Scene.Register.Error.Item.Email" = "E-posta"; -"Scene.Register.Error.Item.Locale" = "Locale"; +"Scene.Register.Error.Item.Locale" = "Yerel"; "Scene.Register.Error.Item.Password" = "Parola"; "Scene.Register.Error.Item.Reason" = "Sebep"; "Scene.Register.Error.Item.Username" = "Kullanıcı adı"; @@ -296,7 +303,7 @@ yüklenemiyor."; "Scene.Register.Input.Password.Require" = "Parolanızda en azından şunlar olmalı:"; "Scene.Register.Input.Username.DuplicatePrompt" = "Bu kullanıcı adı alınmış."; "Scene.Register.Input.Username.Placeholder" = "kullanıcı adı"; -"Scene.Register.LetsGetYouSetUpOnDomain" = "Let’s get you set up on %@"; +"Scene.Register.LetsGetYouSetUpOnDomain" = "%@ için kurulumunuzu yapalım"; "Scene.Register.Title" = "%@ için kurulumunuzu yapalım"; "Scene.Report.Content1" = "Bu rapora eklemek istediğiniz başka gönderiler var mı?"; "Scene.Report.Content2" = "Bu rapor hakkında moderatörlerin bilmesi gerektiği bir şey var mı?"; @@ -308,10 +315,10 @@ yüklenemiyor."; "Scene.Report.Step2" = "Adım 2/2"; "Scene.Report.StepFinal.BlockUser" = "Block %@"; "Scene.Report.StepFinal.DontWantToSeeThis" = "Bunu görmek istemiyor musunuz?"; -"Scene.Report.StepFinal.MuteUser" = "Mute %@"; +"Scene.Report.StepFinal.MuteUser" = "Sustur %@"; "Scene.Report.StepFinal.TheyWillNoLongerBeAbleToFollowOrSeeYourPostsButTheyCanSeeIfTheyveBeenBlocked" = "They will no longer be able to follow or see your posts, but they can see if they’ve been blocked."; "Scene.Report.StepFinal.Unfollow" = "Takibi bırak"; -"Scene.Report.StepFinal.UnfollowUser" = "Unfollow %@"; +"Scene.Report.StepFinal.UnfollowUser" = "Takipten çık %@"; "Scene.Report.StepFinal.Unfollowed" = "Unfollowed"; "Scene.Report.StepFinal.WhenYouSeeSomethingYouDontLikeOnMastodonYouCanRemoveThePersonFromYourExperience." = "When you see something you don’t like on Mastodon, you can remove the person from your experience."; "Scene.Report.StepFinal.WhileWeReviewThisYouCanTakeActionAgainstUser" = "While we review this, you can take action against %@"; @@ -378,7 +385,7 @@ yüklenemiyor."; "Scene.ServerPicker.EmptyState.FindingServers" = "Mevcut sunucular aranıyor..."; "Scene.ServerPicker.EmptyState.NoResults" = "Sonuç yok"; "Scene.ServerPicker.Input.Placeholder" = "Toplulukları ara"; -"Scene.ServerPicker.Input.SearchServersOrEnterUrl" = "Search servers or enter URL"; +"Scene.ServerPicker.Input.SearchServersOrEnterUrl" = "Sunucuları ara ya da bir bağlantı gir"; "Scene.ServerPicker.Label.Category" = "KATEGORİ"; "Scene.ServerPicker.Label.Language" = "DİL"; "Scene.ServerPicker.Label.Users" = "KULLANICILAR"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/tr.lproj/Localizable.stringsdict b/MastodonSDK/Sources/MastodonLocalization/Resources/tr.lproj/Localizable.stringsdict index 3da12ee4e..29df92c2b 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/tr.lproj/Localizable.stringsdict +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/tr.lproj/Localizable.stringsdict @@ -234,7 +234,7 @@ one 1 takip edilen other - %ld takip edilen + %ld takip plural.count.follower diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/vi.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/vi.lproj/Localizable.strings index b3be7f302..14f36c7e7 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/vi.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/vi.lproj/Localizable.strings @@ -68,11 +68,13 @@ Vui lòng kiểm tra kết nối mạng."; "Common.Controls.Friendship.EditInfo" = "Chỉnh sửa"; "Common.Controls.Friendship.Follow" = "Theo dõi"; "Common.Controls.Friendship.Following" = "Đang theo dõi"; +"Common.Controls.Friendship.HideReblogs" = "Ẩn đăng lại"; "Common.Controls.Friendship.Mute" = "Ẩn"; "Common.Controls.Friendship.MuteUser" = "Ẩn %@"; "Common.Controls.Friendship.Muted" = "Đã ẩn"; "Common.Controls.Friendship.Pending" = "Đang chờ"; "Common.Controls.Friendship.Request" = "Yêu cầu"; +"Common.Controls.Friendship.ShowReblogs" = "Hiện đăng lại"; "Common.Controls.Friendship.Unblock" = "Bỏ chặn"; "Common.Controls.Friendship.UnblockUser" = "Bỏ chặn %@"; "Common.Controls.Friendship.Unmute" = "Bỏ ẩn"; @@ -135,7 +137,7 @@ cho tới khi họ bỏ chặn bạn."; cho tới khi bạn bỏ chặn họ. Họ sẽ thấy trang của bạn như thế này."; "Common.Controls.Timeline.Header.NoStatusFound" = "Không tìm thấy tút"; -"Common.Controls.Timeline.Header.SuspendedWarning" = "Người dùng đã bị vô hiệu hóa."; +"Common.Controls.Timeline.Header.SuspendedWarning" = "Người này đã bị vô hiệu hóa."; "Common.Controls.Timeline.Header.UserBlockedWarning" = "Bạn không thể xem trang %@ cho tới khi họ bỏ chặn bạn."; "Common.Controls.Timeline.Header.UserBlockingWarning" = "Bạn không thể xem trang %@ @@ -149,6 +151,7 @@ Họ sẽ thấy trang của bạn như thế này."; "Scene.AccountList.AddAccount" = "Thêm tài khoản"; "Scene.AccountList.DismissAccountSwitcher" = "Bỏ qua chuyển đổi tài khoản"; "Scene.AccountList.TabBarHint" = "Đang dùng tài khoản: %@. Nhấn hai lần và giữ để đổi sang tài khoản khác"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "Thêm media"; "Scene.Compose.Accessibility.AppendPoll" = "Tạo bình chọn"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "Chọn emoji"; @@ -187,7 +190,7 @@ tải lên Mastodon."; "Scene.Compose.Title.NewPost" = "Viết tút"; "Scene.Compose.Title.NewReply" = "Viết trả lời"; "Scene.Compose.Visibility.Direct" = "Nhắn riêng"; -"Scene.Compose.Visibility.Private" = "Riêng tư"; +"Scene.Compose.Visibility.Private" = "Chỉ người theo dõi"; "Scene.Compose.Visibility.Public" = "Công khai"; "Scene.Compose.Visibility.Unlisted" = "Hạn chế"; "Scene.ConfirmEmail.Button.OpenEmailApp" = "Mở ứng dụng email"; @@ -252,13 +255,17 @@ tải lên Mastodon."; "Scene.Profile.Fields.Placeholder.Label" = "Nhãn"; "Scene.Profile.Header.FollowsYou" = "Đang theo dõi bạn"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "Xác nhận chặn %@"; -"Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Chặn người dùng"; +"Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "Chặn người này"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Xác nhận ẩn đăng lại"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Ẩn đăng lại"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "Xác nhận ẩn %@"; -"Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Ẩn người dùng"; +"Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "Ẩn người này"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Xác nhận hiện đăng lại"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Hiện đăng lại"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "Xác nhận bỏ chặn %@"; -"Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Bỏ chặn người dùng"; +"Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "Bỏ chặn người này"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "Xác nhận bỏ ẩn %@"; -"Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Title" = "Bỏ ẩn người dùng"; +"Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Title" = "Bỏ ẩn người này"; "Scene.Profile.SegmentedControl.About" = "Giới thiệu"; "Scene.Profile.SegmentedControl.Media" = "Media"; "Scene.Profile.SegmentedControl.Posts" = "Tút"; @@ -286,7 +293,7 @@ tải lên Mastodon."; "Scene.Register.Error.Special.UsernameInvalid" = "Tên người dùng chỉ có thể chứa các ký tự chữ và số và dấu gạch dưới"; "Scene.Register.Error.Special.UsernameTooLong" = "Tên người dùng không thể dài hơn 30 ký tự"; "Scene.Register.Input.Avatar.Delete" = "Xóa"; -"Scene.Register.Input.DisplayName.Placeholder" = "tên hiển thị"; +"Scene.Register.Input.DisplayName.Placeholder" = "biệt danh"; "Scene.Register.Input.Email.Placeholder" = "email"; "Scene.Register.Input.Invite.RegistrationUserInviteRequest" = "Vì sao bạn muốn tham gia?"; "Scene.Register.Input.Password.Accessibility.Checked" = "đã ổn"; @@ -348,15 +355,15 @@ tải lên Mastodon."; "Scene.Search.Recommend.ButtonText" = "Xem tất cả"; "Scene.Search.Recommend.HashTag.Description" = "Những hashtag đang được sử dụng nhiều nhất"; "Scene.Search.Recommend.HashTag.PeopleTalking" = "%@ người đang thảo luận"; -"Scene.Search.Recommend.HashTag.Title" = "Xu hướng trên Mastodon"; +"Scene.Search.Recommend.HashTag.Title" = "Nổi bật trên Mastodon"; "Scene.Search.SearchBar.Cancel" = "Hủy bỏ"; -"Scene.Search.SearchBar.Placeholder" = "Tìm hashtag và người dùng"; +"Scene.Search.SearchBar.Placeholder" = "Tìm hashtag và mọi người"; "Scene.Search.Searching.Clear" = "Xóa"; "Scene.Search.Searching.EmptyState.NoResults" = "Không có kết quả"; "Scene.Search.Searching.RecentSearch" = "Tìm kiếm gần đây"; "Scene.Search.Searching.Segment.All" = "Tất cả"; "Scene.Search.Searching.Segment.Hashtags" = "Hashtag"; -"Scene.Search.Searching.Segment.People" = "Người dùng"; +"Scene.Search.Searching.Segment.People" = "Mọi người"; "Scene.Search.Searching.Segment.Posts" = "Tút"; "Scene.Search.Title" = "Tìm kiếm"; "Scene.ServerPicker.Button.Category.Academia" = "học thuật"; @@ -382,7 +389,7 @@ tải lên Mastodon."; "Scene.ServerPicker.Input.SearchServersOrEnterUrl" = "Tìm máy chủ hoặc nhập URL"; "Scene.ServerPicker.Label.Category" = "PHÂN LOẠI"; "Scene.ServerPicker.Label.Language" = "NGÔN NGỮ"; -"Scene.ServerPicker.Label.Users" = "NGƯỜI DÙNG"; +"Scene.ServerPicker.Label.Users" = "NGƯỜI"; "Scene.ServerPicker.Subtitle" = "Chọn một máy chủ dựa theo sở thích, tôn giáo, hoặc ý muốn của bạn."; "Scene.ServerPicker.SubtitleExtend" = "Chọn một máy chủ dựa theo sở thích, tôn giáo, hoặc ý muốn của bạn. Mỗi máy chủ có thể được vận hành bởi một cá nhân hoặc một tổ chức."; "Scene.ServerPicker.Title" = "Mastodon gồm nhiều máy chủ với thành viên riêng."; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/zh-Hans.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/zh-Hans.lproj/Localizable.strings index 62117499d..8e5de6b52 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/zh-Hans.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/zh-Hans.lproj/Localizable.strings @@ -68,11 +68,13 @@ "Common.Controls.Friendship.EditInfo" = "编辑"; "Common.Controls.Friendship.Follow" = "关注"; "Common.Controls.Friendship.Following" = "正在关注"; +"Common.Controls.Friendship.HideReblogs" = "Hide Reblogs"; "Common.Controls.Friendship.Mute" = "静音"; "Common.Controls.Friendship.MuteUser" = "静音 %@"; "Common.Controls.Friendship.Muted" = "已静音"; "Common.Controls.Friendship.Pending" = "待确认"; "Common.Controls.Friendship.Request" = "请求"; +"Common.Controls.Friendship.ShowReblogs" = "Show Reblogs"; "Common.Controls.Friendship.Unblock" = "解除屏蔽"; "Common.Controls.Friendship.UnblockUser" = "解除屏蔽 %@"; "Common.Controls.Friendship.Unmute" = "取消静音"; @@ -149,6 +151,7 @@ "Scene.AccountList.AddAccount" = "添加账户"; "Scene.AccountList.DismissAccountSwitcher" = "关闭账户切换页面"; "Scene.AccountList.TabBarHint" = "当前账户:%@。 双击并按住来打开账户切换页面"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "添加附件"; "Scene.Compose.Accessibility.AppendPoll" = "添加投票"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "自定义表情选择器"; @@ -253,8 +256,12 @@ "Scene.Profile.Header.FollowsYou" = "关注了你"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "确认屏蔽 %@"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "屏蔽帐户"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "Confirm to hide reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "Hide Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "确认静音 %@"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "静音账户"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "Confirm to show reblogs"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "Show Reblogs"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "确认取消屏蔽 %@"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "解除屏蔽帐户"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "确认取消静音 %@"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/zh-Hant.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/zh-Hant.lproj/Localizable.strings index 10fd6837a..f97926795 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/zh-Hant.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/zh-Hant.lproj/Localizable.strings @@ -1,5 +1,5 @@ "Common.Alerts.BlockDomain.BlockEntireDomain" = "封鎖網域"; -"Common.Alerts.BlockDomain.Title" = "真的非常確定封鎖整個 %@ 網域嗎?大部分情況下,您只需要封鎖或靜音少數特定的帳帳戶能滿足需求了。您將不能看到來自此網域的內容。您來自該網域的跟隨者也將被移除。"; +"Common.Alerts.BlockDomain.Title" = "真的非常確定要封鎖整個 %@ 網域嗎?大部分情況下,您只需要封鎖或靜音少數特定的帳號能滿足需求了。您將不能看到來自此網域的內容。您來自該網域的跟隨者也將被移除。"; "Common.Alerts.CleanCache.Message" = "成功清除 %@ 快取。"; "Common.Alerts.CleanCache.Title" = "清除快取"; "Common.Alerts.Common.PleaseTryAgain" = "請再試一次。"; @@ -68,11 +68,13 @@ "Common.Controls.Friendship.EditInfo" = "編輯"; "Common.Controls.Friendship.Follow" = "跟隨"; "Common.Controls.Friendship.Following" = "跟隨中"; +"Common.Controls.Friendship.HideReblogs" = "隱藏轉嘟"; "Common.Controls.Friendship.Mute" = "靜音"; "Common.Controls.Friendship.MuteUser" = "靜音 %@"; "Common.Controls.Friendship.Muted" = "已靜音"; "Common.Controls.Friendship.Pending" = "等待中"; "Common.Controls.Friendship.Request" = "請求"; +"Common.Controls.Friendship.ShowReblogs" = "顯示轉嘟"; "Common.Controls.Friendship.Unblock" = "解除封鎖"; "Common.Controls.Friendship.UnblockUser" = "解除封鎖 %@"; "Common.Controls.Friendship.Unmute" = "取消靜音"; @@ -145,6 +147,7 @@ "Scene.AccountList.AddAccount" = "新增帳號"; "Scene.AccountList.DismissAccountSwitcher" = "關閉帳號切換器"; "Scene.AccountList.TabBarHint" = "目前已選擇的個人檔案:%@。點兩下然後按住以顯示帳號切換器"; +"Scene.Bookmark.Title" = "Bookmarks"; "Scene.Compose.Accessibility.AppendAttachment" = "新增附件"; "Scene.Compose.Accessibility.AppendPoll" = "新增投票"; "Scene.Compose.Accessibility.CustomEmojiPicker" = "自訂 emoji 選擇器"; @@ -248,8 +251,12 @@ "Scene.Profile.Header.FollowsYou" = "跟隨了您"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Message" = "確認將 %@ 封鎖"; "Scene.Profile.RelationshipActionAlert.ConfirmBlockUser.Title" = "封鎖"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Message" = "確認隱藏轉嘟"; +"Scene.Profile.RelationshipActionAlert.ConfirmHideReblogs.Title" = "隱藏轉嘟"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Message" = "確認將 %@ 靜音"; "Scene.Profile.RelationshipActionAlert.ConfirmMuteUser.Title" = "靜音"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Message" = "確認顯示轉嘟"; +"Scene.Profile.RelationshipActionAlert.ConfirmShowReblogs.Title" = "顯示轉嘟"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Message" = "確認將 %@ 取消封鎖"; "Scene.Profile.RelationshipActionAlert.ConfirmUnblockUser.Title" = "取消封鎖"; "Scene.Profile.RelationshipActionAlert.ConfirmUnmuteUser.Message" = "確認將 %@ 取消靜音"; diff --git a/MastodonSDK/Sources/MastodonSDK/API/Mastodon+API+V2+Media.swift b/MastodonSDK/Sources/MastodonSDK/API/Mastodon+API+V2+Media.swift index 4f8ac71d5..6c905438c 100644 --- a/MastodonSDK/Sources/MastodonSDK/API/Mastodon+API+V2+Media.swift +++ b/MastodonSDK/Sources/MastodonSDK/API/Mastodon+API+V2+Media.swift @@ -43,6 +43,20 @@ extension Mastodon.API.V2.Media { request.timeoutInterval = 180 // should > 200 Kb/s for 40 MiB media attachment let serialStream = query.serialStream request.httpBodyStream = serialStream.boundStreams.input + + // total unit count in bytes count + // will small than actally count due to multipart protocol meta + serialStream.progress.totalUnitCount = { + var size = 0 + size += query.file?.sizeInByte ?? 0 + size += query.thumbnail?.sizeInByte ?? 0 + return Int64(size) + }() + query.progress.addChild( + serialStream.progress, + withPendingUnitCount: query.progress.totalUnitCount + ) + return session.dataTaskPublisher(for: request) .tryMap { data, response in let value = try Mastodon.API.decode(type: Mastodon.Entity.Attachment.self, from: data, response: response) diff --git a/MastodonSDK/Sources/MastodonSDK/Query/MediaAttachment.swift b/MastodonSDK/Sources/MastodonSDK/Query/MediaAttachment.swift index f1fdac8bb..05639964e 100644 --- a/MastodonSDK/Sources/MastodonSDK/Query/MediaAttachment.swift +++ b/MastodonSDK/Sources/MastodonSDK/Query/MediaAttachment.swift @@ -54,7 +54,7 @@ extension Mastodon.Query.MediaAttachment { return data.map { "data:" + mimeType + ";base64," + $0.base64EncodedString() } } - var sizeInByte: Int? { + public var sizeInByte: Int? { switch self { case .jpeg(let data), .gif(let data), .png(let data): return data?.count diff --git a/MastodonSDK/Sources/MastodonSDK/Query/SerialStream.swift b/MastodonSDK/Sources/MastodonSDK/Query/SerialStream.swift index 5d806b6ba..5808b9f6d 100644 --- a/MastodonSDK/Sources/MastodonSDK/Query/SerialStream.swift +++ b/MastodonSDK/Sources/MastodonSDK/Query/SerialStream.swift @@ -82,6 +82,10 @@ final class SerialStream: NSObject { self.progress.completedUnitCount += Int64(writeResult) self.logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): estimate progress: \(self.progress.completedUnitCount)/\(self.progress.totalUnitCount)") + + if writeResult == -1 { + break + } } } diff --git a/MastodonSDK/Sources/MastodonUI/DataSource/CustomEmojiPickerSection+Diffable.swift b/MastodonSDK/Sources/MastodonUI/DataSource/CustomEmojiPickerSection+Diffable.swift index ca3658e95..4c142b532 100644 --- a/MastodonSDK/Sources/MastodonUI/DataSource/CustomEmojiPickerSection+Diffable.swift +++ b/MastodonSDK/Sources/MastodonUI/DataSource/CustomEmojiPickerSection+Diffable.swift @@ -5,55 +5,55 @@ // Created by MainasuK on 22/10/10. // -import Foundation +import UIKit import MastodonCore extension CustomEmojiPickerSection { -// static func collectionViewDiffableDataSource( -// collectionView: UICollectionView, -// dependency: NeedsDependency -// ) -> UICollectionViewDiffableDataSource { -// let dataSource = UICollectionViewDiffableDataSource(collectionView: collectionView) { [weak dependency] collectionView, indexPath, item -> UICollectionViewCell? in -// guard let _ = dependency else { return nil } -// switch item { -// case .emoji(let attribute): -// let cell = collectionView.dequeueReusableCell(withReuseIdentifier: String(describing: CustomEmojiPickerItemCollectionViewCell.self), for: indexPath) as! CustomEmojiPickerItemCollectionViewCell -// let placeholder = UIImage.placeholder(size: CustomEmojiPickerItemCollectionViewCell.itemSize, color: .systemFill) -// .af.imageRounded(withCornerRadius: 4) -// -// let isAnimated = !UserDefaults.shared.preferredStaticEmoji -// let url = URL(string: isAnimated ? attribute.emoji.url : attribute.emoji.staticURL) -// cell.emojiImageView.sd_setImage( -// with: url, -// placeholderImage: placeholder, -// options: [], -// context: nil -// ) -// cell.accessibilityLabel = attribute.emoji.shortcode -// return cell -// } -// } -// -// dataSource.supplementaryViewProvider = { [weak dataSource] collectionView, kind, indexPath -> UICollectionReusableView? in -// guard let dataSource = dataSource else { return nil } -// let sections = dataSource.snapshot().sectionIdentifiers -// guard indexPath.section < sections.count else { return nil } -// let section = sections[indexPath.section] -// -// switch kind { -// case String(describing: CustomEmojiPickerHeaderCollectionReusableView.self): -// let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: String(describing: CustomEmojiPickerHeaderCollectionReusableView.self), for: indexPath) as! CustomEmojiPickerHeaderCollectionReusableView -// switch section { -// case .emoji(let name): -// header.titleLabel.text = name -// } -// return header -// default: -// assertionFailure() -// return nil -// } -// } -// -// return dataSource -// } + static func collectionViewDiffableDataSource( + collectionView: UICollectionView, + context: AppContext + ) -> UICollectionViewDiffableDataSource { + let dataSource = UICollectionViewDiffableDataSource(collectionView: collectionView) { [weak context] collectionView, indexPath, item -> UICollectionViewCell? in + guard let _ = context else { return nil } + switch item { + case .emoji(let attribute): + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: String(describing: CustomEmojiPickerItemCollectionViewCell.self), for: indexPath) as! CustomEmojiPickerItemCollectionViewCell + let placeholder = UIImage.placeholder(size: CustomEmojiPickerItemCollectionViewCell.itemSize, color: .systemFill) + .af.imageRounded(withCornerRadius: 4) + + let isAnimated = !UserDefaults.shared.preferredStaticEmoji + let url = URL(string: isAnimated ? attribute.emoji.url : attribute.emoji.staticURL) + cell.emojiImageView.sd_setImage( + with: url, + placeholderImage: placeholder, + options: [], + context: nil + ) + cell.accessibilityLabel = attribute.emoji.shortcode + return cell + } + } + + dataSource.supplementaryViewProvider = { [weak dataSource] collectionView, kind, indexPath -> UICollectionReusableView? in + guard let dataSource = dataSource else { return nil } + let sections = dataSource.snapshot().sectionIdentifiers + guard indexPath.section < sections.count else { return nil } + let section = sections[indexPath.section] + + switch kind { + case String(describing: CustomEmojiPickerHeaderCollectionReusableView.self): + let header = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: String(describing: CustomEmojiPickerHeaderCollectionReusableView.self), for: indexPath) as! CustomEmojiPickerHeaderCollectionReusableView + switch section { + case .emoji(let name): + header.titleLabel.text = name + } + return header + default: + assertionFailure() + return nil + } + } + + return dataSource + } } diff --git a/MastodonSDK/Sources/MastodonUI/Extension/MetaEntity+Accessibility.swift b/MastodonSDK/Sources/MastodonUI/Extension/MetaEntity+Accessibility.swift new file mode 100644 index 000000000..b604a3870 --- /dev/null +++ b/MastodonSDK/Sources/MastodonUI/Extension/MetaEntity+Accessibility.swift @@ -0,0 +1,27 @@ +// +// MetaEntity+Accessibility.swift +// +// +// Created by Jed Fox on 2022-11-03. +// + +import Meta +import MastodonLocalization + +extension Meta.Entity { + var accessibilityCustomActionLabel: String? { + switch meta { + case .url(_, trimmed: _, url: let url, userInfo: _): + return L10n.Common.Controls.Status.MetaEntity.url(url) + case .hashtag(_, hashtag: let hashtag, userInfo: _): + return L10n.Common.Controls.Status.MetaEntity.hashtag(hashtag) + case .mention(_, mention: let mention, userInfo: _): + return L10n.Common.Controls.Status.MetaEntity.mention(mention) + case .email(let email, userInfo: _): + return L10n.Common.Controls.Status.MetaEntity.email(email) + // emoji are not actionable + case .emoji: + return nil + } + } +} diff --git a/MastodonSDK/Sources/MastodonUI/Extension/View.swift b/MastodonSDK/Sources/MastodonUI/Extension/View.swift new file mode 100644 index 000000000..756e51b64 --- /dev/null +++ b/MastodonSDK/Sources/MastodonUI/Extension/View.swift @@ -0,0 +1,21 @@ +// +// View.swift +// +// +// Created by MainasuK on 2022/11/8. +// + +import SwiftUI + +extension View { + public func badgeView(_ content: Content) -> some View where Content: View { + overlay( + ZStack { + content + } + .alignmentGuide(.top) { $0.height / 2 } + .alignmentGuide(.trailing) { $0.width / 2 } + .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topTrailing) + ) + } +} diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentView.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentView.swift index f4d1397a9..a2567d0b6 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentView.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentView.swift @@ -10,237 +10,194 @@ import UIKit import SwiftUI import Introspect import AVKit +import MastodonAsset +import MastodonLocalization +import Introspect public struct AttachmentView: View { - static let size = CGSize(width: 56, height: 56) - static let cornerRadius: CGFloat = 8 - @ObservedObject var viewModel: AttachmentViewModel - - let action: (Action) -> Void - - @State var isCaptionEditorPresented = false - @State var caption = "" + + var blurEffect: UIBlurEffect { + UIBlurEffect(style: .systemUltraThinMaterialDark) + } public var body: some View { - Text("Hello") -// Menu { -// menu -// } label: { -// let image = viewModel.thumbnail ?? .placeholder(color: .systemGray3) -// Image(uiImage: image) -// .resizable() -// .aspectRatio(contentMode: .fill) -// .frame(width: AttachmentView.size.width, height: AttachmentView.size.height) -// .overlay { -// ZStack { -// // spinner -// if viewModel.output == nil { -// Color.clear -// .background(.ultraThinMaterial) -// ProgressView() -// .progressViewStyle(CircularProgressViewStyle()) -// .foregroundStyle(.regularMaterial) -// } -// // border -// RoundedRectangle(cornerRadius: AttachmentView.cornerRadius) -// .stroke(Color.black.opacity(0.05)) -// } -// .transition(.opacity) -// } -// .overlay(alignment: .bottom) { -// HStack(alignment: .bottom) { -// // alt -// VStack(spacing: 2) { -// switch viewModel.output { -// case .video: -// Image(uiImage: Asset.Media.playerRectangle.image) -// .resizable() -// .frame(width: 16, height: 12) -// default: -// EmptyView() -// } -// if !viewModel.caption.isEmpty { -// Image(uiImage: Asset.Media.altRectangle.image) -// .resizable() -// .frame(width: 16, height: 12) -// } -// } -// Spacer() -// // option -// Image(systemName: "ellipsis") -// .resizable() -// .frame(width: 12, height: 12) -// .symbolVariant(.circle) -// .symbolVariant(.fill) -// .symbolRenderingMode(.palette) -// .foregroundStyle(.white, .black) -// } -// .padding(6) -// } -// .cornerRadius(AttachmentView.cornerRadius) -// } // end Menu -// .sheet(isPresented: $isCaptionEditorPresented) { -// captionSheet -// } // end caption sheet -// .sheet(isPresented: $viewModel.isPreviewPresented) { -// previewSheet -// } // end preview sheet - + Color.clear.aspectRatio(358.0/232.0, contentMode: .fill) + .overlay( + ZStack { + let image = viewModel.thumbnail ?? .placeholder(color: .secondarySystemFill) + Image(uiImage: image) + .resizable() + .aspectRatio(contentMode: .fill) + } + ) + .overlay( + ZStack { + Color.clear + .overlay( + VStack(alignment: .leading) { + let placeholder: String = { + switch viewModel.output { + case .image: return L10n.Scene.Compose.Attachment.descriptionPhoto + case .video: return L10n.Scene.Compose.Attachment.descriptionVideo + case nil: return "" + } + }() + Spacer() + TextField(placeholder, text: $viewModel.caption) + .lineLimit(1) + .textFieldStyle(.plain) + .foregroundColor(.white) + .placeholder(placeholder, when: viewModel.caption.isEmpty) + .padding(8) + } + ) + + // loading… + if viewModel.output == nil, viewModel.error == nil { + ProgressView() + .progressViewStyle(.circular) + } + + // load failed + // cannot re-entry + if viewModel.output == nil, let error = viewModel.error { + VisualEffectView(effect: blurEffect) + VStack { + Text("Load Failed") // TODO: i18n + .font(.system(size: 13, weight: .semibold)) + Text(error.localizedDescription) + .font(.system(size: 12, weight: .regular)) + } + } + + // loaded + // uploading… or upload failed + // could retry upload when error emit + if viewModel.output != nil, viewModel.uploadState != .finish { + VisualEffectView(effect: blurEffect) + VStack { + let action: AttachmentViewModel.Action = { + if let _ = viewModel.error { + return .retry + } else { + return .remove + } + }() + Button { + viewModel.delegate?.attachmentViewModel(viewModel, actionButtonDidPressed: action) + } label: { + let image: UIImage = { + switch action { + case .remove: + return Asset.Scene.Compose.Attachment.stop.image.withRenderingMode(.alwaysTemplate) + case .retry: + return Asset.Scene.Compose.Attachment.retry.image.withRenderingMode(.alwaysTemplate) + } + }() + Image(uiImage: image) + .foregroundColor(.white) + .padding() + .background(Color(Asset.Scene.Compose.Attachment.indicatorButtonBackground.color)) + .overlay( + Group { + switch viewModel.uploadState { + case .compressing: + CircleProgressView(progress: viewModel.videoCompressProgress) + .animation(.default, value: viewModel.videoCompressProgress) + case .uploading: + CircleProgressView(progress: viewModel.fractionCompleted) + .animation(.default, value: viewModel.fractionCompleted) + default: + EmptyView() + } + } + ) + .clipShape(Circle()) + .padding() + } + + let title: String = { + switch action { + case .remove: + switch viewModel.uploadState { + case .compressing: + return "Comporessing..." // TODO: i18n + default: + if viewModel.fractionCompleted < 0.9 { + let totalSizeInByte = viewModel.outputSizeInByte + let uploadSizeInByte = Double(totalSizeInByte) * min(1.0, viewModel.fractionCompleted + 0.1) // 9:1 + let total = viewModel.byteCountFormatter.string(fromByteCount: Int64(totalSizeInByte)) + let upload = viewModel.byteCountFormatter.string(fromByteCount: Int64(uploadSizeInByte)) + return "\(upload) / \(total)" + } else { + return "Server Processing..." // TODO: i18n + } + } + case .retry: + return "Upload Failed" // TODO: i18n + } + }() + let subtitle: String = { + switch action { + case .remove: + if viewModel.progress.fractionCompleted < 1, viewModel.uploadState == .uploading { + if viewModel.progress.fractionCompleted < 0.9 { + return viewModel.remainTimeLocalizedString ?? "" + } else { + return "" + } + } else if viewModel.videoCompressProgress < 1, viewModel.uploadState == .compressing { + return viewModel.percentageFormatter.string(from: NSNumber(floatLiteral: viewModel.videoCompressProgress)) ?? "" + } else { + return "" + } + case .retry: + return viewModel.error?.localizedDescription ?? "" + } + }() + Text(title) + .font(.system(size: 13, weight: .semibold)) + .foregroundColor(.white) + .padding(.horizontal) + Text(subtitle) + .font(.system(size: 12, weight: .regular)) + .foregroundColor(.white) + .padding(.horizontal) + .lineLimit(nil) + .multilineTextAlignment(.center) + .frame(maxWidth: 240) + } + } + } // end ZStack + ) } // end body -// var menu: some View { -// Group { -// Button( -// action: { -// action(.preview) -// }, -// label: { -// Label(L10n.Scene.Compose.Media.preview, systemImage: "photo") -// } -// ) -// // caption -// let canAddCaption: Bool = { -// switch viewModel.output { -// case .image: return true -// case .video: return false -// case .none: return false -// } -// }() -// if canAddCaption { -// Button( -// action: { -// action(.caption) -// caption = viewModel.caption -// isCaptionEditorPresented.toggle() -// }, -// label: { -// let title = viewModel.caption.isEmpty ? L10n.Scene.Compose.Media.Caption.add : L10n.Scene.Compose.Media.Caption.update -// Label(title, systemImage: "text.bubble") -// // FIXME: https://stackoverflow.com/questions/72318730/how-to-customize-swiftui-menu -// // add caption subtitle -// } -// ) -// } -// Divider() -// // remove -// Button( -// role: .destructive, -// action: { -// action(.remove) -// }, -// label: { -// Label(L10n.Scene.Compose.Media.remove, systemImage: "minus.circle") -// } -// ) -// } -// } - -// var captionSheet: some View { -// NavigationView { -// ScrollView(.vertical) { -// VStack { -// // preview -// switch viewModel.output { -// case .image: -// let image = viewModel.thumbnail ?? .placeholder(color: .systemGray3) -// Image(uiImage: image) -// .resizable() -// .aspectRatio(contentMode: .fill) -// case .video(let url, _): -// let player = AVPlayer(url: url) -// VideoPlayer(player: player) -// .frame(height: 300) -// case .none: -// EmptyView() -// } -// // caption textField -// TextField( -// text: $caption, -// prompt: Text(L10n.Scene.Compose.Media.Caption.addADescriptionForThisImage) -// ) { -// Text(L10n.Scene.Compose.Media.Caption.update) -// } -// .padding() -// .introspectTextField { textField in -// textField.becomeFirstResponder() -// } -// } -// } -// .navigationTitle(L10n.Scene.Compose.Media.Caption.update) -// .navigationBarTitleDisplayMode(.inline) -// .toolbar { -// ToolbarItem(placement: .navigationBarLeading) { -// Button { -// isCaptionEditorPresented.toggle() -// } label: { -// Image(systemName: "xmark.circle.fill") -// .resizable() -// .frame(width: 30, height: 30, alignment: .center) -// .symbolRenderingMode(.hierarchical) -// .foregroundStyle(Color(uiColor: .secondaryLabel), Color(uiColor: .tertiaryLabel)) -// } -// } -// ToolbarItem(placement: .navigationBarTrailing) { -// Button { -// viewModel.caption = caption.trimmingCharacters(in: .whitespacesAndNewlines) -// isCaptionEditorPresented.toggle() -// } label: { -// Text(L10n.Common.Controls.Actions.save) -// } -// } -// } -// } // end NavigationView -// } - - // design for share extension - // preferred UIKit preview in app -// var previewSheet: some View { -// NavigationView { -// ScrollView(.vertical) { -// VStack { -// // preview -// switch viewModel.output { -// case .image: -// let image = viewModel.thumbnail ?? .placeholder(color: .systemGray3) -// Image(uiImage: image) -// .resizable() -// .aspectRatio(contentMode: .fill) -// case .video(let url, _): -// let player = AVPlayer(url: url) -// VideoPlayer(player: player) -// .frame(height: 300) -// case .none: -// EmptyView() -// } -// Spacer() -// } -// } -// .navigationTitle(L10n.Scene.Compose.Media.preview) -// .navigationBarTitleDisplayMode(.inline) -// .toolbar { -// ToolbarItem(placement: .navigationBarLeading) { -// Button { -// viewModel.isPreviewPresented.toggle() -// } label: { -// Image(systemName: "xmark.circle.fill") -// .resizable() -// .frame(width: 30, height: 30, alignment: .center) -// .symbolRenderingMode(.hierarchical) -// .foregroundStyle(Color(uiColor: .secondaryLabel), Color(uiColor: .tertiaryLabel)) -// } -// } -// } -// } // end NavigationView -// } - } -extension AttachmentView { - public enum Action: Hashable { - case preview - case caption - case remove +// https://stackoverflow.com/a/57715771/3797903 +extension View { + fileprivate func placeholder( + when shouldShow: Bool, + alignment: Alignment = .leading, + @ViewBuilder placeholder: () -> Content) -> some View { + + ZStack(alignment: alignment) { + placeholder().opacity(shouldShow ? 1 : 0) + self + } + } + + fileprivate func placeholder( + _ text: String, + when shouldShow: Bool, + alignment: Alignment = .leading) -> some View { + + placeholder(when: shouldShow, alignment: alignment) { + Text(text) + .foregroundColor(.white.opacity(0.7)) + .lineLimit(1) + } } } diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Compress.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Compress.swift new file mode 100644 index 000000000..ac1811a06 --- /dev/null +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Compress.swift @@ -0,0 +1,94 @@ +// +// AttachmentViewModel+Compress.swift +// +// +// Created by MainasuK on 2022/11/11. +// + +import os.log +import UIKit +import AVKit +import SessionExporter +import MastodonCore + +extension AttachmentViewModel { + func comporessVideo(url: URL) async throws -> URL { + let urlAsset = AVURLAsset(url: url) + let exporter = NextLevelSessionExporter(withAsset: urlAsset) + exporter.outputFileType = .mp4 + + var isLandscape: Bool = { + guard let track = urlAsset.tracks(withMediaType: .video).first else { + return true + } + + let size = track.naturalSize.applying(track.preferredTransform) + return abs(size.width) >= abs(size.height) + }() + + let outputURL = try FileManager.default.createTemporaryFileURL( + filename: UUID().uuidString, + pathExtension: url.pathExtension + ) + exporter.outputURL = outputURL + + let compressionDict: [String: Any] = [ + AVVideoAverageBitRateKey: NSNumber(integerLiteral: 3000000), // 3000k + AVVideoProfileLevelKey: AVVideoProfileLevelH264HighAutoLevel as String, + AVVideoAverageNonDroppableFrameRateKey: NSNumber(floatLiteral: 30), // 30 FPS + ] + exporter.videoOutputConfiguration = [ + AVVideoCodecKey: AVVideoCodecType.h264, + AVVideoWidthKey: NSNumber(integerLiteral: isLandscape ? 1280 : 720), + AVVideoHeightKey: NSNumber(integerLiteral: isLandscape ? 720 : 1280), + AVVideoScalingModeKey: AVVideoScalingModeResizeAspectFill, + AVVideoCompressionPropertiesKey: compressionDict + ] + exporter.audioOutputConfiguration = [ + AVFormatIDKey: kAudioFormatMPEG4AAC, + AVEncoderBitRateKey: NSNumber(integerLiteral: 128000), // 128k + AVNumberOfChannelsKey: NSNumber(integerLiteral: 2), + AVSampleRateKey: NSNumber(value: Float(44100)) + ] + + // needs set to LOW priority to prevent priority inverse issue + let task = Task(priority: .utility) { + _ = try await exportVideo(by: exporter) + } + _ = try await task.value + + return outputURL + } + + private func exportVideo(by exporter: NextLevelSessionExporter) async throws -> URL { + guard let outputURL = exporter.outputURL else { + throw AppError.badRequest + } + return try await withCheckedThrowingContinuation { continuation in + exporter.export(progressHandler: { progress in + DispatchQueue.main.async { [weak self] in + guard let self = self else { return } + self.videoCompressProgress = Double(progress) + os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: export progress: %.2f", ((#file as NSString).lastPathComponent), #line, #function, progress) + } + }, completionHandler: { result in + switch result { + case .success(let status): + switch status { + case .completed: + print("NextLevelSessionExporter, export completed, \(exporter.outputURL?.description ?? "")") + continuation.resume(with: .success(outputURL)) + default: + if Task.isCancelled { + exporter.cancelExport() + os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: cancel export", ((#file as NSString).lastPathComponent), #line, #function) + } + print("NextLevelSessionExporter, did not complete") + } + case .failure(let error): + continuation.resume(with: .failure(error)) + } + }) + } + } // end func +} diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+DragAndDrop.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+DragAndDrop.swift new file mode 100644 index 000000000..269b836bc --- /dev/null +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+DragAndDrop.swift @@ -0,0 +1,144 @@ +// +// AttachmentViewModel+DragAndDrop.swift +// +// +// Created by MainasuK on 2022/11/8. +// + +import os.log +import UIKit +import Combine +import UniformTypeIdentifiers + +// MARK: - TypeIdentifiedItemProvider +extension AttachmentViewModel: TypeIdentifiedItemProvider { + public static var typeIdentifier: String { + // must in UTI format + // https://developer.apple.com/library/archive/qa/qa1796/_index.html + return "org.joinmastodon.app.AttachmentViewModel" + } +} + +// MARK: - NSItemProviderWriting +extension AttachmentViewModel: NSItemProviderWriting { + + + /// Attachment uniform type idendifiers + /// + /// The latest one for in-app drag and drop. + /// And use generic `image` and `movie` type to + /// allows transformable media in different formats + public static var writableTypeIdentifiersForItemProvider: [String] { + return [ + UTType.image.identifier, + UTType.movie.identifier, + AttachmentViewModel.typeIdentifier, + ] + } + + public var writableTypeIdentifiersForItemProvider: [String] { + // should append elements in priority order from high to low + var typeIdentifiers: [String] = [] + + // FIXME: check jpg or png + switch input { + case .image: + typeIdentifiers.append(UTType.png.identifier) + case .url(let url): + let _uti = UTType(filenameExtension: url.pathExtension) + if let uti = _uti { + if uti.conforms(to: .image) { + typeIdentifiers.append(UTType.png.identifier) + } else if uti.conforms(to: .movie) { + typeIdentifiers.append(UTType.mpeg4Movie.identifier) + } + } + case .pickerResult(let item): + if item.itemProvider.isImage() { + typeIdentifiers.append(UTType.png.identifier) + } else if item.itemProvider.isMovie() { + typeIdentifiers.append(UTType.mpeg4Movie.identifier) + } + case .itemProvider(let itemProvider): + if itemProvider.isImage() { + typeIdentifiers.append(UTType.png.identifier) + } else if itemProvider.isMovie() { + typeIdentifiers.append(UTType.mpeg4Movie.identifier) + } + } + + typeIdentifiers.append(AttachmentViewModel.typeIdentifier) + + return typeIdentifiers + } + + public func loadData( + withTypeIdentifier typeIdentifier: String, + forItemProviderCompletionHandler completionHandler: @escaping (Data?, Error?) -> Void + ) -> Progress? { + switch typeIdentifier { + case AttachmentViewModel.typeIdentifier: + do { + let archiver = NSKeyedArchiver(requiringSecureCoding: false) + try archiver.encodeEncodable(id, forKey: NSKeyedArchiveRootObjectKey) + archiver.finishEncoding() + let data = archiver.encodedData + completionHandler(data, nil) + } catch { + assertionFailure() + completionHandler(nil, nil) + } + default: + break + } + + let loadingProgress = Progress(totalUnitCount: 100) + + Publishers.CombineLatest( + $output, + $error + ) + .sink { [weak self] output, error in + guard let self = self else { return } + + // continue when load completed + guard output != nil || error != nil else { return } + + switch output { + case .image(let data, _): + switch typeIdentifier { + case UTType.png.identifier: + loadingProgress.completedUnitCount = 100 + completionHandler(data, nil) + default: + completionHandler(nil, nil) + } + case .video(let url, _): + switch typeIdentifier { + case UTType.png.identifier: + let _image = AttachmentViewModel.createThumbnailForVideo(url: url) + let _data = _image?.pngData() + loadingProgress.completedUnitCount = 100 + completionHandler(_data, nil) + case UTType.mpeg4Movie.identifier: + let task = URLSession.shared.dataTask(with: url) { data, response, error in + completionHandler(data, error) + } + task.progress.observe(\.fractionCompleted) { progress, change in + loadingProgress.completedUnitCount = Int64(100 * progress.fractionCompleted) + } + .store(in: &self.observations) + task.resume() + default: + completionHandler(nil, nil) + } + case nil: + completionHandler(nil, error) + } + } + .store(in: &disposeBag) + + return loadingProgress + } + +} diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Load.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Load.swift new file mode 100644 index 000000000..a259485f1 --- /dev/null +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Load.swift @@ -0,0 +1,148 @@ +// +// AttachmentViewModel+Load.swift +// +// +// Created by MainasuK on 2022/11/8. +// + +import os.log +import UIKit +import AVKit +import UniformTypeIdentifiers + +extension AttachmentViewModel { + + @MainActor + func load(input: Input) async throws -> Output { + switch input { + case .image(let image): + guard let data = image.pngData() else { + throw AttachmentError.invalidAttachmentType + } + return .image(data, imageKind: .png) + case .url(let url): + do { + let output = try await AttachmentViewModel.load(url: url) + return output + } catch { + throw error + } + case .pickerResult(let pickerResult): + do { + let output = try await AttachmentViewModel.load(itemProvider: pickerResult.itemProvider) + return output + } catch { + throw error + } + case .itemProvider(let itemProvider): + do { + let output = try await AttachmentViewModel.load(itemProvider: itemProvider) + return output + } catch { + throw error + } + } + } + + private static func load(url: URL) async throws -> Output { + guard let uti = UTType(filenameExtension: url.pathExtension) else { + throw AttachmentError.invalidAttachmentType + } + + if uti.conforms(to: .image) { + guard url.startAccessingSecurityScopedResource() else { + throw AttachmentError.invalidAttachmentType + } + defer { url.stopAccessingSecurityScopedResource() } + let imageData = try Data(contentsOf: url) + return .image(imageData, imageKind: imageData.kf.imageFormat == .PNG ? .png : .jpg) + } else if uti.conforms(to: .movie) { + guard url.startAccessingSecurityScopedResource() else { + throw AttachmentError.invalidAttachmentType + } + defer { url.stopAccessingSecurityScopedResource() } + + let fileName = UUID().uuidString + let tempDirectoryURL = FileManager.default.temporaryDirectory + let fileURL = tempDirectoryURL.appendingPathComponent(fileName).appendingPathExtension(url.pathExtension) + try FileManager.default.createDirectory(at: tempDirectoryURL, withIntermediateDirectories: true, attributes: nil) + try FileManager.default.copyItem(at: url, to: fileURL) + return .video(fileURL, mimeType: UTType.movie.preferredMIMEType ?? "video/mp4") + } else { + throw AttachmentError.invalidAttachmentType + } + } + + private static func load(itemProvider: NSItemProvider) async throws -> Output { + if itemProvider.isImage() { + guard let result = try await itemProvider.loadImageData() else { + throw AttachmentError.invalidAttachmentType + } + let imageKind: Output.ImageKind = { + if let type = result.type { + if type == UTType.png { + return .png + } + if type == UTType.jpeg { + return .jpg + } + } + + let imageData = result.data + + if imageData.kf.imageFormat == .PNG { + return .png + } + if imageData.kf.imageFormat == .JPEG { + return .jpg + } + + assertionFailure("unknown image kind") + return .jpg + }() + return .image(result.data, imageKind: imageKind) + } else if itemProvider.isMovie() { + guard let result = try await itemProvider.loadVideoData() else { + throw AttachmentError.invalidAttachmentType + } + return .video(result.url, mimeType: "video/mp4") + } else { + assertionFailure() + throw AttachmentError.invalidAttachmentType + } + } + +} + +extension AttachmentViewModel { + static func createThumbnailForVideo(url: URL) -> UIImage? { + guard FileManager.default.fileExists(atPath: url.path) else { return nil } + let asset = AVURLAsset(url: url) + let assetImageGenerator = AVAssetImageGenerator(asset: asset) + assetImageGenerator.appliesPreferredTrackTransform = true // fix orientation + do { + let cgImage = try assetImageGenerator.copyCGImage(at: CMTimeMake(value: 0, timescale: 1), actualTime: nil) + let image = UIImage(cgImage: cgImage) + return image + } catch { + AttachmentViewModel.logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): thumbnail generate fail: \(error.localizedDescription)") + return nil + } + } +} + +extension NSItemProvider { + func isImage() -> Bool { + return hasRepresentationConforming( + toTypeIdentifier: UTType.image.identifier, + fileOptions: [] + ) + } + + func isMovie() -> Bool { + return hasRepresentationConforming( + toTypeIdentifier: UTType.movie.identifier, + fileOptions: [] + ) + } +} diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Upload.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Upload.swift index 0a4aadec3..e26e97d35 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Upload.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel+Upload.swift @@ -52,153 +52,65 @@ extension Data { } } -// Twitter Only -//extension AttachmentViewModel { -// class SliceResult { -// -// let fileURL: URL -// let chunks: Chunked -// let chunkCount: Int -// let type: UTType -// let sizeInBytes: UInt64 -// -// public init?( -// url: URL, -// type: UTType -// ) { -// guard let chunks = try? FileHandle(forReadingFrom: url).bytes.chunked else { return nil } -// let _sizeInBytes: UInt64? = { -// let attribute = try? FileManager.default.attributesOfItem(atPath: url.path) -// return attribute?[.size] as? UInt64 -// }() -// guard let sizeInBytes = _sizeInBytes else { return nil } -// -// self.fileURL = url -// self.chunks = chunks -// self.chunkCount = SliceResult.chunkCount(chunkSize: UInt64(chunks.chunkSize), sizeInBytes: sizeInBytes) -// self.type = type -// self.sizeInBytes = sizeInBytes -// } -// -// public init?( -// imageData: Data, -// type: UTType -// ) { -// let _fileURL = try? FileManager.default.createTemporaryFileURL( -// filename: UUID().uuidString, -// pathExtension: imageData.kf.imageFormat == .PNG ? "png" : "jpeg" -// ) -// guard let fileURL = _fileURL else { return nil } -// -// do { -// try imageData.write(to: fileURL) -// } catch { -// return nil -// } -// -// guard let chunks = try? FileHandle(forReadingFrom: fileURL).bytes.chunked else { -// return nil -// } -// let sizeInBytes = UInt64(imageData.count) -// -// self.fileURL = fileURL -// self.chunks = chunks -// self.chunkCount = SliceResult.chunkCount(chunkSize: UInt64(chunks.chunkSize), sizeInBytes: sizeInBytes) -// self.type = type -// self.sizeInBytes = sizeInBytes -// } -// -// static func chunkCount(chunkSize: UInt64, sizeInBytes: UInt64) -> Int { -// guard sizeInBytes > 0 else { return 0 } -// let count = sizeInBytes / chunkSize -// let remains = sizeInBytes % chunkSize -// let result = remains > 0 ? count + 1 : count -// return Int(result) -// } -// -// } -// -// static func slice(output: Output, sizeLimit: SizeLimit) -> SliceResult? { -// // needs execute in background -// assert(!Thread.isMainThread) -// -// // try png then use JPEG compress with Q=0.8 -// // then slice into 1MiB chunks -// switch output { -// case .image(let data, _): -// let maxPayloadSizeInBytes = sizeLimit.image -// -// // use processed imageData to remove EXIF -// guard let image = UIImage(data: data), -// var imageData = image.pngData() -// else { return nil } -// -// var didRemoveEXIF = false -// repeat { -// guard let image = KFCrossPlatformImage(data: imageData) else { return nil } -// if imageData.kf.imageFormat == .PNG { -// // A. png image -// guard let pngData = image.pngData() else { return nil } -// didRemoveEXIF = true -// if pngData.count > maxPayloadSizeInBytes { -// guard let compressedJpegData = image.jpegData(compressionQuality: 0.8) else { return nil } -// os_log("%{public}s[%{public}ld], %{public}s: compress png %.2fMiB -> jpeg %.2fMiB", ((#file as NSString).lastPathComponent), #line, #function, Double(imageData.count) / 1024 / 1024, Double(compressedJpegData.count) / 1024 / 1024) -// imageData = compressedJpegData -// } else { -// os_log("%{public}s[%{public}ld], %{public}s: png %.2fMiB", ((#file as NSString).lastPathComponent), #line, #function, Double(pngData.count) / 1024 / 1024) -// imageData = pngData -// } -// } else { -// // B. other image -// if !didRemoveEXIF { -// guard let jpegData = image.jpegData(compressionQuality: 0.8) else { return nil } -// os_log("%{public}s[%{public}ld], %{public}s: compress jpeg %.2fMiB -> jpeg %.2fMiB", ((#file as NSString).lastPathComponent), #line, #function, Double(imageData.count) / 1024 / 1024, Double(jpegData.count) / 1024 / 1024) -// imageData = jpegData -// didRemoveEXIF = true -// } else { -// let targetSize = CGSize(width: image.size.width * 0.8, height: image.size.height * 0.8) -// let scaledImage = image.af.imageScaled(to: targetSize) -// guard let compressedJpegData = scaledImage.jpegData(compressionQuality: 0.8) else { return nil } -// os_log("%{public}s[%{public}ld], %{public}s: compress jpeg %.2fMiB -> jpeg %.2fMiB", ((#file as NSString).lastPathComponent), #line, #function, Double(imageData.count) / 1024 / 1024, Double(compressedJpegData.count) / 1024 / 1024) -// imageData = compressedJpegData -// } -// } -// } while (imageData.count > maxPayloadSizeInBytes) -// -// return SliceResult( -// imageData: imageData, -// type: imageData.kf.imageFormat == .PNG ? UTType.png : UTType.jpeg -// ) -// -//// case .gif(let url): -//// fatalError() -// case .video(let url, _): -// return SliceResult( -// url: url, -// type: .movie -// ) -// } -// } -//} - extension AttachmentViewModel { + public enum UploadState { + case none + case compressing + case ready + case uploading + case fail + case finish + } + struct UploadContext { let apiService: APIService let authContext: AuthContext } - enum UploadResult { - case mastodon(Mastodon.Response.Content) - } + public typealias UploadResult = Mastodon.Entity.Attachment } extension AttachmentViewModel { - func upload(context: UploadContext) async throws -> UploadResult { - return try await uploadMastodonMedia( - context: context - ) + @MainActor + func upload(isRetry: Bool = false) async throws { + do { + let result = try await upload( + context: .init( + apiService: self.api, + authContext: self.authContext + ), + isRetry: isRetry + ) + update(uploadResult: result) + } catch { + self.error = error + } } + @MainActor + private func upload(context: UploadContext, isRetry: Bool) async throws -> UploadResult { + if isRetry { + guard uploadState == .fail else { throw AppError.badRequest } + self.error = nil + self.fractionCompleted = 0 + } else { + guard uploadState == .ready else { throw AppError.badRequest } + } + do { + update(uploadState: .uploading) + let result = try await uploadMastodonMedia( + context: context + ) + update(uploadState: .finish) + return result + } catch { + update(uploadState: .fail) + throw error + } + } + + // MainActor is required here to trigger stream upload task + @MainActor private func uploadMastodonMedia( context: UploadContext ) async throws -> UploadResult { @@ -260,7 +172,7 @@ extension AttachmentViewModel { if attachmentUploadResponse.statusCode == 202 { // note: // the Mastodon server append the attachments in order by upload time - // can not upload concurrency + // can not upload parallels let waitProcessRetryLimit = checkUploadTaskRetryLimit var waitProcessRetryCount: Int64 = 0 @@ -283,7 +195,7 @@ extension AttachmentViewModel { // escape here progress.completedUnitCount = progress.totalUnitCount - return .mastodon(attachmentStatusResponse) + return attachmentStatusResponse.value } else { AttachmentViewModel.logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): attachment processing. Retry \(waitProcessRetryCount)/\(waitProcessRetryLimit)") @@ -296,7 +208,7 @@ extension AttachmentViewModel { } else { AttachmentViewModel.logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): upload attachment success: \(attachmentUploadResponse.value.url ?? "")") - return .mastodon(attachmentUploadResponse) + return attachmentUploadResponse.value } } } diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel.swift index 7d0e8c859..9a0f58f47 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Attachment/AttachmentViewModel.swift @@ -11,36 +11,112 @@ import Combine import PhotosUI import Kingfisher import MastodonCore +import func QuartzCore.CACurrentMediaTime + +public protocol AttachmentViewModelDelegate: AnyObject { + func attachmentViewModel(_ viewModel: AttachmentViewModel, uploadStateValueDidChange state: AttachmentViewModel.UploadState) + func attachmentViewModel(_ viewModel: AttachmentViewModel, actionButtonDidPressed action: AttachmentViewModel.Action) +} final public class AttachmentViewModel: NSObject, ObservableObject, Identifiable { static let logger = Logger(subsystem: "AttachmentViewModel", category: "ViewModel") + let logger = Logger(subsystem: "AttachmentViewModel", category: "ViewModel") public let id = UUID() var disposeBag = Set() var observations = Set() + + weak var delegate: AttachmentViewModelDelegate? + + let byteCountFormatter: ByteCountFormatter = { + let formatter = ByteCountFormatter() + formatter.allowsNonnumericFormatting = true + formatter.countStyle = .memory + return formatter + }() + + let percentageFormatter: NumberFormatter = { + let formatter = NumberFormatter() + formatter.numberStyle = .percent + return formatter + }() // input + public let api: APIService + public let authContext: AuthContext public let input: Input @Published var caption = "" @Published var sizeLimit = SizeLimit() - @Published public var isPreviewPresented = false + + // var compressVideoTask: Task? // output @Published public private(set) var output: Output? @Published public private(set) var thumbnail: UIImage? // original size image thumbnail - @Published var error: Error? - let progress = Progress() // upload progress + @Published public private(set) var outputSizeInByte: Int64 = 0 - public init(input: Input) { + @Published public private(set) var uploadState: UploadState = .none + @Published public private(set) var uploadResult: UploadResult? + @Published var error: Error? + + var uploadTask: Task<(), Never>? + + @Published var videoCompressProgress: Double = 0 + + let progress = Progress() // upload progress + @Published var fractionCompleted: Double = 0 + + private var lastTimestamp: TimeInterval? + private var lastUploadSizeInByte: Int64 = 0 + private var averageUploadSpeedInByte: Int64 = 0 + private var remainTimeInterval: Double? + @Published var remainTimeLocalizedString: String? + + public init( + api: APIService, + authContext: AuthContext, + input: Input, + delegate: AttachmentViewModelDelegate + ) { + self.api = api + self.authContext = authContext self.input = input + self.delegate = delegate super.init() // end init - defer { - load(input: input) - } + Timer.publish(every: 1.0 / 60.0, on: .main, in: .common) // 60 FPS + .autoconnect() + .share() + .receive(on: DispatchQueue.main) + .sink { [weak self] _ in + guard let self = self else { return } + self.step() + } + .store(in: &disposeBag) + + progress + .observe(\.fractionCompleted, options: [.initial, .new]) { [weak self] progress, _ in + guard let self = self else { return } + self.logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): publish progress \(progress.fractionCompleted)") + DispatchQueue.main.async { + self.fractionCompleted = progress.fractionCompleted + } + } + .store(in: &observations) + + // Note: this observation is redundant if .fractionCompleted listener always emit event when reach 1.0 progress + // progress + // .observe(\.isFinished, options: [.initial, .new]) { [weak self] progress, _ in + // guard let self = self else { return } + // self.logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): publish progress \(progress.fractionCompleted)") + // DispatchQueue.main.async { + // self.objectWillChange.send() + // } + // } + // .store(in: &observations) $output .map { output -> UIImage? in @@ -53,22 +129,121 @@ final public class AttachmentViewModel: NSObject, ObservableObject, Identifiable return nil } } + .receive(on: DispatchQueue.main) .assign(to: &$thumbnail) + + defer { + let uploadTask = Task { @MainActor in + do { + var output = try await load(input: input) + + switch output { + case .video(let fileURL, let mimeType): + self.output = output + self.update(uploadState: .compressing) + let compressedFileURL = try await comporessVideo(url: fileURL) + output = .video(compressedFileURL, mimeType: mimeType) + try? FileManager.default.removeItem(at: fileURL) // remove old file + default: + break + } + + self.outputSizeInByte = output.asAttachment.sizeInByte.flatMap { Int64($0) } ?? 0 + self.output = output + + self.update(uploadState: .ready) + self.delegate?.attachmentViewModel(self, uploadStateValueDidChange: self.uploadState) + } catch { + self.error = error + } + } // end Task + self.uploadTask = uploadTask + Task { + await uploadTask.value + } + } } deinit { + os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) + + uploadTask?.cancel() + switch output { case .image: // FIXME: break case .video(let url, _): try? FileManager.default.removeItem(at: url) - case nil : + case nil: break } } } +// calculate the upload speed +// ref: https://stackoverflow.com/a/3841706/3797903 +extension AttachmentViewModel { + + static var SpeedSmoothingFactor = 0.4 + static let remainsTimeFormatter: RelativeDateTimeFormatter = { + let formatter = RelativeDateTimeFormatter() + formatter.unitsStyle = .full + return formatter + }() + + @objc private func step() { + + let uploadProgress = min(progress.fractionCompleted + 0.1, 1) // the progress split into 9:1 blocks (download : waiting) + + guard let lastTimestamp = self.lastTimestamp else { + self.lastTimestamp = CACurrentMediaTime() + self.lastUploadSizeInByte = Int64(Double(outputSizeInByte) * uploadProgress) + return + } + + let duration = CACurrentMediaTime() - lastTimestamp + guard duration >= 1.0 else { return } // update every 1 sec + + let old = self.lastUploadSizeInByte + self.lastUploadSizeInByte = Int64(Double(outputSizeInByte) * uploadProgress) + + let newSpeed = self.lastUploadSizeInByte - old + let lastAverageSpeed = self.averageUploadSpeedInByte + let newAverageSpeed = Int64(AttachmentViewModel.SpeedSmoothingFactor * Double(newSpeed) + (1 - AttachmentViewModel.SpeedSmoothingFactor) * Double(lastAverageSpeed)) + + let remainSizeInByte = Double(outputSizeInByte) * (1 - uploadProgress) + + let speed = Double(newAverageSpeed) + if speed != .zero { + // estimate by speed + let uploadRemainTimeInSecond = remainSizeInByte / speed + // estimate by progress 1s for 10% + let remainPercentage = 1 - uploadProgress + let estimateRemainTimeByProgress = remainPercentage / 0.1 + // max estimate + var remainTimeInSecond = max(estimateRemainTimeByProgress, uploadRemainTimeInSecond) + + // do not increate timer when < 5 sec + if let remainTimeInterval = self.remainTimeInterval, remainTimeInSecond < 5 { + remainTimeInSecond = min(remainTimeInterval, remainTimeInSecond) + self.remainTimeInterval = remainTimeInSecond + } else { + self.remainTimeInterval = remainTimeInSecond + } + + let string = AttachmentViewModel.remainsTimeFormatter.localizedString(fromTimeInterval: remainTimeInSecond) + remainTimeLocalizedString = string + // print("remains: \(remainSizeInByte), speed: \(newAverageSpeed), \(string)") + } else { + remainTimeLocalizedString = nil + } + + self.lastTimestamp = CACurrentMediaTime() + self.averageUploadSpeedInByte = newAverageSpeed + } +} + extension AttachmentViewModel { public enum Input: Hashable { case image(UIImage) @@ -86,13 +261,6 @@ extension AttachmentViewModel { case png case jpg } - - public var twitterMediaCategory: TwitterMediaCategory { - switch self { - case .image: return .image - case .video: return .amplifyVideo - } - } } public struct SizeLimit { @@ -111,291 +279,38 @@ extension AttachmentViewModel { } } - public enum AttachmentError: Error { + public enum AttachmentError: Error, LocalizedError { case invalidAttachmentType case attachmentTooLarge - } - - public enum TwitterMediaCategory: String { - case image = "TWEET_IMAGE" - case GIF = "TWEET_GIF" - case video = "TWEET_VIDEO" - case amplifyVideo = "AMPLIFY_VIDEO" - } -} - -extension AttachmentViewModel { - - private func load(input: Input) { - switch input { - case .image(let image): - guard let data = image.pngData() else { - error = AttachmentError.invalidAttachmentType - return - } - output = .image(data, imageKind: .png) - case .url(let url): - Task { @MainActor in - do { - let output = try await AttachmentViewModel.load(url: url) - self.output = output - } catch { - self.error = error - } - } // end Task - case .pickerResult(let pickerResult): - Task { @MainActor in - do { - let output = try await AttachmentViewModel.load(itemProvider: pickerResult.itemProvider) - self.output = output - } catch { - self.error = error - } - } // end Task - case .itemProvider(let itemProvider): - Task { @MainActor in - do { - let output = try await AttachmentViewModel.load(itemProvider: itemProvider) - self.output = output - } catch { - self.error = error - } - } // end Task - } - } - - private static func load(url: URL) async throws -> Output { - guard let uti = UTType(filenameExtension: url.pathExtension) else { - throw AttachmentError.invalidAttachmentType - } - if uti.conforms(to: .image) { - guard url.startAccessingSecurityScopedResource() else { - throw AttachmentError.invalidAttachmentType + public var errorDescription: String? { + switch self { + case .invalidAttachmentType: + return "Can not regonize this media attachment" // TODO: i18n + case .attachmentTooLarge: + return "Attachment too large" } - defer { url.stopAccessingSecurityScopedResource() } - let imageData = try Data(contentsOf: url) - return .image(imageData, imageKind: imageData.kf.imageFormat == .PNG ? .png : .jpg) - } else if uti.conforms(to: .movie) { - guard url.startAccessingSecurityScopedResource() else { - throw AttachmentError.invalidAttachmentType - } - defer { url.stopAccessingSecurityScopedResource() } - - let fileName = UUID().uuidString - let tempDirectoryURL = FileManager.default.temporaryDirectory - let fileURL = tempDirectoryURL.appendingPathComponent(fileName).appendingPathExtension(url.pathExtension) - try FileManager.default.createDirectory(at: tempDirectoryURL, withIntermediateDirectories: true, attributes: nil) - try FileManager.default.copyItem(at: url, to: fileURL) - return .video(fileURL, mimeType: UTType.movie.preferredMIMEType ?? "video/mp4") - } else { - throw AttachmentError.invalidAttachmentType - } - } - - private static func load(itemProvider: NSItemProvider) async throws -> Output { - if itemProvider.isImage() { - guard let result = try await itemProvider.loadImageData() else { - throw AttachmentError.invalidAttachmentType - } - let imageKind: Output.ImageKind = { - if let type = result.type { - if type == UTType.png { - return .png - } - if type == UTType.jpeg { - return .jpg - } - } - - let imageData = result.data - - if imageData.kf.imageFormat == .PNG { - return .png - } - if imageData.kf.imageFormat == .JPEG { - return .jpg - } - - assertionFailure("unknown image kind") - return .jpg - }() - return .image(result.data, imageKind: imageKind) - } else if itemProvider.isMovie() { - guard let result = try await itemProvider.loadVideoData() else { - throw AttachmentError.invalidAttachmentType - } - return .video(result.url, mimeType: "video/mp4") - } else { - assertionFailure() - throw AttachmentError.invalidAttachmentType } } } extension AttachmentViewModel { - static func createThumbnailForVideo(url: URL) -> UIImage? { - guard FileManager.default.fileExists(atPath: url.path) else { return nil } - let asset = AVURLAsset(url: url) - let assetImageGenerator = AVAssetImageGenerator(asset: asset) - assetImageGenerator.appliesPreferredTrackTransform = true // fix orientation - do { - let cgImage = try assetImageGenerator.copyCGImage(at: CMTimeMake(value: 0, timescale: 1), actualTime: nil) - let image = UIImage(cgImage: cgImage) - return image - } catch { - AttachmentViewModel.logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): thumbnail generate fail: \(error.localizedDescription)") - return nil - } + public enum Action: Hashable { + case remove + case retry } } -// MARK: - TypeIdentifiedItemProvider -extension AttachmentViewModel: TypeIdentifiedItemProvider { - public static var typeIdentifier: String { - // must in UTI format - // https://developer.apple.com/library/archive/qa/qa1796/_index.html - return "com.twidere.AttachmentViewModel" - } -} - -// MARK: - NSItemProviderWriting -extension AttachmentViewModel: NSItemProviderWriting { - - - /// Attachment uniform type idendifiers - /// - /// The latest one for in-app drag and drop. - /// And use generic `image` and `movie` type to - /// allows transformable media in different formats - public static var writableTypeIdentifiersForItemProvider: [String] { - return [ - UTType.image.identifier, - UTType.movie.identifier, - AttachmentViewModel.typeIdentifier, - ] - } - - public var writableTypeIdentifiersForItemProvider: [String] { - // should append elements in priority order from high to low - var typeIdentifiers: [String] = [] - - // FIXME: check jpg or png - switch input { - case .image: - typeIdentifiers.append(UTType.png.identifier) - case .url(let url): - let _uti = UTType(filenameExtension: url.pathExtension) - if let uti = _uti { - if uti.conforms(to: .image) { - typeIdentifiers.append(UTType.png.identifier) - } else if uti.conforms(to: .movie) { - typeIdentifiers.append(UTType.mpeg4Movie.identifier) - } - } - case .pickerResult(let item): - if item.itemProvider.isImage() { - typeIdentifiers.append(UTType.png.identifier) - } else if item.itemProvider.isMovie() { - typeIdentifiers.append(UTType.mpeg4Movie.identifier) - } - case .itemProvider(let itemProvider): - if itemProvider.isImage() { - typeIdentifiers.append(UTType.png.identifier) - } else if itemProvider.isMovie() { - typeIdentifiers.append(UTType.mpeg4Movie.identifier) - } - } - - typeIdentifiers.append(AttachmentViewModel.typeIdentifier) - - return typeIdentifiers - } - - public func loadData( - withTypeIdentifier typeIdentifier: String, - forItemProviderCompletionHandler completionHandler: @escaping (Data?, Error?) -> Void - ) -> Progress? { - switch typeIdentifier { - case AttachmentViewModel.typeIdentifier: - do { - let archiver = NSKeyedArchiver(requiringSecureCoding: false) - try archiver.encodeEncodable(id, forKey: NSKeyedArchiveRootObjectKey) - archiver.finishEncoding() - let data = archiver.encodedData - completionHandler(data, nil) - } catch { - assertionFailure() - completionHandler(nil, nil) - } - default: - break - } - - let loadingProgress = Progress(totalUnitCount: 100) - - Publishers.CombineLatest( - $output, - $error - ) - .sink { [weak self] output, error in - guard let self = self else { return } - - // continue when load completed - guard output != nil || error != nil else { return } - - switch output { - case .image(let data, _): - switch typeIdentifier { - case UTType.png.identifier: - loadingProgress.completedUnitCount = 100 - completionHandler(data, nil) - default: - completionHandler(nil, nil) - } - case .video(let url, _): - switch typeIdentifier { - case UTType.png.identifier: - let _image = AttachmentViewModel.createThumbnailForVideo(url: url) - let _data = _image?.pngData() - loadingProgress.completedUnitCount = 100 - completionHandler(_data, nil) - case UTType.mpeg4Movie.identifier: - let task = URLSession.shared.dataTask(with: url) { data, response, error in - completionHandler(data, error) - } - task.progress.observe(\.fractionCompleted) { progress, change in - loadingProgress.completedUnitCount = Int64(100 * progress.fractionCompleted) - } - .store(in: &self.observations) - task.resume() - default: - completionHandler(nil, nil) - } - case nil: - completionHandler(nil, error) - } - } - .store(in: &disposeBag) - - return loadingProgress - } - -} - -extension NSItemProvider { - fileprivate func isImage() -> Bool { - return hasRepresentationConforming( - toTypeIdentifier: UTType.image.identifier, - fileOptions: [] - ) - } - - fileprivate func isMovie() -> Bool { - return hasRepresentationConforming( - toTypeIdentifier: UTType.movie.identifier, - fileOptions: [] - ) +extension AttachmentViewModel { + @MainActor + func update(uploadState: UploadState) { + self.uploadState = uploadState + self.delegate?.attachmentViewModel(self, uploadStateValueDidChange: self.uploadState) + } + + @MainActor + func update(uploadResult: UploadResult) { + self.uploadResult = uploadResult } } diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewController.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewController.swift index aa21057d1..9af1ce9bf 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewController.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewController.swift @@ -88,7 +88,7 @@ extension AutoCompleteViewController { ]) tableView.delegate = self -// viewModel.setupDiffableDataSource(tableView: tableView) + viewModel.setupDiffableDataSource(tableView: tableView) // bind to layout chevron viewModel.symbolBoundingRect diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewModel+Diffable.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewModel+Diffable.swift index adbf6ac09..2dd815d0a 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewModel+Diffable.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewModel+Diffable.swift @@ -6,17 +6,18 @@ // import UIKit +import MastodonCore extension AutoCompleteViewModel { -// func setupDiffableDataSource( -// tableView: UITableView -// ) { -// diffableDataSource = AutoCompleteSection.tableViewDiffableDataSource(for: tableView) -// -// var snapshot = NSDiffableDataSourceSnapshot() -// snapshot.appendSections([.main]) -// diffableDataSource?.apply(snapshot) -// } + func setupDiffableDataSource( + tableView: UITableView + ) { + diffableDataSource = AutoCompleteSection.tableViewDiffableDataSource(tableView: tableView) + + var snapshot = NSDiffableDataSourceSnapshot() + snapshot.appendSections([.main]) + diffableDataSource?.apply(snapshot) + } } diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewModel+State.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewModel+State.swift index b1f5f3187..7f93c4ba7 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewModel+State.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewModel+State.swift @@ -102,7 +102,7 @@ extension AutoCompleteViewModel.State { return } - guard let customEmojiViewModel = viewModel.customEmojiViewModel.value else { + guard let customEmojiViewModel = viewModel.customEmojiViewModel else { await enter(state: Fail.self) return } diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewModel.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewModel.swift index 61715cd63..7459f68d1 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewModel.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/AutoCompleteViewModel.swift @@ -20,7 +20,7 @@ final class AutoCompleteViewModel { let authContext: AuthContext public let inputText = CurrentValueSubject("") // contains "@" or "#" prefix public let symbolBoundingRect = CurrentValueSubject(.zero) - public let customEmojiViewModel = CurrentValueSubject(nil) + public let customEmojiViewModel: EmojiService.CustomEmojiViewModel? // output public var autoCompleteItems = CurrentValueSubject<[AutoCompleteItem], Never>([]) @@ -40,6 +40,8 @@ final class AutoCompleteViewModel { init(context: AppContext, authContext: AuthContext) { self.context = context self.authContext = authContext + self.customEmojiViewModel = context.emojiService.dequeueCustomEmojiViewModel(for: authContext.mastodonAuthenticationBox.domain) + // end init autoCompleteItems .receive(on: DispatchQueue.main) diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/View/AutoCompleteTopChevronView.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/View/AutoCompleteTopChevronView.swift index ccc36b1df..6b842c9f1 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/View/AutoCompleteTopChevronView.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/AutoComplete/View/AutoCompleteTopChevronView.swift @@ -8,7 +8,6 @@ import UIKit import Combine import MastodonCore -import MastodonUI final class AutoCompleteTopChevronView: UIView { diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewController.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewController.swift index 3417ed935..ea6a0136a 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewController.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewController.swift @@ -14,12 +14,15 @@ import MastodonCore public final class ComposeContentViewController: UIViewController { + static let minAutoCompleteVisibleHeight: CGFloat = 100 + let logger = Logger(subsystem: "ComposeContentViewController", category: "ViewController") var disposeBag = Set() public var viewModel: ComposeContentViewModel! private(set) lazy var composeContentToolbarViewModel = ComposeContentToolbarView.ViewModel(delegate: self) + // tableView container let tableView: ComposeTableView = { let tableView = ComposeTableView() tableView.estimatedRowHeight = UITableView.automaticDimension @@ -29,6 +32,16 @@ public final class ComposeContentViewController: UIViewController { return tableView }() + // auto complete + private(set) lazy var autoCompleteViewController: AutoCompleteViewController = { + let viewController = AutoCompleteViewController() + viewController.viewModel = AutoCompleteViewModel(context: viewModel.context, authContext: viewModel.authContext) + viewController.delegate = self + // viewController.viewModel.customEmojiViewModel.value = viewModel.customEmojiViewModel + return viewController + }() + + // toolbar lazy var composeContentToolbarView = ComposeContentToolbarView(viewModel: composeContentToolbarViewModel) var composeContentToolbarViewBottomLayoutConstraint: NSLayoutConstraint! let composeContentToolbarBackgroundView = UIView() @@ -60,6 +73,15 @@ public final class ComposeContentViewController: UIViewController { documentPickerController.delegate = self return documentPickerController }() + + // emoji picker inputView + let customEmojiPickerInputView: CustomEmojiPickerInputView = { + let view = CustomEmojiPickerInputView( + frame: CGRect(x: 0, y: 0, width: 0, height: 300), + inputViewStyle: .keyboard + ) + return view + }() deinit { os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) @@ -71,6 +93,8 @@ extension ComposeContentViewController { public override func viewDidLoad() { super.viewDidLoad() + viewModel.delegate = self + // setup view self.setupBackgroundColor(theme: ThemeService.shared.currentTheme.value) ThemeService.shared.currentTheme @@ -94,6 +118,12 @@ extension ComposeContentViewController { tableView.delegate = self viewModel.setupDataSource(tableView: tableView) + // setup emoji picker + customEmojiPickerInputView.collectionView.delegate = self + viewModel.customEmojiPickerInputViewModel.customEmojiPickerInputView = customEmojiPickerInputView + viewModel.setupCustomEmojiPickerDiffableDataSource(collectionView: customEmojiPickerInputView.collectionView) + + // setup toolbar let toolbarHostingView = UIHostingController(rootView: composeContentToolbarView) toolbarHostingView.view.translatesAutoresizingMaskIntoConstraints = false view.addSubview(toolbarHostingView.view) @@ -116,49 +146,43 @@ extension ComposeContentViewController { view.bottomAnchor.constraint(equalTo: composeContentToolbarBackgroundView.bottomAnchor), ]) - let keyboardHasShortcutBar = CurrentValueSubject(traitCollection.userInterfaceIdiom == .pad) // update default value later + // bind keyboard let keyboardEventPublishers = Publishers.CombineLatest3( KeyboardResponderService.shared.isShow, KeyboardResponderService.shared.state, KeyboardResponderService.shared.endFrame ) -// Publishers.CombineLatest3( -// viewModel.$isCustomEmojiComposing, -// ) - keyboardEventPublishers - .sink(receiveValue: { [weak self] keyboardEvents in + Publishers.CombineLatest3( + keyboardEventPublishers, + viewModel.$isEmojiActive, + viewModel.$autoCompleteInfo + ) + .sink(receiveValue: { [weak self] keyboardEvents, isEmojiActive, autoCompleteInfo in guard let self = self else { return } let (isShow, state, endFrame) = keyboardEvents - -// switch self.traitCollection.userInterfaceIdiom { -// case .pad: -// keyboardHasShortcutBar.value = state != .floating -// default: -// keyboardHasShortcutBar.value = false -// } -// + let extraMargin: CGFloat = { var margin = ComposeContentToolbarView.toolbarHeight -// if autoCompleteInfo != nil { -//// margin += ComposeViewController.minAutoCompleteVisibleHeight -// } + if autoCompleteInfo != nil { + margin += ComposeContentViewController.minAutoCompleteVisibleHeight + } return margin }() -// + guard isShow, state == .dock else { self.tableView.contentInset.bottom = extraMargin self.tableView.verticalScrollIndicatorInsets.bottom = extraMargin -// if let superView = self.autoCompleteViewController.tableView.superview { -// let autoCompleteTableViewBottomInset: CGFloat = { -// let tableViewFrameInWindow = superView.convert(self.autoCompleteViewController.tableView.frame, to: nil) -// let padding = tableViewFrameInWindow.maxY + self.composeToolbarView.frame.height + AutoCompleteViewController.chevronViewHeight - self.view.frame.maxY -// return max(0, padding) -// }() -// self.autoCompleteViewController.tableView.contentInset.bottom = autoCompleteTableViewBottomInset -// self.autoCompleteViewController.tableView.verticalScrollIndicatorInsets.bottom = autoCompleteTableViewBottomInset -// } + if let superView = self.autoCompleteViewController.tableView.superview { + let autoCompleteTableViewBottomInset: CGFloat = { + let tableViewFrameInWindow = superView.convert(self.autoCompleteViewController.tableView.frame, to: nil) + let padding = tableViewFrameInWindow.maxY + ComposeContentToolbarView.toolbarHeight + AutoCompleteViewController.chevronViewHeight - self.view.frame.maxY + return max(0, padding) + }() + self.autoCompleteViewController.tableView.contentInset.bottom = autoCompleteTableViewBottomInset + self.autoCompleteViewController.tableView.verticalScrollIndicatorInsets.bottom = autoCompleteTableViewBottomInset + } UIView.animate(withDuration: 0.3) { self.composeContentToolbarViewBottomLayoutConstraint.constant = self.view.safeAreaInsets.bottom @@ -169,17 +193,16 @@ extension ComposeContentViewController { return } // isShow AND dock state -// self.systemKeyboardHeight = endFrame.height // adjust inset for auto-complete -// let autoCompleteTableViewBottomInset: CGFloat = { -// guard let superview = self.autoCompleteViewController.tableView.superview else { return .zero } -// let tableViewFrameInWindow = superview.convert(self.autoCompleteViewController.tableView.frame, to: nil) -// let padding = tableViewFrameInWindow.maxY + self.composeToolbarView.frame.height + AutoCompleteViewController.chevronViewHeight - endFrame.minY -// return max(0, padding) -// }() -// self.autoCompleteViewController.tableView.contentInset.bottom = autoCompleteTableViewBottomInset -// self.autoCompleteViewController.tableView.verticalScrollIndicatorInsets.bottom = autoCompleteTableViewBottomInset + let autoCompleteTableViewBottomInset: CGFloat = { + guard let superview = self.autoCompleteViewController.tableView.superview else { return .zero } + let tableViewFrameInWindow = superview.convert(self.autoCompleteViewController.tableView.frame, to: nil) + let padding = tableViewFrameInWindow.maxY + ComposeContentToolbarView.toolbarHeight + AutoCompleteViewController.chevronViewHeight - endFrame.minY + return max(0, padding) + }() + self.autoCompleteViewController.tableView.contentInset.bottom = autoCompleteTableViewBottomInset + self.autoCompleteViewController.tableView.verticalScrollIndicatorInsets.bottom = autoCompleteTableViewBottomInset // adjust inset for tableView let contentFrame = self.view.convert(self.tableView.frame, to: nil) @@ -218,14 +241,63 @@ extension ComposeContentViewController { } .store(in: &disposeBag) + // bind auto-complete + viewModel.$autoCompleteInfo + .receive(on: DispatchQueue.main) + .sink { [weak self] info in + guard let self = self else { return } + guard let textView = self.viewModel.contentMetaText?.textView else { return } + if self.autoCompleteViewController.view.superview == nil { + self.autoCompleteViewController.view.frame = self.view.bounds + // add to container view. seealso: `viewDidLayoutSubviews()` + self.viewModel.composeContentTableViewCell.contentView.addSubview(self.autoCompleteViewController.view) + self.addChild(self.autoCompleteViewController) + self.autoCompleteViewController.didMove(toParent: self) + self.autoCompleteViewController.view.isHidden = true + self.tableView.autoCompleteViewController = self.autoCompleteViewController + } + self.updateAutoCompleteViewControllerLayout() + self.autoCompleteViewController.view.isHidden = info == nil + guard let info = info else { return } + let symbolBoundingRectInContainer = textView.convert(info.symbolBoundingRect, to: self.autoCompleteViewController.chevronView) + print(info.symbolBoundingRect) + self.autoCompleteViewController.view.frame.origin.y = info.textBoundingRect.maxY + self.viewModel.contentTextViewFrame.minY + self.autoCompleteViewController.viewModel.symbolBoundingRect.value = symbolBoundingRectInContainer + self.autoCompleteViewController.viewModel.inputText.value = String(info.inputText) + } + .store(in: &disposeBag) + + // bind emoji picker + viewModel.customEmojiViewModel?.emojis + .receive(on: DispatchQueue.main) + .sink(receiveValue: { [weak self] emojis in + guard let self = self else { return } + if emojis.isEmpty { + self.customEmojiPickerInputView.activityIndicatorView.startAnimating() + } else { + self.customEmojiPickerInputView.activityIndicatorView.stopAnimating() + } + }) + .store(in: &disposeBag) + // bind toolbar bindToolbarViewModel() + + // bind attachment picker + viewModel.$attachmentViewModels + .receive(on: DispatchQueue.main) + .sink { [weak self] _ in + guard let self = self else { return } + self.resetImagePicker() + } + .store(in: &disposeBag) } public override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() viewModel.viewLayoutFrame.update(view: view) + updateAutoCompleteViewControllerLayout() } public override func viewSafeAreaInsetsDidChange() { @@ -257,6 +329,8 @@ extension ComposeContentViewController { } private func bindToolbarViewModel() { + viewModel.$isAttachmentButtonEnabled.assign(to: &composeContentToolbarViewModel.$isAttachmentButtonEnabled) + viewModel.$isPollButtonEnabled.assign(to: &composeContentToolbarViewModel.$isPollButtonEnabled) viewModel.$isPollActive.assign(to: &composeContentToolbarViewModel.$isPollActive) viewModel.$isEmojiActive.assign(to: &composeContentToolbarViewModel.$isEmojiActive) viewModel.$isContentWarningActive.assign(to: &composeContentToolbarViewModel.$isContentWarningActive) @@ -264,6 +338,29 @@ extension ComposeContentViewController { viewModel.$contentWeightedLength.assign(to: &composeContentToolbarViewModel.$contentWeightedLength) viewModel.$contentWarningWeightedLength.assign(to: &composeContentToolbarViewModel.$contentWarningWeightedLength) } + + private func updateAutoCompleteViewControllerLayout() { + // pin autoCompleteViewController frame to current view + if let containerView = autoCompleteViewController.view.superview { + let viewFrameInWindow = containerView.convert(autoCompleteViewController.view.frame, to: view) + if viewFrameInWindow.origin.x != 0 { + autoCompleteViewController.view.frame.origin.x = -viewFrameInWindow.origin.x + } + autoCompleteViewController.view.frame.size.width = view.frame.width + } + } + + private func resetImagePicker() { + let selectionLimit = max(1, viewModel.maxMediaAttachmentLimit - viewModel.attachmentViewModels.count) + let configuration = ComposeContentViewController.createPhotoLibraryPickerConfiguration(selectionLimit: selectionLimit) + photoLibraryPicker = createImagePicker(configuration: configuration) + } + + private func createImagePicker(configuration: PHPickerConfiguration) -> PHPickerViewController { + let imagePicker = PHPickerViewController(configuration: configuration) + imagePicker.delegate = self + return imagePicker + } } // MARK: - UIScrollViewDelegate @@ -325,16 +422,15 @@ extension ComposeContentViewController: PHPickerViewControllerDelegate { public func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) { picker.dismiss(animated: true, completion: nil) - // TODO: -// let attachmentServices: [MastodonAttachmentService] = results.map { result in -// let service = MastodonAttachmentService( -// context: context, -// pickerResult: result, -// initialAuthenticationBox: viewModel.authenticationBox -// ) -// return service -// } -// viewModel.attachmentServices = viewModel.attachmentServices + attachmentServices + let attachmentViewModels: [AttachmentViewModel] = results.map { result in + AttachmentViewModel( + api: viewModel.context.apiService, + authContext: viewModel.authContext, + input: .pickerResult(result), + delegate: viewModel + ) + } + viewModel.attachmentViewModels += attachmentViewModels } } @@ -345,12 +441,13 @@ extension ComposeContentViewController: UIImagePickerControllerDelegate & UINavi guard let image = info[.originalImage] as? UIImage else { return } -// let attachmentService = MastodonAttachmentService( -// context: context, -// image: image, -// initialAuthenticationBox: viewModel.authenticationBox -// ) -// viewModel.attachmentServices = viewModel.attachmentServices + [attachmentService] + let attachmentViewModel = AttachmentViewModel( + api: viewModel.context.apiService, + authContext: viewModel.authContext, + input: .image(image), + delegate: viewModel + ) + viewModel.attachmentViewModels += [attachmentViewModel] } public func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { @@ -364,12 +461,13 @@ extension ComposeContentViewController: UIDocumentPickerDelegate { public func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) { guard let url = urls.first else { return } -// let attachmentService = MastodonAttachmentService( -// context: context, -// documentURL: url, -// initialAuthenticationBox: viewModel.authenticationBox -// ) -// viewModel.attachmentServices = viewModel.attachmentServices + [attachmentService] + let attachmentViewModel = AttachmentViewModel( + api: viewModel.context.apiService, + authContext: viewModel.authContext, + input: .url(url), + delegate: viewModel + ) + viewModel.attachmentViewModels += [attachmentViewModel] } } @@ -428,3 +526,123 @@ extension ComposeContentViewController: ComposeContentToolbarViewDelegate { } } } + +// MARK: - AutoCompleteViewControllerDelegate +extension ComposeContentViewController: AutoCompleteViewControllerDelegate { + func autoCompleteViewController( + _ viewController: AutoCompleteViewController, + didSelectItem item: AutoCompleteItem + ) { + logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): did select item: \(String(describing: item))") + + guard let info = viewModel.autoCompleteInfo else { return } + guard let metaText = viewModel.contentMetaText else { return } + + let _replacedText: String? = { + var text: String + switch item { + case .hashtag(let hashtag): + text = "#" + hashtag.name + case .hashtagV1(let hashtagName): + text = "#" + hashtagName + case .account(let account): + text = "@" + account.acct + case .emoji(let emoji): + text = ":" + emoji.shortcode + ":" + case .bottomLoader: + return nil + } + return text + }() + guard let replacedText = _replacedText else { return } + guard let text = metaText.textView.text else { return } + + let range = NSRange(info.toHighlightEndRange, in: text) + metaText.textStorage.replaceCharacters(in: range, with: replacedText) + viewModel.autoCompleteInfo = nil + + // set selected range + let newRange = NSRange(location: range.location + (replacedText as NSString).length, length: 0) + guard metaText.textStorage.length <= newRange.location else { return } + metaText.textView.selectedRange = newRange + + // append a space and trigger textView delegate update + DispatchQueue.main.async { + metaText.textView.insertText(" ") + } + } +} + +// MARK: - UICollectionViewDelegate +extension ComposeContentViewController: UICollectionViewDelegate { + + public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: select %s", ((#file as NSString).lastPathComponent), #line, #function, indexPath.debugDescription) + + switch collectionView { + case customEmojiPickerInputView.collectionView: + guard let diffableDataSource = viewModel.customEmojiPickerDiffableDataSource else { return } + let item = diffableDataSource.itemIdentifier(for: indexPath) + guard case let .emoji(attribute) = item else { return } + let emoji = attribute.emoji + + // make click sound + UIDevice.current.playInputClick() + + // retrieve active text input and insert emoji + // the trailing space is REQUIRED to make regex happy + _ = viewModel.customEmojiPickerInputViewModel.insertText(":\(emoji.shortcode): ") + default: + assertionFailure() + } + } // end func + +} + +// MARK: - ComposeContentViewModelDelegate +extension ComposeContentViewController: ComposeContentViewModelDelegate { + public func composeContentViewModel( + _ viewModel: ComposeContentViewModel, + handleAutoComplete info: ComposeContentViewModel.AutoCompleteInfo + ) -> Bool { + let snapshot = autoCompleteViewController.viewModel.diffableDataSource.snapshot() + guard let item = snapshot.itemIdentifiers.first else { return false } + + // FIXME: redundant code + guard let metaText = viewModel.contentMetaText else { return false } + guard let text = metaText.textView.text else { return false } + let _replacedText: String? = { + var text: String + switch item { + case .hashtag(let hashtag): + text = "#" + hashtag.name + case .hashtagV1(let hashtagName): + text = "#" + hashtagName + case .account(let account): + text = "@" + account.acct + case .emoji(let emoji): + text = ":" + emoji.shortcode + ":" + case .bottomLoader: + return nil + } + return text + }() + guard let replacedText = _replacedText else { return false } + + let range = NSRange(info.toHighlightEndRange, in: text) + metaText.textStorage.replaceCharacters(in: range, with: replacedText) + viewModel.autoCompleteInfo = nil + + // set selected range + let newRange = NSRange(location: range.location + (replacedText as NSString).length, length: 0) + guard metaText.textStorage.length <= newRange.location else { return true } + metaText.textView.selectedRange = newRange + + // append a space and trigger textView delegate update + DispatchQueue.main.async { + metaText.textView.insertText(" ") + } + + return true + } +} diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewModel+DataSource.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewModel+DataSource.swift index 3f6028b56..abbfe0e61 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewModel+DataSource.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewModel+DataSource.swift @@ -66,14 +66,15 @@ extension ComposeContentViewModel { guard let replyTo = status.object(in: context.managedObjectContext) else { return } cell.statusView.configure(status: replyTo) } - case .hashtag(let hashtag): + case .hashtag: break - case .mention(let user): + case .mention: break } } } +// MARK: - UITableViewDataSource extension ComposeContentViewModel: UITableViewDataSource { public func numberOfSections(in tableView: UITableView) -> Int { return Section.allCases.count @@ -99,3 +100,42 @@ extension ComposeContentViewModel: UITableViewDataSource { } } } + +extension ComposeContentViewModel { + + func setupCustomEmojiPickerDiffableDataSource( + collectionView: UICollectionView + ) { + let diffableDataSource = CustomEmojiPickerSection.collectionViewDiffableDataSource( + collectionView: collectionView, + context: context + ) + self.customEmojiPickerDiffableDataSource = diffableDataSource + + let domain = authContext.mastodonAuthenticationBox.domain.uppercased() + customEmojiViewModel?.emojis + .receive(on: DispatchQueue.main) + .sink { [weak self, weak diffableDataSource] emojis in + guard let _ = self else { return } + guard let diffableDataSource = diffableDataSource else { return } + + var snapshot = NSDiffableDataSourceSnapshot() + let customEmojiSection = CustomEmojiPickerSection.emoji(name: domain) + snapshot.appendSections([customEmojiSection]) + let items: [CustomEmojiPickerItem] = { + var items = [CustomEmojiPickerItem]() + for emoji in emojis where emoji.visibleInPicker { + let attribute = CustomEmojiPickerItem.CustomEmojiAttribute(emoji: emoji) + let item = CustomEmojiPickerItem.emoji(attribute: attribute) + items.append(item) + } + return items + }() + snapshot.appendItems(items, toSection: customEmojiSection) + + diffableDataSource.apply(snapshot) + } + .store(in: &disposeBag) + } + +} diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewModel+MetaTextDelegate.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewModel+MetaTextDelegate.swift index 80cc033e8..8a189739d 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewModel+MetaTextDelegate.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewModel+MetaTextDelegate.swift @@ -37,7 +37,7 @@ extension ComposeContentViewModel: MetaTextDelegate { let content = MastodonContent( content: textInput, - emojis: [:] // TODO: emojiViewModel?.emojis.asDictionary ?? [:] + emojis: [:] // customEmojiViewModel?.emojis.value.asDictionary ?? [:] ) let metaContent = MastodonMetaContent.convert(text: content) return metaContent @@ -48,7 +48,7 @@ extension ComposeContentViewModel: MetaTextDelegate { let content = MastodonContent( content: textInput, - emojis: [:] // emojiViewModel?.emojis.asDictionary ?? [:] + emojis: [:] // customEmojiViewModel?.emojis.value.asDictionary ?? [:] ) let metaContent = MastodonMetaContent.convert(text: content) return metaContent diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewModel+UITextViewDelegate.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewModel+UITextViewDelegate.swift new file mode 100644 index 000000000..cdf322a38 --- /dev/null +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/ComposeContentViewModel+UITextViewDelegate.swift @@ -0,0 +1,209 @@ +// +// ComposeContentViewModel+UITextViewDelegate.swift +// +// +// Created by MainasuK on 2022/11/13. +// + +import os.log +import UIKit + +// MARK: - UITextViewDelegate +extension ComposeContentViewModel: UITextViewDelegate { + + public func textViewDidBeginEditing(_ textView: UITextView) { + // Note: + // Xcode warning: + // Publishing changes from within view updates is not allowed, this will cause undefined behavior. + // + // Just ignore the warning and see what will happen… + switch textView { + case contentMetaText?.textView: + isContentEditing = true + case contentWarningMetaText?.textView: + isContentWarningEditing = true + default: + assertionFailure() + break + } + } + + public func textViewDidChange(_ textView: UITextView) { + switch textView { + case contentMetaText?.textView: + // update model + guard let metaText = self.contentMetaText else { + assertionFailure() + return + } + let backedString = metaText.backedString + logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): \(backedString)") + + // configure auto completion + setupAutoComplete(for: textView) + + case contentWarningMetaText?.textView: + break + default: + assertionFailure() + } + } + + public func textViewDidEndEditing(_ textView: UITextView) { + switch textView { + case contentMetaText?.textView: + isContentEditing = false + case contentWarningMetaText?.textView: + isContentWarningEditing = false + default: + assertionFailure() + break + } + } + + public func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { + switch textView { + case contentMetaText?.textView: + if text == " ", let autoCompleteInfo = self.autoCompleteInfo { + assert(delegate != nil) + let isHandled = delegate?.composeContentViewModel(self, handleAutoComplete: autoCompleteInfo) ?? false + return !isHandled + } + + return true + case contentWarningMetaText?.textView: + let isReturn = text == "\n" + if isReturn { + setContentTextViewFirstResponderIfNeeds() + } + return !isReturn + default: + assertionFailure() + return true + } + } + +} + +extension ComposeContentViewModel { + + func insertContentText(text: String) { + guard let contentMetaText = self.contentMetaText else { return } + // FIXME: smart prefix and suffix + let string = contentMetaText.textStorage.string + let isEmpty = string.isEmpty + let hasPrefix = string.hasPrefix(" ") + if hasPrefix || isEmpty { + contentMetaText.textView.insertText(text) + } else { + contentMetaText.textView.insertText(" " + text) + } + } + + func setContentTextViewFirstResponderIfNeeds() { + guard let contentMetaText = self.contentMetaText else { return } + guard !contentMetaText.textView.isFirstResponder else { return } + contentMetaText.textView.becomeFirstResponder() + } + + func setContentWarningTextViewFirstResponderIfNeeds() { + guard let contentWarningMetaText = self.contentWarningMetaText else { return } + guard !contentWarningMetaText.textView.isFirstResponder else { return } + contentWarningMetaText.textView.becomeFirstResponder() + } + +} + +extension ComposeContentViewModel { + + private func setupAutoComplete(for textView: UITextView) { + guard var autoCompletion = ComposeContentViewModel.scanAutoCompleteInfo(textView: textView) else { + self.autoCompleteInfo = nil + return + } + os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: auto complete %s (%s)", ((#file as NSString).lastPathComponent), #line, #function, String(autoCompletion.toHighlightEndString), String(autoCompletion.toCursorString)) + + // get layout text bounding rect + var glyphRange = NSRange() + textView.layoutManager.characterRange(forGlyphRange: NSRange(autoCompletion.toCursorRange, in: textView.text), actualGlyphRange: &glyphRange) + let textContainer = textView.layoutManager.textContainers[0] + let textBoundingRect = textView.layoutManager.boundingRect(forGlyphRange: glyphRange, in: textContainer) + + let retryLayoutTimes = autoCompleteRetryLayoutTimes + guard textBoundingRect.size != .zero else { + autoCompleteRetryLayoutTimes += 1 + // avoid infinite loop + guard retryLayoutTimes < 3 else { return } + // needs retry calculate layout when the rect position changing + DispatchQueue.main.async { + self.setupAutoComplete(for: textView) + } + return + } + autoCompleteRetryLayoutTimes = 0 + + // get symbol bounding rect + textView.layoutManager.characterRange(forGlyphRange: NSRange(autoCompletion.symbolRange, in: textView.text), actualGlyphRange: &glyphRange) + let symbolBoundingRect = textView.layoutManager.boundingRect(forGlyphRange: glyphRange, in: textContainer) + + // set bounding rect and trigger layout + autoCompletion.textBoundingRect = textBoundingRect + autoCompletion.symbolBoundingRect = symbolBoundingRect + autoCompleteInfo = autoCompletion + } + + private static func scanAutoCompleteInfo(textView: UITextView) -> AutoCompleteInfo? { + guard let text = textView.text, + textView.selectedRange.location > 0, !text.isEmpty, + let selectedRange = Range(textView.selectedRange, in: text) else { + return nil + } + let cursorIndex = selectedRange.upperBound + let _highlightStartIndex: String.Index? = { + var index = text.index(before: cursorIndex) + while index > text.startIndex { + let char = text[index] + if char == "@" || char == "#" || char == ":" { + return index + } + index = text.index(before: index) + } + assert(index == text.startIndex) + let char = text[index] + if char == "@" || char == "#" || char == ":" { + return index + } else { + return nil + } + }() + + guard let highlightStartIndex = _highlightStartIndex else { return nil } + let scanRange = NSRange(highlightStartIndex..= cursorIndex else { return nil } + let symbolRange = highlightStartIndex.. Bool +} public final class ComposeContentViewModel: NSObject, ObservableObject { @@ -28,12 +33,20 @@ public final class ComposeContentViewModel: NSObject, ObservableObject { // input let context: AppContext let kind: Kind + weak var delegate: ComposeContentViewModelDelegate? @Published var viewLayoutFrame = ViewLayoutFrame() // author (me) @Published var authContext: AuthContext + // auto-complete info + @Published var autoCompleteRetryLayoutTimes = 0 + @Published var autoCompleteInfo: AutoCompleteInfo? = nil + + // emoji + var customEmojiPickerDiffableDataSource: UICollectionViewDiffableDataSource? + // output // limit @@ -42,10 +55,12 @@ public final class ComposeContentViewModel: NSObject, ObservableObject { // content public weak var contentMetaText: MetaText? { didSet { -// guard let textView = contentMetaText?.textView else { return } -// customEmojiPickerInputViewModel.configure(textInput: textView) + guard let textView = contentMetaText?.textView else { return } + customEmojiPickerInputViewModel.configure(textInput: textView) } } + // for hashtag: "# " + // for mention: "@ " @Published public var initialContent = "" @Published public var content = "" @Published public var contentWeightedLength = 0 @@ -56,8 +71,8 @@ public final class ComposeContentViewModel: NSObject, ObservableObject { // content warning weak var contentWarningMetaText: MetaText? { didSet { - //guard let textView = contentWarningMetaText?.textView else { return } - //customEmojiPickerInputViewModel.configure(textInput: textView) + guard let textView = contentWarningMetaText?.textView else { return } + customEmojiPickerInputViewModel.configure(textInput: textView) } } @Published public var isContentWarningActive = false @@ -91,6 +106,9 @@ public final class ComposeContentViewModel: NSObject, ObservableObject { // emoji @Published var isEmojiActive = false + let customEmojiViewModel: EmojiService.CustomEmojiViewModel? + let customEmojiPickerInputViewModel = CustomEmojiPickerInputViewModel() + @Published var isLoadingCustomEmoji = false // visibility @Published var visibility: Mastodon.Entity.Status.Visibility @@ -98,8 +116,16 @@ public final class ComposeContentViewModel: NSObject, ObservableObject { // UI & UX @Published var replyToCellFrame: CGRect = .zero @Published var contentCellFrame: CGRect = .zero + @Published var contentTextViewFrame: CGRect = .zero @Published var scrollViewState: ScrollViewState = .fold - + + @Published var characterCount: Int = 0 + + @Published public private(set) var isPublishBarButtonItemEnabled = true + @Published var isAttachmentButtonEnabled = false + @Published var isPollButtonEnabled = false + + @Published public private(set) var shouldDismiss = true public init( context: AppContext, @@ -144,9 +170,76 @@ public final class ComposeContentViewModel: NSObject, ObservableObject { } return visibility }() + self.customEmojiViewModel = context.emojiService.dequeueCustomEmojiViewModel( + for: authContext.mastodonAuthenticationBox.domain + ) super.init() // end init + // setup initial value + switch kind { + case .reply(let record): + context.managedObjectContext.performAndWait { + guard let status = record.object(in: context.managedObjectContext) else { + assertionFailure() + return + } + let author = authContext.mastodonAuthenticationBox.authenticationRecord.object(in: context.managedObjectContext)?.user + + var mentionAccts: [String] = [] + if author?.id != status.author.id { + mentionAccts.append("@" + status.author.acct) + } + let mentions = status.mentions + .filter { author?.id != $0.id } + for mention in mentions { + let acct = "@" + mention.acct + guard !mentionAccts.contains(acct) else { continue } + mentionAccts.append(acct) + } + for acct in mentionAccts { + UITextChecker.learnWord(acct) + } + if let spoilerText = status.spoilerText, !spoilerText.isEmpty { + self.isContentWarningActive = true + self.contentWarning = spoilerText + } + + let initialComposeContent = mentionAccts.joined(separator: " ") + let preInsertedContent: String? = initialComposeContent.isEmpty ? nil : initialComposeContent + " " + self.initialContent = preInsertedContent ?? "" + self.content = preInsertedContent ?? "" + } + case .hashtag(let hashtag): + let initialComposeContent = "#" + hashtag + UITextChecker.learnWord(initialComposeContent) + let preInsertedContent = initialComposeContent + " " + self.initialContent = preInsertedContent + self.content = preInsertedContent + case .mention(let record): + context.managedObjectContext.performAndWait { + guard let user = record.object(in: context.managedObjectContext) else { return } + let initialComposeContent = "@" + user.acct + UITextChecker.learnWord(initialComposeContent) + let preInsertedContent = initialComposeContent + " " + self.initialContent = preInsertedContent + self.content = preInsertedContent + } + case .post: + break + } + + bind() + } + + deinit { + os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) + } + +} + +extension ComposeContentViewModel { + private func bind() { // bind author $authContext .sink { [weak self] authContext in @@ -177,12 +270,138 @@ public final class ComposeContentViewModel: NSObject, ObservableObject { ) .map { $0 + $1 <= $2 } .assign(to: &$isContentValid) - } - - deinit { - os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) - } + + // bind attachment + $attachmentViewModels + .receive(on: DispatchQueue.main) + .sink { [weak self] _ in + guard let self = self else { return } + Task { + try await self.uploadMediaInQueue() + } + } + .store(in: &disposeBag) + + // bind emoji inputView + $isEmojiActive.assign(to: &customEmojiPickerInputViewModel.$isCustomEmojiComposing) + + // bind toolbar + Publishers.CombineLatest3( + $isPollActive, + $attachmentViewModels, + $maxMediaAttachmentLimit + ) + .receive(on: DispatchQueue.main) + .sink { [weak self] isPollActive, attachmentViewModels, maxMediaAttachmentLimit in + guard let self = self else { return } + let shouldMediaDisable = isPollActive || attachmentViewModels.count >= maxMediaAttachmentLimit + let shouldPollDisable = attachmentViewModels.count > 0 + + self.isAttachmentButtonEnabled = !shouldMediaDisable + self.isPollButtonEnabled = !shouldPollDisable + } + .store(in: &disposeBag) + + // bind status content character count + Publishers.CombineLatest3( + $contentWeightedLength, + $contentWarningWeightedLength, + $isContentWarningActive + ) + .map { contentWeightedLength, contentWarningWeightedLength, isContentWarningActive -> Int in + var count = contentWeightedLength + if isContentWarningActive { + count += contentWarningWeightedLength + } + return count + } + .assign(to: &$characterCount) + + // bind compose bar button item UI state + let isComposeContentEmpty = $content + .map { $0.isEmpty } + let isComposeContentValid = Publishers.CombineLatest( + $characterCount, + $maxTextInputLimit + ) + .map { characterCount, maxTextInputLimit in + characterCount <= maxTextInputLimit + } + let isMediaEmpty = $attachmentViewModels + .map { $0.isEmpty } + let isMediaUploadAllSuccess = $attachmentViewModels + .map { attachmentViewModels in + return Publishers.MergeMany(attachmentViewModels.map { $0.$uploadState }) + .delay(for: 0.5, scheduler: DispatchQueue.main) // convert to outputs with delay. Due to @Published emit before changes + .map { _ in attachmentViewModels.map { $0.uploadState } } + } + .switchToLatest() + .map { outputs in + guard outputs.allSatisfy({ $0 == .finish }) else { return false } + return true + } + + let isPollOptionsAllValid = $pollOptions + .map { options in + return Publishers.MergeMany(options.map { $0.$text }) + .delay(for: 0.5, scheduler: DispatchQueue.main) // convert to outputs with delay. Due to @Published emit before changes + .map { _ in options.map { $0.text } } + } + .switchToLatest() + .map { outputs in + return outputs.allSatisfy { !$0.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty } + } + + let isPublishBarButtonItemEnabledPrecondition1 = Publishers.CombineLatest4( + isComposeContentEmpty, + isComposeContentValid, + isMediaEmpty, + isMediaUploadAllSuccess + ) + .map { isComposeContentEmpty, isComposeContentValid, isMediaEmpty, isMediaUploadAllSuccess -> Bool in + if isMediaEmpty { + return isComposeContentValid && !isComposeContentEmpty + } else { + return isComposeContentValid && isMediaUploadAllSuccess + } + } + .eraseToAnyPublisher() + + let isPublishBarButtonItemEnabledPrecondition2 = Publishers.CombineLatest4( + isComposeContentEmpty, + isComposeContentValid, + $isPollActive, + isPollOptionsAllValid + ) + .map { isComposeContentEmpty, isComposeContentValid, isPollComposing, isPollOptionsAllValid -> Bool in + if isPollComposing { + return isComposeContentValid && !isComposeContentEmpty && isPollOptionsAllValid + } else { + return isComposeContentValid && !isComposeContentEmpty + } + } + .eraseToAnyPublisher() + + Publishers.CombineLatest( + isPublishBarButtonItemEnabledPrecondition1, + isPublishBarButtonItemEnabledPrecondition2 + ) + .map { $0 && $1 } + .assign(to: &$isPublishBarButtonItemEnabled) + + // bind modal dismiss state + $content + .receive(on: DispatchQueue.main) + .map { content in + if content.isEmpty { + return true + } + // if the trimmed content equal to initial content + return content.trimmingCharacters(in: .whitespacesAndNewlines) == self.initialContent + } + .assign(to: &$shouldDismiss) + } } extension ComposeContentViewModel { @@ -192,13 +411,30 @@ extension ComposeContentViewModel { case mention(user: ManagedObjectRecord) case reply(status: ManagedObjectRecord) } - + public enum ScrollViewState { case fold // snap to input case expand // snap to reply } } +extension ComposeContentViewModel { + public struct AutoCompleteInfo { + // model + let inputText: Substring + // range + let symbolRange: Range + let symbolString: Substring + let toCursorRange: Range + let toCursorString: Substring + let toHighlightEndRange: Range + let toHighlightEndString: Substring + // geometry + var textBoundingRect: CGRect = .zero + var symbolBoundingRect: CGRect = .zero + } +} + extension ComposeContentViewModel { func createNewPollOptionIfCould() { logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public)") @@ -275,70 +511,58 @@ extension ComposeContentViewModel { } // end func publisher() } -// MARK: - UITextViewDelegate -extension ComposeContentViewModel: UITextViewDelegate { - public func textViewDidBeginEditing(_ textView: UITextView) { - switch textView { - case contentMetaText?.textView: - isContentEditing = true - case contentWarningMetaText?.textView: - isContentWarningEditing = true - default: - break - } - } +extension ComposeContentViewModel { - public func textViewDidEndEditing(_ textView: UITextView) { - switch textView { - case contentMetaText?.textView: - isContentEditing = false - case contentWarningMetaText?.textView: - isContentWarningEditing = false - default: - break + public enum AttachmentPrecondition: Error, LocalizedError { + case videoAttachWithPhoto + case moreThanOneVideo + + public var errorDescription: String? { + return L10n.Common.Alerts.PublishPostFailure.title } - } - - public func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { - switch textView { - case contentMetaText?.textView: - return true - case contentWarningMetaText?.textView: - let isReturn = text == "\n" - if isReturn { - setContentTextViewFirstResponderIfNeeds() + + public var failureReason: String? { + switch self { + case .videoAttachWithPhoto: + return L10n.Common.Alerts.PublishPostFailure.AttachmentsMessage.videoAttachWithPhoto + case .moreThanOneVideo: + return L10n.Common.Alerts.PublishPostFailure.AttachmentsMessage.moreThanOneVideo + } + } + } + + // check exclusive limit: + // - up to 1 video + // - up to N photos + public func checkAttachmentPrecondition() throws { + let attachmentViewModels = self.attachmentViewModels + guard !attachmentViewModels.isEmpty else { return } + + var photoAttachmentViewModels: [AttachmentViewModel] = [] + var videoAttachmentViewModels: [AttachmentViewModel] = [] + attachmentViewModels.forEach { attachmentViewModel in + guard let output = attachmentViewModel.output else { + assertionFailure() + return + } + switch output { + case .image: + photoAttachmentViewModels.append(attachmentViewModel) + case .video: + videoAttachmentViewModels.append(attachmentViewModel) + } + } + + if !videoAttachmentViewModels.isEmpty { + guard videoAttachmentViewModels.count == 1 else { + throw AttachmentPrecondition.moreThanOneVideo + } + guard photoAttachmentViewModels.isEmpty else { + throw AttachmentPrecondition.videoAttachWithPhoto } - return !isReturn - default: - assertionFailure() - return true } } - func insertContentText(text: String) { - guard let contentMetaText = self.contentMetaText else { return } - // FIXME: smart prefix and suffix - let string = contentMetaText.textStorage.string - let isEmpty = string.isEmpty - let hasPrefix = string.hasPrefix(" ") - if hasPrefix || isEmpty { - contentMetaText.textView.insertText(text) - } else { - contentMetaText.textView.insertText(" " + text) - } - } - - func setContentTextViewFirstResponderIfNeeds() { - guard let contentMetaText = self.contentMetaText else { return } - guard !contentMetaText.textView.isFirstResponder else { return } - contentMetaText.textView.becomeFirstResponder() - } - - func setContentWarningTextViewFirstResponderIfNeeds() { - guard let contentWarningMetaText = self.contentWarningMetaText else { return } - guard !contentWarningMetaText.textView.isFirstResponder else { return } - contentWarningMetaText.textView.becomeFirstResponder() - } } // MARK: - DeleteBackwardResponseTextFieldRelayDelegate @@ -392,3 +616,56 @@ extension ComposeContentViewModel: DeleteBackwardResponseTextFieldRelayDelegate } } + +// MARK: - AttachmentViewModelDelegate +extension ComposeContentViewModel: AttachmentViewModelDelegate { + + public func attachmentViewModel( + _ viewModel: AttachmentViewModel, + uploadStateValueDidChange state: AttachmentViewModel.UploadState + ) { + Task { + try await uploadMediaInQueue() + } + } + + @MainActor + func uploadMediaInQueue() async throws { + for (i, attachmentViewModel) in attachmentViewModels.enumerated() { + switch attachmentViewModel.uploadState { + case .none: + return + case .compressing: + return + case .ready: + let count = self.attachmentViewModels.count + logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): upload \(i)/\(count) attachment") + try await attachmentViewModel.upload() + return + case .uploading: + return + case .fail: + return + case .finish: + continue + } + } + } + + public func attachmentViewModel( + _ viewModel: AttachmentViewModel, + actionButtonDidPressed action: AttachmentViewModel.Action + ) { + switch action { + case .retry: + Task { + try await viewModel.upload(isRetry: true) + } + case .remove: + attachmentViewModels.removeAll(where: { $0 === viewModel }) + Task { + try await uploadMediaInQueue() + } + } + } +} diff --git a/Mastodon/Scene/Compose/CollectionViewCell/CustomEmojiPickerHeaderCollectionReusableView.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/EmojiPicker/CustomEmojiPickerHeaderCollectionReusableView.swift similarity index 100% rename from Mastodon/Scene/Compose/CollectionViewCell/CustomEmojiPickerHeaderCollectionReusableView.swift rename to MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/EmojiPicker/CustomEmojiPickerHeaderCollectionReusableView.swift diff --git a/Mastodon/Scene/Compose/View/CustomEmojiPickerInputView.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/EmojiPicker/CustomEmojiPickerInputView.swift similarity index 100% rename from Mastodon/Scene/Compose/View/CustomEmojiPickerInputView.swift rename to MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/EmojiPicker/CustomEmojiPickerInputView.swift diff --git a/Mastodon/Scene/Compose/View/CustomEmojiPickerInputViewModel.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/EmojiPicker/CustomEmojiPickerInputViewModel.swift similarity index 52% rename from Mastodon/Scene/Compose/View/CustomEmojiPickerInputViewModel.swift rename to MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/EmojiPicker/CustomEmojiPickerInputViewModel.swift index 496c8191b..729524ce5 100644 --- a/Mastodon/Scene/Compose/View/CustomEmojiPickerInputViewModel.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/EmojiPicker/CustomEmojiPickerInputViewModel.swift @@ -9,7 +9,6 @@ import UIKit import Combine import MetaTextKit import MastodonCore -import MastodonUI final class CustomEmojiPickerInputViewModel { @@ -20,8 +19,7 @@ final class CustomEmojiPickerInputViewModel { // input weak var customEmojiPickerInputView: CustomEmojiPickerInputView? - // output - let isCustomEmojiComposing = CurrentValueSubject(false) + @Published var isCustomEmojiComposing = false } @@ -51,27 +49,28 @@ extension CustomEmojiPickerInputViewModel { for reference in customEmojiReplaceableTextInputReferences { guard let textInput = reference.value else { continue } guard textInput.isFirstResponder == true else { continue } - guard let selectedTextRange = textInput.selectedTextRange else { continue } + // guard let selectedTextRange = textInput.selectedTextRange else { continue } textInput.insertText(text) + // FIXME: inline emoji // due to insert text render as attachment // the cursor reset logic not works // hack with hard code +2 offset - assert(text.hasSuffix(": ")) - guard text.hasPrefix(":") && text.hasSuffix(": ") else { continue } - - if let _ = textInput as? MetaTextView { - if let newPosition = textInput.position(from: selectedTextRange.start, offset: 2) { - let newSelectedTextRange = textInput.textRange(from: newPosition, to: newPosition) - textInput.selectedTextRange = newSelectedTextRange - } - } else { - if let newPosition = textInput.position(from: selectedTextRange.start, offset: text.length) { - let newSelectedTextRange = textInput.textRange(from: newPosition, to: newPosition) - textInput.selectedTextRange = newSelectedTextRange - } - } + // assert(text.hasSuffix(": ")) + // guard text.hasPrefix(":") && text.hasSuffix(": ") else { continue } + // + // if let _ = textInput as? MetaTextView { + // if let newPosition = textInput.position(from: selectedTextRange.start, offset: 2) { + // let newSelectedTextRange = textInput.textRange(from: newPosition, to: newPosition) + // textInput.selectedTextRange = newSelectedTextRange + // } + // } else { + // if let newPosition = textInput.position(from: selectedTextRange.start, offset: text.length) { + // let newSelectedTextRange = textInput.textRange(from: newPosition, to: newPosition) + // textInput.selectedTextRange = newSelectedTextRange + // } + // } return reference } @@ -81,3 +80,16 @@ extension CustomEmojiPickerInputViewModel { } +extension CustomEmojiPickerInputViewModel { + public func configure(textInput: CustomEmojiReplaceableTextInput) { + $isCustomEmojiComposing + .receive(on: DispatchQueue.main) + .sink { [weak self] isCustomEmojiComposing in + guard let self = self else { return } + textInput.inputView = isCustomEmojiComposing ? self.customEmojiPickerInputView : nil + textInput.reloadInputViews() + self.append(customEmojiReplaceableTextInput: textInput) + } + .store(in: &disposeBag) + } +} diff --git a/Mastodon/Scene/Compose/CollectionViewCell/CustomEmojiPickerItemCollectionViewCell.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/EmojiPicker/CustomEmojiPickerItemCollectionViewCell.swift similarity index 100% rename from Mastodon/Scene/Compose/CollectionViewCell/CustomEmojiPickerItemCollectionViewCell.swift rename to MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/EmojiPicker/CustomEmojiPickerItemCollectionViewCell.swift diff --git a/Mastodon/Helper/MastodonRegex.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Helper/MastodonRegex.swift similarity index 100% rename from Mastodon/Helper/MastodonRegex.swift rename to MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Helper/MastodonRegex.swift diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Poll/PollOptionTextField.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Poll/PollOptionTextField.swift index 5143bea35..fa409c114 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Poll/PollOptionTextField.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Poll/PollOptionTextField.swift @@ -39,7 +39,7 @@ public struct PollOptionTextField: UIViewRepresentable { textField.text = text textField.placeholder = { if index >= 0 { - return L10n.Scene.Compose.Poll.optionNumber(index) + return L10n.Scene.Compose.Poll.optionNumber(index + 1) } else { assertionFailure() return "" diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Publisher/MastodonStatusPublisher.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Publisher/MastodonStatusPublisher.swift index ea3be18a8..93f3dd3a1 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Publisher/MastodonStatusPublisher.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Publisher/MastodonStatusPublisher.swift @@ -119,13 +119,31 @@ extension MastodonStatusPublisher: StatusPublisher { progress.addChild(attachmentViewModel.progress, withPendingUnitCount: publishAttachmentTaskWeight) // upload media do { - let result = try await attachmentViewModel.upload(context: uploadContext) - guard case let .mastodon(response) = result else { - assertionFailure() - continue + guard let attachment = attachmentViewModel.uploadResult else { + // precondition: all media uploaded + throw AppError.badRequest } - let attachmentID = response.value.id - attachmentIDs.append(attachmentID) + attachmentIDs.append(attachment.id) + + let caption = attachmentViewModel.caption + guard !caption.isEmpty else { continue } + + _ = try await api.updateMedia( + domain: authContext.mastodonAuthenticationBox.domain, + attachmentID: attachment.id, + query: .init( + file: nil, + thumbnail: nil, + description: caption, + focus: nil + ), + mastodonAuthenticationBox: authContext.mastodonAuthenticationBox + ).singleOutput() + + // TODO: allow background upload + // let attachment = try await attachmentViewModel.upload(context: uploadContext) + // let attachmentID = attachment.id + // attachmentIDs.append(attachmentID) } catch { logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): upload attachment fail: \(error.localizedDescription)") _state = .failure(error) diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/TableViewCell/ComposeContentTableViewCell.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/TableViewCell/ComposeContentTableViewCell.swift index 3a646f1fc..90d432825 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/TableViewCell/ComposeContentTableViewCell.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/TableViewCell/ComposeContentTableViewCell.swift @@ -7,74 +7,12 @@ import os.log import UIKit -import Combine -import MetaTextKit -import UITextView_Placeholder -import MastodonAsset -import MastodonLocalization import UIHostingConfigurationBackport -//protocol ComposeStatusContentTableViewCellDelegate: AnyObject { -// func composeStatusContentTableViewCell(_ cell: ComposeStatusContentTableViewCell, textViewShouldBeginEditing textView: UITextView) -> Bool -//} - final class ComposeContentTableViewCell: UITableViewCell { let logger = Logger(subsystem: "ComposeContentTableViewCell", category: "View") -// var disposeBag = Set() -// weak var delegate: ComposeStatusContentTableViewCellDelegate? -// -// let statusView = StatusView() -// -// let statusContentWarningEditorView = StatusContentWarningEditorView() -// -// let textEditorViewContainerView = UIView() -// -// static let metaTextViewTag: Int = 333 -// let metaText: MetaText = { -// let metaText = MetaText() -// metaText.textView.backgroundColor = .clear -// metaText.textView.isScrollEnabled = false -// metaText.textView.keyboardType = .twitter -// metaText.textView.textDragInteraction?.isEnabled = false // disable drag for link and attachment -// metaText.textView.textContainer.lineFragmentPadding = 10 // leading inset -// metaText.textView.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 17, weight: .regular)) -// metaText.textView.attributedPlaceholder = { -// var attributes = metaText.textAttributes -// attributes[.foregroundColor] = Asset.Colors.Label.secondary.color -// return NSAttributedString( -// string: L10n.Scene.Compose.contentInputPlaceholder, -// attributes: attributes -// ) -// }() -// metaText.paragraphStyle = { -// let style = NSMutableParagraphStyle() -// style.lineSpacing = 5 -// style.paragraphSpacing = 0 -// return style -// }() -// metaText.textAttributes = [ -// .font: UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 17, weight: .regular)), -// .foregroundColor: Asset.Colors.Label.primary.color, -// ] -// metaText.linkAttributes = [ -// .font: UIFontMetrics(forTextStyle: .body).scaledFont(for: .systemFont(ofSize: 17, weight: .semibold)), -// .foregroundColor: Asset.Colors.brand.color, -// ] -// return metaText -// }() -// -// // output -// let contentWarningContent = PassthroughSubject() -// -// override func prepareForReuse() { -// super.prepareForReuse() -// -// metaText.delegate = nil -// metaText.textView.delegate = nil -// } - override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) _init() @@ -93,79 +31,6 @@ extension ComposeContentTableViewCell { selectionStyle = .none layer.zPosition = 999 backgroundColor = .clear - -// let containerStackView = UIStackView() -// containerStackView.axis = .vertical -// containerStackView.translatesAutoresizingMaskIntoConstraints = false -// contentView.addSubview(containerStackView) -// NSLayoutConstraint.activate([ -// containerStackView.topAnchor.constraint(equalTo: contentView.topAnchor), -// containerStackView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), -// containerStackView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), -// containerStackView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor), -// ]) -// containerStackView.preservesSuperviewLayoutMargins = true -// -// containerStackView.addArrangedSubview(statusContentWarningEditorView) -// statusContentWarningEditorView.setContentHuggingPriority(.required - 1, for: .vertical) -// -// let statusContainerView = UIView() -// statusContainerView.preservesSuperviewLayoutMargins = true -// containerStackView.addArrangedSubview(statusContainerView) -// statusView.translatesAutoresizingMaskIntoConstraints = false -// statusContainerView.addSubview(statusView) -// NSLayoutConstraint.activate([ -// statusView.topAnchor.constraint(equalTo: statusContainerView.topAnchor, constant: 20), -// statusView.leadingAnchor.constraint(equalTo: statusContainerView.leadingAnchor), -// statusView.trailingAnchor.constraint(equalTo: statusContainerView.trailingAnchor), -// statusView.bottomAnchor.constraint(equalTo: statusContainerView.bottomAnchor), -// ]) -// statusView.setup(style: .composeStatusAuthor) -// -// containerStackView.addArrangedSubview(textEditorViewContainerView) -// metaText.textView.translatesAutoresizingMaskIntoConstraints = false -// textEditorViewContainerView.addSubview(metaText.textView) -// NSLayoutConstraint.activate([ -// metaText.textView.topAnchor.constraint(equalTo: textEditorViewContainerView.topAnchor), -// metaText.textView.leadingAnchor.constraint(equalTo: textEditorViewContainerView.layoutMarginsGuide.leadingAnchor), -// metaText.textView.trailingAnchor.constraint(equalTo: textEditorViewContainerView.layoutMarginsGuide.trailingAnchor), -// metaText.textView.bottomAnchor.constraint(equalTo: textEditorViewContainerView.bottomAnchor), -// metaText.textView.heightAnchor.constraint(greaterThanOrEqualToConstant: 64).priority(.defaultHigh), -// ]) -// statusContentWarningEditorView.textView.delegate = self } } - -// MARK: - UITextViewDelegate -//extension ComposeStatusContentTableViewCell: UITextViewDelegate { -// -// func textViewShouldBeginEditing(_ textView: UITextView) -> Bool { -// return delegate?.composeStatusContentTableViewCell(self, textViewShouldBeginEditing: textView) ?? true -// } -// -// func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { -// switch textView { -// case statusContentWarningEditorView.textView: -// // disable input line break -// guard text != "\n" else { return false } -// return true -// default: -// assertionFailure() -// return true -// } -// } -// -// func textViewDidChange(_ textView: UITextView) { -// logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): text: \(textView.text ?? "")") -// guard textView === statusContentWarningEditorView.textView else { return } -// // replace line break with space -// // needs check input state to prevent break the IME -// if textView.markedTextRange == nil { -// textView.text = textView.text.replacingOccurrences(of: "\n", with: " ") -// } -// contentWarningContent.send(textView.text) -// } -// -//} - diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/TableViewCell/ComposeStatusAttachmentTableViewCell.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/TableViewCell/ComposeStatusAttachmentTableViewCell.swift deleted file mode 100644 index 42a851bf1..000000000 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/TableViewCell/ComposeStatusAttachmentTableViewCell.swift +++ /dev/null @@ -1,172 +0,0 @@ -// -// ComposeStatusAttachmentTableViewCell.swift -// Mastodon -// -// Created by MainasuK Cirno on 2021-6-29. -// - -import UIKit -import SwiftUI -import Combine -import AlamofireImage -import MastodonAsset -import MastodonCore -import MastodonLocalization -import UIHostingConfigurationBackport - -//final class ComposeStatusAttachmentTableViewCell: UITableViewCell { -// -// private(set) var dataSource: UICollectionViewDiffableDataSource! -// weak var composeStatusAttachmentCollectionViewCellDelegate: ComposeStatusAttachmentCollectionViewCellDelegate? -// var observations = Set() -// -// private static func createLayout() -> UICollectionViewLayout { -// let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .estimated(44)) -// let item = NSCollectionLayoutItem(layoutSize: itemSize) -// let groupSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .estimated(44)) -// let group = NSCollectionLayoutGroup.vertical(layoutSize: groupSize, subitems: [item]) -// let section = NSCollectionLayoutSection(group: group) -// section.contentInsetsReference = .readableContent -// return UICollectionViewCompositionalLayout(section: section) -// } -// -// private(set) var collectionViewHeightLayoutConstraint: NSLayoutConstraint! -// let collectionView: UICollectionView = { -// let collectionViewLayout = ComposeStatusAttachmentTableViewCell.createLayout() -// let collectionView = UICollectionView(frame: .zero, collectionViewLayout: collectionViewLayout) -// collectionView.register(ComposeStatusAttachmentCollectionViewCell.self, forCellWithReuseIdentifier: String(describing: ComposeStatusAttachmentCollectionViewCell.self)) -// collectionView.backgroundColor = .clear -// collectionView.alwaysBounceVertical = true -// collectionView.isScrollEnabled = false -// return collectionView -// }() -// let collectionViewHeightDidUpdate = PassthroughSubject() -// -// override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { -// super.init(style: style, reuseIdentifier: reuseIdentifier) -// _init() -// } -// -// required init?(coder: NSCoder) { -// super.init(coder: coder) -// _init() -// } -// -//} -// -//extension ComposeStatusAttachmentTableViewCell { -// -// private func _init() { -// backgroundColor = .clear -// contentView.backgroundColor = .clear -// -// collectionView.translatesAutoresizingMaskIntoConstraints = false -// contentView.addSubview(collectionView) -// collectionViewHeightLayoutConstraint = collectionView.heightAnchor.constraint(equalToConstant: 200).priority(.defaultHigh) -// NSLayoutConstraint.activate([ -// collectionView.topAnchor.constraint(equalTo: contentView.topAnchor), -// collectionView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), -// collectionView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), -// collectionView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor), -// collectionViewHeightLayoutConstraint, -// ]) -// -// collectionView.observe(\.contentSize, options: [.initial, .new]) { [weak self] collectionView, _ in -// guard let self = self else { return } -// self.collectionViewHeightLayoutConstraint.constant = collectionView.contentSize.height -// self.collectionViewHeightDidUpdate.send() -// } -// .store(in: &observations) -// -// self.dataSource = UICollectionViewDiffableDataSource(collectionView: collectionView) { -// [weak self] collectionView, indexPath, item -> UICollectionViewCell? in -// guard let _ = self else { return UICollectionViewCell() } -// switch item { -// case .attachment: -// let cell = collectionView.dequeueReusableCell(withReuseIdentifier: String(describing: ComposeStatusAttachmentCollectionViewCell.self), for: indexPath) as! ComposeStatusAttachmentCollectionViewCell -// cell.contentConfiguration = UIHostingConfigurationBackport { -// HStack { -// Image(systemName: "star") -// Text("Favorites") -// Spacer() -// } -// } -//// cell.attachmentContainerView.descriptionTextView.text = attachmentService.description.value -//// cell.delegate = self.composeStatusAttachmentCollectionViewCellDelegate -//// attachmentService.thumbnailImage -//// .receive(on: DispatchQueue.main) -//// .sink { [weak cell] thumbnailImage in -//// guard let cell = cell else { return } -//// let size = cell.attachmentContainerView.previewImageView.frame.size != .zero ? cell.attachmentContainerView.previewImageView.frame.size : CGSize(width: 1, height: 1) -//// guard let image = thumbnailImage else { -//// let placeholder = UIImage.placeholder( -//// size: size, -//// color: ThemeService.shared.currentTheme.value.systemGroupedBackgroundColor -//// ) -//// .af.imageRounded( -//// withCornerRadius: AttachmentContainerView.containerViewCornerRadius -//// ) -//// cell.attachmentContainerView.previewImageView.image = placeholder -//// return -//// } -//// // cannot get correct size. set corner radius on layer -//// cell.attachmentContainerView.previewImageView.image = image -//// } -//// .store(in: &cell.disposeBag) -//// Publishers.CombineLatest( -//// attachmentService.uploadStateMachineSubject.eraseToAnyPublisher(), -//// attachmentService.error.eraseToAnyPublisher() -//// ) -//// .receive(on: DispatchQueue.main) -//// .sink { [weak cell, weak attachmentService] uploadState, error in -//// guard let cell = cell else { return } -//// guard let attachmentService = attachmentService else { return } -//// cell.attachmentContainerView.emptyStateView.isHidden = error == nil -//// cell.attachmentContainerView.descriptionBackgroundView.isHidden = error != nil -//// if let error = error { -//// cell.attachmentContainerView.activityIndicatorView.stopAnimating() -//// cell.attachmentContainerView.emptyStateView.label.text = error.localizedDescription -//// } else { -//// guard let uploadState = uploadState else { return } -//// switch uploadState { -//// case is MastodonAttachmentService.UploadState.Finish: -//// cell.attachmentContainerView.activityIndicatorView.stopAnimating() -//// case is MastodonAttachmentService.UploadState.Fail: -//// cell.attachmentContainerView.activityIndicatorView.stopAnimating() -//// // FIXME: not display -//// cell.attachmentContainerView.emptyStateView.label.text = { -//// if let file = attachmentService.file.value { -//// switch file { -//// case .jpeg, .png, .gif: -//// return L10n.Scene.Compose.Attachment.attachmentBroken(L10n.Scene.Compose.Attachment.photo) -//// case .other: -//// return L10n.Scene.Compose.Attachment.attachmentBroken(L10n.Scene.Compose.Attachment.video) -//// } -//// } else { -//// return L10n.Scene.Compose.Attachment.attachmentBroken(L10n.Scene.Compose.Attachment.photo) -//// } -//// }() -//// default: -//// break -//// } -//// } -//// } -//// .store(in: &cell.disposeBag) -//// NotificationCenter.default.publisher( -//// for: UITextView.textDidChangeNotification, -//// object: cell.attachmentContainerView.descriptionTextView -//// ) -//// .receive(on: DispatchQueue.main) -//// .sink { notification in -//// guard let textField = notification.object as? UITextView else { return } -//// let text = textField.text?.trimmingCharacters(in: .whitespacesAndNewlines) -//// attachmentService.description.value = text -//// } -//// .store(in: &cell.disposeBag) -// return cell -// } -// } -// } -// -//} -// diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/TableViewCell/ComposeStatusPollTableViewCell.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/TableViewCell/ComposeStatusPollTableViewCell.swift deleted file mode 100644 index 27b835a5a..000000000 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/TableViewCell/ComposeStatusPollTableViewCell.swift +++ /dev/null @@ -1,209 +0,0 @@ -// -// ComposeStatusPollTableViewCell.swift -// Mastodon -// -// Created by MainasuK Cirno on 2021-6-29. -// - -import os.log -import UIKit -import Combine -import MastodonAsset -import MastodonLocalization - -//protocol ComposeStatusPollTableViewCellDelegate: AnyObject { -// func composeStatusPollTableViewCell(_ cell: ComposeStatusPollTableViewCell, pollOptionAttributesDidReorder options: [ComposeStatusPollItem.PollOptionAttribute]) -//} -// -//final class ComposeStatusPollTableViewCell: UITableViewCell { -// -// let logger = Logger(subsystem: "ComposeStatusPollTableViewCell", category: "UI") -// -// private(set) var dataSource: UICollectionViewDiffableDataSource! -// var observations = Set() -// -// weak var customEmojiPickerInputViewModel: CustomEmojiPickerInputViewModel? -// weak var delegate: ComposeStatusPollTableViewCellDelegate? -// weak var composeStatusPollOptionCollectionViewCellDelegate: ComposeStatusPollOptionCollectionViewCellDelegate? -// weak var composeStatusPollOptionAppendEntryCollectionViewCellDelegate: ComposeStatusPollOptionAppendEntryCollectionViewCellDelegate? -// weak var composeStatusPollExpiresOptionCollectionViewCellDelegate: ComposeStatusPollExpiresOptionCollectionViewCellDelegate? -// -// private static func createLayout() -> UICollectionViewLayout { -// let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .estimated(44)) -// let item = NSCollectionLayoutItem(layoutSize: itemSize) -// let groupSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .estimated(44)) -// let group = NSCollectionLayoutGroup.vertical(layoutSize: groupSize, subitems: [item]) -// let section = NSCollectionLayoutSection(group: group) -// section.contentInsetsReference = .readableContent -// return UICollectionViewCompositionalLayout(section: section) -// } -// -// private(set) var collectionViewHeightLayoutConstraint: NSLayoutConstraint! -// let collectionView: UICollectionView = { -// let collectionViewLayout = ComposeStatusPollTableViewCell.createLayout() -// let collectionView = UICollectionView(frame: .zero, collectionViewLayout: collectionViewLayout) -// collectionView.register(ComposeStatusPollOptionCollectionViewCell.self, forCellWithReuseIdentifier: String(describing: ComposeStatusPollOptionCollectionViewCell.self)) -// collectionView.register(ComposeStatusPollOptionAppendEntryCollectionViewCell.self, forCellWithReuseIdentifier: String(describing: ComposeStatusPollOptionAppendEntryCollectionViewCell.self)) -// collectionView.register(ComposeStatusPollExpiresOptionCollectionViewCell.self, forCellWithReuseIdentifier: String(describing: ComposeStatusPollExpiresOptionCollectionViewCell.self)) -// collectionView.backgroundColor = .clear -// collectionView.alwaysBounceVertical = true -// collectionView.isScrollEnabled = false -// collectionView.dragInteractionEnabled = true -// return collectionView -// }() -// let collectionViewHeightDidUpdate = PassthroughSubject() -// -// override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { -// super.init(style: style, reuseIdentifier: reuseIdentifier) -// _init() -// } -// -// required init?(coder: NSCoder) { -// super.init(coder: coder) -// _init() -// } -// -//} -// -//extension ComposeStatusPollTableViewCell { -// -// private func _init() { -// backgroundColor = .clear -// contentView.backgroundColor = .clear -// -// collectionView.translatesAutoresizingMaskIntoConstraints = false -// contentView.addSubview(collectionView) -// collectionViewHeightLayoutConstraint = collectionView.heightAnchor.constraint(equalToConstant: 300).priority(.defaultHigh) -// NSLayoutConstraint.activate([ -// collectionView.topAnchor.constraint(equalTo: contentView.topAnchor), -// collectionView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), -// collectionView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), -// collectionView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor), -// collectionViewHeightLayoutConstraint, -// ]) -// -// collectionView.observe(\.contentSize, options: [.initial, .new]) { [weak self] collectionView, _ in -// guard let self = self else { return } -// self.collectionViewHeightLayoutConstraint.constant = collectionView.contentSize.height -// self.collectionViewHeightDidUpdate.send() -// } -// .store(in: &observations) -// -// self.dataSource = UICollectionViewDiffableDataSource(collectionView: collectionView) { [ -// weak self -// ] collectionView, indexPath, item -> UICollectionViewCell? in -// guard let self = self else { return UICollectionViewCell() } -// -// switch item { -// case .pollOption(let attribute): -// let cell = collectionView.dequeueReusableCell(withReuseIdentifier: String(describing: ComposeStatusPollOptionCollectionViewCell.self), for: indexPath) as! ComposeStatusPollOptionCollectionViewCell -// cell.pollOptionView.optionTextField.text = attribute.option.value -// cell.pollOptionView.optionTextField.placeholder = L10n.Scene.Compose.Poll.optionNumber(indexPath.item + 1) -// cell.pollOption -// .receive(on: DispatchQueue.main) -// .assign(to: \.value, on: attribute.option) -// .store(in: &cell.disposeBag) -// cell.delegate = self.composeStatusPollOptionCollectionViewCellDelegate -// if let customEmojiPickerInputViewModel = self.customEmojiPickerInputViewModel { -// ComposeStatusSection.configureCustomEmojiPicker(viewModel: customEmojiPickerInputViewModel, customEmojiReplaceableTextInput: cell.pollOptionView.optionTextField, disposeBag: &cell.disposeBag) -// } -// return cell -// case .pollOptionAppendEntry: -// let cell = collectionView.dequeueReusableCell(withReuseIdentifier: String(describing: ComposeStatusPollOptionAppendEntryCollectionViewCell.self), for: indexPath) as! ComposeStatusPollOptionAppendEntryCollectionViewCell -// cell.delegate = self.composeStatusPollOptionAppendEntryCollectionViewCellDelegate -// return cell -// case .pollExpiresOption(let attribute): -// let cell = collectionView.dequeueReusableCell(withReuseIdentifier: String(describing: ComposeStatusPollExpiresOptionCollectionViewCell.self), for: indexPath) as! ComposeStatusPollExpiresOptionCollectionViewCell -// cell.durationButton.setTitle(L10n.Scene.Compose.Poll.durationTime(attribute.expiresOption.value.title), for: .normal) -// attribute.expiresOption -// .receive(on: DispatchQueue.main) -// .sink { [weak cell] expiresOption in -// guard let cell = cell else { return } -// cell.durationButton.setTitle(L10n.Scene.Compose.Poll.durationTime(expiresOption.title), for: .normal) -// } -// .store(in: &cell.disposeBag) -// cell.delegate = self.composeStatusPollExpiresOptionCollectionViewCellDelegate -// return cell -// } -// } -// -// collectionView.dragDelegate = self -// collectionView.dropDelegate = self -// } -// -//} -// -//// MARK: - UICollectionViewDragDelegate -//extension ComposeStatusPollTableViewCell: UICollectionViewDragDelegate { -// -// func collectionView(_ collectionView: UICollectionView, itemsForBeginning session: UIDragSession, at indexPath: IndexPath) -> [UIDragItem] { -// guard let item = dataSource.itemIdentifier(for: indexPath) else { return [] } -// switch item { -// case .pollOption: -// let itemProvider = NSItemProvider(object: String(item.hashValue) as NSString) -// let dragItem = UIDragItem(itemProvider: itemProvider) -// dragItem.localObject = item -// return [dragItem] -// default: -// return [] -// } -// } -// -// func collectionView(_ collectionView: UICollectionView, dragSessionIsRestrictedToDraggingApplication session: UIDragSession) -> Bool { -// // drag to app should be the same app -// return true -// } -//} -// -//// MARK: - UICollectionViewDropDelegate -//extension ComposeStatusPollTableViewCell: UICollectionViewDropDelegate { -// // didUpdate -// func collectionView(_ collectionView: UICollectionView, dropSessionDidUpdate session: UIDropSession, withDestinationIndexPath destinationIndexPath: IndexPath?) -> UICollectionViewDropProposal { -// guard collectionView.hasActiveDrag, -// let destinationIndexPath = destinationIndexPath, -// let item = dataSource.itemIdentifier(for: destinationIndexPath) -// else { -// return UICollectionViewDropProposal(operation: .forbidden) -// } -// -// switch item { -// case .pollOption: -// return UICollectionViewDropProposal(operation: .move, intent: .insertAtDestinationIndexPath) -// default: -// return UICollectionViewDropProposal(operation: .cancel) -// } -// } -// -// // performDrop -// func collectionView(_ collectionView: UICollectionView, performDropWith coordinator: UICollectionViewDropCoordinator) { -// guard let dropItem = coordinator.items.first, -// let item = dropItem.dragItem.localObject as? ComposeStatusPollItem, -// case .pollOption = item -// else { return } -// -// guard coordinator.proposal.operation == .move else { return } -// guard let destinationIndexPath = coordinator.destinationIndexPath, -// let _ = collectionView.cellForItem(at: destinationIndexPath) as? ComposeStatusPollOptionCollectionViewCell -// else { return } -// -// var snapshot = dataSource.snapshot() -// guard destinationIndexPath.row < snapshot.itemIdentifiers.count else { return } -// let anchorItem = snapshot.itemIdentifiers[destinationIndexPath.row] -// snapshot.moveItem(item, afterItem: anchorItem) -// dataSource.apply(snapshot) -// -// coordinator.drop(dropItem.dragItem, toItemAt: destinationIndexPath) -// } -//} -// -//extension ComposeStatusPollTableViewCell: UICollectionViewDelegate { -// func collectionView(_ collectionView: UICollectionView, targetIndexPathForMoveFromItemAt originalIndexPath: IndexPath, toProposedIndexPath proposedIndexPath: IndexPath) -> IndexPath { -// logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): \(originalIndexPath.debugDescription) -> \(proposedIndexPath.debugDescription)") -// -// guard let _ = collectionView.cellForItem(at: proposedIndexPath) as? ComposeStatusPollOptionCollectionViewCell else { -// return originalIndexPath -// } -// -// return proposedIndexPath -// } -//} diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/View/ComposeContentToolbarView+ViewModel.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Toolbar/ComposeContentToolbarView+ViewModel.swift similarity index 97% rename from MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/View/ComposeContentToolbarView+ViewModel.swift rename to MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Toolbar/ComposeContentToolbarView+ViewModel.swift index fefc0821f..6374203fa 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/View/ComposeContentToolbarView+ViewModel.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Toolbar/ComposeContentToolbarView+ViewModel.swift @@ -27,6 +27,9 @@ extension ComposeContentToolbarView { @Published var isEmojiActive = false @Published var isContentWarningActive = false + @Published var isAttachmentButtonEnabled = false + @Published var isPollButtonEnabled = false + @Published public var maxTextInputLimit = 500 @Published public var contentWeightedLength = 0 @Published public var contentWarningWeightedLength = 0 diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/View/ComposeContentToolbarView.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Toolbar/ComposeContentToolbarView.swift similarity index 88% rename from MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/View/ComposeContentToolbarView.swift rename to MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Toolbar/ComposeContentToolbarView.swift index b7f01e64a..683164bdd 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/View/ComposeContentToolbarView.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Toolbar/ComposeContentToolbarView.swift @@ -44,7 +44,9 @@ struct ComposeContentToolbarView: View { } } label: { label(for: action) + .opacity(viewModel.isAttachmentButtonEnabled ? 1.0 : 0.5) } + .disabled(!viewModel.isAttachmentButtonEnabled) .frame(width: 48, height: 48) case .visibility: Menu { @@ -64,6 +66,16 @@ struct ComposeContentToolbarView: View { .accessibilityLabel(L10n.Scene.Compose.Keyboard.selectVisibilityEntry(viewModel.visibility.title)) } .frame(width: 48, height: 48) + case .poll: + Button { + logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): \(String(describing: action))") + viewModel.delegate?.composeContentToolbarView(viewModel, toolbarItemDidPressed: action) + } label: { + label(for: action) + .opacity(viewModel.isPollButtonEnabled ? 1.0 : 0.5) + } + .disabled(!viewModel.isPollButtonEnabled) + .frame(width: 48, height: 48) default: Button { logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): \(String(describing: action))") diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/View/ComposeContentView.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/View/ComposeContentView.swift index 98b55018f..10ca4e71f 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/View/ComposeContentView.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/View/ComposeContentView.swift @@ -11,15 +11,18 @@ import MastodonAsset import MastodonCore import MastodonLocalization import Stripes +import Kingfisher public struct ComposeContentView: View { static let logger = Logger(subsystem: "ComposeContentView", category: "View") var logger: Logger { ComposeContentView.logger } + static let contentViewCoordinateSpace = "ComposeContentView.Content" static var margin: CGFloat = 16 @ObservedObject var viewModel: ComposeContentViewModel + public var body: some View { VStack(spacing: .zero) { @@ -105,9 +108,25 @@ public struct ComposeContentView: View { .frame(minHeight: 100) .fixedSize(horizontal: false, vertical: true) .padding(.horizontal, ComposeContentView.margin) + .background( + GeometryReader { proxy in + Color.clear.preference(key: ViewFramePreferenceKey.self, value: proxy.frame(in: .named(ComposeContentView.contentViewCoordinateSpace))) + } + .onPreferenceChange(ViewFramePreferenceKey.self) { frame in + logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): content textView frame: \(frame.debugDescription)") + let rect = frame.standardized + viewModel.contentTextViewFrame = CGRect( + origin: frame.origin, + size: CGSize(width: floor(rect.width), height: floor(rect.height)) + ) + } + ) // poll pollView .padding(.horizontal, ComposeContentView.margin) + // media + mediaView + .padding(.horizontal, ComposeContentView.margin) } .background( GeometryReader { proxy in @@ -124,6 +143,7 @@ public struct ComposeContentView: View { ) Spacer() } // end VStack + .coordinateSpace(name: ComposeContentView.contentViewCoordinateSpace) } // end body } @@ -167,7 +187,7 @@ extension ComposeContentView { index: _index, deleteBackwardResponseTextFieldRelayDelegate: viewModel ) { textField in - // viewModel.customEmojiPickerInputViewModel.configure(textInput: textField) + viewModel.customEmojiPickerInputViewModel.configure(textInput: textField) } } if viewModel.maxPollOptionLimit != viewModel.pollOptions.count { @@ -196,6 +216,24 @@ extension ComposeContentView { } } // end VStack } + + // MARK: - media + var mediaView: some View { + VStack(spacing: 16) { + ForEach(viewModel.attachmentViewModels, id: \.self) { attachmentViewModel in + AttachmentView(viewModel: attachmentViewModel) + .clipShape(Rectangle()) + .badgeView( + Button { + viewModel.attachmentViewModels.removeAll(where: { $0 === attachmentViewModel }) + } label: { + Image(systemName: "minus.circle.fill") + .foregroundColor(.red) + } + ) + } // end ForEach + } // end VStack + } } //private struct ScrollOffsetPreferenceKey: PreferenceKey { diff --git a/MastodonSDK/Sources/MastodonUI/Vendor/CircleProgressView.swift b/MastodonSDK/Sources/MastodonUI/Vendor/CircleProgressView.swift new file mode 100644 index 000000000..f9b09e740 --- /dev/null +++ b/MastodonSDK/Sources/MastodonUI/Vendor/CircleProgressView.swift @@ -0,0 +1,29 @@ +// +// CircleProgressView.swift +// +// +// Created by MainasuK on 2022/11/10. +// + +import Foundation +import SwiftUI + +/// https://stackoverflow.com/a/71467536/3797903 +struct CircleProgressView: View { + + let progress: Double + + var body: some View { + let lineWidth: CGFloat = 4 + let tintColor = Color.white + ZStack { + Circle() + .trim(from: 0.0, to: CGFloat(progress)) + .stroke(style: StrokeStyle(lineWidth: lineWidth, lineCap: .butt, lineJoin: .bevel)) + .foregroundColor(tintColor) + .rotationEffect(Angle(degrees: 270.0)) + } + .padding(ceil(lineWidth / 2)) + } + +} diff --git a/MastodonSDK/Sources/MastodonUI/Vendor/MetaTextView+PasteExtensions.swift b/MastodonSDK/Sources/MastodonUI/Vendor/MetaTextView+PasteExtensions.swift new file mode 100644 index 000000000..8fe1949af --- /dev/null +++ b/MastodonSDK/Sources/MastodonUI/Vendor/MetaTextView+PasteExtensions.swift @@ -0,0 +1,29 @@ +// +// MetaTextView+PasteExtensions.swift +// Mastodon +// +// Created by Rick Kerkhof on 30/10/2022. +// + +import Foundation +import MetaTextKit +import UIKit + +extension MetaTextView { + public override func paste(_ sender: Any?) { + super.paste(sender) + + var nextResponder = self.next; + + // Force the event to bubble through ALL responders + // This is a workaround as somewhere down the chain the paste event gets eaten + while (nextResponder != nil) { + if let nextResponder = nextResponder { + if (nextResponder.responds(to: #selector(UIResponderStandardEditActions.paste(_:)))) { + nextResponder.perform(#selector(UIResponderStandardEditActions.paste(_:)), with: sender) + } + } + nextResponder = nextResponder?.next; + } + } +} diff --git a/MastodonSDK/Sources/MastodonUI/Vendor/VisualEffectView.swift b/MastodonSDK/Sources/MastodonUI/Vendor/VisualEffectView.swift new file mode 100644 index 000000000..fe89b0457 --- /dev/null +++ b/MastodonSDK/Sources/MastodonUI/Vendor/VisualEffectView.swift @@ -0,0 +1,15 @@ +// +// VisualEffectView.swift +// +// +// Created by MainasuK on 2022/11/8. +// + +import SwiftUI + +// ref: https://stackoverflow.com/a/59111492/3797903 +public struct VisualEffectView: UIViewRepresentable { + public var effect: UIVisualEffect? + public func makeUIView(context: UIViewRepresentableContext) -> UIVisualEffectView { UIVisualEffectView() } + public func updateUIView(_ uiView: UIVisualEffectView, context: UIViewRepresentableContext) { uiView.effect = effect } +} diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift b/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift index d0b5daa6f..416226cbb 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/StatusView+ViewModel.swift @@ -315,7 +315,6 @@ extension StatusView.ViewModel { statusView.contentMetaText.configure( content: content ) - statusView.contentMetaText.textView.accessibilityLabel = content.string statusView.contentMetaText.textView.accessibilityTraits = [.staticText] statusView.contentMetaText.textView.accessibilityElementsHidden = false } else { @@ -727,8 +726,23 @@ extension StatusView.ViewModel { statusView.accessibilityLabel = accessibilityLabel } .store(in: &disposeBag) + + Publishers.CombineLatest( + $content, + $isContentReveal.removeDuplicates() + ) + .map { content, isRevealed in + guard isRevealed, let entities = content?.entities else { return [] } + return entities.compactMap { entity in + guard let name = entity.accessibilityCustomActionLabel else { return nil } + return UIAccessibilityCustomAction(name: name) { action in + statusView.delegate?.statusView(statusView, metaText: statusView.contentMetaText, didSelectMeta: entity.meta) + return true + } + } + } + .assign(to: \.accessibilityCustomActions, on: statusView.contentMetaText.textView) + .store(in: &disposeBag) } } - - diff --git a/MastodonSDK/Sources/MastodonUI/View/Content/StatusView.swift b/MastodonSDK/Sources/MastodonUI/View/Content/StatusView.swift index 8ab34ce4f..563bc7e3d 100644 --- a/MastodonSDK/Sources/MastodonUI/View/Content/StatusView.swift +++ b/MastodonSDK/Sources/MastodonUI/View/Content/StatusView.swift @@ -547,6 +547,13 @@ extension StatusView { } +extension StatusView { + public override var accessibilityCustomActions: [UIAccessibilityCustomAction]? { + get { contentMetaText.textView.accessibilityCustomActions } + set { } + } +} + // MARK: - AdaptiveContainerView extension StatusView: AdaptiveContainerView { public func updateContainerViewComponentsLayoutMarginsRelativeArrangementBehavior(isEnabled: Bool) { diff --git a/Podfile b/Podfile index 28757d528..596aec62b 100644 --- a/Podfile +++ b/Podfile @@ -8,7 +8,6 @@ target 'Mastodon' do # Pods for Mastodon # UI - pod 'UITextField+Shake', '~> 1.2' pod 'XLPagerTabStrip', '~> 9.0.0' # misc diff --git a/Podfile.lock b/Podfile.lock index 12680db21..3b9928a0b 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -6,7 +6,6 @@ PODS: - Sourcery/CLI-Only (= 1.6.1) - Sourcery/CLI-Only (1.6.1) - SwiftGen (6.4.0) - - "UITextField+Shake (1.2.1)" - XLPagerTabStrip (9.0.0) DEPENDENCIES: @@ -15,7 +14,6 @@ DEPENDENCIES: - Kanna (~> 5.2.2) - Sourcery (~> 1.6.1) - SwiftGen (~> 6.4.0) - - "UITextField+Shake (~> 1.2)" - XLPagerTabStrip (~> 9.0.0) SPEC REPOS: @@ -25,7 +23,6 @@ SPEC REPOS: - Kanna - Sourcery - SwiftGen - - "UITextField+Shake" - XLPagerTabStrip SPEC CHECKSUMS: @@ -34,9 +31,8 @@ SPEC CHECKSUMS: Kanna: 01cfbddc127f5ff0963692f285fcbc8a9d62d234 Sourcery: f3759f803bd0739f74fc92a4341eed0473ce61ac SwiftGen: 67860cc7c3cfc2ed25b9b74cfd55495fc89f9108 - "UITextField+Shake": 298ac5a0f239d731bdab999b19b628c956ca0ac3 XLPagerTabStrip: 61c57fd61f611ee5f01ff1495ad6fbee8bf496c5 -PODFILE CHECKSUM: 8b15fb6d4e801b7a7e7761a2e2fe40a89b1da4ff +PODFILE CHECKSUM: 8fddf46611e09d2eb1a5d67c464c236884a08e80 COCOAPODS: 1.11.3 diff --git a/README.md b/README.md index bf35b4599..d2a19e715 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Mastodon + [![CI](https://github.com/mastodon/mastodon-ios/actions/workflows/main.yml/badge.svg)](https://github.com/mastodon/mastodon-ios/actions/workflows/main.yml) [![Crowdin](https://badges.crowdin.net/mastodon-for-ios/localized.svg)](https://crowdin.com/project/mastodon-for-ios) @@ -11,12 +12,14 @@ This is the repository for the official iOS App for Mastodon. You can install it Read this blog post for this app to learn more. > [Developing an official iOS app for Mastodon](https://blog.joinmastodon.org/2021/02/developing-an-official-ios-app-for-mastodon/) -## Getting Start +## Getting Started + - Read the setup guide [here](./Documentation/Setup.md) - About [contributing](./Documentation/CONTRIBUTING.md) - [Documentation folder](./Documentation/) ## Acknowledgments + Thanks to these open-sources projects listed [here](./Documentation/Acknowledgments.md). ## License diff --git a/ShareActionExtension/Scene/ComposeViewController.swift b/ShareActionExtension/Scene/ComposeViewController.swift deleted file mode 100644 index c93c05147..000000000 --- a/ShareActionExtension/Scene/ComposeViewController.swift +++ /dev/null @@ -1,327 +0,0 @@ -// -// ComposeViewController.swift -// MastodonShareAction -// -// Created by MainasuK Cirno on 2021-7-16. -// - -import os.log -import UIKit -import Combine -import MastodonUI -import SwiftUI -import MastodonAsset -import MastodonLocalization -import MastodonCore -import MastodonUI - -class ComposeViewController: UIViewController { - - let logger = Logger(subsystem: "ComposeViewController", category: "ViewController") - - let context = AppContext() - - var disposeBag = Set() - private(set) lazy var viewModel = ComposeViewModel(context: context) - - let publishButton: UIButton = { - let button = RoundedEdgesButton(type: .custom) - button.setTitle(L10n.Scene.Compose.composeAction, for: .normal) - button.titleLabel?.font = .systemFont(ofSize: 14, weight: .bold) - button.setBackgroundImage(.placeholder(color: Asset.Colors.brand.color), for: .normal) - button.setBackgroundImage(.placeholder(color: Asset.Colors.brand.color.withAlphaComponent(0.5)), for: .highlighted) - button.setBackgroundImage(.placeholder(color: Asset.Colors.Button.disabled.color), for: .disabled) - button.setTitleColor(.white, for: .normal) - button.contentEdgeInsets = UIEdgeInsets(top: 6, left: 16, bottom: 5, right: 16) // set 28pt height - button.adjustsImageWhenHighlighted = false - return button - }() - - private(set) lazy var cancelBarButtonItem = UIBarButtonItem(title: L10n.Common.Controls.Actions.cancel, style: .plain, target: self, action: #selector(ComposeViewController.cancelBarButtonItemPressed(_:))) - private(set) lazy var publishBarButtonItem: UIBarButtonItem = { - let barButtonItem = UIBarButtonItem(customView: publishButton) - publishButton.addTarget(self, action: #selector(ComposeViewController.publishBarButtonItemPressed(_:)), for: .touchUpInside) - return barButtonItem - }() - - let activityIndicatorBarButtonItem: UIBarButtonItem = { - let indicatorView = UIActivityIndicatorView(style: .medium) - let barButtonItem = UIBarButtonItem(customView: indicatorView) - indicatorView.startAnimating() - return barButtonItem - }() - - -// let viewSafeAreaDidChange = PassthroughSubject() -// let composeToolbarView = ComposeToolbarView() -// var composeToolbarViewBottomLayoutConstraint: NSLayoutConstraint! -// let composeToolbarBackgroundView = UIView() -} - -extension ComposeViewController { - - override func viewDidLoad() { - super.viewDidLoad() - -// navigationController?.presentationController?.delegate = self -// -// setupBackgroundColor(theme: ThemeService.shared.currentTheme.value) -// ThemeService.shared.currentTheme -// .receive(on: DispatchQueue.main) -// .sink { [weak self] theme in -// guard let self = self else { return } -// self.setupBackgroundColor(theme: theme) -// } -// .store(in: &disposeBag) -// -// navigationItem.leftBarButtonItem = cancelBarButtonItem -// viewModel.isBusy -// .receive(on: DispatchQueue.main) -// .sink { [weak self] isBusy in -// guard let self = self else { return } -// self.navigationItem.rightBarButtonItem = isBusy ? self.activityIndicatorBarButtonItem : self.publishBarButtonItem -// } -// .store(in: &disposeBag) -// -// let hostingViewController = UIHostingController( -// rootView: ComposeView().environmentObject(viewModel.composeViewModel) -// ) -// addChild(hostingViewController) -// view.addSubview(hostingViewController.view) -// hostingViewController.view.translatesAutoresizingMaskIntoConstraints = false -// view.addSubview(hostingViewController.view) -// NSLayoutConstraint.activate([ -// hostingViewController.view.topAnchor.constraint(equalTo: view.topAnchor), -// hostingViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor), -// hostingViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor), -// hostingViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor), -// ]) -// hostingViewController.didMove(toParent: self) -// -// composeToolbarView.translatesAutoresizingMaskIntoConstraints = false -// view.addSubview(composeToolbarView) -// composeToolbarViewBottomLayoutConstraint = view.bottomAnchor.constraint(equalTo: composeToolbarView.bottomAnchor) -// NSLayoutConstraint.activate([ -// composeToolbarView.leadingAnchor.constraint(equalTo: view.leadingAnchor), -// composeToolbarView.trailingAnchor.constraint(equalTo: view.trailingAnchor), -// composeToolbarViewBottomLayoutConstraint, -// composeToolbarView.heightAnchor.constraint(equalToConstant: ComposeToolbarView.toolbarHeight), -// ]) -// composeToolbarView.preservesSuperviewLayoutMargins = true -// composeToolbarView.delegate = self -// -// composeToolbarBackgroundView.translatesAutoresizingMaskIntoConstraints = false -// view.insertSubview(composeToolbarBackgroundView, belowSubview: composeToolbarView) -// NSLayoutConstraint.activate([ -// composeToolbarBackgroundView.topAnchor.constraint(equalTo: composeToolbarView.topAnchor), -// composeToolbarBackgroundView.leadingAnchor.constraint(equalTo: composeToolbarView.leadingAnchor), -// composeToolbarBackgroundView.trailingAnchor.constraint(equalTo: composeToolbarView.trailingAnchor), -// view.bottomAnchor.constraint(equalTo: composeToolbarBackgroundView.bottomAnchor), -// ]) -// -// // FIXME: using iOS 15 toolbar for .keyboard placement -// let keyboardEventPublishers = Publishers.CombineLatest3( -// KeyboardResponderService.shared.isShow, -// KeyboardResponderService.shared.state, -// KeyboardResponderService.shared.endFrame -// ) -// -// Publishers.CombineLatest( -// keyboardEventPublishers, -// viewSafeAreaDidChange -// ) -// .sink(receiveValue: { [weak self] keyboardEvents, _ in -// guard let self = self else { return } -// -// let (isShow, state, endFrame) = keyboardEvents -// guard isShow, state == .dock else { -// UIView.animate(withDuration: 0.3) { -// self.composeToolbarViewBottomLayoutConstraint.constant = self.view.safeAreaInsets.bottom -// self.view.layoutIfNeeded() -// } -// return -// } -// // isShow AND dock state -// -// UIView.animate(withDuration: 0.3) { -// self.composeToolbarViewBottomLayoutConstraint.constant = endFrame.height -// self.view.layoutIfNeeded() -// } -// }) -// .store(in: &disposeBag) -// -// // bind visibility toolbar UI -// Publishers.CombineLatest( -// viewModel.selectedStatusVisibility, -// viewModel.traitCollectionDidChangePublisher -// ) -// .receive(on: DispatchQueue.main) -// .sink { [weak self] type, _ in -// guard let self = self else { return } -// let image = type.image(interfaceStyle: self.traitCollection.userInterfaceStyle) -// self.composeToolbarView.visibilityButton.setImage(image, for: .normal) -// self.composeToolbarView.activeVisibilityType.value = type -// } -// .store(in: &disposeBag) -// -// // bind counter -// viewModel.characterCount -// .receive(on: DispatchQueue.main) -// .sink { [weak self] characterCount in -// guard let self = self else { return } -// let count = ShareViewModel.composeContentLimit - characterCount -// self.composeToolbarView.characterCountLabel.text = "\(count)" -// switch count { -// case _ where count < 0: -// self.composeToolbarView.characterCountLabel.font = .monospacedDigitSystemFont(ofSize: 24, weight: .bold) -// self.composeToolbarView.characterCountLabel.textColor = Asset.Colors.danger.color -// self.composeToolbarView.characterCountLabel.accessibilityLabel = L10n.A11y.Plural.Count.inputLimitExceeds(abs(count)) -// default: -// self.composeToolbarView.characterCountLabel.font = .monospacedDigitSystemFont(ofSize: 15, weight: .regular) -// self.composeToolbarView.characterCountLabel.textColor = Asset.Colors.Label.secondary.color -// self.composeToolbarView.characterCountLabel.accessibilityLabel = L10n.A11y.Plural.Count.inputLimitRemains(count) -// } -// } -// .store(in: &disposeBag) -// -// // bind valid -// viewModel.isValid -// .receive(on: DispatchQueue.main) -// .assign(to: \.isEnabled, on: publishButton) -// .store(in: &disposeBag) - } - - override func viewDidAppear(_ animated: Bool) { - super.viewDidAppear(animated) - -// viewModel.viewDidAppear.value = true -// viewModel.inputItems.value = extensionContext?.inputItems.compactMap { $0 as? NSExtensionItem } ?? [] -// -// viewModel.composeViewModel.viewDidAppear = true - } - - override func viewSafeAreaInsetsDidChange() { - super.viewSafeAreaInsetsDidChange() - -// viewSafeAreaDidChange.send() - } - - override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { - super.traitCollectionDidChange(previousTraitCollection) - -// viewModel.traitCollectionDidChangePublisher.send() - } - -} - -//extension ComposeViewController { -// private func setupBackgroundColor(theme: Theme) { -// view.backgroundColor = theme.systemElevatedBackgroundColor -// viewModel.composeViewModel.backgroundColor = theme.systemElevatedBackgroundColor -// composeToolbarBackgroundView.backgroundColor = theme.composeToolbarBackgroundColor -// -// let barAppearance = UINavigationBarAppearance() -// barAppearance.configureWithDefaultBackground() -// barAppearance.backgroundColor = theme.navigationBarBackgroundColor -// navigationItem.standardAppearance = barAppearance -// navigationItem.compactAppearance = barAppearance -// navigationItem.scrollEdgeAppearance = barAppearance -// } -// -// private func showDismissConfirmAlertController() { -// let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) // can not use alert in extension -// let discardAction = UIAlertAction(title: L10n.Common.Controls.Actions.discard, style: .destructive) { _ in -// self.extensionContext?.cancelRequest(withError: ShareViewModel.ShareError.userCancelShare) -// } -// alertController.addAction(discardAction) -// let okAction = UIAlertAction(title: L10n.Common.Controls.Actions.ok, style: .cancel, handler: nil) -// alertController.addAction(okAction) -// self.present(alertController, animated: true, completion: nil) -// } -//} -// -extension ComposeViewController { - @objc private func cancelBarButtonItemPressed(_ sender: UIBarButtonItem) { - logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public)") - -// showDismissConfirmAlertController() - } - - @objc private func publishBarButtonItemPressed(_ sender: UIBarButtonItem) { - logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public)") - -// viewModel.isPublishing.value = true -// -// viewModel.publish() -// .delay(for: 2, scheduler: DispatchQueue.main) -// .receive(on: DispatchQueue.main) -// .sink { [weak self] completion in -// guard let self = self else { return } -// self.viewModel.isPublishing.value = false -// -// switch completion { -// case .failure: -// let alertController = UIAlertController( -// title: L10n.Common.Alerts.PublishPostFailure.title, -// message: L10n.Common.Alerts.PublishPostFailure.message, -// preferredStyle: .actionSheet // can not use alert in extension -// ) -// let okAction = UIAlertAction( -// title: L10n.Common.Controls.Actions.ok, -// style: .cancel, -// handler: nil -// ) -// alertController.addAction(okAction) -// self.present(alertController, animated: true, completion: nil) -// case .finished: -// self.publishButton.setTitle(L10n.Common.Controls.Actions.done, for: .normal) -// self.publishButton.isUserInteractionEnabled = false -// DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in -// guard let self = self else { return } -// self.extensionContext?.completeRequest(returningItems: nil, completionHandler: nil) -// } -// } -// } receiveValue: { response in -// // do nothing -// } -// .store(in: &disposeBag) - } -} - -//// MARK - ComposeToolbarViewDelegate -//extension ComposeViewController: ComposeToolbarViewDelegate { -// -// func composeToolbarView(_ composeToolbarView: ComposeToolbarView, contentWarningButtonDidPressed sender: UIButton) { -// logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public)") -// -// withAnimation { -// viewModel.composeViewModel.isContentWarningComposing.toggle() -// } -// } -// -// func composeToolbarView(_ composeToolbarView: ComposeToolbarView, visibilityButtonDidPressed sender: UIButton, visibilitySelectionType type: ComposeToolbarView.VisibilitySelectionType) { -// logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public)") -// -// viewModel.selectedStatusVisibility.value = type -// } -// -//} -// -//// MARK: - UIAdaptivePresentationControllerDelegate -//extension ComposeViewController: UIAdaptivePresentationControllerDelegate { -// -// func presentationControllerShouldDismiss(_ presentationController: UIPresentationController) -> Bool { -// return viewModel.shouldDismiss.value -// } -// -// func presentationControllerDidAttemptToDismiss(_ presentationController: UIPresentationController) { -// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) -// showDismissConfirmAlertController() -// -// } -// -// func presentationControllerDidDismiss(_ presentationController: UIPresentationController) { -// os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) -// } -// -//} diff --git a/ShareActionExtension/Scene/ComposeViewModel.swift b/ShareActionExtension/Scene/ComposeViewModel.swift deleted file mode 100644 index 4470cfbe8..000000000 --- a/ShareActionExtension/Scene/ComposeViewModel.swift +++ /dev/null @@ -1,417 +0,0 @@ -// -// ComposeViewModel.swift -// MastodonShareAction -// -// Created by MainasuK Cirno on 2021-7-16. -// - -import os.log -import Foundation -import Combine -import CoreData -import CoreDataStack -import MastodonSDK -import MastodonUI -import SwiftUI -import UniformTypeIdentifiers -import MastodonAsset -import MastodonLocalization -import MastodonUI -import MastodonCore - -final class ComposeViewModel { - - let logger = Logger(subsystem: "ComposeViewModel", category: "ViewModel") - - var disposeBag = Set() - - static let composeContentLimit: Int = 500 - - // input - let context: AppContext - -// private var coreDataStack: CoreDataStack? -// var managedObjectContext: NSManagedObjectContext? -// var api: APIService? -// -// var inputItems = CurrentValueSubject<[NSExtensionItem], Never>([]) -// let viewDidAppear = CurrentValueSubject(false) -// let traitCollectionDidChangePublisher = CurrentValueSubject(Void()) // use CurrentValueSubject to make initial event emit -// let selectedStatusVisibility = CurrentValueSubject(.public) -// -// // output -// let authentication = CurrentValueSubject?, Never>(nil) -// let isFetchAuthentication = CurrentValueSubject(true) -// let isPublishing = CurrentValueSubject(false) -// let isBusy = CurrentValueSubject(true) -// let isValid = CurrentValueSubject(false) -// let shouldDismiss = CurrentValueSubject(true) -// let composeViewModel = ComposeViewModel() -// let characterCount = CurrentValueSubject(0) - - init(context: AppContext) { - self.context = context - // end init - -// viewDidAppear.receive(on: DispatchQueue.main) -// .removeDuplicates() -// .sink { [weak self] viewDidAppear in -// guard let self = self else { return } -// guard viewDidAppear else { return } -// self.setupCoreData() -// } -// .store(in: &disposeBag) -// -// Publishers.CombineLatest( -// inputItems.removeDuplicates(), -// viewDidAppear.removeDuplicates() -// ) -// .receive(on: DispatchQueue.main) -// .sink { [weak self] inputItems, _ in -// guard let self = self else { return } -// self.parse(inputItems: inputItems) -// } -// .store(in: &disposeBag) -// -// // bind authentication loading state -// authentication -// .map { result in result == nil } -// .assign(to: \.value, on: isFetchAuthentication) -// .store(in: &disposeBag) -// -// // bind user locked state -// authentication -// .compactMap { result -> Bool? in -// guard let result = result else { return nil } -// switch result { -// case .success(let authentication): -// return authentication.user.locked -// case .failure: -// return nil -// } -// } -// .map { locked -> ComposeToolbarView.VisibilitySelectionType in -// locked ? .private : .public -// } -// .assign(to: \.value, on: selectedStatusVisibility) -// .store(in: &disposeBag) -// -// // bind author -// authentication -// .receive(on: DispatchQueue.main) -// .sink { [weak self] result in -// guard let self = self else { return } -// guard let result = result else { return } -// switch result { -// case .success(let authentication): -// self.composeViewModel.avatarImageURL = authentication.user.avatarImageURL() -// self.composeViewModel.authorName = authentication.user.displayNameWithFallback -// self.composeViewModel.authorUsername = "@" + authentication.user.username -// case .failure: -// self.composeViewModel.avatarImageURL = nil -// self.composeViewModel.authorName = " " -// self.composeViewModel.authorUsername = " " -// } -// } -// .store(in: &disposeBag) -// -// // bind authentication to compose view model -// authentication -// .map { result -> MastodonAuthentication? in -// guard let result = result else { return nil } -// switch result { -// case .success(let authentication): -// return authentication -// case .failure: -// return nil -// } -// } -// .assign(to: &composeViewModel.$authentication) -// -// // bind isBusy -// Publishers.CombineLatest( -// isFetchAuthentication, -// isPublishing -// ) -// .receive(on: DispatchQueue.main) -// .map { $0 || $1 } -// .assign(to: \.value, on: isBusy) -// .store(in: &disposeBag) -// -// // pass initial i18n string -// composeViewModel.statusPlaceholder = L10n.Scene.Compose.contentInputPlaceholder -// composeViewModel.contentWarningPlaceholder = L10n.Scene.Compose.ContentWarning.placeholder -// composeViewModel.toolbarHeight = ComposeToolbarView.toolbarHeight -// -// // bind compose bar button item UI state -// let isComposeContentEmpty = composeViewModel.$statusContent -// .map { $0.isEmpty } -// -// isComposeContentEmpty -// .assign(to: \.value, on: shouldDismiss) -// .store(in: &disposeBag) -// -// let isComposeContentValid = composeViewModel.$characterCount -// .map { characterCount -> Bool in -// return characterCount <= ShareViewModel.composeContentLimit -// } -// let isMediaEmpty = composeViewModel.$attachmentViewModels -// .map { $0.isEmpty } -// let isMediaUploadAllSuccess = composeViewModel.$attachmentViewModels -// .map { viewModels in -// viewModels.allSatisfy { $0.uploadStateMachineSubject.value is StatusAttachmentViewModel.UploadState.Finish } -// } -// -// let isPublishBarButtonItemEnabledPrecondition1 = Publishers.CombineLatest4( -// isComposeContentEmpty, -// isComposeContentValid, -// isMediaEmpty, -// isMediaUploadAllSuccess -// ) -// .map { isComposeContentEmpty, isComposeContentValid, isMediaEmpty, isMediaUploadAllSuccess -> Bool in -// if isMediaEmpty { -// return isComposeContentValid && !isComposeContentEmpty -// } else { -// return isComposeContentValid && isMediaUploadAllSuccess -// } -// } -// .eraseToAnyPublisher() -// -// let isPublishBarButtonItemEnabledPrecondition2 = Publishers.CombineLatest( -// isComposeContentEmpty, -// isComposeContentValid -// ) -// .map { isComposeContentEmpty, isComposeContentValid -> Bool in -// return isComposeContentValid && !isComposeContentEmpty -// } -// .eraseToAnyPublisher() -// -// Publishers.CombineLatest( -// isPublishBarButtonItemEnabledPrecondition1, -// isPublishBarButtonItemEnabledPrecondition2 -// ) -// .map { $0 && $1 } -// .assign(to: \.value, on: isValid) -// .store(in: &disposeBag) -// -// // bind counter -// composeViewModel.$characterCount -// .assign(to: \.value, on: characterCount) -// .store(in: &disposeBag) -// -// // setup theme -// setupBackgroundColor(theme: ThemeService.shared.currentTheme.value) -// ThemeService.shared.currentTheme -// .receive(on: DispatchQueue.main) -// .sink { [weak self] theme in -// guard let self = self else { return } -// self.setupBackgroundColor(theme: theme) -// } -// .store(in: &disposeBag) - } - - private func setupBackgroundColor(theme: Theme) { -// composeViewModel.contentWarningBackgroundColor = Color(theme.contentWarningOverlayBackgroundColor) - } - -} - -//extension ShareViewModel { -// enum ShareError: Error { -// case `internal`(error: Error) -// case userCancelShare -// case missingAuthentication -// } -//} - -extension ComposeViewModel { -// private func setupCoreData() { -// logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public)") -// DispatchQueue.global().async { -// let _coreDataStack = CoreDataStack() -// self.coreDataStack = _coreDataStack -// self.managedObjectContext = _coreDataStack.persistentContainer.viewContext -// -// _coreDataStack.didFinishLoad -// .receive(on: RunLoop.main) -// .sink { [weak self] didFinishLoad in -// guard let self = self else { return } -// guard didFinishLoad else { return } -// guard let managedObjectContext = self.managedObjectContext else { return } -// -// -// self.api = APIService(backgroundManagedObjectContext: _coreDataStack.newTaskContext()) -// -// self.logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): fetch authentication…") -// managedObjectContext.perform { -// do { -// let request = MastodonAuthentication.sortedFetchRequest -// let authentications = try managedObjectContext.fetch(request) -// let authentication = authentications.sorted(by: { $0.activedAt > $1.activedAt }).first -// guard let activeAuthentication = authentication else { -// self.authentication.value = .failure(ShareError.missingAuthentication) -// return -// } -// self.authentication.value = .success(activeAuthentication) -// self.logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): fetch authentication success \(activeAuthentication.userID)") -// } catch { -// self.authentication.value = .failure(ShareError.internal(error: error)) -// self.logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): fetch authentication fail \(error.localizedDescription)") -// assertionFailure(error.localizedDescription) -// } -// } -// } -// .store(in: &self.disposeBag) -// } -// } -} - -//extension ShareViewModel { -// func parse(inputItems: [NSExtensionItem]) { -// var itemProviders: [NSItemProvider] = [] -// -// for item in inputItems { -// itemProviders.append(contentsOf: item.attachments ?? []) -// } -// -// let _textProvider = itemProviders.first { provider in -// return provider.hasRepresentationConforming(toTypeIdentifier: UTType.plainText.identifier, fileOptions: []) -// } -// -// let _urlProvider = itemProviders.first { provider in -// return provider.hasRepresentationConforming(toTypeIdentifier: UTType.url.identifier, fileOptions: []) -// } -// -// let _movieProvider = itemProviders.first { provider in -// return provider.hasRepresentationConforming(toTypeIdentifier: UTType.movie.identifier, fileOptions: []) -// } -// -// let imageProviders = itemProviders.filter { provider in -// return provider.hasRepresentationConforming(toTypeIdentifier: UTType.image.identifier, fileOptions: []) -// } -// -// Task { @MainActor in -// async let text = ShareViewModel.loadText(textProvider: _textProvider) -// async let url = ShareViewModel.loadURL(textProvider: _urlProvider) -// -// let content = await [text, url] -// .compactMap { $0 } -// .joined(separator: " ") -// self.composeViewModel.statusContent = content -// } -// -// guard let api = self.api else { return } -// -// if let movieProvider = _movieProvider { -// composeViewModel.setupAttachmentViewModels([ -// StatusAttachmentViewModel(api: api, itemProvider: movieProvider) -// ]) -// } else if !imageProviders.isEmpty { -// let viewModels = imageProviders.map { provider in -// StatusAttachmentViewModel(api: api, itemProvider: provider) -// } -// composeViewModel.setupAttachmentViewModels(viewModels) -// } -// -// } -// -// private static func loadText(textProvider: NSItemProvider?) async -> String? { -// guard let textProvider = textProvider else { return nil } -// do { -// let item = try await textProvider.loadItem(forTypeIdentifier: UTType.plainText.identifier) -// guard let text = item as? String else { return nil } -// return text -// } catch { -// return nil -// } -// } -// -// private static func loadURL(textProvider: NSItemProvider?) async -> String? { -// guard let textProvider = textProvider else { return nil } -// do { -// let item = try await textProvider.loadItem(forTypeIdentifier: UTType.url.identifier) -// guard let url = item as? URL else { return nil } -// return url.absoluteString -// } catch { -// return nil -// } -// } -// -//} -// -//extension ShareViewModel { -// func publish() -> AnyPublisher, Error> { -// guard let authentication = composeViewModel.authentication, -// let api = self.api -// else { -// return Fail(error: APIService.APIError.implicit(.authenticationMissing)).eraseToAnyPublisher() -// } -// let authenticationBox = MastodonAuthenticationBox( -// authenticationRecord: .init(objectID: authentication.objectID), -// domain: authentication.domain, -// userID: authentication.userID, -// appAuthorization: Mastodon.API.OAuth.Authorization(accessToken: authentication.appAccessToken), -// userAuthorization: Mastodon.API.OAuth.Authorization(accessToken: authentication.userAccessToken) -// ) -// -// let domain = authentication.domain -// let attachmentViewModels = composeViewModel.attachmentViewModels -// let mediaIDs = attachmentViewModels.compactMap { viewModel in -// viewModel.attachment.value?.id -// } -// let sensitive: Bool = composeViewModel.isContentWarningComposing -// let spoilerText: String? = { -// let text = composeViewModel.contentWarningContent -// guard !text.isEmpty else { return nil } -// return text -// }() -// let visibility = selectedStatusVisibility.value.visibility -// -// let updateMediaQuerySubscriptions: [AnyPublisher, Error>] = { -// var subscriptions: [AnyPublisher, Error>] = [] -// for attachmentViewModel in attachmentViewModels { -// guard let attachmentID = attachmentViewModel.attachment.value?.id else { continue } -// let description = attachmentViewModel.descriptionContent.trimmingCharacters(in: .whitespacesAndNewlines) -// guard !description.isEmpty else { continue } -// let query = Mastodon.API.Media.UpdateMediaQuery( -// file: nil, -// thumbnail: nil, -// description: description, -// focus: nil -// ) -// let subscription = api.updateMedia( -// domain: domain, -// attachmentID: attachmentID, -// query: query, -// mastodonAuthenticationBox: authenticationBox -// ) -// subscriptions.append(subscription) -// } -// return subscriptions -// }() -// -// let status = composeViewModel.statusContent -// -// return Publishers.MergeMany(updateMediaQuerySubscriptions) -// .collect() -// .asyncMap { attachments in -// let query = Mastodon.API.Statuses.PublishStatusQuery( -// status: status, -// mediaIDs: mediaIDs.isEmpty ? nil : mediaIDs, -// pollOptions: nil, -// pollExpiresIn: nil, -// inReplyToID: nil, -// sensitive: sensitive, -// spoilerText: spoilerText, -// visibility: visibility -// ) -// return try await api.publishStatus( -// domain: domain, -// idempotencyKey: nil, // FIXME: -// query: query, -// authenticationBox: authenticationBox -// ) -// } -// .eraseToAnyPublisher() -// } -//} diff --git a/ShareActionExtension/Scene/ShareViewController.swift b/ShareActionExtension/Scene/ShareViewController.swift new file mode 100644 index 000000000..7757452cd --- /dev/null +++ b/ShareActionExtension/Scene/ShareViewController.swift @@ -0,0 +1,330 @@ +// +// ShareViewController.swift +// ShareActionExtension +// +// Created by MainasuK on 2022/11/13. +// + +import os.log +import UIKit +import Combine +import CoreDataStack +import MastodonCore +import MastodonUI +import MastodonAsset +import MastodonLocalization +import UniformTypeIdentifiers + +final class ShareViewController: UIViewController { + + let logger = Logger(subsystem: "ShareViewController", category: "ViewController") + + var disposeBag = Set() + + let context = AppContext() + private(set) lazy var viewModel = ShareViewModel(context: context) + + let publishButton: UIButton = { + let button = RoundedEdgesButton(type: .custom) + button.cornerRadius = 10 + button.contentEdgeInsets = UIEdgeInsets(top: 6, left: 16, bottom: 5, right: 16) // set 28pt height + button.titleLabel?.font = .systemFont(ofSize: 14, weight: .bold) + button.setTitle(L10n.Scene.Compose.composeAction, for: .normal) + return button + }() + private func configurePublishButtonApperance() { + publishButton.adjustsImageWhenHighlighted = false + publishButton.setBackgroundImage(.placeholder(color: Asset.Colors.Label.primary.color), for: .normal) + publishButton.setBackgroundImage(.placeholder(color: Asset.Colors.Label.primary.color.withAlphaComponent(0.5)), for: .highlighted) + publishButton.setBackgroundImage(.placeholder(color: Asset.Colors.Button.disabled.color), for: .disabled) + publishButton.setTitleColor(Asset.Colors.Label.primaryReverse.color, for: .normal) + } + + private(set) lazy var cancelBarButtonItem = UIBarButtonItem(title: L10n.Common.Controls.Actions.cancel, style: .plain, target: self, action: #selector(ShareViewController.cancelBarButtonItemPressed(_:))) + private(set) lazy var publishBarButtonItem: UIBarButtonItem = { + let barButtonItem = UIBarButtonItem(customView: publishButton) + publishButton.addTarget(self, action: #selector(ShareViewController.publishBarButtonItemPressed(_:)), for: .touchUpInside) + return barButtonItem + }() + let activityIndicatorBarButtonItem: UIBarButtonItem = { + let indicatorView = UIActivityIndicatorView(style: .medium) + let barButtonItem = UIBarButtonItem(customView: indicatorView) + indicatorView.startAnimating() + return barButtonItem + }() + + private var composeContentViewModel: ComposeContentViewModel? + private var composeContentViewController: ComposeContentViewController? + + let notSignInLabel: UILabel = { + let label = UILabel() + label.font = .preferredFont(forTextStyle: .subheadline) + label.textColor = .secondaryLabel + label.text = "No Available Account" // TODO: i18n + return label + }() + +} + +extension ShareViewController { + override func viewDidLoad() { + super.viewDidLoad() + + setupTheme(theme: ThemeService.shared.currentTheme.value) + ThemeService.shared.apply(theme: ThemeService.shared.currentTheme.value) + ThemeService.shared.currentTheme + .receive(on: DispatchQueue.main) + .sink { [weak self] theme in + guard let self = self else { return } + self.setupTheme(theme: theme) + } + .store(in: &disposeBag) + + view.backgroundColor = .systemBackground + title = L10n.Scene.Compose.Title.newPost + + navigationItem.leftBarButtonItem = cancelBarButtonItem + navigationItem.rightBarButtonItem = publishBarButtonItem + + do { + guard let authContext = try setupAuthContext() else { + setupHintLabel() + return + } + viewModel.authContext = authContext + let composeContentViewModel = ComposeContentViewModel( + context: context, + authContext: authContext, + kind: .post + ) + let composeContentViewController = ComposeContentViewController() + composeContentViewController.viewModel = composeContentViewModel + addChild(composeContentViewController) + composeContentViewController.view.translatesAutoresizingMaskIntoConstraints = false + view.addSubview(composeContentViewController.view) + NSLayoutConstraint.activate([ + composeContentViewController.view.topAnchor.constraint(equalTo: view.topAnchor), + composeContentViewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor), + composeContentViewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor), + composeContentViewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor), + ]) + composeContentViewController.didMove(toParent: self) + + self.composeContentViewModel = composeContentViewModel + self.composeContentViewController = composeContentViewController + + Task { @MainActor in + let inputItems = self.extensionContext?.inputItems.compactMap { $0 as? NSExtensionItem } ?? [] + await load(inputItems: inputItems) + } // end Task + } catch { + logger.log(level: .debug, "\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): error: \(error.localizedDescription)") + } + + viewModel.$isPublishing + .receive(on: DispatchQueue.main) + .sink { [weak self] isBusy in + guard let self = self else { return } + self.navigationItem.rightBarButtonItem = isBusy ? self.activityIndicatorBarButtonItem : self.publishBarButtonItem + } + .store(in: &disposeBag) + } + + override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + + configurePublishButtonApperance() + } +} + +extension ShareViewController { + @objc private func cancelBarButtonItemPressed(_ sender: UIBarButtonItem) { + logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public)") + + extensionContext?.cancelRequest(withError: NSError(domain: "org.joinmastodon.app.ShareActionExtension", code: -1)) + } + + @objc private func publishBarButtonItemPressed(_ sender: UIBarButtonItem) { + logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public)") + + + Task { @MainActor in + viewModel.isPublishing = true + do { + guard let statusPublisher = try composeContentViewModel?.statusPublisher(), + let authContext = viewModel.authContext + else { + throw AppError.badRequest + } + + _ = try await statusPublisher.publish(api: context.apiService, authContext: authContext) + + self.publishButton.setTitle(L10n.Common.Controls.Actions.done, for: .normal) + try await Task.sleep(nanoseconds: 1 * .second) + + self.extensionContext?.completeRequest(returningItems: nil, completionHandler: nil) + + } catch { + let alertController = UIAlertController.standardAlert(of: error) + present(alertController, animated: true) + return + } + viewModel.isPublishing = false + + } + } +} + +extension ShareViewController { + private func setupAuthContext() throws -> AuthContext? { + let request = MastodonAuthentication.activeSortedFetchRequest // use active order + let _authentication = try context.managedObjectContext.fetch(request).first + let _authContext = _authentication.flatMap { AuthContext(authentication: $0) } + return _authContext + } + + private func setupHintLabel() { + notSignInLabel.translatesAutoresizingMaskIntoConstraints = false + view.addSubview(notSignInLabel) + NSLayoutConstraint.activate([ + notSignInLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor), + notSignInLabel.centerYAnchor.constraint(equalTo: view.centerYAnchor), + ]) + } + + private func setupTheme(theme: Theme) { + view.backgroundColor = theme.systemElevatedBackgroundColor + + let barAppearance = UINavigationBarAppearance() + barAppearance.configureWithDefaultBackground() + barAppearance.backgroundColor = theme.navigationBarBackgroundColor + navigationItem.standardAppearance = barAppearance + navigationItem.compactAppearance = barAppearance + navigationItem.scrollEdgeAppearance = barAppearance + } + + private func showDismissConfirmAlertController() { + let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) // can not use alert in extension + let discardAction = UIAlertAction(title: L10n.Common.Controls.Actions.discard, style: .destructive) { _ in + self.extensionContext?.cancelRequest(withError: ShareError.userCancelShare) + } + alertController.addAction(discardAction) + let okAction = UIAlertAction(title: L10n.Common.Controls.Actions.ok, style: .cancel, handler: nil) + alertController.addAction(okAction) + self.present(alertController, animated: true, completion: nil) + } +} + +// MARK: - UIAdaptivePresentationControllerDelegate +extension ShareViewController: UIAdaptivePresentationControllerDelegate { + + func presentationControllerShouldDismiss(_ presentationController: UIPresentationController) -> Bool { + return composeContentViewModel?.shouldDismiss ?? true + } + + func presentationControllerDidAttemptToDismiss(_ presentationController: UIPresentationController) { + os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) + showDismissConfirmAlertController() + } + + func presentationControllerDidDismiss(_ presentationController: UIPresentationController) { + os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) + } + +} + +extension ShareViewController { + + private func load(inputItems: [NSExtensionItem]) async { + guard let composeContentViewModel = self.composeContentViewModel, + let authContext = viewModel.authContext + else { + assertionFailure() + return + } + var itemProviders: [NSItemProvider] = [] + + for item in inputItems { + itemProviders.append(contentsOf: item.attachments ?? []) + } + + let _textProvider = itemProviders.first { provider in + return provider.hasRepresentationConforming(toTypeIdentifier: UTType.plainText.identifier, fileOptions: []) + } + + let _urlProvider = itemProviders.first { provider in + return provider.hasRepresentationConforming(toTypeIdentifier: UTType.url.identifier, fileOptions: []) + } + + let _movieProvider = itemProviders.first { provider in + return provider.hasRepresentationConforming(toTypeIdentifier: UTType.movie.identifier, fileOptions: []) + } + + let imageProviders = itemProviders.filter { provider in + return provider.hasRepresentationConforming(toTypeIdentifier: UTType.image.identifier, fileOptions: []) + } + + async let text = ShareViewController.loadText(textProvider: _textProvider) + async let url = ShareViewController.loadURL(textProvider: _urlProvider) + + let content = await [text, url] + .compactMap { $0 } + .joined(separator: " ") + // passby the viewModel `content` value + if !content.isEmpty { + composeContentViewModel.content = content + " " + composeContentViewModel.contentMetaText?.textView.insertText(content + " ") + } + + if let movieProvider = _movieProvider { + let attachmentViewModel = AttachmentViewModel( + api: context.apiService, + authContext: authContext, + input: .itemProvider(movieProvider), + delegate: composeContentViewModel + ) + composeContentViewModel.attachmentViewModels.append(attachmentViewModel) + } else if !imageProviders.isEmpty { + let attachmentViewModels = imageProviders.map { provider in + AttachmentViewModel( + api: context.apiService, + authContext: authContext, + input: .itemProvider(provider), + delegate: composeContentViewModel + ) + } + composeContentViewModel.attachmentViewModels.append(contentsOf: attachmentViewModels) + } + } + + private static func loadText(textProvider: NSItemProvider?) async -> String? { + guard let textProvider = textProvider else { return nil } + do { + let item = try await textProvider.loadItem(forTypeIdentifier: UTType.plainText.identifier) + guard let text = item as? String else { return nil } + return text + } catch { + return nil + } + } + + private static func loadURL(textProvider: NSItemProvider?) async -> String? { + guard let textProvider = textProvider else { return nil } + do { + let item = try await textProvider.loadItem(forTypeIdentifier: UTType.url.identifier) + guard let url = item as? URL else { return nil } + return url.absoluteString + } catch { + return nil + } + } + +} + +extension ShareViewController { + enum ShareError: Error { + case `internal`(error: Error) + case userCancelShare + case missingAuthentication + } +} diff --git a/ShareActionExtension/Scene/ShareViewModel.swift b/ShareActionExtension/Scene/ShareViewModel.swift new file mode 100644 index 000000000..ef8e200a6 --- /dev/null +++ b/ShareActionExtension/Scene/ShareViewModel.swift @@ -0,0 +1,43 @@ +// +// ShareViewModel.swift +// MastodonShareAction +// +// Created by MainasuK Cirno on 2021-7-16. +// + +import os.log +import Foundation +import Combine +import CoreData +import CoreDataStack +import MastodonSDK +import SwiftUI +import UniformTypeIdentifiers +import MastodonAsset +import MastodonLocalization +import MastodonUI +import MastodonCore + +final class ShareViewModel { + + let logger = Logger(subsystem: "ComposeViewModel", category: "ViewModel") + + var disposeBag = Set() + + // input + let context: AppContext + @Published var authContext: AuthContext? + + @Published var isPublishing = false + + // output + + init( + context: AppContext + ) { + self.context = context + // end init + + } + +} diff --git a/ShareActionExtension/Scene/View/ComposeToolbarView.swift b/ShareActionExtension/Scene/View/ComposeToolbarView.swift deleted file mode 100644 index 557706fd8..000000000 --- a/ShareActionExtension/Scene/View/ComposeToolbarView.swift +++ /dev/null @@ -1,263 +0,0 @@ -// -// ComposeToolbarView.swift -// ShareActionExtension -// -// Created by MainasuK Cirno on 2021-7-19. -// - -import os.log -import UIKit -import Combine -import MastodonSDK -import MastodonUI -import MastodonAsset -import MastodonLocalization -import MastodonCore -import MastodonUI - -protocol ComposeToolbarViewDelegate: AnyObject { - func composeToolbarView(_ composeToolbarView: ComposeToolbarView, contentWarningButtonDidPressed sender: UIButton) - func composeToolbarView(_ composeToolbarView: ComposeToolbarView, visibilityButtonDidPressed sender: UIButton, visibilitySelectionType type: ComposeToolbarView.VisibilitySelectionType) -} - -final class ComposeToolbarView: UIView { - - var disposeBag = Set() - - static let toolbarButtonSize: CGSize = CGSize(width: 44, height: 44) - static let toolbarHeight: CGFloat = 44 - - weak var delegate: ComposeToolbarViewDelegate? - - let contentWarningButton: UIButton = { - let button = HighlightDimmableButton() - ComposeToolbarView.configureToolbarButtonAppearance(button: button) - button.setImage(UIImage(systemName: "exclamationmark.shield", withConfiguration: UIImage.SymbolConfiguration(pointSize: 20, weight: .regular)), for: .normal) - button.accessibilityLabel = L10n.Scene.Compose.Accessibility.enableContentWarning - return button - }() - - let visibilityButton: UIButton = { - let button = HighlightDimmableButton() - ComposeToolbarView.configureToolbarButtonAppearance(button: button) - button.setImage(UIImage(systemName: "person.3", withConfiguration: UIImage.SymbolConfiguration(pointSize: 15, weight: .medium)), for: .normal) - button.accessibilityLabel = L10n.Scene.Compose.Accessibility.postVisibilityMenu - return button - }() - - let characterCountLabel: UILabel = { - let label = UILabel() - label.font = .systemFont(ofSize: 15, weight: .regular) - label.text = "500" - label.textColor = Asset.Colors.Label.secondary.color - label.accessibilityLabel = L10n.A11y.Plural.Count.inputLimitRemains(500) - return label - }() - - let activeVisibilityType = CurrentValueSubject(.public) - - override init(frame: CGRect) { - super.init(frame: frame) - _init() - } - - required init?(coder: NSCoder) { - super.init(coder: coder) - _init() - } - -} - -extension ComposeToolbarView { - - private func _init() { - setupBackgroundColor(theme: ThemeService.shared.currentTheme.value) - ThemeService.shared.currentTheme - .receive(on: DispatchQueue.main) - .sink { [weak self] theme in - guard let self = self else { return } - self.setupBackgroundColor(theme: theme) - } - .store(in: &disposeBag) - - let stackView = UIStackView() - stackView.axis = .horizontal - stackView.spacing = 0 - stackView.distribution = .fillEqually - stackView.translatesAutoresizingMaskIntoConstraints = false - addSubview(stackView) - NSLayoutConstraint.activate([ - stackView.centerYAnchor.constraint(equalTo: centerYAnchor), - layoutMarginsGuide.leadingAnchor.constraint(equalTo: stackView.leadingAnchor, constant: 8), // tweak button margin offset - ]) - - let buttons = [ - contentWarningButton, - visibilityButton, - ] - buttons.forEach { button in - button.translatesAutoresizingMaskIntoConstraints = false - stackView.addArrangedSubview(button) - NSLayoutConstraint.activate([ - button.widthAnchor.constraint(equalToConstant: 44), - button.heightAnchor.constraint(equalToConstant: 44), - ]) - } - - characterCountLabel.translatesAutoresizingMaskIntoConstraints = false - addSubview(characterCountLabel) - NSLayoutConstraint.activate([ - characterCountLabel.topAnchor.constraint(equalTo: topAnchor), - characterCountLabel.leadingAnchor.constraint(greaterThanOrEqualTo: stackView.trailingAnchor, constant: 8), - characterCountLabel.trailingAnchor.constraint(equalTo: layoutMarginsGuide.trailingAnchor), - characterCountLabel.bottomAnchor.constraint(equalTo: bottomAnchor), - ]) - characterCountLabel.setContentHuggingPriority(.defaultHigh, for: .horizontal) - - contentWarningButton.addTarget(self, action: #selector(ComposeToolbarView.contentWarningButtonDidPressed(_:)), for: .touchUpInside) - visibilityButton.menu = createVisibilityContextMenu(interfaceStyle: traitCollection.userInterfaceStyle) - visibilityButton.showsMenuAsPrimaryAction = true - - updateToolbarButtonUserInterfaceStyle() - - // update menu when selected visibility type changed - activeVisibilityType - .receive(on: RunLoop.main) - .sink { [weak self] type in - guard let self = self else { return } - self.visibilityButton.menu = self.createVisibilityContextMenu(interfaceStyle: self.traitCollection.userInterfaceStyle) - } - .store(in: &disposeBag) - } - - override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { - super.traitCollectionDidChange(previousTraitCollection) - - updateToolbarButtonUserInterfaceStyle() - } - -} - -extension ComposeToolbarView { - private func setupBackgroundColor(theme: Theme) { - backgroundColor = theme.composeToolbarBackgroundColor - } -} - -extension ComposeToolbarView { - enum MediaSelectionType: String { - case camera - case photoLibrary - case browse - } - - enum VisibilitySelectionType: String, CaseIterable { - case `public` - // TODO: remove unlisted option from codebase - // case unlisted - case `private` - case direct - - var title: String { - switch self { - case .public: return L10n.Scene.Compose.Visibility.public - // case .unlisted: return L10n.Scene.Compose.Visibility.unlisted - case .private: return L10n.Scene.Compose.Visibility.private - case .direct: return L10n.Scene.Compose.Visibility.direct - } - } - - func image(interfaceStyle: UIUserInterfaceStyle) -> UIImage { - switch self { - case .public: return UIImage(systemName: "globe", withConfiguration: UIImage.SymbolConfiguration(pointSize: 19, weight: .medium))! - // case .unlisted: return UIImage(systemName: "eye.slash", withConfiguration: UIImage.SymbolConfiguration(pointSize: 18, weight: .regular))! - case .private: - switch interfaceStyle { - case .light: return UIImage(systemName: "person.3", withConfiguration: UIImage.SymbolConfiguration(pointSize: 15, weight: .medium))! - default: return UIImage(systemName: "person.3.fill", withConfiguration: UIImage.SymbolConfiguration(pointSize: 15, weight: .medium))! - } - case .direct: return UIImage(systemName: "at", withConfiguration: UIImage.SymbolConfiguration(pointSize: 19, weight: .regular))! - } - } - - var visibility: Mastodon.Entity.Status.Visibility { - switch self { - case .public: return .public - // case .unlisted: return .unlisted - case .private: return .private - case .direct: return .direct - } - } - } -} - -extension ComposeToolbarView { - - private static func configureToolbarButtonAppearance(button: UIButton) { - button.tintColor = ThemeService.tintColor - button.setBackgroundImage(.placeholder(size: ComposeToolbarView.toolbarButtonSize, color: .systemFill), for: .highlighted) - button.layer.masksToBounds = true - button.layer.cornerRadius = 5 - button.layer.cornerCurve = .continuous - } - - private func updateToolbarButtonUserInterfaceStyle() { - switch traitCollection.userInterfaceStyle { - case .light: - contentWarningButton.setImage(UIImage(systemName: "exclamationmark.shield", withConfiguration: UIImage.SymbolConfiguration(pointSize: 20, weight: .regular))!, for: .normal) - - case .dark: - contentWarningButton.setImage(UIImage(systemName: "exclamationmark.shield.fill", withConfiguration: UIImage.SymbolConfiguration(pointSize: 20, weight: .regular))!, for: .normal) - - default: - assertionFailure() - } - - visibilityButton.menu = createVisibilityContextMenu(interfaceStyle: traitCollection.userInterfaceStyle) - } - - private func createVisibilityContextMenu(interfaceStyle: UIUserInterfaceStyle) -> UIMenu { - let children: [UIMenuElement] = VisibilitySelectionType.allCases.map { type in - let state: UIMenuElement.State = activeVisibilityType.value == type ? .on : .off - return UIAction(title: type.title, image: type.image(interfaceStyle: interfaceStyle), identifier: nil, discoverabilityTitle: nil, attributes: [], state: state) { [weak self] action in - guard let self = self else { return } - os_log(.info, "%{public}s[%{public}ld], %{public}s: visibilitySelectionType: %s", ((#file as NSString).lastPathComponent), #line, #function, type.rawValue) - self.delegate?.composeToolbarView(self, visibilityButtonDidPressed: self.visibilityButton, visibilitySelectionType: type) - } - } - return UIMenu(title: "", image: nil, identifier: nil, options: .displayInline, children: children) - } - -} - -extension ComposeToolbarView { - - @objc private func contentWarningButtonDidPressed(_ sender: UIButton) { - os_log(.info, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) - delegate?.composeToolbarView(self, contentWarningButtonDidPressed: sender) - } - -} - -#if canImport(SwiftUI) && DEBUG -import SwiftUI - -struct ComposeToolbarView_Previews: PreviewProvider { - - static var previews: some View { - UIViewPreview(width: 375) { - let toolbarView = ComposeToolbarView() - toolbarView.translatesAutoresizingMaskIntoConstraints = false - NSLayoutConstraint.activate([ - toolbarView.widthAnchor.constraint(equalToConstant: 375).priority(.defaultHigh), - toolbarView.heightAnchor.constraint(equalToConstant: 64).priority(.defaultHigh), - ]) - return toolbarView - } - .previewLayout(.fixed(width: 375, height: 100)) - } - -} - -#endif - diff --git a/ShareActionExtension/Scene/View/ComposeView.swift b/ShareActionExtension/Scene/View/ComposeView.swift deleted file mode 100644 index a688d6492..000000000 --- a/ShareActionExtension/Scene/View/ComposeView.swift +++ /dev/null @@ -1,151 +0,0 @@ -// -// ComposeView.swift -// -// -// Created by MainasuK Cirno on 2021-7-16. -// - -import UIKit -import SwiftUI - -public struct ComposeView: View { - - @EnvironmentObject var viewModel: ComposeViewModel - @State var statusEditorViewWidth: CGFloat = .zero - - let horizontalMargin: CGFloat = 20 - - public init() { } - - public var body: some View { - GeometryReader { proxy in - List { - // Content Warning - if viewModel.isContentWarningComposing { - ContentWarningEditorView( - contentWarningContent: $viewModel.contentWarningContent, - placeholder: viewModel.contentWarningPlaceholder - ) - .padding(EdgeInsets(top: 6, leading: horizontalMargin, bottom: 6, trailing: horizontalMargin)) - .background(viewModel.contentWarningBackgroundColor) - .transition(.opacity) - .listRow(backgroundColor: Color(viewModel.backgroundColor)) - } - - // Author - StatusAuthorView( - avatarImageURL: viewModel.avatarImageURL, - name: viewModel.authorName, - username: viewModel.authorUsername - ) - .padding(EdgeInsets(top: 20, leading: horizontalMargin, bottom: 16, trailing: horizontalMargin)) - .listRow(backgroundColor: Color(viewModel.backgroundColor)) - - // Editor - StatusEditorView( - string: $viewModel.statusContent, - placeholder: viewModel.statusPlaceholder, - width: statusEditorViewWidth, - attributedString: viewModel.statusContentAttributedString, - keyboardType: .twitter, - viewDidAppear: $viewModel.viewDidAppear - ) - .frame(width: statusEditorViewWidth) - .frame(minHeight: 100) - .padding(EdgeInsets(top: 0, leading: horizontalMargin, bottom: 0, trailing: horizontalMargin)) - .listRow(backgroundColor: Color(viewModel.backgroundColor)) - - // Attachments - ForEach(viewModel.attachmentViewModels) { attachmentViewModel in - let descriptionBinding = Binding { - return attachmentViewModel.descriptionContent - } set: { newValue in - attachmentViewModel.descriptionContent = newValue - } - - StatusAttachmentView( - image: attachmentViewModel.thumbnailImage, - descriptionPlaceholder: attachmentViewModel.descriptionPlaceholder, - description: descriptionBinding, - errorPrompt: attachmentViewModel.errorPrompt, - errorPromptImage: attachmentViewModel.errorPromptImage, - isUploading: attachmentViewModel.isUploading, - progressViewTintColor: attachmentViewModel.progressViewTintColor, - removeButtonAction: { - self.viewModel.removeAttachmentViewModel(attachmentViewModel) - } - ) - } - .padding(EdgeInsets(top: 16, leading: horizontalMargin, bottom: 0, trailing: horizontalMargin)) - .fixedSize(horizontal: false, vertical: true) - .listRow(backgroundColor: Color(viewModel.backgroundColor)) - - // bottom padding - Color.clear - .frame(height: viewModel.toolbarHeight + 20) - .listRow(backgroundColor: Color(viewModel.backgroundColor)) - } // end List - .listStyle(.plain) - .introspectTableView(customize: { tableView in - // tableView.keyboardDismissMode = .onDrag - tableView.verticalScrollIndicatorInsets.bottom = viewModel.toolbarHeight - }) - .preference( - key: ComposeListViewFramePreferenceKey.self, - value: proxy.frame(in: .local) - ) - .onPreferenceChange(ComposeListViewFramePreferenceKey.self) { frame in - var frame = frame - frame.size.width = frame.width - 2 * horizontalMargin - statusEditorViewWidth = frame.width - } // end List - .introspectTableView(customize: { tableView in - tableView.backgroundColor = .clear - }) - .overrideBackground(color: Color(viewModel.backgroundColor)) - } // end GeometryReader - } // end body -} - -struct ComposeListViewFramePreferenceKey: PreferenceKey { - static var defaultValue: CGRect = .zero - static func reduce(value: inout CGRect, nextValue: () -> CGRect) { } -} - -extension View { - // hack for separator line - @ViewBuilder - func listRow(backgroundColor: Color) -> some View { - // expand list row to edge (set inset) - // then hide the separator - if #available(iOS 15, *) { - frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading) - .listRowInsets(EdgeInsets(top: -1, leading: -1, bottom: -1, trailing: -1)) - .background(backgroundColor) - .listRowSeparator(.hidden) // new API - } else { - frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading) - .listRowInsets(EdgeInsets(top: -1, leading: -1, bottom: -1, trailing: -1)) // separator line hidden magic - .background(backgroundColor) - } - } - - @ViewBuilder - func overrideBackground(color: Color) -> some View { - background(color.ignoresSafeArea()) - } -} - - -struct ComposeView_Previews: PreviewProvider { - - static let viewModel: ComposeViewModel = { - let viewModel = ComposeViewModel() - return viewModel - }() - - static var previews: some View { - ComposeView().environmentObject(viewModel) - } - -} diff --git a/ShareActionExtension/Scene/View/ComposeViewModel.swift b/ShareActionExtension/Scene/View/ComposeViewModel.swift deleted file mode 100644 index 88c2b896f..000000000 --- a/ShareActionExtension/Scene/View/ComposeViewModel.swift +++ /dev/null @@ -1,130 +0,0 @@ -// -// ComposeViewModel.swift -// ShareActionExtension -// -// Created by MainasuK Cirno on 2021-7-16. -// - -import Foundation -import SwiftUI -import Combine -import CoreDataStack - -class ComposeViewModel: ObservableObject { - - var disposeBag = Set() - - @Published var authentication: MastodonAuthentication? - - @Published var backgroundColor: UIColor = .clear - @Published var toolbarHeight: CGFloat = 0 - @Published var viewDidAppear = false - - @Published var avatarImageURL: URL? - @Published var authorName: String = "" - @Published var authorUsername: String = "" - - @Published var statusContent = "" - @Published var statusPlaceholder = "" - @Published var statusContentAttributedString = NSAttributedString() - - @Published var isContentWarningComposing = false - @Published var contentWarningBackgroundColor = Color.secondary - @Published var contentWarningPlaceholder = "" - @Published var contentWarningContent = "" - - @Published private(set) var attachmentViewModels: [StatusAttachmentViewModel] = [] - - @Published var characterCount = 0 - - public init() { - $statusContent - .map { NSAttributedString(string: $0) } - .assign(to: &$statusContentAttributedString) - - Publishers.CombineLatest3( - $statusContent, - $isContentWarningComposing, - $contentWarningContent - ) - .map { statusContent, isContentWarningComposing, contentWarningContent in - var count = statusContent.count - if isContentWarningComposing { - count += contentWarningContent.count - } - return count - } - .assign(to: &$characterCount) - - // setup attribute updater - $attachmentViewModels - .receive(on: DispatchQueue.main) - .debounce(for: 0.3, scheduler: DispatchQueue.main) - .sink { attachmentViewModels in - // drive upload state - // make image upload in the queue - for attachmentViewModel in attachmentViewModels { - // skip when prefix N task when task finish OR fail OR uploading - guard let currentState = attachmentViewModel.uploadStateMachine.currentState else { break } - if currentState is StatusAttachmentViewModel.UploadState.Fail { - continue - } - if currentState is StatusAttachmentViewModel.UploadState.Finish { - continue - } - if currentState is StatusAttachmentViewModel.UploadState.Uploading { - break - } - // trigger uploading one by one - if currentState is StatusAttachmentViewModel.UploadState.Initial { - attachmentViewModel.uploadStateMachine.enter(StatusAttachmentViewModel.UploadState.Uploading.self) - break - } - } - } - .store(in: &disposeBag) - - #if DEBUG - // avatarImageURL = URL(string: "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif") - // authorName = "Alice" - // authorUsername = "alice" - #endif - } - -} - -extension ComposeViewModel { - func setupAttachmentViewModels(_ viewModels: [StatusAttachmentViewModel]) { - attachmentViewModels = viewModels - for viewModel in viewModels { - // set delegate - viewModel.delegate = self - // set observed - viewModel.objectWillChange.sink { [weak self] _ in - guard let self = self else { return } - self.objectWillChange.send() - } - .store(in: &viewModel.disposeBag) - // bind authentication - $authentication - .assign(to: \.value, on: viewModel.authentication) - .store(in: &viewModel.disposeBag) - } - } - - func removeAttachmentViewModel(_ viewModel: StatusAttachmentViewModel) { - if let index = attachmentViewModels.firstIndex(where: { $0 === viewModel }) { - attachmentViewModels.remove(at: index) - } - } -} - -// MARK: - StatusAttachmentViewModelDelegate -extension ComposeViewModel: StatusAttachmentViewModelDelegate { - func statusAttachmentViewModel(_ viewModel: StatusAttachmentViewModel, uploadStateDidChange state: StatusAttachmentViewModel.UploadState?) { - // trigger event update - DispatchQueue.main.async { - self.attachmentViewModels = self.attachmentViewModels - } - } -} diff --git a/ShareActionExtension/Scene/View/ContentWarningEditorView.swift b/ShareActionExtension/Scene/View/ContentWarningEditorView.swift deleted file mode 100644 index 833c919fc..000000000 --- a/ShareActionExtension/Scene/View/ContentWarningEditorView.swift +++ /dev/null @@ -1,48 +0,0 @@ -// -// ContentWarningEditorView.swift -// -// -// Created by MainasuK Cirno on 2021-7-19. -// - -import SwiftUI -import Introspect - -struct ContentWarningEditorView: View { - - @Binding var contentWarningContent: String - let placeholder: String - let spacing: CGFloat = 11 - - var body: some View { - HStack(alignment: .center, spacing: spacing) { - Image(systemName: "exclamationmark.shield") - .font(.system(size: 30, weight: .regular)) - Text(contentWarningContent.isEmpty ? " " : contentWarningContent) - .opacity(0) - .padding(.all, 8) - .frame(maxWidth: .infinity) - .overlay( - TextEditor(text: $contentWarningContent) - .introspectTextView { textView in - textView.backgroundColor = .clear - textView.placeholder = placeholder - } - ) - } - } -} - -struct ContentWarningEditorView_Previews: PreviewProvider { - - @State static var content = "" - - static var previews: some View { - ContentWarningEditorView( - contentWarningContent: $content, - placeholder: "Write an accurate warning here..." - ) - .previewLayout(.fixed(width: 375, height: 100)) - } -} - diff --git a/ShareActionExtension/Scene/View/StatusAttachmentView.swift b/ShareActionExtension/Scene/View/StatusAttachmentView.swift deleted file mode 100644 index 90b8aceeb..000000000 --- a/ShareActionExtension/Scene/View/StatusAttachmentView.swift +++ /dev/null @@ -1,126 +0,0 @@ -// -// StatusAttachmentView.swift -// -// -// Created by MainasuK Cirno on 2021-7-19. -// - -import SwiftUI -import Introspect - -struct StatusAttachmentView: View { - - let image: UIImage? - let descriptionPlaceholder: String - @Binding var description: String - let errorPrompt: String? - let errorPromptImage: UIImage - let isUploading: Bool - let progressViewTintColor: UIColor - - let removeButtonAction: () -> Void - - var body: some View { - let image = image ?? UIImage.placeholder(color: .systemFill) - ZStack(alignment: .bottom) { - if let errorPrompt = errorPrompt { - Color.clear - .aspectRatio(CGSize(width: 16, height: 9), contentMode: .fill) - .overlay( - VStack(alignment: .center) { - Image(uiImage: errorPromptImage) - Text(errorPrompt) - .lineLimit(2) - } - ) - .background(Color.gray) - } else { - Color.clear - .aspectRatio(CGSize(width: 16, height: 9), contentMode: .fill) - .overlay( - Image(uiImage: image) - .resizable() - .aspectRatio(contentMode: .fill) - ) - .background(Color.gray) - LinearGradient(gradient: Gradient(colors: [Color(white: 0, opacity: 0.69), Color.clear]), startPoint: .bottom, endPoint: .top) - .frame(maxHeight: 71) - TextField("", text: $description) - .placeholder(when: description.isEmpty) { - Text(descriptionPlaceholder).foregroundColor(Color(white: 1, opacity: 0.6)) - .lineLimit(1) - } - .foregroundColor(.white) - .font(.system(size: 15, weight: .regular, design: .default)) - .padding(EdgeInsets(top: 0, leading: 8, bottom: 7, trailing: 8)) - } - } - .cornerRadius(4) - .badgeView( - Button(action: { - removeButtonAction() - }, label: { - Image(systemName: "minus.circle.fill") - .renderingMode(.original) - .font(.system(size: 22, weight: .bold, design: .default)) - }) - .buttonStyle(BorderlessButtonStyle()) - ) - .overlay( - Group { - if isUploading { - ProgressView() - .progressViewStyle(CircularProgressViewStyle(tint: Color(progressViewTintColor))) - } - } - ) - } -} - -extension View { - func badgeView(_ content: Content) -> some View where Content: View { - overlay( - ZStack { - content - } - .alignmentGuide(.top) { $0.height / 2 } - .alignmentGuide(.trailing) { $0.width / 2 } - .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topTrailing) - ) - } -} - -/// ref: https://stackoverflow.com/a/57715771/3797903 -extension View { - func placeholder( - when shouldShow: Bool, - alignment: Alignment = .leading, - @ViewBuilder placeholder: () -> Content) -> some View { - - ZStack(alignment: alignment) { - placeholder().opacity(shouldShow ? 1 : 0) - self - } - } -} - - -//struct StatusAttachmentView_Previews: PreviewProvider { -// static var previews: some View { -// ScrollView { -// StatusAttachmentView( -// image: UIImage(systemName: "photo"), -// descriptionPlaceholder: "Describe photo", -// description: .constant(""), -// errorPrompt: nil, -// errorPromptImage: StatusAttachmentViewModel.photoFillSplitImage, -// isUploading: true, -// progressViewTintColor: .systemFill, -// removeButtonAction: { -// // do nothing -// } -// ) -// .padding(20) -// } -// } -//} diff --git a/ShareActionExtension/Scene/View/StatusAttachmentViewModel+UploadState.swift b/ShareActionExtension/Scene/View/StatusAttachmentViewModel+UploadState.swift deleted file mode 100644 index 56942cde0..000000000 --- a/ShareActionExtension/Scene/View/StatusAttachmentViewModel+UploadState.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// StatusAttachmentViewModel+UploadState.swift -// ShareActionExtension -// -// Created by MainasuK Cirno on 2021-7-20. -// - -import os.log -import Foundation -import Combine -import GameplayKit -import MastodonSDK -import MastodonCore - -extension StatusAttachmentViewModel { - class UploadState: GKState { - weak var viewModel: StatusAttachmentViewModel? - - init(viewModel: StatusAttachmentViewModel) { - self.viewModel = viewModel - } - - override func didEnter(from previousState: GKState?) { - os_log("%{public}s[%{public}ld], %{public}s: enter %s, previous: %s", ((#file as NSString).lastPathComponent), #line, #function, self.debugDescription, previousState.debugDescription) - viewModel?.uploadStateMachineSubject.send(self) - } - } -} - -extension StatusAttachmentViewModel.UploadState { - - class Initial: StatusAttachmentViewModel.UploadState { - override func isValidNextState(_ stateClass: AnyClass) -> Bool { - guard viewModel?.authentication.value != nil else { return false } - if stateClass == Initial.self { - return true - } - - if viewModel?.file.value != nil { - return stateClass == Uploading.self - } else { - return stateClass == Fail.self - } - } - } - - class Uploading: StatusAttachmentViewModel.UploadState { - let logger = Logger(subsystem: "StatusAttachmentViewModel.UploadState.Uploading", category: "logic") - var needsFallback = false - - override func isValidNextState(_ stateClass: AnyClass) -> Bool { - return stateClass == Fail.self || stateClass == Finish.self || stateClass == Uploading.self - } - - override func didEnter(from previousState: GKState?) { - super.didEnter(from: previousState) - - guard let viewModel = viewModel, let stateMachine = stateMachine else { return } - guard let authentication = viewModel.authentication.value else { return } - guard let file = viewModel.file.value else { return } - - let description = viewModel.descriptionContent - let query = Mastodon.API.Media.UploadMediaQuery( - file: file, - thumbnail: nil, - description: description, - focus: nil - ) - - let mastodonAuthenticationBox = MastodonAuthenticationBox( - authenticationRecord: .init(objectID: authentication.objectID), - domain: authentication.domain, - userID: authentication.userID, - appAuthorization: Mastodon.API.OAuth.Authorization(accessToken: authentication.appAccessToken), - userAuthorization: Mastodon.API.OAuth.Authorization(accessToken: authentication.userAccessToken) - ) - - // and needs clone the `query` if needs retry - viewModel.api.uploadMedia( - domain: mastodonAuthenticationBox.domain, - query: query, - mastodonAuthenticationBox: mastodonAuthenticationBox, - needsFallback: needsFallback - ) - .receive(on: DispatchQueue.main) - .sink { [weak self] completion in - guard let self = self else { return } - switch completion { - case .failure(let error): - if let apiError = error as? Mastodon.API.Error, - apiError.httpResponseStatus == .notFound, - self.needsFallback == false - { - self.needsFallback = true - stateMachine.enter(Uploading.self) - self.logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): fallback to V1") - } else { - self.logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): fail: \(error.localizedDescription)") - viewModel.error = error - stateMachine.enter(Fail.self) - } - case .finished: - self.logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): upload attachment success") - break - } - } receiveValue: { [weak self] response in - guard let self = self else { return } - self.logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): upload attachment \(response.value.id) success, \(response.value.url ?? "")") - viewModel.attachment.value = response.value - stateMachine.enter(Finish.self) - } - .store(in: &viewModel.disposeBag) - } - - } - - class Fail: StatusAttachmentViewModel.UploadState { - override func isValidNextState(_ stateClass: AnyClass) -> Bool { - // allow discard publishing - return stateClass == Uploading.self || stateClass == Finish.self - } - } - - class Finish: StatusAttachmentViewModel.UploadState { - override func isValidNextState(_ stateClass: AnyClass) -> Bool { - return false - } - } - -} - diff --git a/ShareActionExtension/Scene/View/StatusAttachmentViewModel.swift b/ShareActionExtension/Scene/View/StatusAttachmentViewModel.swift deleted file mode 100644 index 19251d0be..000000000 --- a/ShareActionExtension/Scene/View/StatusAttachmentViewModel.swift +++ /dev/null @@ -1,227 +0,0 @@ -// -// StatusAttachmentViewModel.swift -// ShareActionExtension -// -// Created by MainasuK Cirno on 2021-7-19. -// - -import os.log -import Foundation -import SwiftUI -import Combine -import CoreDataStack -import MastodonSDK -import MastodonUI -import AVFoundation -import GameplayKit -import MobileCoreServices -import UniformTypeIdentifiers -import MastodonAsset -import MastodonCore -import MastodonLocalization - -protocol StatusAttachmentViewModelDelegate: AnyObject { - func statusAttachmentViewModel(_ viewModel: StatusAttachmentViewModel, uploadStateDidChange state: StatusAttachmentViewModel.UploadState?) -} - -final class StatusAttachmentViewModel: ObservableObject, Identifiable { - - static let photoFillSplitImage = Asset.Connectivity.photoFillSplit.image.withRenderingMode(.alwaysTemplate) - static let videoSplashImage: UIImage = { - let image = UIImage(systemName: "video.slash")!.withConfiguration(UIImage.SymbolConfiguration(pointSize: 64)) - return image - }() - - let logger = Logger(subsystem: "StatusAttachmentViewModel", category: "logic") - - weak var delegate: StatusAttachmentViewModelDelegate? - var disposeBag = Set() - - let id = UUID() - let itemProvider: NSItemProvider - - // input - let api: APIService - let file = CurrentValueSubject(nil) - let authentication = CurrentValueSubject(nil) - @Published var descriptionContent = "" - - // output - let attachment = CurrentValueSubject(nil) - @Published var thumbnailImage: UIImage? - @Published var descriptionPlaceholder = "" - @Published var isUploading = true - @Published var progressViewTintColor = UIColor.systemFill - @Published var error: Error? - @Published var errorPrompt: String? - @Published var errorPromptImage: UIImage = StatusAttachmentViewModel.photoFillSplitImage - - private(set) lazy var uploadStateMachine: GKStateMachine = { - // exclude timeline middle fetcher state - let stateMachine = GKStateMachine(states: [ - UploadState.Initial(viewModel: self), - UploadState.Uploading(viewModel: self), - UploadState.Fail(viewModel: self), - UploadState.Finish(viewModel: self), - ]) - stateMachine.enter(UploadState.Initial.self) - return stateMachine - }() - lazy var uploadStateMachineSubject = CurrentValueSubject(nil) - - init( - api: APIService, - itemProvider: NSItemProvider - ) { - self.api = api - self.itemProvider = itemProvider - - // bind attachment from item provider - Just(itemProvider) - .receive(on: DispatchQueue.main) - .flatMap { result -> AnyPublisher in - if itemProvider.hasRepresentationConforming(toTypeIdentifier: UTType.image.identifier, fileOptions: []) { - return ItemProviderLoader.loadImageData(from: result).eraseToAnyPublisher() - } - if itemProvider.hasRepresentationConforming(toTypeIdentifier: UTType.movie.identifier, fileOptions: []) { - return ItemProviderLoader.loadVideoData(from: result).eraseToAnyPublisher() - } - return Fail(error: AttachmentError.invalidAttachmentType).eraseToAnyPublisher() - } - .sink { [weak self] completion in - guard let self = self else { return } - switch completion { - case .failure(let error): - self.error = error - self.uploadStateMachine.enter(UploadState.Fail.self) - case .finished: - break - } - } receiveValue: { [weak self] file in - guard let self = self else { return } - self.file.value = file - self.uploadStateMachine.enter(UploadState.Initial.self) - } - .store(in: &disposeBag) - - // bind progress view tint color - $thumbnailImage - .receive(on: DispatchQueue.main) - .map { image -> UIColor in - guard let image = image else { return .systemFill } - switch image.domainLumaCoefficientsStyle { - case .light: - return UIColor.black.withAlphaComponent(0.8) - default: - return UIColor.white.withAlphaComponent(0.8) - } - } - .assign(to: &$progressViewTintColor) - - // bind description placeholder and error prompt image - file - .receive(on: DispatchQueue.main) - .sink { [weak self] file in - guard let self = self else { return } - guard let file = file else { return } - switch file { - case .jpeg, .png, .gif: - self.descriptionPlaceholder = L10n.Scene.Compose.Attachment.descriptionPhoto - self.errorPromptImage = StatusAttachmentViewModel.photoFillSplitImage - case .other: - self.descriptionPlaceholder = L10n.Scene.Compose.Attachment.descriptionVideo - self.errorPromptImage = StatusAttachmentViewModel.videoSplashImage - } - } - .store(in: &disposeBag) - - // bind thumbnail image - file - .receive(on: DispatchQueue.main) - .map { file -> UIImage? in - guard let file = file else { - return nil - } - - switch file { - case .jpeg(let data), .png(let data): - return data.flatMap { UIImage(data: $0) } - case .gif: - // TODO: - return nil - case .other(let url, _, _): - guard let url = url, FileManager.default.fileExists(atPath: url.path) else { return nil } - let asset = AVURLAsset(url: url) - let assetImageGenerator = AVAssetImageGenerator(asset: asset) - assetImageGenerator.appliesPreferredTrackTransform = true // fix orientation - do { - let cgImage = try assetImageGenerator.copyCGImage(at: CMTimeMake(value: 0, timescale: 1), actualTime: nil) - let image = UIImage(cgImage: cgImage) - return image - } catch { - self.logger.debug("\((#file as NSString).lastPathComponent, privacy: .public)[\(#line, privacy: .public)], \(#function, privacy: .public): thumbnail generate fail: \(error.localizedDescription)") - return nil - } - } - } - .assign(to: &$thumbnailImage) - - // bind state and error - Publishers.CombineLatest( - uploadStateMachineSubject, - $error - ) - .sink { [weak self] state, error in - guard let self = self else { return } - // trigger delegate - self.delegate?.statusAttachmentViewModel(self, uploadStateDidChange: state) - - // set error prompt - if let error = error { - self.isUploading = false - self.errorPrompt = error.localizedDescription - } else { - guard let state = state else { return } - switch state { - case is UploadState.Finish: - self.isUploading = false - case is UploadState.Fail: - self.isUploading = false - // FIXME: not display - self.errorPrompt = { - guard let file = self.file.value else { - return L10n.Scene.Compose.Attachment.attachmentBroken(L10n.Scene.Compose.Attachment.photo) - } - switch file { - case .jpeg, .png, .gif: - return L10n.Scene.Compose.Attachment.attachmentBroken(L10n.Scene.Compose.Attachment.photo) - case .other: - return L10n.Scene.Compose.Attachment.attachmentBroken(L10n.Scene.Compose.Attachment.video) - } - }() - default: - break - } - } - } - .store(in: &disposeBag) - - // trigger delegate when authentication get new value - authentication - .receive(on: DispatchQueue.main) - .sink { [weak self] authentication in - guard let self = self else { return } - guard authentication != nil else { return } - self.delegate?.statusAttachmentViewModel(self, uploadStateDidChange: self.uploadStateMachineSubject.value) - } - .store(in: &disposeBag) - } - -} - -extension StatusAttachmentViewModel { - enum AttachmentError: Error { - case invalidAttachmentType - case attachmentTooLarge - } -} diff --git a/ShareActionExtension/Scene/View/StatusAuthorView.swift b/ShareActionExtension/Scene/View/StatusAuthorView.swift deleted file mode 100644 index 24453abe2..000000000 --- a/ShareActionExtension/Scene/View/StatusAuthorView.swift +++ /dev/null @@ -1,45 +0,0 @@ -// -// StatusAuthorView.swift -// -// -// Created by MainasuK Cirno on 2021-7-16. -// - -import SwiftUI -import MastodonUI -import Nuke -import FLAnimatedImage - -struct StatusAuthorView: View { - - let avatarImageURL: URL? - let name: String - let username: String - - var body: some View { - HStack(spacing: 5) { - AnimatedImage(imageURL: avatarImageURL) - .frame(width: 42, height: 42) - .background(Color(UIColor.systemFill)) - .cornerRadius(4) - VStack(alignment: .leading) { - Text(name) - .font(.headline) - Text(username) - .font(.subheadline) - .foregroundColor(.secondary) - } - Spacer() - } - } -} - -struct StatusAuthorView_Previews: PreviewProvider { - static var previews: some View { - StatusAuthorView( - avatarImageURL: URL(string: "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif"), - name: "Alice", - username: "alice" - ) - } -} diff --git a/ShareActionExtension/Scene/View/StatusEditorView.swift b/ShareActionExtension/Scene/View/StatusEditorView.swift deleted file mode 100644 index f670f6601..000000000 --- a/ShareActionExtension/Scene/View/StatusEditorView.swift +++ /dev/null @@ -1,105 +0,0 @@ -// -// StatusEditorView.swift -// -// -// Created by MainasuK Cirno on 2021-7-16. -// - -import UIKit -import SwiftUI -import UITextView_Placeholder - -public struct StatusEditorView: UIViewRepresentable { - - @Binding var string: String - let placeholder: String - let width: CGFloat - let attributedString: NSAttributedString - let keyboardType: UIKeyboardType - @Binding var viewDidAppear: Bool - - public init( - string: Binding, - placeholder: String, - width: CGFloat, - attributedString: NSAttributedString, - keyboardType: UIKeyboardType, - viewDidAppear: Binding - ) { - self._string = string - self.placeholder = placeholder - self.width = width - self.attributedString = attributedString - self.keyboardType = keyboardType - self._viewDidAppear = viewDidAppear - } - - public func makeUIView(context: Context) -> UITextView { - let textView = UITextView(frame: .zero) - textView.placeholder = placeholder - - textView.isScrollEnabled = false - textView.font = .preferredFont(forTextStyle: .body) - textView.textColor = .label - textView.keyboardType = keyboardType - textView.delegate = context.coordinator - textView.backgroundColor = .clear - - textView.translatesAutoresizingMaskIntoConstraints = false - let widthLayoutConstraint = textView.widthAnchor.constraint(equalToConstant: 100) - widthLayoutConstraint.priority = .required - 1 - context.coordinator.widthLayoutConstraint = widthLayoutConstraint - - return textView - } - - public func updateUIView(_ textView: UITextView, context: Context) { - // preserve currently selected text range to prevent cursor jump - let currentlySelectedRange = textView.selectedRange - - // update content - // textView.attributedText = attributedString - textView.text = string - - // update layout - context.coordinator.updateLayout(width: width) - - // set becomeFirstResponder - if viewDidAppear { - viewDidAppear = false - textView.becomeFirstResponder() - } - - // restore selected text range - textView.selectedRange = currentlySelectedRange - } - - public func makeCoordinator() -> Coordinator { - Coordinator(self) - } - - public class Coordinator: NSObject, UITextViewDelegate { - var parent: StatusEditorView - var widthLayoutConstraint: NSLayoutConstraint? - - init(_ parent: StatusEditorView) { - self.parent = parent - } - - public func textViewDidChange(_ textView: UITextView) { - // prevent break IME input - if textView.markedTextRange == nil { - parent.string = textView.text - } - } - - func updateLayout(width: CGFloat) { - guard let widthLayoutConstraint = widthLayoutConstraint else { return } - widthLayoutConstraint.constant = width - widthLayoutConstraint.isActive = true - } - } - -} - -