Merge pull request #58 from noplanman/proofread

Initial proofread
This commit is contained in:
Matthias Pfefferle 2019-07-29 00:18:17 +02:00 committed by GitHub
commit 2378e0d369
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 53 additions and 45 deletions

View file

@ -15,13 +15,13 @@ The ActivityPub protocol is a decentralized social networking protocol based upo
This is **BETA** software, see the FAQ to see the current feature set or rather what is still planned. This is **BETA** software, see the FAQ to see the current feature set or rather what is still planned.
The plugin implements the ActivityPub protocol for your Blog. Your readers will be able to follow your Blogposts on Mastodon and other Federated Plattforms that support ActivityPub. The plugin implements the ActivityPub protocol for your blog. Your readers will be able to follow your blogposts on Mastodon and other federated platforms that support ActivityPub.
The plugin works with the following federated plattforms: The plugin works with the following federated platforms:
* [mastodon](https://joinmastodon.org/) * [mastodon](https://joinmastodon.org/)
* [pleroma](https://pleroma.social/) * [pleroma](https://pleroma.social/)
* [friendi.ca](https://friendi.ca/) * [friendica](https://friendi.ca/)
* [hubzilla](https://hubzilla.org/) * [hubzilla](https://hubzilla.org/)
## Frequently Asked Questions ## ## Frequently Asked Questions ##
@ -46,17 +46,17 @@ To implement:
### What is "ActivityPub for WordPress" ### ### What is "ActivityPub for WordPress" ###
*ActivityPub for WordPress* extends WordPress with some fediverse features, but it does not compete with plattforms like Friendi.ca or Mastodon. If you want to run a **decentralized social network**, please use [Mastodon](https://joinmastodon.org/) or [GNU.social](https://gnu.io/social/). *ActivityPub for WordPress* extends WordPress with some Fediverse features, but it does not compete with platforms like Friendica or Mastodon. If you want to run a **decentralized social network**, please use [Mastodon](https://joinmastodon.org/) or [GNU social](https://gnu.io/social/).
### What are the differences between this plugin and Pterotype? ### ### What are the differences between this plugin and Pterotype? ###
**Compatibility** **Compatibility**
*ActivityPub for WordPress* is compatible with OStatus and IndieWeb plugin suites. *Pterotype* is incompatible with the standalone [WebFinger plugin](https://wordpress.org/plugins/webfinger/) plugin, so it can't be run together with OStatus. *ActivityPub for WordPress* is compatible with OStatus and IndieWeb plugin suites. *Pterotype* is incompatible with the standalone [WebFinger plugin](https://wordpress.org/plugins/webfinger/), so it can't be run together with OStatus.
**Custom tables** **Custom tables**
*Pterotype* creates/uses a bunch of custom tables, *ActivityPub for WordPress* only uses the native tables and adds as few meta data as possible. *Pterotype* creates/uses a bunch of custom tables, *ActivityPub for WordPress* only uses the native tables and adds as little meta data as possible.
### What if you are running your blog in a subdirectory? ### ### What if you are running your blog in a subdirectory? ###
@ -70,11 +70,11 @@ Where 'blog' is the path to the subdirectory at which your blog resides.
## Changelog ## ## Changelog ##
Project maintained on github at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub). Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
### 0.7.2 ### ### 0.7.2 ###
* fixes JSON representation of posts https://merveilles.town/@xuv/101907542498716956 * fixed JSON representation of posts https://merveilles.town/@xuv/101907542498716956
### 0.7.1 ### ### 0.7.1 ###
@ -87,7 +87,6 @@ Project maintained on github at [pfefferle/wordpress-activitypub](https://github
* simplified "followers" endpoint * simplified "followers" endpoint
* fixed default value problem * fixed default value problem
### 0.6.0 ### ### 0.6.0 ###
* add tags as hashtags to the end of each activity * add tags as hashtags to the end of each activity
@ -96,7 +95,7 @@ Project maintained on github at [pfefferle/wordpress-activitypub](https://github
### 0.5.1 ### ### 0.5.1 ###
* fixed name-collision that cases an invenate loop * fixed name-collision that caused an infinite loop
### 0.5.0 ### ### 0.5.0 ###
@ -138,7 +137,7 @@ Project maintained on github at [pfefferle/wordpress-activitypub](https://github
### 0.3.0 ### ### 0.3.0 ###
* basic hashtag support * basic hashtag support
* temporarily deactived likes and boosts * temporarily deactivated likes and boosts
* added support for actor objects * added support for actor objects
* fixed encoding issue * fixed encoding issue
@ -150,7 +149,7 @@ Project maintained on github at [pfefferle/wordpress-activitypub](https://github
### 0.2.0 ### ### 0.2.0 ###
* added option to switch between content and excerpt * added option to switch between content and excerpt
* removed html and duplicateded new-lines * removed html and duplicate new-lines
### 0.1.1 ### ### 0.1.1 ###
@ -167,7 +166,7 @@ Project maintained on github at [pfefferle/wordpress-activitypub](https://github
### 0.0.2 ### ### 0.0.2 ###
* refactorins * refactoring
* functional inbox * functional inbox
* nicer profile views * nicer profile views

View file

@ -212,7 +212,7 @@ function get_identifier_settings( $user_id ) {
<td> <td>
<p><code><?php echo esc_html( \Activitypub\get_webfinger_resource( $user_id ) ); ?></code> or <code><?php echo esc_url( get_author_posts_url( $user_id ) ); ?></code></p> <p><code><?php echo esc_html( \Activitypub\get_webfinger_resource( $user_id ) ); ?></code> or <code><?php echo esc_url( get_author_posts_url( $user_id ) ); ?></code></p>
<?php // translators: the webfinger resource ?> <?php // translators: the webfinger resource ?>
<p class="description"><?php printf( esc_html__( 'Try to follow "@%s" in the mastodon/friendi.ca search field.', 'activitypub' ), esc_html( \Activitypub\get_webfinger_resource( $user_id ) ) ); ?></p> <p class="description"><?php printf( esc_html__( 'Try to follow "@%s" in the Mastodon/Friendica search field.', 'activitypub' ), esc_html( \Activitypub\get_webfinger_resource( $user_id ) ) ); ?></p>
</td> </td>
</tr> </tr>
</tbody> </tbody>

View file

@ -45,14 +45,14 @@ class Webfinger {
$matched = preg_match( '/^acct:([^@]+)@(.+)$/', $resource, $matches ); $matched = preg_match( '/^acct:([^@]+)@(.+)$/', $resource, $matches );
if ( ! $matched ) { if ( ! $matched ) {
return new \WP_Error( 'activitypub_unsupported_resource', __( 'Resouce is invalid', 'activitypub' ), array( 'status' => 400 ) ); return new \WP_Error( 'activitypub_unsupported_resource', __( 'Resource is invalid', 'activitypub' ), array( 'status' => 400 ) );
} }
$resource_identifier = $matches[1]; $resource_identifier = $matches[1];
$resource_host = $matches[2]; $resource_host = $matches[2];
if ( wp_parse_url( home_url( '/' ), PHP_URL_HOST ) !== $resource_host ) { if ( wp_parse_url( home_url( '/' ), PHP_URL_HOST ) !== $resource_host ) {
return new \WP_Error( 'activitypub_wrong_host', __( 'Resouce host does not match blog host', 'activitypub' ), array( 'status' => 404 ) ); return new \WP_Error( 'activitypub_wrong_host', __( 'Resource host does not match blog host', 'activitypub' ), array( 'status' => 404 ) );
} }
$user = get_user_by( 'login', esc_sql( $resource_identifier ) ); $user = get_user_by( 'login', esc_sql( $resource_identifier ) );

View file

@ -4,14 +4,14 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: ActivityPub 0.7.2\n" "Project-Id-Version: ActivityPub 0.7.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/activitypub\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/activitypub\n"
"POT-Creation-Date: 2019-04-13 18:07:11+00:00\n" "POT-Creation-Date: 2019-07-28 20:11:43+00:00\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"X-Generator: grunt-wp-i18n1.0.2\n" "X-Generator: grunt-wp-i18n 1.0.3\n"
#: includes/class-admin.php:48 #: includes/class-admin.php:48
msgid "Use summary or full content" msgid "Use summary or full content"
@ -95,18 +95,18 @@ msgstr ""
msgid "No \"Public-Key\" found" msgid "No \"Public-Key\" found"
msgstr "" msgstr ""
#: includes/functions.php:207 #: includes/functions.php:210
msgid "Profile identifier" msgid "Profile identifier"
msgstr "" msgstr ""
#: includes/functions.php:212 #: includes/functions.php:215
#. translators: the webfinger resource #. translators: the webfinger resource
msgid "Try to follow \"@%s\" in the mastodon/friendi.ca search field." msgid "Try to follow \"@%s\" in the Mastodon/Friendica search field."
msgstr "" msgstr ""
#: includes/rest/class-followers.php:46 includes/rest/class-followers.php:49 #: includes/rest/class-followers.php:46 includes/rest/class-followers.php:49
#: includes/rest/class-following.php:46 includes/rest/class-following.php:49 #: includes/rest/class-following.php:46 includes/rest/class-following.php:49
#: includes/rest/class-outbox.php:45 includes/rest/class-outbox.php:48 #: includes/rest/class-outbox.php:47 includes/rest/class-outbox.php:50
#: includes/rest/class-webfinger.php:61 #: includes/rest/class-webfinger.php:61
msgid "User not found" msgid "User not found"
msgstr "" msgstr ""
@ -125,11 +125,11 @@ msgid "No \"Actor\" found"
msgstr "" msgstr ""
#: includes/rest/class-webfinger.php:48 #: includes/rest/class-webfinger.php:48
msgid "Resouce is invalid" msgid "Resource is invalid"
msgstr "" msgstr ""
#: includes/rest/class-webfinger.php:55 #: includes/rest/class-webfinger.php:55
msgid "Resouce host does not match blog host" msgid "Resource host does not match blog host"
msgstr "" msgstr ""
#: templates/json-author.php:48 #: templates/json-author.php:48
@ -152,7 +152,7 @@ msgstr ""
msgid "" msgid ""
"ActivityPub turns your blog into a federated social network. This means you " "ActivityPub turns your blog into a federated social network. This means you "
"can share and talk to everyone using the ActivityPub protocol, including " "can share and talk to everyone using the ActivityPub protocol, including "
"users of Friendi.ca, Pleroma and Mastodon." "users of Friendica, Pleroma and Mastodon."
msgstr "" msgstr ""
#: templates/settings-page.php:9 #: templates/settings-page.php:9
@ -188,7 +188,7 @@ msgid "Backlink"
msgstr "" msgstr ""
#: templates/settings-page.php:39 #: templates/settings-page.php:39
msgid "Activtity-Object-Type" msgid "Activity-Object-Type"
msgstr "" msgstr ""
#: templates/settings-page.php:43 #: templates/settings-page.php:43
@ -196,7 +196,7 @@ msgid "Note (default)"
msgstr "" msgstr ""
#: templates/settings-page.php:43 #: templates/settings-page.php:43
msgid "Should work with most plattforms." msgid "Should work with most platforms."
msgstr "" msgstr ""
#: templates/settings-page.php:46 #: templates/settings-page.php:46
@ -205,7 +205,7 @@ msgstr ""
#: templates/settings-page.php:46 #: templates/settings-page.php:46
msgid "" msgid ""
"The presentation of the \"Article\" might change on different plattforms. " "The presentation of the \"Article\" might change on different platforms. "
"Mastodon for example shows the \"Article\" type as a simple link." "Mastodon for example shows the \"Article\" type as a simple link."
msgstr "" msgstr ""

View file

@ -15,13 +15,13 @@ The ActivityPub protocol is a decentralized social networking protocol based upo
This is **BETA** software, see the FAQ to see the current feature set or rather what is still planned. This is **BETA** software, see the FAQ to see the current feature set or rather what is still planned.
The plugin implements the ActivityPub protocol for your Blog. Your readers will be able to follow your Blogposts on Mastodon and other Federated Plattforms that support ActivityPub. The plugin implements the ActivityPub protocol for your blog. Your readers will be able to follow your blogposts on Mastodon and other federated platforms that support ActivityPub.
The plugin works with the following federated plattforms: The plugin works with the following federated platforms:
* [mastodon](https://joinmastodon.org/) * [mastodon](https://joinmastodon.org/)
* [pleroma](https://pleroma.social/) * [pleroma](https://pleroma.social/)
* [friendi.ca](https://friendi.ca/) * [friendica](https://friendi.ca/)
* [hubzilla](https://hubzilla.org/) * [hubzilla](https://hubzilla.org/)
== Frequently Asked Questions == == Frequently Asked Questions ==
@ -46,25 +46,35 @@ To implement:
= What is "ActivityPub for WordPress" = = What is "ActivityPub for WordPress" =
*ActivityPub for WordPress* extends WordPress with some fediverse features, but it does not compete with plattforms like Friendi.ca or Mastodon. If you want to run a **decentralized social network**, please use [Mastodon](https://joinmastodon.org/) or [GNU.social](https://gnu.io/social/). *ActivityPub for WordPress* extends WordPress with some Fediverse features, but it does not compete with platforms like Friendica or Mastodon. If you want to run a **decentralized social network**, please use [Mastodon](https://joinmastodon.org/) or [GNU social](https://gnu.io/social/).
= What are the differences between this plugin and Pterotype? = = What are the differences between this plugin and Pterotype? =
**Compatibility** **Compatibility**
*ActivityPub for WordPress* is compatible with OStatus and IndieWeb plugin suites. *Pterotype* is incompatible with the standalone [WebFinger plugin](https://wordpress.org/plugins/webfinger/) plugin, so it can't be run together with OStatus. *ActivityPub for WordPress* is compatible with OStatus and IndieWeb plugin suites. *Pterotype* is incompatible with the standalone [WebFinger plugin](https://wordpress.org/plugins/webfinger/), so it can't be run together with OStatus.
**Custom tables** **Custom tables**
*Pterotype* creates/uses a bunch of custom tables, *ActivityPub for WordPress* only uses the native tables and adds as few meta data as possible. *Pterotype* creates/uses a bunch of custom tables, *ActivityPub for WordPress* only uses the native tables and adds as little meta data as possible.
= What if you are running your blog in a subdirectory? =
In order for webfinger to work, it must be mapped to the root directory of the URL on which your blog resides.
**Apache**
Add the following to the .htaccess file in the root directory:
`RedirectMatch "^\/\.well-known(.*)$" "\/blog\/\.well-known$1"`
Where 'blog' is the path to the subdirectory at which your blog resides.
== Changelog == == Changelog ==
Project maintained on github at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub). Project maintained on GitHub at [pfefferle/wordpress-activitypub](https://github.com/pfefferle/wordpress-activitypub).
= 0.7.2 = = 0.7.2 =
* fixes JSON representation of posts https://merveilles.town/@xuv/101907542498716956 * fixed JSON representation of posts https://merveilles.town/@xuv/101907542498716956
= 0.7.1 = = 0.7.1 =
@ -77,7 +87,6 @@ Project maintained on github at [pfefferle/wordpress-activitypub](https://github
* simplified "followers" endpoint * simplified "followers" endpoint
* fixed default value problem * fixed default value problem
= 0.6.0 = = 0.6.0 =
* add tags as hashtags to the end of each activity * add tags as hashtags to the end of each activity
@ -86,7 +95,7 @@ Project maintained on github at [pfefferle/wordpress-activitypub](https://github
= 0.5.1 = = 0.5.1 =
* fixed name-collision that cases an invenate loop * fixed name-collision that caused an infinite loop
= 0.5.0 = = 0.5.0 =
@ -128,7 +137,7 @@ Project maintained on github at [pfefferle/wordpress-activitypub](https://github
= 0.3.0 = = 0.3.0 =
* basic hashtag support * basic hashtag support
* temporarily deactived likes and boosts * temporarily deactivated likes and boosts
* added support for actor objects * added support for actor objects
* fixed encoding issue * fixed encoding issue
@ -140,7 +149,7 @@ Project maintained on github at [pfefferle/wordpress-activitypub](https://github
= 0.2.0 = = 0.2.0 =
* added option to switch between content and excerpt * added option to switch between content and excerpt
* removed html and duplicateded new-lines * removed html and duplicate new-lines
= 0.1.1 = = 0.1.1 =
@ -157,7 +166,7 @@ Project maintained on github at [pfefferle/wordpress-activitypub](https://github
= 0.0.2 = = 0.0.2 =
* refactorins * refactoring
* functional inbox * functional inbox
* nicer profile views * nicer profile views

View file

@ -1,7 +1,7 @@
<div class="wrap"> <div class="wrap">
<h1><?php esc_html_e( 'ActivityPub Settings', 'activitypub' ); ?></h1> <h1><?php esc_html_e( 'ActivityPub Settings', 'activitypub' ); ?></h1>
<p><?php esc_html_e( 'ActivityPub turns your blog into a federated social network. This means you can share and talk to everyone using the ActivityPub protocol, including users of Friendi.ca, Pleroma and Mastodon.', 'activitypub' ); ?></p> <p><?php esc_html_e( 'ActivityPub turns your blog into a federated social network. This means you can share and talk to everyone using the ActivityPub protocol, including users of Friendica, Pleroma and Mastodon.', 'activitypub' ); ?></p>
<form method="post" action="options.php"> <form method="post" action="options.php">
<?php settings_fields( 'activitypub' ); ?> <?php settings_fields( 'activitypub' ); ?>
@ -36,14 +36,14 @@
</tr> </tr>
<tr> <tr>
<th scope="row"> <th scope="row">
<?php esc_html_e( 'Activtity-Object-Type', 'activitypub' ); ?> <?php esc_html_e( 'Activity-Object-Type', 'activitypub' ); ?>
</th> </th>
<td> <td>
<p> <p>
<label><input type="radio" name="activitypub_object_type" id="activitypub_object_type_note" value="note" <?php echo checked( 'note', get_option( 'activitypub_object_type', 'note' ) ); ?> /> <?php esc_html_e( 'Note (default)', 'activitypub' ); ?></label> - <span class="description"><?php esc_html_e( 'Should work with most plattforms.', 'activitypub' ); ?></span> <label><input type="radio" name="activitypub_object_type" id="activitypub_object_type_note" value="note" <?php echo checked( 'note', get_option( 'activitypub_object_type', 'note' ) ); ?> /> <?php esc_html_e( 'Note (default)', 'activitypub' ); ?></label> - <span class="description"><?php esc_html_e( 'Should work with most platforms.', 'activitypub' ); ?></span>
</p> </p>
<p> <p>
<label><input type="radio" name="activitypub_object_type" id="activitypub_object_type_article" value="article" <?php echo checked( 'article', get_option( 'activitypub_object_type', 'note' ) ); ?> /> <?php esc_html_e( 'Article', 'activitypub' ); ?></label> - <span class="description"><?php esc_html_e( 'The presentation of the "Article" might change on different plattforms. Mastodon for example shows the "Article" type as a simple link.', 'activitypub' ); ?></span> <label><input type="radio" name="activitypub_object_type" id="activitypub_object_type_article" value="article" <?php echo checked( 'article', get_option( 'activitypub_object_type', 'note' ) ); ?> /> <?php esc_html_e( 'Article', 'activitypub' ); ?></label> - <span class="description"><?php esc_html_e( 'The presentation of the "Article" might change on different platforms. Mastodon for example shows the "Article" type as a simple link.', 'activitypub' ); ?></span>
</p> </p>
<p> <p>
<label><input type="radio" name="activitypub_object_type" id="activitypub_object_type" value="wordpress-post-format" <?php echo checked( 'wordpress-post-format', get_option( 'activitypub_object_type', 'note' ) ); ?> /> <?php esc_html_e( 'WordPress Post-Format', 'activitypub' ); ?></label> - <span class="description"><?php esc_html_e( 'Maps the WordPress Post-Format to the ActivityPub Object Type.', 'activitypub' ); ?></span> <label><input type="radio" name="activitypub_object_type" id="activitypub_object_type" value="wordpress-post-format" <?php echo checked( 'wordpress-post-format', get_option( 'activitypub_object_type', 'note' ) ); ?> /> <?php esc_html_e( 'WordPress Post-Format', 'activitypub' ); ?></label> - <span class="description"><?php esc_html_e( 'Maps the WordPress Post-Format to the ActivityPub Object Type.', 'activitypub' ); ?></span>