Refactor New Account dialog

This commit is contained in:
Bleak Grey 2020-09-10 20:10:24 +03:00 committed by GitHub
parent d30b3d40ac
commit 936ed2f374
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 1663 additions and 978 deletions

2
.gitignore vendored
View File

@ -1,4 +1,6 @@
_ignore
build
build.sh
subprojects/libhandy-*
subprojects/packagecache
*~

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "subprojects/libhandy"]
path = subprojects/libhandy
url = https://gitlab.gnome.org/GNOME/libhandy.git

View File

@ -2,7 +2,7 @@
border-radius: 4px;
}
.chip {
.header .chip {
padding: 4px 12px;
border-radius: 4px;
border: 1px solid black;
@ -28,7 +28,7 @@
.padded.app-view {
margin: 32px 0 32px 0;
}
.app-view:not(.padded) .preferences row {
.app-view:not(.padded) .content row {
border-radius: 0px;
}

View File

@ -81,3 +81,4 @@
</component>

View File

@ -3,10 +3,11 @@ Type=Application
Name=Tootle
Comment=Mastodon Client
GenericName=Mastodon Client
Exec=com.github.bleakgrey.tootle
Exec=com.github.bleakgrey.tootle %u
Icon=com.github.bleakgrey.tootle
Terminal=false
Categories=GNOME;GTK;Network;
Keywords=toot;mastodon;social;network;post;
X-GNOME-Gettext-Domain=com.github.bleakgrey.tootle
X-GNOME-UsesNotifications=true
MimeType=x-scheme-handler/tootle;

View File

@ -14,6 +14,7 @@
<file preprocess="xml-stripblanks">ui/widgets/list_editor_item.ui</file>
<file preprocess="xml-stripblanks">ui/widgets/attachment_slot.ui</file>
<file preprocess="xml-stripblanks">ui/widgets/compose_attachment.ui</file>
<file preprocess="xml-stripblanks">ui/dialogs/new_account.ui</file>
<file preprocess="xml-stripblanks">ui/dialogs/compose.ui</file>
<file preprocess="xml-stripblanks">ui/dialogs/main.ui</file>
<file preprocess="xml-stripblanks">ui/dialogs/preferences.ui</file>

View File

@ -34,3 +34,4 @@ i18n.merge_file(
install: true,
install_dir: join_paths(get_option('datadir'), 'metainfo')
)

View File

@ -2,6 +2,7 @@
<!-- Generated with glade 3.36.0 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<requires lib="libhandy" version="1.0"/>
<template class="TootleDialogsCompose" parent="GtkWindow">
<property name="can_focus">False</property>
<property name="default_width">500</property>

View File

@ -0,0 +1,343 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.2 -->
<interface>
<requires lib="gtk+" version="3.22"/>
<requires lib="libhandy" version="1.0"/>
<template class="TootleDialogsNewAccount" parent="GtkWindow">
<property name="can_focus">False</property>
<property name="modal">True</property>
<property name="default_width">700</property>
<property name="default_height">500</property>
<child type="titlebar">
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="title" translatable="yes">Add Account</property>
<property name="show_close_button">True</property>
<child>
<object class="GtkButton" id="back_button">
<property name="label" translatable="yes">Back</property>
<property name="width_request">80</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="on_back_clicked" swapped="no"/>
</object>
</child>
<child>
<object class="GtkButton" id="next_button">
<property name="width_request">80</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked" handler="on_next_clicked" swapped="no"/>
<child>
<object class="GtkStack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Next</property>
</object>
<packing>
<property name="name">idle</property>
</packing>
</child>
<child>
<object class="GtkSpinner">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="active">True</property>
</object>
<packing>
<property name="name">spinner</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<style>
<class name="suggested-action"/>
</style>
</object>
<packing>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child>
<object class="HdyClamp">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">18</property>
<property name="margin_right">18</property>
<property name="margin_top">18</property>
<property name="margin_bottom">18</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="maximum_size">400</property>
<child>
<object class="GtkStack" id="stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="transition_duration">100</property>
<property name="transition_type">crossfade</property>
<child>
<object class="GtkBox" id="instance_step">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">24</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">128</property>
<property name="icon_name">network-server-symbolic</property>
<property name="icon_size">0</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">What is your instance?</property>
<attributes>
<attribute name="weight" value="ultrabold"/>
<attribute name="scale" value="1.7"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">24</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton">
<property name="label">https://</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="instance_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="activate" handler="on_next_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<style>
<class name="linked"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">&lt;a href="https://joinmastodon.org/"&gt;Don't have one yet?&lt;/a&gt;</property>
<property name="use_markup">True</property>
<property name="track_visited_links">False</property>
<property name="xalign">1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">instance</property>
</packing>
</child>
<child>
<object class="GtkBox" id="code_step">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="orientation">vertical</property>
<property name="spacing">24</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">128</property>
<property name="icon_name">dialog-password-symbolic</property>
<property name="icon_size">0</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Enter Authorization Code</property>
<attributes>
<attribute name="weight" value="ultrabold"/>
<attribute name="scale" value="1.7"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">24</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkEntry" id="code_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="activate" handler="on_next_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="code_label">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">&lt;a href="tootle://manual_auth"&gt;Try manual authorization&lt;/a&gt;</property>
<property name="use_markup">True</property>
<property name="track_visited_links">False</property>
<property name="xalign">1</property>
<signal name="activate-link" handler="on_activate_code_label_link" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="name">code</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="done_step">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
<property name="orientation">vertical</property>
<property name="spacing">24</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixel_size">128</property>
<property name="icon_name">emblem-default-symbolic</property>
<property name="icon_size">0</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="hello_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">Hello, @user@instance.com!</property>
<attributes>
<attribute name="weight" value="ultrabold"/>
<attribute name="scale" value="1.7"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="name">done</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</template>
</interface>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.36.0 -->
<!-- Generated with glade 3.22.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<requires lib="libhandy" version="0.0"/>
<requires lib="libhandy" version="1.0"/>
<template class="TootleViewsBase" parent="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
@ -26,8 +26,8 @@
<object class="HdyClamp" id="clamp">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="maximum_size">632</property>
<property name="tightening-threshold">632</property>
<property name="maximum_size">650</property>
<property name="tightening_threshold">650</property>
<child>
<object class="GtkBox" id="column_view">
<property name="visible">True</property>
@ -125,7 +125,7 @@
</object>
<packing>
<property name="name">status</property>
<property name="title" translatable="no">page1</property>
<property name="title">page1</property>
</packing>
</child>
<child>
@ -139,7 +139,7 @@
<property name="can_focus">False</property>
<property name="selection_mode">none</property>
<style>
<class name="preferences"/>
<class name="content"/>
</style>
</object>
<packing>
@ -151,7 +151,7 @@
</object>
<packing>
<property name="name">content</property>
<property name="title" translatable="no">page0</property>
<property name="title">page0</property>
<property name="position">1</property>
</packing>
</child>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.36.0 -->
<!-- Generated with glade 3.22.2 -->
<interface>
<requires lib="gtk+" version="3.14"/>
<object class="GtkGrid" id="grid">
@ -112,7 +112,7 @@
</object>
</child>
<style>
<class name="preferences"/>
<class name="content"/>
</style>
</object>
<packing>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.36.0 -->
<!-- Generated with glade 3.22.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkPopover" id="popover">
@ -286,7 +286,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<style>
<class name="preferences"/>
<class name="content"/>
</style>
</object>
</child>

View File

@ -16,17 +16,11 @@ i18n = import('i18n')
add_global_arguments([
'-DGETTEXT_PACKAGE="@0@"'.format(meson.project_name()),
'-DHANDY_USE_UNSTABLE_API',
# '-DHANDY_USE_UNSTABLE_API',
],
language: 'c',
)
# FIXME Disable --disable-since-check after libhandy 1.0 is released
add_project_arguments (
'--disable-since-check',
language: 'vala'
)
asresources = gnome.compile_resources(
'as-resources', 'data/gresource.xml',
source_dir: 'data',
@ -39,7 +33,7 @@ build_file = configure_file(
configuration: config
)
libhandy_dep = dependency('libhandy-1', version: '>= 0.83.0', required: false)
libhandy_dep = dependency('libhandy-1', version: '>= 1.0', required: false)
if not libhandy_dep.found()
libhandy = subproject(
'libhandy',
@ -103,13 +97,13 @@ executable(
'src/Widgets/Attachment/Slot.vala',
'src/Widgets/Attachment/Picture.vala',
'src/Dialogs/ISavedWindow.vala',
'src/Dialogs/NewAccount.vala',
'src/Dialogs/MainWindow.vala',
'src/Dialogs/About.vala',
'src/Dialogs/Compose.vala',
'src/Dialogs/Preferences.vala',
'src/Dialogs/ListEditor.vala',
'src/Views/Base.vala',
'src/Views/NewAccount.vala',
'src/Views/Timeline.vala',
'src/Views/Home.vala',
'src/Views/Local.vala',

View File

@ -6,9 +6,9 @@ data/ui/dialogs/compose.ui
data/ui/dialogs/list_editor.ui
data/ui/dialogs/main.ui
data/ui/dialogs/preferences.ui
data/ui/dialogs/new_account.ui
data/ui/views/base.ui
data/ui/views/new_account.ui
data/ui/views/profile_header.ui
data/ui/widgets/accounts_button.ui
@ -19,7 +19,7 @@ data/ui/widgets/list_editor_item.ui
data/ui/widgets/list_item.ui
data/ui/widgets/profile_field_row.ui
data/ui/widgets/status.ui
data/ui/widgets/timeline_filter.ui
data/ui/widgets/timeline_menu.ui
src/Build.vala
src/Application.vala
@ -28,13 +28,14 @@ src/Drawing.vala
src/Html.vala
src/InstanceAccount.vala
src/Request.vala
src/Time.vala
src/DateTime.vala
src/Dialogs/About.vala
src/Dialogs/Compose.vala
src/Dialogs/ListEditor.vala
src/Dialogs/MainWindow.vala
src/Dialogs/Preferences.vala
src/Dialogs/NewAccount.vala
src/Services/Accounts.vala
src/Services/Cache.vala
@ -52,7 +53,6 @@ src/Views/Home.vala
src/Views/List.vala
src/Views/Lists.vala
src/Views/Local.vala
src/Views/NewAccount.vala
src/Views/Notifications.vala
src/Views/Profile.vala
src/Views/Search.vala
@ -67,5 +67,6 @@ src/Widgets/Conversation.vala
src/Widgets/Notification.vala
src/Widgets/RichLabel.vala
src/Widgets/Status.vala
src/Widgets/TimelineFilter.vala
src/Widgets/TimelineMenu.vala
src/Widgets/VisibilityPopover.vala

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-02 17:48+0300\n"
"POT-Creation-Date: 2020-09-07 21:26+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -105,7 +105,11 @@ msgstr ""
msgid "Media"
msgstr ""
#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
#: data/ui/dialogs/compose.ui:363
msgid "Publish"
msgstr ""
#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@ -125,6 +129,10 @@ msgstr ""
msgid "Save"
msgstr ""
#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
msgid "Compose"
msgstr ""
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@ -189,35 +197,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
#: data/ui/views/new_account.ui:80
msgid "Which Instance?\n"
#: data/ui/dialogs/new_account.ui:15
msgid "Add Account"
msgstr ""
#: data/ui/views/new_account.ui:100
msgid "<a href=\"https://joinmastodon.org/\">What's an instance?</a>"
#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
msgid "Back"
msgstr ""
#: data/ui/views/new_account.ui:117
msgid "instance.domain"
#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
msgid "Next"
msgstr ""
#: data/ui/views/new_account.ui:146
msgid "Grant Account Access\n"
#: data/ui/dialogs/new_account.ui:118
msgid "What is your instance?"
msgstr ""
#: data/ui/views/new_account.ui:166
msgid "Paste"
#: data/ui/dialogs/new_account.ui:181
msgid "<a href=\"https://joinmastodon.org/\">Don't have one yet?</a>"
msgstr ""
#: data/ui/views/new_account.ui:167
msgid "Paste your authorization code here"
#: data/ui/dialogs/new_account.ui:232
msgid "Enter Authorization Code"
msgstr ""
#: data/ui/views/new_account.ui:182
msgid "<a href=\"\">Try another instance?</a>"
#: data/ui/dialogs/new_account.ui:267
msgid "<a href=\"tootle://manual_auth\">Didn't receive the code?</a>"
msgstr ""
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@ -249,7 +257,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: data/ui/widgets/accounts_button.ui:248
#: data/ui/widgets/accounts_button.ui:236
msgid "About"
msgstr ""
#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@ -274,7 +286,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
#: src/Widgets/Status.vala:232
#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@ -286,36 +298,10 @@ msgstr ""
msgid "Edit"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:26
msgid "Show:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:56
msgid "0 Posts"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:79
msgid "0 Follows"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:102
msgid "0 Followers"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:159
msgid "Filter:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:189
msgid "None"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:211
msgid "Include Replies"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:233
msgid "Only Media"
#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
#: src/Build.vala:15
msgid " "
msgstr ""
#: src/Desktop.vala:18
@ -330,15 +316,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
#: src/DateTime.vala:11
msgid "Just now"
msgstr ""
#: src/DateTime.vala:21
msgid "Yesterday"
msgstr ""
#: src/DateTime.vala:24
msgid "%b %e"
msgstr ""
#: src/DateTime.vala:27
msgid "%b %e, %Y"
msgstr ""
#: src/Dialogs/About.vala:14
msgid "Report an issue"
msgstr ""
#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
#: src/Dialogs/Compose.vala:126
msgid "Publish"
msgstr ""
#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@ -366,12 +368,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
#: src/Dialogs/MainWindow.vala:37
msgid "Back"
#: src/Dialogs/NewAccount.vala:73
msgid "Close"
msgstr ""
#: src/Dialogs/MainWindow.vala:40
msgid "Compose"
#: src/Dialogs/NewAccount.vala:74
msgid "Add Another"
msgstr ""
#: src/Dialogs/NewAccount.vala:116
msgid "Please enter a valid instance URL"
msgstr ""
#: src/Dialogs/NewAccount.vala:149
msgid "Please enter a valid authorization code"
msgstr ""
#: src/Dialogs/NewAccount.vala:165
msgid "Instance failed to authorize the access token"
msgstr ""
#: src/Dialogs/NewAccount.vala:179
#, c-format
msgid "Hello, %s!"
msgstr ""
#: src/Dialogs/NewAccount.vala:207
msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@ -390,7 +413,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
#: src/Views/Base.vala:47
#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@ -411,35 +434,52 @@ msgstr ""
msgid "Local"
msgstr ""
#: src/Views/NewAccount.vala:27
msgid "New Account"
msgstr ""
#: src/Views/NewAccount.vala:94
msgid "Instance URL is invalid"
msgstr ""
#: src/Views/NewAccount.vala:135
msgid "Please paste a valid authorization code"
msgstr ""
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
#: src/Views/Profile.vala:113
#: src/Views/Profile.vala:134
#, c-format
msgid "Block \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:134
#, c-format
msgid "Unblock \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Block Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Unblock Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:148
msgid ""
"Blocking a domain will:\n"
"\n"
"• Remove its public posts and notifications from your timelines\n"
"• Remove its followers from your account\n"
"• Prevent you from following its users"
msgstr ""
#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
#: src/Views/Profile.vala:115
#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
#: src/Views/Profile.vala:117
#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
#: src/Views/Profile.vala:126
#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@ -468,11 +508,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
#: src/Widgets/AccountsButton.vala:156
#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
#: src/Widgets/AccountsButton.vala:157
#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@ -480,26 +520,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
#: src/Widgets/Status.vala:152
#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
#: src/Widgets/Status.vala:202
#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
#: src/Widgets/Status.vala:204
#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
#: src/Widgets/Status.vala:206
#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""

View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-02 17:48+0300\n"
"PO-Revision-Date: 2020-08-02 15:03+0300\n"
"POT-Creation-Date: 2020-09-07 21:26+0300\n"
"PO-Revision-Date: 2020-09-07 21:26+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: de\n"
@ -105,7 +105,11 @@ msgstr ""
msgid "Media"
msgstr ""
#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
#: data/ui/dialogs/compose.ui:363
msgid "Publish"
msgstr ""
#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@ -125,6 +129,10 @@ msgstr ""
msgid "Save"
msgstr ""
#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
msgid "Compose"
msgstr ""
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@ -189,35 +197,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
#: data/ui/views/new_account.ui:80
msgid "Which Instance?\n"
#: data/ui/dialogs/new_account.ui:15
msgid "Add Account"
msgstr ""
#: data/ui/views/new_account.ui:100
msgid "<a href=\"https://joinmastodon.org/\">What's an instance?</a>"
#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
msgid "Back"
msgstr ""
#: data/ui/views/new_account.ui:117
msgid "instance.domain"
#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
msgid "Next"
msgstr ""
#: data/ui/views/new_account.ui:146
msgid "Grant Account Access\n"
#: data/ui/dialogs/new_account.ui:118
msgid "What is your instance?"
msgstr ""
#: data/ui/views/new_account.ui:166
msgid "Paste"
#: data/ui/dialogs/new_account.ui:181
msgid "<a href=\"https://joinmastodon.org/\">Don't have one yet?</a>"
msgstr ""
#: data/ui/views/new_account.ui:167
msgid "Paste your authorization code here"
#: data/ui/dialogs/new_account.ui:232
msgid "Enter Authorization Code"
msgstr ""
#: data/ui/views/new_account.ui:182
msgid "<a href=\"\">Try another instance?</a>"
#: data/ui/dialogs/new_account.ui:267
msgid "<a href=\"tootle://manual_auth\">Didn't receive the code?</a>"
msgstr ""
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@ -249,7 +257,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: data/ui/widgets/accounts_button.ui:248
#: data/ui/widgets/accounts_button.ui:236
msgid "About"
msgstr ""
#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@ -274,7 +286,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
#: src/Widgets/Status.vala:232
#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@ -286,36 +298,10 @@ msgstr ""
msgid "Edit"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:26
msgid "Show:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:56
msgid "0 Posts"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:79
msgid "0 Follows"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:102
msgid "0 Followers"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:159
msgid "Filter:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:189
msgid "None"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:211
msgid "Include Replies"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:233
msgid "Only Media"
#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
#: src/Build.vala:15
msgid " "
msgstr ""
#: src/Desktop.vala:18
@ -330,15 +316,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
#: src/DateTime.vala:11
msgid "Just now"
msgstr ""
#: src/DateTime.vala:21
msgid "Yesterday"
msgstr ""
#: src/DateTime.vala:24
msgid "%b %e"
msgstr ""
#: src/DateTime.vala:27
msgid "%b %e, %Y"
msgstr ""
#: src/Dialogs/About.vala:14
msgid "Report an issue"
msgstr ""
#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
#: src/Dialogs/Compose.vala:126
msgid "Publish"
msgstr ""
#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@ -366,12 +368,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
#: src/Dialogs/MainWindow.vala:37
msgid "Back"
#: src/Dialogs/NewAccount.vala:73
msgid "Close"
msgstr ""
#: src/Dialogs/MainWindow.vala:40
msgid "Compose"
#: src/Dialogs/NewAccount.vala:74
msgid "Add Another"
msgstr ""
#: src/Dialogs/NewAccount.vala:116
msgid "Please enter a valid instance URL"
msgstr ""
#: src/Dialogs/NewAccount.vala:149
msgid "Please enter a valid authorization code"
msgstr ""
#: src/Dialogs/NewAccount.vala:165
msgid "Instance failed to authorize the access token"
msgstr ""
#: src/Dialogs/NewAccount.vala:179
#, c-format
msgid "Hello, %s!"
msgstr ""
#: src/Dialogs/NewAccount.vala:207
msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@ -390,7 +413,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
#: src/Views/Base.vala:47
#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@ -411,35 +434,52 @@ msgstr ""
msgid "Local"
msgstr ""
#: src/Views/NewAccount.vala:27
msgid "New Account"
msgstr ""
#: src/Views/NewAccount.vala:94
msgid "Instance URL is invalid"
msgstr ""
#: src/Views/NewAccount.vala:135
msgid "Please paste a valid authorization code"
msgstr ""
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
#: src/Views/Profile.vala:113
#: src/Views/Profile.vala:134
#, c-format
msgid "Block \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:134
#, c-format
msgid "Unblock \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Block Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Unblock Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:148
msgid ""
"Blocking a domain will:\n"
"\n"
"• Remove its public posts and notifications from your timelines\n"
"• Remove its followers from your account\n"
"• Prevent you from following its users"
msgstr ""
#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
#: src/Views/Profile.vala:115
#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
#: src/Views/Profile.vala:117
#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
#: src/Views/Profile.vala:126
#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@ -468,11 +508,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
#: src/Widgets/AccountsButton.vala:156
#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
#: src/Widgets/AccountsButton.vala:157
#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@ -480,26 +520,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
#: src/Widgets/Status.vala:152
#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
#: src/Widgets/Status.vala:202
#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
#: src/Widgets/Status.vala:204
#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
#: src/Widgets/Status.vala:206
#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""

View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-02 17:48+0300\n"
"PO-Revision-Date: 2020-08-02 15:03+0300\n"
"POT-Creation-Date: 2020-09-07 21:26+0300\n"
"PO-Revision-Date: 2020-09-07 21:26+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: es_MX\n"
@ -105,7 +105,11 @@ msgstr ""
msgid "Media"
msgstr ""
#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
#: data/ui/dialogs/compose.ui:363
msgid "Publish"
msgstr ""
#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@ -125,6 +129,10 @@ msgstr ""
msgid "Save"
msgstr ""
#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
msgid "Compose"
msgstr ""
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@ -189,35 +197,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
#: data/ui/views/new_account.ui:80
msgid "Which Instance?\n"
#: data/ui/dialogs/new_account.ui:15
msgid "Add Account"
msgstr ""
#: data/ui/views/new_account.ui:100
msgid "<a href=\"https://joinmastodon.org/\">What's an instance?</a>"
#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
msgid "Back"
msgstr ""
#: data/ui/views/new_account.ui:117
msgid "instance.domain"
#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
msgid "Next"
msgstr ""
#: data/ui/views/new_account.ui:146
msgid "Grant Account Access\n"
#: data/ui/dialogs/new_account.ui:118
msgid "What is your instance?"
msgstr ""
#: data/ui/views/new_account.ui:166
msgid "Paste"
#: data/ui/dialogs/new_account.ui:181
msgid "<a href=\"https://joinmastodon.org/\">Don't have one yet?</a>"
msgstr ""
#: data/ui/views/new_account.ui:167
msgid "Paste your authorization code here"
#: data/ui/dialogs/new_account.ui:232
msgid "Enter Authorization Code"
msgstr ""
#: data/ui/views/new_account.ui:182
msgid "<a href=\"\">Try another instance?</a>"
#: data/ui/dialogs/new_account.ui:267
msgid "<a href=\"tootle://manual_auth\">Didn't receive the code?</a>"
msgstr ""
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@ -249,7 +257,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: data/ui/widgets/accounts_button.ui:248
#: data/ui/widgets/accounts_button.ui:236
msgid "About"
msgstr ""
#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@ -274,7 +286,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
#: src/Widgets/Status.vala:232
#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@ -286,36 +298,10 @@ msgstr ""
msgid "Edit"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:26
msgid "Show:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:56
msgid "0 Posts"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:79
msgid "0 Follows"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:102
msgid "0 Followers"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:159
msgid "Filter:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:189
msgid "None"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:211
msgid "Include Replies"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:233
msgid "Only Media"
#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
#: src/Build.vala:15
msgid " "
msgstr ""
#: src/Desktop.vala:18
@ -330,15 +316,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
#: src/DateTime.vala:11
msgid "Just now"
msgstr ""
#: src/DateTime.vala:21
msgid "Yesterday"
msgstr ""
#: src/DateTime.vala:24
msgid "%b %e"
msgstr ""
#: src/DateTime.vala:27
msgid "%b %e, %Y"
msgstr ""
#: src/Dialogs/About.vala:14
msgid "Report an issue"
msgstr ""
#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
#: src/Dialogs/Compose.vala:126
msgid "Publish"
msgstr ""
#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@ -366,12 +368,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
#: src/Dialogs/MainWindow.vala:37
msgid "Back"
#: src/Dialogs/NewAccount.vala:73
msgid "Close"
msgstr ""
#: src/Dialogs/MainWindow.vala:40
msgid "Compose"
#: src/Dialogs/NewAccount.vala:74
msgid "Add Another"
msgstr ""
#: src/Dialogs/NewAccount.vala:116
msgid "Please enter a valid instance URL"
msgstr ""
#: src/Dialogs/NewAccount.vala:149
msgid "Please enter a valid authorization code"
msgstr ""
#: src/Dialogs/NewAccount.vala:165
msgid "Instance failed to authorize the access token"
msgstr ""
#: src/Dialogs/NewAccount.vala:179
#, c-format
msgid "Hello, %s!"
msgstr ""
#: src/Dialogs/NewAccount.vala:207
msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@ -390,7 +413,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
#: src/Views/Base.vala:47
#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@ -411,35 +434,52 @@ msgstr ""
msgid "Local"
msgstr ""
#: src/Views/NewAccount.vala:27
msgid "New Account"
msgstr ""
#: src/Views/NewAccount.vala:94
msgid "Instance URL is invalid"
msgstr ""
#: src/Views/NewAccount.vala:135
msgid "Please paste a valid authorization code"
msgstr ""
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
#: src/Views/Profile.vala:113
#: src/Views/Profile.vala:134
#, c-format
msgid "Block \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:134
#, c-format
msgid "Unblock \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Block Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Unblock Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:148
msgid ""
"Blocking a domain will:\n"
"\n"
"• Remove its public posts and notifications from your timelines\n"
"• Remove its followers from your account\n"
"• Prevent you from following its users"
msgstr ""
#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
#: src/Views/Profile.vala:115
#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
#: src/Views/Profile.vala:117
#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
#: src/Views/Profile.vala:126
#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@ -468,11 +508,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
#: src/Widgets/AccountsButton.vala:156
#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
#: src/Widgets/AccountsButton.vala:157
#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@ -480,26 +520,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
#: src/Widgets/Status.vala:152
#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
#: src/Widgets/Status.vala:202
#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
#: src/Widgets/Status.vala:204
#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
#: src/Widgets/Status.vala:206
#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""

View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-02 17:48+0300\n"
"PO-Revision-Date: 2020-08-02 15:03+0300\n"
"POT-Creation-Date: 2020-09-07 21:26+0300\n"
"PO-Revision-Date: 2020-09-07 21:26+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: fr\n"
@ -105,7 +105,11 @@ msgstr ""
msgid "Media"
msgstr ""
#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
#: data/ui/dialogs/compose.ui:363
msgid "Publish"
msgstr ""
#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@ -125,6 +129,10 @@ msgstr ""
msgid "Save"
msgstr ""
#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
msgid "Compose"
msgstr ""
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@ -189,35 +197,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
#: data/ui/views/new_account.ui:80
msgid "Which Instance?\n"
#: data/ui/dialogs/new_account.ui:15
msgid "Add Account"
msgstr ""
#: data/ui/views/new_account.ui:100
msgid "<a href=\"https://joinmastodon.org/\">What's an instance?</a>"
#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
msgid "Back"
msgstr ""
#: data/ui/views/new_account.ui:117
msgid "instance.domain"
#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
msgid "Next"
msgstr ""
#: data/ui/views/new_account.ui:146
msgid "Grant Account Access\n"
#: data/ui/dialogs/new_account.ui:118
msgid "What is your instance?"
msgstr ""
#: data/ui/views/new_account.ui:166
msgid "Paste"
#: data/ui/dialogs/new_account.ui:181
msgid "<a href=\"https://joinmastodon.org/\">Don't have one yet?</a>"
msgstr ""
#: data/ui/views/new_account.ui:167
msgid "Paste your authorization code here"
#: data/ui/dialogs/new_account.ui:232
msgid "Enter Authorization Code"
msgstr ""
#: data/ui/views/new_account.ui:182
msgid "<a href=\"\">Try another instance?</a>"
#: data/ui/dialogs/new_account.ui:267
msgid "<a href=\"tootle://manual_auth\">Didn't receive the code?</a>"
msgstr ""
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@ -249,7 +257,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: data/ui/widgets/accounts_button.ui:248
#: data/ui/widgets/accounts_button.ui:236
msgid "About"
msgstr ""
#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@ -274,7 +286,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
#: src/Widgets/Status.vala:232
#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@ -286,36 +298,10 @@ msgstr ""
msgid "Edit"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:26
msgid "Show:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:56
msgid "0 Posts"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:79
msgid "0 Follows"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:102
msgid "0 Followers"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:159
msgid "Filter:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:189
msgid "None"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:211
msgid "Include Replies"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:233
msgid "Only Media"
#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
#: src/Build.vala:15
msgid " "
msgstr ""
#: src/Desktop.vala:18
@ -330,15 +316,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
#: src/DateTime.vala:11
msgid "Just now"
msgstr ""
#: src/DateTime.vala:21
msgid "Yesterday"
msgstr ""
#: src/DateTime.vala:24
msgid "%b %e"
msgstr ""
#: src/DateTime.vala:27
msgid "%b %e, %Y"
msgstr ""
#: src/Dialogs/About.vala:14
msgid "Report an issue"
msgstr ""
#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
#: src/Dialogs/Compose.vala:126
msgid "Publish"
msgstr ""
#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@ -366,12 +368,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
#: src/Dialogs/MainWindow.vala:37
msgid "Back"
#: src/Dialogs/NewAccount.vala:73
msgid "Close"
msgstr ""
#: src/Dialogs/MainWindow.vala:40
msgid "Compose"
#: src/Dialogs/NewAccount.vala:74
msgid "Add Another"
msgstr ""
#: src/Dialogs/NewAccount.vala:116
msgid "Please enter a valid instance URL"
msgstr ""
#: src/Dialogs/NewAccount.vala:149
msgid "Please enter a valid authorization code"
msgstr ""
#: src/Dialogs/NewAccount.vala:165
msgid "Instance failed to authorize the access token"
msgstr ""
#: src/Dialogs/NewAccount.vala:179
#, c-format
msgid "Hello, %s!"
msgstr ""
#: src/Dialogs/NewAccount.vala:207
msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@ -390,7 +413,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
#: src/Views/Base.vala:47
#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@ -411,35 +434,52 @@ msgstr ""
msgid "Local"
msgstr ""
#: src/Views/NewAccount.vala:27
msgid "New Account"
msgstr ""
#: src/Views/NewAccount.vala:94
msgid "Instance URL is invalid"
msgstr ""
#: src/Views/NewAccount.vala:135
msgid "Please paste a valid authorization code"
msgstr ""
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
#: src/Views/Profile.vala:113
#: src/Views/Profile.vala:134
#, c-format
msgid "Block \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:134
#, c-format
msgid "Unblock \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Block Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Unblock Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:148
msgid ""
"Blocking a domain will:\n"
"\n"
"• Remove its public posts and notifications from your timelines\n"
"• Remove its followers from your account\n"
"• Prevent you from following its users"
msgstr ""
#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
#: src/Views/Profile.vala:115
#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
#: src/Views/Profile.vala:117
#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
#: src/Views/Profile.vala:126
#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@ -468,11 +508,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
#: src/Widgets/AccountsButton.vala:156
#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
#: src/Widgets/AccountsButton.vala:157
#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@ -480,26 +520,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
#: src/Widgets/Status.vala:152
#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
#: src/Widgets/Status.vala:202
#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
#: src/Widgets/Status.vala:204
#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
#: src/Widgets/Status.vala:206
#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""

View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-02 17:48+0300\n"
"PO-Revision-Date: 2020-08-02 15:03+0300\n"
"POT-Creation-Date: 2020-09-07 21:26+0300\n"
"PO-Revision-Date: 2020-09-07 21:26+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: pl\n"
@ -106,7 +106,11 @@ msgstr ""
msgid "Media"
msgstr ""
#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
#: data/ui/dialogs/compose.ui:363
msgid "Publish"
msgstr ""
#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@ -126,6 +130,10 @@ msgstr ""
msgid "Save"
msgstr ""
#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
msgid "Compose"
msgstr ""
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@ -190,35 +198,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
#: data/ui/views/new_account.ui:80
msgid "Which Instance?\n"
#: data/ui/dialogs/new_account.ui:15
msgid "Add Account"
msgstr ""
#: data/ui/views/new_account.ui:100
msgid "<a href=\"https://joinmastodon.org/\">What's an instance?</a>"
#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
msgid "Back"
msgstr ""
#: data/ui/views/new_account.ui:117
msgid "instance.domain"
#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
msgid "Next"
msgstr ""
#: data/ui/views/new_account.ui:146
msgid "Grant Account Access\n"
#: data/ui/dialogs/new_account.ui:118
msgid "What is your instance?"
msgstr ""
#: data/ui/views/new_account.ui:166
msgid "Paste"
#: data/ui/dialogs/new_account.ui:181
msgid "<a href=\"https://joinmastodon.org/\">Don't have one yet?</a>"
msgstr ""
#: data/ui/views/new_account.ui:167
msgid "Paste your authorization code here"
#: data/ui/dialogs/new_account.ui:232
msgid "Enter Authorization Code"
msgstr ""
#: data/ui/views/new_account.ui:182
msgid "<a href=\"\">Try another instance?</a>"
#: data/ui/dialogs/new_account.ui:267
msgid "<a href=\"tootle://manual_auth\">Didn't receive the code?</a>"
msgstr ""
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@ -250,7 +258,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: data/ui/widgets/accounts_button.ui:248
#: data/ui/widgets/accounts_button.ui:236
msgid "About"
msgstr ""
#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@ -275,7 +287,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
#: src/Widgets/Status.vala:232
#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@ -287,36 +299,10 @@ msgstr ""
msgid "Edit"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:26
msgid "Show:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:56
msgid "0 Posts"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:79
msgid "0 Follows"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:102
msgid "0 Followers"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:159
msgid "Filter:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:189
msgid "None"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:211
msgid "Include Replies"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:233
msgid "Only Media"
#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
#: src/Build.vala:15
msgid " "
msgstr ""
#: src/Desktop.vala:18
@ -331,15 +317,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
#: src/DateTime.vala:11
msgid "Just now"
msgstr ""
#: src/DateTime.vala:21
msgid "Yesterday"
msgstr ""
#: src/DateTime.vala:24
msgid "%b %e"
msgstr ""
#: src/DateTime.vala:27
msgid "%b %e, %Y"
msgstr ""
#: src/Dialogs/About.vala:14
msgid "Report an issue"
msgstr ""
#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
#: src/Dialogs/Compose.vala:126
msgid "Publish"
msgstr ""
#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@ -367,12 +369,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
#: src/Dialogs/MainWindow.vala:37
msgid "Back"
#: src/Dialogs/NewAccount.vala:73
msgid "Close"
msgstr ""
#: src/Dialogs/MainWindow.vala:40
msgid "Compose"
#: src/Dialogs/NewAccount.vala:74
msgid "Add Another"
msgstr ""
#: src/Dialogs/NewAccount.vala:116
msgid "Please enter a valid instance URL"
msgstr ""
#: src/Dialogs/NewAccount.vala:149
msgid "Please enter a valid authorization code"
msgstr ""
#: src/Dialogs/NewAccount.vala:165
msgid "Instance failed to authorize the access token"
msgstr ""
#: src/Dialogs/NewAccount.vala:179
#, c-format
msgid "Hello, %s!"
msgstr ""
#: src/Dialogs/NewAccount.vala:207
msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@ -391,7 +414,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
#: src/Views/Base.vala:47
#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@ -412,35 +435,52 @@ msgstr ""
msgid "Local"
msgstr ""
#: src/Views/NewAccount.vala:27
msgid "New Account"
msgstr ""
#: src/Views/NewAccount.vala:94
msgid "Instance URL is invalid"
msgstr ""
#: src/Views/NewAccount.vala:135
msgid "Please paste a valid authorization code"
msgstr ""
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
#: src/Views/Profile.vala:113
#: src/Views/Profile.vala:134
#, c-format
msgid "Block \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:134
#, c-format
msgid "Unblock \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Block Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Unblock Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:148
msgid ""
"Blocking a domain will:\n"
"\n"
"• Remove its public posts and notifications from your timelines\n"
"• Remove its followers from your account\n"
"• Prevent you from following its users"
msgstr ""
#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
#: src/Views/Profile.vala:115
#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
#: src/Views/Profile.vala:117
#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
#: src/Views/Profile.vala:126
#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@ -469,11 +509,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
#: src/Widgets/AccountsButton.vala:156
#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
#: src/Widgets/AccountsButton.vala:157
#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@ -481,26 +521,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
#: src/Widgets/Status.vala:152
#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
#: src/Widgets/Status.vala:202
#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
#: src/Widgets/Status.vala:204
#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
#: src/Widgets/Status.vala:206
#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""

View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-02 17:48+0300\n"
"PO-Revision-Date: 2020-08-02 15:03+0300\n"
"POT-Creation-Date: 2020-09-07 21:26+0300\n"
"PO-Revision-Date: 2020-09-07 21:26+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: ru\n"
@ -106,7 +106,11 @@ msgstr ""
msgid "Media"
msgstr ""
#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
#: data/ui/dialogs/compose.ui:363
msgid "Publish"
msgstr ""
#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@ -126,6 +130,10 @@ msgstr ""
msgid "Save"
msgstr ""
#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
msgid "Compose"
msgstr ""
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@ -190,35 +198,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
#: data/ui/views/new_account.ui:80
msgid "Which Instance?\n"
#: data/ui/dialogs/new_account.ui:15
msgid "Add Account"
msgstr ""
#: data/ui/views/new_account.ui:100
msgid "<a href=\"https://joinmastodon.org/\">What's an instance?</a>"
#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
msgid "Back"
msgstr ""
#: data/ui/views/new_account.ui:117
msgid "instance.domain"
#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
msgid "Next"
msgstr ""
#: data/ui/views/new_account.ui:146
msgid "Grant Account Access\n"
#: data/ui/dialogs/new_account.ui:118
msgid "What is your instance?"
msgstr ""
#: data/ui/views/new_account.ui:166
msgid "Paste"
#: data/ui/dialogs/new_account.ui:181
msgid "<a href=\"https://joinmastodon.org/\">Don't have one yet?</a>"
msgstr ""
#: data/ui/views/new_account.ui:167
msgid "Paste your authorization code here"
#: data/ui/dialogs/new_account.ui:232
msgid "Enter Authorization Code"
msgstr ""
#: data/ui/views/new_account.ui:182
msgid "<a href=\"\">Try another instance?</a>"
#: data/ui/dialogs/new_account.ui:267
msgid "<a href=\"tootle://manual_auth\">Didn't receive the code?</a>"
msgstr ""
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@ -250,7 +258,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: data/ui/widgets/accounts_button.ui:248
#: data/ui/widgets/accounts_button.ui:236
msgid "About"
msgstr ""
#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@ -275,7 +287,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
#: src/Widgets/Status.vala:232
#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@ -287,36 +299,10 @@ msgstr ""
msgid "Edit"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:26
msgid "Show:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:56
msgid "0 Posts"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:79
msgid "0 Follows"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:102
msgid "0 Followers"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:159
msgid "Filter:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:189
msgid "None"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:211
msgid "Include Replies"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:233
msgid "Only Media"
#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
#: src/Build.vala:15
msgid " "
msgstr ""
#: src/Desktop.vala:18
@ -331,15 +317,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
#: src/DateTime.vala:11
msgid "Just now"
msgstr ""
#: src/DateTime.vala:21
msgid "Yesterday"
msgstr ""
#: src/DateTime.vala:24
msgid "%b %e"
msgstr ""
#: src/DateTime.vala:27
msgid "%b %e, %Y"
msgstr ""
#: src/Dialogs/About.vala:14
msgid "Report an issue"
msgstr ""
#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
#: src/Dialogs/Compose.vala:126
msgid "Publish"
msgstr ""
#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@ -367,12 +369,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
#: src/Dialogs/MainWindow.vala:37
msgid "Back"
#: src/Dialogs/NewAccount.vala:73
msgid "Close"
msgstr ""
#: src/Dialogs/MainWindow.vala:40
msgid "Compose"
#: src/Dialogs/NewAccount.vala:74
msgid "Add Another"
msgstr ""
#: src/Dialogs/NewAccount.vala:116
msgid "Please enter a valid instance URL"
msgstr ""
#: src/Dialogs/NewAccount.vala:149
msgid "Please enter a valid authorization code"
msgstr ""
#: src/Dialogs/NewAccount.vala:165
msgid "Instance failed to authorize the access token"
msgstr ""
#: src/Dialogs/NewAccount.vala:179
#, c-format
msgid "Hello, %s!"
msgstr ""
#: src/Dialogs/NewAccount.vala:207
msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@ -391,7 +414,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
#: src/Views/Base.vala:47
#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@ -412,35 +435,52 @@ msgstr ""
msgid "Local"
msgstr ""
#: src/Views/NewAccount.vala:27
msgid "New Account"
msgstr ""
#: src/Views/NewAccount.vala:94
msgid "Instance URL is invalid"
msgstr ""
#: src/Views/NewAccount.vala:135
msgid "Please paste a valid authorization code"
msgstr ""
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
#: src/Views/Profile.vala:113
#: src/Views/Profile.vala:134
#, c-format
msgid "Block \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:134
#, c-format
msgid "Unblock \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Block Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Unblock Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:148
msgid ""
"Blocking a domain will:\n"
"\n"
"• Remove its public posts and notifications from your timelines\n"
"• Remove its followers from your account\n"
"• Prevent you from following its users"
msgstr ""
#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
#: src/Views/Profile.vala:115
#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
#: src/Views/Profile.vala:117
#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
#: src/Views/Profile.vala:126
#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@ -469,11 +509,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
#: src/Widgets/AccountsButton.vala:156
#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
#: src/Widgets/AccountsButton.vala:157
#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@ -481,26 +521,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
#: src/Widgets/Status.vala:152
#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
#: src/Widgets/Status.vala:202
#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
#: src/Widgets/Status.vala:204
#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
#: src/Widgets/Status.vala:206
#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""

View File

@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: com.github.bleakgrey.tootle\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-02 17:48+0300\n"
"PO-Revision-Date: 2020-08-02 15:03+0300\n"
"POT-Creation-Date: 2020-09-07 21:26+0300\n"
"PO-Revision-Date: 2020-09-07 21:26+0300\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: zh_CN\n"
@ -104,7 +104,11 @@ msgstr ""
msgid "Media"
msgstr ""
#: data/ui/dialogs/compose.ui:391 data/ui/dialogs/list_editor.ui:239
#: data/ui/dialogs/compose.ui:363
msgid "Publish"
msgstr ""
#: data/ui/dialogs/compose.ui:392 data/ui/dialogs/list_editor.ui:239
msgid "Cancel"
msgstr ""
@ -124,6 +128,10 @@ msgstr ""
msgid "Save"
msgstr ""
#: data/ui/dialogs/main.ui:148 src/Dialogs/Compose.vala:125
msgid "Compose"
msgstr ""
#: data/ui/dialogs/preferences.ui:16
msgid "General"
msgstr ""
@ -188,35 +196,35 @@ msgstr ""
msgid "Warning: This will use more resources on crowded instances"
msgstr ""
#: data/ui/views/new_account.ui:80
msgid "Which Instance?\n"
#: data/ui/dialogs/new_account.ui:15
msgid "Add Account"
msgstr ""
#: data/ui/views/new_account.ui:100
msgid "<a href=\"https://joinmastodon.org/\">What's an instance?</a>"
#: data/ui/dialogs/new_account.ui:19 src/Dialogs/NewAccount.vala:74
msgid "Back"
msgstr ""
#: data/ui/views/new_account.ui:117
msgid "instance.domain"
#: data/ui/dialogs/new_account.ui:42 src/Dialogs/NewAccount.vala:73
msgid "Next"
msgstr ""
#: data/ui/views/new_account.ui:146
msgid "Grant Account Access\n"
#: data/ui/dialogs/new_account.ui:118
msgid "What is your instance?"
msgstr ""
#: data/ui/views/new_account.ui:166
msgid "Paste"
#: data/ui/dialogs/new_account.ui:181
msgid "<a href=\"https://joinmastodon.org/\">Don't have one yet?</a>"
msgstr ""
#: data/ui/views/new_account.ui:167
msgid "Paste your authorization code here"
#: data/ui/dialogs/new_account.ui:232
msgid "Enter Authorization Code"
msgstr ""
#: data/ui/views/new_account.ui:182
msgid "<a href=\"\">Try another instance?</a>"
#: data/ui/dialogs/new_account.ui:267
msgid "<a href=\"tootle://manual_auth\">Didn't receive the code?</a>"
msgstr ""
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:126
#: data/ui/views/profile_header.ui:142 src/Views/Profile.vala:217
msgid "Follow"
msgstr ""
@ -248,7 +256,11 @@ msgstr ""
msgid "Preferences"
msgstr ""
#: data/ui/widgets/accounts_button.ui:248
#: data/ui/widgets/accounts_button.ui:236
msgid "About"
msgstr ""
#: data/ui/widgets/accounts_button.ui:262
msgid "Accounts"
msgstr ""
@ -273,7 +285,7 @@ msgid "Unknown"
msgstr ""
#: data/ui/widgets/compose_attachment.ui:113 data/ui/widgets/list_item.ui:74
#: src/Widgets/Status.vala:232
#: src/Widgets/Status.vala:231
msgid "Delete"
msgstr ""
@ -285,36 +297,10 @@ msgstr ""
msgid "Edit"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:26
msgid "Show:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:56
msgid "0 Posts"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:79
msgid "0 Follows"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:102
msgid "0 Followers"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:159
msgid "Filter:"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:189
msgid "None"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:211
msgid "Include Replies"
msgstr ""
#: data/ui/widgets/timeline_filter.ui:233
msgid "Only Media"
#. Please do not remove the credits below. You may add your own, but keep the existing ones intact.
#. TRANSLATORS: Replace this with your name. It will be displayed in the About dialog.
#: src/Build.vala:15
msgid " "
msgstr ""
#: src/Desktop.vala:18
@ -329,15 +315,31 @@ msgstr ""
msgid "[ There was an error parsing this text :c ]"
msgstr ""
#: src/Dialogs/Compose.vala:83 src/Views/Lists.vala:33
#: src/DateTime.vala:11
msgid "Just now"
msgstr ""
#: src/DateTime.vala:21
msgid "Yesterday"
msgstr ""
#: src/DateTime.vala:24
msgid "%b %e"
msgstr ""
#: src/DateTime.vala:27
msgid "%b %e, %Y"
msgstr ""
#: src/Dialogs/About.vala:14
msgid "Report an issue"
msgstr ""
#: src/Dialogs/Compose.vala:81 src/Views/Lists.vala:33
msgid "This action cannot be reverted."
msgstr ""
#: src/Dialogs/Compose.vala:126
msgid "Publish"
msgstr ""
#: src/Dialogs/Compose.vala:136 src/Widgets/Status.vala:242
#: src/Dialogs/Compose.vala:135 src/Widgets/Status.vala:241
msgid "Redraft"
msgstr ""
@ -365,12 +367,33 @@ msgstr ""
msgid "You need to save the list if you want to keep them."
msgstr ""
#: src/Dialogs/MainWindow.vala:37
msgid "Back"
#: src/Dialogs/NewAccount.vala:73
msgid "Close"
msgstr ""
#: src/Dialogs/MainWindow.vala:40
msgid "Compose"
#: src/Dialogs/NewAccount.vala:74
msgid "Add Another"
msgstr ""
#: src/Dialogs/NewAccount.vala:116
msgid "Please enter a valid instance URL"
msgstr ""
#: src/Dialogs/NewAccount.vala:149
msgid "Please enter a valid authorization code"
msgstr ""
#: src/Dialogs/NewAccount.vala:165
msgid "Instance failed to authorize the access token"
msgstr ""
#: src/Dialogs/NewAccount.vala:179
#, c-format
msgid "Hello, %s!"
msgstr ""
#: src/Dialogs/NewAccount.vala:207
msgid "Server returned an error"
msgstr ""
#: src/Services/Accounts.vala:32
@ -389,7 +412,7 @@ msgstr ""
msgid "Nothing to see here"
msgstr ""
#: src/Views/Base.vala:47
#: src/Views/Base.vala:46
msgid "Reload"
msgstr ""
@ -410,35 +433,52 @@ msgstr ""
msgid "Local"
msgstr ""
#: src/Views/NewAccount.vala:27
msgid "New Account"
msgstr ""
#: src/Views/NewAccount.vala:94
msgid "Instance URL is invalid"
msgstr ""
#: src/Views/NewAccount.vala:135
msgid "Please paste a valid authorization code"
msgstr ""
#: src/Views/Notifications.vala:11
msgid "Notifications"
msgstr ""
#: src/Views/Profile.vala:113
#: src/Views/Profile.vala:134
#, c-format
msgid "Block \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:134
#, c-format
msgid "Unblock \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Block Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:145
#, c-format
msgid "Unblock Entire \"%s\"?"
msgstr ""
#: src/Views/Profile.vala:148
msgid ""
"Blocking a domain will:\n"
"\n"
"• Remove its public posts and notifications from your timelines\n"
"• Remove its followers from your account\n"
"• Prevent you from following its users"
msgstr ""
#: src/Views/Profile.vala:206
msgid "Sent follow request"
msgstr ""
#: src/Views/Profile.vala:115
#: src/Views/Profile.vala:208
msgid "Mutually follows you"
msgstr ""
#: src/Views/Profile.vala:117
#: src/Views/Profile.vala:210
msgid "Follows you"
msgstr ""
#: src/Views/Profile.vala:126
#: src/Views/Profile.vala:217
msgid "Unfollow"
msgstr ""
@ -467,11 +507,11 @@ msgstr ""
msgid "This account will be removed from the application."
msgstr ""
#: src/Widgets/AccountsButton.vala:156
#: src/Widgets/AccountsButton.vala:155
msgid "Anonymous"
msgstr ""
#: src/Widgets/AccountsButton.vala:157
#: src/Widgets/AccountsButton.vala:156
msgid "No active account"
msgstr ""
@ -479,26 +519,26 @@ msgstr ""
msgid "[ Toggle content ]"
msgstr ""
#: src/Widgets/Status.vala:152
#: src/Widgets/Status.vala:151
msgid "This post can't be boosted"
msgstr ""
#: src/Widgets/Status.vala:202
#: src/Widgets/Status.vala:201
msgid "Open in Browser"
msgstr ""
#: src/Widgets/Status.vala:204
#: src/Widgets/Status.vala:203
msgid "Copy Link"
msgstr ""
#: src/Widgets/Status.vala:206
#: src/Widgets/Status.vala:205
msgid "Copy Text"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Unpin from Profile"
msgstr ""
#: src/Widgets/Status.vala:226
#: src/Widgets/Status.vala:225
msgid "Pin on Profile"
msgstr ""

View File

@ -11,6 +11,7 @@ namespace Tootle {
public static Application app;
public static Dialogs.MainWindow? window;
public static Dialogs.NewAccount? new_account_window;
public static Window window_dummy;
public static Settings settings;
@ -32,7 +33,10 @@ namespace Tootle {
public signal void refresh ();
public signal void toast (string title);
public signal void error (string title, string text);
public signal void error (string title, string? text);
public CssProvider css_provider = new CssProvider ();
public CssProvider zoom_css_provider = new CssProvider ();
public const GLib.OptionEntry[] app_options = {
{ "hidden", 0, 0, OptionArg.NONE, ref start_hidden, "Do not show main window on start", null },
@ -49,7 +53,7 @@ namespace Tootle {
construct {
application_id = Build.DOMAIN;
flags = ApplicationFlags.FLAGS_NONE;
flags = ApplicationFlags.HANDLES_OPEN;
}
public string[] ACCEL_ABOUT = {"F1"};
@ -88,11 +92,17 @@ namespace Tootle {
cache = new Cache ();
accounts.init ();
app.error.connect (app.on_error);
app.error.connect ((title, msg) => {
inform (Gtk.MessageType.ERROR, title, msg);
});
window_dummy = new Window ();
add_window (window_dummy);
css_provider.load_from_resource (@"$(Build.RESOURCES)app.css");
StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), zoom_css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
set_accels_for_action ("app.about", ACCEL_ABOUT);
set_accels_for_action ("app.compose", ACCEL_NEW_POST);
set_accels_for_action ("app.back", ACCEL_BACK);
@ -105,19 +115,43 @@ namespace Tootle {
}
protected override void activate () {
if (window != null) {
window.present ();
return;
}
present_window ();
if (start_hidden) {
start_hidden = false;
return;
}
}
info ("Creating new window");
window = new Dialogs.MainWindow (this);
window.present ();
public override void open (File[] files, string hint) {
foreach (File file in files) {
string uri = file.get_uri ();
if (new_account_window != null)
new_account_window.redirect (uri);
else
warning (@"Received an unexpected uri to open: $uri");
return;
}
}
public void present_window () {
if (accounts.is_empty ()) {
message ("Presenting NewAccount dialog");
if (new_account_window == null)
new Dialogs.NewAccount ();
}
else {
message ("Presenting MainWindow");
if (window == null)
window = new Dialogs.MainWindow (this);
window.present ();
}
}
public bool on_window_closed () {
if (!settings.work_in_background || accounts.is_empty ())
app.remove_window (window_dummy);
return false;
}
void compose_activated () {
@ -141,31 +175,31 @@ namespace Tootle {
new Dialogs.About ();
}
public void on_error (string title, string msg){
public void inform (Gtk.MessageType type, string text, string? msg = null, Gtk.Window? win = window){
var dlg = new Gtk.MessageDialog (
window,
win,
Gtk.DialogFlags.MODAL,
Gtk.MessageType.ERROR,
type,
Gtk.ButtonsType.OK,
null
);
dlg.text = title;
dlg.text = text;
dlg.secondary_text = msg;
dlg.transient_for = window;
dlg.transient_for = win;
dlg.run ();
dlg.destroy ();
}
public bool question (string text, string? secondary = null, Gtk.Window? win = window) {
public bool question (string text, string? msg = null, Gtk.Window? win = window) {
var dlg = new Gtk.MessageDialog (
window,
win,
Gtk.DialogFlags.MODAL,
Gtk.MessageType.QUESTION,
Gtk.ButtonsType.YES_NO,
null
);
dlg.text = text;
dlg.secondary_text = secondary;
dlg.secondary_text = msg;
dlg.transient_for = win;
var i = dlg.run ();
dlg.destroy ();

View File

@ -30,8 +30,6 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow {
Views.Base? last_view = null;
CssProvider zoom_css_provider = new CssProvider ();
construct {
back_button.clicked.connect (() => back ());
compose_button.clicked.connect (() => new Dialogs.Compose ());
@ -48,10 +46,6 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow {
settings.bind_property ("dark-theme", Gtk.Settings.get_default (), "gtk-application-prefer-dark-theme", BindingFlags.SYNC_CREATE);
settings.notify["post-text-size"].connect (() => on_zoom_level_changed ());
var provider = new Gtk.CssProvider ();
provider.load_from_resource (@"$(Build.RESOURCES)app.css");
StyleContext.add_provider_for_screen (Screen.get_default (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
StyleContext.add_provider_for_screen (Screen.get_default (), zoom_css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
on_zoom_level_changed ();
button_press_event.connect (on_button_press);
@ -67,9 +61,6 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow {
resizable: true,
window_position: WindowPosition.CENTER
);
if (accounts.is_empty ())
open_view (new Views.NewAccount (false));
}
public int get_visible_id () {
@ -117,14 +108,10 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow {
}
}
public override bool delete_event (EventAny event) {
destroy.connect (() => {
if (!settings.work_in_background || accounts.is_empty ())
app.remove_window (window_dummy);
window = null;
});
return false;
}
public override bool delete_event (Gdk.EventAny event) {
window = null;
return app.on_window_closed ();
}
public void switch_timeline (int32 num) {
timeline_stack.visible_child_name = num.to_string ();
@ -186,7 +173,7 @@ public class Tootle.Dialogs.MainWindow: Gtk.Window, ISavedWindow {
""".printf (ZOOM_CLASS, settings.post_text_size);
try {
zoom_css_provider.load_from_data (css);
app.zoom_css_provider.load_from_data (css);
}
catch (Error e) {
warning (@"Can't set zoom level: $(e.message)");

233
src/Dialogs/NewAccount.vala Normal file
View File

@ -0,0 +1,233 @@
using Gtk;
[GtkTemplate (ui = "/com/github/bleakgrey/tootle/ui/dialogs/new_account.ui")]
public class Tootle.Dialogs.NewAccount: Gtk.Window {
const string scopes = "read%20write%20follow";
protected bool is_working { get; set; default = false; }
protected string? redirect_uri { get; set; }
protected bool use_auto_auth { get; set; default = true; }
protected InstanceAccount account { get; set; default = new InstanceAccount.empty (""); }
[GtkChild]
Button back_button;
[GtkChild]
Button next_button;
[GtkChild]
Stack stack;
[GtkChild]
Box instance_step;
[GtkChild]
Box code_step;
[GtkChild]
Box done_step;
[GtkChild]
Entry instance_entry;
[GtkChild]
Entry code_entry;
[GtkChild]
Label code_label;
[GtkChild]
Label hello_label;
public NewAccount () {
Object (transient_for: window);
StyleContext.add_provider_for_screen (Gdk.Screen.get_default (), app.css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
reset ();
present ();
new_account_window = this;
bind_property ("use-auto-auth", code_label, "visible", BindingFlags.SYNC_CREATE);
}
public override bool delete_event (Gdk.EventAny event) {
new_account_window = null;
return app.on_window_closed ();
}
string setup_redirect_uri () {
try {
if (!use_auto_auth)
throw new Oopsie.INTERNAL ("Using manual auth method");
GLib.Process.spawn_command_line_sync (@"xdg-mime default $(Build.DOMAIN).desktop x-scheme-handler/tootle");
message ("Successfully associated MIME type for automatic authorization");
return "tootle://auth_code";
}
catch (Error e) {
warning (e.message);
use_auto_auth = false;
return "urn:ietf:wg:oauth:2.0:oob";
}
}
[GtkCallback]
bool on_activate_code_label_link (string uri) {
use_auto_auth = false;
reset ();
return true;
}
void reset () {
message ("Reset state");
account = new InstanceAccount.empty (account.instance);
stack.visible_child = instance_step;
invalidate ();
}
void invalidate () {
next_button.sensitive = !is_working;
next_button.label = stack.visible_child == done_step ? _("Close") : _("Next");
back_button.label = stack.visible_child == done_step ? _("Add Another") : _("Back");
back_button.visible = stack.visible_child != instance_step;
}
void oopsie (string title, string msg = "") {
warning (@"$title $msg");
app.inform (Gtk.MessageType.ERROR, title, msg, this);
}
async void step () throws Error {
if (stack.visible_child == done_step) {
if (accounts.is_empty ())
accounts.switch_account (0);
app.present_window ();
destroy ();
return;
}
if (stack.visible_child == instance_step)
setup_instance ();
if (account.client_secret == null || account.client_id == null) {
yield register_client ();
return;
}
yield request_token ();
}
void setup_instance () throws Error {
message ("Checking instance URL");
var str = instance_entry.text
.replace ("/", "")
.replace (":", "")
.replace ("https", "")
.replace ("http", "");
account.instance = "https://"+str;
instance_entry.text = str;
if (str.char_count () <= 0 || !("." in account.instance))
throw new Oopsie.USER (_("Please enter a valid instance URL"));
}
async void register_client () throws Error {
message ("Registering client");
var msg = new Request.POST (@"/api/v1/apps")
.with_account (account)
.with_param ("client_name", Build.NAME)
.with_param ("website", Build.WEBSITE)
.with_param ("scopes", scopes)
.with_param ("redirect_uris", redirect_uri = setup_redirect_uri ());
yield msg.await ();
var root = network.parse (msg);
account.client_id = root.get_string_member ("client_id");
account.client_secret = root.get_string_member ("client_secret");
message ("OK: Instance registered client");
stack.visible_child = code_step;
open_confirmation_page ();
}
void open_confirmation_page () {
message ("Opening permission request page");
var pars = @"scope=$scopes&response_type=code&redirect_uri=$redirect_uri&client_id=$(account.client_id)";
var url = @"$(account.instance)/oauth/authorize?$pars";
Desktop.open_uri (url);
}
async void request_token () throws Error {
if (code_entry.text.char_count () <= 10)
throw new Oopsie.USER (_("Please enter a valid authorization code"));
message ("Requesting access token");
var token_req = new Request.POST (@"/oauth/token")
.with_account (account)
.with_param ("client_id", account.client_id)
.with_param ("client_secret", account.client_secret)
.with_param ("redirect_uri", redirect_uri)
.with_param ("grant_type", "authorization_code")
.with_param ("code", code_entry.text);
yield token_req.await ();
var root = network.parse (token_req);
account.access_token = root.get_string_member ("access_token");
if (account.access_token == null)
throw new Oopsie.INSTANCE (_("Instance failed to authorize the access token"));
message ("Trying to get the user profile");
var profile_req = new Request.GET ("/api/v1/accounts/verify_credentials")
.with_account (account);
yield profile_req.await ();
var node = network.parse_node (profile_req);
var profile = API.Account.from (node);
account.patch (profile);
message ("Saving account");
accounts.add (account);
hello_label.label = _("Hello, %s!").printf (account.handle);
stack.visible_child = done_step;
}
public void redirect (string uri) {
present ();
message (@"Received uri: $uri");
var query = new Soup.URI (uri).get_query ();
var split = query.split ("=");
var code = split[1];
code_entry.text = code;
is_working = false;
on_next_clicked ();
}
[GtkCallback]
void on_next_clicked () {
if (is_working) return;
is_working = true;
invalidate ();
step.begin ((obj, res) => {
try {
step.end (res);
}
catch (Oopsie.INSTANCE e) {
oopsie (_("Server returned an error"), e.message);
}
catch (Error e) {
oopsie (e.message);
}
is_working = false;
invalidate ();
});
}
[GtkCallback]
void on_back_clicked () {
reset ();
}
}

View File

@ -3,10 +3,10 @@ using Gee;
public class Tootle.InstanceAccount : API.Account, IStreamListener {
public string instance { get; set; }
public string client_id { get; set; }
public string client_secret { get; set; }
public string access_token { get; set; }
public string? instance { get; set; }
public string? client_id { get; set; }
public string? client_secret { get; set; }
public string? access_token { get; set; }
public int64 last_seen_notification { get; set; default = 0; }
public bool has_unread_notifications { get; set; default = false; }

View File

@ -2,142 +2,140 @@ using Gee;
public class Tootle.Accounts : GLib.Object {
private string dir_path;
private string file_path;
private string dir_path;
private string file_path;
public ArrayList<InstanceAccount> saved { get; set; default = new ArrayList<InstanceAccount> (); }
public InstanceAccount? active { get; set; }
public ArrayList<InstanceAccount> saved { get; set; default = new ArrayList<InstanceAccount> (); }
public InstanceAccount? active { get; set; }
construct {
dir_path = @"$(GLib.Environment.get_user_config_dir ())/$(app.application_id)";
file_path = @"$dir_path/accounts.json";
}
construct {
dir_path = @"$(GLib.Environment.get_user_config_dir ())/$(app.application_id)";
file_path = @"$dir_path/accounts.json";
}
public void switch_account (int id) {
var acc = saved.@get (id);
info (@"Switching to account: $(acc.handle)...");
new Request.GET ("/api/v1/accounts/verify_credentials")
.with_account (acc)
.then ((sess, mess) => {
var node = network.parse_node (mess);
var updated = API.Account.from (node);
acc.patch (updated);
info ("OK: Token is valid");
active = acc;
settings.current_account = id;
})
.on_error ((code, reason) => {
warning ("Token invalid!");
app.error (
_("Network Error"),
_("The instance has invalidated this session. Please sign in again.\n\n%s").printf (reason)
);
})
.exec ();
}
public void switch_account (int id) {
var acc = saved.@get (id);
message (@"Switching to $(acc.handle)...");
new Request.GET ("/api/v1/accounts/verify_credentials")
.with_account (acc)
.then ((sess, mess) => {
var node = network.parse_node (mess);
var updated = API.Account.from (node);
acc.patch (updated);
message ("OK: Token is valid");
active = acc;
settings.current_account = id;
})
.on_error ((code, reason) => {
warning ("Token invalid!");
app.error (
_("Network Error"),
_("The instance has invalidated this session. Please sign in again.\n\n%s").printf (reason)
);
})
.exec ();
}
public void add (InstanceAccount account) {
info (@"Adding new account: $(account.handle)");
saved.add (account);
save ();
switch_account (saved.size - 1);
account.subscribe ();
}
public void add (InstanceAccount account) {
message (@"Adding new account: $(account.handle)");
saved.add (account);
save ();
switch_account (saved.size - 1);
account.subscribe ();
}
public void remove (InstanceAccount account) {
account.unsubscribe ();
saved.remove (account);
saved.notify_property ("size");
public void remove (InstanceAccount account) {
account.unsubscribe ();
saved.remove (account);
saved.notify_property ("size");
if (saved.size < 1)
active = null;
else {
var id = settings.current_account - 1;
if (id > saved.size - 1)
id = saved.size - 1;
else if (id < saved.size - 1)
id = 0;
switch_account (id);
}
save ();
if (saved.size < 1)
active = null;
else {
var id = settings.current_account - 1;
if (id > saved.size - 1)
id = saved.size - 1;
else if (id < saved.size - 1)
id = 0;
switch_account (id);
}
save ();
if (is_empty ())
window.open_view (new Views.NewAccount (false));
}
if (is_empty ())
new Dialogs.NewAccount ();
}
public bool is_empty () {
return saved.size == 0;
}
public bool is_empty () {
return saved.size == 0;
}
public void init () {
save (false);
load ();
public void init () {
save (false);
load ();
if (saved.size < 1)
window.open_view (new Views.NewAccount (false));
else
switch_account (settings.current_account);
}
if (!is_empty ())
switch_account (settings.current_account);
}
public void save (bool overwrite = true) {
try {
var dir = File.new_for_path (dir_path);
if (!dir.query_exists ())
dir.make_directory ();
public void save (bool overwrite = true) {
try {
var dir = File.new_for_path (dir_path);
if (!dir.query_exists ())
dir.make_directory ();
var file = File.new_for_path (file_path);
if (file.query_exists () && !overwrite)
return;
var file = File.new_for_path (file_path);
if (file.query_exists () && !overwrite)
return;
var builder = new Json.Builder ();
builder.begin_array ();
saved.foreach ((acc) => {
var node = acc.to_json ();
builder.add_value (node);
return true;
});
builder.end_array ();
var builder = new Json.Builder ();
builder.begin_array ();
saved.foreach ((acc) => {
var node = acc.to_json ();
builder.add_value (node);
return true;
});
builder.end_array ();
var generator = new Json.Generator ();
generator.set_root (builder.get_root ());
var data = generator.to_data (null);
var generator = new Json.Generator ();
generator.set_root (builder.get_root ());
var data = generator.to_data (null);
if (file.query_exists ())
file.@delete ();
if (file.query_exists ())
file.@delete ();
FileOutputStream stream = file.create (FileCreateFlags.PRIVATE);
stream.write (data.data);
info ("Saved accounts");
}
catch (Error e){
warning (e.message);
}
}
FileOutputStream stream = file.create (FileCreateFlags.PRIVATE);
stream.write (data.data);
message ("Saved accounts");
}
catch (Error e){
warning (e.message);
}
}
private void load () {
try {
uint8[] data;
string etag;
var file = File.new_for_path (file_path);
file.load_contents (null, out data, out etag);
var contents = (string) data;
private void load () {
try {
uint8[] data;
string etag;
var file = File.new_for_path (file_path);
file.load_contents (null, out data, out etag);
var contents = (string) data;
var parser = new Json.Parser ();
parser.load_from_data (contents, -1);
var array = parser.get_root ().get_array ();
var parser = new Json.Parser ();
parser.load_from_data (contents, -1);
var array = parser.get_root ().get_array ();
array.foreach_element ((_arr, _i, node) => {
var account = InstanceAccount.from (node);
if (account != null) {
saved.add (account);
account.subscribe ();
}
});
info (@"Loaded $(saved.size) accounts");
}
catch (Error e){
warning (e.message);
}
}
array.foreach_element ((_arr, _i, node) => {
var account = InstanceAccount.from (node);
if (account != null) {
saved.add (account);
account.subscribe ();
}
});
message (@"Loaded $(saved.size) accounts");
}
catch (Error e){
warning (e.message);
}
}
}

View File

@ -35,7 +35,6 @@ public class Tootle.Views.Base : Box {
public string state { get; set; default = "status"; }
public string status_message { get; set; default = STATUS_EMPTY; }
public bool allow_closing { get; set; default = true; }
public bool empty {
get {

View File

@ -1,186 +0,0 @@
using Gtk;
public class Tootle.Views.NewAccount : Views.Base {
private string? instance { get; set; }
private string? code { get; set; }
private string scopes = "read%20write%20follow";
private string? client_id { get; set; }
private string? client_secret { get; set; }
private string? access_token { get; set; }
private string redirect_uri { get; set; default = "urn:ietf:wg:oauth:2.0:oob"; } //TODO: Investigate URI handling for automatic token getting
private InstanceAccount account;
private Button next_button;
private Entry instance_entry;
private Entry code_entry;
private Label reset_label;
private Stack stack;
private Widget step1;
private Widget step2;
public NewAccount (bool allow_closing = true) {
Object (
allow_closing: allow_closing,
label: _("New Account")
);
var builder = new Builder.from_resource (@"$(Build.RESOURCES)ui/views/new_account.ui");
content.pack_start (builder.get_object ("wizard") as Grid);
state = "content";
next_button = builder.get_object ("next") as Button;
reset_label = builder.get_object ("reset") as Label;
instance_entry = builder.get_object ("instance_entry") as Entry;
code_entry = builder.get_object ("code_entry") as Entry;
stack = builder.get_object ("stack") as Stack;
step1 = builder.get_object ("step1") as Widget;
step2 = builder.get_object ("step2") as Widget;
next_button.clicked.connect (on_next_clicked);
reset_label.activate_link.connect (reset);
instance_entry.text = "https://mastodon.social/"; //TODO: REMOVE ME
info ("New account view was requested");
}
bool reset () {
info ("State invalidated");
instance = code = client_id = client_secret = access_token = null;
instance_entry.sensitive = true;
stack.visible_child = step1;
return true;
}
void oopsie (string message) {
warning (message);
}
void on_next_clicked () {
try {
step ();
}
catch (Oopsie e) {
oopsie (e.message);
}
}
void step () throws Error {
if (instance == null)
setup_instance ();
if (client_secret == null || client_id == null) {
register_client ();
return;
}
code = code_entry.text;
request_token ();
}
void setup_instance () throws Error {
info ("Checking instance URL");
var str = instance_entry.text
.replace ("/", "")
.replace (":", "")
.replace ("https", "")
.replace ("http", "");
instance = "https://"+str;
instance_entry.text = str;
if (str.char_count () <= 0 || !("." in instance))
throw new Oopsie.USER (_("Instance URL is invalid"));
}
void register_client () throws Error {
info ("Registering client");
instance_entry.sensitive = false;
account = new InstanceAccount.empty (instance);
new Request.POST (@"/api/v1/apps")
.with_param ("client_name", Build.NAME)
.with_param ("website", Build.WEBSITE)
.with_param ("scopes", scopes)
.with_param ("redirect_uris", redirect_uri)
.with_account (account)
.then ((sess, msg) => {
var root = network.parse (msg);
client_id = root.get_string_member ("client_id");
client_secret = root.get_string_member ("client_secret");
info ("OK: instance registered client");
stack.visible_child = step2;
open_confirmation_page ();
})
.on_error ((status, reason) => {
oopsie (reason);
instance_entry.sensitive = true;
})
.exec ();
}
void open_confirmation_page () {
info ("Opening permission request page");
var pars = @"scope=$scopes&response_type=code&redirect_uri=$redirect_uri&client_id=$client_id";
var url = @"$instance/oauth/authorize?$pars";
Desktop.open_uri (url);
}
void request_token () throws Error {
if (code.char_count () <= 10)
throw new Oopsie.USER (_("Please paste a valid authorization code"));
info ("Requesting access token");
new Request.POST (@"/oauth/token")
.with_account (account)
.with_param ("client_id", client_id)
.with_param ("client_secret", client_secret)
.with_param ("redirect_uri", redirect_uri)
.with_param ("grant_type", "authorization_code")
.with_param ("code", code)
.then ((sess, msg) => {
var root = network.parse (msg);
access_token = root.get_string_member ("access_token");
account.access_token = access_token;
account.id = "";
info ("OK: received access token");
request_profile ();
})
.on_error ((code, reason) => oopsie (reason))
.exec ();
}
void request_profile () throws Error {
info ("Testing received access token");
new Request.GET ("/api/v1/accounts/verify_credentials")
.with_account (account)
.then ((sess, msg) => {
var node = network.parse_node (msg);
var account = API.Account.from (node);
info ("OK: received user profile");
save (account);
})
.on_error ((status, reason) => {
reset ();
oopsie (reason);
})
.exec ();
}
void save (API.Account profile) {
info ("Account validated. Saving...");
account.patch (profile);
account.instance = instance;
account.client_id = client_id;
account.client_secret = client_secret;
account.access_token = access_token;
accounts.add (account);
destroy ();
}
}

View File

@ -112,8 +112,6 @@ public class Tootle.Widgets.AccountsButton : Gtk.MenuButton, IAccountListener {
popover.popdown ();
});
on_account_changed (null);
notify["active"].connect (() => {
if (active && invalidated)
rebuild ();
@ -129,7 +127,7 @@ public class Tootle.Widgets.AccountsButton : Gtk.MenuButton, IAccountListener {
var i = r.get_index ();
if (i >= accounts.saved.size) {
active = false;
window.open_view (new Views.NewAccount (true));
new Dialogs.NewAccount ();
popover.popdown ();
return;
}

@ -1 +0,0 @@
Subproject commit eb8696cca00c5511943fbc270d522d43209d8f0e

View File

@ -1,4 +1,5 @@
[wrap-git]
directory=libhandy
url=https://gitlab.gnome.org/GNOME/libhandy.git
revision=0.83.0
[wrap-file]
directory=libhandy-e3fb7400c88136b866ae4a63457c6fd76d0a75b6
source_url=https://gitlab.gnome.org/GNOME/libhandy/-/archive/e3fb7400c88136b866ae4a63457c6fd76d0a75b6/libhandy-e3fb7400c88136b866ae4a63457c6fd76d0a75b6.tar
source_filename=libhandy-e3fb7400c88136b866ae4a63457c6fd76d0a75b6.tar
source_hash=cbf34b9b2201ed25a41c9fa0ccfa132d4f87e0ce01a163ab3ad6c3701bec7d31