'DirectMessage' => array(),
'EmailAuthentication' => array(),
'Event' => array(),
- 'Oembed' => array(),
+ 'Embed' => array(),
'OpenID' => array(),
'OpportunisticQM' => array(),
'OStatus' => array(),
--- /dev/null
+So far this is still in $config['site']['oembed'].
+
+oembed
+--------
+
+oEmbed endpoint for multimedia attachments (links in posts). Will also
+work as 'oohembed' for backwards compatibility.
+
+endpoint: oohembed endpoint using http://oohembed.com/ software. Defaults to
+ 'http://oohembed.com/oohembed/'.
+order: Array of methods to check for OEmbed data. Methods include 'built-in'
+ (use a built-in function to simulate oEmbed for some sites),
+ 'well-known' (use well-known public oEmbed endpoints),
+ 'discovery' (discover using <link> headers in HTML), 'service' (use
+ a third-party service, like oohembed or embed.ly. Default is
+ array('built-in', 'well-known', 'service', 'discovery'). Note that very
+ few sites implement oEmbed; 'discovery' is going to fail 99% of the
+ time.
--- /dev/null
+<?php
+// This file is part of GNU social - https://www.gnu.org/software/social
+//
+// GNU social is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU social is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * OEmbed and OpenGraph implementation for GNU social
+ *
+ * @package GNUsocial
+ * @author Stephen Paul Weber
+ * @author hannes
+ * @author Mikael Nordfeldth
+ * @author Diogo Cordeiro <diogo@fc.up.pt>
+ * @author Miguel Dantas <biodantasgs@gmail.com>
+ * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
+ * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
+ */
+
+defined('GNUSOCIAL') || die();
+
+/**
+ * Base class for the Embed plugin that does most of the heavy lifting to get
+ * and display representations for remote content.
+ *
+ * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
+ * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
+ */
+class EmbedPlugin extends Plugin
+{
+ const PLUGIN_VERSION = '0.1.0';
+
+ // settings which can be set in config.php with addPlugin('Embed', array('param'=>'value', ...));
+ // WARNING, these are _regexps_ (slashes added later). Always escape your dots and end ('$') your strings
+
+ public $domain_whitelist = [
+ // hostname => service provider
+ '^i\d*\.ytimg\.com$' => 'YouTube',
+ '^i\d*\.vimeocdn\.com$' => 'Vimeo',
+ ];
+ public $append_whitelist = array(); // fill this array as domain_whitelist to add more trusted sources
+ public $check_whitelist = false; // security/abuse precaution
+
+ protected $imgData = array();
+
+ /**
+ * Initialize the Embed plugin and set up the environment it needs for it.
+ * Returns true if it initialized properly, the exception object if it
+ * doesn't.
+ */
+ public function initialize()
+ {
+ parent::initialize();
+
+ $this->domain_whitelist = array_merge($this->domain_whitelist, $this->append_whitelist);
+ }
+
+ /**
+ * The code executed on GNU social checking the database schema, which in
+ * this case is to make sure we have the plugin table we need.
+ *
+ * @return bool true if it ran successfully, the exception object if it doesn't.
+ */
+ public function onCheckSchema()
+ {
+ $schema = Schema::get();
+ $schema->ensureTable('file_oembed', File_oembed::schemaDef());
+ return true;
+ }
+
+ /**
+ * This code executes when GNU social creates the page routing, and we hook
+ * on this event to add our action handler for Embed.
+ *
+ * @param $m URLMapper the router that was initialized.
+ * @return bool true if successful, the exception object if it isn't.
+ */
+ public function onRouterInitialized(URLMapper $m)
+ {
+ $m->connect('main/embed', ['action' => 'embed']);
+ }
+
+ /**
+ * This event executes when GNU social encounters a remote URL we then decide
+ * to interrogate for metadata. Embed gloms onto it to see if we have an
+ * oEmbed endpoint or image to try to represent in the post.
+ *
+ * @param $url string the remote URL we're looking at
+ * @param $dom DOMDocument the document we're getting metadata from
+ * @param $metadata stdClass class representing the metadata
+ * @return bool true if successful, the exception object if it isn't.
+ */
+ public function onGetRemoteUrlMetadataFromDom($url, DOMDocument $dom, stdClass &$metadata)
+ {
+ try {
+ common_log(LOG_INFO, 'Trying to discover an oEmbed endpoint using link headers.');
+ $api = oEmbedHelper::oEmbedEndpointFromHTML($dom);
+ common_log(LOG_INFO, 'Found oEmbed API endpoint ' . $api . ' for URL ' . $url);
+ $params = array(
+ 'maxwidth' => common_config('thumbnail', 'width'),
+ 'maxheight' => common_config('thumbnail', 'height'),
+ );
+ $metadata = oEmbedHelper::getOembedFrom($api, $url, $params);
+
+ // Facebook just gives us javascript in its oembed html,
+ // so use the content of the title element instead
+ if (strpos($url, 'https://www.facebook.com/') === 0) {
+ $metadata->html = @$dom->getElementsByTagName('title')->item(0)->nodeValue;
+ }
+
+ // Wordpress sometimes also just gives us javascript, use og:description if it is available
+ $xpath = new DomXpath($dom);
+ $generatorNode = @$xpath->query('//meta[@name="generator"][1]')->item(0);
+ if ($generatorNode instanceof DomElement) {
+ // when wordpress only gives us javascript, the html stripped from tags
+ // is the same as the title, so this helps us to identify this (common) case
+ if (strpos($generatorNode->getAttribute('content'), 'WordPress') === 0
+ && trim(strip_tags($metadata->html)) == trim($metadata->title)) {
+ $propertyNode = @$xpath->query('//meta[@property="og:description"][1]')->item(0);
+ if ($propertyNode instanceof DomElement) {
+ $metadata->html = $propertyNode->getAttribute('content');
+ }
+ }
+ }
+ } catch (Exception $e) {
+ // FIXME - make sure the error was because we couldn't get metadata, not something else! -mb
+ common_log(LOG_INFO, 'Could not find an oEmbed endpoint using link headers, trying OpenGraph from HTML.');
+ // Just ignore it!
+ $metadata = OpenGraphHelper::ogFromHtml($dom);
+ }
+
+ if (isset($metadata->thumbnail_url)) {
+ // sometimes sites serve the path, not the full URL, for images
+ // let's "be liberal in what you accept from others"!
+ // add protocol and host if the thumbnail_url starts with /
+ if (substr($metadata->thumbnail_url, 0, 1) == '/') {
+ $thumbnail_url_parsed = parse_url($metadata->url);
+ $metadata->thumbnail_url = $thumbnail_url_parsed['scheme']."://".$thumbnail_url_parsed['host'].$metadata->thumbnail_url;
+ }
+
+ // some wordpress opengraph implementations sometimes return a white blank image
+ // no need for us to save that!
+ if ($metadata->thumbnail_url == 'https://s0.wp.com/i/blank.jpg') {
+ unset($metadata->thumbnail_url);
+ }
+
+ // FIXME: this is also true of locally-installed wordpress so we should watch out for that.
+ }
+ return true;
+ }
+
+ public function onEndShowHeadElements(Action $action)
+ {
+ switch ($action->getActionName()) {
+ case 'attachment':
+ $action->element('link', array('rel'=>'alternate',
+ 'type'=>'application/json+oembed',
+ 'href'=>common_local_url(
+ 'oembed',
+ array(),
+ array('format'=>'json', 'url'=>
+ common_local_url(
+ 'attachment',
+ array('attachment' => $action->attachment->getID())
+ ))
+ ),
+ 'title'=>'oEmbed'));
+ $action->element('link', array('rel'=>'alternate',
+ 'type'=>'text/xml+oembed',
+ 'href'=>common_local_url(
+ 'oembed',
+ array(),
+ array('format'=>'xml','url'=>
+ common_local_url(
+ 'attachment',
+ array('attachment' => $action->attachment->getID())
+ ))
+ ),
+ 'title'=>'oEmbed'));
+ break;
+ case 'shownotice':
+ if (!$action->notice->isLocal()) {
+ break;
+ }
+ try {
+ $action->element('link', array('rel'=>'alternate',
+ 'type'=>'application/json+oembed',
+ 'href'=>common_local_url(
+ 'oembed',
+ array(),
+ array('format'=>'json','url'=>$action->notice->getUrl())
+ ),
+ 'title'=>'oEmbed'));
+ $action->element('link', array('rel'=>'alternate',
+ 'type'=>'text/xml+oembed',
+ 'href'=>common_local_url(
+ 'oembed',
+ array(),
+ array('format'=>'xml','url'=>$action->notice->getUrl())
+ ),
+ 'title'=>'oEmbed'));
+ } catch (InvalidUrlException $e) {
+ // The notice is probably a share or similar, which don't
+ // have a representational URL of their own.
+ }
+ break;
+ }
+
+ return true;
+ }
+
+ public function onEndShowStylesheets(Action $action)
+ {
+ $action->cssLink($this->path('css/embed.css'));
+ return true;
+ }
+
+ /**
+ * Save embedding information for a File, if applicable.
+ *
+ * Normally this event is called through File::saveNew()
+ *
+ * @param File $file The newly inserted File object.
+ *
+ * @return boolean success
+ */
+ public function onEndFileSaveNew(File $file)
+ {
+ $fo = File_embed::getKV('file_id', $file->getID());
+ if ($fo instanceof File_embed) {
+ common_log(LOG_WARNING, "Strangely, a File_embed object exists for new file {$file->getID()}", __FILE__);
+ return true;
+ }
+
+ if (isset($file->mimetype)
+ && (('text/html' === substr($file->mimetype, 0, 9)
+ || 'application/xhtml+xml' === substr($file->mimetype, 0, 21)))) {
+ try {
+ $embed_data = File_embed::_getEmbed($file->url);
+ if ($embed_data === false) {
+ throw new Exception('Did not get embed data from URL');
+ }
+ $file->setTitle($embed_data->title);
+ } catch (Exception $e) {
+ common_log(LOG_WARNING, sprintf(__METHOD__.': %s thrown when getting embed data: %s', get_class($e), _ve($e->getMessage())));
+ return true;
+ }
+
+ File_embed::saveNew($embed_data, $file->getID());
+ }
+ return true;
+ }
+
+ public function onEndShowAttachmentLink(HTMLOutputter $out, File $file)
+ {
+ $embed = File_embed::getKV('file_id', $file->getID());
+ if (empty($embed->author_name) && empty($embed->provider)) {
+ return true;
+ }
+ $out->elementStart('div', array('id'=>'oembed_info', 'class'=>'e-content'));
+ if (!empty($embed->author_name)) {
+ $out->elementStart('div', 'fn vcard author');
+ if (empty($embed->author_url)) {
+ $out->text($embed->author_name);
+ } else {
+ $out->element(
+ 'a',
+ array('href' => $embed->author_url,
+ 'class' => 'url'),
+ $embed->author_name
+ );
+ }
+ }
+ if (!empty($embed->provider)) {
+ $out->elementStart('div', 'fn vcard');
+ if (empty($embed->provider_url)) {
+ $out->text($embed->provider);
+ } else {
+ $out->element(
+ 'a',
+ array('href' => $embed->provider_url,
+ 'class' => 'url'),
+ $embed->provider
+ );
+ }
+ }
+ $out->elementEnd('div');
+ }
+
+ public function onFileEnclosureMetadata(File $file, &$enclosure)
+ {
+ // Never treat generic HTML links as an enclosure type!
+ // But if we have embed info, we'll consider it golden.
+ $embed = File_embed::getKV('file_id', $file->getID());
+ if (!$embed instanceof File_embed || !in_array($embed->type, array('photo', 'video'))) {
+ return true;
+ }
+
+ foreach (array('mimetype', 'url', 'title', 'modified', 'width', 'height') as $key) {
+ if (isset($embed->{$key}) && !empty($embed->{$key})) {
+ $enclosure->{$key} = $embed->{$key};
+ }
+ }
+ return true;
+ }
+
+ public function onStartShowAttachmentRepresentation(HTMLOutputter $out, File $file)
+ {
+ try {
+ $embed = File_embed::getByFile($file);
+ } catch (NoResultException $e) {
+ return true;
+ }
+
+ // Show thumbnail as usual if it's a photo.
+ if ($embed->type === 'photo') {
+ return true;
+ }
+
+ $out->elementStart('article', ['class'=>'h-entry embed']);
+ $out->elementStart('header');
+ try {
+ $thumb = $file->getThumbnail(128, 128);
+ $out->element('img', $thumb->getHtmlAttrs(['class'=>'u-photo embed']));
+ unset($thumb);
+ } catch (Exception $e) {
+ $out->element('div', ['class'=>'error'], $e->getMessage());
+ }
+ $out->elementStart('h5', ['class'=>'p-name embed']);
+ $out->element('a', ['class'=>'u-url', 'href'=>$file->getUrl()], common_strip_html($embed->title));
+ $out->elementEnd('h5');
+ $out->elementStart('div', ['class'=>'p-author embed']);
+ if (!empty($embed->author_name)) {
+ // TRANS: text before the author name of embed attachment representation
+ // FIXME: The whole "By x from y" should be i18n because of different language constructions.
+ $out->text(_('By '));
+ $attrs = ['class'=>'h-card p-author'];
+ if (!empty($embed->author_url)) {
+ $attrs['href'] = $embed->author_url;
+ $tag = 'a';
+ } else {
+ $tag = 'span';
+ }
+ $out->element($tag, $attrs, $embed->author_name);
+ }
+ if (!empty($embed->provider)) {
+ // TRANS: text between the embed author name and provider url
+ // FIXME: The whole "By x from y" should be i18n because of different language constructions.
+ $out->text(_(' from '));
+ $attrs = ['class'=>'h-card'];
+ if (!empty($embed->provider_url)) {
+ $attrs['href'] = $embed->provider_url;
+ $tag = 'a';
+ } else {
+ $tag = 'span';
+ }
+ $out->element($tag, $attrs, $embed->provider);
+ }
+ $out->elementEnd('div');
+ $out->elementEnd('header');
+ $out->elementStart('div', ['class'=>'p-summary oembed']);
+ $out->raw(common_purify($embed->html));
+ $out->elementEnd('div');
+ $out->elementStart('footer');
+ $out->elementEnd('footer');
+ $out->elementEnd('article');
+
+ return false;
+ }
+
+ public function onShowUnsupportedAttachmentRepresentation(HTMLOutputter $out, File $file)
+ {
+ try {
+ $embed = File_embed::getByFile($file);
+ } catch (NoResultException $e) {
+ return true;
+ }
+
+ // the 'photo' type is shown through ordinary means, using StartShowAttachmentRepresentation!
+ switch ($embed->type) {
+ case 'video':
+ case 'link':
+ if (!empty($embed->html)
+ && (GNUsocial::isAjax() || common_config('attachments', 'show_html'))) {
+ require_once INSTALLDIR.'/extlib/HTMLPurifier/HTMLPurifier.auto.php';
+ $purifier = new HTMLPurifier();
+ // FIXME: do we allow <object> and <embed> here? we did that when we used htmLawed, but I'm not sure anymore...
+ $out->raw($purifier->purify($embed->html));
+ }
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * This event executes when GNU social is creating a file thumbnail entry in
+ * the database. We glom onto this to create proper information for Embed
+ * object thumbnails.
+ *
+ * @param $file File the file of the created thumbnail
+ * @param &$imgPath string = the path to the created thumbnail
+ * @return bool true if it succeeds (including non-action
+ * states where it isn't oEmbed data, so it doesn't mess up the event handle
+ * for other things hooked into it), or the exception if it fails.
+ */
+ public function onCreateFileImageThumbnailSource(File $file, &$imgPath, $media)
+ {
+ // If we are on a private node, we won't do any remote calls (just as a precaution until
+ // we can configure this from config.php for the private nodes)
+ if (common_config('site', 'private')) {
+ return true;
+ }
+
+ // All our remote Embed images lack a local filename property in the File object
+ if (!is_null($file->filename)) {
+ common_debug(sprintf('Filename of file id==%d is not null (%s), so nothing Embed '.
+ 'should handle.', $file->getID(), _ve($file->filename)));
+ return true;
+ }
+
+ try {
+ // If we have proper Embed data, there should be an entry in the File_embed
+ // and File_thumbnail tables respectively. If not, we're not going to do anything.
+ $thumbnail = File_thumbnail::byFile($file);
+ } catch (NoResultException $e) {
+ // Not Embed data, or at least nothing we either can or want to use.
+ common_debug('No Embed data found for file id=='.$file->getID());
+ return true;
+ }
+
+ try {
+ $this->storeRemoteFileThumbnail($thumbnail);
+ } catch (AlreadyFulfilledException $e) {
+ // aw yiss!
+ } catch (Exception $e) {
+ common_debug(sprintf('Embed encountered an exception (%s) for file id==%d: %s',
+ get_class($e), $file->getID(), _ve($e->getMessage())));
+ throw $e;
+ }
+
+ // Out
+ $imgPath = $thumbnail->getPath();
+
+ return false;
+ }
+
+ /**
+ * @return bool false on no check made, provider name on success
+ * @throws ServerException if check is made but fails
+ */
+ protected function checkWhitelist($url)
+ {
+ if (!$this->check_whitelist) {
+ return false; // indicates "no check made"
+ }
+
+ $host = parse_url($url, PHP_URL_HOST);
+ foreach ($this->domain_whitelist as $regex => $provider) {
+ if (preg_match("/$regex/", $host)) {
+ return $provider; // we trust this source, return provider name
+ }
+ }
+
+ throw new ServerException(sprintf(_('Domain not in remote thumbnail source whitelist: %s'), $host));
+ }
+
+ /**
+ * Check the file size of a remote file using a HEAD request and checking
+ * the content-length variable returned. This isn't 100% foolproof but is
+ * reliable enough for our purposes.
+ *
+ * @return string|bool the file size if it succeeds, false otherwise.
+ */
+ private function getRemoteFileSize($url)
+ {
+ try {
+ if (empty($url)) {
+ return false;
+ }
+ stream_context_set_default(array('http' => array('method' => 'HEAD')));
+ $head = @get_headers($url, 1);
+ if (gettype($head)=="array") {
+ $head = array_change_key_case($head);
+ $size = isset($head['content-length']) ? $head['content-length'] : 0;
+
+ if (!$size) {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ return $size; // return formatted size
+ } catch (Exception $err) {
+ common_log(LOG_ERR, __CLASS__.': getRemoteFileSize on URL : '._ve($url).' threw exception: '.$err->getMessage());
+ return false;
+ }
+ }
+
+ /**
+ * A private helper function that uses a CURL lookup to check the mime type
+ * of a remote URL to see it it's an image.
+ *
+ * @return bool true if the remote URL is an image, or false otherwise.
+ */
+ private function isRemoteImage($url)
+ {
+ if (!filter_var($url, FILTER_VALIDATE_URL)) {
+ common_log(LOG_ERR, "Invalid URL in Embed::isRemoteImage()");
+ return false;
+ }
+ if ($url==null) {
+ common_log(LOG_ERR, "URL not specified in Embed::isRemoteImage()");
+ return false;
+ }
+ try {
+ $curl = curl_init($url);
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
+ curl_setopt($curl, CURLOPT_HEADER, true);
+ curl_setopt($curl, CURLOPT_NOBODY, true);
+ curl_exec($curl);
+ $type = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
+ if (strpos($type, 'image') !== false) {
+ return true;
+ } else {
+ return false;
+ }
+ } finally {
+ return false;
+ }
+ }
+
+ /**
+ * Function to create and store a thumbnail representation of a remote image
+ *
+ * @param $thumbnail File_thumbnail object containing the file thumbnail
+ * @return bool true if it succeeded, the exception if it fails, or false if it
+ * is limited by system limits (ie the file is too large.)
+ */
+ protected function storeRemoteFileThumbnail(File_thumbnail $thumbnail)
+ {
+ if (!empty($thumbnail->filename) && file_exists($thumbnail->getPath())) {
+ throw new AlreadyFulfilledException(
+ sprintf('A thumbnail seems to already exist for remote file with id==%u', $thumbnail->file_id));
+ }
+
+ $url = $thumbnail->getUrl();
+ $this->checkWhitelist($url);
+
+ try {
+ $isImage = $this->isRemoteImage($url);
+ if ($isImage==true) {
+ $max_size = common_get_preferred_php_upload_limit();
+ $file_size = $this->getRemoteFileSize($url);
+ if (($file_size!=false) && ($file_size > $max_size)) {
+ common_debug("Went to store remote thumbnail of size " . $file_size .
+ " but the upload limit is " . $max_size . " so we aborted.");
+ return false;
+ }
+ }
+ } catch (Exception $err) {
+ common_debug("Could not determine size of remote image, aborted local storage.");
+ return $err;
+ }
+
+ // First we download the file to memory and test whether it's actually an image file
+ // FIXME: To support remote video/whatever files, this needs reworking.
+ common_debug(sprintf('Downloading remote thumbnail for file id==%u with thumbnail URL: %s',
+ $thumbnail->file_id, $url));
+ $imgData = HTTPClient::quickGet($url);
+ $info = @getimagesizefromstring($imgData);
+ if ($info === false) {
+ throw new UnsupportedMediaException(_('Remote file format was not identified as an image.'), $url);
+ } elseif (!$info[0] || !$info[1]) {
+ throw new UnsupportedMediaException(_('Image file had impossible geometry (0 width or height)'));
+ }
+
+ $ext = File::guessMimeExtension($info['mime']);
+
+ try {
+ // We'll trust sha256 (File::FILEHASH_ALG) not to have collision issues any time soon :)
+ $original_filename = bin2hex('embed.' . $ext);
+ $filehash = hash(File::FILEHASH_ALG, $imgData);
+ $filename = "{$original_filename}-{$filehash}";
+ $fullpath = File_thumbnail::path($filename);
+ // Write the file to disk. Throw Exception on failure
+ if (!file_exists($fullpath) && file_put_contents($fullpath, $imgData) === false) {
+ throw new ServerException(_('Could not write downloaded file to disk.'));
+ }
+ } catch (Exception $err) {
+ common_log(LOG_ERROR, "Went to write a thumbnail to disk in EmbedPlugin::storeRemoteThumbnail " .
+ "but encountered error: {$err}");
+ return $err;
+ } finally {
+ unset($imgData);
+ }
+
+ try {
+ // Updated our database for the file record
+ $orig = clone($thumbnail);
+ $thumbnail->filename = $filename;
+ $thumbnail->width = $info[0]; // array indexes documented on php.net:
+ $thumbnail->height = $info[1]; // https://php.net/manual/en/function.getimagesize.php
+ // Throws exception on failure.
+ $thumbnail->updateWithKeys($orig);
+ } catch (exception $err) {
+ common_log(LOG_ERROR, "Went to write a thumbnail entry to the database in " .
+ "EmbedPlugin::storeRemoteThumbnail but encountered error: ".$err);
+ return $err;
+ }
+ return true;
+ }
+
+ /**
+ * Event raised when GNU social polls the plugin for information about it.
+ * Adds this plugin's version information to $versions array
+ *
+ * @param &$versions array inherited from parent
+ * @return bool true hook value
+ */
+ public function onPluginVersion(array &$versions)
+ {
+ $versions[] = array('name' => 'Embed',
+ 'version' => self::PLUGIN_VERSION,
+ 'author' => 'Mikael Nordfeldth',
+ 'homepage' => 'http://gnu.io/social/',
+ 'description' =>
+ // TRANS: Plugin description.
+ _m('Plugin for using and representing oEmbed, OpenGraph and other data.'));
+ return true;
+ }
+}
--- /dev/null
+The Oembed plugin for using and representing oEmbed data.
+
+See: http://www.oembed.com/
+
+Installation
+============
+This plugin is enabled by default
+
+Settings
+========
+width: Maximum width of the thumbnail in pixels.
+height: Maximum height of the thumbnail in pixels.
+show_html: Whether to show HTML oEmbed data.
+domain_whitelist: Array of regular expressions. Always escape your dots and end your strings.
+check_whitelist: Whether to check the domain_whitelist.
+
+Example
+=======
+$config['thumbnail']['width'] = 42;
+$config['thumbnail']['height'] = 42;
+$config['attachments']['show_html'] = true;
+addPlugin('Oembed', array(
+ 'domain_whitelist' => array(
+ '^i\d*\.ytimg\.com$' => 'YouTube',
+ '^i\d*\.vimeocdn\.com$' => 'Vimeo'
+ ),
+ 'check_whitelist' => true
+));
+
--- /dev/null
+<?php
+// This file is part of GNU social - https://www.gnu.org/software/social
+//
+// GNU social is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU social is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * OembedPlugin implementation for GNU social
+ *
+ * @package GNUsocial
+ * @author Craig Andrews <candrews@integralblue.com>
+ * @author Mikael Nordfeldth <mmn@hethane.se>
+ * @author hannes
+ * @author Diogo Cordeiro <diogo@fc.up.pt>
+ * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
+ * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
+ */
+
+defined('GNUSOCIAL') || die();
+
+/**
+ * Oembed provider implementation
+ *
+ * This class handles all /main/oembed(.xml|.json)/ requests.
+ *
+ * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
+ * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
+ */
+class EmbedAction extends Action
+{
+ protected function handle()
+ {
+ parent::handle();
+
+ $url = $this->trimmed('url');
+ $tls = parse_url($url, PHP_URL_SCHEME) == 'https';
+ $root_url = common_root_url($tls);
+
+ if (substr(strtolower($url), 0, mb_strlen($root_url)) !== strtolower($root_url)) {
+ // TRANS: Error message displaying attachments. %s is the site's base URL.
+ throw new ClientException(sprintf(_('oEmbed data will only be provided for %s URLs.'), $root_url));
+ }
+
+ $path = substr($url, strlen($root_url));
+
+ $r = Router::get();
+
+ // $r->map will throw ClientException 404 if it fails to find a mapping
+ $proxy_args = $r->map($path);
+
+ $oembed=array();
+ $oembed['version']='1.0';
+ $oembed['provider_name']=common_config('site', 'name');
+ $oembed['provider_url']=common_root_url();
+
+ switch ($proxy_args['action']) {
+ case 'shownotice':
+ $oembed['type']='link';
+ try {
+ $notice = Notice::getByID($proxy_args['notice']);
+ } catch (NoResultException $e) {
+ throw new ClientException($e->getMessage(), 404);
+ }
+ $profile = $notice->getProfile();
+ $authorname = $profile->getFancyName();
+ // TRANS: oEmbed title. %1$s is the author name, %2$s is the creation date.
+ $oembed['title'] = sprintf(
+ _('%1$s\'s status on %2$s'),
+ $authorname,
+ common_exact_date($notice->created)
+ );
+ $oembed['author_name']=$authorname;
+ $oembed['author_url']=$profile->profileurl;
+ $oembed['url']=$notice->getUrl();
+ $oembed['html']=$notice->getRendered();
+
+ // maybe add thumbnail
+ foreach ($notice->attachments() as $attachment) {
+ if (!$attachment instanceof File) {
+ common_debug('ATTACHMENTS array entry from notice id=='._ve($notice->getID()).' is something else than a File dataobject: '._ve($attachment));
+ continue;
+ }
+ try {
+ $thumb = $attachment->getThumbnail();
+ $thumb_url = File_thumbnail::url($thumb->filename);
+ $oembed['thumbnail_url'] = $thumb_url;
+ break; // only first one
+ } catch (UseFileAsThumbnailException $e) {
+ $oembed['thumbnail_url'] = $attachment->getUrl();
+ break; // we're happy with that
+ } catch (ServerException $e) {
+ //
+ } catch (ClientException $e) {
+ //
+ }
+ }
+ break;
+
+ case 'attachment':
+ $id = $proxy_args['attachment'];
+ $attachment = File::getKV($id);
+ if (empty($attachment)) {
+ // TRANS: Client error displayed in oEmbed action when attachment not found.
+ // TRANS: %d is an attachment ID.
+ $this->clientError(sprintf(_('Attachment %s not found.'), $id), 404);
+ }
+ if (empty($attachment->filename) && $file_oembed = File_oembed::getKV('file_id', $attachment->id)) {
+ // Proxy the existing oembed information
+ $oembed['type']=$file_oembed->type;
+ $oembed['provider']=$file_oembed->provider;
+ $oembed['provider_url']=$file_oembed->provider_url;
+ $oembed['width']=$file_oembed->width;
+ $oembed['height']=$file_oembed->height;
+ $oembed['html']=$file_oembed->html;
+ $oembed['title']=$file_oembed->title;
+ $oembed['author_name']=$file_oembed->author_name;
+ $oembed['author_url']=$file_oembed->author_url;
+ $oembed['url']=$file_oembed->getUrl();
+ } elseif (substr($attachment->mimetype, 0, strlen('image/'))==='image/') {
+ $oembed['type']='photo';
+ if ($attachment->filename) {
+ $filepath = File::path($attachment->filename);
+ $gis = @getimagesize($filepath);
+ if ($gis) {
+ $oembed['width'] = $gis[0];
+ $oembed['height'] = $gis[1];
+ } else {
+ // TODO Either throw an error or find a fallback?
+ }
+ }
+ $oembed['url']=$attachment->getUrl();
+ try {
+ $thumb = $attachment->getThumbnail();
+ $oembed['thumbnail_url'] = $thumb->getUrl();
+ $oembed['thumbnail_width'] = $thumb->width;
+ $oembed['thumbnail_height'] = $thumb->height;
+ unset($thumb);
+ } catch (UnsupportedMediaException $e) {
+ // No thumbnail data available
+ }
+ } else {
+ $oembed['type']='link';
+ $oembed['url']=common_local_url(
+ 'attachment',
+ array('attachment' => $attachment->id)
+ );
+ }
+ if ($attachment->title) {
+ $oembed['title']=$attachment->title;
+ }
+ break;
+ default:
+ // TRANS: Server error displayed in oEmbed request when a path is not supported.
+ // TRANS: %s is a path.
+ $this->serverError(sprintf(_('"%s" not supported for oembed requests.'), $path), 501);
+ }
+
+ switch ($this->trimmed('format')) {
+ case 'xml':
+ $this->init_document('xml');
+ $this->elementStart('oembed');
+ foreach (array(
+ 'version', 'type', 'provider_name',
+ 'provider_url', 'title', 'author_name',
+ 'author_url', 'url', 'html', 'width',
+ 'height', 'cache_age', 'thumbnail_url',
+ 'thumbnail_width', 'thumbnail_height',
+ ) as $key) {
+ if (isset($oembed[$key]) && $oembed[$key]!='') {
+ $this->element($key, null, $oembed[$key]);
+ }
+ }
+ $this->elementEnd('oembed');
+ $this->end_document('xml');
+ break;
+
+ case 'json':
+ case null:
+ $this->init_document('json');
+ $this->raw(json_encode($oembed));
+ $this->end_document('json');
+ break;
+ default:
+ // TRANS: Error message displaying attachments. %s is a raw MIME type (eg 'image/png')
+ $this->serverError(sprintf(_('Content type %s not supported.'), $apidata['content-type']), 501);
+ }
+ }
+
+ public function init_document($type)
+ {
+ switch ($type) {
+ case 'xml':
+ header('Content-Type: application/xml; charset=utf-8');
+ $this->startXML();
+ break;
+ case 'json':
+ header('Content-Type: application/json; charset=utf-8');
+
+ // Check for JSONP callback
+ $callback = $this->arg('callback');
+ if ($callback) {
+ print $callback . '(';
+ }
+ break;
+ default:
+ // TRANS: Server error displayed in oEmbed action when request specifies an unsupported data format.
+ $this->serverError(_('Not a supported data format.'), 501);
+ break;
+ }
+ }
+
+ public function end_document($type)
+ {
+ switch ($type) {
+ case 'xml':
+ $this->endXML();
+ break;
+ case 'json':
+ // Check for JSONP callback
+ $callback = $this->arg('callback');
+ if ($callback) {
+ print ')';
+ }
+ break;
+ default:
+ // TRANS: Server error displayed in oEmbed action when request specifies an unsupported data format.
+ $this->serverError(_('Not a supported data format.'), 501);
+ break;
+ }
+ return;
+ }
+
+ /**
+ * Is this action read-only?
+ *
+ * @param array $args other arguments
+ *
+ * @return boolean is read only action?
+ */
+ public function isReadOnly($args)
+ {
+ return true;
+ }
+}
--- /dev/null
+<?php
+// This file is part of GNU social - https://www.gnu.org/software/social
+//
+// GNU social is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU social is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * OembedPlugin implementation for GNU social
+ *
+ * @package GNUsocial
+ * @author Stephen Paul Weber
+ * @author Mikael Nordfeldth
+ * @author Diogo Cordeiro <diogo@fc.up.pt>
+ * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
+ * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
+ */
+
+defined('GNUSOCIAL') || die();
+
+/**
+ * Table Definition for file_oembed
+ *
+ * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
+ * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
+ */
+class File_oembed extends Managed_DataObject
+{
+ public $__table = 'file_oembed'; // table name
+ public $file_id; // int(4) primary_key not_null
+ public $version; // varchar(20)
+ public $type; // varchar(20)
+ public $mimetype; // varchar(50)
+ public $provider; // varchar(50)
+ public $provider_url; // varchar(191) not 255 because utf8mb4 takes more space
+ public $width; // int(4)
+ public $height; // int(4)
+ public $html; // text()
+ public $title; // varchar(191) not 255 because utf8mb4 takes more space
+ public $author_name; // varchar(50)
+ public $author_url; // varchar(191) not 255 because utf8mb4 takes more space
+ public $url; // varchar(191) not 255 because utf8mb4 takes more space
+ public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
+
+ public static function schemaDef()
+ {
+ return array(
+ 'fields' => array(
+ 'file_id' => array('type' => 'int', 'not null' => true, 'description' => 'oEmbed for that URL/file'),
+ 'version' => array('type' => 'varchar', 'length' => 20, 'description' => 'oEmbed spec. version'),
+ 'type' => array('type' => 'varchar', 'length' => 20, 'description' => 'oEmbed type: photo, video, link, rich'),
+ 'mimetype' => array('type' => 'varchar', 'length' => 50, 'description' => 'mime type of resource'),
+ 'provider' => array('type' => 'text', 'description' => 'name of this oEmbed provider'),
+ 'provider_url' => array('type' => 'text', 'description' => 'URL of this oEmbed provider'),
+ 'width' => array('type' => 'int', 'description' => 'width of oEmbed resource when available'),
+ 'height' => array('type' => 'int', 'description' => 'height of oEmbed resource when available'),
+ 'html' => array('type' => 'text', 'description' => 'html representation of this oEmbed resource when applicable'),
+ 'title' => array('type' => 'text', 'description' => 'title of oEmbed resource when available'),
+ 'author_name' => array('type' => 'text', 'description' => 'author name for this oEmbed resource'),
+ 'author_url' => array('type' => 'text', 'description' => 'author URL for this oEmbed resource'),
+ 'url' => array('type' => 'text', 'description' => 'URL for this oEmbed resource when applicable (photo, link)'),
+ 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
+ ),
+ 'primary key' => array('file_id'),
+ 'foreign keys' => array(
+ 'file_oembed_file_id_fkey' => array('file', array('file_id' => 'id')),
+ ),
+ );
+ }
+
+ public static function _getOembed($url)
+ {
+ try {
+ return oEmbedHelper::getObject($url);
+ } catch (Exception $e) {
+ common_log(LOG_INFO, "Error during oembed lookup for $url - " . $e->getMessage());
+ return false;
+ }
+ }
+
+ /**
+ * Fetch an entry by using a File's id
+ */
+ public static function getByFile(File $file)
+ {
+ $fo = new File_embed();
+ $fo->file_id = $file->id;
+ if (!$fo->find(true)) {
+ throw new NoResultException($fo);
+ }
+ return $fo;
+ }
+
+ public function getUrl()
+ {
+ return $this->url;
+ }
+
+ /**
+ * Save embedding info for a new file.
+ *
+ * @param object $data Services_oEmbed_Object_*
+ * @param int $file_id
+ */
+ public static function saveNew($data, $file_id)
+ {
+ $file_embed = new File_embed;
+ $file_embed->file_id = $file_id;
+ if (!isset($data->version)) {
+ common_debug('DEBUGGING oEmbed: data->version undefined in variable $data: '.var_export($data, true));
+ }
+ $file_embed->version = $data->version;
+ $file_embed->type = $data->type;
+ if (!empty($data->provider_name)) {
+ $file_embed->provider = $data->provider_name;
+ }
+ if (!empty($data->provider)) {
+ $file_embed->provider = $data->provider;
+ }
+ if (!empty($data->provider_url)) {
+ $file_embed->provider_url = $data->provider_url;
+ }
+ if (!empty($data->width)) {
+ $file_embed->width = intval($data->width);
+ }
+ if (!empty($data->height)) {
+ $file_embed->height = intval($data->height);
+ }
+ if (!empty($data->html)) {
+ $file_embed->html = $data->html;
+ }
+ if (!empty($data->title)) {
+ $file_embed->title = $data->title;
+ }
+ if (!empty($data->author_name)) {
+ $file_embed->author_name = $data->author_name;
+ }
+ if (!empty($data->author_url)) {
+ $file_embed->author_url = $data->author_url;
+ }
+ if (!empty($data->url)) {
+ $file_embed->url = $data->url;
+ $given_url = File_redirection::_canonUrl($file_embed->url);
+ if (! empty($given_url)) {
+ try {
+ $file = File::getByUrl($given_url);
+ $file_embed->mimetype = $file->mimetype;
+ } catch (NoResultException $e) {
+ // File_redirection::where argument 'discover' is false to avoid loops
+ $redir = File_redirection::where($given_url, false);
+ if (!empty($redir->file_id)) {
+ $file_id = $redir->file_id;
+ }
+ }
+ }
+ }
+ $result = $file_embed->insert();
+ if ($result === false) {
+ throw new ServerException('Failed to insert File_embed data into database!');
+ }
+ if (!empty($data->thumbnail_url) || ($data->type == 'photo')) {
+ $ft = File_thumbnail::getKV('file_id', $file_id);
+ if ($ft instanceof File_thumbnail) {
+ common_log(
+ LOG_WARNING,
+ "Strangely, a File_thumbnail object exists for new file $file_id",
+ __FILE__
+ );
+ } else {
+ File_thumbnail::saveNew($data, $file_id);
+ }
+ }
+ }
+}
--- /dev/null
+<?php
+// This file is part of GNU social - https://www.gnu.org/software/social
+//
+// GNU social is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU social is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * OembedPlugin implementation for GNU social
+ *
+ * @package GNUsocial
+ * @author Mikael Nordfeldth
+ * @author hannes
+ * @author Diogo Cordeiro <diogo@fc.up.pt>
+ * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
+ * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
+ */
+
+defined('GNUSOCIAL') || die();
+
+/**
+ * Utility class to wrap basic oEmbed lookups.
+ *
+ * Blacklisted hosts will use an alternate lookup method:
+ * - Twitpic
+ *
+ * Whitelisted hosts will use known oEmbed API endpoints:
+ * - Flickr, YFrog
+ *
+ * Sites that provide discovery links will use them directly; a bug
+ * in use of discovery links with query strings is worked around.
+ *
+ * Others will fall back to oohembed (unless disabled).
+ * The API endpoint can be configured or disabled through config
+ * as 'oohembed'/'endpoint'.
+ *
+ * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
+ * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
+ */
+class oEmbedHelper
+{
+ protected static $apiMap = array(
+ 'flickr.com' => 'https://www.flickr.com/services/oembed/',
+ 'youtube.com' => 'https://www.youtube.com/oembed',
+ 'viddler.com' => 'http://lab.viddler.com/services/oembed/',
+ 'revision3.com' => 'https://revision3.com/api/oembed/',
+ 'vimeo.com' => 'https://vimeo.com/api/oembed.json',
+ );
+
+ /**
+ * Perform or fake an oEmbed lookup for the given resource.
+ *
+ * Some known hosts are whitelisted with API endpoints where we
+ * know they exist but autodiscovery data isn't available.
+ * If autodiscovery links are missing and we don't recognize the
+ * host, we'll pass it to noembed.com's public service which
+ * will either proxy or fake info on a lot of sites.
+ *
+ * A few hosts are blacklisted due to known problems with oohembed,
+ * in which case we'll look up the info another way and return
+ * equivalent data.
+ *
+ * Throws exceptions on failure.
+ *
+ * @param string $url
+ * @param array $params
+ * @return object
+ */
+ public static function getObject($url, $params=array())
+ {
+ common_log(LOG_INFO, 'Checking for remote URL metadata for ' . $url);
+
+ // TODO: Make this class something like UrlMetadata, or use a dataobject?
+ $metadata = new stdClass();
+
+ if (Event::handle('GetRemoteUrlMetadata', array($url, &$metadata))) {
+ // If that event didn't return anything, try downloading the body and parse it
+
+ // don't use quickGet since we want to check Content-Type header for utf-8
+ $client = new HTTPClient();
+ $response = $client->get($url);
+ if (!$response->isOk()) {
+ // TRANS: Exception. %s is the URL we tried to GET.
+ throw new Exception(sprintf(_m('Could not GET URL %s.'), $url), $response->getStatus());
+ }
+ $body = $response->getBody();
+
+ // DOMDocument::loadHTML may throw warnings on unrecognized elements,
+ // and notices on unrecognized namespaces.
+ $old = error_reporting(error_reporting() & ~(E_WARNING | E_NOTICE));
+
+ // DOMDocument assumes ISO-8859-1 per HTML spec
+ // use UTF-8 if we find any evidence of that encoding
+ $utf8_evidence = false;
+ $unicode_check_dom = new DOMDocument();
+ $ok = $unicode_check_dom->loadHTML($body);
+ if (!$ok) {
+ throw new oEmbedHelper_BadHtmlException();
+ }
+ $metaNodes = $unicode_check_dom->getElementsByTagName('meta');
+ foreach ($metaNodes as $metaNode) {
+ // case in-sensitive since Content-type and utf-8 can be written in many ways
+ if (stristr($metaNode->getAttribute('http-equiv'), 'content-type')
+ && stristr($metaNode->getAttribute('content'), 'utf-8')) {
+ $utf8_evidence = true;
+ break;
+ } elseif (stristr($metaNode->getAttribute('charset'), 'utf-8')) {
+ $utf8_evidence = true;
+ break;
+ }
+ }
+ unset($unicode_check_dom);
+
+ // The Content-Type HTTP response header overrides encoding metatags in DOM
+ if (stristr($response->getHeader('Content-Type'), 'utf-8')) {
+ $utf8_evidence = true;
+ }
+
+ // add utf-8 encoding prolog if we have reason to believe this is utf-8 content
+ // DOMDocument('1.0', 'UTF-8') does not work!
+ $utf8_tag = $utf8_evidence ? '<?xml encoding="utf-8" ?>' : '';
+
+ $dom = new DOMDocument();
+ $ok = $dom->loadHTML($utf8_tag.$body);
+ unset($body); // storing the DOM in memory is enough...
+ error_reporting($old);
+
+ if (!$ok) {
+ throw new oEmbedHelper_BadHtmlException();
+ }
+
+ Event::handle('GetRemoteUrlMetadataFromDom', array($url, $dom, &$metadata));
+ }
+
+ return self::normalize($metadata);
+ }
+
+ /**
+ * Partially ripped from OStatus' FeedDiscovery class.
+ *
+ * @param string $url source URL, used to resolve relative links
+ * @param string $body HTML body text
+ * @return mixed string with URL or false if no target found
+ */
+ public static function oEmbedEndpointFromHTML(DOMDocument $dom)
+ {
+ // Ok... now on to the links!
+ $feeds = array(
+ 'application/json+oembed' => false,
+ );
+
+ $nodes = $dom->getElementsByTagName('link');
+ for ($i = 0; $i < $nodes->length; $i++) {
+ $node = $nodes->item($i);
+ if ($node->hasAttributes()) {
+ $rel = $node->attributes->getNamedItem('rel');
+ $type = $node->attributes->getNamedItem('type');
+ $href = $node->attributes->getNamedItem('href');
+ if ($rel && $type && $href) {
+ $rel = array_filter(explode(" ", $rel->value));
+ $type = trim($type->value);
+ $href = trim($href->value);
+
+ if (in_array('alternate', $rel) && array_key_exists($type, $feeds) && empty($feeds[$type])) {
+ // Save the first feed found of each type...
+ $feeds[$type] = $href;
+ }
+ }
+ }
+ }
+
+ // Return the highest-priority feed found
+ foreach ($feeds as $type => $url) {
+ if ($url) {
+ return $url;
+ }
+ }
+
+ throw new oEmbedHelper_DiscoveryException();
+ }
+
+ /**
+ * Actually do an oEmbed lookup to a particular API endpoint.
+ *
+ * @param string $api oEmbed API endpoint URL
+ * @param string $url target URL to look up info about
+ * @param array $params
+ * @return object
+ */
+ public static function getOembedFrom($api, $url, $params=array())
+ {
+ if (empty($api)) {
+ // TRANS: Server exception thrown in oEmbed action if no API endpoint is available.
+ throw new ServerException(_('No oEmbed API endpoint available.'));
+ }
+ $params['url'] = $url;
+ $params['format'] = 'json';
+ $key=common_config('oembed', 'apikey');
+ if (isset($key)) {
+ $params['key'] = common_config('oembed', 'apikey');
+ }
+
+ $oembed_data = HTTPClient::quickGetJson($api, $params);
+ if (isset($oembed_data->html)) {
+ $oembed_data->html = common_purify($oembed_data->html);
+ }
+
+ return $oembed_data;
+ }
+
+ /**
+ * Normalize oEmbed format.
+ *
+ * @param object $orig
+ * @return object
+ */
+ public static function normalize(stdClass $data)
+ {
+ if (empty($data->type)) {
+ throw new Exception('Invalid oEmbed data: no type field.');
+ }
+ if ($data->type == 'image') {
+ // YFrog does this.
+ $data->type = 'photo';
+ }
+
+ if (isset($data->thumbnail_url)) {
+ if (!isset($data->thumbnail_width)) {
+ // !?!?!
+ $data->thumbnail_width = common_config('thumbnail', 'width');
+ $data->thumbnail_height = common_config('thumbnail', 'height');
+ }
+ }
+
+ return $data;
+ }
+}
+
+class oEmbedHelper_Exception extends Exception
+{
+ public function __construct($message = "", $code = 0, $previous = null)
+ {
+ parent::__construct($message, $code);
+ }
+}
+
+class oEmbedHelper_BadHtmlException extends oEmbedHelper_Exception
+{
+ public function __construct($previous=null)
+ {
+ return parent::__construct('Bad HTML in discovery data.', 0, $previous);
+ }
+}
+
+class oEmbedHelper_DiscoveryException extends oEmbedHelper_Exception
+{
+ public function __construct($previous=null)
+ {
+ return parent::__construct('No oEmbed discovery data.', 0, $previous);
+ }
+}
--- /dev/null
+<?php
+// This file is part of GNU social - https://www.gnu.org/software/social
+//
+// GNU social is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU social is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * OembedPlugin implementation for GNU social
+ *
+ * @package GNUsocial
+ * @author Mikael Nordfeldth
+ * @author Diogo Cordeiro <diogo@fc.up.pt>
+ * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
+ * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
+ */
+
+defined('GNUSOCIAL') || die();
+
+/**
+ * Utility class to get OpenGraph data from HTML DOMs etc.
+ *
+ * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
+ * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
+ */
+class OpenGraphHelper
+{
+ const KEY_REGEX = '/^og\:(\w+(?:\:\w+)?)/';
+ protected static $property_map = [
+ 'site_name' => 'provider_name',
+ 'title' => 'title',
+ 'description' => 'html',
+ 'type' => 'type',
+ 'url' => 'url',
+ 'image' => 'thumbnail_url',
+ 'image:height' => 'thumbnail_height',
+ 'image:width' => 'thumbnail_width',
+ ];
+
+ // This regex map has: /pattern(match)/ => matchindex | string
+ protected static $type_regex_map = [
+ '/^(video)/' => 1,
+ '/^image/' => 'photo',
+ ];
+
+ public static function ogFromHtml(DOMDocument $dom)
+ {
+ $obj = new stdClass();
+ $obj->version = '1.0'; // fake it til u make it
+
+ $nodes = $dom->getElementsByTagName('meta');
+ for ($i = 0; $i < $nodes->length; $i++) {
+ $node = $nodes->item($i);
+ if (!$node->hasAttributes()) {
+ continue;
+ }
+ $property = $node->attributes->getNamedItem('property');
+ $matches = array();
+ if ($property === null || !preg_match(self::KEY_REGEX, $property->value, $matches)) {
+ // not property="og:something"
+ continue;
+ }
+ if (!isset(self::$property_map[$matches[1]])) {
+ // unknown metadata property, nothing we would care about anyway
+ continue;
+ }
+
+ $prop = self::$property_map[$matches[1]];
+ $obj->{$prop} = $node->attributes->getNamedItem('content')->value;
+ // I don't care right now if they're empty
+ }
+ if (isset($obj->type)) {
+ // Loop through each known OpenGraph type where we have a match in oEmbed
+ foreach (self::$type_regex_map as $pattern=>$replacement) {
+ $matches = array();
+ if (preg_match($pattern, $obj->type, $matches)) {
+ $obj->type = is_int($replacement)
+ ? $matches[$replacement]
+ : $replacement;
+ break;
+ }
+ }
+ // If it's not known to our type map, we just pass it through in hopes of it getting handled anyway
+ } elseif (isset($obj->url)) {
+ // If no type is set but we have a URL, let's set type=link
+ $obj->type = 'link';
+ }
+ return $obj;
+ }
+}
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-06-10 00:39+0100\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"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:721
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
+
+#. TRANS: Exception. %s is the URL we tried to GET.
+#: lib/oembedhelper.php:93
+#, php-format
+msgid "Could not GET URL %s."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Afrikaans (http://www.transifex.com/gnu-social/gnu-social/language/af/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: af\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Arabic (http://www.transifex.com/gnu-social/gnu-social/language/ar/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ar\n"
+"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Arabic (Egypt) (http://www.transifex.com/gnu-social/gnu-social/language/ar_EG/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ar_EG\n"
+"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Asturian (http://www.transifex.com/gnu-social/gnu-social/language/ast/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ast\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Belarusian (Tarask) (http://www.transifex.com/gnu-social/gnu-social/language/be@tarask/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: be@tarask\n"
+"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Bulgarian (http://www.transifex.com/gnu-social/gnu-social/language/bg/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: bg\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Bengali (India) (http://www.transifex.com/gnu-social/gnu-social/language/bn_IN/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: bn_IN\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Breton (http://www.transifex.com/gnu-social/gnu-social/language/br/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: br\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Catalan (http://www.transifex.com/gnu-social/gnu-social/language/ca/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ca\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Czech (http://www.transifex.com/gnu-social/gnu-social/language/cs/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: cs\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Danish (http://www.transifex.com/gnu-social/gnu-social/language/da/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: da\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: German (http://www.transifex.com/gnu-social/gnu-social/language/de/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: de\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Greek (http://www.transifex.com/gnu-social/gnu-social/language/el/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: el\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+# Luke Hollins <luke@farcry.ca>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-03-07 17:25+0000\n"
+"Last-Translator: Luke Hollins <luke@farcry.ca>\n"
+"Language-Team: English (United Kingdom) (http://www.transifex.com/gnu-social/gnu-social/language/en_GB/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: en_GB\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr "Plugin for using and representing Oembed data."
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Esperanto (http://www.transifex.com/gnu-social/gnu-social/language/eo/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: eo\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+# Juan Riquelme González <soulchainer@gmail.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-11 23:30+0000\n"
+"Last-Translator: Juan Riquelme González <soulchainer@gmail.com>\n"
+"Language-Team: Spanish (http://www.transifex.com/gnu-social/gnu-social/language/es/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: es\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr "Complemento para el uso y representación de datos en formato Oembed."
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Basque (http://www.transifex.com/gnu-social/gnu-social/language/eu/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: eu\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Persian (http://www.transifex.com/gnu-social/gnu-social/language/fa/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: fa\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Finnish (http://www.transifex.com/gnu-social/gnu-social/language/fi/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: fi\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+# iGor milhit <igormilhit@mailoo.org>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-05-06 06:02+0000\n"
+"Last-Translator: iGor milhit <igormilhit@mailoo.org>\n"
+"Language-Team: French (http://www.transifex.com/gnu-social/gnu-social/language/fr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: fr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr "Extension pour l'utilisation et la représentation des données Oembed"
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Friulian (http://www.transifex.com/gnu-social/gnu-social/language/fur/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: fur\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Galician (http://www.transifex.com/gnu-social/gnu-social/language/gl/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: gl\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Hebrew (http://www.transifex.com/gnu-social/gnu-social/language/he/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: he\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Upper Sorbian (http://www.transifex.com/gnu-social/gnu-social/language/hsb/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: hsb\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Hungarian (http://www.transifex.com/gnu-social/gnu-social/language/hu/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: hu\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Armenian (Armenia) (http://www.transifex.com/gnu-social/gnu-social/language/hy_AM/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: hy_AM\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Interlingua (http://www.transifex.com/gnu-social/gnu-social/language/ia/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ia\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Indonesian (http://www.transifex.com/gnu-social/gnu-social/language/id/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: id\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+# Ciencisto Dementa <maliktunga@users.noreply.github.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-06-17 02:25+0000\n"
+"Last-Translator: Ciencisto Dementa <maliktunga@users.noreply.github.com>\n"
+"Language-Team: Ido (http://www.transifex.com/gnu-social/gnu-social/language/io/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: io\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr "Extensilo por uzar e reprezentar Oembed-datumi."
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Icelandic (http://www.transifex.com/gnu-social/gnu-social/language/is/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: is\n"
+"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Italian (http://www.transifex.com/gnu-social/gnu-social/language/it/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: it\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Japanese (http://www.transifex.com/gnu-social/gnu-social/language/ja/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ja\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Georgian (http://www.transifex.com/gnu-social/gnu-social/language/ka/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ka\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Korean (http://www.transifex.com/gnu-social/gnu-social/language/ko/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ko\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Colognian (http://www.transifex.com/gnu-social/gnu-social/language/ksh/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ksh\n"
+"Plural-Forms: nplurals=3; plural=(n==0) ? 0 : (n==1) ? 1 : 2;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Luxembourgish (http://www.transifex.com/gnu-social/gnu-social/language/lb/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: lb\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Lithuanian (http://www.transifex.com/gnu-social/gnu-social/language/lt/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: lt\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:39+0000\n"
+"Last-Translator: digitaldreamer <digitaldreamer@email.cz>\n"
+"Language-Team: Latvian (http://www.transifex.com/gnu-social/gnu-social/language/lv/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: lv\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Malagasy (http://www.transifex.com/gnu-social/gnu-social/language/mg/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: mg\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Macedonian (http://www.transifex.com/gnu-social/gnu-social/language/mk/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: mk\n"
+"Plural-Forms: nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Malayalam (http://www.transifex.com/gnu-social/gnu-social/language/ml/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ml\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Malay (http://www.transifex.com/gnu-social/gnu-social/language/ms/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ms\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Burmese (http://www.transifex.com/gnu-social/gnu-social/language/my/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: my\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Norwegian Bokmål (http://www.transifex.com/gnu-social/gnu-social/language/nb/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: nb\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:30+0000\n"
+"Last-Translator: digitaldreamer <digitaldreamer@email.cz>\n"
+"Language-Team: Nepali (http://www.transifex.com/gnu-social/gnu-social/language/ne/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ne\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Dutch (http://www.transifex.com/gnu-social/gnu-social/language/nl/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: nl\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Norwegian Nynorsk (http://www.transifex.com/gnu-social/gnu-social/language/nn/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: nn\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Polish (http://www.transifex.com/gnu-social/gnu-social/language/pl/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pl\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Portuguese (http://www.transifex.com/gnu-social/gnu-social/language/pt/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pt\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+# no and no <nicolasmaia@tutanota.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-04-15 14:52+0000\n"
+"Last-Translator: no and no <nicolasmaia@tutanota.com>\n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/gnu-social/gnu-social/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr "Plugin para usar e representar dados do Oembed."
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Romanian (Romania) (http://www.transifex.com/gnu-social/gnu-social/language/ro_RO/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ro_RO\n"
+"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Russian (http://www.transifex.com/gnu-social/gnu-social/language/ru/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ru\n"
+"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Slovenian (http://www.transifex.com/gnu-social/gnu-social/language/sl/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: sl\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Serbian (http://www.transifex.com/gnu-social/gnu-social/language/sr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: sr\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+# Kristoffer Grundström <kristoffer.grundstrom1983@gmail.com>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-09-17 17:24+0000\n"
+"Last-Translator: Kristoffer Grundström <kristoffer.grundstrom1983@gmail.com>\n"
+"Language-Team: Swedish (http://www.transifex.com/gnu-social/gnu-social/language/sv/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: sv\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr "Insticksprogram för användning och representering av Oembed-data."
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Tamil (http://www.transifex.com/gnu-social/gnu-social/language/ta/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ta\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Telugu (http://www.transifex.com/gnu-social/gnu-social/language/te/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: te\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Tagalog (http://www.transifex.com/gnu-social/gnu-social/language/tl/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: tl\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Turkish (http://www.transifex.com/gnu-social/gnu-social/language/tr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: tr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+# Петро Романчук <ixer@ixer.org.ua>, 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-03-31 10:04+0000\n"
+"Last-Translator: Петро Романчук <ixer@ixer.org.ua>\n"
+"Language-Team: Ukrainian (http://www.transifex.com/gnu-social/gnu-social/language/uk/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: uk\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr "Плагін для використання та представлення вбудованих (Oembed) даних."
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Urdu (Pakistan) (http://www.transifex.com/gnu-social/gnu-social/language/ur_PK/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ur_PK\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Vietnamese (http://www.transifex.com/gnu-social/gnu-social/language/vi/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: vi\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Chinese (http://www.transifex.com/gnu-social/gnu-social/language/zh/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: zh\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Chinese (China) (http://www.transifex.com/gnu-social/gnu-social/language/zh_CN/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: zh_CN\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+# Translation file for GNU social - the free software social networking platform
+# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
+# This file is under https://www.gnu.org/licenses/agpl v3 or later
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU social\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-02-02 17:47+0100\n"
+"PO-Revision-Date: 2015-02-07 09:29+0000\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: Chinese (Taiwan) (http://www.transifex.com/gnu-social/gnu-social/language/zh_TW/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: zh_TW\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#. TRANS: Plugin description.
+#: OembedPlugin.php:190
+msgid "Plugin for using and representing Oembed data."
+msgstr ""
--- /dev/null
+#!/usr/bin/env php
+<?php
+// This file is part of GNU social - https://www.gnu.org/software/social
+//
+// GNU social is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU social is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * OembedPlugin implementation for GNU social
+ *
+ * @package GNUsocial
+ * @author Mikael Nordfeldth
+ * @author Diogo Cordeiro <diogo@fc.up.pt>
+ * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
+ * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
+ */
+
+defined('GNUSOCIAL') || die();
+
+define('INSTALLDIR', realpath(__DIR__ . '/../../..'));
+
+$longoptions = array('dry-run');
+
+$helptext = <<<END_OF_USERROLE_HELP
+fixup_files.php [options]
+Patches up file entries with corrupted types and titles (the "h bug").
+
+ --dry-run look but don't touch
+
+END_OF_USERROLE_HELP;
+
+require_once INSTALLDIR.'/scripts/commandline.inc';
+
+$dry = have_option('dry-run');
+
+$f = new File();
+$f->title = 'h';
+$f->mimetype = 'h';
+$f->size = 0;
+$f->protected = 0;
+$f->find();
+echo "Found $f->N bad items:\n";
+
+while ($f->fetch()) {
+ echo "$f->id $f->url";
+
+ $data = File_redirection::lookupWhere($f->url);
+ if ($dry) {
+ if (is_array($data)) {
+ echo " (unchanged)\n";
+ } else {
+ echo " (unchanged, but embedding lookup failed)\n";
+ }
+ } else {
+ // NULL out the mime/title/size/protected fields
+ $sql = sprintf(
+ "UPDATE file " .
+ "SET mimetype=null,title=null,size=null,protected=null " .
+ "WHERE id=%d",
+ $f->id
+ );
+ $f->query($sql);
+ $f->decache();
+
+ if (is_array($data)) {
+ Event::handle('EndFileSaveNew', array($f, $data, $f->url));
+ echo " (ok)\n";
+ } else {
+ echo " (ok, but embedding lookup failed)\n";
+ }
+ }
+}
+
+echo "done.\n";
--- /dev/null
+#!/usr/bin/env php
+<?php
+// This file is part of GNU social - https://www.gnu.org/software/social
+//
+// GNU social is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU social is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * OembedPlugin implementation for GNU social
+ *
+ * @package GNUsocial
+ * @author Mikael Nordfeldth
+ * @author Diogo Cordeiro <diogo@fc.up.pt>
+ * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
+ * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
+ */
+
+defined('GNUSOCIAL') || die();
+
+define('INSTALLDIR', realpath(__DIR__ . '/../../..'));
+
+$shortoptions = 'u:';
+$longoptions = array('url=');
+
+$helptext = <<<END_OF_HELP
+poll_oembed.php --url URL
+Test oEmbed API on a URL.
+
+ -u --url URL to try oEmbed against
+
+END_OF_HELP;
+
+require_once INSTALLDIR.'/scripts/commandline.inc';
+
+if (!have_option('u', 'url')) {
+ echo 'No URL given.';
+ exit(1);
+}
+
+$url = get_option_value('u', 'url');
+
+print "Contacting URL\n";
+
+$oEmbed = oEmbedHelper::getObject($url);
+var_dump($oEmbed);
+
+print "\nDONE.\n";
--- /dev/null
+<?php
+// This file is part of GNU social - https://www.gnu.org/software/social
+//
+// GNU social is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// GNU social is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * OembedPlugin implementation for GNU social
+ *
+ * @package GNUsocial
+ * @author Mikael Nordfeldth
+ * @author Diogo Cordeiro <diogo@fc.up.pt>
+ * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
+ * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
+ */
+
+if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
+ print "This script must be run from the command line\n";
+ exit();
+}
+
+define('INSTALLDIR', realpath(__DIR__ . '/../../..'));
+define('GNUSOCIAL', true);
+define('STATUSNET', true); // compatibility
+
+require_once INSTALLDIR . '/lib/common.php';
+
+class oEmbedTest extends PHPUnit_Framework_TestCase
+{
+ public function setup()
+ {
+ $this->old_ohembed = common_config('ohembed', 'endpoint');
+ }
+
+ public function tearDown()
+ {
+ $GLOBALS['config']['oembed']['endpoint'] = $this->old_ohembed;
+ }
+
+ /**
+ * Test with ohembed DISABLED.
+ *
+ * @dataProvider discoverableSources
+ */
+ public function testoEmbed($url, $expectedType)
+ {
+ $GLOBALS['config']['oembed']['endpoint'] = false;
+ $this->_doTest($url, $expectedType);
+ }
+
+ /**
+ * Test with oohembed ENABLED.
+ *
+ * @dataProvider fallbackSources
+ */
+ public function testnoEmbed($url, $expectedType)
+ {
+ $GLOBALS['config']['oembed']['endpoint'] = $this->_endpoint();
+ $this->_doTest($url, $expectedType);
+ }
+
+ /**
+ * Get default oembed endpoint.
+ *
+ * @return string
+ */
+ public function _endpoint()
+ {
+ $default = array();
+ $_server = 'localhost';
+ $_path = '';
+ require INSTALLDIR . '/lib/default.php';
+ return $default['oembed']['endpoint'];
+ }
+
+ /**
+ * Actually run an individual test.
+ *
+ * @param string $url
+ * @param string $expectedType
+ */
+ public function _doTest($url, $expectedType)
+ {
+ try {
+ $data = oEmbedHelper::getObject($url);
+ $this->assertEquals($expectedType, $data->type);
+ if ($data->type == 'photo') {
+ $this->assertTrue(!empty($data->url), 'Photo must have a URL.');
+ $this->assertTrue(!empty($data->width), 'Photo must have a width.');
+ $this->assertTrue(!empty($data->height), 'Photo must have a height.');
+ } elseif ($data->type == 'video') {
+ $this->assertTrue(!empty($data->html), 'Video must have embedding HTML.');
+ $this->assertTrue(!empty($data->thumbnail_url), 'Video should have a thumbnail.');
+ }
+ if (!empty($data->thumbnail_url)) {
+ $this->assertTrue(!empty($data->thumbnail_width), 'Thumbnail must list a width.');
+ $this->assertTrue(!empty($data->thumbnail_height), 'Thumbnail must list a height.');
+ }
+ } catch (Exception $e) {
+ if ($expectedType == 'none') {
+ $this->assertEquals($expectedType, 'none', 'Should not have data for this URL.');
+ } else {
+ throw $e;
+ }
+ }
+ }
+
+ /**
+ * Sample oEmbed targets for sites we know ourselves...
+ * @return array
+ */
+ public static function knownSources()
+ {
+ $sources = array(
+ array('https://www.flickr.com/photos/brionv/5172500179/', 'photo'),
+ );
+ return $sources;
+ }
+
+ /**
+ * Sample oEmbed targets that can be found via discovery.
+ * Includes also knownSources() output.
+ *
+ * @return array
+ */
+ public static function discoverableSources()
+ {
+ $sources = array(
+
+ array('http://www.youtube.com/watch?v=eUgLR232Cnw', 'video'),
+ array('http://vimeo.com/9283184', 'video'),
+
+ // Will fail discovery:
+ array('http://leuksman.com/log/2010/10/29/statusnet-0-9-6-release/', 'none'),
+ );
+ return array_merge(self::knownSources(), $sources);
+ }
+
+ /**
+ * Sample oEmbed targets that can be found via noembed.com.
+ * Includes also discoverableSources() output.
+ *
+ * @return array
+ */
+ public static function fallbackSources()
+ {
+ $sources = array(
+ array('https://github.com/git/git/commit/85e9c7e1d42849c5c3084a9da748608468310c0e', 'Github Commit'), // @fixme in future there may be a native provider -- will change to 'photo'
+ );
+
+ $sources = array();
+
+ return array_merge(self::discoverableSources(), $sources);
+ }
+}
+++ /dev/null
-So far this is still in $config['site']['oembed'].
-
-oembed
---------
-
-oEmbed endpoint for multimedia attachments (links in posts). Will also
-work as 'oohembed' for backwards compatibility.
-
-endpoint: oohembed endpoint using http://oohembed.com/ software. Defaults to
- 'http://oohembed.com/oohembed/'.
-order: Array of methods to check for OEmbed data. Methods include 'built-in'
- (use a built-in function to simulate oEmbed for some sites),
- 'well-known' (use well-known public oEmbed endpoints),
- 'discovery' (discover using <link> headers in HTML), 'service' (use
- a third-party service, like oohembed or embed.ly. Default is
- array('built-in', 'well-known', 'service', 'discovery'). Note that very
- few sites implement oEmbed; 'discovery' is going to fail 99% of the
- time.
+++ /dev/null
-<?php
-// This file is part of GNU social - https://www.gnu.org/software/social
-//
-// GNU social is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// GNU social is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * OembedPlugin implementation for GNU social
- *
- * @package GNUsocial
- * @author Stephen Paul Weber
- * @author hannes
- * @author Mikael Nordfeldth
- * @author Diogo Cordeiro <diogo@fc.up.pt>
- * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
- * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
- */
-
-defined('GNUSOCIAL') || die();
-
-/**
- * Base class for the oEmbed plugin that does most of the heavy lifting to get
- * and display representations for remote content.
- *
- * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
- * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
- */
-class OembedPlugin extends Plugin
-{
- const PLUGIN_VERSION = '2.0.1';
-
- // settings which can be set in config.php with addPlugin('Oembed', array('param'=>'value', ...));
- // WARNING, these are _regexps_ (slashes added later). Always escape your dots and end your strings
- public $domain_whitelist = array( // hostname => service provider
- '^i\d*\.ytimg\.com$' => 'YouTube',
- '^i\d*\.vimeocdn\.com$' => 'Vimeo',
- );
- public $append_whitelist = array(); // fill this array as domain_whitelist to add more trusted sources
- public $check_whitelist = false; // security/abuse precaution
-
- protected $imgData = array();
-
- /**
- * Initialize the oEmbed plugin and set up the environment it needs for it.
- * Returns true if it initialized properly, the exception object if it
- * doesn't.
- */
- public function initialize()
- {
- parent::initialize();
-
- $this->domain_whitelist = array_merge($this->domain_whitelist, $this->append_whitelist);
- }
-
- /**
- * The code executed on GNU social checking the database schema, which in
- * this case is to make sure we have the plugin table we need.
- *
- * @return bool true if it ran successfully, the exception object if it doesn't.
- */
- public function onCheckSchema()
- {
- $schema = Schema::get();
- $schema->ensureTable('file_oembed', File_oembed::schemaDef());
- return true;
- }
-
- /**
- * This code executes when GNU social creates the page routing, and we hook
- * on this event to add our action handler for oEmbed.
- *
- * @param $m URLMapper the router that was initialized.
- * @return bool true if successful, the exception object if it isn't.
- */
- public function onRouterInitialized(URLMapper $m)
- {
- $m->connect('main/oembed', ['action' => 'oembed']);
- }
-
- /**
- * This event executes when GNU social encounters a remote URL we then decide
- * to interrogate for metadata. oEmbed gloms onto it to see if we have an
- * oEmbed endpoint or image to try to represent in the post.
- *
- * @param $url string the remote URL we're looking at
- * @param $dom DOMDocument the document we're getting metadata from
- * @param $metadata stdClass class representing the metadata
- * @return bool true if successful, the exception object if it isn't.
- */
- public function onGetRemoteUrlMetadataFromDom($url, DOMDocument $dom, stdClass &$metadata)
- {
- try {
- common_log(LOG_INFO, 'Trying to discover an oEmbed endpoint using link headers.');
- $api = oEmbedHelper::oEmbedEndpointFromHTML($dom);
- common_log(LOG_INFO, 'Found oEmbed API endpoint ' . $api . ' for URL ' . $url);
- $params = array(
- 'maxwidth' => common_config('thumbnail', 'width'),
- 'maxheight' => common_config('thumbnail', 'height'),
- );
- $metadata = oEmbedHelper::getOembedFrom($api, $url, $params);
-
- // Facebook just gives us javascript in its oembed html,
- // so use the content of the title element instead
- if (strpos($url, 'https://www.facebook.com/') === 0) {
- $metadata->html = @$dom->getElementsByTagName('title')->item(0)->nodeValue;
- }
-
- // Wordpress sometimes also just gives us javascript, use og:description if it is available
- $xpath = new DomXpath($dom);
- $generatorNode = @$xpath->query('//meta[@name="generator"][1]')->item(0);
- if ($generatorNode instanceof DomElement) {
- // when wordpress only gives us javascript, the html stripped from tags
- // is the same as the title, so this helps us to identify this (common) case
- if (strpos($generatorNode->getAttribute('content'), 'WordPress') === 0
- && trim(strip_tags($metadata->html)) == trim($metadata->title)) {
- $propertyNode = @$xpath->query('//meta[@property="og:description"][1]')->item(0);
- if ($propertyNode instanceof DomElement) {
- $metadata->html = $propertyNode->getAttribute('content');
- }
- }
- }
- } catch (Exception $e) {
- // FIXME - make sure the error was because we couldn't get metadata, not something else! -mb
- common_log(LOG_INFO, 'Could not find an oEmbed endpoint using link headers, trying OpenGraph from HTML.');
- // Just ignore it!
- $metadata = OpenGraphHelper::ogFromHtml($dom);
- }
-
- if (isset($metadata->thumbnail_url)) {
- // sometimes sites serve the path, not the full URL, for images
- // let's "be liberal in what you accept from others"!
- // add protocol and host if the thumbnail_url starts with /
- if (substr($metadata->thumbnail_url, 0, 1) == '/') {
- $thumbnail_url_parsed = parse_url($metadata->url);
- $metadata->thumbnail_url = $thumbnail_url_parsed['scheme']."://".$thumbnail_url_parsed['host'].$metadata->thumbnail_url;
- }
-
- // some wordpress opengraph implementations sometimes return a white blank image
- // no need for us to save that!
- if ($metadata->thumbnail_url == 'https://s0.wp.com/i/blank.jpg') {
- unset($metadata->thumbnail_url);
- }
-
- // FIXME: this is also true of locally-installed wordpress so we should watch out for that.
- }
- return true;
- }
-
- public function onEndShowHeadElements(Action $action)
- {
- switch ($action->getActionName()) {
- case 'attachment':
- $action->element('link', array('rel'=>'alternate',
- 'type'=>'application/json+oembed',
- 'href'=>common_local_url(
- 'oembed',
- array(),
- array('format'=>'json', 'url'=>
- common_local_url(
- 'attachment',
- array('attachment' => $action->attachment->getID())
- ))
- ),
- 'title'=>'oEmbed'));
- $action->element('link', array('rel'=>'alternate',
- 'type'=>'text/xml+oembed',
- 'href'=>common_local_url(
- 'oembed',
- array(),
- array('format'=>'xml','url'=>
- common_local_url(
- 'attachment',
- array('attachment' => $action->attachment->getID())
- ))
- ),
- 'title'=>'oEmbed'));
- break;
- case 'shownotice':
- if (!$action->notice->isLocal()) {
- break;
- }
- try {
- $action->element('link', array('rel'=>'alternate',
- 'type'=>'application/json+oembed',
- 'href'=>common_local_url(
- 'oembed',
- array(),
- array('format'=>'json','url'=>$action->notice->getUrl())
- ),
- 'title'=>'oEmbed'));
- $action->element('link', array('rel'=>'alternate',
- 'type'=>'text/xml+oembed',
- 'href'=>common_local_url(
- 'oembed',
- array(),
- array('format'=>'xml','url'=>$action->notice->getUrl())
- ),
- 'title'=>'oEmbed'));
- } catch (InvalidUrlException $e) {
- // The notice is probably a share or similar, which don't
- // have a representational URL of their own.
- }
- break;
- }
-
- return true;
- }
-
- public function onEndShowStylesheets(Action $action)
- {
- $action->cssLink($this->path('css/oembed.css'));
- return true;
- }
-
- /**
- * Save embedding information for a File, if applicable.
- *
- * Normally this event is called through File::saveNew()
- *
- * @param File $file The newly inserted File object.
- *
- * @return boolean success
- */
- public function onEndFileSaveNew(File $file)
- {
- $fo = File_oembed::getKV('file_id', $file->getID());
- if ($fo instanceof File_oembed) {
- common_log(LOG_WARNING, "Strangely, a File_oembed object exists for new file {$file->getID()}", __FILE__);
- return true;
- }
-
- if (isset($file->mimetype)
- && (('text/html' === substr($file->mimetype, 0, 9)
- || 'application/xhtml+xml' === substr($file->mimetype, 0, 21)))) {
- try {
- $oembed_data = File_oembed::_getOembed($file->url);
- if ($oembed_data === false) {
- throw new Exception('Did not get oEmbed data from URL');
- }
- $file->setTitle($oembed_data->title);
- } catch (Exception $e) {
- common_log(LOG_WARNING, sprintf(__METHOD__.': %s thrown when getting oEmbed data: %s', get_class($e), _ve($e->getMessage())));
- return true;
- }
-
- File_oembed::saveNew($oembed_data, $file->getID());
- }
- return true;
- }
-
- public function onEndShowAttachmentLink(HTMLOutputter $out, File $file)
- {
- $oembed = File_oembed::getKV('file_id', $file->getID());
- if (empty($oembed->author_name) && empty($oembed->provider)) {
- return true;
- }
- $out->elementStart('div', array('id'=>'oembed_info', 'class'=>'e-content'));
- if (!empty($oembed->author_name)) {
- $out->elementStart('div', 'fn vcard author');
- if (empty($oembed->author_url)) {
- $out->text($oembed->author_name);
- } else {
- $out->element(
- 'a',
- array('href' => $oembed->author_url,
- 'class' => 'url'),
- $oembed->author_name
- );
- }
- }
- if (!empty($oembed->provider)) {
- $out->elementStart('div', 'fn vcard');
- if (empty($oembed->provider_url)) {
- $out->text($oembed->provider);
- } else {
- $out->element(
- 'a',
- array('href' => $oembed->provider_url,
- 'class' => 'url'),
- $oembed->provider
- );
- }
- }
- $out->elementEnd('div');
- }
-
- public function onFileEnclosureMetadata(File $file, &$enclosure)
- {
- // Never treat generic HTML links as an enclosure type!
- // But if we have oEmbed info, we'll consider it golden.
- $oembed = File_oembed::getKV('file_id', $file->getID());
- if (!$oembed instanceof File_oembed || !in_array($oembed->type, array('photo', 'video'))) {
- return true;
- }
-
- foreach (array('mimetype', 'url', 'title', 'modified', 'width', 'height') as $key) {
- if (isset($oembed->{$key}) && !empty($oembed->{$key})) {
- $enclosure->{$key} = $oembed->{$key};
- }
- }
- return true;
- }
-
- public function onStartShowAttachmentRepresentation(HTMLOutputter $out, File $file)
- {
- try {
- $oembed = File_oembed::getByFile($file);
- } catch (NoResultException $e) {
- return true;
- }
-
- // Show thumbnail as usual if it's a photo.
- if ($oembed->type === 'photo') {
- return true;
- }
-
- $out->elementStart('article', ['class'=>'h-entry oembed']);
- $out->elementStart('header');
- try {
- $thumb = $file->getThumbnail(128, 128);
- $out->element('img', $thumb->getHtmlAttrs(['class'=>'u-photo oembed']));
- unset($thumb);
- } catch (Exception $e) {
- $out->element('div', ['class'=>'error'], $e->getMessage());
- }
- $out->elementStart('h5', ['class'=>'p-name oembed']);
- $out->element('a', ['class'=>'u-url', 'href'=>$file->getUrl()], common_strip_html($oembed->title));
- $out->elementEnd('h5');
- $out->elementStart('div', ['class'=>'p-author oembed']);
- if (!empty($oembed->author_name)) {
- // TRANS: text before the author name of oEmbed attachment representation
- // FIXME: The whole "By x from y" should be i18n because of different language constructions.
- $out->text(_('By '));
- $attrs = ['class'=>'h-card p-author'];
- if (!empty($oembed->author_url)) {
- $attrs['href'] = $oembed->author_url;
- $tag = 'a';
- } else {
- $tag = 'span';
- }
- $out->element($tag, $attrs, $oembed->author_name);
- }
- if (!empty($oembed->provider)) {
- // TRANS: text between the oEmbed author name and provider url
- // FIXME: The whole "By x from y" should be i18n because of different language constructions.
- $out->text(_(' from '));
- $attrs = ['class'=>'h-card'];
- if (!empty($oembed->provider_url)) {
- $attrs['href'] = $oembed->provider_url;
- $tag = 'a';
- } else {
- $tag = 'span';
- }
- $out->element($tag, $attrs, $oembed->provider);
- }
- $out->elementEnd('div');
- $out->elementEnd('header');
- $out->elementStart('div', ['class'=>'p-summary oembed']);
- $out->raw(common_purify($oembed->html));
- $out->elementEnd('div');
- $out->elementStart('footer');
- $out->elementEnd('footer');
- $out->elementEnd('article');
-
- return false;
- }
-
- public function onShowUnsupportedAttachmentRepresentation(HTMLOutputter $out, File $file)
- {
- try {
- $oembed = File_oembed::getByFile($file);
- } catch (NoResultException $e) {
- return true;
- }
-
- // the 'photo' type is shown through ordinary means, using StartShowAttachmentRepresentation!
- switch ($oembed->type) {
- case 'video':
- case 'link':
- if (!empty($oembed->html)
- && (GNUsocial::isAjax() || common_config('attachments', 'show_html'))) {
- $purifier = new \HTMLPurifier();
- // FIXME: do we allow <object> and <embed> here? we did that when we used htmLawed, but I'm not sure anymore...
- $out->raw($purifier->purify($oembed->html));
- }
- return false;
- }
-
- return true;
- }
-
- /**
- * This event executes when GNU social is creating a file thumbnail entry in
- * the database. We glom onto this to create proper information for oEmbed
- * object thumbnails.
- *
- * @param $file File the file of the created thumbnail
- * @param &$imgPath string = the path to the created thumbnail
- * @return bool true if it succeeds (including non-action
- * states where it isn't oEmbed data, so it doesn't mess up the event handle
- * for other things hooked into it), or the exception if it fails.
- */
- public function onCreateFileImageThumbnailSource(File $file, &$imgPath, $media)
- {
- // If we are on a private node, we won't do any remote calls (just as a precaution until
- // we can configure this from config.php for the private nodes)
- if (common_config('site', 'private')) {
- return true;
- }
-
- // All our remote Oembed images lack a local filename property in the File object
- if (!is_null($file->filename)) {
- common_debug(sprintf('Filename of file id==%d is not null (%s), so nothing oEmbed '.
- 'should handle.', $file->getID(), _ve($file->filename)));
- return true;
- }
-
- try {
- // If we have proper oEmbed data, there should be an entry in the File_oembed
- // and File_thumbnail tables respectively. If not, we're not going to do anything.
- $thumbnail = File_thumbnail::byFile($file);
- } catch (NoResultException $e) {
- // Not Oembed data, or at least nothing we either can or want to use.
- common_debug('No oEmbed data found for file id=='.$file->getID());
- return true;
- }
-
- try {
- $this->storeRemoteFileThumbnail($thumbnail);
- } catch (AlreadyFulfilledException $e) {
- // aw yiss!
- } catch (Exception $e) {
- common_debug(sprintf('oEmbed encountered an exception (%s) for file id==%d: %s',
- get_class($e), $file->getID(), _ve($e->getMessage())));
- throw $e;
- }
-
- // Out
- $imgPath = $thumbnail->getPath();
-
- return false;
- }
-
- /**
- * @return bool false on no check made, provider name on success
- * @throws ServerException if check is made but fails
- */
- protected function checkWhitelist($url)
- {
- if (!$this->check_whitelist) {
- return false; // indicates "no check made"
- }
-
- $host = parse_url($url, PHP_URL_HOST);
- foreach ($this->domain_whitelist as $regex => $provider) {
- if (preg_match("/$regex/", $host)) {
- return $provider; // we trust this source, return provider name
- }
- }
-
- throw new ServerException(sprintf(_('Domain not in remote thumbnail source whitelist: %s'), $host));
- }
-
- /**
- * Check the file size of a remote file using a HEAD request and checking
- * the content-length variable returned. This isn't 100% foolproof but is
- * reliable enough for our purposes.
- *
- * @return string|bool the file size if it succeeds, false otherwise.
- */
- private function getRemoteFileSize($url)
- {
- try {
- if (empty($url)) {
- return false;
- }
- stream_context_set_default(array('http' => array('method' => 'HEAD')));
- $head = @get_headers($url, 1);
- if (gettype($head)=="array") {
- $head = array_change_key_case($head);
- $size = isset($head['content-length']) ? $head['content-length'] : 0;
-
- if (!$size) {
- return false;
- }
- } else {
- return false;
- }
- return $size; // return formatted size
- } catch (Exception $err) {
- common_log(LOG_ERR, __CLASS__.': getRemoteFileSize on URL : '._ve($url).' threw exception: '.$err->getMessage());
- return false;
- }
- }
-
- /**
- * A private helper function that uses a CURL lookup to check the mime type
- * of a remote URL to see it it's an image.
- *
- * @return bool true if the remote URL is an image, or false otherwise.
- */
- private function isRemoteImage($url)
- {
- if (!filter_var($url, FILTER_VALIDATE_URL)) {
- common_log(LOG_ERR, "Invalid URL in OEmbed::isRemoteImage()");
- return false;
- }
- if ($url==null) {
- common_log(LOG_ERR, "URL not specified in OEmbed::isRemoteImage()");
- return false;
- }
- try {
- $curl = curl_init($url);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl, CURLOPT_HEADER, true);
- curl_setopt($curl, CURLOPT_NOBODY, true);
- curl_exec($curl);
- $type = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
- if (strpos($type, 'image') !== false) {
- return true;
- } else {
- return false;
- }
- } finally {
- return false;
- }
- }
-
- /**
- * Function to create and store a thumbnail representation of a remote image
- *
- * @param $thumbnail File_thumbnail object containing the file thumbnail
- * @return bool true if it succeeded, the exception if it fails, or false if it
- * is limited by system limits (ie the file is too large.)
- */
- protected function storeRemoteFileThumbnail(File_thumbnail $thumbnail)
- {
- if (!empty($thumbnail->filename) && file_exists($thumbnail->getPath())) {
- throw new AlreadyFulfilledException(
- sprintf('A thumbnail seems to already exist for remote file with id==%u', $thumbnail->file_id));
- }
-
- $url = $thumbnail->getUrl();
- $this->checkWhitelist($url);
-
- try {
- $isImage = $this->isRemoteImage($url);
- if ($isImage==true) {
- $max_size = common_get_preferred_php_upload_limit();
- $file_size = $this->getRemoteFileSize($url);
- if (($file_size!=false) && ($file_size > $max_size)) {
- common_debug("Went to store remote thumbnail of size " . $file_size .
- " but the upload limit is " . $max_size . " so we aborted.");
- return false;
- }
- }
- } catch (Exception $err) {
- common_debug("Could not determine size of remote image, aborted local storage.");
- return $err;
- }
-
- // First we download the file to memory and test whether it's actually an image file
- // FIXME: To support remote video/whatever files, this needs reworking.
- common_debug(sprintf('Downloading remote thumbnail for file id==%u with thumbnail URL: %s',
- $thumbnail->file_id, $url));
- $imgData = HTTPClient::quickGet($url);
- $info = @getimagesizefromstring($imgData);
- if ($info === false) {
- throw new UnsupportedMediaException(_('Remote file format was not identified as an image.'), $url);
- } elseif (!$info[0] || !$info[1]) {
- throw new UnsupportedMediaException(_('Image file had impossible geometry (0 width or height)'));
- }
-
- $ext = File::guessMimeExtension($info['mime']);
-
- try {
- // We'll trust sha256 (File::FILEHASH_ALG) not to have collision issues any time soon :)
- $original_filename = bin2hex('oembed.' . $ext);
- $filehash = hash(File::FILEHASH_ALG, $imgData);
- $filename = "{$original_filename}-{$filehash}";
- $fullpath = File_thumbnail::path($filename);
- // Write the file to disk. Throw Exception on failure
- if (!file_exists($fullpath) && file_put_contents($fullpath, $imgData) === false) {
- throw new ServerException(_('Could not write downloaded file to disk.'));
- }
- } catch (Exception $err) {
- common_log(LOG_ERROR, "Went to write a thumbnail to disk in OembedPlugin::storeRemoteThumbnail " .
- "but encountered error: {$err}");
- return $err;
- } finally {
- unset($imgData);
- }
-
- try {
- // Updated our database for the file record
- $orig = clone($thumbnail);
- $thumbnail->filename = $filename;
- $thumbnail->width = $info[0]; // array indexes documented on php.net:
- $thumbnail->height = $info[1]; // https://php.net/manual/en/function.getimagesize.php
- // Throws exception on failure.
- $thumbnail->updateWithKeys($orig);
- } catch (exception $err) {
- common_log(LOG_ERROR, "Went to write a thumbnail entry to the database in " .
- "OembedPlugin::storeRemoteThumbnail but encountered error: ".$err);
- return $err;
- }
- return true;
- }
-
- /**
- * Event raised when GNU social polls the plugin for information about it.
- * Adds this plugin's version information to $versions array
- *
- * @param &$versions array inherited from parent
- * @return bool true hook value
- */
- public function onPluginVersion(array &$versions)
- {
- $versions[] = array('name' => 'Oembed',
- 'version' => self::PLUGIN_VERSION,
- 'author' => 'Mikael Nordfeldth',
- 'homepage' => 'http://gnu.io/social/',
- 'description' =>
- // TRANS: Plugin description.
- _m('Plugin for using and representing Oembed data.'));
- return true;
- }
-}
+++ /dev/null
-The Oembed plugin for using and representing oEmbed data.
-
-See: http://www.oembed.com/
-
-Installation
-============
-This plugin is enabled by default
-
-Settings
-========
-width: Maximum width of the thumbnail in pixels.
-height: Maximum height of the thumbnail in pixels.
-show_html: Whether to show HTML oEmbed data.
-domain_whitelist: Array of regular expressions. Always escape your dots and end your strings.
-check_whitelist: Whether to check the domain_whitelist.
-
-Example
-=======
-$config['thumbnail']['width'] = 42;
-$config['thumbnail']['height'] = 42;
-$config['attachments']['show_html'] = true;
-addPlugin('Oembed', array(
- 'domain_whitelist' => array(
- '^i\d*\.ytimg\.com$' => 'YouTube',
- '^i\d*\.vimeocdn\.com$' => 'Vimeo'
- ),
- 'check_whitelist' => true
-));
-
+++ /dev/null
-<?php
-// This file is part of GNU social - https://www.gnu.org/software/social
-//
-// GNU social is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// GNU social is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * OembedPlugin implementation for GNU social
- *
- * @package GNUsocial
- * @author Craig Andrews <candrews@integralblue.com>
- * @author Mikael Nordfeldth <mmn@hethane.se>
- * @author hannes
- * @author Diogo Cordeiro <diogo@fc.up.pt>
- * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
- * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
- */
-
-defined('GNUSOCIAL') || die();
-
-/**
- * Oembed provider implementation
- *
- * This class handles all /main/oembed(.xml|.json)/ requests.
- *
- * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
- * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
- */
-class OembedAction extends Action
-{
- protected function handle()
- {
- parent::handle();
-
- $url = $this->trimmed('url');
- $tls = parse_url($url, PHP_URL_SCHEME) == 'https';
- $root_url = common_root_url($tls);
-
- if (substr(strtolower($url), 0, mb_strlen($root_url)) !== strtolower($root_url)) {
- // TRANS: Error message displaying attachments. %s is the site's base URL.
- throw new ClientException(sprintf(_('oEmbed data will only be provided for %s URLs.'), $root_url));
- }
-
- $path = substr($url, strlen($root_url));
-
- $r = Router::get();
-
- // $r->map will throw ClientException 404 if it fails to find a mapping
- $proxy_args = $r->map($path);
-
- $oembed=array();
- $oembed['version']='1.0';
- $oembed['provider_name']=common_config('site', 'name');
- $oembed['provider_url']=common_root_url();
-
- switch ($proxy_args['action']) {
- case 'shownotice':
- $oembed['type']='link';
- try {
- $notice = Notice::getByID($proxy_args['notice']);
- } catch (NoResultException $e) {
- throw new ClientException($e->getMessage(), 404);
- }
- $profile = $notice->getProfile();
- $authorname = $profile->getFancyName();
- // TRANS: oEmbed title. %1$s is the author name, %2$s is the creation date.
- $oembed['title'] = sprintf(
- _('%1$s\'s status on %2$s'),
- $authorname,
- common_exact_date($notice->created)
- );
- $oembed['author_name']=$authorname;
- $oembed['author_url']=$profile->profileurl;
- $oembed['url']=$notice->getUrl();
- $oembed['html']=$notice->getRendered();
-
- // maybe add thumbnail
- foreach ($notice->attachments() as $attachment) {
- if (!$attachment instanceof File) {
- common_debug('ATTACHMENTS array entry from notice id=='._ve($notice->getID()).' is something else than a File dataobject: '._ve($attachment));
- continue;
- }
- try {
- $thumb = $attachment->getThumbnail();
- $thumb_url = File_thumbnail::url($thumb->filename);
- $oembed['thumbnail_url'] = $thumb_url;
- break; // only first one
- } catch (UseFileAsThumbnailException $e) {
- $oembed['thumbnail_url'] = $attachment->getUrl();
- break; // we're happy with that
- } catch (ServerException $e) {
- //
- } catch (ClientException $e) {
- //
- }
- }
- break;
-
- case 'attachment':
- $id = $proxy_args['attachment'];
- $attachment = File::getKV($id);
- if (empty($attachment)) {
- // TRANS: Client error displayed in oEmbed action when attachment not found.
- // TRANS: %d is an attachment ID.
- $this->clientError(sprintf(_('Attachment %s not found.'), $id), 404);
- }
- if (empty($attachment->filename) && $file_oembed = File_oembed::getKV('file_id', $attachment->id)) {
- // Proxy the existing oembed information
- $oembed['type']=$file_oembed->type;
- $oembed['provider']=$file_oembed->provider;
- $oembed['provider_url']=$file_oembed->provider_url;
- $oembed['width']=$file_oembed->width;
- $oembed['height']=$file_oembed->height;
- $oembed['html']=$file_oembed->html;
- $oembed['title']=$file_oembed->title;
- $oembed['author_name']=$file_oembed->author_name;
- $oembed['author_url']=$file_oembed->author_url;
- $oembed['url']=$file_oembed->getUrl();
- } elseif (substr($attachment->mimetype, 0, strlen('image/'))==='image/') {
- $oembed['type']='photo';
- if ($attachment->filename) {
- $filepath = File::path($attachment->filename);
- $gis = @getimagesize($filepath);
- if ($gis) {
- $oembed['width'] = $gis[0];
- $oembed['height'] = $gis[1];
- } else {
- // TODO Either throw an error or find a fallback?
- }
- }
- $oembed['url']=$attachment->getUrl();
- try {
- $thumb = $attachment->getThumbnail();
- $oembed['thumbnail_url'] = $thumb->getUrl();
- $oembed['thumbnail_width'] = $thumb->width;
- $oembed['thumbnail_height'] = $thumb->height;
- unset($thumb);
- } catch (UnsupportedMediaException $e) {
- // No thumbnail data available
- }
- } else {
- $oembed['type']='link';
- $oembed['url']=common_local_url(
- 'attachment',
- array('attachment' => $attachment->id)
- );
- }
- if ($attachment->title) {
- $oembed['title']=$attachment->title;
- }
- break;
- default:
- // TRANS: Server error displayed in oEmbed request when a path is not supported.
- // TRANS: %s is a path.
- $this->serverError(sprintf(_('"%s" not supported for oembed requests.'), $path), 501);
- }
-
- switch ($this->trimmed('format')) {
- case 'xml':
- $this->init_document('xml');
- $this->elementStart('oembed');
- foreach (array(
- 'version', 'type', 'provider_name',
- 'provider_url', 'title', 'author_name',
- 'author_url', 'url', 'html', 'width',
- 'height', 'cache_age', 'thumbnail_url',
- 'thumbnail_width', 'thumbnail_height',
- ) as $key) {
- if (isset($oembed[$key]) && $oembed[$key]!='') {
- $this->element($key, null, $oembed[$key]);
- }
- }
- $this->elementEnd('oembed');
- $this->end_document('xml');
- break;
-
- case 'json':
- case null:
- $this->init_document('json');
- $this->raw(json_encode($oembed));
- $this->end_document('json');
- break;
- default:
- // TRANS: Error message displaying attachments. %s is a raw MIME type (eg 'image/png')
- $this->serverError(sprintf(_('Content type %s not supported.'), $apidata['content-type']), 501);
- }
- }
-
- public function init_document($type)
- {
- switch ($type) {
- case 'xml':
- header('Content-Type: application/xml; charset=utf-8');
- $this->startXML();
- break;
- case 'json':
- header('Content-Type: application/json; charset=utf-8');
-
- // Check for JSONP callback
- $callback = $this->arg('callback');
- if ($callback) {
- print $callback . '(';
- }
- break;
- default:
- // TRANS: Server error displayed in oEmbed action when request specifies an unsupported data format.
- $this->serverError(_('Not a supported data format.'), 501);
- break;
- }
- }
-
- public function end_document($type)
- {
- switch ($type) {
- case 'xml':
- $this->endXML();
- break;
- case 'json':
- // Check for JSONP callback
- $callback = $this->arg('callback');
- if ($callback) {
- print ')';
- }
- break;
- default:
- // TRANS: Server error displayed in oEmbed action when request specifies an unsupported data format.
- $this->serverError(_('Not a supported data format.'), 501);
- break;
- }
- return;
- }
-
- /**
- * Is this action read-only?
- *
- * @param array $args other arguments
- *
- * @return boolean is read only action?
- */
- public function isReadOnly($args)
- {
- return true;
- }
-}
+++ /dev/null
-<?php
-// This file is part of GNU social - https://www.gnu.org/software/social
-//
-// GNU social is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// GNU social is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * OembedPlugin implementation for GNU social
- *
- * @package GNUsocial
- * @author Stephen Paul Weber
- * @author Mikael Nordfeldth
- * @author Diogo Cordeiro <diogo@fc.up.pt>
- * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
- * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
- */
-
-defined('GNUSOCIAL') || die();
-
-/**
- * Table Definition for file_oembed
- *
- * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
- * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
- */
-class File_oembed extends Managed_DataObject
-{
- public $__table = 'file_oembed'; // table name
- public $file_id; // int(4) primary_key not_null
- public $version; // varchar(20)
- public $type; // varchar(20)
- public $mimetype; // varchar(50)
- public $provider; // varchar(50)
- public $provider_url; // varchar(191) not 255 because utf8mb4 takes more space
- public $width; // int(4)
- public $height; // int(4)
- public $html; // text()
- public $title; // varchar(191) not 255 because utf8mb4 takes more space
- public $author_name; // varchar(50)
- public $author_url; // varchar(191) not 255 because utf8mb4 takes more space
- public $url; // varchar(191) not 255 because utf8mb4 takes more space
- public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
-
- public static function schemaDef()
- {
- return array(
- 'fields' => array(
- 'file_id' => array('type' => 'int', 'not null' => true, 'description' => 'oEmbed for that URL/file'),
- 'version' => array('type' => 'varchar', 'length' => 20, 'description' => 'oEmbed spec. version'),
- 'type' => array('type' => 'varchar', 'length' => 20, 'description' => 'oEmbed type: photo, video, link, rich'),
- 'mimetype' => array('type' => 'varchar', 'length' => 50, 'description' => 'mime type of resource'),
- 'provider' => array('type' => 'text', 'description' => 'name of this oEmbed provider'),
- 'provider_url' => array('type' => 'text', 'description' => 'URL of this oEmbed provider'),
- 'width' => array('type' => 'int', 'description' => 'width of oEmbed resource when available'),
- 'height' => array('type' => 'int', 'description' => 'height of oEmbed resource when available'),
- 'html' => array('type' => 'text', 'description' => 'html representation of this oEmbed resource when applicable'),
- 'title' => array('type' => 'text', 'description' => 'title of oEmbed resource when available'),
- 'author_name' => array('type' => 'text', 'description' => 'author name for this oEmbed resource'),
- 'author_url' => array('type' => 'text', 'description' => 'author URL for this oEmbed resource'),
- 'url' => array('type' => 'text', 'description' => 'URL for this oEmbed resource when applicable (photo, link)'),
- 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
- ),
- 'primary key' => array('file_id'),
- 'foreign keys' => array(
- 'file_oembed_file_id_fkey' => array('file', array('file_id' => 'id')),
- ),
- );
- }
-
- public static function _getOembed($url)
- {
- try {
- return oEmbedHelper::getObject($url);
- } catch (Exception $e) {
- common_log(LOG_INFO, "Error during oembed lookup for $url - " . $e->getMessage());
- return false;
- }
- }
-
- /**
- * Fetch an entry by using a File's id
- */
- public static function getByFile(File $file)
- {
- $fo = new File_oembed();
- $fo->file_id = $file->id;
- if (!$fo->find(true)) {
- throw new NoResultException($fo);
- }
- return $fo;
- }
-
- public function getUrl()
- {
- return $this->url;
- }
-
- /**
- * Save embedding info for a new file.
- *
- * @param object $data Services_oEmbed_Object_*
- * @param int $file_id
- */
- public static function saveNew($data, $file_id)
- {
- $file_oembed = new File_oembed;
- $file_oembed->file_id = $file_id;
- if (!isset($data->version)) {
- common_debug('DEBUGGING oEmbed: data->version undefined in variable $data: '.var_export($data, true));
- }
- $file_oembed->version = $data->version;
- $file_oembed->type = $data->type;
- if (!empty($data->provider_name)) {
- $file_oembed->provider = $data->provider_name;
- }
- if (!empty($data->provider)) {
- $file_oembed->provider = $data->provider;
- }
- if (!empty($data->provider_url)) {
- $file_oembed->provider_url = $data->provider_url;
- }
- if (!empty($data->width)) {
- $file_oembed->width = intval($data->width);
- }
- if (!empty($data->height)) {
- $file_oembed->height = intval($data->height);
- }
- if (!empty($data->html)) {
- $file_oembed->html = $data->html;
- }
- if (!empty($data->title)) {
- $file_oembed->title = $data->title;
- }
- if (!empty($data->author_name)) {
- $file_oembed->author_name = $data->author_name;
- }
- if (!empty($data->author_url)) {
- $file_oembed->author_url = $data->author_url;
- }
- if (!empty($data->url)) {
- $file_oembed->url = $data->url;
- $given_url = File_redirection::_canonUrl($file_oembed->url);
- if (! empty($given_url)) {
- try {
- $file = File::getByUrl($given_url);
- $file_oembed->mimetype = $file->mimetype;
- } catch (NoResultException $e) {
- // File_redirection::where argument 'discover' is false to avoid loops
- $redir = File_redirection::where($given_url, false);
- if (!empty($redir->file_id)) {
- $file_id = $redir->file_id;
- }
- }
- }
- }
- $result = $file_oembed->insert();
- if ($result === false) {
- throw new ServerException('Failed to insert File_oembed data into database!');
- }
- if (!empty($data->thumbnail_url) || ($data->type == 'photo')) {
- $ft = File_thumbnail::getKV('file_id', $file_id);
- if ($ft instanceof File_thumbnail) {
- common_log(
- LOG_WARNING,
- "Strangely, a File_thumbnail object exists for new file $file_id",
- __FILE__
- );
- } else {
- File_thumbnail::saveNew($data, $file_id);
- }
- }
- }
-}
+++ /dev/null
-<?php
-// This file is part of GNU social - https://www.gnu.org/software/social
-//
-// GNU social is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// GNU social is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * OembedPlugin implementation for GNU social
- *
- * @package GNUsocial
- * @author Mikael Nordfeldth
- * @author hannes
- * @author Diogo Cordeiro <diogo@fc.up.pt>
- * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
- * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
- */
-
-defined('GNUSOCIAL') || die();
-
-/**
- * Utility class to wrap basic oEmbed lookups.
- *
- * Blacklisted hosts will use an alternate lookup method:
- * - Twitpic
- *
- * Whitelisted hosts will use known oEmbed API endpoints:
- * - Flickr, YFrog
- *
- * Sites that provide discovery links will use them directly; a bug
- * in use of discovery links with query strings is worked around.
- *
- * Others will fall back to oohembed (unless disabled).
- * The API endpoint can be configured or disabled through config
- * as 'oohembed'/'endpoint'.
- *
- * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
- * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
- */
-class oEmbedHelper
-{
- protected static $apiMap = array(
- 'flickr.com' => 'https://www.flickr.com/services/oembed/',
- 'youtube.com' => 'https://www.youtube.com/oembed',
- 'viddler.com' => 'http://lab.viddler.com/services/oembed/',
- 'revision3.com' => 'https://revision3.com/api/oembed/',
- 'vimeo.com' => 'https://vimeo.com/api/oembed.json',
- );
-
- /**
- * Perform or fake an oEmbed lookup for the given resource.
- *
- * Some known hosts are whitelisted with API endpoints where we
- * know they exist but autodiscovery data isn't available.
- * If autodiscovery links are missing and we don't recognize the
- * host, we'll pass it to noembed.com's public service which
- * will either proxy or fake info on a lot of sites.
- *
- * A few hosts are blacklisted due to known problems with oohembed,
- * in which case we'll look up the info another way and return
- * equivalent data.
- *
- * Throws exceptions on failure.
- *
- * @param string $url
- * @param array $params
- * @return object
- */
- public static function getObject($url, $params=array())
- {
- common_log(LOG_INFO, 'Checking for remote URL metadata for ' . $url);
-
- // TODO: Make this class something like UrlMetadata, or use a dataobject?
- $metadata = new stdClass();
-
- if (Event::handle('GetRemoteUrlMetadata', array($url, &$metadata))) {
- // If that event didn't return anything, try downloading the body and parse it
-
- // don't use quickGet since we want to check Content-Type header for utf-8
- $client = new HTTPClient();
- $response = $client->get($url);
- if (!$response->isOk()) {
- // TRANS: Exception. %s is the URL we tried to GET.
- throw new Exception(sprintf(_m('Could not GET URL %s.'), $url), $response->getStatus());
- }
- $body = $response->getBody();
-
- // DOMDocument::loadHTML may throw warnings on unrecognized elements,
- // and notices on unrecognized namespaces.
- $old = error_reporting(error_reporting() & ~(E_WARNING | E_NOTICE));
-
- // DOMDocument assumes ISO-8859-1 per HTML spec
- // use UTF-8 if we find any evidence of that encoding
- $utf8_evidence = false;
- $unicode_check_dom = new DOMDocument();
- $ok = $unicode_check_dom->loadHTML($body);
- if (!$ok) {
- throw new oEmbedHelper_BadHtmlException();
- }
- $metaNodes = $unicode_check_dom->getElementsByTagName('meta');
- foreach ($metaNodes as $metaNode) {
- // case in-sensitive since Content-type and utf-8 can be written in many ways
- if (stristr($metaNode->getAttribute('http-equiv'), 'content-type')
- && stristr($metaNode->getAttribute('content'), 'utf-8')) {
- $utf8_evidence = true;
- break;
- } elseif (stristr($metaNode->getAttribute('charset'), 'utf-8')) {
- $utf8_evidence = true;
- break;
- }
- }
- unset($unicode_check_dom);
-
- // The Content-Type HTTP response header overrides encoding metatags in DOM
- if (stristr($response->getHeader('Content-Type'), 'utf-8')) {
- $utf8_evidence = true;
- }
-
- // add utf-8 encoding prolog if we have reason to believe this is utf-8 content
- // DOMDocument('1.0', 'UTF-8') does not work!
- $utf8_tag = $utf8_evidence ? '<?xml encoding="utf-8" ?>' : '';
-
- $dom = new DOMDocument();
- $ok = $dom->loadHTML($utf8_tag.$body);
- unset($body); // storing the DOM in memory is enough...
- error_reporting($old);
-
- if (!$ok) {
- throw new oEmbedHelper_BadHtmlException();
- }
-
- Event::handle('GetRemoteUrlMetadataFromDom', array($url, $dom, &$metadata));
- }
-
- return self::normalize($metadata);
- }
-
- /**
- * Partially ripped from OStatus' FeedDiscovery class.
- *
- * @param string $url source URL, used to resolve relative links
- * @param string $body HTML body text
- * @return mixed string with URL or false if no target found
- */
- public static function oEmbedEndpointFromHTML(DOMDocument $dom)
- {
- // Ok... now on to the links!
- $feeds = array(
- 'application/json+oembed' => false,
- );
-
- $nodes = $dom->getElementsByTagName('link');
- for ($i = 0; $i < $nodes->length; $i++) {
- $node = $nodes->item($i);
- if ($node->hasAttributes()) {
- $rel = $node->attributes->getNamedItem('rel');
- $type = $node->attributes->getNamedItem('type');
- $href = $node->attributes->getNamedItem('href');
- if ($rel && $type && $href) {
- $rel = array_filter(explode(" ", $rel->value));
- $type = trim($type->value);
- $href = trim($href->value);
-
- if (in_array('alternate', $rel) && array_key_exists($type, $feeds) && empty($feeds[$type])) {
- // Save the first feed found of each type...
- $feeds[$type] = $href;
- }
- }
- }
- }
-
- // Return the highest-priority feed found
- foreach ($feeds as $type => $url) {
- if ($url) {
- return $url;
- }
- }
-
- throw new oEmbedHelper_DiscoveryException();
- }
-
- /**
- * Actually do an oEmbed lookup to a particular API endpoint.
- *
- * @param string $api oEmbed API endpoint URL
- * @param string $url target URL to look up info about
- * @param array $params
- * @return object
- */
- public static function getOembedFrom($api, $url, $params=array())
- {
- if (empty($api)) {
- // TRANS: Server exception thrown in oEmbed action if no API endpoint is available.
- throw new ServerException(_('No oEmbed API endpoint available.'));
- }
- $params['url'] = $url;
- $params['format'] = 'json';
- $key=common_config('oembed', 'apikey');
- if (isset($key)) {
- $params['key'] = common_config('oembed', 'apikey');
- }
-
- $oembed_data = HTTPClient::quickGetJson($api, $params);
- if (isset($oembed_data->html)) {
- $oembed_data->html = common_purify($oembed_data->html);
- }
-
- return $oembed_data;
- }
-
- /**
- * Normalize oEmbed format.
- *
- * @param object $orig
- * @return object
- */
- public static function normalize(stdClass $data)
- {
- if (empty($data->type)) {
- throw new Exception('Invalid oEmbed data: no type field.');
- }
- if ($data->type == 'image') {
- // YFrog does this.
- $data->type = 'photo';
- }
-
- if (isset($data->thumbnail_url)) {
- if (!isset($data->thumbnail_width)) {
- // !?!?!
- $data->thumbnail_width = common_config('thumbnail', 'width');
- $data->thumbnail_height = common_config('thumbnail', 'height');
- }
- }
-
- return $data;
- }
-}
-
-class oEmbedHelper_Exception extends Exception
-{
- public function __construct($message = "", $code = 0, $previous = null)
- {
- parent::__construct($message, $code);
- }
-}
-
-class oEmbedHelper_BadHtmlException extends oEmbedHelper_Exception
-{
- public function __construct($previous=null)
- {
- return parent::__construct('Bad HTML in discovery data.', 0, $previous);
- }
-}
-
-class oEmbedHelper_DiscoveryException extends oEmbedHelper_Exception
-{
- public function __construct($previous=null)
- {
- return parent::__construct('No oEmbed discovery data.', 0, $previous);
- }
-}
+++ /dev/null
-<?php
-// This file is part of GNU social - https://www.gnu.org/software/social
-//
-// GNU social is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// GNU social is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * OembedPlugin implementation for GNU social
- *
- * @package GNUsocial
- * @author Mikael Nordfeldth
- * @author Diogo Cordeiro <diogo@fc.up.pt>
- * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
- * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
- */
-
-defined('GNUSOCIAL') || die();
-
-/**
- * Utility class to get OpenGraph data from HTML DOMs etc.
- *
- * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
- * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
- */
-class OpenGraphHelper
-{
- const KEY_REGEX = '/^og\:(\w+(?:\:\w+)?)/';
- protected static $property_map = [
- 'site_name' => 'provider_name',
- 'title' => 'title',
- 'description' => 'html',
- 'type' => 'type',
- 'url' => 'url',
- 'image' => 'thumbnail_url',
- 'image:height' => 'thumbnail_height',
- 'image:width' => 'thumbnail_width',
- ];
-
- // This regex map has: /pattern(match)/ => matchindex | string
- protected static $type_regex_map = [
- '/^(video)/' => 1,
- '/^image/' => 'photo',
- ];
-
- public static function ogFromHtml(DOMDocument $dom)
- {
- $obj = new stdClass();
- $obj->version = '1.0'; // fake it til u make it
-
- $nodes = $dom->getElementsByTagName('meta');
- for ($i = 0; $i < $nodes->length; $i++) {
- $node = $nodes->item($i);
- if (!$node->hasAttributes()) {
- continue;
- }
- $property = $node->attributes->getNamedItem('property');
- $matches = array();
- if ($property === null || !preg_match(self::KEY_REGEX, $property->value, $matches)) {
- // not property="og:something"
- continue;
- }
- if (!isset(self::$property_map[$matches[1]])) {
- // unknown metadata property, nothing we would care about anyway
- continue;
- }
-
- $prop = self::$property_map[$matches[1]];
- $obj->{$prop} = $node->attributes->getNamedItem('content')->value;
- // I don't care right now if they're empty
- }
- if (isset($obj->type)) {
- // Loop through each known OpenGraph type where we have a match in oEmbed
- foreach (self::$type_regex_map as $pattern=>$replacement) {
- $matches = array();
- if (preg_match($pattern, $obj->type, $matches)) {
- $obj->type = is_int($replacement)
- ? $matches[$replacement]
- : $replacement;
- break;
- }
- }
- // If it's not known to our type map, we just pass it through in hopes of it getting handled anyway
- } elseif (isset($obj->url)) {
- // If no type is set but we have a URL, let's set type=link
- $obj->type = 'link';
- }
- return $obj;
- }
-}
+++ /dev/null
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-06-10 00:39+0100\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"
-"Language: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:721
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
-
-#. TRANS: Exception. %s is the URL we tried to GET.
-#: lib/oembedhelper.php:93
-#, php-format
-msgid "Could not GET URL %s."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Afrikaans (http://www.transifex.com/gnu-social/gnu-social/language/af/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: af\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Arabic (http://www.transifex.com/gnu-social/gnu-social/language/ar/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ar\n"
-"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Arabic (Egypt) (http://www.transifex.com/gnu-social/gnu-social/language/ar_EG/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ar_EG\n"
-"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Asturian (http://www.transifex.com/gnu-social/gnu-social/language/ast/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ast\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Belarusian (Tarask) (http://www.transifex.com/gnu-social/gnu-social/language/be@tarask/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: be@tarask\n"
-"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Bulgarian (http://www.transifex.com/gnu-social/gnu-social/language/bg/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: bg\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Bengali (India) (http://www.transifex.com/gnu-social/gnu-social/language/bn_IN/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: bn_IN\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Breton (http://www.transifex.com/gnu-social/gnu-social/language/br/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: br\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Catalan (http://www.transifex.com/gnu-social/gnu-social/language/ca/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ca\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Czech (http://www.transifex.com/gnu-social/gnu-social/language/cs/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: cs\n"
-"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Danish (http://www.transifex.com/gnu-social/gnu-social/language/da/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: da\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: German (http://www.transifex.com/gnu-social/gnu-social/language/de/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: de\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Greek (http://www.transifex.com/gnu-social/gnu-social/language/el/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: el\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-# Luke Hollins <luke@farcry.ca>, 2015
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-03-07 17:25+0000\n"
-"Last-Translator: Luke Hollins <luke@farcry.ca>\n"
-"Language-Team: English (United Kingdom) (http://www.transifex.com/gnu-social/gnu-social/language/en_GB/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: en_GB\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr "Plugin for using and representing Oembed data."
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Esperanto (http://www.transifex.com/gnu-social/gnu-social/language/eo/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: eo\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-# Juan Riquelme González <soulchainer@gmail.com>, 2015
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-11 23:30+0000\n"
-"Last-Translator: Juan Riquelme González <soulchainer@gmail.com>\n"
-"Language-Team: Spanish (http://www.transifex.com/gnu-social/gnu-social/language/es/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: es\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr "Complemento para el uso y representación de datos en formato Oembed."
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Basque (http://www.transifex.com/gnu-social/gnu-social/language/eu/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: eu\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Persian (http://www.transifex.com/gnu-social/gnu-social/language/fa/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: fa\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Finnish (http://www.transifex.com/gnu-social/gnu-social/language/fi/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: fi\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-# iGor milhit <igormilhit@mailoo.org>, 2015
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-05-06 06:02+0000\n"
-"Last-Translator: iGor milhit <igormilhit@mailoo.org>\n"
-"Language-Team: French (http://www.transifex.com/gnu-social/gnu-social/language/fr/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: fr\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr "Extension pour l'utilisation et la représentation des données Oembed"
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Friulian (http://www.transifex.com/gnu-social/gnu-social/language/fur/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: fur\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Galician (http://www.transifex.com/gnu-social/gnu-social/language/gl/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: gl\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Hebrew (http://www.transifex.com/gnu-social/gnu-social/language/he/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: he\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Upper Sorbian (http://www.transifex.com/gnu-social/gnu-social/language/hsb/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: hsb\n"
-"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Hungarian (http://www.transifex.com/gnu-social/gnu-social/language/hu/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: hu\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Armenian (Armenia) (http://www.transifex.com/gnu-social/gnu-social/language/hy_AM/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: hy_AM\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Interlingua (http://www.transifex.com/gnu-social/gnu-social/language/ia/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ia\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Indonesian (http://www.transifex.com/gnu-social/gnu-social/language/id/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: id\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-# Ciencisto Dementa <maliktunga@users.noreply.github.com>, 2015
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-06-17 02:25+0000\n"
-"Last-Translator: Ciencisto Dementa <maliktunga@users.noreply.github.com>\n"
-"Language-Team: Ido (http://www.transifex.com/gnu-social/gnu-social/language/io/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: io\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr "Extensilo por uzar e reprezentar Oembed-datumi."
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Icelandic (http://www.transifex.com/gnu-social/gnu-social/language/is/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: is\n"
-"Plural-Forms: nplurals=2; plural=(n % 10 != 1 || n % 100 == 11);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Italian (http://www.transifex.com/gnu-social/gnu-social/language/it/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: it\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Japanese (http://www.transifex.com/gnu-social/gnu-social/language/ja/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ja\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Georgian (http://www.transifex.com/gnu-social/gnu-social/language/ka/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ka\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Korean (http://www.transifex.com/gnu-social/gnu-social/language/ko/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ko\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Colognian (http://www.transifex.com/gnu-social/gnu-social/language/ksh/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ksh\n"
-"Plural-Forms: nplurals=3; plural=(n==0) ? 0 : (n==1) ? 1 : 2;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Luxembourgish (http://www.transifex.com/gnu-social/gnu-social/language/lb/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: lb\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Lithuanian (http://www.transifex.com/gnu-social/gnu-social/language/lt/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: lt\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:39+0000\n"
-"Last-Translator: digitaldreamer <digitaldreamer@email.cz>\n"
-"Language-Team: Latvian (http://www.transifex.com/gnu-social/gnu-social/language/lv/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: lv\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Malagasy (http://www.transifex.com/gnu-social/gnu-social/language/mg/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: mg\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Macedonian (http://www.transifex.com/gnu-social/gnu-social/language/mk/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: mk\n"
-"Plural-Forms: nplurals=2; plural=(n % 10 == 1 && n % 100 != 11) ? 0 : 1;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Malayalam (http://www.transifex.com/gnu-social/gnu-social/language/ml/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ml\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Malay (http://www.transifex.com/gnu-social/gnu-social/language/ms/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ms\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Burmese (http://www.transifex.com/gnu-social/gnu-social/language/my/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: my\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Norwegian Bokmål (http://www.transifex.com/gnu-social/gnu-social/language/nb/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: nb\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:30+0000\n"
-"Last-Translator: digitaldreamer <digitaldreamer@email.cz>\n"
-"Language-Team: Nepali (http://www.transifex.com/gnu-social/gnu-social/language/ne/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ne\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Dutch (http://www.transifex.com/gnu-social/gnu-social/language/nl/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: nl\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Norwegian Nynorsk (http://www.transifex.com/gnu-social/gnu-social/language/nn/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: nn\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Polish (http://www.transifex.com/gnu-social/gnu-social/language/pl/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: pl\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Portuguese (http://www.transifex.com/gnu-social/gnu-social/language/pt/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: pt\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-# no and no <nicolasmaia@tutanota.com>, 2015
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-04-15 14:52+0000\n"
-"Last-Translator: no and no <nicolasmaia@tutanota.com>\n"
-"Language-Team: Portuguese (Brazil) (http://www.transifex.com/gnu-social/gnu-social/language/pt_BR/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: pt_BR\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr "Plugin para usar e representar dados do Oembed."
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Romanian (Romania) (http://www.transifex.com/gnu-social/gnu-social/language/ro_RO/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ro_RO\n"
-"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Russian (http://www.transifex.com/gnu-social/gnu-social/language/ru/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ru\n"
-"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Slovenian (http://www.transifex.com/gnu-social/gnu-social/language/sl/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: sl\n"
-"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Serbian (http://www.transifex.com/gnu-social/gnu-social/language/sr/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: sr\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-# Kristoffer Grundström <kristoffer.grundstrom1983@gmail.com>, 2015
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-09-17 17:24+0000\n"
-"Last-Translator: Kristoffer Grundström <kristoffer.grundstrom1983@gmail.com>\n"
-"Language-Team: Swedish (http://www.transifex.com/gnu-social/gnu-social/language/sv/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: sv\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr "Insticksprogram för användning och representering av Oembed-data."
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Tamil (http://www.transifex.com/gnu-social/gnu-social/language/ta/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ta\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Telugu (http://www.transifex.com/gnu-social/gnu-social/language/te/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: te\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Tagalog (http://www.transifex.com/gnu-social/gnu-social/language/tl/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: tl\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Turkish (http://www.transifex.com/gnu-social/gnu-social/language/tr/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: tr\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-# Петро Романчук <ixer@ixer.org.ua>, 2015
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-03-31 10:04+0000\n"
-"Last-Translator: Петро Романчук <ixer@ixer.org.ua>\n"
-"Language-Team: Ukrainian (http://www.transifex.com/gnu-social/gnu-social/language/uk/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: uk\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr "Плагін для використання та представлення вбудованих (Oembed) даних."
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Urdu (Pakistan) (http://www.transifex.com/gnu-social/gnu-social/language/ur_PK/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ur_PK\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Vietnamese (http://www.transifex.com/gnu-social/gnu-social/language/vi/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: vi\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Chinese (http://www.transifex.com/gnu-social/gnu-social/language/zh/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: zh\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Chinese (China) (http://www.transifex.com/gnu-social/gnu-social/language/zh_CN/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: zh_CN\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-# Translation file for GNU social - the free software social networking platform
-# Copyright (C) 2015 - 2019 Free Software Foundation, Inc http://www.fsf.org
-# This file is under https://www.gnu.org/licenses/agpl v3 or later
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: GNU social\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-02-02 17:47+0100\n"
-"PO-Revision-Date: 2015-02-07 09:29+0000\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: Chinese (Taiwan) (http://www.transifex.com/gnu-social/gnu-social/language/zh_TW/)\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: zh_TW\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#. TRANS: Plugin description.
-#: OembedPlugin.php:190
-msgid "Plugin for using and representing Oembed data."
-msgstr ""
+++ /dev/null
-#!/usr/bin/env php
-<?php
-// This file is part of GNU social - https://www.gnu.org/software/social
-//
-// GNU social is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// GNU social is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * OembedPlugin implementation for GNU social
- *
- * @package GNUsocial
- * @author Mikael Nordfeldth
- * @author Diogo Cordeiro <diogo@fc.up.pt>
- * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
- * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
- */
-
-defined('GNUSOCIAL') || die();
-
-define('INSTALLDIR', realpath(__DIR__ . '/../../..'));
-
-$longoptions = array('dry-run');
-
-$helptext = <<<END_OF_USERROLE_HELP
-fixup_files.php [options]
-Patches up file entries with corrupted types and titles (the "h bug").
-
- --dry-run look but don't touch
-
-END_OF_USERROLE_HELP;
-
-require_once INSTALLDIR.'/scripts/commandline.inc';
-
-$dry = have_option('dry-run');
-
-$f = new File();
-$f->title = 'h';
-$f->mimetype = 'h';
-$f->size = 0;
-$f->protected = 0;
-$f->find();
-echo "Found $f->N bad items:\n";
-
-while ($f->fetch()) {
- echo "$f->id $f->url";
-
- $data = File_redirection::lookupWhere($f->url);
- if ($dry) {
- if (is_array($data)) {
- echo " (unchanged)\n";
- } else {
- echo " (unchanged, but embedding lookup failed)\n";
- }
- } else {
- // NULL out the mime/title/size/protected fields
- $sql = sprintf(
- "UPDATE file " .
- "SET mimetype=null,title=null,size=null,protected=null " .
- "WHERE id=%d",
- $f->id
- );
- $f->query($sql);
- $f->decache();
-
- if (is_array($data)) {
- Event::handle('EndFileSaveNew', array($f, $data, $f->url));
- echo " (ok)\n";
- } else {
- echo " (ok, but embedding lookup failed)\n";
- }
- }
-}
-
-echo "done.\n";
+++ /dev/null
-#!/usr/bin/env php
-<?php
-// This file is part of GNU social - https://www.gnu.org/software/social
-//
-// GNU social is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// GNU social is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * OembedPlugin implementation for GNU social
- *
- * @package GNUsocial
- * @author Mikael Nordfeldth
- * @author Diogo Cordeiro <diogo@fc.up.pt>
- * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
- * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
- */
-
-defined('GNUSOCIAL') || die();
-
-define('INSTALLDIR', realpath(__DIR__ . '/../../..'));
-
-$shortoptions = 'u:';
-$longoptions = array('url=');
-
-$helptext = <<<END_OF_HELP
-poll_oembed.php --url URL
-Test oEmbed API on a URL.
-
- -u --url URL to try oEmbed against
-
-END_OF_HELP;
-
-require_once INSTALLDIR.'/scripts/commandline.inc';
-
-if (!have_option('u', 'url')) {
- echo 'No URL given.';
- exit(1);
-}
-
-$url = get_option_value('u', 'url');
-
-print "Contacting URL\n";
-
-$oEmbed = oEmbedHelper::getObject($url);
-var_dump($oEmbed);
-
-print "\nDONE.\n";
+++ /dev/null
-<?php
-// This file is part of GNU social - https://www.gnu.org/software/social
-//
-// GNU social is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Affero General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// GNU social is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU Affero General Public License for more details.
-//
-// You should have received a copy of the GNU Affero General Public License
-// along with GNU social. If not, see <http://www.gnu.org/licenses/>.
-
-/**
- * OembedPlugin implementation for GNU social
- *
- * @package GNUsocial
- * @author Mikael Nordfeldth
- * @author Diogo Cordeiro <diogo@fc.up.pt>
- * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org
- * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later
- */
-
-if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
- print "This script must be run from the command line\n";
- exit();
-}
-
-define('INSTALLDIR', realpath(__DIR__ . '/../../..'));
-define('GNUSOCIAL', true);
-define('STATUSNET', true); // compatibility
-
-require_once INSTALLDIR . '/lib/common.php';
-
-class oEmbedTest extends PHPUnit_Framework_TestCase
-{
- public function setup()
- {
- $this->old_ohembed = common_config('ohembed', 'endpoint');
- }
-
- public function tearDown()
- {
- $GLOBALS['config']['oembed']['endpoint'] = $this->old_ohembed;
- }
-
- /**
- * Test with ohembed DISABLED.
- *
- * @dataProvider discoverableSources
- */
- public function testoEmbed($url, $expectedType)
- {
- $GLOBALS['config']['oembed']['endpoint'] = false;
- $this->_doTest($url, $expectedType);
- }
-
- /**
- * Test with oohembed ENABLED.
- *
- * @dataProvider fallbackSources
- */
- public function testnoEmbed($url, $expectedType)
- {
- $GLOBALS['config']['oembed']['endpoint'] = $this->_endpoint();
- $this->_doTest($url, $expectedType);
- }
-
- /**
- * Get default oembed endpoint.
- *
- * @return string
- */
- public function _endpoint()
- {
- $default = array();
- $_server = 'localhost';
- $_path = '';
- require INSTALLDIR . '/lib/default.php';
- return $default['oembed']['endpoint'];
- }
-
- /**
- * Actually run an individual test.
- *
- * @param string $url
- * @param string $expectedType
- */
- public function _doTest($url, $expectedType)
- {
- try {
- $data = oEmbedHelper::getObject($url);
- $this->assertEquals($expectedType, $data->type);
- if ($data->type == 'photo') {
- $this->assertTrue(!empty($data->url), 'Photo must have a URL.');
- $this->assertTrue(!empty($data->width), 'Photo must have a width.');
- $this->assertTrue(!empty($data->height), 'Photo must have a height.');
- } elseif ($data->type == 'video') {
- $this->assertTrue(!empty($data->html), 'Video must have embedding HTML.');
- $this->assertTrue(!empty($data->thumbnail_url), 'Video should have a thumbnail.');
- }
- if (!empty($data->thumbnail_url)) {
- $this->assertTrue(!empty($data->thumbnail_width), 'Thumbnail must list a width.');
- $this->assertTrue(!empty($data->thumbnail_height), 'Thumbnail must list a height.');
- }
- } catch (Exception $e) {
- if ($expectedType == 'none') {
- $this->assertEquals($expectedType, 'none', 'Should not have data for this URL.');
- } else {
- throw $e;
- }
- }
- }
-
- /**
- * Sample oEmbed targets for sites we know ourselves...
- * @return array
- */
- public static function knownSources()
- {
- $sources = array(
- array('https://www.flickr.com/photos/brionv/5172500179/', 'photo'),
- );
- return $sources;
- }
-
- /**
- * Sample oEmbed targets that can be found via discovery.
- * Includes also knownSources() output.
- *
- * @return array
- */
- public static function discoverableSources()
- {
- $sources = array(
-
- array('http://www.youtube.com/watch?v=eUgLR232Cnw', 'video'),
- array('http://vimeo.com/9283184', 'video'),
-
- // Will fail discovery:
- array('http://leuksman.com/log/2010/10/29/statusnet-0-9-6-release/', 'none'),
- );
- return array_merge(self::knownSources(), $sources);
- }
-
- /**
- * Sample oEmbed targets that can be found via noembed.com.
- * Includes also discoverableSources() output.
- *
- * @return array
- */
- public static function fallbackSources()
- {
- $sources = array(
- array('https://github.com/git/git/commit/85e9c7e1d42849c5c3084a9da748608468310c0e', 'Github Commit'), // @fixme in future there may be a native provider -- will change to 'photo'
- );
-
- $sources = array();
-
- return array_merge(self::discoverableSources(), $sources);
- }
-}
--- /dev/null
+.u-photo.oembed {
+ float: left;
+ margin-bottom: 1ex;
+ margin-right: 1em;
+}
+
+.p-author.oembed {
+ font-style: italic;
+}
+
+.p-summary.oembed {
+ line-height: 1.25em;
+ max-height: 5em;
+ overflow: auto;
+}
+++ /dev/null
-.u-photo.oembed {
- float: left;
- margin-bottom: 1ex;
- margin-right: 1em;
-}
-
-.p-author.oembed {
- font-style: italic;
-}
-
-.p-summary.oembed {
- line-height: 1.25em;
- max-height: 5em;
- overflow: auto;
-}