-HTML;
-
- return;
+ $data = [
+ 'addon' => 'advancedcontentfilter',
+ 'title' => DI::l10n()->t('Advanced Content Filter'),
+ 'href' => 'advancedcontentfilter',
+ ];
}
/*
* Module
*/
+/**
+ * This is a statement rather than an actual function definition. The simple
+ * existence of this method is checked to figure out if the addon offers a
+ * module.
+ */
function advancedcontentfilter_module() {}
-function advancedcontentfilter_init(App $a)
+function advancedcontentfilter_init()
{
- if ($a->argc > 1 && $a->argv[1] == 'api') {
+ if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'api') {
$slim = new \Slim\App();
require __DIR__ . '/src/middlewares.php';
@@ -180,14 +201,16 @@ function advancedcontentfilter_init(App $a)
}
}
-function advancedcontentfilter_content(App $a)
+function advancedcontentfilter_content()
{
- if (!local_user()) {
- return Login::form('/' . implode('/', $a->argv));
+ if (!DI::userSession()->getLocalUserId()) {
+ return Login::form('/' . implode('/', DI::args()->getArgv()));
}
- if ($a->argc > 1 && $a->argv[1] == 'help') {
- $lang = $a->user['language'];
+ if (DI::args()->getArgc() > 1 && DI::args()->getArgv()[1] == 'help') {
+ $user = User::getById(DI::userSession()->getLocalUserId());
+
+ $lang = $user['language'];
$default_dir = 'addon/advancedcontentfilter/doc/';
$help_file = 'advancedcontentfilter.md';
@@ -207,29 +230,29 @@ function advancedcontentfilter_content(App $a)
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/advancedcontentfilter/');
return Renderer::replaceMacros($t, [
'$messages' => [
- 'backtosettings' => L10n::t('Back to Addon Settings'),
- 'title' => L10n::t('Advanced Content Filter'),
- 'add_a_rule' => L10n::t('Add a Rule'),
- 'help' => L10n::t('Help'),
- 'intro' => L10n::t('Add and manage your personal content filter rules in this screen. Rules have a name and an arbitrary expression that will be matched against post data. For a complete reference of the available operations and variables, check the help page.'),
- 'your_rules' => L10n::t('Your rules'),
- 'no_rules' => L10n::t('You have no rules yet! Start adding one by clicking on the button above next to the title.'),
- 'disabled' => L10n::t('Disabled'),
- 'enabled' => L10n::t('Enabled'),
- 'disable_this_rule' => L10n::t('Disable this rule'),
- 'enable_this_rule' => L10n::t('Enable this rule'),
- 'edit_this_rule' => L10n::t('Edit this rule'),
- 'edit_the_rule' => L10n::t('Edit the rule'),
- 'save_this_rule' => L10n::t('Save this rule'),
- 'delete_this_rule' => L10n::t('Delete this rule'),
- 'rule' => L10n::t('Rule'),
- 'close' => L10n::t('Close'),
- 'addtitle' => L10n::t('Add new rule'),
- 'rule_name' => L10n::t('Rule Name'),
- 'rule_expression' => L10n::t('Rule Expression'),
- 'cancel' => L10n::t('Cancel'),
+ 'backtosettings' => DI::l10n()->t('Back to Addon Settings'),
+ 'title' => DI::l10n()->t('Advanced Content Filter'),
+ 'add_a_rule' => DI::l10n()->t('Add a Rule'),
+ 'help' => DI::l10n()->t('Help'),
+ 'intro' => DI::l10n()->t('Add and manage your personal content filter rules in this screen. Rules have a name and an arbitrary expression that will be matched against post data. For a complete reference of the available operations and variables, check the help page.'),
+ 'your_rules' => DI::l10n()->t('Your rules'),
+ 'no_rules' => DI::l10n()->t('You have no rules yet! Start adding one by clicking on the button above next to the title.'),
+ 'disabled' => DI::l10n()->t('Disabled'),
+ 'enabled' => DI::l10n()->t('Enabled'),
+ 'disable_this_rule' => DI::l10n()->t('Disable this rule'),
+ 'enable_this_rule' => DI::l10n()->t('Enable this rule'),
+ 'edit_this_rule' => DI::l10n()->t('Edit this rule'),
+ 'edit_the_rule' => DI::l10n()->t('Edit the rule'),
+ 'save_this_rule' => DI::l10n()->t('Save this rule'),
+ 'delete_this_rule' => DI::l10n()->t('Delete this rule'),
+ 'rule' => DI::l10n()->t('Rule'),
+ 'close' => DI::l10n()->t('Close'),
+ 'addtitle' => DI::l10n()->t('Add new rule'),
+ 'rule_name' => DI::l10n()->t('Rule Name'),
+ 'rule_expression' => DI::l10n()->t('Rule Expression'),
+ 'cancel' => DI::l10n()->t('Cancel'),
],
- '$current_theme' => $a->getCurrentTheme(),
+ '$current_theme' => DI::app()->getCurrentTheme(),
'$rules' => advancedcontentfilter_get_rules(),
'$form_security_token' => BaseModule::getFormSecurityToken()
]);
@@ -248,29 +271,20 @@ function advancedcontentfilter_build_fields($data)
}
if (!empty($data['expression'])) {
- $allowed_keys = [
- 'author_id', 'author_link', 'author_name', 'author_avatar',
- 'owner_id', 'owner_link', 'owner_name', 'owner_avatar',
- 'contact_id', 'uid', 'id', 'parent', 'uri',
- 'thr_parent', 'parent_uri',
- 'content_warning',
- 'commented', 'created', 'edited', 'received',
- 'verb', 'object_type', 'postopts', 'plink', 'guid', 'wall', 'private', 'starred',
- 'title', 'body',
- 'file', 'event_id', 'location', 'coord', 'app', 'attach',
- 'rendered_hash', 'rendered_html', 'object',
- 'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid',
- 'item_id', 'item_network', 'author_thumb', 'owner_thumb',
- 'network', 'url', 'name', 'writable', 'self',
- 'cid', 'alias',
- 'event_created', 'event_edited', 'event_start', 'event_finish', 'event_summary',
- 'event_desc', 'event_location', 'event_type', 'event_nofinish', 'event_adjust', 'event_ignore',
- 'children', 'pagedrop', 'tags', 'hashtags', 'mentions',
- ];
+ // Using a dummy item to validate the field existence
+ $condition = ["(`uid` = ? OR `uid` = 0)", DI::userSession()->getLocalUserId()];
+ $params = ['order' => ['uid' => true]];
+ $item_row = Post::selectFirstForUser(DI::userSession()->getLocalUserId(), [], $condition, $params);
+
+ if (!DBA::isResult($item_row)) {
+ throw new HTTPException\NotFoundException(DI::l10n()->t('This addon requires this node having at least one post'));
+ }
$expressionLanguage = new ExpressionLanguage\ExpressionLanguage();
-
- $parsedExpression = $expressionLanguage->parse($data['expression'], $allowed_keys);
+ $parsedExpression = $expressionLanguage->parse(
+ $data['expression'],
+ array_keys(advancedcontentfilter_get_filter_fields(advancedcontentfilter_prepare_item_row($item_row)))
+ );
$serialized = serialize($parsedExpression->getNodes());
@@ -293,34 +307,34 @@ function advancedcontentfilter_build_fields($data)
function advancedcontentfilter_get_rules()
{
- if (!local_user()) {
- throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
+ if (!DI::userSession()->getLocalUserId()) {
+ throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
}
- $rules = DBA::toArray(DBA::select('advancedcontentfilter_rules', [], ['uid' => local_user()]));
+ $rules = DBA::toArray(DBA::select('advancedcontentfilter_rules', [], ['uid' => DI::userSession()->getLocalUserId()]));
return json_encode($rules);
}
function advancedcontentfilter_get_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args)
{
- if (!local_user()) {
- throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
+ if (!DI::userSession()->getLocalUserId()) {
+ throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
}
- $rule = DBA::selectFirst('advancedcontentfilter_rules', [], ['id' => $args['id'], 'uid' => local_user()]);
+ $rule = DBA::selectFirst('advancedcontentfilter_rules', [], ['id' => $args['id'], 'uid' => DI::userSession()->getLocalUserId()]);
return json_encode($rule);
}
function advancedcontentfilter_post_rules(ServerRequestInterface $request)
{
- if (!local_user()) {
- throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
+ if (!DI::userSession()->getLocalUserId()) {
+ throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
}
if (!BaseModule::checkFormSecurityToken()) {
- throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
+ throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid form security token, please refresh the page.'));
}
$data = json_decode($request->getBody(), true);
@@ -328,37 +342,39 @@ function advancedcontentfilter_post_rules(ServerRequestInterface $request)
try {
$fields = advancedcontentfilter_build_fields($data);
} catch (Exception $e) {
- throw new HTTPException\BadRequestException($e->getMessage(), 0, $e);
+ throw new HTTPException\BadRequestException($e->getMessage(), $e);
}
if (empty($fields['name']) || empty($fields['expression'])) {
- throw new HTTPException\BadRequestException(L10n::t('The rule name and expression are required.'));
+ throw new HTTPException\BadRequestException(DI::l10n()->t('The rule name and expression are required.'));
}
- $fields['uid'] = local_user();
+ $fields['uid'] = DI::userSession()->getLocalUserId();
$fields['created'] = DateTimeFormat::utcNow();
if (!DBA::insert('advancedcontentfilter_rules', $fields)) {
- throw new HTTPException\ServiceUnavaiableException(DBA::errorMessage());
+ throw new HTTPException\ServiceUnavailableException(DBA::errorMessage());
}
$rule = DBA::selectFirst('advancedcontentfilter_rules', [], ['id' => DBA::lastInsertId()]);
- return json_encode(['message' => L10n::t('Rule successfully added'), 'rule' => $rule]);
+ DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId());
+
+ return json_encode(['message' => DI::l10n()->t('Rule successfully added'), 'rule' => $rule]);
}
function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args)
{
- if (!local_user()) {
- throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
+ if (!DI::userSession()->getLocalUserId()) {
+ throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
}
if (!BaseModule::checkFormSecurityToken()) {
- throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
+ throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid form security token, please refresh the page.'));
}
- if (!DBA::exists('advancedcontentfilter_rules', ['id' => $args['id'], 'uid' => local_user()])) {
- throw new HTTPException\NotFoundException(L10n::t('Rule doesn\'t exist or doesn\'t belong to you.'));
+ if (!DBA::exists('advancedcontentfilter_rules', ['id' => $args['id'], 'uid' => DI::userSession()->getLocalUserId()])) {
+ throw new HTTPException\NotFoundException(DI::l10n()->t('Rule doesn\'t exist or doesn\'t belong to you.'));
}
$data = json_decode($request->getBody(), true);
@@ -366,65 +382,80 @@ function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, Res
try {
$fields = advancedcontentfilter_build_fields($data);
} catch (Exception $e) {
- throw new HTTPException\BadRequestException($e->getMessage(), 0, $e);
+ throw new HTTPException\BadRequestException($e->getMessage(), $e);
}
if (!DBA::update('advancedcontentfilter_rules', $fields, ['id' => $args['id']])) {
- throw new HTTPException\ServiceUnavaiableException(DBA::errorMessage());
+ throw new HTTPException\ServiceUnavailableException(DBA::errorMessage());
}
- return json_encode(['message' => L10n::t('Rule successfully updated')]);
+ DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId());
+
+ return json_encode(['message' => DI::l10n()->t('Rule successfully updated')]);
}
function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request, ResponseInterface $response, $args)
{
- if (!local_user()) {
- throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
+ if (!DI::userSession()->getLocalUserId()) {
+ throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
}
if (!BaseModule::checkFormSecurityToken()) {
- throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
+ throw new HTTPException\BadRequestException(DI::l10n()->t('Invalid form security token, please refresh the page.'));
}
- if (!DBA::exists('advancedcontentfilter_rules', ['id' => $args['id'], 'uid' => local_user()])) {
- throw new HTTPException\NotFoundException(L10n::t('Rule doesn\'t exist or doesn\'t belong to you.'));
+ if (!DBA::exists('advancedcontentfilter_rules', ['id' => $args['id'], 'uid' => DI::userSession()->getLocalUserId()])) {
+ throw new HTTPException\NotFoundException(DI::l10n()->t('Rule doesn\'t exist or doesn\'t belong to you.'));
}
if (!DBA::delete('advancedcontentfilter_rules', ['id' => $args['id']])) {
- throw new HTTPException\ServiceUnavaiableException(DBA::errorMessage());
+ throw new HTTPException\ServiceUnavailableException(DBA::errorMessage());
}
- return json_encode(['message' => L10n::t('Rule successfully deleted')]);
+ DI::cache()->delete('rules_' . DI::userSession()->getLocalUserId());
+
+ return json_encode(['message' => DI::l10n()->t('Rule successfully deleted')]);
}
function advancedcontentfilter_get_variables_guid(ServerRequestInterface $request, ResponseInterface $response, $args)
{
- if (!local_user()) {
- throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
+ if (!DI::userSession()->getLocalUserId()) {
+ throw new HTTPException\UnauthorizedException(DI::l10n()->t('You must be logged in to use this method'));
}
if (!isset($args['guid'])) {
- throw new HTTPException\BadRequestException(L10n::t('Missing argument: guid.'));
+ throw new HTTPException\BadRequestException(DI::l10n()->t('Missing argument: guid.'));
}
- $condition = ["`guid` = ? AND (`uid` = ? OR `uid` = 0)", $args['guid'], local_user()];
+ $condition = ["`guid` = ? AND (`uid` = ? OR `uid` = 0)", $args['guid'], DI::userSession()->getLocalUserId()];
$params = ['order' => ['uid' => true]];
- $item = Item::selectFirstForUser(local_user(), [], $condition, $params);
+ $item_row = Post::selectFirstForUser(DI::userSession()->getLocalUserId(), [], $condition, $params);
- if (!DBA::isResult($item)) {
- throw new HTTPException\NotFoundException(L10n::t('Unknown post with guid: %s', $args['guid']));
+ if (!DBA::isResult($item_row)) {
+ throw new HTTPException\NotFoundException(DI::l10n()->t('Unknown post with guid: %s', $args['guid']));
}
- $tags = Term::populateTagsFromItem($item);
-
- $item['tags'] = $tags['tags'];
- $item['hashtags'] = $tags['hashtags'];
- $item['mentions'] = $tags['mentions'];
-
- $return = [];
- foreach ($item as $key => $value) {
- $return[str_replace('-', '_', $key)] = $value;
- }
+ $return = advancedcontentfilter_get_filter_fields(advancedcontentfilter_prepare_item_row($item_row));
return json_encode(['variables' => str_replace('\\\'', '\'', var_export($return, true))]);
}
+
+/**
+ * This mimimcs the processing performed in Model\Item::prepareBody
+ *
+ * @param array $item_row
+ * @return array
+ * @throws HTTPException\InternalServerErrorException
+ * @throws ImagickException
+ */
+function advancedcontentfilter_prepare_item_row(array $item_row): array
+{
+ $tags = Tag::populateFromItem($item_row);
+
+ $item_row['tags'] = $tags['tags'];
+ $item_row['hashtags'] = $tags['hashtags'];
+ $item_row['mentions'] = $tags['mentions'];
+ $item_row['attachments'] = Post\Media::splitAttachments($item_row['uri-id']);
+
+ return $item_row;
+}
diff --git a/advancedcontentfilter/asset/vue/dist/vue.js b/advancedcontentfilter/asset/vue/dist/vue.js
new file mode 100644
index 00000000..04bcb375
--- /dev/null
+++ b/advancedcontentfilter/asset/vue/dist/vue.js
@@ -0,0 +1,11894 @@
+/*!
+ * Vue.js v2.7.13
+ * (c) 2014-2022 Evan You
+ * Released under the MIT License.
+ */
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+ typeof define === 'function' && define.amd ? define(factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Vue = factory());
+})(this, (function () { 'use strict';
+
+ var emptyObject = Object.freeze({});
+ var isArray = Array.isArray;
+ // These helpers produce better VM code in JS engines due to their
+ // explicitness and function inlining.
+ function isUndef(v) {
+ return v === undefined || v === null;
+ }
+ function isDef(v) {
+ return v !== undefined && v !== null;
+ }
+ function isTrue(v) {
+ return v === true;
+ }
+ function isFalse(v) {
+ return v === false;
+ }
+ /**
+ * Check if value is primitive.
+ */
+ function isPrimitive(value) {
+ return (typeof value === 'string' ||
+ typeof value === 'number' ||
+ // $flow-disable-line
+ typeof value === 'symbol' ||
+ typeof value === 'boolean');
+ }
+ function isFunction(value) {
+ return typeof value === 'function';
+ }
+ /**
+ * Quick object check - this is primarily used to tell
+ * objects from primitive values when we know the value
+ * is a JSON-compliant type.
+ */
+ function isObject(obj) {
+ return obj !== null && typeof obj === 'object';
+ }
+ /**
+ * Get the raw type string of a value, e.g., [object Object].
+ */
+ var _toString = Object.prototype.toString;
+ function toRawType(value) {
+ return _toString.call(value).slice(8, -1);
+ }
+ /**
+ * Strict object type check. Only returns true
+ * for plain JavaScript objects.
+ */
+ function isPlainObject(obj) {
+ return _toString.call(obj) === '[object Object]';
+ }
+ function isRegExp(v) {
+ return _toString.call(v) === '[object RegExp]';
+ }
+ /**
+ * Check if val is a valid array index.
+ */
+ function isValidArrayIndex(val) {
+ var n = parseFloat(String(val));
+ return n >= 0 && Math.floor(n) === n && isFinite(val);
+ }
+ function isPromise(val) {
+ return (isDef(val) &&
+ typeof val.then === 'function' &&
+ typeof val.catch === 'function');
+ }
+ /**
+ * Convert a value to a string that is actually rendered.
+ */
+ function toString(val) {
+ return val == null
+ ? ''
+ : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
+ ? JSON.stringify(val, null, 2)
+ : String(val);
+ }
+ /**
+ * Convert an input value to a number for persistence.
+ * If the conversion fails, return original string.
+ */
+ function toNumber(val) {
+ var n = parseFloat(val);
+ return isNaN(n) ? val : n;
+ }
+ /**
+ * Make a map and return a function for checking if a key
+ * is in that map.
+ */
+ function makeMap(str, expectsLowerCase) {
+ var map = Object.create(null);
+ var list = str.split(',');
+ for (var i = 0; i < list.length; i++) {
+ map[list[i]] = true;
+ }
+ return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; };
+ }
+ /**
+ * Check if a tag is a built-in tag.
+ */
+ var isBuiltInTag = makeMap('slot,component', true);
+ /**
+ * Check if an attribute is a reserved attribute.
+ */
+ var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
+ /**
+ * Remove an item from an array.
+ */
+ function remove$2(arr, item) {
+ var len = arr.length;
+ if (len) {
+ // fast path for the only / last item
+ if (item === arr[len - 1]) {
+ arr.length = len - 1;
+ return;
+ }
+ var index = arr.indexOf(item);
+ if (index > -1) {
+ return arr.splice(index, 1);
+ }
+ }
+ }
+ /**
+ * Check whether an object has the property.
+ */
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+ function hasOwn(obj, key) {
+ return hasOwnProperty.call(obj, key);
+ }
+ /**
+ * Create a cached version of a pure function.
+ */
+ function cached(fn) {
+ var cache = Object.create(null);
+ return function cachedFn(str) {
+ var hit = cache[str];
+ return hit || (cache[str] = fn(str));
+ };
+ }
+ /**
+ * Camelize a hyphen-delimited string.
+ */
+ var camelizeRE = /-(\w)/g;
+ var camelize = cached(function (str) {
+ return str.replace(camelizeRE, function (_, c) { return (c ? c.toUpperCase() : ''); });
+ });
+ /**
+ * Capitalize a string.
+ */
+ var capitalize = cached(function (str) {
+ return str.charAt(0).toUpperCase() + str.slice(1);
+ });
+ /**
+ * Hyphenate a camelCase string.
+ */
+ var hyphenateRE = /\B([A-Z])/g;
+ var hyphenate = cached(function (str) {
+ return str.replace(hyphenateRE, '-$1').toLowerCase();
+ });
+ /**
+ * Simple bind polyfill for environments that do not support it,
+ * e.g., PhantomJS 1.x. Technically, we don't need this anymore
+ * since native bind is now performant enough in most browsers.
+ * But removing it would mean breaking code that was able to run in
+ * PhantomJS 1.x, so this must be kept for backward compatibility.
+ */
+ /* istanbul ignore next */
+ function polyfillBind(fn, ctx) {
+ function boundFn(a) {
+ var l = arguments.length;
+ return l
+ ? l > 1
+ ? fn.apply(ctx, arguments)
+ : fn.call(ctx, a)
+ : fn.call(ctx);
+ }
+ boundFn._length = fn.length;
+ return boundFn;
+ }
+ function nativeBind(fn, ctx) {
+ return fn.bind(ctx);
+ }
+ // @ts-expect-error bind cannot be `undefined`
+ var bind$1 = Function.prototype.bind ? nativeBind : polyfillBind;
+ /**
+ * Convert an Array-like object to a real Array.
+ */
+ function toArray(list, start) {
+ start = start || 0;
+ var i = list.length - start;
+ var ret = new Array(i);
+ while (i--) {
+ ret[i] = list[i + start];
+ }
+ return ret;
+ }
+ /**
+ * Mix properties into target object.
+ */
+ function extend(to, _from) {
+ for (var key in _from) {
+ to[key] = _from[key];
+ }
+ return to;
+ }
+ /**
+ * Merge an Array of Objects into a single Object.
+ */
+ function toObject(arr) {
+ var res = {};
+ for (var i = 0; i < arr.length; i++) {
+ if (arr[i]) {
+ extend(res, arr[i]);
+ }
+ }
+ return res;
+ }
+ /* eslint-disable no-unused-vars */
+ /**
+ * Perform no operation.
+ * Stubbing args to make Flow happy without leaving useless transpiled code
+ * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
+ */
+ function noop(a, b, c) { }
+ /**
+ * Always return false.
+ */
+ var no = function (a, b, c) { return false; };
+ /* eslint-enable no-unused-vars */
+ /**
+ * Return the same value.
+ */
+ var identity = function (_) { return _; };
+ /**
+ * Generate a string containing static keys from compiler modules.
+ */
+ function genStaticKeys$1(modules) {
+ return modules
+ .reduce(function (keys, m) {
+ return keys.concat(m.staticKeys || []);
+ }, [])
+ .join(',');
+ }
+ /**
+ * Check if two values are loosely equal - that is,
+ * if they are plain objects, do they have the same shape?
+ */
+ function looseEqual(a, b) {
+ if (a === b)
+ return true;
+ var isObjectA = isObject(a);
+ var isObjectB = isObject(b);
+ if (isObjectA && isObjectB) {
+ try {
+ var isArrayA = Array.isArray(a);
+ var isArrayB = Array.isArray(b);
+ if (isArrayA && isArrayB) {
+ return (a.length === b.length &&
+ a.every(function (e, i) {
+ return looseEqual(e, b[i]);
+ }));
+ }
+ else if (a instanceof Date && b instanceof Date) {
+ return a.getTime() === b.getTime();
+ }
+ else if (!isArrayA && !isArrayB) {
+ var keysA = Object.keys(a);
+ var keysB = Object.keys(b);
+ return (keysA.length === keysB.length &&
+ keysA.every(function (key) {
+ return looseEqual(a[key], b[key]);
+ }));
+ }
+ else {
+ /* istanbul ignore next */
+ return false;
+ }
+ }
+ catch (e) {
+ /* istanbul ignore next */
+ return false;
+ }
+ }
+ else if (!isObjectA && !isObjectB) {
+ return String(a) === String(b);
+ }
+ else {
+ return false;
+ }
+ }
+ /**
+ * Return the first index at which a loosely equal value can be
+ * found in the array (if value is a plain object, the array must
+ * contain an object of the same shape), or -1 if it is not present.
+ */
+ function looseIndexOf(arr, val) {
+ for (var i = 0; i < arr.length; i++) {
+ if (looseEqual(arr[i], val))
+ return i;
+ }
+ return -1;
+ }
+ /**
+ * Ensure a function is called only once.
+ */
+ function once(fn) {
+ var called = false;
+ return function () {
+ if (!called) {
+ called = true;
+ fn.apply(this, arguments);
+ }
+ };
+ }
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is#polyfill
+ function hasChanged(x, y) {
+ if (x === y) {
+ return x === 0 && 1 / x !== 1 / y;
+ }
+ else {
+ return x === x || y === y;
+ }
+ }
+
+ var SSR_ATTR = 'data-server-rendered';
+ var ASSET_TYPES = ['component', 'directive', 'filter'];
+ var LIFECYCLE_HOOKS = [
+ 'beforeCreate',
+ 'created',
+ 'beforeMount',
+ 'mounted',
+ 'beforeUpdate',
+ 'updated',
+ 'beforeDestroy',
+ 'destroyed',
+ 'activated',
+ 'deactivated',
+ 'errorCaptured',
+ 'serverPrefetch',
+ 'renderTracked',
+ 'renderTriggered'
+ ];
+
+ var config = {
+ /**
+ * Option merge strategies (used in core/util/options)
+ */
+ // $flow-disable-line
+ optionMergeStrategies: Object.create(null),
+ /**
+ * Whether to suppress warnings.
+ */
+ silent: false,
+ /**
+ * Show production mode tip message on boot?
+ */
+ productionTip: true,
+ /**
+ * Whether to enable devtools
+ */
+ devtools: true,
+ /**
+ * Whether to record perf
+ */
+ performance: false,
+ /**
+ * Error handler for watcher errors
+ */
+ errorHandler: null,
+ /**
+ * Warn handler for watcher warns
+ */
+ warnHandler: null,
+ /**
+ * Ignore certain custom elements
+ */
+ ignoredElements: [],
+ /**
+ * Custom user key aliases for v-on
+ */
+ // $flow-disable-line
+ keyCodes: Object.create(null),
+ /**
+ * Check if a tag is reserved so that it cannot be registered as a
+ * component. This is platform-dependent and may be overwritten.
+ */
+ isReservedTag: no,
+ /**
+ * Check if an attribute is reserved so that it cannot be used as a component
+ * prop. This is platform-dependent and may be overwritten.
+ */
+ isReservedAttr: no,
+ /**
+ * Check if a tag is an unknown element.
+ * Platform-dependent.
+ */
+ isUnknownElement: no,
+ /**
+ * Get the namespace of an element
+ */
+ getTagNamespace: noop,
+ /**
+ * Parse the real tag name for the specific platform.
+ */
+ parsePlatformTagName: identity,
+ /**
+ * Check if an attribute must be bound using property, e.g. value
+ * Platform-dependent.
+ */
+ mustUseProp: no,
+ /**
+ * Perform updates asynchronously. Intended to be used by Vue Test Utils
+ * This will significantly reduce performance if set to false.
+ */
+ async: true,
+ /**
+ * Exposed for legacy reasons
+ */
+ _lifecycleHooks: LIFECYCLE_HOOKS
+ };
+
+ /**
+ * unicode letters used for parsing html tags, component names and property paths.
+ * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
+ * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
+ */
+ var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
+ /**
+ * Check if a string starts with $ or _
+ */
+ function isReserved(str) {
+ var c = (str + '').charCodeAt(0);
+ return c === 0x24 || c === 0x5f;
+ }
+ /**
+ * Define a property.
+ */
+ function def(obj, key, val, enumerable) {
+ Object.defineProperty(obj, key, {
+ value: val,
+ enumerable: !!enumerable,
+ writable: true,
+ configurable: true
+ });
+ }
+ /**
+ * Parse simple path.
+ */
+ var bailRE = new RegExp("[^".concat(unicodeRegExp.source, ".$_\\d]"));
+ function parsePath(path) {
+ if (bailRE.test(path)) {
+ return;
+ }
+ var segments = path.split('.');
+ return function (obj) {
+ for (var i = 0; i < segments.length; i++) {
+ if (!obj)
+ return;
+ obj = obj[segments[i]];
+ }
+ return obj;
+ };
+ }
+
+ // can we use __proto__?
+ var hasProto = '__proto__' in {};
+ // Browser environment sniffing
+ var inBrowser = typeof window !== 'undefined';
+ var UA = inBrowser && window.navigator.userAgent.toLowerCase();
+ var isIE = UA && /msie|trident/.test(UA);
+ var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
+ var isEdge = UA && UA.indexOf('edge/') > 0;
+ UA && UA.indexOf('android') > 0;
+ var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);
+ UA && /chrome\/\d+/.test(UA) && !isEdge;
+ UA && /phantomjs/.test(UA);
+ var isFF = UA && UA.match(/firefox\/(\d+)/);
+ // Firefox has a "watch" function on Object.prototype...
+ // @ts-expect-error firebox support
+ var nativeWatch = {}.watch;
+ var supportsPassive = false;
+ if (inBrowser) {
+ try {
+ var opts = {};
+ Object.defineProperty(opts, 'passive', {
+ get: function () {
+ /* istanbul ignore next */
+ supportsPassive = true;
+ }
+ }); // https://github.com/facebook/flow/issues/285
+ window.addEventListener('test-passive', null, opts);
+ }
+ catch (e) { }
+ }
+ // this needs to be lazy-evaled because vue may be required before
+ // vue-server-renderer can set VUE_ENV
+ var _isServer;
+ var isServerRendering = function () {
+ if (_isServer === undefined) {
+ /* istanbul ignore if */
+ if (!inBrowser && typeof global !== 'undefined') {
+ // detect presence of vue-server-renderer and avoid
+ // Webpack shimming the process
+ _isServer =
+ global['process'] && global['process'].env.VUE_ENV === 'server';
+ }
+ else {
+ _isServer = false;
+ }
+ }
+ return _isServer;
+ };
+ // detect devtools
+ var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
+ /* istanbul ignore next */
+ function isNative(Ctor) {
+ return typeof Ctor === 'function' && /native code/.test(Ctor.toString());
+ }
+ var hasSymbol = typeof Symbol !== 'undefined' &&
+ isNative(Symbol) &&
+ typeof Reflect !== 'undefined' &&
+ isNative(Reflect.ownKeys);
+ var _Set; // $flow-disable-line
+ /* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) {
+ // use native Set when available.
+ _Set = Set;
+ }
+ else {
+ // a non-standard Set polyfill that only works with primitive keys.
+ _Set = /** @class */ (function () {
+ function Set() {
+ this.set = Object.create(null);
+ }
+ Set.prototype.has = function (key) {
+ return this.set[key] === true;
+ };
+ Set.prototype.add = function (key) {
+ this.set[key] = true;
+ };
+ Set.prototype.clear = function () {
+ this.set = Object.create(null);
+ };
+ return Set;
+ }());
+ }
+
+ var currentInstance = null;
+ /**
+ * This is exposed for compatibility with v3 (e.g. some functions in VueUse
+ * relies on it). Do not use this internally, just use `currentInstance`.
+ *
+ * @internal this function needs manual type declaration because it relies
+ * on previously manually authored types from Vue 2
+ */
+ function getCurrentInstance() {
+ return currentInstance && { proxy: currentInstance };
+ }
+ /**
+ * @internal
+ */
+ function setCurrentInstance(vm) {
+ if (vm === void 0) { vm = null; }
+ if (!vm)
+ currentInstance && currentInstance._scope.off();
+ currentInstance = vm;
+ vm && vm._scope.on();
+ }
+
+ /**
+ * @internal
+ */
+ var VNode = /** @class */ (function () {
+ function VNode(tag, data, children, text, elm, context, componentOptions, asyncFactory) {
+ this.tag = tag;
+ this.data = data;
+ this.children = children;
+ this.text = text;
+ this.elm = elm;
+ this.ns = undefined;
+ this.context = context;
+ this.fnContext = undefined;
+ this.fnOptions = undefined;
+ this.fnScopeId = undefined;
+ this.key = data && data.key;
+ this.componentOptions = componentOptions;
+ this.componentInstance = undefined;
+ this.parent = undefined;
+ this.raw = false;
+ this.isStatic = false;
+ this.isRootInsert = true;
+ this.isComment = false;
+ this.isCloned = false;
+ this.isOnce = false;
+ this.asyncFactory = asyncFactory;
+ this.asyncMeta = undefined;
+ this.isAsyncPlaceholder = false;
+ }
+ Object.defineProperty(VNode.prototype, "child", {
+ // DEPRECATED: alias for componentInstance for backwards compat.
+ /* istanbul ignore next */
+ get: function () {
+ return this.componentInstance;
+ },
+ enumerable: false,
+ configurable: true
+ });
+ return VNode;
+ }());
+ var createEmptyVNode = function (text) {
+ if (text === void 0) { text = ''; }
+ var node = new VNode();
+ node.text = text;
+ node.isComment = true;
+ return node;
+ };
+ function createTextVNode(val) {
+ return new VNode(undefined, undefined, undefined, String(val));
+ }
+ // optimized shallow clone
+ // used for static nodes and slot nodes because they may be reused across
+ // multiple renders, cloning them avoids errors when DOM manipulations rely
+ // on their elm reference.
+ function cloneVNode(vnode) {
+ var cloned = new VNode(vnode.tag, vnode.data,
+ // #7975
+ // clone children array to avoid mutating original in case of cloning
+ // a child.
+ vnode.children && vnode.children.slice(), vnode.text, vnode.elm, vnode.context, vnode.componentOptions, vnode.asyncFactory);
+ cloned.ns = vnode.ns;
+ cloned.isStatic = vnode.isStatic;
+ cloned.key = vnode.key;
+ cloned.isComment = vnode.isComment;
+ cloned.fnContext = vnode.fnContext;
+ cloned.fnOptions = vnode.fnOptions;
+ cloned.fnScopeId = vnode.fnScopeId;
+ cloned.asyncMeta = vnode.asyncMeta;
+ cloned.isCloned = true;
+ return cloned;
+ }
+
+ /* not type checking this file because flow doesn't play well with Proxy */
+ var initProxy;
+ {
+ var allowedGlobals_1 = makeMap('Infinity,undefined,NaN,isFinite,isNaN,' +
+ 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
+ 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,' +
+ 'require' // for Webpack/Browserify
+ );
+ var warnNonPresent_1 = function (target, key) {
+ warn$2("Property or method \"".concat(key, "\" is not defined on the instance but ") +
+ 'referenced during render. Make sure that this property is reactive, ' +
+ 'either in the data option, or for class-based components, by ' +
+ 'initializing the property. ' +
+ 'See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', target);
+ };
+ var warnReservedPrefix_1 = function (target, key) {
+ warn$2("Property \"".concat(key, "\" must be accessed with \"$data.").concat(key, "\" because ") +
+ 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
+ 'prevent conflicts with Vue internals. ' +
+ 'See: https://v2.vuejs.org/v2/api/#data', target);
+ };
+ var hasProxy_1 = typeof Proxy !== 'undefined' && isNative(Proxy);
+ if (hasProxy_1) {
+ var isBuiltInModifier_1 = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
+ config.keyCodes = new Proxy(config.keyCodes, {
+ set: function (target, key, value) {
+ if (isBuiltInModifier_1(key)) {
+ warn$2("Avoid overwriting built-in modifier in config.keyCodes: .".concat(key));
+ return false;
+ }
+ else {
+ target[key] = value;
+ return true;
+ }
+ }
+ });
+ }
+ var hasHandler_1 = {
+ has: function (target, key) {
+ var has = key in target;
+ var isAllowed = allowedGlobals_1(key) ||
+ (typeof key === 'string' &&
+ key.charAt(0) === '_' &&
+ !(key in target.$data));
+ if (!has && !isAllowed) {
+ if (key in target.$data)
+ warnReservedPrefix_1(target, key);
+ else
+ warnNonPresent_1(target, key);
+ }
+ return has || !isAllowed;
+ }
+ };
+ var getHandler_1 = {
+ get: function (target, key) {
+ if (typeof key === 'string' && !(key in target)) {
+ if (key in target.$data)
+ warnReservedPrefix_1(target, key);
+ else
+ warnNonPresent_1(target, key);
+ }
+ return target[key];
+ }
+ };
+ initProxy = function initProxy(vm) {
+ if (hasProxy_1) {
+ // determine which proxy handler to use
+ var options = vm.$options;
+ var handlers = options.render && options.render._withStripped ? getHandler_1 : hasHandler_1;
+ vm._renderProxy = new Proxy(vm, handlers);
+ }
+ else {
+ vm._renderProxy = vm;
+ }
+ };
+ }
+
+ /******************************************************************************
+ Copyright (c) Microsoft Corporation.
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ PERFORMANCE OF THIS SOFTWARE.
+ ***************************************************************************** */
+
+ var __assign = function() {
+ __assign = Object.assign || function __assign(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+ };
+
+ var uid$2 = 0;
+ var pendingCleanupDeps = [];
+ var cleanupDeps = function () {
+ for (var i = 0; i < pendingCleanupDeps.length; i++) {
+ var dep = pendingCleanupDeps[i];
+ dep.subs = dep.subs.filter(function (s) { return s; });
+ dep._pending = false;
+ }
+ pendingCleanupDeps.length = 0;
+ };
+ /**
+ * A dep is an observable that can have multiple
+ * directives subscribing to it.
+ * @internal
+ */
+ var Dep = /** @class */ (function () {
+ function Dep() {
+ // pending subs cleanup
+ this._pending = false;
+ this.id = uid$2++;
+ this.subs = [];
+ }
+ Dep.prototype.addSub = function (sub) {
+ this.subs.push(sub);
+ };
+ Dep.prototype.removeSub = function (sub) {
+ // #12696 deps with massive amount of subscribers are extremely slow to
+ // clean up in Chromium
+ // to workaround this, we unset the sub for now, and clear them on
+ // next scheduler flush.
+ this.subs[this.subs.indexOf(sub)] = null;
+ if (!this._pending) {
+ this._pending = true;
+ pendingCleanupDeps.push(this);
+ }
+ };
+ Dep.prototype.depend = function (info) {
+ if (Dep.target) {
+ Dep.target.addDep(this);
+ if (info && Dep.target.onTrack) {
+ Dep.target.onTrack(__assign({ effect: Dep.target }, info));
+ }
+ }
+ };
+ Dep.prototype.notify = function (info) {
+ // stabilize the subscriber list first
+ var subs = this.subs.filter(function (s) { return s; });
+ if (!config.async) {
+ // subs aren't sorted in scheduler if not running async
+ // we need to sort them now to make sure they fire in correct
+ // order
+ subs.sort(function (a, b) { return a.id - b.id; });
+ }
+ for (var i = 0, l = subs.length; i < l; i++) {
+ var sub = subs[i];
+ if (info) {
+ sub.onTrigger &&
+ sub.onTrigger(__assign({ effect: subs[i] }, info));
+ }
+ sub.update();
+ }
+ };
+ return Dep;
+ }());
+ // The current target watcher being evaluated.
+ // This is globally unique because only one watcher
+ // can be evaluated at a time.
+ Dep.target = null;
+ var targetStack = [];
+ function pushTarget(target) {
+ targetStack.push(target);
+ Dep.target = target;
+ }
+ function popTarget() {
+ targetStack.pop();
+ Dep.target = targetStack[targetStack.length - 1];
+ }
+
+ /*
+ * not type checking this file because flow doesn't play well with
+ * dynamically accessing methods on Array prototype
+ */
+ var arrayProto = Array.prototype;
+ var arrayMethods = Object.create(arrayProto);
+ var methodsToPatch = [
+ 'push',
+ 'pop',
+ 'shift',
+ 'unshift',
+ 'splice',
+ 'sort',
+ 'reverse'
+ ];
+ /**
+ * Intercept mutating methods and emit events
+ */
+ methodsToPatch.forEach(function (method) {
+ // cache original method
+ var original = arrayProto[method];
+ def(arrayMethods, method, function mutator() {
+ var args = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ args[_i] = arguments[_i];
+ }
+ var result = original.apply(this, args);
+ var ob = this.__ob__;
+ var inserted;
+ switch (method) {
+ case 'push':
+ case 'unshift':
+ inserted = args;
+ break;
+ case 'splice':
+ inserted = args.slice(2);
+ break;
+ }
+ if (inserted)
+ ob.observeArray(inserted);
+ // notify change
+ {
+ ob.dep.notify({
+ type: "array mutation" /* TriggerOpTypes.ARRAY_MUTATION */,
+ target: this,
+ key: method
+ });
+ }
+ return result;
+ });
+ });
+
+ var rawMap = new WeakMap();
+ function reactive(target) {
+ makeReactive(target, false);
+ return target;
+ }
+ /**
+ * Return a shallowly-reactive copy of the original object, where only the root
+ * level properties are reactive. It also does not auto-unwrap refs (even at the
+ * root level).
+ */
+ function shallowReactive(target) {
+ makeReactive(target, true);
+ def(target, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);
+ return target;
+ }
+ function makeReactive(target, shallow) {
+ // if trying to observe a readonly proxy, return the readonly version.
+ if (!isReadonly(target)) {
+ {
+ if (isArray(target)) {
+ warn$2("Avoid using Array as root value for ".concat(shallow ? "shallowReactive()" : "reactive()", " as it cannot be tracked in watch() or watchEffect(). Use ").concat(shallow ? "shallowRef()" : "ref()", " instead. This is a Vue-2-only limitation."));
+ }
+ var existingOb = target && target.__ob__;
+ if (existingOb && existingOb.shallow !== shallow) {
+ warn$2("Target is already a ".concat(existingOb.shallow ? "" : "non-", "shallow reactive object, and cannot be converted to ").concat(shallow ? "" : "non-", "shallow."));
+ }
+ }
+ var ob = observe(target, shallow, isServerRendering() /* ssr mock reactivity */);
+ if (!ob) {
+ if (target == null || isPrimitive(target)) {
+ warn$2("value cannot be made reactive: ".concat(String(target)));
+ }
+ if (isCollectionType(target)) {
+ warn$2("Vue 2 does not support reactive collection types such as Map or Set.");
+ }
+ }
+ }
+ }
+ function isReactive(value) {
+ if (isReadonly(value)) {
+ return isReactive(value["__v_raw" /* ReactiveFlags.RAW */]);
+ }
+ return !!(value && value.__ob__);
+ }
+ function isShallow(value) {
+ return !!(value && value.__v_isShallow);
+ }
+ function isReadonly(value) {
+ return !!(value && value.__v_isReadonly);
+ }
+ function isProxy(value) {
+ return isReactive(value) || isReadonly(value);
+ }
+ function toRaw(observed) {
+ var raw = observed && observed["__v_raw" /* ReactiveFlags.RAW */];
+ return raw ? toRaw(raw) : observed;
+ }
+ function markRaw(value) {
+ if (isObject(value)) {
+ rawMap.set(value, true);
+ }
+ return value;
+ }
+ /**
+ * @internal
+ */
+ function isCollectionType(value) {
+ var type = toRawType(value);
+ return (type === 'Map' || type === 'WeakMap' || type === 'Set' || type === 'WeakSet');
+ }
+
+ var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
+ var NO_INIITIAL_VALUE = {};
+ /**
+ * In some cases we may want to disable observation inside a component's
+ * update computation.
+ */
+ var shouldObserve = true;
+ function toggleObserving(value) {
+ shouldObserve = value;
+ }
+ // ssr mock dep
+ var mockDep = {
+ notify: noop,
+ depend: noop,
+ addSub: noop,
+ removeSub: noop
+ };
+ /**
+ * Observer class that is attached to each observed
+ * object. Once attached, the observer converts the target
+ * object's property keys into getter/setters that
+ * collect dependencies and dispatch updates.
+ */
+ var Observer = /** @class */ (function () {
+ function Observer(value, shallow, mock) {
+ if (shallow === void 0) { shallow = false; }
+ if (mock === void 0) { mock = false; }
+ this.value = value;
+ this.shallow = shallow;
+ this.mock = mock;
+ // this.value = value
+ this.dep = mock ? mockDep : new Dep();
+ this.vmCount = 0;
+ def(value, '__ob__', this);
+ if (isArray(value)) {
+ if (!mock) {
+ if (hasProto) {
+ value.__proto__ = arrayMethods;
+ /* eslint-enable no-proto */
+ }
+ else {
+ for (var i = 0, l = arrayKeys.length; i < l; i++) {
+ var key = arrayKeys[i];
+ def(value, key, arrayMethods[key]);
+ }
+ }
+ }
+ if (!shallow) {
+ this.observeArray(value);
+ }
+ }
+ else {
+ /**
+ * Walk through all properties and convert them into
+ * getter/setters. This method should only be called when
+ * value type is Object.
+ */
+ var keys = Object.keys(value);
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ defineReactive(value, key, NO_INIITIAL_VALUE, undefined, shallow, mock);
+ }
+ }
+ }
+ /**
+ * Observe a list of Array items.
+ */
+ Observer.prototype.observeArray = function (value) {
+ for (var i = 0, l = value.length; i < l; i++) {
+ observe(value[i], false, this.mock);
+ }
+ };
+ return Observer;
+ }());
+ // helpers
+ /**
+ * Attempt to create an observer instance for a value,
+ * returns the new observer if successfully observed,
+ * or the existing observer if the value already has one.
+ */
+ function observe(value, shallow, ssrMockReactivity) {
+ if (value && hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
+ return value.__ob__;
+ }
+ if (shouldObserve &&
+ (ssrMockReactivity || !isServerRendering()) &&
+ (isArray(value) || isPlainObject(value)) &&
+ Object.isExtensible(value) &&
+ !value.__v_skip /* ReactiveFlags.SKIP */ &&
+ !rawMap.has(value) &&
+ !isRef(value) &&
+ !(value instanceof VNode)) {
+ return new Observer(value, shallow, ssrMockReactivity);
+ }
+ }
+ /**
+ * Define a reactive property on an Object.
+ */
+ function defineReactive(obj, key, val, customSetter, shallow, mock) {
+ var dep = new Dep();
+ var property = Object.getOwnPropertyDescriptor(obj, key);
+ if (property && property.configurable === false) {
+ return;
+ }
+ // cater for pre-defined getter/setters
+ var getter = property && property.get;
+ var setter = property && property.set;
+ if ((!getter || setter) &&
+ (val === NO_INIITIAL_VALUE || arguments.length === 2)) {
+ val = obj[key];
+ }
+ var childOb = !shallow && observe(val, false, mock);
+ Object.defineProperty(obj, key, {
+ enumerable: true,
+ configurable: true,
+ get: function reactiveGetter() {
+ var value = getter ? getter.call(obj) : val;
+ if (Dep.target) {
+ {
+ dep.depend({
+ target: obj,
+ type: "get" /* TrackOpTypes.GET */,
+ key: key
+ });
+ }
+ if (childOb) {
+ childOb.dep.depend();
+ if (isArray(value)) {
+ dependArray(value);
+ }
+ }
+ }
+ return isRef(value) && !shallow ? value.value : value;
+ },
+ set: function reactiveSetter(newVal) {
+ var value = getter ? getter.call(obj) : val;
+ if (!hasChanged(value, newVal)) {
+ return;
+ }
+ if (customSetter) {
+ customSetter();
+ }
+ if (setter) {
+ setter.call(obj, newVal);
+ }
+ else if (getter) {
+ // #7981: for accessor properties without setter
+ return;
+ }
+ else if (!shallow && isRef(value) && !isRef(newVal)) {
+ value.value = newVal;
+ return;
+ }
+ else {
+ val = newVal;
+ }
+ childOb = !shallow && observe(newVal, false, mock);
+ {
+ dep.notify({
+ type: "set" /* TriggerOpTypes.SET */,
+ target: obj,
+ key: key,
+ newValue: newVal,
+ oldValue: value
+ });
+ }
+ }
+ });
+ return dep;
+ }
+ function set(target, key, val) {
+ if ((isUndef(target) || isPrimitive(target))) {
+ warn$2("Cannot set reactive property on undefined, null, or primitive value: ".concat(target));
+ }
+ if (isReadonly(target)) {
+ warn$2("Set operation on key \"".concat(key, "\" failed: target is readonly."));
+ return;
+ }
+ var ob = target.__ob__;
+ if (isArray(target) && isValidArrayIndex(key)) {
+ target.length = Math.max(target.length, key);
+ target.splice(key, 1, val);
+ // when mocking for SSR, array methods are not hijacked
+ if (ob && !ob.shallow && ob.mock) {
+ observe(val, false, true);
+ }
+ return val;
+ }
+ if (key in target && !(key in Object.prototype)) {
+ target[key] = val;
+ return val;
+ }
+ if (target._isVue || (ob && ob.vmCount)) {
+ warn$2('Avoid adding reactive properties to a Vue instance or its root $data ' +
+ 'at runtime - declare it upfront in the data option.');
+ return val;
+ }
+ if (!ob) {
+ target[key] = val;
+ return val;
+ }
+ defineReactive(ob.value, key, val, undefined, ob.shallow, ob.mock);
+ {
+ ob.dep.notify({
+ type: "add" /* TriggerOpTypes.ADD */,
+ target: target,
+ key: key,
+ newValue: val,
+ oldValue: undefined
+ });
+ }
+ return val;
+ }
+ function del(target, key) {
+ if ((isUndef(target) || isPrimitive(target))) {
+ warn$2("Cannot delete reactive property on undefined, null, or primitive value: ".concat(target));
+ }
+ if (isArray(target) && isValidArrayIndex(key)) {
+ target.splice(key, 1);
+ return;
+ }
+ var ob = target.__ob__;
+ if (target._isVue || (ob && ob.vmCount)) {
+ warn$2('Avoid deleting properties on a Vue instance or its root $data ' +
+ '- just set it to null.');
+ return;
+ }
+ if (isReadonly(target)) {
+ warn$2("Delete operation on key \"".concat(key, "\" failed: target is readonly."));
+ return;
+ }
+ if (!hasOwn(target, key)) {
+ return;
+ }
+ delete target[key];
+ if (!ob) {
+ return;
+ }
+ {
+ ob.dep.notify({
+ type: "delete" /* TriggerOpTypes.DELETE */,
+ target: target,
+ key: key
+ });
+ }
+ }
+ /**
+ * Collect dependencies on array elements when the array is touched, since
+ * we cannot intercept array element access like property getters.
+ */
+ function dependArray(value) {
+ for (var e = void 0, i = 0, l = value.length; i < l; i++) {
+ e = value[i];
+ if (e && e.__ob__) {
+ e.__ob__.dep.depend();
+ }
+ if (isArray(e)) {
+ dependArray(e);
+ }
+ }
+ }
+
+ /**
+ * @internal
+ */
+ var RefFlag = "__v_isRef";
+ function isRef(r) {
+ return !!(r && r.__v_isRef === true);
+ }
+ function ref$1(value) {
+ return createRef(value, false);
+ }
+ function shallowRef(value) {
+ return createRef(value, true);
+ }
+ function createRef(rawValue, shallow) {
+ if (isRef(rawValue)) {
+ return rawValue;
+ }
+ var ref = {};
+ def(ref, RefFlag, true);
+ def(ref, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, shallow);
+ def(ref, 'dep', defineReactive(ref, 'value', rawValue, null, shallow, isServerRendering()));
+ return ref;
+ }
+ function triggerRef(ref) {
+ if (!ref.dep) {
+ warn$2("received object is not a triggerable ref.");
+ }
+ {
+ ref.dep &&
+ ref.dep.notify({
+ type: "set" /* TriggerOpTypes.SET */,
+ target: ref,
+ key: 'value'
+ });
+ }
+ }
+ function unref(ref) {
+ return isRef(ref) ? ref.value : ref;
+ }
+ function proxyRefs(objectWithRefs) {
+ if (isReactive(objectWithRefs)) {
+ return objectWithRefs;
+ }
+ var proxy = {};
+ var keys = Object.keys(objectWithRefs);
+ for (var i = 0; i < keys.length; i++) {
+ proxyWithRefUnwrap(proxy, objectWithRefs, keys[i]);
+ }
+ return proxy;
+ }
+ function proxyWithRefUnwrap(target, source, key) {
+ Object.defineProperty(target, key, {
+ enumerable: true,
+ configurable: true,
+ get: function () {
+ var val = source[key];
+ if (isRef(val)) {
+ return val.value;
+ }
+ else {
+ var ob = val && val.__ob__;
+ if (ob)
+ ob.dep.depend();
+ return val;
+ }
+ },
+ set: function (value) {
+ var oldValue = source[key];
+ if (isRef(oldValue) && !isRef(value)) {
+ oldValue.value = value;
+ }
+ else {
+ source[key] = value;
+ }
+ }
+ });
+ }
+ function customRef(factory) {
+ var dep = new Dep();
+ var _a = factory(function () {
+ {
+ dep.depend({
+ target: ref,
+ type: "get" /* TrackOpTypes.GET */,
+ key: 'value'
+ });
+ }
+ }, function () {
+ {
+ dep.notify({
+ target: ref,
+ type: "set" /* TriggerOpTypes.SET */,
+ key: 'value'
+ });
+ }
+ }), get = _a.get, set = _a.set;
+ var ref = {
+ get value() {
+ return get();
+ },
+ set value(newVal) {
+ set(newVal);
+ }
+ };
+ def(ref, RefFlag, true);
+ return ref;
+ }
+ function toRefs(object) {
+ if (!isReactive(object)) {
+ warn$2("toRefs() expects a reactive object but received a plain one.");
+ }
+ var ret = isArray(object) ? new Array(object.length) : {};
+ for (var key in object) {
+ ret[key] = toRef(object, key);
+ }
+ return ret;
+ }
+ function toRef(object, key, defaultValue) {
+ var val = object[key];
+ if (isRef(val)) {
+ return val;
+ }
+ var ref = {
+ get value() {
+ var val = object[key];
+ return val === undefined ? defaultValue : val;
+ },
+ set value(newVal) {
+ object[key] = newVal;
+ }
+ };
+ def(ref, RefFlag, true);
+ return ref;
+ }
+
+ var rawToReadonlyMap = new WeakMap();
+ var rawToShallowReadonlyMap = new WeakMap();
+ function readonly(target) {
+ return createReadonly(target, false);
+ }
+ function createReadonly(target, shallow) {
+ if (!isPlainObject(target)) {
+ {
+ if (isArray(target)) {
+ warn$2("Vue 2 does not support readonly arrays.");
+ }
+ else if (isCollectionType(target)) {
+ warn$2("Vue 2 does not support readonly collection types such as Map or Set.");
+ }
+ else {
+ warn$2("value cannot be made readonly: ".concat(typeof target));
+ }
+ }
+ return target;
+ }
+ // already a readonly object
+ if (isReadonly(target)) {
+ return target;
+ }
+ // already has a readonly proxy
+ var map = shallow ? rawToShallowReadonlyMap : rawToReadonlyMap;
+ var existingProxy = map.get(target);
+ if (existingProxy) {
+ return existingProxy;
+ }
+ var proxy = Object.create(Object.getPrototypeOf(target));
+ map.set(target, proxy);
+ def(proxy, "__v_isReadonly" /* ReactiveFlags.IS_READONLY */, true);
+ def(proxy, "__v_raw" /* ReactiveFlags.RAW */, target);
+ if (isRef(target)) {
+ def(proxy, RefFlag, true);
+ }
+ if (shallow || isShallow(target)) {
+ def(proxy, "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */, true);
+ }
+ var keys = Object.keys(target);
+ for (var i = 0; i < keys.length; i++) {
+ defineReadonlyProperty(proxy, target, keys[i], shallow);
+ }
+ return proxy;
+ }
+ function defineReadonlyProperty(proxy, target, key, shallow) {
+ Object.defineProperty(proxy, key, {
+ enumerable: true,
+ configurable: true,
+ get: function () {
+ var val = target[key];
+ return shallow || !isPlainObject(val) ? val : readonly(val);
+ },
+ set: function () {
+ warn$2("Set operation on key \"".concat(key, "\" failed: target is readonly."));
+ }
+ });
+ }
+ /**
+ * Returns a reactive-copy of the original object, where only the root level
+ * properties are readonly, and does NOT unwrap refs nor recursively convert
+ * returned properties.
+ * This is used for creating the props proxy object for stateful components.
+ */
+ function shallowReadonly(target) {
+ return createReadonly(target, true);
+ }
+
+ function computed(getterOrOptions, debugOptions) {
+ var getter;
+ var setter;
+ var onlyGetter = isFunction(getterOrOptions);
+ if (onlyGetter) {
+ getter = getterOrOptions;
+ setter = function () {
+ warn$2('Write operation failed: computed value is readonly');
+ }
+ ;
+ }
+ else {
+ getter = getterOrOptions.get;
+ setter = getterOrOptions.set;
+ }
+ var watcher = isServerRendering()
+ ? null
+ : new Watcher(currentInstance, getter, noop, { lazy: true });
+ if (watcher && debugOptions) {
+ watcher.onTrack = debugOptions.onTrack;
+ watcher.onTrigger = debugOptions.onTrigger;
+ }
+ var ref = {
+ // some libs rely on the presence effect for checking computed refs
+ // from normal refs, but the implementation doesn't matter
+ effect: watcher,
+ get value() {
+ if (watcher) {
+ if (watcher.dirty) {
+ watcher.evaluate();
+ }
+ if (Dep.target) {
+ if (Dep.target.onTrack) {
+ Dep.target.onTrack({
+ effect: Dep.target,
+ target: ref,
+ type: "get" /* TrackOpTypes.GET */,
+ key: 'value'
+ });
+ }
+ watcher.depend();
+ }
+ return watcher.value;
+ }
+ else {
+ return getter();
+ }
+ },
+ set value(newVal) {
+ setter(newVal);
+ }
+ };
+ def(ref, RefFlag, true);
+ def(ref, "__v_isReadonly" /* ReactiveFlags.IS_READONLY */, onlyGetter);
+ return ref;
+ }
+
+ var mark;
+ var measure;
+ {
+ var perf_1 = inBrowser && window.performance;
+ /* istanbul ignore if */
+ if (perf_1 &&
+ // @ts-ignore
+ perf_1.mark &&
+ // @ts-ignore
+ perf_1.measure &&
+ // @ts-ignore
+ perf_1.clearMarks &&
+ // @ts-ignore
+ perf_1.clearMeasures) {
+ mark = function (tag) { return perf_1.mark(tag); };
+ measure = function (name, startTag, endTag) {
+ perf_1.measure(name, startTag, endTag);
+ perf_1.clearMarks(startTag);
+ perf_1.clearMarks(endTag);
+ // perf.clearMeasures(name)
+ };
+ }
+ }
+
+ var normalizeEvent = cached(function (name) {
+ var passive = name.charAt(0) === '&';
+ name = passive ? name.slice(1) : name;
+ var once = name.charAt(0) === '~'; // Prefixed last, checked first
+ name = once ? name.slice(1) : name;
+ var capture = name.charAt(0) === '!';
+ name = capture ? name.slice(1) : name;
+ return {
+ name: name,
+ once: once,
+ capture: capture,
+ passive: passive
+ };
+ });
+ function createFnInvoker(fns, vm) {
+ function invoker() {
+ var fns = invoker.fns;
+ if (isArray(fns)) {
+ var cloned = fns.slice();
+ for (var i = 0; i < cloned.length; i++) {
+ invokeWithErrorHandling(cloned[i], null, arguments, vm, "v-on handler");
+ }
+ }
+ else {
+ // return handler return value for single handlers
+ return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler");
+ }
+ }
+ invoker.fns = fns;
+ return invoker;
+ }
+ function updateListeners(on, oldOn, add, remove, createOnceHandler, vm) {
+ var name, cur, old, event;
+ for (name in on) {
+ cur = on[name];
+ old = oldOn[name];
+ event = normalizeEvent(name);
+ if (isUndef(cur)) {
+ warn$2("Invalid handler for event \"".concat(event.name, "\": got ") + String(cur), vm);
+ }
+ else if (isUndef(old)) {
+ if (isUndef(cur.fns)) {
+ cur = on[name] = createFnInvoker(cur, vm);
+ }
+ if (isTrue(event.once)) {
+ cur = on[name] = createOnceHandler(event.name, cur, event.capture);
+ }
+ add(event.name, cur, event.capture, event.passive, event.params);
+ }
+ else if (cur !== old) {
+ old.fns = cur;
+ on[name] = old;
+ }
+ }
+ for (name in oldOn) {
+ if (isUndef(on[name])) {
+ event = normalizeEvent(name);
+ remove(event.name, oldOn[name], event.capture);
+ }
+ }
+ }
+
+ function mergeVNodeHook(def, hookKey, hook) {
+ if (def instanceof VNode) {
+ def = def.data.hook || (def.data.hook = {});
+ }
+ var invoker;
+ var oldHook = def[hookKey];
+ function wrappedHook() {
+ hook.apply(this, arguments);
+ // important: remove merged hook to ensure it's called only once
+ // and prevent memory leak
+ remove$2(invoker.fns, wrappedHook);
+ }
+ if (isUndef(oldHook)) {
+ // no existing hook
+ invoker = createFnInvoker([wrappedHook]);
+ }
+ else {
+ /* istanbul ignore if */
+ if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {
+ // already a merged invoker
+ invoker = oldHook;
+ invoker.fns.push(wrappedHook);
+ }
+ else {
+ // existing plain hook
+ invoker = createFnInvoker([oldHook, wrappedHook]);
+ }
+ }
+ invoker.merged = true;
+ def[hookKey] = invoker;
+ }
+
+ function extractPropsFromVNodeData(data, Ctor, tag) {
+ // we are only extracting raw values here.
+ // validation and default values are handled in the child
+ // component itself.
+ var propOptions = Ctor.options.props;
+ if (isUndef(propOptions)) {
+ return;
+ }
+ var res = {};
+ var attrs = data.attrs, props = data.props;
+ if (isDef(attrs) || isDef(props)) {
+ for (var key in propOptions) {
+ var altKey = hyphenate(key);
+ {
+ var keyInLowerCase = key.toLowerCase();
+ if (key !== keyInLowerCase && attrs && hasOwn(attrs, keyInLowerCase)) {
+ tip("Prop \"".concat(keyInLowerCase, "\" is passed to component ") +
+ "".concat(formatComponentName(
+ // @ts-expect-error tag is string
+ tag || Ctor), ", but the declared prop name is") +
+ " \"".concat(key, "\". ") +
+ "Note that HTML attributes are case-insensitive and camelCased " +
+ "props need to use their kebab-case equivalents when using in-DOM " +
+ "templates. You should probably use \"".concat(altKey, "\" instead of \"").concat(key, "\"."));
+ }
+ }
+ checkProp(res, props, key, altKey, true) ||
+ checkProp(res, attrs, key, altKey, false);
+ }
+ }
+ return res;
+ }
+ function checkProp(res, hash, key, altKey, preserve) {
+ if (isDef(hash)) {
+ if (hasOwn(hash, key)) {
+ res[key] = hash[key];
+ if (!preserve) {
+ delete hash[key];
+ }
+ return true;
+ }
+ else if (hasOwn(hash, altKey)) {
+ res[key] = hash[altKey];
+ if (!preserve) {
+ delete hash[altKey];
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ // The template compiler attempts to minimize the need for normalization by
+ // statically analyzing the template at compile time.
+ //
+ // For plain HTML markup, normalization can be completely skipped because the
+ // generated render function is guaranteed to return Array. There are
+ // two cases where extra normalization is needed:
+ // 1. When the children contains components - because a functional component
+ // may return an Array instead of a single root. In this case, just a simple
+ // normalization is needed - if any child is an Array, we flatten the whole
+ // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
+ // because functional components already normalize their own children.
+ function simpleNormalizeChildren(children) {
+ for (var i = 0; i < children.length; i++) {
+ if (isArray(children[i])) {
+ return Array.prototype.concat.apply([], children);
+ }
+ }
+ return children;
+ }
+ // 2. When the children contains constructs that always generated nested Arrays,
+ // e.g. , , v-for, or when the children is provided by user
+ // with hand-written render functions / JSX. In such cases a full normalization
+ // is needed to cater to all possible types of children values.
+ function normalizeChildren(children) {
+ return isPrimitive(children)
+ ? [createTextVNode(children)]
+ : isArray(children)
+ ? normalizeArrayChildren(children)
+ : undefined;
+ }
+ function isTextNode(node) {
+ return isDef(node) && isDef(node.text) && isFalse(node.isComment);
+ }
+ function normalizeArrayChildren(children, nestedIndex) {
+ var res = [];
+ var i, c, lastIndex, last;
+ for (i = 0; i < children.length; i++) {
+ c = children[i];
+ if (isUndef(c) || typeof c === 'boolean')
+ continue;
+ lastIndex = res.length - 1;
+ last = res[lastIndex];
+ // nested
+ if (isArray(c)) {
+ if (c.length > 0) {
+ c = normalizeArrayChildren(c, "".concat(nestedIndex || '', "_").concat(i));
+ // merge adjacent text nodes
+ if (isTextNode(c[0]) && isTextNode(last)) {
+ res[lastIndex] = createTextVNode(last.text + c[0].text);
+ c.shift();
+ }
+ res.push.apply(res, c);
+ }
+ }
+ else if (isPrimitive(c)) {
+ if (isTextNode(last)) {
+ // merge adjacent text nodes
+ // this is necessary for SSR hydration because text nodes are
+ // essentially merged when rendered to HTML strings
+ res[lastIndex] = createTextVNode(last.text + c);
+ }
+ else if (c !== '') {
+ // convert primitive to vnode
+ res.push(createTextVNode(c));
+ }
+ }
+ else {
+ if (isTextNode(c) && isTextNode(last)) {
+ // merge adjacent text nodes
+ res[lastIndex] = createTextVNode(last.text + c.text);
+ }
+ else {
+ // default key for nested array children (likely generated by v-for)
+ if (isTrue(children._isVList) &&
+ isDef(c.tag) &&
+ isUndef(c.key) &&
+ isDef(nestedIndex)) {
+ c.key = "__vlist".concat(nestedIndex, "_").concat(i, "__");
+ }
+ res.push(c);
+ }
+ }
+ }
+ return res;
+ }
+
+ var SIMPLE_NORMALIZE = 1;
+ var ALWAYS_NORMALIZE = 2;
+ // wrapper function for providing a more flexible interface
+ // without getting yelled at by flow
+ function createElement$1(context, tag, data, children, normalizationType, alwaysNormalize) {
+ if (isArray(data) || isPrimitive(data)) {
+ normalizationType = children;
+ children = data;
+ data = undefined;
+ }
+ if (isTrue(alwaysNormalize)) {
+ normalizationType = ALWAYS_NORMALIZE;
+ }
+ return _createElement(context, tag, data, children, normalizationType);
+ }
+ function _createElement(context, tag, data, children, normalizationType) {
+ if (isDef(data) && isDef(data.__ob__)) {
+ warn$2("Avoid using observed data object as vnode data: ".concat(JSON.stringify(data), "\n") + 'Always create fresh vnode data objects in each render!', context);
+ return createEmptyVNode();
+ }
+ // object syntax in v-bind
+ if (isDef(data) && isDef(data.is)) {
+ tag = data.is;
+ }
+ if (!tag) {
+ // in case of component :is set to falsy value
+ return createEmptyVNode();
+ }
+ // warn against non-primitive key
+ if (isDef(data) && isDef(data.key) && !isPrimitive(data.key)) {
+ warn$2('Avoid using non-primitive value as key, ' +
+ 'use string/number value instead.', context);
+ }
+ // support single function children as default scoped slot
+ if (isArray(children) && isFunction(children[0])) {
+ data = data || {};
+ data.scopedSlots = { default: children[0] };
+ children.length = 0;
+ }
+ if (normalizationType === ALWAYS_NORMALIZE) {
+ children = normalizeChildren(children);
+ }
+ else if (normalizationType === SIMPLE_NORMALIZE) {
+ children = simpleNormalizeChildren(children);
+ }
+ var vnode, ns;
+ if (typeof tag === 'string') {
+ var Ctor = void 0;
+ ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
+ if (config.isReservedTag(tag)) {
+ // platform built-in elements
+ if (isDef(data) &&
+ isDef(data.nativeOn) &&
+ data.tag !== 'component') {
+ warn$2("The .native modifier for v-on is only valid on components but it was used on <".concat(tag, ">."), context);
+ }
+ vnode = new VNode(config.parsePlatformTagName(tag), data, children, undefined, undefined, context);
+ }
+ else if ((!data || !data.pre) &&
+ isDef((Ctor = resolveAsset(context.$options, 'components', tag)))) {
+ // component
+ vnode = createComponent(Ctor, data, context, children, tag);
+ }
+ else {
+ // unknown or unlisted namespaced elements
+ // check at runtime because it may get assigned a namespace when its
+ // parent normalizes children
+ vnode = new VNode(tag, data, children, undefined, undefined, context);
+ }
+ }
+ else {
+ // direct component options / constructor
+ vnode = createComponent(tag, data, context, children);
+ }
+ if (isArray(vnode)) {
+ return vnode;
+ }
+ else if (isDef(vnode)) {
+ if (isDef(ns))
+ applyNS(vnode, ns);
+ if (isDef(data))
+ registerDeepBindings(data);
+ return vnode;
+ }
+ else {
+ return createEmptyVNode();
+ }
+ }
+ function applyNS(vnode, ns, force) {
+ vnode.ns = ns;
+ if (vnode.tag === 'foreignObject') {
+ // use default namespace inside foreignObject
+ ns = undefined;
+ force = true;
+ }
+ if (isDef(vnode.children)) {
+ for (var i = 0, l = vnode.children.length; i < l; i++) {
+ var child = vnode.children[i];
+ if (isDef(child.tag) &&
+ (isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
+ applyNS(child, ns, force);
+ }
+ }
+ }
+ }
+ // ref #5318
+ // necessary to ensure parent re-render when deep bindings like :style and
+ // :class are used on slot nodes
+ function registerDeepBindings(data) {
+ if (isObject(data.style)) {
+ traverse(data.style);
+ }
+ if (isObject(data.class)) {
+ traverse(data.class);
+ }
+ }
+
+ /**
+ * Runtime helper for rendering v-for lists.
+ */
+ function renderList(val, render) {
+ var ret = null, i, l, keys, key;
+ if (isArray(val) || typeof val === 'string') {
+ ret = new Array(val.length);
+ for (i = 0, l = val.length; i < l; i++) {
+ ret[i] = render(val[i], i);
+ }
+ }
+ else if (typeof val === 'number') {
+ ret = new Array(val);
+ for (i = 0; i < val; i++) {
+ ret[i] = render(i + 1, i);
+ }
+ }
+ else if (isObject(val)) {
+ if (hasSymbol && val[Symbol.iterator]) {
+ ret = [];
+ var iterator = val[Symbol.iterator]();
+ var result = iterator.next();
+ while (!result.done) {
+ ret.push(render(result.value, ret.length));
+ result = iterator.next();
+ }
+ }
+ else {
+ keys = Object.keys(val);
+ ret = new Array(keys.length);
+ for (i = 0, l = keys.length; i < l; i++) {
+ key = keys[i];
+ ret[i] = render(val[key], key, i);
+ }
+ }
+ }
+ if (!isDef(ret)) {
+ ret = [];
+ }
+ ret._isVList = true;
+ return ret;
+ }
+
+ /**
+ * Runtime helper for rendering
+ */
+ function renderSlot(name, fallbackRender, props, bindObject) {
+ var scopedSlotFn = this.$scopedSlots[name];
+ var nodes;
+ if (scopedSlotFn) {
+ // scoped slot
+ props = props || {};
+ if (bindObject) {
+ if (!isObject(bindObject)) {
+ warn$2('slot v-bind without argument expects an Object', this);
+ }
+ props = extend(extend({}, bindObject), props);
+ }
+ nodes =
+ scopedSlotFn(props) ||
+ (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);
+ }
+ else {
+ nodes =
+ this.$slots[name] ||
+ (isFunction(fallbackRender) ? fallbackRender() : fallbackRender);
+ }
+ var target = props && props.slot;
+ if (target) {
+ return this.$createElement('template', { slot: target }, nodes);
+ }
+ else {
+ return nodes;
+ }
+ }
+
+ /**
+ * Runtime helper for resolving filters
+ */
+ function resolveFilter(id) {
+ return resolveAsset(this.$options, 'filters', id, true) || identity;
+ }
+
+ function isKeyNotMatch(expect, actual) {
+ if (isArray(expect)) {
+ return expect.indexOf(actual) === -1;
+ }
+ else {
+ return expect !== actual;
+ }
+ }
+ /**
+ * Runtime helper for checking keyCodes from config.
+ * exposed as Vue.prototype._k
+ * passing in eventKeyName as last argument separately for backwards compat
+ */
+ function checkKeyCodes(eventKeyCode, key, builtInKeyCode, eventKeyName, builtInKeyName) {
+ var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
+ if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
+ return isKeyNotMatch(builtInKeyName, eventKeyName);
+ }
+ else if (mappedKeyCode) {
+ return isKeyNotMatch(mappedKeyCode, eventKeyCode);
+ }
+ else if (eventKeyName) {
+ return hyphenate(eventKeyName) !== key;
+ }
+ return eventKeyCode === undefined;
+ }
+
+ /**
+ * Runtime helper for merging v-bind="object" into a VNode's data.
+ */
+ function bindObjectProps(data, tag, value, asProp, isSync) {
+ if (value) {
+ if (!isObject(value)) {
+ warn$2('v-bind without argument expects an Object or Array value', this);
+ }
+ else {
+ if (isArray(value)) {
+ value = toObject(value);
+ }
+ var hash = void 0;
+ var _loop_1 = function (key) {
+ if (key === 'class' || key === 'style' || isReservedAttribute(key)) {
+ hash = data;
+ }
+ else {
+ var type = data.attrs && data.attrs.type;
+ hash =
+ asProp || config.mustUseProp(tag, type, key)
+ ? data.domProps || (data.domProps = {})
+ : data.attrs || (data.attrs = {});
+ }
+ var camelizedKey = camelize(key);
+ var hyphenatedKey = hyphenate(key);
+ if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
+ hash[key] = value[key];
+ if (isSync) {
+ var on = data.on || (data.on = {});
+ on["update:".concat(key)] = function ($event) {
+ value[key] = $event;
+ };
+ }
+ }
+ };
+ for (var key in value) {
+ _loop_1(key);
+ }
+ }
+ }
+ return data;
+ }
+
+ /**
+ * Runtime helper for rendering static trees.
+ */
+ function renderStatic(index, isInFor) {
+ var cached = this._staticTrees || (this._staticTrees = []);
+ var tree = cached[index];
+ // if has already-rendered static tree and not inside v-for,
+ // we can reuse the same tree.
+ if (tree && !isInFor) {
+ return tree;
+ }
+ // otherwise, render a fresh tree.
+ tree = cached[index] = this.$options.staticRenderFns[index].call(this._renderProxy, this._c, this // for render fns generated for functional component templates
+ );
+ markStatic$1(tree, "__static__".concat(index), false);
+ return tree;
+ }
+ /**
+ * Runtime helper for v-once.
+ * Effectively it means marking the node as static with a unique key.
+ */
+ function markOnce(tree, index, key) {
+ markStatic$1(tree, "__once__".concat(index).concat(key ? "_".concat(key) : ""), true);
+ return tree;
+ }
+ function markStatic$1(tree, key, isOnce) {
+ if (isArray(tree)) {
+ for (var i = 0; i < tree.length; i++) {
+ if (tree[i] && typeof tree[i] !== 'string') {
+ markStaticNode(tree[i], "".concat(key, "_").concat(i), isOnce);
+ }
+ }
+ }
+ else {
+ markStaticNode(tree, key, isOnce);
+ }
+ }
+ function markStaticNode(node, key, isOnce) {
+ node.isStatic = true;
+ node.key = key;
+ node.isOnce = isOnce;
+ }
+
+ function bindObjectListeners(data, value) {
+ if (value) {
+ if (!isPlainObject(value)) {
+ warn$2('v-on without argument expects an Object value', this);
+ }
+ else {
+ var on = (data.on = data.on ? extend({}, data.on) : {});
+ for (var key in value) {
+ var existing = on[key];
+ var ours = value[key];
+ on[key] = existing ? [].concat(existing, ours) : ours;
+ }
+ }
+ }
+ return data;
+ }
+
+ function resolveScopedSlots(fns, res,
+ // the following are added in 2.6
+ hasDynamicKeys, contentHashKey) {
+ res = res || { $stable: !hasDynamicKeys };
+ for (var i = 0; i < fns.length; i++) {
+ var slot = fns[i];
+ if (isArray(slot)) {
+ resolveScopedSlots(slot, res, hasDynamicKeys);
+ }
+ else if (slot) {
+ // marker for reverse proxying v-slot without scope on this.$slots
+ // @ts-expect-error
+ if (slot.proxy) {
+ // @ts-expect-error
+ slot.fn.proxy = true;
+ }
+ res[slot.key] = slot.fn;
+ }
+ }
+ if (contentHashKey) {
+ res.$key = contentHashKey;
+ }
+ return res;
+ }
+
+ // helper to process dynamic keys for dynamic arguments in v-bind and v-on.
+ function bindDynamicKeys(baseObj, values) {
+ for (var i = 0; i < values.length; i += 2) {
+ var key = values[i];
+ if (typeof key === 'string' && key) {
+ baseObj[values[i]] = values[i + 1];
+ }
+ else if (key !== '' && key !== null) {
+ // null is a special value for explicitly removing a binding
+ warn$2("Invalid value for dynamic directive argument (expected string or null): ".concat(key), this);
+ }
+ }
+ return baseObj;
+ }
+ // helper to dynamically append modifier runtime markers to event names.
+ // ensure only append when value is already string, otherwise it will be cast
+ // to string and cause the type check to miss.
+ function prependModifier(value, symbol) {
+ return typeof value === 'string' ? symbol + value : value;
+ }
+
+ function installRenderHelpers(target) {
+ target._o = markOnce;
+ target._n = toNumber;
+ target._s = toString;
+ target._l = renderList;
+ target._t = renderSlot;
+ target._q = looseEqual;
+ target._i = looseIndexOf;
+ target._m = renderStatic;
+ target._f = resolveFilter;
+ target._k = checkKeyCodes;
+ target._b = bindObjectProps;
+ target._v = createTextVNode;
+ target._e = createEmptyVNode;
+ target._u = resolveScopedSlots;
+ target._g = bindObjectListeners;
+ target._d = bindDynamicKeys;
+ target._p = prependModifier;
+ }
+
+ /**
+ * Runtime helper for resolving raw children VNodes into a slot object.
+ */
+ function resolveSlots(children, context) {
+ if (!children || !children.length) {
+ return {};
+ }
+ var slots = {};
+ for (var i = 0, l = children.length; i < l; i++) {
+ var child = children[i];
+ var data = child.data;
+ // remove slot attribute if the node is resolved as a Vue slot node
+ if (data && data.attrs && data.attrs.slot) {
+ delete data.attrs.slot;
+ }
+ // named slots should only be respected if the vnode was rendered in the
+ // same context.
+ if ((child.context === context || child.fnContext === context) &&
+ data &&
+ data.slot != null) {
+ var name_1 = data.slot;
+ var slot = slots[name_1] || (slots[name_1] = []);
+ if (child.tag === 'template') {
+ slot.push.apply(slot, child.children || []);
+ }
+ else {
+ slot.push(child);
+ }
+ }
+ else {
+ (slots.default || (slots.default = [])).push(child);
+ }
+ }
+ // ignore slots that contains only whitespace
+ for (var name_2 in slots) {
+ if (slots[name_2].every(isWhitespace)) {
+ delete slots[name_2];
+ }
+ }
+ return slots;
+ }
+ function isWhitespace(node) {
+ return (node.isComment && !node.asyncFactory) || node.text === ' ';
+ }
+
+ function isAsyncPlaceholder(node) {
+ // @ts-expect-error not really boolean type
+ return node.isComment && node.asyncFactory;
+ }
+
+ function normalizeScopedSlots(ownerVm, scopedSlots, normalSlots, prevScopedSlots) {
+ var res;
+ var hasNormalSlots = Object.keys(normalSlots).length > 0;
+ var isStable = scopedSlots ? !!scopedSlots.$stable : !hasNormalSlots;
+ var key = scopedSlots && scopedSlots.$key;
+ if (!scopedSlots) {
+ res = {};
+ }
+ else if (scopedSlots._normalized) {
+ // fast path 1: child component re-render only, parent did not change
+ return scopedSlots._normalized;
+ }
+ else if (isStable &&
+ prevScopedSlots &&
+ prevScopedSlots !== emptyObject &&
+ key === prevScopedSlots.$key &&
+ !hasNormalSlots &&
+ !prevScopedSlots.$hasNormal) {
+ // fast path 2: stable scoped slots w/ no normal slots to proxy,
+ // only need to normalize once
+ return prevScopedSlots;
+ }
+ else {
+ res = {};
+ for (var key_1 in scopedSlots) {
+ if (scopedSlots[key_1] && key_1[0] !== '$') {
+ res[key_1] = normalizeScopedSlot(ownerVm, normalSlots, key_1, scopedSlots[key_1]);
+ }
+ }
+ }
+ // expose normal slots on scopedSlots
+ for (var key_2 in normalSlots) {
+ if (!(key_2 in res)) {
+ res[key_2] = proxyNormalSlot(normalSlots, key_2);
+ }
+ }
+ // avoriaz seems to mock a non-extensible $scopedSlots object
+ // and when that is passed down this would cause an error
+ if (scopedSlots && Object.isExtensible(scopedSlots)) {
+ scopedSlots._normalized = res;
+ }
+ def(res, '$stable', isStable);
+ def(res, '$key', key);
+ def(res, '$hasNormal', hasNormalSlots);
+ return res;
+ }
+ function normalizeScopedSlot(vm, normalSlots, key, fn) {
+ var normalized = function () {
+ var cur = currentInstance;
+ setCurrentInstance(vm);
+ var res = arguments.length ? fn.apply(null, arguments) : fn({});
+ res =
+ res && typeof res === 'object' && !isArray(res)
+ ? [res] // single vnode
+ : normalizeChildren(res);
+ var vnode = res && res[0];
+ setCurrentInstance(cur);
+ return res &&
+ (!vnode ||
+ (res.length === 1 && vnode.isComment && !isAsyncPlaceholder(vnode))) // #9658, #10391
+ ? undefined
+ : res;
+ };
+ // this is a slot using the new v-slot syntax without scope. although it is
+ // compiled as a scoped slot, render fn users would expect it to be present
+ // on this.$slots because the usage is semantically a normal slot.
+ if (fn.proxy) {
+ Object.defineProperty(normalSlots, key, {
+ get: normalized,
+ enumerable: true,
+ configurable: true
+ });
+ }
+ return normalized;
+ }
+ function proxyNormalSlot(slots, key) {
+ return function () { return slots[key]; };
+ }
+
+ function initSetup(vm) {
+ var options = vm.$options;
+ var setup = options.setup;
+ if (setup) {
+ var ctx = (vm._setupContext = createSetupContext(vm));
+ setCurrentInstance(vm);
+ pushTarget();
+ var setupResult = invokeWithErrorHandling(setup, null, [vm._props || shallowReactive({}), ctx], vm, "setup");
+ popTarget();
+ setCurrentInstance();
+ if (isFunction(setupResult)) {
+ // render function
+ // @ts-ignore
+ options.render = setupResult;
+ }
+ else if (isObject(setupResult)) {
+ // bindings
+ if (setupResult instanceof VNode) {
+ warn$2("setup() should not return VNodes directly - " +
+ "return a render function instead.");
+ }
+ vm._setupState = setupResult;
+ // __sfc indicates compiled bindings from
-
+
diff --git a/birdavatar/README.md b/birdavatar/README.md
new file mode 100644
index 00000000..4eb8fd80
--- /dev/null
+++ b/birdavatar/README.md
@@ -0,0 +1,14 @@
+# Bird Avatar Generator
+
+Generate a default avatar based on David Revoy's bird-avatar-generator https://www.peppercarrot.com/extras/html/2019_bird-generator/index.php
+
+## License:
+
+**Artworks:**
+PNG and ORA files licensed under: [CC-By 4.0](https://creativecommons.org/licenses/by/4.0/)
+attribution: David Revoy with the following exception: Generated pictures used as Avatar
+(for blog,forum,social-network) don't need direct attribution and so, can be used
+
+**Original code**
+Original PHP code is licensed under the short and simple permissive:
+[MIT License](https://en.wikipedia.org/wiki/MIT_License)
diff --git a/birdavatar/avatars/accessorie_1.png b/birdavatar/avatars/accessorie_1.png
new file mode 100644
index 00000000..decd7486
Binary files /dev/null and b/birdavatar/avatars/accessorie_1.png differ
diff --git a/birdavatar/avatars/accessorie_10.png b/birdavatar/avatars/accessorie_10.png
new file mode 100644
index 00000000..f8e4529d
Binary files /dev/null and b/birdavatar/avatars/accessorie_10.png differ
diff --git a/birdavatar/avatars/accessorie_11.png b/birdavatar/avatars/accessorie_11.png
new file mode 100644
index 00000000..783e968e
Binary files /dev/null and b/birdavatar/avatars/accessorie_11.png differ
diff --git a/birdavatar/avatars/accessorie_12.png b/birdavatar/avatars/accessorie_12.png
new file mode 100644
index 00000000..dde3b6c1
Binary files /dev/null and b/birdavatar/avatars/accessorie_12.png differ
diff --git a/birdavatar/avatars/accessorie_13.png b/birdavatar/avatars/accessorie_13.png
new file mode 100644
index 00000000..aa0a48f2
Binary files /dev/null and b/birdavatar/avatars/accessorie_13.png differ
diff --git a/birdavatar/avatars/accessorie_14.png b/birdavatar/avatars/accessorie_14.png
new file mode 100644
index 00000000..66f3d848
Binary files /dev/null and b/birdavatar/avatars/accessorie_14.png differ
diff --git a/birdavatar/avatars/accessorie_15.png b/birdavatar/avatars/accessorie_15.png
new file mode 100644
index 00000000..decd7486
Binary files /dev/null and b/birdavatar/avatars/accessorie_15.png differ
diff --git a/birdavatar/avatars/accessorie_16.png b/birdavatar/avatars/accessorie_16.png
new file mode 100644
index 00000000..aa011593
Binary files /dev/null and b/birdavatar/avatars/accessorie_16.png differ
diff --git a/birdavatar/avatars/accessorie_17.png b/birdavatar/avatars/accessorie_17.png
new file mode 100644
index 00000000..c1ff1fcb
Binary files /dev/null and b/birdavatar/avatars/accessorie_17.png differ
diff --git a/birdavatar/avatars/accessorie_18.png b/birdavatar/avatars/accessorie_18.png
new file mode 100644
index 00000000..37c22f00
Binary files /dev/null and b/birdavatar/avatars/accessorie_18.png differ
diff --git a/birdavatar/avatars/accessorie_19.png b/birdavatar/avatars/accessorie_19.png
new file mode 100644
index 00000000..a8c3d0bd
Binary files /dev/null and b/birdavatar/avatars/accessorie_19.png differ
diff --git a/birdavatar/avatars/accessorie_2.png b/birdavatar/avatars/accessorie_2.png
new file mode 100644
index 00000000..afb2ab9d
Binary files /dev/null and b/birdavatar/avatars/accessorie_2.png differ
diff --git a/birdavatar/avatars/accessorie_20.png b/birdavatar/avatars/accessorie_20.png
new file mode 100644
index 00000000..58c88213
Binary files /dev/null and b/birdavatar/avatars/accessorie_20.png differ
diff --git a/birdavatar/avatars/accessorie_3.png b/birdavatar/avatars/accessorie_3.png
new file mode 100644
index 00000000..3e572e17
Binary files /dev/null and b/birdavatar/avatars/accessorie_3.png differ
diff --git a/birdavatar/avatars/accessorie_4.png b/birdavatar/avatars/accessorie_4.png
new file mode 100644
index 00000000..e29728c0
Binary files /dev/null and b/birdavatar/avatars/accessorie_4.png differ
diff --git a/birdavatar/avatars/accessorie_5.png b/birdavatar/avatars/accessorie_5.png
new file mode 100644
index 00000000..d70aeddc
Binary files /dev/null and b/birdavatar/avatars/accessorie_5.png differ
diff --git a/birdavatar/avatars/accessorie_6.png b/birdavatar/avatars/accessorie_6.png
new file mode 100644
index 00000000..f8186a2b
Binary files /dev/null and b/birdavatar/avatars/accessorie_6.png differ
diff --git a/birdavatar/avatars/accessorie_7.png b/birdavatar/avatars/accessorie_7.png
new file mode 100644
index 00000000..5cf31864
Binary files /dev/null and b/birdavatar/avatars/accessorie_7.png differ
diff --git a/birdavatar/avatars/accessorie_8.png b/birdavatar/avatars/accessorie_8.png
new file mode 100644
index 00000000..a65d8ebe
Binary files /dev/null and b/birdavatar/avatars/accessorie_8.png differ
diff --git a/birdavatar/avatars/accessorie_9.png b/birdavatar/avatars/accessorie_9.png
new file mode 100644
index 00000000..decd7486
Binary files /dev/null and b/birdavatar/avatars/accessorie_9.png differ
diff --git a/birdavatar/avatars/bec_1.png b/birdavatar/avatars/bec_1.png
new file mode 100644
index 00000000..cf290f7d
Binary files /dev/null and b/birdavatar/avatars/bec_1.png differ
diff --git a/birdavatar/avatars/bec_2.png b/birdavatar/avatars/bec_2.png
new file mode 100644
index 00000000..5b1be9a2
Binary files /dev/null and b/birdavatar/avatars/bec_2.png differ
diff --git a/birdavatar/avatars/bec_3.png b/birdavatar/avatars/bec_3.png
new file mode 100644
index 00000000..3739b558
Binary files /dev/null and b/birdavatar/avatars/bec_3.png differ
diff --git a/birdavatar/avatars/bec_4.png b/birdavatar/avatars/bec_4.png
new file mode 100644
index 00000000..e16d0d54
Binary files /dev/null and b/birdavatar/avatars/bec_4.png differ
diff --git a/birdavatar/avatars/bec_5.png b/birdavatar/avatars/bec_5.png
new file mode 100644
index 00000000..8a1be081
Binary files /dev/null and b/birdavatar/avatars/bec_5.png differ
diff --git a/birdavatar/avatars/bec_6.png b/birdavatar/avatars/bec_6.png
new file mode 100644
index 00000000..5bd87c20
Binary files /dev/null and b/birdavatar/avatars/bec_6.png differ
diff --git a/birdavatar/avatars/bec_7.png b/birdavatar/avatars/bec_7.png
new file mode 100644
index 00000000..b71b04f8
Binary files /dev/null and b/birdavatar/avatars/bec_7.png differ
diff --git a/birdavatar/avatars/bec_8.png b/birdavatar/avatars/bec_8.png
new file mode 100644
index 00000000..fbf95a01
Binary files /dev/null and b/birdavatar/avatars/bec_8.png differ
diff --git a/birdavatar/avatars/bec_9.png b/birdavatar/avatars/bec_9.png
new file mode 100644
index 00000000..16a2d2ef
Binary files /dev/null and b/birdavatar/avatars/bec_9.png differ
diff --git a/birdavatar/avatars/body_1.png b/birdavatar/avatars/body_1.png
new file mode 100644
index 00000000..490d75ef
Binary files /dev/null and b/birdavatar/avatars/body_1.png differ
diff --git a/birdavatar/avatars/body_2.png b/birdavatar/avatars/body_2.png
new file mode 100644
index 00000000..0c6e36f5
Binary files /dev/null and b/birdavatar/avatars/body_2.png differ
diff --git a/birdavatar/avatars/body_3.png b/birdavatar/avatars/body_3.png
new file mode 100644
index 00000000..97edad0e
Binary files /dev/null and b/birdavatar/avatars/body_3.png differ
diff --git a/birdavatar/avatars/body_4.png b/birdavatar/avatars/body_4.png
new file mode 100644
index 00000000..14a295bc
Binary files /dev/null and b/birdavatar/avatars/body_4.png differ
diff --git a/birdavatar/avatars/body_5.png b/birdavatar/avatars/body_5.png
new file mode 100644
index 00000000..2e06406b
Binary files /dev/null and b/birdavatar/avatars/body_5.png differ
diff --git a/birdavatar/avatars/body_6.png b/birdavatar/avatars/body_6.png
new file mode 100644
index 00000000..cf6195d3
Binary files /dev/null and b/birdavatar/avatars/body_6.png differ
diff --git a/birdavatar/avatars/body_7.png b/birdavatar/avatars/body_7.png
new file mode 100644
index 00000000..8cdbc9c3
Binary files /dev/null and b/birdavatar/avatars/body_7.png differ
diff --git a/birdavatar/avatars/body_8.png b/birdavatar/avatars/body_8.png
new file mode 100644
index 00000000..07d571f9
Binary files /dev/null and b/birdavatar/avatars/body_8.png differ
diff --git a/birdavatar/avatars/body_9.png b/birdavatar/avatars/body_9.png
new file mode 100644
index 00000000..8b6d3e1a
Binary files /dev/null and b/birdavatar/avatars/body_9.png differ
diff --git a/birdavatar/avatars/eyes_1.png b/birdavatar/avatars/eyes_1.png
new file mode 100644
index 00000000..c58e63a2
Binary files /dev/null and b/birdavatar/avatars/eyes_1.png differ
diff --git a/birdavatar/avatars/eyes_2.png b/birdavatar/avatars/eyes_2.png
new file mode 100644
index 00000000..584afa99
Binary files /dev/null and b/birdavatar/avatars/eyes_2.png differ
diff --git a/birdavatar/avatars/eyes_3.png b/birdavatar/avatars/eyes_3.png
new file mode 100644
index 00000000..5434f9c7
Binary files /dev/null and b/birdavatar/avatars/eyes_3.png differ
diff --git a/birdavatar/avatars/eyes_4.png b/birdavatar/avatars/eyes_4.png
new file mode 100644
index 00000000..7c9cee1b
Binary files /dev/null and b/birdavatar/avatars/eyes_4.png differ
diff --git a/birdavatar/avatars/eyes_5.png b/birdavatar/avatars/eyes_5.png
new file mode 100644
index 00000000..89859b25
Binary files /dev/null and b/birdavatar/avatars/eyes_5.png differ
diff --git a/birdavatar/avatars/eyes_6.png b/birdavatar/avatars/eyes_6.png
new file mode 100644
index 00000000..7acdd69a
Binary files /dev/null and b/birdavatar/avatars/eyes_6.png differ
diff --git a/birdavatar/avatars/eyes_7.png b/birdavatar/avatars/eyes_7.png
new file mode 100644
index 00000000..098a066a
Binary files /dev/null and b/birdavatar/avatars/eyes_7.png differ
diff --git a/birdavatar/avatars/eyes_8.png b/birdavatar/avatars/eyes_8.png
new file mode 100644
index 00000000..64267cfa
Binary files /dev/null and b/birdavatar/avatars/eyes_8.png differ
diff --git a/birdavatar/avatars/eyes_9.png b/birdavatar/avatars/eyes_9.png
new file mode 100644
index 00000000..1807e049
Binary files /dev/null and b/birdavatar/avatars/eyes_9.png differ
diff --git a/birdavatar/avatars/hoop_1.png b/birdavatar/avatars/hoop_1.png
new file mode 100644
index 00000000..d1606934
Binary files /dev/null and b/birdavatar/avatars/hoop_1.png differ
diff --git a/birdavatar/avatars/hoop_10.png b/birdavatar/avatars/hoop_10.png
new file mode 100644
index 00000000..f8426701
Binary files /dev/null and b/birdavatar/avatars/hoop_10.png differ
diff --git a/birdavatar/avatars/hoop_2.png b/birdavatar/avatars/hoop_2.png
new file mode 100644
index 00000000..e2f089d7
Binary files /dev/null and b/birdavatar/avatars/hoop_2.png differ
diff --git a/birdavatar/avatars/hoop_3.png b/birdavatar/avatars/hoop_3.png
new file mode 100644
index 00000000..b985f340
Binary files /dev/null and b/birdavatar/avatars/hoop_3.png differ
diff --git a/birdavatar/avatars/hoop_4.png b/birdavatar/avatars/hoop_4.png
new file mode 100644
index 00000000..cde95f8a
Binary files /dev/null and b/birdavatar/avatars/hoop_4.png differ
diff --git a/birdavatar/avatars/hoop_5.png b/birdavatar/avatars/hoop_5.png
new file mode 100644
index 00000000..1fc8312e
Binary files /dev/null and b/birdavatar/avatars/hoop_5.png differ
diff --git a/birdavatar/avatars/hoop_6.png b/birdavatar/avatars/hoop_6.png
new file mode 100644
index 00000000..95a7f498
Binary files /dev/null and b/birdavatar/avatars/hoop_6.png differ
diff --git a/birdavatar/avatars/hoop_7.png b/birdavatar/avatars/hoop_7.png
new file mode 100644
index 00000000..389d538f
Binary files /dev/null and b/birdavatar/avatars/hoop_7.png differ
diff --git a/birdavatar/avatars/hoop_8.png b/birdavatar/avatars/hoop_8.png
new file mode 100644
index 00000000..05936336
Binary files /dev/null and b/birdavatar/avatars/hoop_8.png differ
diff --git a/birdavatar/avatars/hoop_9.png b/birdavatar/avatars/hoop_9.png
new file mode 100644
index 00000000..f58e8d2b
Binary files /dev/null and b/birdavatar/avatars/hoop_9.png differ
diff --git a/birdavatar/avatars/tail_1.png b/birdavatar/avatars/tail_1.png
new file mode 100644
index 00000000..e544ca3e
Binary files /dev/null and b/birdavatar/avatars/tail_1.png differ
diff --git a/birdavatar/avatars/tail_2.png b/birdavatar/avatars/tail_2.png
new file mode 100644
index 00000000..355b6d16
Binary files /dev/null and b/birdavatar/avatars/tail_2.png differ
diff --git a/birdavatar/avatars/tail_3.png b/birdavatar/avatars/tail_3.png
new file mode 100644
index 00000000..aebf9b4c
Binary files /dev/null and b/birdavatar/avatars/tail_3.png differ
diff --git a/birdavatar/avatars/tail_4.png b/birdavatar/avatars/tail_4.png
new file mode 100644
index 00000000..88e686e6
Binary files /dev/null and b/birdavatar/avatars/tail_4.png differ
diff --git a/birdavatar/avatars/tail_5.png b/birdavatar/avatars/tail_5.png
new file mode 100644
index 00000000..7bf9a2df
Binary files /dev/null and b/birdavatar/avatars/tail_5.png differ
diff --git a/birdavatar/avatars/tail_6.png b/birdavatar/avatars/tail_6.png
new file mode 100644
index 00000000..9a2341b3
Binary files /dev/null and b/birdavatar/avatars/tail_6.png differ
diff --git a/birdavatar/avatars/tail_7.png b/birdavatar/avatars/tail_7.png
new file mode 100644
index 00000000..99d38880
Binary files /dev/null and b/birdavatar/avatars/tail_7.png differ
diff --git a/birdavatar/avatars/tail_8.png b/birdavatar/avatars/tail_8.png
new file mode 100644
index 00000000..338a82a5
Binary files /dev/null and b/birdavatar/avatars/tail_8.png differ
diff --git a/birdavatar/avatars/tail_9.png b/birdavatar/avatars/tail_9.png
new file mode 100644
index 00000000..eda337d1
Binary files /dev/null and b/birdavatar/avatars/tail_9.png differ
diff --git a/birdavatar/avatars/wing_1.png b/birdavatar/avatars/wing_1.png
new file mode 100644
index 00000000..14aadd7c
Binary files /dev/null and b/birdavatar/avatars/wing_1.png differ
diff --git a/birdavatar/avatars/wing_2.png b/birdavatar/avatars/wing_2.png
new file mode 100644
index 00000000..5b5c25ca
Binary files /dev/null and b/birdavatar/avatars/wing_2.png differ
diff --git a/birdavatar/avatars/wing_3.png b/birdavatar/avatars/wing_3.png
new file mode 100644
index 00000000..bb84cdf0
Binary files /dev/null and b/birdavatar/avatars/wing_3.png differ
diff --git a/birdavatar/avatars/wing_4.png b/birdavatar/avatars/wing_4.png
new file mode 100644
index 00000000..44ad10e6
Binary files /dev/null and b/birdavatar/avatars/wing_4.png differ
diff --git a/birdavatar/avatars/wing_5.png b/birdavatar/avatars/wing_5.png
new file mode 100644
index 00000000..c87d063e
Binary files /dev/null and b/birdavatar/avatars/wing_5.png differ
diff --git a/birdavatar/avatars/wing_6.png b/birdavatar/avatars/wing_6.png
new file mode 100644
index 00000000..c29b31e8
Binary files /dev/null and b/birdavatar/avatars/wing_6.png differ
diff --git a/birdavatar/avatars/wing_7.png b/birdavatar/avatars/wing_7.png
new file mode 100644
index 00000000..a4ed6610
Binary files /dev/null and b/birdavatar/avatars/wing_7.png differ
diff --git a/birdavatar/avatars/wing_8.png b/birdavatar/avatars/wing_8.png
new file mode 100644
index 00000000..ed0738cb
Binary files /dev/null and b/birdavatar/avatars/wing_8.png differ
diff --git a/birdavatar/avatars/wing_9.png b/birdavatar/avatars/wing_9.png
new file mode 100644
index 00000000..07d59f89
Binary files /dev/null and b/birdavatar/avatars/wing_9.png differ
diff --git a/birdavatar/bird_src.ora b/birdavatar/bird_src.ora
new file mode 100644
index 00000000..c88532a4
Binary files /dev/null and b/birdavatar/bird_src.ora differ
diff --git a/birdavatar/birdavatar.php b/birdavatar/birdavatar.php
new file mode 100644
index 00000000..4841ba52
--- /dev/null
+++ b/birdavatar/birdavatar.php
@@ -0,0 +1,272 @@
+
+ */
+
+use Friendica\App;
+use Friendica\Core\Hook;
+use Friendica\Core\Logger;
+use Friendica\Core\Renderer;
+use Friendica\Database\DBA;
+use Friendica\DI;
+use Friendica\Model\Contact;
+use Friendica\Model\Photo;
+use Friendica\Model\Profile;
+use Friendica\Network\HTTPException\NotFoundException;
+
+define("BIRDAVATAR_SIZE", 256);
+
+/**
+ * Installs the addon hook
+ */
+function birdavatar_install()
+{
+ Hook::register('avatar_lookup', __FILE__, 'birdavatar_lookup');
+ Hook::register('addon_settings', __FILE__, 'birdavatar_addon_settings');
+ Hook::register('addon_settings_post', __FILE__, 'birdavatar_addon_settings_post');
+
+ Logger::info('registered birdavatar');
+}
+
+/**
+ * Bird avatar user settings page
+ */
+function birdavatar_addon_settings(array &$data)
+{
+ if (!DI::userSession()->getLocalUserId()) {
+ return;
+ }
+
+ $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/birdavatar/');
+ $html = Renderer::replaceMacros($t, [
+ '$uncache' => time(),
+ '$uid' => DI::userSession()->getLocalUserId(),
+ '$setrandomize' => DI::l10n()->t('Set default profile avatar or randomize the bird.'),
+ ]);
+
+ $data = [
+ 'addon' => 'birdavar',
+ 'title' => DI::l10n()->t('Bird Avatar Settings'),
+ 'html' => $html,
+ 'submit' => [
+ 'birdavatar-usebird' => DI::l10n()->t('Use Bird as Avatar'),
+ 'birdavatar-morebird' => DI::l10n()->t('More Random Bird!'),
+ 'birdavatar-emailbird' => DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'birdavatar', 'seed', false) ? DI::l10n()->t('Reset to email Bird') : null,
+ ],
+ ];
+}
+
+/**
+ * Bird avatar user settings POST handle
+ */
+function birdavatar_addon_settings_post(&$s)
+{
+ if (!DI::userSession()->getLocalUserId()) {
+ return;
+ }
+
+ if (!empty($_POST['birdavatar-usebird'])) {
+ $url = DI::baseUrl() . '/birdavatar/' . DI::userSession()->getLocalUserId() . '?ts=' . time();
+
+ $self = DBA::selectFirst('contact', ['id'], ['uid' => DI::userSession()->getLocalUserId(), 'self' => true]);
+ if (!DBA::isResult($self)) {
+ DI::sysmsg()->addNotice(DI::l10n()->t("The bird has not found itself."));
+ return;
+ }
+
+ Photo::importProfilePhoto($url, DI::userSession()->getLocalUserId(), $self['id']);
+
+ $condition = ['uid' => DI::userSession()->getLocalUserId(), 'contact-id' => $self['id']];
+ $photo = DBA::selectFirst('photo', ['resource-id'], $condition);
+ if (!DBA::isResult($photo)) {
+ DI::sysmsg()->addNotice(DI::l10n()->t('There was an error, the bird flew away.'));
+ return;
+ }
+
+ DBA::update('photo', ['profile' => false], ['profile' => true, 'uid' => DI::userSession()->getLocalUserId()]);
+
+ $fields = ['profile' => true, 'album' => DI::l10n()->t('Profile Photos'), 'contact-id' => 0];
+ DBA::update('photo', $fields, ['uid' => DI::userSession()->getLocalUserId(), 'resource-id' => $photo['resource-id']]);
+
+ Photo::importProfilePhoto($url, DI::userSession()->getLocalUserId(), $self['id']);
+
+ Contact::updateSelfFromUserID(DI::userSession()->getLocalUserId(), true);
+
+ // Update global directory in background
+ Profile::publishUpdate(DI::userSession()->getLocalUserId());
+
+ DI::sysmsg()->addInfo(DI::l10n()->t('Meow!'));
+ return;
+ }
+
+ if (!empty($_POST['birdavatar-morebird'])) {
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'birdavatar', 'seed', time());
+ }
+
+ if (!empty($_POST['birdavatar-emailbird'])) {
+ DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'birdavatar', 'seed');
+ }
+}
+
+/**
+ * Returns the URL to the bird avatar
+ *
+ * @param &$b array
+ */
+function birdavatar_lookup(array &$b)
+{
+ $user = DBA::selectFirst('user', ['uid'], ['email' => $b['email']]);
+ if (DBA::isResult($user)) {
+ $url = DI::baseUrl() . '/birdavatar/' . $user['uid'];
+ } else {
+ $url = DI::baseUrl() . '/birdavatar/' . md5(trim(strtolower($b['email'])));
+ }
+
+ switch ($b['size']) {
+ case 300: $url .= "/4"; break;
+ case 80: $url .= "/5"; break;
+ case 48: $url .= "/6"; break;
+ }
+
+ $b['url'] = $url;
+ $b['success'] = true;
+}
+
+/**
+ * This is a statement rather than an actual function definition. The simple
+ * existence of this method is checked to figure out if the addon offers a
+ * module.
+ */
+function birdavatar_module() {}
+
+/**
+ * Returns image for user id
+ *
+ * @throws NotFoundException
+ *
+ */
+function birdavatar_content()
+{
+ if (DI::args()->getArgc() < 2 || DI::args()->getArgc() > 3) {
+ throw new NotFoundException(); // this should be catched on index and show default "not found" page.
+ }
+
+ if (is_numeric(DI::args()->getArgv()[1])) {
+ $uid = intval(DI::args()->getArgv()[1]);
+ $condition = ['uid' => $uid,
+ 'account_expired' => false, 'account_removed' => false];
+ $user = DBA::selectFirst('user', ['email'], $condition);
+
+ if ($user === false) {
+ throw new NotFoundException();
+ }
+
+ $seed = DI::pConfig()->get($uid, "birdavatar", "seed", md5(trim(strtolower($user['email']))));
+ } elseif (!empty(DI::args()->getArgv()[1])) {
+ $seed = DI::args()->getArgv()[1];
+ } else {
+ throw new NotFoundException();
+ }
+
+ $size = 0;
+ if (DI::args()->getArgc() == 3) {
+ $size = intval(DI::args()->getArgv()[2]);
+ }
+
+ // start generation
+ ob_start();
+
+ // render the picture:
+ build_bird($seed, $size);
+
+ ob_end_flush();
+
+ exit();
+}
+
+/**
+ * ====================
+ * BIRD-AVATAR-GENERATOR
+ * ====================
+ *
+ * @authors: Andreas Gohr, David Revoy
+ *
+ * This PHP is licensed under the short and simple permissive:
+ * [MIT License](https://en.wikipedia.org/wiki/MIT_License)
+ *
+ **/
+
+function build_bird($seed = '', $size = 0)
+{
+ // init random seed
+ if ($seed) {
+ srand(hexdec(substr(md5($seed), 0, 6)));
+ }
+
+ // throw the dice for body parts
+ $parts = [
+ 'tail' => rand(1,9),
+ 'hoop' => rand(1,10),
+ 'body' => rand(1,9),
+ 'wing' => rand(1,9),
+ 'eyes' => rand(1,9),
+ 'bec' => rand(1,9),
+ 'accessorie' => rand(1,20)
+ ];
+
+ // create backgound
+ $bird = @imagecreatetruecolor(BIRDAVATAR_SIZE, BIRDAVATAR_SIZE)
+ or die("GD image create failed");
+ $white = imagecolorallocate($bird, 255, 255, 255);
+ imagefill($bird, 0, 0, $white);
+
+ // add parts
+ foreach ($parts as $part => $num) {
+ $file = dirname(__FILE__) . '/avatars/' . $part . '_' . $num . '.png';
+
+ $im = @imagecreatefrompng($file);
+ if (!$im) {
+ die('Failed to load ' . $file);
+ }
+ imageSaveAlpha($im, true);
+ imagecopy($bird, $im, 0, 0, 0, 0, BIRDAVATAR_SIZE, BIRDAVATAR_SIZE);
+ imagedestroy($im);
+ }
+
+ // scale image
+ if ($size > 3 && $size < 7) {
+ switch ($size) {
+ case 4:
+ $size = 300;
+ break;
+ case 5:
+ $size = 80;
+ break;
+ case 6:
+ $size = 48;
+ break;
+ }
+
+ $dest = imagecreatetruecolor($size, $size) or die("GD image create failed");
+ imagealphablending($dest, false);
+ imagesavealpha($dest, true);
+ imagecopyresampled($dest, $bird, 0, 0, 0, 0, $size, $size, BIRDAVATAR_SIZE, BIRDAVATAR_SIZE);
+ imagedestroy($bird);
+ $bird = $dest;
+ }
+
+ // restore random seed
+ if ($seed) {
+ srand();
+ }
+
+ header('Pragma: public');
+ header('Cache-Control: max-age=86400');
+ header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 86400));
+ header('Content-Type: image/jpg');
+ imagejpeg($bird, null, 90);
+ imagedestroy($bird);
+}
diff --git a/birdavatar/lang/C/messages.po b/birdavatar/lang/C/messages.po
new file mode 100644
index 00000000..0d90e08a
--- /dev/null
+++ b/birdavatar/lang/C/messages.po
@@ -0,0 +1,54 @@
+# ADDON birdavatar
+# Copyright (C)
+# This file is distributed under the same license as the Friendica birdavatar addon package.
+#
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-24 08:50-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: birdavatar.php:47
+msgid "Set default profile avatar or randomize the bird."
+msgstr ""
+
+#: birdavatar.php:52
+msgid "Bird Avatar Settings"
+msgstr ""
+
+#: birdavatar.php:55
+msgid "Use Bird as Avatar"
+msgstr ""
+
+#: birdavatar.php:56
+msgid "More Random Bird!"
+msgstr ""
+
+#: birdavatar.php:57
+msgid "Reset to email Bird"
+msgstr ""
+
+#: birdavatar.php:76
+msgid "The bird has not found itself."
+msgstr ""
+
+#: birdavatar.php:85
+msgid "There was an error, the bird flew away."
+msgstr ""
+
+#: birdavatar.php:91
+msgid "Profile Photos"
+msgstr ""
+
+#: birdavatar.php:101
+msgid "Meow!"
+msgstr ""
diff --git a/birdavatar/templates/settings.tpl b/birdavatar/templates/settings.tpl
new file mode 100644
index 00000000..13230bd1
--- /dev/null
+++ b/birdavatar/templates/settings.tpl
@@ -0,0 +1,2 @@
+
{{$setrandomize}}
+
diff --git a/blackout/blackout.php b/blackout/blackout.php
index 72c2f62c..55fb8d32 100644
--- a/blackout/blackout.php
+++ b/blackout/blackout.php
@@ -44,78 +44,77 @@
* THE SOFTWARE.
*/
-use Friendica\Core\Config;
+use Friendica\App;
use Friendica\Core\Hook;
-use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Core\System;
+use Friendica\DI;
function blackout_install() {
Hook::register('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
}
-function blackout_uninstall() {
- Hook::unregister('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
-}
-function blackout_redirect ($a, $b) {
+function blackout_redirect ($b)
+{
// if we have a logged in user, don't throw her out
- if (local_user()) {
+ if (DI::userSession()->getLocalUserId()) {
return true;
}
// else...
- $mystart = Config::get('blackout','begindate');
- $myend = Config::get('blackout','enddate');
- $myurl = Config::get('blackout','url');
+ $mystart = DI::config()->get('blackout','begindate');
+ $myend = DI::config()->get('blackout','enddate');
+ $myurl = DI::config()->get('blackout','url');
$now = time();
$date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart);
$date2 = DateTime::createFromFormat('Y-m-d G:i', $myend);
- if ( $date1 && $date2 ) {
+ if ($date1 && $date2) {
$date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart)->format('U');
$date2 = DateTime::createFromFormat('Y-m-d G:i', $myend)->format('U');
} else {
- $date1 = 0;
- $date2 = 0;
+ $date1 = 0;
+ $date2 = 0;
}
+
if (( $date1 <= $now ) && ( $now <= $date2 )) {
- Logger::log('redirecting user to blackout page');
+ Logger::notice('redirecting user to blackout page');
System::externalRedirect($myurl);
}
}
-function blackout_addon_admin(&$a, &$o) {
- $mystart = Config::get('blackout','begindate');
- if (! is_string($mystart)) { $mystart = "YYYY-MM-DD hh:mm"; }
- $myend = Config::get('blackout','enddate');
- if (! is_string($myend)) { $myend = "YYYY-MM-DD hh:mm"; }
- $myurl = Config::get('blackout','url');
- if (! is_string($myurl)) { $myurl = "https://www.example.com"; }
- $t = Renderer::getMarkupTemplate( "admin.tpl", "addon/blackout/" );
+function blackout_addon_admin(string &$o)
+{
+ $mystart = DI::config()->get('blackout','begindate');
+ if (! is_string($mystart)) { $mystart = 'YYYY-MM-DD hh:mm'; }
+ $myend = DI::config()->get('blackout','enddate');
+ if (! is_string($myend)) { $myend = 'YYYY-MM-DD hh:mm'; }
+ $myurl = DI::config()->get('blackout','url');
+ if (! is_string($myurl)) { $myurl = 'https://www.example.com'; }
+ $t = Renderer::getMarkupTemplate( 'admin.tpl', 'addon/blackout/' );
$date1 = DateTime::createFromFormat('Y-m-d G:i', $mystart);
$date2 = DateTime::createFromFormat('Y-m-d G:i', $myend);
// a note for the admin
- $adminnote = "";
+ $adminnote = '';
if ($date2 < $date1) {
- $adminnote = L10n::t("The end-date is prior to the start-date of the blackout, you should fix this");
+ $adminnote = DI::l10n()->t("The end-date is prior to the start-date of the blackout, you should fix this.");
} else {
- $adminnote = L10n::t("Please double check that the current settings for the blackout. Begin will be %s and it will end %s.", $mystart, $myend);
+ $adminnote = DI::l10n()->t("Please double check the current settings for the blackout. It will begin on %s and end on %s.", $mystart, $myend);
}
$o = Renderer::replaceMacros($t, [
- '$submit' => L10n::t('Save Settings'),
- '$rurl' => ["rurl", L10n::t("Redirect URL"), $myurl, L10n::t("all your visitors from the web will be redirected to this URL"), "", "", "url"],
- '$startdate' => ["startdate", L10n::t("Begin of the Blackout"), $mystart, L10n::t("Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.")],
- '$enddate' => ["enddate", L10n::t("End of the Blackout"), $myend, ""],
+ '$submit' => DI::l10n()->t('Save Settings'),
+ '$rurl' => ['rurl', DI::l10n()->t("Redirect URL"), $myurl, DI::l10n()->t("All your visitors from the web will be redirected to this URL."), '', '', 'url'],
+ '$startdate' => ['startdate', DI::l10n()->t("Begin of the Blackout"), $mystart, DI::l10n()->t("Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.")],
+ '$enddate' => ['enddate', DI::l10n()->t("End of the Blackout"), $myend, ''],
'$adminnote' => $adminnote,
- '$aboutredirect' => L10n::t("Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can't login again after logging out should the blackout is still in place."),
+ '$aboutredirect' => DI::l10n()->t("Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can't login again after logging out while the blackout is still in place."),
]);
}
-function blackout_addon_admin_post (&$a) {
- $begindate = trim($_POST['startdate']);
- $enddate = trim($_POST['enddate']);
- $url = trim($_POST['rurl']);
- Config::set('blackout','begindate',$begindate);
- Config::set('blackout','enddate',$enddate);
- Config::set('blackout','url',$url);
+
+function blackout_addon_admin_post ()
+{
+ DI::config()->set('blackout', 'begindate', trim($_POST['startdate']));
+ DI::config()->set('blackout', 'enddate', trim($_POST['enddate']));
+ DI::config()->set('blackout', 'url', trim($_POST['rurl']));
}
diff --git a/blackout/lang/C/messages.po b/blackout/lang/C/messages.po
index abdd3fd9..6ae15759 100644
--- a/blackout/lang/C/messages.po
+++ b/blackout/lang/C/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-03-12 09:26+0100\n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,48 +17,48 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: blackout.php:101
+#: blackout.php:97
msgid ""
-"The end-date is prior to the start-date of the blackout, you should fix this"
+"The end-date is prior to the start-date of the blackout, you should fix this."
msgstr ""
-#: blackout.php:103
+#: blackout.php:99
#, php-format
msgid ""
-"Please double check that the current settings for the blackout. Begin will "
-"be %s and it will end %s."
+"Please double check the current settings for the blackout. It will begin on "
+"%s and end on %s."
msgstr ""
-#: blackout.php:106
+#: blackout.php:102
msgid "Save Settings"
msgstr ""
-#: blackout.php:107
+#: blackout.php:103
msgid "Redirect URL"
msgstr ""
-#: blackout.php:107
-msgid "all your visitors from the web will be redirected to this URL"
+#: blackout.php:103
+msgid "All your visitors from the web will be redirected to this URL."
msgstr ""
-#: blackout.php:108
+#: blackout.php:104
msgid "Begin of the Blackout"
msgstr ""
-#: blackout.php:108
+#: blackout.php:104
msgid ""
"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, "
"DD day, hh hour and mm minute."
msgstr ""
-#: blackout.php:109
+#: blackout.php:105
msgid "End of the Blackout"
msgstr ""
-#: blackout.php:111
+#: blackout.php:107
msgid ""
"Note: The redirect will be active from the moment you press "
"the submit button. Users currently logged in will not be "
-"thrown out but can't login again after logging out should the blackout is "
+"thrown out but can't login again after logging out while the blackout is "
"still in place."
msgstr ""
diff --git a/blackout/lang/ar/messages.po b/blackout/lang/ar/messages.po
new file mode 100644
index 00000000..5014fcb2
--- /dev/null
+++ b/blackout/lang/ar/messages.po
@@ -0,0 +1,67 @@
+# ADDON blackout
+# Copyright (C)
+# This file is distributed under the same license as the Friendica blackout addon package.
+#
+#
+# Translators:
+# Farida Khalaf , 2021
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-10-26 18:49+0000\n"
+"Last-Translator: abidin toumi \n"
+"Language-Team: Arabic (http://www.transifex.com/Friendica/friendica/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"
+
+#: blackout.php:97
+msgid ""
+"The end-date is prior to the start-date of the blackout, you should fix "
+"this."
+msgstr "تاريخ الانتهاء يسبق تاريخ بدء التعتيم ، يجب إصلاح هذا."
+
+#: blackout.php:99
+#, php-format
+msgid ""
+"Please double check the current settings for the blackout. It will begin on "
+"%s and end on %s."
+msgstr "يرجى التحقق مرة أخرى من الإعدادات الحالية لحالة التعتيم. بدأ في 1 ٪ 1 %s وانتهاء في2٪2 %s."
+
+#: blackout.php:102
+msgid "Save Settings"
+msgstr "احفظ الإعدادات"
+
+#: blackout.php:103
+msgid "Redirect URL"
+msgstr "أعد توجيه الرابط"
+
+#: blackout.php:103
+msgid "All your visitors from the web will be redirected to this URL."
+msgstr "سيعاد توجيه جميع الزوار إلى هذا الرابط."
+
+#: blackout.php:104
+msgid "Begin of the Blackout"
+msgstr "بدء التعتيم"
+
+#: blackout.php:104
+msgid ""
+"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, "
+"DD day, hh hour and mm minute."
+msgstr "الصيغة هي: YYYY-MM-DD hh:mm؛\nYYYY السنة، MM الشهر، DD اليوم، hh الساعة، mm الدقيقة."
+
+#: blackout.php:105
+msgid "End of the Blackout"
+msgstr "نهاية التعتيم"
+
+#: blackout.php:107
+msgid ""
+"Note: The redirect will be active from the moment you press"
+" the submit button. Users currently logged in will not be "
+"thrown out but can't login again after logging out while the blackout is "
+"still in place."
+msgstr "ملاحظة: إعادة التوجيه ستنشط إبتداءً من لحظة ضغط زر الإرسال. لن يُطرد المستخدمون الوالجون حاليًا ولكن إذا خروجوا لن يمكنهم الولوج أثناء التعتيم."
diff --git a/blackout/lang/ar/strings.php b/blackout/lang/ar/strings.php
new file mode 100644
index 00000000..86eb2aef
--- /dev/null
+++ b/blackout/lang/ar/strings.php
@@ -0,0 +1,17 @@
+=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; }
+}}
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'تاريخ الانتهاء يسبق تاريخ بدء التعتيم ، يجب إصلاح هذا.';
+$a->strings['Please double check the current settings for the blackout. It will begin on %s and end on %s.'] = 'يرجى التحقق مرة أخرى من الإعدادات الحالية لحالة التعتيم. بدأ في 1 ٪ 1 %s وانتهاء في2٪2 %s.';
+$a->strings['Save Settings'] = 'احفظ الإعدادات';
+$a->strings['Redirect URL'] = 'أعد توجيه الرابط';
+$a->strings['All your visitors from the web will be redirected to this URL.'] = 'سيعاد توجيه جميع الزوار إلى هذا الرابط.';
+$a->strings['Begin of the Blackout'] = 'بدء التعتيم';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = 'الصيغة هي: YYYY-MM-DD hh:mm؛
+YYYY السنة، MM الشهر، DD اليوم، hh الساعة، mm الدقيقة.';
+$a->strings['End of the Blackout'] = 'نهاية التعتيم';
+$a->strings['Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can\'t login again after logging out while the blackout is still in place.'] = 'ملاحظة: إعادة التوجيه ستنشط إبتداءً من لحظة ضغط زر الإرسال. لن يُطرد المستخدمون الوالجون حاليًا ولكن إذا خروجوا لن يمكنهم الولوج أثناء التعتيم.';
diff --git a/blackout/lang/ca/strings.php b/blackout/lang/ca/strings.php
index 20c8c1da..df85e842 100644
--- a/blackout/lang/ca/strings.php
+++ b/blackout/lang/ca/strings.php
@@ -3,15 +3,14 @@
if(! function_exists("string_plural_select_ca")) {
function string_plural_select_ca($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this"] = "La data de finalització és anterior a la data d'inici de l'apagada, hauríeu d'arreglar-ho";
-$a->strings["Please double check that the current settings for the blackout. Begin will be %s and it will end %s."] = "Verifiqueu si la configuració actual per a l'apagat. Començarà serà %s i s’acabarà %s.";
-$a->strings["Save Settings"] = "Desa la configuració";
-$a->strings["Redirect URL"] = "Redirigir URL";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "tots els visitants del web seran redirigits a aquest tema URL";
-$a->strings["Begin of the Blackout"] = "Inici de l’apagada";
-$a->strings["Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute."] = "El format és YYYY-MM-DD hh:mm; YYYY year, MM mes. DD day, hhhora i mm minut.";
-$a->strings["End of the Blackout"] = "Fi de l’apagada";
-$a->strings["Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can't login again after logging out should the blackout is still in place."] = "Nota: La redirecció estarà activa des del moment en què premeu el botó d'enviament. Els usuaris actualment connectats ho faran no es llençarà però no es pot tornar a iniciar la sessió un cop s'hagi desactivat l'apagada.";
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this'] = 'La data de finalització és anterior a la data d\'inici de l\'apagada, hauríeu d\'arreglar-ho';
+$a->strings['Please double check that the current settings for the blackout. Begin will be %s and it will end %s.'] = 'Verifiqueu si la configuració actual per a l\'apagat. Començarà serà %s i s’acabarà %s.';
+$a->strings['Save Settings'] = 'Desa la configuració';
+$a->strings['Redirect URL'] = 'Redirigir URL';
+$a->strings['all your visitors from the web will be redirected to this URL'] = 'tots els visitants del web seran redirigits a aquest tema URL';
+$a->strings['Begin of the Blackout'] = 'Inici de l’apagada';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = 'El format és YYYY-MM-DD hh:mm; YYYY year, MM mes. DD day, hhhora i mm minut.';
+$a->strings['End of the Blackout'] = 'Fi de l’apagada';
+$a->strings['Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can\'t login again after logging out should the blackout is still in place.'] = 'Nota: La redirecció estarà activa des del moment en què premeu el botó d\'enviament. Els usuaris actualment connectats ho faran no es llençarà però no es pot tornar a iniciar la sessió un cop s\'hagi desactivat l\'apagada.';
diff --git a/blackout/lang/cs/strings.php b/blackout/lang/cs/strings.php
index c38d7065..1736eafe 100644
--- a/blackout/lang/cs/strings.php
+++ b/blackout/lang/cs/strings.php
@@ -3,15 +3,14 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
$n = intval($n);
- return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
+ if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; }
}}
-;
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this"] = "Datum konce odstávky je před datem zahájení odstávky, prosím opravte to";
-$a->strings["Please double check that the current settings for the blackout. Begin will be %s and it will end %s."] = "Prosím zkontrolujte svá aktuální nastavení pro odstávku. Začne %s a skončí %s.";
-$a->strings["Save Settings"] = "Uložit nastavení";
-$a->strings["Redirect URL"] = "URL přesměrování";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "všichni vaši návštěvníci z webu budou přesměrování na tuto URL adresu";
-$a->strings["Begin of the Blackout"] = "Zahájení odstávky";
-$a->strings["Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute."] = "Formát je RRRR-MM-DD hh:mm; RRRR rok, MM měsíc, DD den, hh hodina a mm minuta.";
-$a->strings["End of the Blackout"] = "Konec odstávky";
-$a->strings["Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can't login again after logging out should the blackout is still in place."] = "Poznámka: Přesměrování bude aktivní od chvíle, kdy stisknete tlačítko pro odeslání. Aktuálně přihlášení uživatelé nebudou odhlášeni, ale po odhlášení se po dobu trvání odstávky nebudou moci znovu přihlásit.";
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this'] = 'Datum konce odstávky je před datem zahájení odstávky, prosím opravte to';
+$a->strings['Please double check that the current settings for the blackout. Begin will be %s and it will end %s.'] = 'Prosím zkontrolujte svá aktuální nastavení pro odstávku. Začne %s a skončí %s.';
+$a->strings['Save Settings'] = 'Uložit nastavení';
+$a->strings['Redirect URL'] = 'URL přesměrování';
+$a->strings['all your visitors from the web will be redirected to this URL'] = 'všichni vaši návštěvníci z webu budou přesměrování na tuto URL adresu';
+$a->strings['Begin of the Blackout'] = 'Zahájení odstávky';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = 'Formát je RRRR-MM-DD hh:mm; RRRR rok, MM měsíc, DD den, hh hodina a mm minuta.';
+$a->strings['End of the Blackout'] = 'Konec odstávky';
+$a->strings['Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can\'t login again after logging out should the blackout is still in place.'] = 'Poznámka: Přesměrování bude aktivní od chvíle, kdy stisknete tlačítko pro odeslání. Aktuálně přihlášení uživatelé nebudou odhlášeni, ale po odhlášení se po dobu trvání odstávky nebudou moci znovu přihlásit.';
diff --git a/blackout/lang/da-dk/messages.po b/blackout/lang/da-dk/messages.po
new file mode 100644
index 00000000..8e7993e2
--- /dev/null
+++ b/blackout/lang/da-dk/messages.po
@@ -0,0 +1,66 @@
+# ADDON blackout
+# Copyright (C)
+# This file is distributed under the same license as the Friendica blackout addon package.
+#
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2014-06-22 11:19+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Danish (Denmark) (http://www.transifex.com/Friendica/friendica/language/da_DK/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: da_DK\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: blackout.php:97
+msgid ""
+"The end-date is prior to the start-date of the blackout, you should fix "
+"this."
+msgstr ""
+
+#: blackout.php:99
+#, php-format
+msgid ""
+"Please double check the current settings for the blackout. It will begin on "
+"%s and end on %s."
+msgstr ""
+
+#: blackout.php:102
+msgid "Save Settings"
+msgstr ""
+
+#: blackout.php:103
+msgid "Redirect URL"
+msgstr ""
+
+#: blackout.php:103
+msgid "All your visitors from the web will be redirected to this URL."
+msgstr ""
+
+#: blackout.php:104
+msgid "Begin of the Blackout"
+msgstr ""
+
+#: blackout.php:104
+msgid ""
+"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, "
+"DD day, hh hour and mm minute."
+msgstr ""
+
+#: blackout.php:105
+msgid "End of the Blackout"
+msgstr ""
+
+#: blackout.php:107
+msgid ""
+"Note: The redirect will be active from the moment you press"
+" the submit button. Users currently logged in will not be "
+"thrown out but can't login again after logging out while the blackout is "
+"still in place."
+msgstr ""
diff --git a/blackout/lang/da-dk/strings.php b/blackout/lang/da-dk/strings.php
new file mode 100644
index 00000000..09554750
--- /dev/null
+++ b/blackout/lang/da-dk/strings.php
@@ -0,0 +1,7 @@
+, 2021
# Tobias Diekershoff , 2014
-# Tobias Diekershoff , 2019
+# Tobias Diekershoff , 2019,2021
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-03-12 09:26+0100\n"
-"PO-Revision-Date: 2019-03-13 05:20+0000\n"
-"Last-Translator: Tobias Diekershoff \n"
-"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2014-06-22 11:19+0000\n"
+"Last-Translator: Till Mohr , 2021\n"
+"Language-Team: German (http://app.transifex.com/Friendica/friendica/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"
-#: blackout.php:101
+#: blackout.php:97
msgid ""
-"The end-date is prior to the start-date of the blackout, you should fix this"
-msgstr "Das End-Datum des Blackouts liegt vor dem Start-Datum. Du solltest das anpassen."
+"The end-date is prior to the start-date of the blackout, you should fix "
+"this."
+msgstr "Das Enddatum liegt vor dem Startdatum des Blackouts, du solltest dies korrigieren."
-#: blackout.php:103
+#: blackout.php:99
#, php-format
msgid ""
-"Please double check that the current settings for the blackout. Begin will "
-"be %s and it will end %s."
-msgstr "Bitte überprüfe die aktuellen Einstellungen für den Blackout. Start-Zeitpunkt ist %s und das Ende ist %s."
+"Please double check the current settings for the blackout. It will begin on "
+"%s and end on %s."
+msgstr "Bitte überprüfe die aktuellen Einstellungen für den Blackout. Start-Zeitpunkt ist %s, und das Ende ist %s."
-#: blackout.php:106
+#: blackout.php:102
msgid "Save Settings"
msgstr "Einstellungen speichern"
-#: blackout.php:107
+#: blackout.php:103
msgid "Redirect URL"
msgstr "Umleitungs-URL"
-#: blackout.php:107
-msgid "all your visitors from the web will be redirected to this URL"
+#: blackout.php:103
+msgid "All your visitors from the web will be redirected to this URL."
msgstr "Alle Besucher der Webseite werden zu dieser URL umgeleitet"
-#: blackout.php:108
+#: blackout.php:104
msgid "Begin of the Blackout"
msgstr "Beginn des Blackouts"
-#: blackout.php:108
+#: blackout.php:104
msgid ""
"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, "
"DD day, hh hour and mm minute."
msgstr "Das Format ist YYYY-MM-DD hh:mm: YYYY das Jahr, MM der Monat, DD der Tag sowie hh Stunden und mm Minuten."
-#: blackout.php:109
+#: blackout.php:105
msgid "End of the Blackout"
msgstr "Ende des Blackouts"
-#: blackout.php:111
+#: blackout.php:107
msgid ""
"Note: The redirect will be active from the moment you press"
" the submit button. Users currently logged in will not be "
-"thrown out but can't login again after logging out should the blackout is "
+"thrown out but can't login again after logging out while the blackout is "
"still in place."
-msgstr "Hinweis: Die Umleitung ist von dem Moment aktiv, wenn du den \"Einstellungen speichern\" Button drückst. Derzeit angemeldete Nutzer werden nicht ausgeworfen werden, können sich aber nicht wieder anmelden, wenn sie sich während des Blackouts abmelden."
+msgstr "Hinweis: Die Umleitung ist von dem Moment an aktiv, wenn du den \"Einstellungen speichern\"-Button drückst. Derzeit angemeldete Nutzer werden nicht ausgeschlossen, können sich aber, nachdem sie sich während des Blackouts ausgeloggt haben, nicht mehr anmelden."
diff --git a/blackout/lang/de/strings.php b/blackout/lang/de/strings.php
index 41ff52c2..7b689a5e 100644
--- a/blackout/lang/de/strings.php
+++ b/blackout/lang/de/strings.php
@@ -3,15 +3,14 @@
if(! function_exists("string_plural_select_de")) {
function string_plural_select_de($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this"] = "Das End-Datum des Blackouts liegt vor dem Start-Datum. Du solltest das anpassen.";
-$a->strings["Please double check that the current settings for the blackout. Begin will be %s and it will end %s."] = "Bitte überprüfe die aktuellen Einstellungen für den Blackout. Start-Zeitpunkt ist %s und das Ende ist %s.";
-$a->strings["Save Settings"] = "Einstellungen speichern";
-$a->strings["Redirect URL"] = "Umleitungs-URL";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "Alle Besucher der Webseite werden zu dieser URL umgeleitet";
-$a->strings["Begin of the Blackout"] = "Beginn des Blackouts";
-$a->strings["Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute."] = "Das Format ist YYYY-MM-DD hh:mm: YYYY das Jahr, MM der Monat, DD der Tag sowie hh Stunden und mm Minuten.";
-$a->strings["End of the Blackout"] = "Ende des Blackouts";
-$a->strings["Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can't login again after logging out should the blackout is still in place."] = "Hinweis: Die Umleitung ist von dem Moment aktiv, wenn du den \"Einstellungen speichern\" Button drückst. Derzeit angemeldete Nutzer werden nicht ausgeworfen werden, können sich aber nicht wieder anmelden, wenn sie sich während des Blackouts abmelden.";
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'Das Enddatum liegt vor dem Startdatum des Blackouts, du solltest dies korrigieren.';
+$a->strings['Please double check the current settings for the blackout. It will begin on %s and end on %s.'] = 'Bitte überprüfe die aktuellen Einstellungen für den Blackout. Start-Zeitpunkt ist %s, und das Ende ist %s.';
+$a->strings['Save Settings'] = 'Einstellungen speichern';
+$a->strings['Redirect URL'] = 'Umleitungs-URL';
+$a->strings['All your visitors from the web will be redirected to this URL.'] = 'Alle Besucher der Webseite werden zu dieser URL umgeleitet';
+$a->strings['Begin of the Blackout'] = 'Beginn des Blackouts';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = 'Das Format ist YYYY-MM-DD hh:mm: YYYY das Jahr, MM der Monat, DD der Tag sowie hh Stunden und mm Minuten.';
+$a->strings['End of the Blackout'] = 'Ende des Blackouts';
+$a->strings['Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can\'t login again after logging out while the blackout is still in place.'] = 'Hinweis: Die Umleitung ist von dem Moment an aktiv, wenn du den "Einstellungen speichern"-Button drückst. Derzeit angemeldete Nutzer werden nicht ausgeschlossen, können sich aber, nachdem sie sich während des Blackouts ausgeloggt haben, nicht mehr anmelden.';
diff --git a/blackout/lang/en-gb/strings.php b/blackout/lang/en-gb/strings.php
index 18b61594..af276d01 100644
--- a/blackout/lang/en-gb/strings.php
+++ b/blackout/lang/en-gb/strings.php
@@ -3,15 +3,14 @@
if(! function_exists("string_plural_select_en_gb")) {
function string_plural_select_en_gb($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this"] = "The end date is prior to the start date of the blackout, you should fix this";
-$a->strings["Please double check that the current settings for the blackout. Begin will be %s and it will end %s."] = "Please double check that the current settings for the blackout. Begin will be %s and it will end %s.";
-$a->strings["Save Settings"] = "Save Settings";
-$a->strings["Redirect URL"] = "Redirect URL";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "Visitors from the web will be redirected to this URL";
-$a->strings["Begin of the Blackout"] = "Blackout begins";
-$a->strings["Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute."] = "Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.";
-$a->strings["End of the Blackout"] = "Blackout ends";
-$a->strings["Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can't login again after logging out should the blackout is still in place."] = "Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be affected but can't login again after logging out should the blackout is still in place.";
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this'] = 'The end date is prior to the start date of the blackout, you should fix this';
+$a->strings['Please double check that the current settings for the blackout. Begin will be %s and it will end %s.'] = 'Please double check that the current settings for the blackout. Begin will be %s and it will end %s.';
+$a->strings['Save Settings'] = 'Save Settings';
+$a->strings['Redirect URL'] = 'Redirect URL';
+$a->strings['all your visitors from the web will be redirected to this URL'] = 'Visitors from the web will be redirected to this URL';
+$a->strings['Begin of the Blackout'] = 'Blackout begins';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = 'Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.';
+$a->strings['End of the Blackout'] = 'Blackout ends';
+$a->strings['Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can\'t login again after logging out should the blackout is still in place.'] = 'Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be affected but can\'t login again after logging out should the blackout is still in place.';
diff --git a/blackout/lang/en-us/strings.php b/blackout/lang/en-us/strings.php
index 705163ab..0d7fb430 100644
--- a/blackout/lang/en-us/strings.php
+++ b/blackout/lang/en-us/strings.php
@@ -2,13 +2,13 @@
if(! function_exists("string_plural_select_en_us")) {
function string_plural_select_en_us($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Save Settings"] = "Save Settings";
-$a->strings["Redirect URL"] = "Redirect URL";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "All your visitors from the web will be redirected to this URL.";
-$a->strings["Begin of the Blackout"] = "Start time of the Blackout";
-$a->strings["format is YYYY year, MM month, DD day, hh hour and mm minute"] = "Format is YYYY year, MM month, DD day, hh hour and mm minute";
-$a->strings["End of the Blackout"] = "End time of the Blackout";
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "The end-date is prior to the start-date of the blackout, you should fix this.";
+$a->strings['Save Settings'] = 'Save Settings';
+$a->strings['Redirect URL'] = 'Redirect URL';
+$a->strings['all your visitors from the web will be redirected to this URL'] = 'All your visitors from the web will be redirected to this URL.';
+$a->strings['Begin of the Blackout'] = 'Start time of the Blackout';
+$a->strings['format is YYYY year, MM month, DD day, hh hour and mm minute'] = 'Format is YYYY year, MM month, DD day, hh hour and mm minute';
+$a->strings['End of the Blackout'] = 'End time of the Blackout';
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'The end-date is prior to the start-date of the blackout, you should fix this.';
diff --git a/blackout/lang/es/messages.po b/blackout/lang/es/messages.po
index 0c54bd88..f7386d27 100644
--- a/blackout/lang/es/messages.po
+++ b/blackout/lang/es/messages.po
@@ -4,14 +4,15 @@
#
#
# Translators:
+# Senex Petrovic , 2021
# Tupambae.org, 2016
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-22 13:18+0200\n"
-"PO-Revision-Date: 2016-04-18 19:20+0000\n"
-"Last-Translator: Tupambae.org\n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-04-01 09:44+0000\n"
+"Last-Translator: Senex Petrovic \n"
"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,34 +20,49 @@ msgstr ""
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: blackout.php:99
-msgid "Save Settings"
-msgstr "Guardar configuración"
-
-#: blackout.php:100
-msgid "Redirect URL"
-msgstr "Redirigir URL"
-
-#: blackout.php:100
-msgid "all your visitors from the web will be redirected to this URL"
-msgstr "todos los visitantes de la web serán redirigidos a esta dirección."
-
-#: blackout.php:101
-msgid "Begin of the Blackout"
-msgstr "Inicio del apagón."
-
-#: blackout.php:101
-msgid ""
-"format is YYYY year, MM month, DD day, "
-"hh hour and mm minute"
-msgstr "formato es YYYY año, MM mes, DD día, hh hora y mm minuto"
-
-#: blackout.php:102
-msgid "End of the Blackout"
-msgstr "Fin del apagón."
-
-#: blackout.php:108
+#: blackout.php:97
msgid ""
"The end-date is prior to the start-date of the blackout, you should fix "
"this."
-msgstr "La fecha de final del apagón es antes de la fecha de inicio, deberías arreglar esto."
+msgstr "La fecha de finalización es anterior a la fecha de inicio del bloqueo, debe corregirlo."
+
+#: blackout.php:99
+#, php-format
+msgid ""
+"Please double check the current settings for the blackout. It will begin on "
+"%s and end on %s."
+msgstr "Verifique la configuración actual del bloqueo. Iniciará %s finalizará %s."
+
+#: blackout.php:102
+msgid "Save Settings"
+msgstr "Guardar configuración"
+
+#: blackout.php:103
+msgid "Redirect URL"
+msgstr "Redirigir URL"
+
+#: blackout.php:103
+msgid "All your visitors from the web will be redirected to this URL."
+msgstr "Todos sus visitantes de la web serán redirigidos a esta URL."
+
+#: blackout.php:104
+msgid "Begin of the Blackout"
+msgstr "Inicio del apagón."
+
+#: blackout.php:104
+msgid ""
+"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, "
+"DD day, hh hour and mm minute."
+msgstr "Format is YYYY-MM-DD hh:mm; YYYY año, MM mes, DD dia, hh hora y mm minuto."
+
+#: blackout.php:105
+msgid "End of the Blackout"
+msgstr "Fin del apagón."
+
+#: blackout.php:107
+msgid ""
+"Note: The redirect will be active from the moment you press"
+" the submit button. Users currently logged in will not be "
+"thrown out but can't login again after logging out while the blackout is "
+"still in place."
+msgstr "Nota: La redirección estará activa desde el momento en que presione el botón Enviar. Los usuarios que hayan iniciado sesión actualmente no serán expulsados, pero no podrán volver a iniciar sesión después de cerrar la sesión mientras el apagón continúe."
diff --git a/blackout/lang/es/strings.php b/blackout/lang/es/strings.php
index 867a8c9b..70a49694 100644
--- a/blackout/lang/es/strings.php
+++ b/blackout/lang/es/strings.php
@@ -2,13 +2,15 @@
if(! function_exists("string_plural_select_es")) {
function string_plural_select_es($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Save Settings"] = "Guardar configuración";
-$a->strings["Redirect URL"] = "Redirigir URL";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "todos los visitantes de la web serán redirigidos a esta dirección.";
-$a->strings["Begin of the Blackout"] = "Inicio del apagón.";
-$a->strings["format is YYYY year, MM month, DD day, hh hour and mm minute"] = "formato es YYYY año, MM mes, DD día, hh hora y mm minuto";
-$a->strings["End of the Blackout"] = "Fin del apagón.";
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "La fecha de final del apagón es antes de la fecha de inicio, deberías arreglar esto.";
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'La fecha de finalización es anterior a la fecha de inicio del bloqueo, debe corregirlo.';
+$a->strings['Please double check the current settings for the blackout. It will begin on %s and end on %s.'] = 'Verifique la configuración actual del bloqueo. Iniciará %s finalizará %s.';
+$a->strings['Save Settings'] = 'Guardar configuración';
+$a->strings['Redirect URL'] = 'Redirigir URL';
+$a->strings['All your visitors from the web will be redirected to this URL.'] = 'Todos sus visitantes de la web serán redirigidos a esta URL.';
+$a->strings['Begin of the Blackout'] = 'Inicio del apagón.';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = 'Format is YYYY-MM-DD hh:mm; YYYY año, MM mes, DD dia, hh hora y mm minuto.';
+$a->strings['End of the Blackout'] = 'Fin del apagón.';
+$a->strings['Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can\'t login again after logging out while the blackout is still in place.'] = 'Nota: La redirección estará activa desde el momento en que presione el botón Enviar. Los usuarios que hayan iniciado sesión actualmente no serán expulsados, pero no podrán volver a iniciar sesión después de cerrar la sesión mientras el apagón continúe.';
diff --git a/blackout/lang/fi-fi/strings.php b/blackout/lang/fi-fi/strings.php
index 898e730f..fc644baa 100644
--- a/blackout/lang/fi-fi/strings.php
+++ b/blackout/lang/fi-fi/strings.php
@@ -2,13 +2,13 @@
if(! function_exists("string_plural_select_fi_fi")) {
function string_plural_select_fi_fi($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Save Settings"] = "Tallenna asetukset";
-$a->strings["Redirect URL"] = "Uudelleenohjaus URL-osoite";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "kaikki kävijät uudelleenohjataan tähän URL-osoitteeseen";
-$a->strings["Begin of the Blackout"] = "Blackout alkaa";
-$a->strings["format is YYYY year, MM month, DD day, hh hour and mm minute"] = "formaati on VVVV vuosi, KK kuukausi, PP päivä, tt tunti ja mm minuutti";
-$a->strings["End of the Blackout"] = "Blackout loppuu";
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Blackoutin päättymispäivä on ennen alkamispäivää, korjaa tämä.";
+$a->strings['Save Settings'] = 'Tallenna asetukset';
+$a->strings['Redirect URL'] = 'Uudelleenohjaus URL-osoite';
+$a->strings['all your visitors from the web will be redirected to this URL'] = 'kaikki kävijät uudelleenohjataan tähän URL-osoitteeseen';
+$a->strings['Begin of the Blackout'] = 'Blackout alkaa';
+$a->strings['format is YYYY year, MM month, DD day, hh hour and mm minute'] = 'formaati on VVVV vuosi, KK kuukausi, PP päivä, tt tunti ja mm minuutti';
+$a->strings['End of the Blackout'] = 'Blackout loppuu';
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'Blackoutin päättymispäivä on ennen alkamispäivää, korjaa tämä.';
diff --git a/blackout/lang/fr/messages.po b/blackout/lang/fr/messages.po
index a73b4907..d373e30e 100644
--- a/blackout/lang/fr/messages.po
+++ b/blackout/lang/fr/messages.po
@@ -4,66 +4,68 @@
#
#
# Translators:
+# bob lebonche , 2021
# Damien Goutte-Gattat , 2015
# Hypolite Petovan , 2016
-# Valvin A , 2019
+# Valvin , 2019
# Vladimir Núñez , 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-03-12 09:26+0100\n"
-"PO-Revision-Date: 2019-05-27 19:12+0000\n"
-"Last-Translator: Valvin A \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2014-06-22 11:19+0000\n"
+"Last-Translator: bob lebonche , 2021\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/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"
+"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
-#: blackout.php:101
+#: blackout.php:97
msgid ""
-"The end-date is prior to the start-date of the blackout, you should fix this"
-msgstr "La date de fin est antérieure au début de l'extinction, vous devriez corriger cela."
+"The end-date is prior to the start-date of the blackout, you should fix "
+"this."
+msgstr "La date de fin est antérieure à la date de début du blackout, vous devriez changer ça."
-#: blackout.php:103
+#: blackout.php:99
#, php-format
msgid ""
-"Please double check that the current settings for the blackout. Begin will "
-"be %s and it will end %s."
-msgstr "Merci de vérifier que le paramétrage actuel pour l'extinction. Le début sera %s et se terminera %s"
+"Please double check the current settings for the blackout. It will begin on "
+"%s and end on %s."
+msgstr "S'il vous plaît, vérifiez à nouveau les réglages actuels du blackout. Il commencera à %s finira à %s."
-#: blackout.php:106
+#: blackout.php:102
msgid "Save Settings"
msgstr "Sauvegarder les paramètres"
-#: blackout.php:107
+#: blackout.php:103
msgid "Redirect URL"
msgstr "Adresse URL de redirection"
-#: blackout.php:107
-msgid "all your visitors from the web will be redirected to this URL"
-msgstr "Tous vos visiteurs venant du web seront redirigés vers cette URL."
+#: blackout.php:103
+msgid "All your visitors from the web will be redirected to this URL."
+msgstr "Tous les visiteurs venant du web seront redirigés vers cette URL."
-#: blackout.php:108
+#: blackout.php:104
msgid "Begin of the Blackout"
msgstr "Début de l'extinction"
-#: blackout.php:108
+#: blackout.php:104
msgid ""
"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, "
"DD day, hh hour and mm minute."
msgstr "Le format est YYYY-MM-DD hh:mm; YYYY année, MMmois, DD jour, hhheure et mmminute."
-#: blackout.php:109
+#: blackout.php:105
msgid "End of the Blackout"
msgstr "Fin de l'extinction"
-#: blackout.php:111
+#: blackout.php:107
msgid ""
"Note: The redirect will be active from the moment you press"
" the submit button. Users currently logged in will not be "
-"thrown out but can't login again after logging out should the blackout is "
+"thrown out but can't login again after logging out while the blackout is "
"still in place."
-msgstr "Note: La redirection sera active à partir du moment ou vous appuierez sur le bouton envoyer. Les utilisateurs identifiés ne seront pas déconnectés mais ne pourront pas se reconnecter après s'être déconnectés tant que l'extinction est en place."
+msgstr "Note: La redirection sera active à partir du moment où vous pressez le bouton d'envoi. Les utilisateurs actuellement connectés ne seront pas éjectés mais ne pourront se connecter à nouveau après s'être déconnectés, pendant que le blackout est encore en cours."
diff --git a/blackout/lang/fr/strings.php b/blackout/lang/fr/strings.php
index f60d599d..95dacb52 100644
--- a/blackout/lang/fr/strings.php
+++ b/blackout/lang/fr/strings.php
@@ -3,15 +3,14 @@
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
$n = intval($n);
- return ($n > 1);;
+ if (($n == 0 || $n == 1)) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; }
}}
-;
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this"] = "La date de fin est antérieure au début de l'extinction, vous devriez corriger cela.";
-$a->strings["Please double check that the current settings for the blackout. Begin will be %s and it will end %s."] = "Merci de vérifier que le paramétrage actuel pour l'extinction. Le début sera %s et se terminera %s";
-$a->strings["Save Settings"] = "Sauvegarder les paramètres";
-$a->strings["Redirect URL"] = "Adresse URL de redirection";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "Tous vos visiteurs venant du web seront redirigés vers cette URL.";
-$a->strings["Begin of the Blackout"] = "Début de l'extinction";
-$a->strings["Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute."] = "Le format est YYYY-MM-DD hh:mm; YYYY année, MMmois, DD jour, hhheure et mmminute.";
-$a->strings["End of the Blackout"] = "Fin de l'extinction";
-$a->strings["Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can't login again after logging out should the blackout is still in place."] = "Note: La redirection sera active à partir du moment ou vous appuierez sur le bouton envoyer. Les utilisateurs identifiés ne seront pas déconnectés mais ne pourront pas se reconnecter après s'être déconnectés tant que l'extinction est en place.";
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'La date de fin est antérieure à la date de début du blackout, vous devriez changer ça.';
+$a->strings['Please double check the current settings for the blackout. It will begin on %s and end on %s.'] = 'S\'il vous plaît, vérifiez à nouveau les réglages actuels du blackout. Il commencera à %s finira à %s.';
+$a->strings['Save Settings'] = 'Sauvegarder les paramètres';
+$a->strings['Redirect URL'] = 'Adresse URL de redirection';
+$a->strings['All your visitors from the web will be redirected to this URL.'] = 'Tous les visiteurs venant du web seront redirigés vers cette URL.';
+$a->strings['Begin of the Blackout'] = 'Début de l\'extinction';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = 'Le format est YYYY-MM-DD hh:mm; YYYY année, MMmois, DD jour, hhheure et mmminute.';
+$a->strings['End of the Blackout'] = 'Fin de l\'extinction';
+$a->strings['Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can\'t login again after logging out while the blackout is still in place.'] = 'Note: La redirection sera active à partir du moment où vous pressez le bouton d\'envoi. Les utilisateurs actuellement connectés ne seront pas éjectés mais ne pourront se connecter à nouveau après s\'être déconnectés, pendant que le blackout est encore en cours.';
diff --git a/blackout/lang/hu/messages.po b/blackout/lang/hu/messages.po
new file mode 100644
index 00000000..2f2d90ce
--- /dev/null
+++ b/blackout/lang/hu/messages.po
@@ -0,0 +1,67 @@
+# ADDON blackout
+# Copyright (C)
+# This file is distributed under the same license as the Friendica blackout addon package.
+#
+#
+# Translators:
+# Balázs Úr, 2020-2021
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2014-06-22 11:19+0000\n"
+"Last-Translator: Balázs Úr, 2020-2021\n"
+"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/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"
+
+#: blackout.php:97
+msgid ""
+"The end-date is prior to the start-date of the blackout, you should fix "
+"this."
+msgstr "A befejezési dátum az áramszünet kezdési dátuma előtt van, ezt javítania kell."
+
+#: blackout.php:99
+#, php-format
+msgid ""
+"Please double check the current settings for the blackout. It will begin on "
+"%s and end on %s."
+msgstr "Ellenőrizze még egyszer az áramszünet jelenlegi beállításait. A kezdete %s és a vége %s lesz."
+
+#: blackout.php:102
+msgid "Save Settings"
+msgstr "Beállítások mentése"
+
+#: blackout.php:103
+msgid "Redirect URL"
+msgstr "Átirányítási URL"
+
+#: blackout.php:103
+msgid "All your visitors from the web will be redirected to this URL."
+msgstr "A webről érkező összes látogatója át lesz irányítva erre az URL-re."
+
+#: blackout.php:104
+msgid "Begin of the Blackout"
+msgstr "Az áramszünet kezdete"
+
+#: blackout.php:104
+msgid ""
+"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, "
+"DD day, hh hour and mm minute."
+msgstr "A formátum ÉÉÉÉ-HH-NN óó:pp, ahol ÉÉÉÉ az év, HH a hónap, NN a nap, óó az óra és pp a perc."
+
+#: blackout.php:105
+msgid "End of the Blackout"
+msgstr "Az áramszünet vége"
+
+#: blackout.php:107
+msgid ""
+"Note: The redirect will be active from the moment you press"
+" the submit button. Users currently logged in will not be "
+"thrown out but can't login again after logging out while the blackout is "
+"still in place."
+msgstr "Megjegyzés: Az átirányítás attól a pillanattól kezdve lesz aktív, amikor megnyomja az elküldés gombot. A jelenleg bejelentkezett felhasználók nem lesznek kidobva, de nem tudnak újra bejelentkezni, miután kijelentkeztek és az áramszünet még hatályban van."
diff --git a/blackout/lang/hu/strings.php b/blackout/lang/hu/strings.php
new file mode 100644
index 00000000..53f650cc
--- /dev/null
+++ b/blackout/lang/hu/strings.php
@@ -0,0 +1,16 @@
+strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'A befejezési dátum az áramszünet kezdési dátuma előtt van, ezt javítania kell.';
+$a->strings['Please double check the current settings for the blackout. It will begin on %s and end on %s.'] = 'Ellenőrizze még egyszer az áramszünet jelenlegi beállításait. A kezdete %s és a vége %s lesz.';
+$a->strings['Save Settings'] = 'Beállítások mentése';
+$a->strings['Redirect URL'] = 'Átirányítási URL';
+$a->strings['All your visitors from the web will be redirected to this URL.'] = 'A webről érkező összes látogatója át lesz irányítva erre az URL-re.';
+$a->strings['Begin of the Blackout'] = 'Az áramszünet kezdete';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = 'A formátum ÉÉÉÉ-HH-NN óó:pp, ahol ÉÉÉÉ az év, HH a hónap, NN a nap, óó az óra és pp a perc.';
+$a->strings['End of the Blackout'] = 'Az áramszünet vége';
+$a->strings['Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can\'t login again after logging out while the blackout is still in place.'] = 'Megjegyzés: Az átirányítás attól a pillanattól kezdve lesz aktív, amikor megnyomja az elküldés gombot. A jelenleg bejelentkezett felhasználók nem lesznek kidobva, de nem tudnak újra bejelentkezni, miután kijelentkeztek és az áramszünet még hatályban van.';
diff --git a/blackout/lang/is/strings.php b/blackout/lang/is/strings.php
index 41980a4d..1e92a162 100644
--- a/blackout/lang/is/strings.php
+++ b/blackout/lang/is/strings.php
@@ -3,13 +3,6 @@
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
- return ($n % 10 != 1 || $n % 100 == 11);;
+ return intval($n % 10 != 1 || $n % 100 == 11);
}}
-;
-$a->strings["Save Settings"] = "Vista stillingar";
-$a->strings["Redirect URL"] = "";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "";
-$a->strings["Begin of the Blackout"] = "";
-$a->strings["format is YYYY year, MM month, DD day, hh hour and mm minute"] = "";
-$a->strings["End of the Blackout"] = "";
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "";
+$a->strings['Save Settings'] = 'Vista stillingar';
diff --git a/blackout/lang/it/messages.po b/blackout/lang/it/messages.po
index 1b0c6f62..50b839db 100644
--- a/blackout/lang/it/messages.po
+++ b/blackout/lang/it/messages.po
@@ -5,13 +5,14 @@
#
# Translators:
# fabrixxm , 2014,2018
+# Sylke Vicious , 2020-2021
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-22 13:18+0200\n"
-"PO-Revision-Date: 2018-03-19 19:50+0000\n"
-"Last-Translator: fabrixxm \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-04-19 11:10+0000\n"
+"Last-Translator: Sylke Vicious \n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,34 +20,49 @@ msgstr ""
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: blackout.php:99
-msgid "Save Settings"
-msgstr "Salva Impostazioni"
-
-#: blackout.php:100
-msgid "Redirect URL"
-msgstr "URL di reindirizzamento"
-
-#: blackout.php:100
-msgid "all your visitors from the web will be redirected to this URL"
-msgstr "tutti i visitatori dal web verranno reindirizzati a questo URL"
-
-#: blackout.php:101
-msgid "Begin of the Blackout"
-msgstr "Inzio del blackout"
-
-#: blackout.php:101
-msgid ""
-"format is YYYY year, MM month, DD day, "
-"hh hour and mm minute"
-msgstr "il formato è YYYY anno, MM mese, DD giorno, hh ora e mm minuto"
-
-#: blackout.php:102
-msgid "End of the Blackout"
-msgstr "Fine del blackout"
-
-#: blackout.php:108
+#: blackout.php:97
msgid ""
"The end-date is prior to the start-date of the blackout, you should fix "
"this."
-msgstr "La data di fine è precedente alla data di inizio. Dovresti sistemarla."
+msgstr "La data di fine è precedente alla data di inizio blackout, dovresti sistemarle."
+
+#: blackout.php:99
+#, php-format
+msgid ""
+"Please double check the current settings for the blackout. It will begin on "
+"%s and end on %s."
+msgstr "Per favore ricontrolla le impostazioni attuali per il blackout. L'inizio sarà il %s e terminerà il %s."
+
+#: blackout.php:102
+msgid "Save Settings"
+msgstr "Salva Impostazioni"
+
+#: blackout.php:103
+msgid "Redirect URL"
+msgstr "URL di reindirizzamento"
+
+#: blackout.php:103
+msgid "All your visitors from the web will be redirected to this URL."
+msgstr "Tutti i tuoi visitatori dal web verranno reindirizzati a questo URL."
+
+#: blackout.php:104
+msgid "Begin of the Blackout"
+msgstr "Inzio del blackout"
+
+#: blackout.php:104
+msgid ""
+"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, "
+"DD day, hh hour and mm minute."
+msgstr "Il formato è YYYY-MM-DD hh:mm; YYYY anno, MM mese, DD giorno, hh ora e mm minuto."
+
+#: blackout.php:105
+msgid "End of the Blackout"
+msgstr "Fine del blackout"
+
+#: blackout.php:107
+msgid ""
+"Note: The redirect will be active from the moment you press"
+" the submit button. Users currently logged in will not be "
+"thrown out but can't login again after logging out while the blackout is "
+"still in place."
+msgstr "Nota: Il reindirizzamento sarà attivo dal momento in cui premerai il pulsante di invio. Gli utenti attualmente autenticati non saranno disconnessi ma non potranno accedere in caso di disconnessione fintanto che il blackout sarà attivo."
diff --git a/blackout/lang/it/strings.php b/blackout/lang/it/strings.php
index b0142236..311dbda9 100644
--- a/blackout/lang/it/strings.php
+++ b/blackout/lang/it/strings.php
@@ -2,13 +2,15 @@
if(! function_exists("string_plural_select_it")) {
function string_plural_select_it($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Save Settings"] = "Salva Impostazioni";
-$a->strings["Redirect URL"] = "URL di reindirizzamento";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "tutti i visitatori dal web verranno reindirizzati a questo URL";
-$a->strings["Begin of the Blackout"] = "Inzio del blackout";
-$a->strings["format is YYYY year, MM month, DD day, hh hour and mm minute"] = "il formato è YYYY anno, MM mese, DD giorno, hh ora e mm minuto";
-$a->strings["End of the Blackout"] = "Fine del blackout";
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "La data di fine è precedente alla data di inizio. Dovresti sistemarla.";
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'La data di fine è precedente alla data di inizio blackout, dovresti sistemarle.';
+$a->strings['Please double check the current settings for the blackout. It will begin on %s and end on %s.'] = 'Per favore ricontrolla le impostazioni attuali per il blackout. L\'inizio sarà il %s e terminerà il %s.';
+$a->strings['Save Settings'] = 'Salva Impostazioni';
+$a->strings['Redirect URL'] = 'URL di reindirizzamento';
+$a->strings['All your visitors from the web will be redirected to this URL.'] = 'Tutti i tuoi visitatori dal web verranno reindirizzati a questo URL.';
+$a->strings['Begin of the Blackout'] = 'Inzio del blackout';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = 'Il formato è YYYY-MM-DD hh:mm; YYYY anno, MM mese, DD giorno, hh ora e mm minuto.';
+$a->strings['End of the Blackout'] = 'Fine del blackout';
+$a->strings['Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can\'t login again after logging out while the blackout is still in place.'] = 'Nota: Il reindirizzamento sarà attivo dal momento in cui premerai il pulsante di invio. Gli utenti attualmente autenticati non saranno disconnessi ma non potranno accedere in caso di disconnessione fintanto che il blackout sarà attivo.';
diff --git a/blackout/lang/ja/messages.po b/blackout/lang/ja/messages.po
index c7e267d7..3747bb06 100644
--- a/blackout/lang/ja/messages.po
+++ b/blackout/lang/ja/messages.po
@@ -4,13 +4,14 @@
#
#
# Translators:
+# XMPPはいいぞ, 2021
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-03-12 09:26+0100\n"
-"PO-Revision-Date: 2019-08-28 10:18+0000\n"
-"Last-Translator: Ozero Dien \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-05-09 10:43+0000\n"
+"Last-Translator: XMPPはいいぞ\n"
"Language-Team: Japanese (http://www.transifex.com/Friendica/friendica/language/ja/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -18,48 +19,49 @@ msgstr ""
"Language: ja\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: blackout.php:101
+#: blackout.php:97
msgid ""
-"The end-date is prior to the start-date of the blackout, you should fix this"
-msgstr "終了日はブラックアウトの開始日より前です。これを修正する必要があります"
+"The end-date is prior to the start-date of the blackout, you should fix "
+"this."
+msgstr "終了日はブラックアウトの開始日より前で、これを修正する必要があります"
-#: blackout.php:103
+#: blackout.php:99
#, php-format
msgid ""
-"Please double check that the current settings for the blackout. Begin will "
-"be %s and it will end %s."
-msgstr "ブラックアウトの現在の設定を再確認してください。開始は %s で、終了は %s です。"
+"Please double check the current settings for the blackout. It will begin on "
+"%s and end on %s."
+msgstr ""
-#: blackout.php:106
+#: blackout.php:102
msgid "Save Settings"
msgstr "設定を保存する"
-#: blackout.php:107
+#: blackout.php:103
msgid "Redirect URL"
msgstr "リダイレクト URL"
-#: blackout.php:107
-msgid "all your visitors from the web will be redirected to this URL"
+#: blackout.php:103
+msgid "All your visitors from the web will be redirected to this URL."
msgstr "Webからのすべての訪問者はこのURLにリダイレクトされます"
-#: blackout.php:108
+#: blackout.php:104
msgid "Begin of the Blackout"
msgstr "ブラックアウトの始まり"
-#: blackout.php:108
+#: blackout.php:104
msgid ""
"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, "
"DD day, hh hour and mm minute."
msgstr "形式は YYYY-MM-DD hh:mm です。 YYYY 年、 MM 月、 DD 日、 hh 時間と mm 分。"
-#: blackout.php:109
+#: blackout.php:105
msgid "End of the Blackout"
msgstr "ブラックアウトの終わり"
-#: blackout.php:111
+#: blackout.php:107
msgid ""
"Note: The redirect will be active from the moment you press"
" the submit button. Users currently logged in will not be "
-"thrown out but can't login again after logging out should the blackout is "
+"thrown out but can't login again after logging out while the blackout is "
"still in place."
-msgstr "備考:送信ボタンを押した時点からリダイレクトが有効になります。現在ログインしているユーザーはリダイレクトされませんが、ブラックアウトが有効な間はログアウト後再度ログインできなくなります。"
+msgstr ""
diff --git a/blackout/lang/ja/strings.php b/blackout/lang/ja/strings.php
index 820f8e4a..1456db9f 100644
--- a/blackout/lang/ja/strings.php
+++ b/blackout/lang/ja/strings.php
@@ -3,15 +3,12 @@
if(! function_exists("string_plural_select_ja")) {
function string_plural_select_ja($n){
$n = intval($n);
- return 0;;
+ return intval(0);
}}
-;
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this"] = "終了日はブラックアウトの開始日より前です。これを修正する必要があります";
-$a->strings["Please double check that the current settings for the blackout. Begin will be %s and it will end %s."] = "ブラックアウトの現在の設定を再確認してください。開始は %s で、終了は %s です。";
-$a->strings["Save Settings"] = "設定を保存する";
-$a->strings["Redirect URL"] = "リダイレクト URL";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "Webからのすべての訪問者はこのURLにリダイレクトされます";
-$a->strings["Begin of the Blackout"] = "ブラックアウトの始まり";
-$a->strings["Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute."] = "形式は YYYY-MM-DD hh:mm です。 YYYY 年、 MM 月、 DD 日、 hh 時間と mm 分。";
-$a->strings["End of the Blackout"] = "ブラックアウトの終わり";
-$a->strings["Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can't login again after logging out should the blackout is still in place."] = "備考:送信ボタンを押した時点からリダイレクトが有効になります。現在ログインしているユーザーはリダイレクトされませんが、ブラックアウトが有効な間はログアウト後再度ログインできなくなります。";
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = '終了日はブラックアウトの開始日より前で、これを修正する必要があります';
+$a->strings['Save Settings'] = '設定を保存する';
+$a->strings['Redirect URL'] = 'リダイレクト URL';
+$a->strings['All your visitors from the web will be redirected to this URL.'] = 'Webからのすべての訪問者はこのURLにリダイレクトされます';
+$a->strings['Begin of the Blackout'] = 'ブラックアウトの始まり';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = '形式は YYYY-MM-DD hh:mm です。 YYYY 年、 MM 月、 DD 日、 hh 時間と mm 分。';
+$a->strings['End of the Blackout'] = 'ブラックアウトの終わり';
diff --git a/blackout/lang/nl/strings.php b/blackout/lang/nl/strings.php
index 8311c07e..e233e45d 100644
--- a/blackout/lang/nl/strings.php
+++ b/blackout/lang/nl/strings.php
@@ -3,13 +3,12 @@
if(! function_exists("string_plural_select_nl")) {
function string_plural_select_nl($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Save Settings"] = "Instellingen opslaan";
-$a->strings["Redirect URL"] = "URL doorverwijzing";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "al je bezoekers van het internet zullen worden doorverwezen naar deze URL";
-$a->strings["Begin of the Blackout"] = "Begin van de Blackout";
-$a->strings["format is YYYY year, MM month, DD day, hh hour and mm minute"] = "formaat is JJJJ jaar, MM maand, DD dag, uu uur en mm minuten";
-$a->strings["End of the Blackout"] = "Einde van de Blackout";
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "De einddatum van de blackout is eerder dan de startdatum, verbeter dit.";
+$a->strings['Save Settings'] = 'Instellingen opslaan';
+$a->strings['Redirect URL'] = 'URL doorverwijzing';
+$a->strings['all your visitors from the web will be redirected to this URL'] = 'al je bezoekers van het internet zullen worden doorverwezen naar deze URL';
+$a->strings['Begin of the Blackout'] = 'Begin van de Blackout';
+$a->strings['format is YYYY year, MM month, DD day, hh hour and mm minute'] = 'formaat is JJJJ jaar, MM maand, DD dag, uu uur en mm minuten';
+$a->strings['End of the Blackout'] = 'Einde van de Blackout';
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'De einddatum van de blackout is eerder dan de startdatum, verbeter dit.';
diff --git a/blackout/lang/pl/messages.po b/blackout/lang/pl/messages.po
index 5cb661d8..b8f088ce 100644
--- a/blackout/lang/pl/messages.po
+++ b/blackout/lang/pl/messages.po
@@ -4,15 +4,16 @@
#
#
# Translators:
-# Waldemar Stoczkowski, 2018-2019
+# Piotr Strębski , 2022
+# Waldemar Stoczkowski, 2018-2020
# Waldemar Stoczkowski, 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-03-12 09:26+0100\n"
-"PO-Revision-Date: 2019-03-14 19:55+0000\n"
-"Last-Translator: Waldemar Stoczkowski\n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2014-06-22 11:19+0000\n"
+"Last-Translator: Piotr Strębski , 2022\n"
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -20,48 +21,49 @@ msgstr ""
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
-#: blackout.php:101
+#: blackout.php:97
msgid ""
-"The end-date is prior to the start-date of the blackout, you should fix this"
-msgstr "Data zakończenia jest przed datą rozpoczęcia, powinieneś to naprawić"
+"The end-date is prior to the start-date of the blackout, you should fix "
+"this."
+msgstr "Data końcowa jest wcześniejsza niż data rozpoczęcia blackoutu, powinieneś to naprawić."
-#: blackout.php:103
+#: blackout.php:99
#, php-format
msgid ""
-"Please double check that the current settings for the blackout. Begin will "
-"be %s and it will end %s."
-msgstr ""
+"Please double check the current settings for the blackout. It will begin on "
+"%s and end on %s."
+msgstr "Proszę dokładnie sprawdzić aktualne ustawienia blackoutu. Zacznie się o %s i zakończy o %s."
-#: blackout.php:106
+#: blackout.php:102
msgid "Save Settings"
msgstr "Zapisz ustawienia"
-#: blackout.php:107
+#: blackout.php:103
msgid "Redirect URL"
msgstr "Przekierowanie URL"
-#: blackout.php:107
-msgid "all your visitors from the web will be redirected to this URL"
-msgstr "wszyscy Twoi goście z internetu zostaną przekierowani na ten adres URL"
+#: blackout.php:103
+msgid "All your visitors from the web will be redirected to this URL."
+msgstr "Wszyscy Twoi goście z Internetu zostaną przekierowani na ten adres URL."
-#: blackout.php:108
+#: blackout.php:104
msgid "Begin of the Blackout"
-msgstr "Rozpocznij Blackout"
+msgstr "Rozpocznij blackout"
-#: blackout.php:108
+#: blackout.php:104
msgid ""
"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, "
"DD day, hh hour and mm minute."
-msgstr ""
+msgstr "Format to RRRR-MM-DD gg:mm; RRRR rok, MM miesiąc, DD dzień, gg godzina i mm minuta."
-#: blackout.php:109
+#: blackout.php:105
msgid "End of the Blackout"
-msgstr "Koniec Blackout"
+msgstr "Koniec blackoutu"
-#: blackout.php:111
+#: blackout.php:107
msgid ""
"Note: The redirect will be active from the moment you press"
" the submit button. Users currently logged in will not be "
-"thrown out but can't login again after logging out should the blackout is "
+"thrown out but can't login again after logging out while the blackout is "
"still in place."
-msgstr ""
+msgstr "Uwaga: Przekierowanie będzie aktywne od momentu naciśnięcia przycisku przesyłania. Użytkownicy aktualnie zalogowani nie zostaną wyrzuceni, ale nie będą mogli zalogować się ponownie po wylogowaniu, jeśli blackout będzie nadal obowiązywać."
diff --git a/blackout/lang/pl/strings.php b/blackout/lang/pl/strings.php
index bcfdb7db..b80e36da 100644
--- a/blackout/lang/pl/strings.php
+++ b/blackout/lang/pl/strings.php
@@ -3,15 +3,14 @@
if(! function_exists("string_plural_select_pl")) {
function string_plural_select_pl($n){
$n = intval($n);
- return ($n==1 ? 0 : ($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14) ? 1 : $n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14) ? 2 : 3);;
+ if ($n==1) { return 0; } else if (($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this"] = "Data zakończenia jest przed datą rozpoczęcia, powinieneś to naprawić";
-$a->strings["Please double check that the current settings for the blackout. Begin will be %s and it will end %s."] = "";
-$a->strings["Save Settings"] = "Zapisz ustawienia";
-$a->strings["Redirect URL"] = "Przekierowanie URL";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "wszyscy Twoi goście z internetu zostaną przekierowani na ten adres URL";
-$a->strings["Begin of the Blackout"] = "Rozpocznij Blackout";
-$a->strings["Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute."] = "";
-$a->strings["End of the Blackout"] = "Koniec Blackout";
-$a->strings["Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can't login again after logging out should the blackout is still in place."] = "";
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'Data końcowa jest wcześniejsza niż data rozpoczęcia blackoutu, powinieneś to naprawić.';
+$a->strings['Please double check the current settings for the blackout. It will begin on %s and end on %s.'] = 'Proszę dokładnie sprawdzić aktualne ustawienia blackoutu. Zacznie się o %s i zakończy o %s.';
+$a->strings['Save Settings'] = 'Zapisz ustawienia';
+$a->strings['Redirect URL'] = 'Przekierowanie URL';
+$a->strings['All your visitors from the web will be redirected to this URL.'] = 'Wszyscy Twoi goście z Internetu zostaną przekierowani na ten adres URL.';
+$a->strings['Begin of the Blackout'] = 'Rozpocznij blackout';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = 'Format to RRRR-MM-DD gg:mm; RRRR rok, MM miesiąc, DD dzień, gg godzina i mm minuta.';
+$a->strings['End of the Blackout'] = 'Koniec blackoutu';
+$a->strings['Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can\'t login again after logging out while the blackout is still in place.'] = 'Uwaga: Przekierowanie będzie aktywne od momentu naciśnięcia przycisku przesyłania. Użytkownicy aktualnie zalogowani nie zostaną wyrzuceni, ale nie będą mogli zalogować się ponownie po wylogowaniu, jeśli blackout będzie nadal obowiązywać.';
diff --git a/blackout/lang/ro/strings.php b/blackout/lang/ro/strings.php
index 498f7c3e..e71ac6b6 100644
--- a/blackout/lang/ro/strings.php
+++ b/blackout/lang/ro/strings.php
@@ -2,13 +2,13 @@
if(! function_exists("string_plural_select_ro")) {
function string_plural_select_ro($n){
- return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
+ $n = intval($n);
+ if ($n==1) { return 0; } else if ((($n%100>19)||(($n%100==0)&&($n!=0)))) { return 2; } else { return 1; }
}}
-;
-$a->strings["Save Settings"] = "Salvare Configurări";
-$a->strings["Redirect URL"] = "URL de Redirecționare";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "toți vizitatorii dvs. de pe web vor fi redirecționați către acest URL";
-$a->strings["Begin of the Blackout"] = "Pornire punct Blackout";
-$a->strings["format is YYYY year, MM month, DD day, hh hour and mm minute"] = "formatul este YYYY anul, MM luna, DD ziua, hh ora și mm minute";
-$a->strings["End of the Blackout"] = "Finalizare punct Blackout";
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Data de finalizare este anterioară punctului blackout de pornire, ar trebui să corectați aceasta.";
+$a->strings['Save Settings'] = 'Salvare Configurări';
+$a->strings['Redirect URL'] = 'URL de Redirecționare';
+$a->strings['all your visitors from the web will be redirected to this URL'] = 'toți vizitatorii dvs. de pe web vor fi redirecționați către acest URL';
+$a->strings['Begin of the Blackout'] = 'Pornire punct Blackout';
+$a->strings['format is YYYY year, MM month, DD day, hh hour and mm minute'] = 'formatul este YYYY anul, MM luna, DD ziua, hh ora și mm minute';
+$a->strings['End of the Blackout'] = 'Finalizare punct Blackout';
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this.'] = 'Data de finalizare este anterioară punctului blackout de pornire, ar trebui să corectați aceasta.';
diff --git a/blackout/lang/ru/messages.po b/blackout/lang/ru/messages.po
index 560ed5d7..4fa48ccc 100644
--- a/blackout/lang/ru/messages.po
+++ b/blackout/lang/ru/messages.po
@@ -4,14 +4,16 @@
#
#
# Translators:
+# Alexander An , 2020
+# Eugene Veresk , 2020
# Stanislav N. , 2017
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-22 13:18+0200\n"
-"PO-Revision-Date: 2017-04-08 05:34+0000\n"
-"Last-Translator: Stanislav N. \n"
+"POT-Creation-Date: 2019-03-12 09:26+0100\n"
+"PO-Revision-Date: 2020-04-23 14:36+0000\n"
+"Last-Translator: Alexander An \n"
"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/language/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,34 +21,48 @@ msgstr ""
"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"
-#: blackout.php:99
+#: blackout.php:101
+msgid ""
+"The end-date is prior to the start-date of the blackout, you should fix this"
+msgstr "Дата начала позже даты окончания, исправьте это"
+
+#: blackout.php:103
+#, php-format
+msgid ""
+"Please double check that the current settings for the blackout. Begin will "
+"be %s and it will end %s."
+msgstr " Пожалуйста, проверьте настройки блэкаута ещё раз. Он начнётся %s и закончится %s."
+
+#: blackout.php:106
msgid "Save Settings"
msgstr "Сохранить настройки"
-#: blackout.php:100
+#: blackout.php:107
msgid "Redirect URL"
msgstr "Ссылка для перенаправления"
-#: blackout.php:100
+#: blackout.php:107
msgid "all your visitors from the web will be redirected to this URL"
msgstr "все посетители будут перенаправлены на этот URL"
-#: blackout.php:101
+#: blackout.php:108
msgid "Begin of the Blackout"
msgstr "Начало блэкаута"
-#: blackout.php:101
+#: blackout.php:108
msgid ""
-"format is YYYY year, MM month, DD day, "
-"hh hour and mm minute"
-msgstr "формат: YYYY год, MM месяц, DD день, hh час и mm минута"
+"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, "
+"DD day, hh hour and mm minute."
+msgstr "Формат: YYYY-MM-DD hh:mm; YYYY год, MM месяц, DD день, hh час и mm минуты."
-#: blackout.php:102
+#: blackout.php:109
msgid "End of the Blackout"
msgstr "Конец блэкаута"
-#: blackout.php:108
+#: blackout.php:111
msgid ""
-"The end-date is prior to the start-date of the blackout, you should fix "
-"this."
-msgstr "Указана более ранняя дата окончания, чем дата начала. Это надо исправить."
+"Note: The redirect will be active from the moment you press"
+" the submit button. Users currently logged in will not be "
+"thrown out but can't login again after logging out should the blackout is "
+"still in place."
+msgstr "Внимание: Переадресация будет включена после нажатия вами кнопки. Уже вошедшие пользователи не будут выброшены, но не смогут зайти снова, пока блэкаут не закончится."
diff --git a/blackout/lang/ru/strings.php b/blackout/lang/ru/strings.php
index aae8b350..f18803e6 100644
--- a/blackout/lang/ru/strings.php
+++ b/blackout/lang/ru/strings.php
@@ -2,13 +2,15 @@
if(! function_exists("string_plural_select_ru")) {
function string_plural_select_ru($n){
- return ($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 = intval($n);
+ if ($n%10==1 && $n%100!=11) { return 0; } else if ($n%10>=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["Save Settings"] = "Сохранить настройки";
-$a->strings["Redirect URL"] = "Ссылка для перенаправления";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "все посетители будут перенаправлены на этот URL";
-$a->strings["Begin of the Blackout"] = "Начало блэкаута";
-$a->strings["format is YYYY year, MM month, DD day, hh hour and mm minute"] = "формат: YYYY год, MM месяц, DD день, hh час и mm минута";
-$a->strings["End of the Blackout"] = "Конец блэкаута";
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Указана более ранняя дата окончания, чем дата начала. Это надо исправить.";
+$a->strings['The end-date is prior to the start-date of the blackout, you should fix this'] = 'Дата начала позже даты окончания, исправьте это';
+$a->strings['Please double check that the current settings for the blackout. Begin will be %s and it will end %s.'] = ' Пожалуйста, проверьте настройки блэкаута ещё раз. Он начнётся %s и закончится %s.';
+$a->strings['Save Settings'] = 'Сохранить настройки';
+$a->strings['Redirect URL'] = 'Ссылка для перенаправления';
+$a->strings['all your visitors from the web will be redirected to this URL'] = 'все посетители будут перенаправлены на этот URL';
+$a->strings['Begin of the Blackout'] = 'Начало блэкаута';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = 'Формат: YYYY-MM-DD hh:mm; YYYY год, MM месяц, DD день, hh час и mm минуты.';
+$a->strings['End of the Blackout'] = 'Конец блэкаута';
+$a->strings['Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can\'t login again after logging out should the blackout is still in place.'] = 'Внимание: Переадресация будет включена после нажатия вами кнопки. Уже вошедшие пользователи не будут выброшены, но не смогут зайти снова, пока блэкаут не закончится.';
diff --git a/blackout/lang/sv/messages.po b/blackout/lang/sv/messages.po
index 31931bf7..ee58b960 100644
--- a/blackout/lang/sv/messages.po
+++ b/blackout/lang/sv/messages.po
@@ -4,16 +4,16 @@
#
#
# Translators:
-# Jonatan Nyberg, 2017
+# efef6ec5b435a041fce803c7f8af77d2_2341d43, 2017
# Tim Stahel , 2018
# Bjoessi , 2019
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-03-12 09:26+0100\n"
-"PO-Revision-Date: 2019-04-04 20:32+0000\n"
-"Last-Translator: Bjoessi \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-01-04 08:29+0000\n"
+"Last-Translator: Transifex Bot <>\n"
"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/language/sv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -21,48 +21,49 @@ msgstr ""
"Language: sv\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: blackout.php:101
+#: blackout.php:97
msgid ""
-"The end-date is prior to the start-date of the blackout, you should fix this"
-msgstr "Slutdatumet ligger före startdatumet för nedsläckningen, du bör rätta detta."
+"The end-date is prior to the start-date of the blackout, you should fix "
+"this."
+msgstr ""
-#: blackout.php:103
+#: blackout.php:99
#, php-format
msgid ""
-"Please double check that the current settings for the blackout. Begin will "
-"be %s and it will end %s."
-msgstr "Vänligen försäkra dig om att inställningarna för nedsläckningen är korrekt. Början %s och slut %s."
+"Please double check the current settings for the blackout. It will begin on "
+"%s and end on %s."
+msgstr ""
-#: blackout.php:106
+#: blackout.php:102
msgid "Save Settings"
msgstr "Spara inställningar"
-#: blackout.php:107
+#: blackout.php:103
msgid "Redirect URL"
msgstr "Omdirigera URL"
-#: blackout.php:107
-msgid "all your visitors from the web will be redirected to this URL"
-msgstr "alla dina besökare från webben kommer omdirigeras till denna URL"
+#: blackout.php:103
+msgid "All your visitors from the web will be redirected to this URL."
+msgstr ""
-#: blackout.php:108
+#: blackout.php:104
msgid "Begin of the Blackout"
msgstr "Start på nedsläckningen"
-#: blackout.php:108
+#: blackout.php:104
msgid ""
"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, "
"DD day, hh hour and mm minute."
msgstr "Formatet är ÅÅÅÅ-MM-DD tt:mm; ÅÅÅÅ år, MM månad, DD dag, tt timme och mm minut."
-#: blackout.php:109
+#: blackout.php:105
msgid "End of the Blackout"
msgstr "Slut på nedsläckningen"
-#: blackout.php:111
+#: blackout.php:107
msgid ""
"Note: The redirect will be active from the moment you press"
" the submit button. Users currently logged in will not be "
-"thrown out but can't login again after logging out should the blackout is "
+"thrown out but can't login again after logging out while the blackout is "
"still in place."
-msgstr "Observera: Hänvisningen kommer att träda i kraft när du trycker på skicka-knappen. Användare som just nu är inloggade kommer inte bli utkastade men kan inte logga in igen efter utloggning om nedsläckningen fortfarande är i kraft. "
+msgstr ""
diff --git a/blackout/lang/sv/strings.php b/blackout/lang/sv/strings.php
index d7eadfd4..86792904 100644
--- a/blackout/lang/sv/strings.php
+++ b/blackout/lang/sv/strings.php
@@ -3,15 +3,10 @@
if(! function_exists("string_plural_select_sv")) {
function string_plural_select_sv($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["The end-date is prior to the start-date of the blackout, you should fix this"] = "Slutdatumet ligger före startdatumet för nedsläckningen, du bör rätta detta.";
-$a->strings["Please double check that the current settings for the blackout. Begin will be %s and it will end %s."] = "Vänligen försäkra dig om att inställningarna för nedsläckningen är korrekt. Början %s och slut %s.";
-$a->strings["Save Settings"] = "Spara inställningar";
-$a->strings["Redirect URL"] = "Omdirigera URL";
-$a->strings["all your visitors from the web will be redirected to this URL"] = "alla dina besökare från webben kommer omdirigeras till denna URL";
-$a->strings["Begin of the Blackout"] = "Start på nedsläckningen";
-$a->strings["Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute."] = "Formatet är ÅÅÅÅ-MM-DD tt:mm; ÅÅÅÅ år, MM månad, DD dag, tt timme och mm minut.";
-$a->strings["End of the Blackout"] = "Slut på nedsläckningen";
-$a->strings["Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can't login again after logging out should the blackout is still in place."] = "Observera: Hänvisningen kommer att träda i kraft när du trycker på skicka-knappen. Användare som just nu är inloggade kommer inte bli utkastade men kan inte logga in igen efter utloggning om nedsläckningen fortfarande är i kraft. ";
+$a->strings['Save Settings'] = 'Spara inställningar';
+$a->strings['Redirect URL'] = 'Omdirigera URL';
+$a->strings['Begin of the Blackout'] = 'Start på nedsläckningen';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = 'Formatet är ÅÅÅÅ-MM-DD tt:mm; ÅÅÅÅ år, MM månad, DD dag, tt timme och mm minut.';
+$a->strings['End of the Blackout'] = 'Slut på nedsläckningen';
diff --git a/blackout/lang/zh-cn/messages.po b/blackout/lang/zh-cn/messages.po
new file mode 100644
index 00000000..f91d56f5
--- /dev/null
+++ b/blackout/lang/zh-cn/messages.po
@@ -0,0 +1,66 @@
+# ADDON blackout
+# Copyright (C)
+# This file is distributed under the same license as the Friendica blackout addon package.
+#
+#
+# Translators:
+# steve jobs , 2020
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-03-12 09:26+0100\n"
+"PO-Revision-Date: 2020-07-06 19:48+0000\n"
+"Last-Translator: steve jobs \n"
+"Language-Team: Chinese (China) (http://www.transifex.com/Friendica/friendica/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"
+
+#: blackout.php:101
+msgid ""
+"The end-date is prior to the start-date of the blackout, you should fix this"
+msgstr "结束日期早于开始日期,您应该修复此问题"
+
+#: blackout.php:103
+#, php-format
+msgid ""
+"Please double check that the current settings for the blackout. Begin will "
+"be %s and it will end %s."
+msgstr "请仔细检查一下当前的维护设置。将从%s开始结束于%s。"
+
+#: blackout.php:106
+msgid "Save Settings"
+msgstr "保存设置"
+
+#: blackout.php:107
+msgid "Redirect URL"
+msgstr "重定向URL"
+
+#: blackout.php:107
+msgid "all your visitors from the web will be redirected to this URL"
+msgstr "所有来自web的访问者都将重定向到此URL"
+
+#: blackout.php:108
+msgid "Begin of the Blackout"
+msgstr "开始维护"
+
+#: blackout.php:108
+msgid ""
+"Format is YYYY-MM-DD hh:mm; YYYY year, MM month, "
+"DD day, hh hour and mm minute."
+msgstr "格式为YYYY-MM-DD HH:MM;YYYY年、MM月、DD日、HH小时和MM分钟"
+
+#: blackout.php:109
+msgid "End of the Blackout"
+msgstr "结束维护"
+
+#: blackout.php:111
+msgid ""
+"Note: The redirect will be active from the moment you press"
+" the submit button. Users currently logged in will not be "
+"thrown out but can't login again after logging out should the blackout is "
+"still in place."
+msgstr "注意:从您按下提交按钮的那一刻起,重定向将处于活动状态。当前登录的用户不会被驱逐,但如果仍处于维护状态,则在注销后不能再次登录。"
diff --git a/blackout/lang/zh-cn/strings.php b/blackout/lang/zh-cn/strings.php
index d6d8e7d2..41b7473e 100644
--- a/blackout/lang/zh-cn/strings.php
+++ b/blackout/lang/zh-cn/strings.php
@@ -1,3 +1,16 @@
-strings["Submit"] = "提交";
+strings['The end-date is prior to the start-date of the blackout, you should fix this'] = '结束日期早于开始日期,您应该修复此问题';
+$a->strings['Please double check that the current settings for the blackout. Begin will be %s and it will end %s.'] = '请仔细检查一下当前的维护设置。将从%s开始结束于%s。';
+$a->strings['Save Settings'] = '保存设置';
+$a->strings['Redirect URL'] = '重定向URL';
+$a->strings['all your visitors from the web will be redirected to this URL'] = '所有来自web的访问者都将重定向到此URL';
+$a->strings['Begin of the Blackout'] = '开始维护';
+$a->strings['Format is YYYY-MM-DD hh:mm; YYYY year, MM month, DD day, hh hour and mm minute.'] = '格式为YYYY-MM-DD HH:MM;YYYY年、MM月、DD日、HH小时和MM分钟';
+$a->strings['End of the Blackout'] = '结束维护';
+$a->strings['Note: The redirect will be active from the moment you press the submit button. Users currently logged in will not be thrown out but can\'t login again after logging out should the blackout is still in place.'] = '注意:从您按下提交按钮的那一刻起,重定向将处于活动状态。当前登录的用户不会被驱逐,但如果仍处于维护状态,则在注销后不能再次登录。';
diff --git a/blockbot/blockbot.php b/blockbot/blockbot.php
index 2714e494..10327edf 100644
--- a/blockbot/blockbot.php
+++ b/blockbot/blockbot.php
@@ -8,45 +8,41 @@
*
*/
-use Friendica\App;
-use Friendica\Core\Config;
use Friendica\Core\Hook;
-use Friendica\Core\System;
+use Friendica\DI;
use Jaybizzle\CrawlerDetect\CrawlerDetect;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
-use Friendica\Core\L10n;
+use Friendica\Network\HTTPException\ForbiddenException;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
-function blockbot_install() {
+function blockbot_install()
+{
Hook::register('init_1', __FILE__, 'blockbot_init_1');
}
-
-function blockbot_uninstall() {
- Hook::unregister('init_1', __FILE__, 'blockbot_init_1');
-}
-
-function blockbot_addon_admin(&$a, &$o) {
- $t = Renderer::getMarkupTemplate("admin.tpl", "addon/blockbot/");
+function blockbot_addon_admin(string &$o)
+{
+ $t = Renderer::getMarkupTemplate('admin.tpl', 'addon/blockbot/');
$o = Renderer::replaceMacros($t, [
- '$submit' => L10n::t('Save Settings'),
- '$good_crawlers' => ['good_crawlers', L10n::t('Allow "good" crawlers'), Config::get('blockbot', 'good_crawlers'), "Don't block fediverse crawlers, relay servers and other bots with good purposes."],
- '$block_gab' => ['block_gab', L10n::t('Block GabSocial'), Config::get('blockbot', 'block_gab'), 'Block the software GabSocial. This will block every access for that software. You can block dedicated gab instances in the blocklist settings in the admin section.'],
- '$training' => ['training', L10n::t('Training mode'), Config::get('blockbot', 'training'), "Activates the training mode. This is only meant for developing purposes. Don't activate this on a production machine. This can cut communication with some systems."],
+ '$submit' => DI::l10n()->t('Save Settings'),
+ '$good_crawlers' => ['good_crawlers', DI::l10n()->t('Allow "good" crawlers'), DI::config()->get('blockbot', 'good_crawlers'), DI::l10n()->t("Don't block fediverse crawlers, relay servers and other bots with good purposes.")],
+ '$block_gab' => ['block_gab', DI::l10n()->t('Block GabSocial'), DI::config()->get('blockbot', 'block_gab'), DI::l10n()->t('Block the software GabSocial. This will block every access for that software. You can block dedicated gab instances in the blocklist settings in the admin section.')],
+ '$training' => ['training', DI::l10n()->t('Training mode'), DI::config()->get('blockbot', 'training'), DI::l10n()->t("Activates the training mode. This is only meant for developing purposes. Don't activate this on a production machine. This can cut communication with some systems.")],
]);
}
-function blockbot_addon_admin_post(&$a) {
- Config::set('blockbot', 'good_crawlers', $_POST['good_crawlers'] ?? false);
- Config::set('blockbot', 'block_gab', $_POST['block_gab'] ?? false);
- Config::set('blockbot', 'training', $_POST['training'] ?? false);
- info(L10n::t('Settings updated.'). EOL);
+function blockbot_addon_admin_post()
+{
+ DI::config()->set('blockbot', 'good_crawlers', $_POST['good_crawlers'] ?? false);
+ DI::config()->set('blockbot', 'block_gab', $_POST['block_gab'] ?? false);
+ DI::config()->set('blockbot', 'training', $_POST['training'] ?? false);
}
-function blockbot_init_1(App $a) {
+function blockbot_init_1()
+{
if (empty($_SERVER['HTTP_USER_AGENT'])) {
return;
}
@@ -54,16 +50,20 @@ function blockbot_init_1(App $a) {
$logdata = ['agent' => $_SERVER['HTTP_USER_AGENT'], 'uri' => $_SERVER['REQUEST_URI']];
// List of "good" crawlers
- $good_agents = ['fediverse.space crawler', 'fediverse.network crawler', 'Active_Pods_CheckBot_3.0',
- 'Social-Relay/', 'Test Certificate Info', 'Uptimebot/', 'GNUSocialBot'];
+ $good_agents = [
+ 'fediverse.space crawler', 'fediverse.network crawler', 'Active_Pods_CheckBot_3.0',
+ 'Social-Relay/', 'Test Certificate Info', 'Uptimebot/', 'GNUSocialBot', 'UptimeRobot/',
+ 'PTST/', 'Zabbix', 'Poduptime/'
+ ];
// List of known crawlers.
- $agents = ['SemrushBot', 's~feedly-nikon3', 'Qwantify/Bleriot/', 'ltx71', 'Sogou web spider/',
+ $agents = [
+ 'SemrushBot', 's~feedly-nikon3', 'Qwantify/Bleriot/', 'ltx71', 'Sogou web spider/',
'Diffbot/', 'Twitterbot/', 'YisouSpider', 'evc-batch/', 'LivelapBot/', 'TrendsmapResolver/',
'PaperLiBot/', 'Nuzzel', 'um-LN/', 'Google Favicon', 'Datanyze', 'BLEXBot/', '360Spider',
'adscanner/', 'HeadlessChrome', 'wpif', 'startmebot/', 'Googlebot/', 'Applebot/',
'facebookexternalhit/', 'GoogleImageProxy', 'bingbot/', 'heritrix/', 'ldspider',
- 'AwarioRssBot/', 'Zabbix', 'TweetmemeBot/', 'dcrawl/', 'PhantomJS/', 'Googlebot-Image/',
+ 'AwarioRssBot/', 'TweetmemeBot/', 'dcrawl/', 'PhantomJS/', 'Googlebot-Image/',
'CrowdTanglebot/', 'Mediapartners-Google', 'Baiduspider/', 'datagnionbot',
'MegaIndex.ru/', 'SMUrlExpander', 'Hatena-Favicon/', 'Wappalyzer', 'FlipboardProxy/',
'NetcraftSurveyAgent/', 'Dataprovider.com', 'SMTBot/', 'Nimbostratus-Bot/',
@@ -75,24 +75,36 @@ function blockbot_init_1(App $a) {
'Scrapy/', 'github-camo', 'MJ12bot/', 'DotBot/', 'Pinterestbot/', 'Jooblebot/',
'Cliqzbot/', 'YaK/', 'Mediatoolkitbot', 'Snacktory', 'FunWebProducts', 'oBot/',
'7Siters/', 'KOCMOHABT', 'Google-SearchByImage', 'FemtosearchBot/',
- 'HubSpot Crawler', 'DomainStatsBot/', 'Re-re Studio'];
+ 'HubSpot Crawler', 'DomainStatsBot/', 'Re-re Studio', 'AwarioSmartBot/',
+ 'SummalyBot/', 'DNSResearchBot/', 'PetalBot;', 'Nmap Scripting Engine;',
+ 'Google-Apps-Script; beanserver;', 'woorankreview/', 'Seekport Crawler;', 'AHC/',
+ 'SkypeUriPreview Preview/', 'Semanticbot/', 'Embed PHP library', 'XoviOnpageCrawler;',
+ 'GetHPinfo.com-Bot/', 'BoardReader Favicon Fetcher', 'Google-Adwords-Instant', 'newspaper/',
+ 'YurichevBot/', 'Crawling at Home Project', 'InfoTigerBot/'
+ ];
- if (!Config::get('blockbot', 'good_crawlers')) {
+ if (!DI::config()->get('blockbot', 'good_crawlers')) {
$agents = array_merge($agents, $good_agents);
+ } else {
+ foreach ($good_agents as $good_agent) {
+ if (stristr($_SERVER['HTTP_USER_AGENT'], $good_agent)) {
+ return;
+ }
+ }
}
- if (Config::get('blockbot', 'block_gab')) {
+ if (DI::config()->get('blockbot', 'block_gab')) {
$agents[] = 'GabSocial/';
}
foreach ($agents as $agent) {
if (stristr($_SERVER['HTTP_USER_AGENT'], $agent)) {
- System::httpExit(403, 'Bots are not allowed');
+ throw new ForbiddenException('Bots are not allowed');
}
}
// This switch here is only meant for developers who want to add more bots to the list above, it is not safe for production.
- if (!Config::get('blockbot', 'training')) {
+ if (!DI::config()->get('blockbot', 'training')) {
return;
}
@@ -104,24 +116,29 @@ function blockbot_init_1(App $a) {
}
// List of false positives' strings of known "good" agents.
- $agents = ['curl', 'zgrab', 'Go-http-client', 'curb', 'github.com', 'reqwest', 'Feedly/',
+ $agents = [
+ 'curl', 'zgrab', 'Go-http-client', 'curb', 'github.com', 'reqwest', 'Feedly/',
'Python-urllib/', 'Liferea/', 'aiohttp/', 'WordPress.com Reader', 'hackney/',
'Faraday v', 'okhttp', 'UniversalFeedParser', 'PixelFedBot', 'python-requests',
'WordPress/', 'http.rb/', 'Apache-HttpClient/', 'WordPress.com;', 'Pleroma',
- 'Dispatch/', 'Ruby', 'Java/', 'libwww-perl/', 'Mastodon/',
- 'lua-resty-http/'];
+ 'Dispatch/', 'Ruby', 'Java/', 'libwww-perl/', 'Mastodon/', 'FeedlyApp/',
+ 'lua-resty-http/', 'Tiny Tiny RSS/', 'Wget/', 'PostmanRuntime/',
+ 'W3C_Validator/', 'NetNewsWire', 'FeedValidator/', 'theoldreader.com', 'axios/',
+ 'Paw/', 'PeerTube/', 'fedi.inex.dev', 'FediDB/', 'index.community crawler',
+ 'Slackbot-LinkExpanding'
+ ];
- if (Config::get('blockbot', 'good_crawlers')) {
+ if (DI::config()->get('blockbot', 'good_crawlers')) {
$agents = array_merge($agents, $good_agents);
}
foreach ($agents as $agent) {
if (stristr($_SERVER['HTTP_USER_AGENT'], $agent)) {
- logger::notice('False positive', $logdata);
+ logger::info('False positive', $logdata);
return;
}
}
- logger::info('Blocked bot', $logdata);
- System::httpExit(403, 'Bots are not allowed');
+ logger::notice('Blocked bot', $logdata);
+ throw new ForbiddenException('Bots are not allowed');
}
diff --git a/blockbot/lang/C/messages.po b/blockbot/lang/C/messages.po
index 1bdd56a7..6f30e845 100644
--- a/blockbot/lang/C/messages.po
+++ b/blockbot/lang/C/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-08-07 09:03+0200\n"
+"POT-Creation-Date: 2021-12-13 06:17+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,22 +17,38 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: blockbot.php:35
+#: blockbot.php:30
msgid "Save Settings"
msgstr ""
-#: blockbot.php:36
+#: blockbot.php:31
msgid "Allow \"good\" crawlers"
msgstr ""
-#: blockbot.php:37
+#: blockbot.php:31
+msgid ""
+"Don't block fediverse crawlers, relay servers and other bots with good "
+"purposes."
+msgstr ""
+
+#: blockbot.php:32
msgid "Block GabSocial"
msgstr ""
-#: blockbot.php:38
+#: blockbot.php:32
+msgid ""
+"Block the software GabSocial. This will block every access for that "
+"software. You can block dedicated gab instances in the blocklist settings in "
+"the admin section."
+msgstr ""
+
+#: blockbot.php:33
msgid "Training mode"
msgstr ""
-#: blockbot.php:46
-msgid "Settings updated."
+#: blockbot.php:33
+msgid ""
+"Activates the training mode. This is only meant for developing purposes. "
+"Don't activate this on a production machine. This can cut communication with "
+"some systems."
msgstr ""
diff --git a/blockbot/lang/ar/messages.po b/blockbot/lang/ar/messages.po
new file mode 100644
index 00000000..27af1435
--- /dev/null
+++ b/blockbot/lang/ar/messages.po
@@ -0,0 +1,39 @@
+# ADDON blockbot
+# Copyright (C)
+# This file is distributed under the same license as the Friendica blockbot addon package.
+#
+#
+# Translators:
+# Farida Khalaf , 2021
+# abidin toumi , 2021
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2019-08-07 07:43+0000\n"
+"Last-Translator: abidin toumi , 2021\n"
+"Language-Team: Arabic (https://www.transifex.com/Friendica/teams/12172/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"
+
+#: blockbot.php:29
+msgid "Save Settings"
+msgstr "احفظ الإعدادات"
+
+#: blockbot.php:30
+msgid "Allow \"good\" crawlers"
+msgstr "السماح ببرامج الزحف \"الجيدة\""
+
+#: blockbot.php:31
+msgid "Block GabSocial"
+msgstr "حظر GabSocial"
+
+#: blockbot.php:32
+msgid "Training mode"
+msgstr "وضع التدريب"
diff --git a/blockbot/lang/ar/strings.php b/blockbot/lang/ar/strings.php
new file mode 100644
index 00000000..ef591488
--- /dev/null
+++ b/blockbot/lang/ar/strings.php
@@ -0,0 +1,11 @@
+=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; }
+}}
+$a->strings['Save Settings'] = 'احفظ الإعدادات';
+$a->strings['Allow "good" crawlers'] = 'السماح ببرامج الزحف "الجيدة"';
+$a->strings['Block GabSocial'] = 'حظر GabSocial';
+$a->strings['Training mode'] = 'وضع التدريب';
diff --git a/blockbot/lang/bg/messages.po b/blockbot/lang/bg/messages.po
new file mode 100644
index 00000000..cb61ff38
--- /dev/null
+++ b/blockbot/lang/bg/messages.po
@@ -0,0 +1,42 @@
+# ADDON blockbot
+# Copyright (C)
+# This file is distributed under the same license as the Friendica blockbot addon package.
+#
+#
+# Translators:
+# Rafael Kalachev , 2021
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-08-07 09:03+0200\n"
+"PO-Revision-Date: 2019-08-07 07:43+0000\n"
+"Last-Translator: Rafael Kalachev , 2021\n"
+"Language-Team: Bulgarian (https://www.transifex.com/Friendica/teams/12172/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"
+
+#: blockbot.php:35
+msgid "Save Settings"
+msgstr "Запази настройките"
+
+#: blockbot.php:36
+msgid "Allow \"good\" crawlers"
+msgstr "Разреши \"добри\" обхождащи роботи за уеб страници"
+
+#: blockbot.php:37
+msgid "Block GabSocial"
+msgstr "Блокирай GabSocial"
+
+#: blockbot.php:38
+msgid "Training mode"
+msgstr "Тренировъчен режим"
+
+#: blockbot.php:46
+msgid "Settings updated."
+msgstr "Настройките са обновени"
diff --git a/blockbot/lang/bg/strings.php b/blockbot/lang/bg/strings.php
new file mode 100644
index 00000000..932541d9
--- /dev/null
+++ b/blockbot/lang/bg/strings.php
@@ -0,0 +1,12 @@
+strings['Save Settings'] = 'Запази настройките';
+$a->strings['Allow "good" crawlers'] = 'Разреши "добри" обхождащи роботи за уеб страници';
+$a->strings['Block GabSocial'] = 'Блокирай GabSocial';
+$a->strings['Training mode'] = 'Тренировъчен режим';
+$a->strings['Settings updated.'] = 'Настройките са обновени';
diff --git a/blockbot/lang/ca/strings.php b/blockbot/lang/ca/strings.php
index 3f95ee05..ed82dcae 100644
--- a/blockbot/lang/ca/strings.php
+++ b/blockbot/lang/ca/strings.php
@@ -3,11 +3,10 @@
if(! function_exists("string_plural_select_ca")) {
function string_plural_select_ca($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Save Settings"] = "Desa la configuració";
-$a->strings["Allow \"good\" crawlers"] = "Permeti rastrejadors \"bons\"";
-$a->strings["Block GabSocial"] = "Bloquejar GabSocial";
-$a->strings["Training mode"] = "Modalitat d'entrenament";
-$a->strings["Settings updated."] = "La configuració s'ha actualitzat.";
+$a->strings['Save Settings'] = 'Desa la configuració';
+$a->strings['Allow "good" crawlers'] = 'Permeti rastrejadors "bons"';
+$a->strings['Block GabSocial'] = 'Bloquejar GabSocial';
+$a->strings['Training mode'] = 'Modalitat d\'entrenament';
+$a->strings['Settings updated.'] = 'La configuració s\'ha actualitzat.';
diff --git a/blockbot/lang/cs/strings.php b/blockbot/lang/cs/strings.php
index d3c5a2dd..09753d17 100644
--- a/blockbot/lang/cs/strings.php
+++ b/blockbot/lang/cs/strings.php
@@ -3,11 +3,10 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
$n = intval($n);
- return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
+ if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; }
}}
-;
-$a->strings["Save Settings"] = "Uložit nastavení";
-$a->strings["Allow \"good\" crawlers"] = "Povolit „dobré“ crawlery";
-$a->strings["Block GabSocial"] = "Zablokovat GabSocial";
-$a->strings["Training mode"] = "Trénovací režim";
-$a->strings["Settings updated."] = "Nastavení aktualizována.";
+$a->strings['Save Settings'] = 'Uložit nastavení';
+$a->strings['Allow "good" crawlers'] = 'Povolit „dobré“ crawlery';
+$a->strings['Block GabSocial'] = 'Zablokovat GabSocial';
+$a->strings['Training mode'] = 'Trénovací režim';
+$a->strings['Settings updated.'] = 'Nastavení aktualizována.';
diff --git a/blockbot/lang/de/strings.php b/blockbot/lang/de/strings.php
index db52f710..4ef71070 100644
--- a/blockbot/lang/de/strings.php
+++ b/blockbot/lang/de/strings.php
@@ -3,11 +3,10 @@
if(! function_exists("string_plural_select_de")) {
function string_plural_select_de($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Save Settings"] = "Einstellungen speichern";
-$a->strings["Allow \"good\" crawlers"] = "\"Gute\" Crawler erlauben";
-$a->strings["Block GabSocial"] = "GabSocial Instanzen blockieren";
-$a->strings["Training mode"] = "Trainingsmodus";
-$a->strings["Settings updated."] = "Einstellungen aktualisiert.";
+$a->strings['Save Settings'] = 'Einstellungen speichern';
+$a->strings['Allow "good" crawlers'] = '"Gute" Crawler erlauben';
+$a->strings['Block GabSocial'] = 'GabSocial Instanzen blockieren';
+$a->strings['Training mode'] = 'Trainingsmodus';
+$a->strings['Settings updated.'] = 'Einstellungen aktualisiert.';
diff --git a/blockbot/lang/en-gb/strings.php b/blockbot/lang/en-gb/strings.php
index f5299bf5..1570fc97 100644
--- a/blockbot/lang/en-gb/strings.php
+++ b/blockbot/lang/en-gb/strings.php
@@ -3,11 +3,10 @@
if(! function_exists("string_plural_select_en_gb")) {
function string_plural_select_en_gb($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Save Settings"] = "Save Settings";
-$a->strings["Allow \"good\" crawlers"] = "Allow \"good\" crawlers";
-$a->strings["Block GabSocial"] = "Block GabSocial";
-$a->strings["Training mode"] = "Training mode";
-$a->strings["Settings updated."] = "Settings updated.";
+$a->strings['Save Settings'] = 'Save Settings';
+$a->strings['Allow "good" crawlers'] = 'Allow "good" crawlers';
+$a->strings['Block GabSocial'] = 'Block GabSocial';
+$a->strings['Training mode'] = 'Training mode';
+$a->strings['Settings updated.'] = 'Settings updated.';
diff --git a/blockbot/lang/es/strings.php b/blockbot/lang/es/strings.php
index 813864c8..93ff45bf 100644
--- a/blockbot/lang/es/strings.php
+++ b/blockbot/lang/es/strings.php
@@ -3,11 +3,10 @@
if(! function_exists("string_plural_select_es")) {
function string_plural_select_es($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Save Settings"] = "Guardar ajustes";
-$a->strings["Allow \"good\" crawlers"] = "Permitir rastreadores web \"buenos\"";
-$a->strings["Block GabSocial"] = "Bloquear GabSocial";
-$a->strings["Training mode"] = "Modo de entrenamiento";
-$a->strings["Settings updated."] = "Ajustes actualizados.";
+$a->strings['Save Settings'] = 'Guardar ajustes';
+$a->strings['Allow "good" crawlers'] = 'Permitir rastreadores web "buenos"';
+$a->strings['Block GabSocial'] = 'Bloquear GabSocial';
+$a->strings['Training mode'] = 'Modo de entrenamiento';
+$a->strings['Settings updated.'] = 'Ajustes actualizados.';
diff --git a/blockbot/lang/fr/strings.php b/blockbot/lang/fr/strings.php
index 1597735a..dbcda667 100644
--- a/blockbot/lang/fr/strings.php
+++ b/blockbot/lang/fr/strings.php
@@ -3,11 +3,10 @@
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
$n = intval($n);
- return ($n > 1);;
+ return intval($n > 1);
}}
-;
-$a->strings["Save Settings"] = "Enregistrer les Paramètres";
-$a->strings["Allow \"good\" crawlers"] = "Autoriser les \"bons\" crawlers";
-$a->strings["Block GabSocial"] = "Bloquer GabSocial";
-$a->strings["Training mode"] = "Mode d'entraînement";
-$a->strings["Settings updated."] = "Paramètres mis à jour.";
+$a->strings['Save Settings'] = 'Enregistrer les Paramètres';
+$a->strings['Allow "good" crawlers'] = 'Autoriser les "bons" crawlers';
+$a->strings['Block GabSocial'] = 'Bloquer GabSocial';
+$a->strings['Training mode'] = 'Mode d\'entraînement';
+$a->strings['Settings updated.'] = 'Paramètres mis à jour.';
diff --git a/blockbot/lang/hu/messages.po b/blockbot/lang/hu/messages.po
new file mode 100644
index 00000000..1139b3f2
--- /dev/null
+++ b/blockbot/lang/hu/messages.po
@@ -0,0 +1,42 @@
+# ADDON blockbot
+# Copyright (C)
+# This file is distributed under the same license as the Friendica blockbot addon package.
+#
+#
+# Translators:
+# Balázs Úr, 2020
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-08-07 09:03+0200\n"
+"PO-Revision-Date: 2019-08-07 07:43+0000\n"
+"Last-Translator: Balázs Úr, 2020\n"
+"Language-Team: Hungarian (https://www.transifex.com/Friendica/teams/12172/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"
+
+#: blockbot.php:35
+msgid "Save Settings"
+msgstr "Beállítások mentése"
+
+#: blockbot.php:36
+msgid "Allow \"good\" crawlers"
+msgstr "A „jó” keresőrobotok engedélyezése"
+
+#: blockbot.php:37
+msgid "Block GabSocial"
+msgstr "GabSocial tiltása"
+
+#: blockbot.php:38
+msgid "Training mode"
+msgstr "Oktató mód"
+
+#: blockbot.php:46
+msgid "Settings updated."
+msgstr "A beállítások frissítve."
diff --git a/blockbot/lang/hu/strings.php b/blockbot/lang/hu/strings.php
new file mode 100644
index 00000000..6ede193a
--- /dev/null
+++ b/blockbot/lang/hu/strings.php
@@ -0,0 +1,12 @@
+strings['Save Settings'] = 'Beállítások mentése';
+$a->strings['Allow "good" crawlers'] = 'A „jó” keresőrobotok engedélyezése';
+$a->strings['Block GabSocial'] = 'GabSocial tiltása';
+$a->strings['Training mode'] = 'Oktató mód';
+$a->strings['Settings updated.'] = 'A beállítások frissítve.';
diff --git a/blockbot/lang/it/messages.po b/blockbot/lang/it/messages.po
new file mode 100644
index 00000000..06db4426
--- /dev/null
+++ b/blockbot/lang/it/messages.po
@@ -0,0 +1,42 @@
+# ADDON blockbot
+# Copyright (C)
+# This file is distributed under the same license as the Friendica blockbot addon package.
+#
+#
+# Translators:
+# Sylke Vicious , 2020
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-08-07 09:03+0200\n"
+"PO-Revision-Date: 2019-08-07 07:43+0000\n"
+"Last-Translator: Sylke Vicious , 2020\n"
+"Language-Team: Italian (https://www.transifex.com/Friendica/teams/12172/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"
+
+#: blockbot.php:35
+msgid "Save Settings"
+msgstr "Salva Impostazioni"
+
+#: blockbot.php:36
+msgid "Allow \"good\" crawlers"
+msgstr "Permetti crawler \"buoni\""
+
+#: blockbot.php:37
+msgid "Block GabSocial"
+msgstr "Blocca GabSocial"
+
+#: blockbot.php:38
+msgid "Training mode"
+msgstr "Modalità addestramento"
+
+#: blockbot.php:46
+msgid "Settings updated."
+msgstr "Impostazioni aggiornate."
diff --git a/blockbot/lang/it/strings.php b/blockbot/lang/it/strings.php
new file mode 100644
index 00000000..fd379860
--- /dev/null
+++ b/blockbot/lang/it/strings.php
@@ -0,0 +1,12 @@
+strings['Save Settings'] = 'Salva Impostazioni';
+$a->strings['Allow "good" crawlers'] = 'Permetti crawler "buoni"';
+$a->strings['Block GabSocial'] = 'Blocca GabSocial';
+$a->strings['Training mode'] = 'Modalità addestramento';
+$a->strings['Settings updated.'] = 'Impostazioni aggiornate.';
diff --git a/blockbot/lang/nl/strings.php b/blockbot/lang/nl/strings.php
index 18d9c2cc..8ad73959 100644
--- a/blockbot/lang/nl/strings.php
+++ b/blockbot/lang/nl/strings.php
@@ -3,11 +3,10 @@
if(! function_exists("string_plural_select_nl")) {
function string_plural_select_nl($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Save Settings"] = "Instellingen opslaan";
-$a->strings["Allow \"good\" crawlers"] = "\"Goede\" crawlers toestaan";
-$a->strings["Block GabSocial"] = "Blokeer GabSocial";
-$a->strings["Training mode"] = "Training modus";
-$a->strings["Settings updated."] = "Instellingen opgeslagen";
+$a->strings['Save Settings'] = 'Instellingen opslaan';
+$a->strings['Allow "good" crawlers'] = '"Goede" crawlers toestaan';
+$a->strings['Block GabSocial'] = 'Blokeer GabSocial';
+$a->strings['Training mode'] = 'Training modus';
+$a->strings['Settings updated.'] = 'Instellingen opgeslagen';
diff --git a/blockbot/lang/pl/strings.php b/blockbot/lang/pl/strings.php
index 0eafbcaf..612798d8 100644
--- a/blockbot/lang/pl/strings.php
+++ b/blockbot/lang/pl/strings.php
@@ -3,11 +3,10 @@
if(! function_exists("string_plural_select_pl")) {
function string_plural_select_pl($n){
$n = intval($n);
- return ($n==1 ? 0 : ($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14) ? 1 : $n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14) ? 2 : 3);;
+ if ($n==1) { return 0; } else if (($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["Save Settings"] = "Zapisz ustawienia";
-$a->strings["Allow \"good\" crawlers"] = "Pozwól „dobrym” robotom";
-$a->strings["Block GabSocial"] = "Zablokuj GabSocial";
-$a->strings["Training mode"] = "Tryb treningowy";
-$a->strings["Settings updated."] = "Ustawienia zaktualizowane.";
+$a->strings['Save Settings'] = 'Zapisz ustawienia';
+$a->strings['Allow "good" crawlers'] = 'Pozwól „dobrym” robotom';
+$a->strings['Block GabSocial'] = 'Zablokuj GabSocial';
+$a->strings['Training mode'] = 'Tryb treningowy';
+$a->strings['Settings updated.'] = 'Ustawienia zaktualizowane.';
diff --git a/blockbot/lang/ru/messages.po b/blockbot/lang/ru/messages.po
new file mode 100644
index 00000000..d66e74b4
--- /dev/null
+++ b/blockbot/lang/ru/messages.po
@@ -0,0 +1,43 @@
+# ADDON blockbot
+# Copyright (C)
+# This file is distributed under the same license as the Friendica blockbot addon package.
+#
+#
+# Translators:
+# Alexey Adamov <2077@tutanota.com>, 2019
+# Eugene Veresk , 2020
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-08-07 09:03+0200\n"
+"PO-Revision-Date: 2019-08-07 07:43+0000\n"
+"Last-Translator: Eugene Veresk , 2020\n"
+"Language-Team: Russian (https://www.transifex.com/Friendica/teams/12172/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"
+
+#: blockbot.php:35
+msgid "Save Settings"
+msgstr "Сохранить настройки"
+
+#: blockbot.php:36
+msgid "Allow \"good\" crawlers"
+msgstr "Разрешить \"хороших\" поисковых роботов"
+
+#: blockbot.php:37
+msgid "Block GabSocial"
+msgstr "Блокировать GabSocial"
+
+#: blockbot.php:38
+msgid "Training mode"
+msgstr "Режим обучения"
+
+#: blockbot.php:46
+msgid "Settings updated."
+msgstr "Настройки изменены"
diff --git a/blockbot/lang/ru/strings.php b/blockbot/lang/ru/strings.php
new file mode 100644
index 00000000..c981ce97
--- /dev/null
+++ b/blockbot/lang/ru/strings.php
@@ -0,0 +1,12 @@
+=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; }
+}}
+$a->strings['Save Settings'] = 'Сохранить настройки';
+$a->strings['Allow "good" crawlers'] = 'Разрешить "хороших" поисковых роботов';
+$a->strings['Block GabSocial'] = 'Блокировать GabSocial';
+$a->strings['Training mode'] = 'Режим обучения';
+$a->strings['Settings updated.'] = 'Настройки изменены';
diff --git a/blockem/blockem.css b/blockem/blockem.css
deleted file mode 100644
index 265b6ba8..00000000
--- a/blockem/blockem.css
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#blockem-label {
- float: left;
- width: 300px;
- margin-top: 10px;
-}
-
-#blockem-words {
- float: left;
- margin-top: 10px;
- width: 400px;
- height: 150px;
-}
-
-#blockem-submit {
- margin-top: 15px;
-}
-
diff --git a/blockem/blockem.php b/blockem/blockem.php
index e0c0a74a..c1d97e8e 100644
--- a/blockem/blockem.php
+++ b/blockem/blockem.php
@@ -5,14 +5,17 @@
* Version: 1.0
* Author: Mike Macgirvin
* Author: Roland Haeder
+ * Status: unsupported
*/
use Friendica\App;
use Friendica\Core\Hook;
-use Friendica\Core\L10n;
-use Friendica\Core\PConfig;
+use Friendica\Core\Renderer;
+use Friendica\DI;
use Friendica\Util\Strings;
+global $blockem_words;
+
function blockem_install()
{
Hook::register('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
@@ -24,68 +27,41 @@ function blockem_install()
Hook::register('enotify_store' , 'addon/blockem/blockem.php', 'blockem_enotify_store');
}
-function blockem_uninstall()
+function blockem_addon_settings(array &$data)
{
- Hook::unregister('prepare_body_content_filter', 'addon/blockem/blockem.php', 'blockem_prepare_body_content_filter');
- Hook::unregister('prepare_body' , 'addon/blockem/blockem.php', 'blockem_prepare_body');
- Hook::unregister('display_item' , 'addon/blockem/blockem.php', 'blockem_display_item');
- Hook::unregister('addon_settings' , 'addon/blockem/blockem.php', 'blockem_addon_settings');
- Hook::unregister('addon_settings_post' , 'addon/blockem/blockem.php', 'blockem_addon_settings_post');
- Hook::unregister('conversation_start' , 'addon/blockem/blockem.php', 'blockem_conversation_start');
- Hook::unregister('item_photo_menu' , 'addon/blockem/blockem.php', 'blockem_item_photo_menu');
- Hook::unregister('enotify_store' , 'addon/blockem/blockem.php', 'blockem_enotify_store');
-}
-
-function blockem_addon_settings (App $a, &$s)
-{
- if (!local_user()) {
+ if (!DI::userSession()->getLocalUserId()) {
return;
}
- /* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '' . "\r\n";
+ $words = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'blockem', 'words', '');
- $words = PConfig::get(local_user(), 'blockem', 'words');
-
- if (!$words) {
- $words = '';
- }
-
- $s .= '';
- $s .= '
' . L10n::t('Blockem') . '
';
- $s .= '';
- $s .= '
';
- $s .= '';
- $s .= '
' . L10n::t('Blockem') . '
';
- $s .= '';
-
- $s .= '
';
- $s .= '
'. L10n::t("Hides user's content by collapsing posts. Also replaces their avatar with generic image.") . '
';
+}
+
+/**
+ * This is a statement rather than an actual function definition. The simple
+ * existence of this method is checked to figure out if the addon offers a
+ * module.
+ */
+function calc_module() {}
+
+function calc_init()
+{
+ $x = <<< EOT
+
+
+
+EOT;
+DI::page()['htmlhead'] .= $x;
+}
+
+function calc_content($app) {
+
+$o = '';
+
+$o .= <<< EOT
+
+
Calculator
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+EOT;
+ return $o;
+}
diff --git a/calc/lang/C/messages.po b/calc/lang/C/messages.po
deleted file mode 100644
index e69de29b..00000000
diff --git a/catavatar/catavatar.php b/catavatar/catavatar.php
index e70449af..2116ac44 100644
--- a/catavatar/catavatar.php
+++ b/catavatar/catavatar.php
@@ -7,16 +7,15 @@
*/
use Friendica\App;
-use Friendica\Core\Config;
use Friendica\Core\Hook;
-use Friendica\Core\L10n;
use Friendica\Core\Logger;
-use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
+use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Model\Photo;
+use Friendica\Model\Profile;
use Friendica\Network\HTTPException\NotFoundException;
define("CATAVATAR_SIZE", 256);
@@ -26,132 +25,122 @@ define("CATAVATAR_SIZE", 256);
*/
function catavatar_install()
{
- Hook::register('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
- Hook::register('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
- Hook::register('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
+ Hook::register('avatar_lookup', __FILE__, 'catavatar_lookup');
+ Hook::register('addon_settings', __FILE__, 'catavatar_addon_settings');
+ Hook::register('addon_settings_post', __FILE__, 'catavatar_addon_settings_post');
- Logger::log('registered catavatar');
-}
-
-/**
- * Removes the addon hook
- */
-function catavatar_uninstall()
-{
- Hook::unregister('avatar_lookup', 'addon/catavatar/catavatar.php', 'catavatar_lookup');
- Hook::unregister('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
- Hook::unregister('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
-
- Logger::log('unregistered catavatar');
+ Logger::notice('registered catavatar');
}
/**
* Cat avatar user settings page
*/
-function catavatar_addon_settings(App $a, &$s)
+function catavatar_addon_settings(array &$data)
{
- if (!local_user()) {
+ if (!DI::userSession()->getLocalUserId()) {
return;
}
- $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/catavatar/');
- $s .= Renderer::replaceMacros($t, [
- '$postpost' => !empty($_POST['catavatar-morecat']) || !empty($_POST['catavatar-emailcat']),
- '$uncache' => time(),
- '$uid' => local_user(),
- '$usecat' => L10n::t('Use Cat as Avatar'),
- '$morecat' => L10n::t('More Random Cat!'),
- '$emailcat' => L10n::t('Reset to email Cat'),
- '$seed' => PConfig::get(local_user(), 'catavatar', 'seed', false),
- '$header' => L10n::t('Cat Avatar Settings'),
+ $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/catavatar/');
+ $html = Renderer::replaceMacros($t, [
+ '$uncache' => time(),
+ '$uid' => DI::userSession()->getLocalUserId(),
+ '$setrandomize' => DI::l10n()->t('Set default profile avatar or randomize the cat.'),
]);
+
+ $data = [
+ 'addon' => 'catavar',
+ 'title' => DI::l10n()->t('Cat Avatar Settings'),
+ 'html' => $html,
+ 'submit' => [
+ 'catavatar-usecat' => DI::l10n()->t('Use Cat as Avatar'),
+ 'catavatar-morecat' => DI::l10n()->t('Another random Cat!'),
+ 'catavatar-emailcat' => DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'catavatar', 'seed', false) ? DI::l10n()->t('Reset to email Cat') : null,
+ ],
+ ];
}
/**
* Cat avatar user settings POST handle
*/
-function catavatar_addon_settings_post(App $a, &$s)
+function catavatar_addon_settings_post(&$s)
{
- if (!local_user()) {
+ if (!DI::userSession()->getLocalUserId()) {
return;
}
- // delete the current cached cat avatar
- $condition = ['uid' => local_user(), 'blocked' => false,
- 'account_expired' => false, 'account_removed' => false];
- $user = DBA::selectFirst('user', ['email'], $condition);
-
- $seed = PConfig::get(local_user(), 'catavatar', 'seed', md5(trim(strtolower($user['email']))));
-
if (!empty($_POST['catavatar-usecat'])) {
- $url = $a->getBaseURL() . '/catavatar/' . local_user() . '?ts=' . time();
+ $url = DI::baseUrl() . '/catavatar/' . DI::userSession()->getLocalUserId() . '?ts=' . time();
- $self = DBA::selectFirst('contact', ['id'], ['uid' => local_user(), 'self' => true]);
+ $self = DBA::selectFirst('contact', ['id'], ['uid' => DI::userSession()->getLocalUserId(), 'self' => true]);
if (!DBA::isResult($self)) {
- notice(L10n::t("The cat hadn't found itself."));
+ DI::sysmsg()->addNotice(DI::l10n()->t("The cat hadn't found itself."));
return;
}
- Photo::importProfilePhoto($url, local_user(), $self['id']);
+ Photo::importProfilePhoto($url, DI::userSession()->getLocalUserId(), $self['id']);
- $condition = ['uid' => local_user(), 'contact-id' => $self['id']];
+ $condition = ['uid' => DI::userSession()->getLocalUserId(), 'contact-id' => $self['id']];
$photo = DBA::selectFirst('photo', ['resource-id'], $condition);
if (!DBA::isResult($photo)) {
- notice(L10n::t('There was an error, the cat ran away.'));
+ DI::sysmsg()->addNotice(DI::l10n()->t('There was an error, the cat ran away.'));
return;
}
- DBA::update('photo', ['profile' => false], ['profile' => true, 'uid' => local_user()]);
+ DBA::update('photo', ['profile' => false], ['profile' => true, 'uid' => DI::userSession()->getLocalUserId()]);
- $fields = ['profile' => true, 'album' => L10n::t('Profile Photos'), 'contact-id' => 0];
- DBA::update('photo', $fields, ['uid' => local_user(), 'resource-id' => $photo['resource-id']]);
+ $fields = ['profile' => true, 'album' => DI::l10n()->t('Profile Photos'), 'contact-id' => 0];
+ DBA::update('photo', $fields, ['uid' => DI::userSession()->getLocalUserId(), 'resource-id' => $photo['resource-id']]);
- Photo::importProfilePhoto($url, local_user(), $self['id']);
+ Photo::importProfilePhoto($url, DI::userSession()->getLocalUserId(), $self['id']);
- Contact::updateSelfFromUserID(local_user(), true);
+ Contact::updateSelfFromUserID(DI::userSession()->getLocalUserId(), true);
// Update global directory in background
- $url = $a->getBaseURL() . '/profile/' . $a->user['nickname'];
- if ($url && strlen(Config::get('system', 'directory'))) {
- Worker::add(PRIORITY_LOW, 'Directory', $url);
- }
+ Profile::publishUpdate(DI::userSession()->getLocalUserId());
- Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
-
- info(L10n::t('Meow!'));
+ DI::sysmsg()->addInfo(DI::l10n()->t('Meow!'));
return;
}
if (!empty($_POST['catavatar-morecat'])) {
- PConfig::set(local_user(), 'catavatar', 'seed', time());
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'catavatar', 'seed', time());
}
if (!empty($_POST['catavatar-emailcat'])) {
- PConfig::delete(local_user(), 'catavatar', 'seed');
+ DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'catavatar', 'seed');
}
}
/**
* Returns the URL to the cat avatar
*
- * @param $a array
* @param &$b array
*/
-function catavatar_lookup(App $a, &$b)
+function catavatar_lookup(array &$b)
{
$user = DBA::selectFirst('user', ['uid'], ['email' => $b['email']]);
- $url = $a->getBaseURL() . '/catavatar/' . $user['uid'];
+ if (DBA::isResult($user)) {
+ $url = DI::baseUrl() . '/catavatar/' . $user['uid'];
+ } else {
+ $url = DI::baseUrl() . '/catavatar/' . md5(trim(strtolower($b['email'])));
+ }
switch($b['size']) {
case 300: $url .= "/4"; break;
case 80: $url .= "/5"; break;
- case 47: $url .= "/6"; break;
+ case 48: $url .= "/6"; break;
}
$b['url'] = $url;
$b['success'] = true;
}
+/**
+ * This is a statement rather than an actual function definition. The simple
+ * existence of this method is checked to figure out if the addon offers a
+ * module.
+ */
function catavatar_module() {}
/**
@@ -160,28 +149,33 @@ function catavatar_module() {}
* @throws NotFoundException
*
*/
-function catavatar_content(App $a)
+function catavatar_content()
{
- if ($a->argc < 2 || $a->argc > 3) {
+ if (DI::args()->getArgc() < 2 || DI::args()->getArgc() > 3) {
throw new NotFoundException(); // this should be catched on index and show default "not found" page.
}
- $uid = intval($a->argv[1]);
+ if (is_numeric(DI::args()->getArgv()[1])) {
+ $uid = intval(DI::args()->getArgv()[1]);
+ $condition = ['uid' => $uid,
+ 'account_expired' => false, 'account_removed' => false];
+ $user = DBA::selectFirst('user', ['email'], $condition);
- $size = 0;
- if ($a->argc == 3) {
- $size = intval($a->argv[2]);
- }
+ if ($user === false) {
+ throw new NotFoundException();
+ }
- $condition = ['uid' => $uid,
- 'account_expired' => false, 'account_removed' => false];
- $user = DBA::selectFirst('user', ['email'], $condition);
-
- if ($user === false) {
+ $seed = DI::pConfig()->get($uid, "catavatar", "seed", md5(trim(strtolower($user['email']))));
+ } elseif (!empty(DI::args()->getArgv()[1])) {
+ $seed = DI::args()->getArgv()[1];
+ } else {
throw new NotFoundException();
}
- $seed = PConfig::get($uid, "catavatar", "seed", md5(trim(strtolower($user['email']))));
+ $size = 0;
+ if (DI::args()->getArgc() == 3) {
+ $size = intval(DI::args()->getArgv()[2]);
+ }
// ...Or start generation
ob_start();
@@ -194,8 +188,6 @@ function catavatar_content(App $a)
exit();
}
-
-
/**
* ====================
* CAT-AVATAR-GENERATOR
diff --git a/catavatar/lang/C/messages.po b/catavatar/lang/C/messages.po
index d22b6a88..24735ca1 100644
--- a/catavatar/lang/C/messages.po
+++ b/catavatar/lang/C/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-04-13 09:35+0000\n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,34 +17,38 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: catavatar.php:60
-msgid "Use Cat as Avatar"
+#: catavatar.php:48
+msgid "Set default profile avatar or randomize the cat."
msgstr ""
-#: catavatar.php:61
-msgid "More Random Cat!"
-msgstr ""
-
-#: catavatar.php:62
-msgid "Reset to email Cat"
-msgstr ""
-
-#: catavatar.php:64
+#: catavatar.php:53
msgid "Cat Avatar Settings"
msgstr ""
-#: catavatar.php:100
+#: catavatar.php:56
+msgid "Use Cat as Avatar"
+msgstr ""
+
+#: catavatar.php:57
+msgid "Another random Cat!"
+msgstr ""
+
+#: catavatar.php:58
+msgid "Reset to email Cat"
+msgstr ""
+
+#: catavatar.php:77
msgid "The cat hadn't found itself."
msgstr ""
-#: catavatar.php:109
+#: catavatar.php:86
msgid "There was an error, the cat ran away."
msgstr ""
-#: catavatar.php:115
+#: catavatar.php:92
msgid "Profile Photos"
msgstr ""
-#: catavatar.php:130
+#: catavatar.php:102
msgid "Meow!"
msgstr ""
diff --git a/catavatar/lang/ar/messages.po b/catavatar/lang/ar/messages.po
new file mode 100644
index 00000000..2b6651f2
--- /dev/null
+++ b/catavatar/lang/ar/messages.po
@@ -0,0 +1,59 @@
+# ADDON catavatar
+# Copyright (C)
+# This file is distributed under the same license as the Friendica catavatar addon package.
+#
+#
+# Translators:
+# Farida Khalaf , 2021
+# abidin toumi , 2021
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-07-25 13:16+0000\n"
+"PO-Revision-Date: 2018-04-07 05:23+0000\n"
+"Last-Translator: abidin toumi , 2021\n"
+"Language-Team: Arabic (https://www.transifex.com/Friendica/teams/12172/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"
+
+#: catavatar.php:49
+msgid "Use Cat as Avatar"
+msgstr "استخدم القط كصورة رمزية"
+
+#: catavatar.php:50
+msgid "More Random Cat!"
+msgstr "المزيد من القطط العشوائية!"
+
+#: catavatar.php:51
+msgid "Reset to email Cat"
+msgstr "إعادة التعيين إلى البريد الإلكتروني للقط"
+
+#: catavatar.php:53
+msgid "Cat Avatar Settings"
+msgstr "إعدادات الصورة القط الرمزية"
+
+#: catavatar.php:54
+msgid "Set default profile avatar or randomize the cat."
+msgstr "عين الصورة الرمزية الافتراضية للملف الشخصي أو عين صورة قط عشوائي."
+
+#: catavatar.php:72
+msgid "The cat hadn't found itself."
+msgstr "القط لم يجد نفسه"
+
+#: catavatar.php:81
+msgid "There was an error, the cat ran away."
+msgstr " هرب القط ،كان هناك خطأ"
+
+#: catavatar.php:87
+msgid "Profile Photos"
+msgstr "الصور الشخصية"
+
+#: catavatar.php:97
+msgid "Meow!"
+msgstr "مياوو"
diff --git a/catavatar/lang/ar/strings.php b/catavatar/lang/ar/strings.php
new file mode 100644
index 00000000..28e549f6
--- /dev/null
+++ b/catavatar/lang/ar/strings.php
@@ -0,0 +1,16 @@
+=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; }
+}}
+$a->strings['Use Cat as Avatar'] = 'استخدم القط كصورة رمزية';
+$a->strings['More Random Cat!'] = 'المزيد من القطط العشوائية!';
+$a->strings['Reset to email Cat'] = 'إعادة التعيين إلى البريد الإلكتروني للقط';
+$a->strings['Cat Avatar Settings'] = 'إعدادات الصورة القط الرمزية';
+$a->strings['Set default profile avatar or randomize the cat.'] = 'عين الصورة الرمزية الافتراضية للملف الشخصي أو عين صورة قط عشوائي.';
+$a->strings['The cat hadn\'t found itself.'] = 'القط لم يجد نفسه';
+$a->strings['There was an error, the cat ran away.'] = ' هرب القط ،كان هناك خطأ';
+$a->strings['Profile Photos'] = 'الصور الشخصية';
+$a->strings['Meow!'] = 'مياوو';
diff --git a/catavatar/lang/ca/strings.php b/catavatar/lang/ca/strings.php
index cb62f492..51fae163 100644
--- a/catavatar/lang/ca/strings.php
+++ b/catavatar/lang/ca/strings.php
@@ -3,14 +3,13 @@
if(! function_exists("string_plural_select_ca")) {
function string_plural_select_ca($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Use Cat as Avatar"] = "Utilitzeu Gat com a Avatar";
-$a->strings["More Random Cat!"] = "Més Random Cat!";
-$a->strings["Reset to email Cat"] = "Restableix el correu electrònic Cat";
-$a->strings["Cat Avatar Settings"] = "Configuració Avatar de cat";
-$a->strings["The cat hadn't found itself."] = "El gat no s'havia trobat.";
-$a->strings["There was an error, the cat ran away."] = "Hi va haver un error, el gat va fugir.";
-$a->strings["Profile Photos"] = "Fotos de perfil";
-$a->strings["Meow!"] = "Meu!";
+$a->strings['Use Cat as Avatar'] = 'Utilitzeu Gat com a Avatar';
+$a->strings['More Random Cat!'] = 'Més Random Cat!';
+$a->strings['Reset to email Cat'] = 'Restableix el correu electrònic Cat';
+$a->strings['Cat Avatar Settings'] = 'Configuració Avatar de cat';
+$a->strings['The cat hadn\'t found itself.'] = 'El gat no s\'havia trobat.';
+$a->strings['There was an error, the cat ran away.'] = 'Hi va haver un error, el gat va fugir.';
+$a->strings['Profile Photos'] = 'Fotos de perfil';
+$a->strings['Meow!'] = 'Meu!';
diff --git a/catavatar/lang/cs/strings.php b/catavatar/lang/cs/strings.php
index 8aad1516..b08e57e7 100644
--- a/catavatar/lang/cs/strings.php
+++ b/catavatar/lang/cs/strings.php
@@ -3,14 +3,13 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
$n = intval($n);
- return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
+ if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; }
}}
-;
-$a->strings["Use Cat as Avatar"] = "Použít kočku jako avatar";
-$a->strings["More Random Cat!"] = "Další náhodné kočky!";
-$a->strings["Reset to email Cat"] = "Resetovat a e-mailovat kočku";
-$a->strings["Cat Avatar Settings"] = "Nastavení Cat Avatar";
-$a->strings["The cat hadn't found itself."] = "Kočka se nenašla.";
-$a->strings["There was an error, the cat ran away."] = "Vyskytla se chyba, kočka utekla.";
-$a->strings["Profile Photos"] = "Profilové fotky";
-$a->strings["Meow!"] = "Mňau!";
+$a->strings['Use Cat as Avatar'] = 'Použít kočku jako avatar';
+$a->strings['More Random Cat!'] = 'Další náhodné kočky!';
+$a->strings['Reset to email Cat'] = 'Resetovat a e-mailovat kočku';
+$a->strings['Cat Avatar Settings'] = 'Nastavení Cat Avatar';
+$a->strings['The cat hadn\'t found itself.'] = 'Kočka se nenašla.';
+$a->strings['There was an error, the cat ran away.'] = 'Vyskytla se chyba, kočka utekla.';
+$a->strings['Profile Photos'] = 'Profilové fotky';
+$a->strings['Meow!'] = 'Mňau!';
diff --git a/catavatar/lang/da-dk/messages.po b/catavatar/lang/da-dk/messages.po
new file mode 100644
index 00000000..c492097c
--- /dev/null
+++ b/catavatar/lang/da-dk/messages.po
@@ -0,0 +1,58 @@
+# ADDON catavatar
+# Copyright (C)
+# This file is distributed under the same license as the Friendica catavatar addon package.
+#
+#
+# Translators:
+# Anton , 2022
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2018-04-07 05:23+0000\n"
+"Last-Translator: Anton , 2022\n"
+"Language-Team: Danish (Denmark) (https://www.transifex.com/Friendica/teams/12172/da_DK/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: da_DK\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: catavatar.php:48
+msgid "Set default profile avatar or randomize the cat."
+msgstr ""
+
+#: catavatar.php:53
+msgid "Cat Avatar Settings"
+msgstr ""
+
+#: catavatar.php:56
+msgid "Use Cat as Avatar"
+msgstr ""
+
+#: catavatar.php:57
+msgid "Another random Cat!"
+msgstr ""
+
+#: catavatar.php:58
+msgid "Reset to email Cat"
+msgstr ""
+
+#: catavatar.php:77
+msgid "The cat hadn't found itself."
+msgstr "Katten havde ikke fundet sig selv."
+
+#: catavatar.php:86
+msgid "There was an error, the cat ran away."
+msgstr ""
+
+#: catavatar.php:92
+msgid "Profile Photos"
+msgstr ""
+
+#: catavatar.php:102
+msgid "Meow!"
+msgstr ""
diff --git a/catavatar/lang/da-dk/strings.php b/catavatar/lang/da-dk/strings.php
new file mode 100644
index 00000000..677f4b54
--- /dev/null
+++ b/catavatar/lang/da-dk/strings.php
@@ -0,0 +1,8 @@
+strings['The cat hadn\'t found itself.'] = 'Katten havde ikke fundet sig selv.';
diff --git a/catavatar/lang/de/messages.po b/catavatar/lang/de/messages.po
index 192300c8..f99acaba 100644
--- a/catavatar/lang/de/messages.po
+++ b/catavatar/lang/de/messages.po
@@ -3,51 +3,61 @@
# This file is distributed under the same license as the Friendica catavatar addon package.
#
#
+# Translators:
+# Ulf Rompe , 2019
+# Tobias Diekershoff , 2022
+#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-04-13 09:35+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: Tobias Diekershoff , 2018\n"
-"Language-Team: German (https://www.transifex.com/Friendica/teams/12172/de/)\n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2018-04-07 05:23+0000\n"
+"Last-Translator: Tobias Diekershoff , 2022\n"
+"Language-Team: German (https://app.transifex.com/Friendica/teams/12172/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"
-#: catavatar.php:60
+#: catavatar.php:48
+msgid "Set default profile avatar or randomize the cat."
+msgstr ""
+"Wähle das standardmäßig verwendete Profilbild oder ein zufällig erzeugtes "
+"Katzenbild."
+
+#: catavatar.php:53
+msgid "Cat Avatar Settings"
+msgstr "Katzen-Profilbild-Einstellungen"
+
+#: catavatar.php:56
msgid "Use Cat as Avatar"
msgstr "Verwende diese Katze als Profilbild"
-#: catavatar.php:61
-msgid "More Random Cat!"
-msgstr "Weitere zufällige Katze"
+#: catavatar.php:57
+msgid "Another random Cat!"
+msgstr "Eine andere zufällige Katze"
-#: catavatar.php:62
+#: catavatar.php:58
msgid "Reset to email Cat"
-msgstr "Zurück zu E-Mail Katze"
+msgstr "Zurück zu E-Mail-Katze"
-#: catavatar.php:64
-msgid "Cat Avatar Settings"
-msgstr "Katzen Profilbild Einstellungen"
-
-#: catavatar.php:100
+#: catavatar.php:77
msgid "The cat hadn't found itself."
msgstr ""
"Es ist ein Problem mit der Datenbank aufgetreten. Die Katze konnte sich "
"nicht selbst finden."
-#: catavatar.php:109
+#: catavatar.php:86
msgid "There was an error, the cat ran away."
-msgstr "Upps es gab einen Fehler und die Katze ist weggelaufen"
+msgstr "Upps, es gab einen Fehler und die Katze ist weggelaufen"
-#: catavatar.php:115
+#: catavatar.php:92
msgid "Profile Photos"
msgstr "Profilbilder"
-#: catavatar.php:130
+#: catavatar.php:102
msgid "Meow!"
msgstr "Miau!"
diff --git a/catavatar/lang/de/strings.php b/catavatar/lang/de/strings.php
index a92ff79d..2d1cdcc0 100644
--- a/catavatar/lang/de/strings.php
+++ b/catavatar/lang/de/strings.php
@@ -2,14 +2,15 @@
if(! function_exists("string_plural_select_de")) {
function string_plural_select_de($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Use Cat as Avatar"] = "Verwende diese Katze als Profilbild";
-$a->strings["More Random Cat!"] = "Weitere zufällige Katze";
-$a->strings["Reset to email Cat"] = "Zurück zu E-Mail Katze";
-$a->strings["Cat Avatar Settings"] = "Katzen Profilbild Einstellungen";
-$a->strings["The cat hadn't found itself."] = "Es ist ein Problem mit der Datenbank aufgetreten. Die Katze konnte sich nicht selbst finden.";
-$a->strings["There was an error, the cat ran away."] = "Upps es gab einen Fehler und die Katze ist weggelaufen";
-$a->strings["Profile Photos"] = "Profilbilder";
-$a->strings["Meow!"] = "Miau!";
+$a->strings['Set default profile avatar or randomize the cat.'] = 'Wähle das standardmäßig verwendete Profilbild oder ein zufällig erzeugtes Katzenbild.';
+$a->strings['Cat Avatar Settings'] = 'Katzen-Profilbild-Einstellungen';
+$a->strings['Use Cat as Avatar'] = 'Verwende diese Katze als Profilbild';
+$a->strings['Another random Cat!'] = 'Eine andere zufällige Katze';
+$a->strings['Reset to email Cat'] = 'Zurück zu E-Mail-Katze';
+$a->strings['The cat hadn\'t found itself.'] = 'Es ist ein Problem mit der Datenbank aufgetreten. Die Katze konnte sich nicht selbst finden.';
+$a->strings['There was an error, the cat ran away.'] = 'Upps, es gab einen Fehler und die Katze ist weggelaufen';
+$a->strings['Profile Photos'] = 'Profilbilder';
+$a->strings['Meow!'] = 'Miau!';
diff --git a/catavatar/lang/en-gb/strings.php b/catavatar/lang/en-gb/strings.php
index f37ebd61..552cfd96 100644
--- a/catavatar/lang/en-gb/strings.php
+++ b/catavatar/lang/en-gb/strings.php
@@ -2,14 +2,14 @@
if(! function_exists("string_plural_select_en_gb")) {
function string_plural_select_en_gb($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Use Cat as Avatar"] = "Use Cat as Avatar";
-$a->strings["More Random Cat!"] = "Another Random Cat!";
-$a->strings["Reset to email Cat"] = "Reset to email Cat";
-$a->strings["Cat Avatar Settings"] = "Cat Avatar Settings";
-$a->strings["The cat hadn't found itself."] = "There was a database error, the cat has got lost.";
-$a->strings["There was an error, the cat ran away."] = "There was an error, the cat ran away.";
-$a->strings["Profile Photos"] = "Profile Photos";
-$a->strings["Meow!"] = "Meow!";
+$a->strings['Use Cat as Avatar'] = 'Use Cat as Avatar';
+$a->strings['More Random Cat!'] = 'Another Random Cat!';
+$a->strings['Reset to email Cat'] = 'Reset to email Cat';
+$a->strings['Cat Avatar Settings'] = 'Cat Avatar Settings';
+$a->strings['The cat hadn\'t found itself.'] = 'There was a database error, the cat has got lost.';
+$a->strings['There was an error, the cat ran away.'] = 'There was an error, the cat ran away.';
+$a->strings['Profile Photos'] = 'Profile Photos';
+$a->strings['Meow!'] = 'Meow!';
diff --git a/catavatar/lang/es/messages.po b/catavatar/lang/es/messages.po
index ede5e8e5..5934a618 100644
--- a/catavatar/lang/es/messages.po
+++ b/catavatar/lang/es/messages.po
@@ -3,14 +3,18 @@
# This file is distributed under the same license as the Friendica catavatar addon package.
#
#
+# Translators:
+# Albert, 2018
+# Boris Daniel Martinez Millàn , 2021
+#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-04-13 09:35+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: Albert, 2018\n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2018-04-07 05:23+0000\n"
+"Last-Translator: Boris Daniel Martinez Millàn , 2021\n"
"Language-Team: Spanish (https://www.transifex.com/Friendica/teams/12172/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -18,34 +22,39 @@ msgstr ""
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: catavatar.php:60
+#: catavatar.php:48
msgid "Use Cat as Avatar"
msgstr "Usar Gato como Avatar"
-#: catavatar.php:61
+#: catavatar.php:49
msgid "More Random Cat!"
msgstr "¡Más gato al azar!"
-#: catavatar.php:62
+#: catavatar.php:50
msgid "Reset to email Cat"
msgstr "Restablecer a correo electrónico Gato"
-#: catavatar.php:64
+#: catavatar.php:52
msgid "Cat Avatar Settings"
msgstr "Ajustes de Avatar Gato"
-#: catavatar.php:100
+#: catavatar.php:53
+msgid "Set default profile avatar or randomize the cat."
+msgstr ""
+"Establezca su avatar de perfil o pondremos una foto de un gato al azar"
+
+#: catavatar.php:78
msgid "The cat hadn't found itself."
msgstr "El gato no se había encontrado."
-#: catavatar.php:109
+#: catavatar.php:87
msgid "There was an error, the cat ran away."
msgstr "Hubo un error, el gato se escapó."
-#: catavatar.php:115
+#: catavatar.php:93
msgid "Profile Photos"
msgstr "Fotos de perfil"
-#: catavatar.php:130
+#: catavatar.php:108
msgid "Meow!"
msgstr "¡Miau!"
diff --git a/catavatar/lang/es/strings.php b/catavatar/lang/es/strings.php
index 72ba6990..725100b2 100644
--- a/catavatar/lang/es/strings.php
+++ b/catavatar/lang/es/strings.php
@@ -3,14 +3,14 @@
if(! function_exists("string_plural_select_es")) {
function string_plural_select_es($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Use Cat as Avatar"] = "Usar Gato como Avatar";
-$a->strings["More Random Cat!"] = "¡Más gato al azar!";
-$a->strings["Reset to email Cat"] = "Restablecer a correo electrónico Gato";
-$a->strings["Cat Avatar Settings"] = "Ajustes de Avatar Gato";
-$a->strings["The cat hadn't found itself."] = "El gato no se había encontrado.";
-$a->strings["There was an error, the cat ran away."] = "Hubo un error, el gato se escapó.";
-$a->strings["Profile Photos"] = "Fotos de perfil";
-$a->strings["Meow!"] = "¡Miau!";
+$a->strings['Use Cat as Avatar'] = 'Usar Gato como Avatar';
+$a->strings['More Random Cat!'] = '¡Más gato al azar!';
+$a->strings['Reset to email Cat'] = 'Restablecer a correo electrónico Gato';
+$a->strings['Cat Avatar Settings'] = 'Ajustes de Avatar Gato';
+$a->strings['Set default profile avatar or randomize the cat.'] = 'Establezca su avatar de perfil o pondremos una foto de un gato al azar';
+$a->strings['The cat hadn\'t found itself.'] = 'El gato no se había encontrado.';
+$a->strings['There was an error, the cat ran away.'] = 'Hubo un error, el gato se escapó.';
+$a->strings['Profile Photos'] = 'Fotos de perfil';
+$a->strings['Meow!'] = '¡Miau!';
diff --git a/catavatar/lang/fi-fi/strings.php b/catavatar/lang/fi-fi/strings.php
index ebcd678c..fd1907c5 100644
--- a/catavatar/lang/fi-fi/strings.php
+++ b/catavatar/lang/fi-fi/strings.php
@@ -2,14 +2,13 @@
if(! function_exists("string_plural_select_fi_fi")) {
function string_plural_select_fi_fi($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Use Cat as Avatar"] = "Ota kissa-avatari käyttöön";
-$a->strings["More Random Cat!"] = "Lisää satunnaisia kissoja!";
-$a->strings["Reset to email Cat"] = "";
-$a->strings["Cat Avatar Settings"] = "Cat Avatar -asetukset";
-$a->strings["The cat hadn't found itself."] = "Tietokantavirhe, kissa on eksyksissä.";
-$a->strings["There was an error, the cat ran away."] = "Tapahtui virhe, kissa juoksi karkuun.";
-$a->strings["Profile Photos"] = "Profiilikuvia";
-$a->strings["Meow!"] = "Miau!";
+$a->strings['Use Cat as Avatar'] = 'Ota kissa-avatari käyttöön';
+$a->strings['More Random Cat!'] = 'Lisää satunnaisia kissoja!';
+$a->strings['Cat Avatar Settings'] = 'Cat Avatar -asetukset';
+$a->strings['The cat hadn\'t found itself.'] = 'Tietokantavirhe, kissa on eksyksissä.';
+$a->strings['There was an error, the cat ran away.'] = 'Tapahtui virhe, kissa juoksi karkuun.';
+$a->strings['Profile Photos'] = 'Profiilikuvia';
+$a->strings['Meow!'] = 'Miau!';
diff --git a/catavatar/lang/fr/messages.po b/catavatar/lang/fr/messages.po
index 3c4e03f6..f4c4dd0d 100644
--- a/catavatar/lang/fr/messages.po
+++ b/catavatar/lang/fr/messages.po
@@ -5,50 +5,56 @@
#
# Translators:
# Vladimir Núñez , 2019
+# Walter Bulbazor, 2021
+# Hypolite Petovan , 2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-04-13 09:35+0000\n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: 2018-04-07 05:23+0000\n"
-"Last-Translator: Vladimir Núñez , 2019\n"
+"Last-Translator: Hypolite Petovan , 2022\n"
"Language-Team: French (https://www.transifex.com/Friendica/teams/12172/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"
+"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
-#: catavatar.php:60
-msgid "Use Cat as Avatar"
-msgstr "Utiliser Chat comme avatar"
+#: catavatar.php:48
+msgid "Set default profile avatar or randomize the cat."
+msgstr "Mettre l'avatar par défaut ou tirer au sort le Chat."
-#: catavatar.php:61
-msgid "More Random Cat!"
-msgstr "Autres Chats au hasard"
-
-#: catavatar.php:62
-msgid "Reset to email Cat"
-msgstr "Réinitialiser à Chat courriel"
-
-#: catavatar.php:64
+#: catavatar.php:53
msgid "Cat Avatar Settings"
msgstr "Paramètres de Chat avatar"
-#: catavatar.php:100
+#: catavatar.php:56
+msgid "Use Cat as Avatar"
+msgstr "Utiliser Chat comme avatar"
+
+#: catavatar.php:57
+msgid "Another random Cat!"
+msgstr "Un autre chat aléatoire !"
+
+#: catavatar.php:58
+msgid "Reset to email Cat"
+msgstr "Réinitialiser à Chat courriel"
+
+#: catavatar.php:77
msgid "The cat hadn't found itself."
msgstr "Le Chat ne s'y est pas retrouvé"
-#: catavatar.php:109
+#: catavatar.php:86
msgid "There was an error, the cat ran away."
msgstr "Il y a eu une erreur et le chat s'est enfui"
-#: catavatar.php:115
+#: catavatar.php:92
msgid "Profile Photos"
msgstr "Photos de profil"
-#: catavatar.php:130
+#: catavatar.php:102
msgid "Meow!"
msgstr "Miaou !"
diff --git a/catavatar/lang/fr/strings.php b/catavatar/lang/fr/strings.php
index 78976bf5..5d8a10a3 100644
--- a/catavatar/lang/fr/strings.php
+++ b/catavatar/lang/fr/strings.php
@@ -3,14 +3,14 @@
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
$n = intval($n);
- return ($n > 1);;
+ if (($n == 0 || $n == 1)) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; }
}}
-;
-$a->strings["Use Cat as Avatar"] = "Utiliser Chat comme avatar";
-$a->strings["More Random Cat!"] = "Autres Chats au hasard";
-$a->strings["Reset to email Cat"] = "Réinitialiser à Chat courriel";
-$a->strings["Cat Avatar Settings"] = "Paramètres de Chat avatar";
-$a->strings["The cat hadn't found itself."] = "Le Chat ne s'y est pas retrouvé";
-$a->strings["There was an error, the cat ran away."] = "Il y a eu une erreur et le chat s'est enfui";
-$a->strings["Profile Photos"] = "Photos de profil";
-$a->strings["Meow!"] = "Miaou !";
+$a->strings['Set default profile avatar or randomize the cat.'] = 'Mettre l\'avatar par défaut ou tirer au sort le Chat.';
+$a->strings['Cat Avatar Settings'] = 'Paramètres de Chat avatar';
+$a->strings['Use Cat as Avatar'] = 'Utiliser Chat comme avatar';
+$a->strings['Another random Cat!'] = 'Un autre chat aléatoire !';
+$a->strings['Reset to email Cat'] = 'Réinitialiser à Chat courriel';
+$a->strings['The cat hadn\'t found itself.'] = 'Le Chat ne s\'y est pas retrouvé';
+$a->strings['There was an error, the cat ran away.'] = 'Il y a eu une erreur et le chat s\'est enfui';
+$a->strings['Profile Photos'] = 'Photos de profil';
+$a->strings['Meow!'] = 'Miaou !';
diff --git a/catavatar/lang/hu/messages.po b/catavatar/lang/hu/messages.po
new file mode 100644
index 00000000..912cf035
--- /dev/null
+++ b/catavatar/lang/hu/messages.po
@@ -0,0 +1,58 @@
+# ADDON catavatar
+# Copyright (C)
+# This file is distributed under the same license as the Friendica catavatar addon package.
+#
+#
+# Translators:
+# Balázs Úr, 2021
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2018-04-07 05:23+0000\n"
+"Last-Translator: Balázs Úr, 2021\n"
+"Language-Team: Hungarian (https://www.transifex.com/Friendica/teams/12172/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"
+
+#: catavatar.php:48
+msgid "Set default profile avatar or randomize the cat."
+msgstr "Alapértelmezett profilkép beállítása vagy véletlenszerű macska."
+
+#: catavatar.php:53
+msgid "Cat Avatar Settings"
+msgstr "Macskaprofilkép-beállítások"
+
+#: catavatar.php:56
+msgid "Use Cat as Avatar"
+msgstr "Macska használata profilképként"
+
+#: catavatar.php:57
+msgid "Another random Cat!"
+msgstr "Egy másik véletlenszerű macska!"
+
+#: catavatar.php:58
+msgid "Reset to email Cat"
+msgstr "Visszaállítás e-mail macskára"
+
+#: catavatar.php:77
+msgid "The cat hadn't found itself."
+msgstr "A macska nem találta meg önmagát."
+
+#: catavatar.php:86
+msgid "There was an error, the cat ran away."
+msgstr "Hiba történt, a macska elfutott."
+
+#: catavatar.php:92
+msgid "Profile Photos"
+msgstr "Profilfényképek"
+
+#: catavatar.php:102
+msgid "Meow!"
+msgstr "Miáú!"
diff --git a/catavatar/lang/hu/strings.php b/catavatar/lang/hu/strings.php
new file mode 100644
index 00000000..a47b4df0
--- /dev/null
+++ b/catavatar/lang/hu/strings.php
@@ -0,0 +1,16 @@
+strings['Set default profile avatar or randomize the cat.'] = 'Alapértelmezett profilkép beállítása vagy véletlenszerű macska.';
+$a->strings['Cat Avatar Settings'] = 'Macskaprofilkép-beállítások';
+$a->strings['Use Cat as Avatar'] = 'Macska használata profilképként';
+$a->strings['Another random Cat!'] = 'Egy másik véletlenszerű macska!';
+$a->strings['Reset to email Cat'] = 'Visszaállítás e-mail macskára';
+$a->strings['The cat hadn\'t found itself.'] = 'A macska nem találta meg önmagát.';
+$a->strings['There was an error, the cat ran away.'] = 'Hiba történt, a macska elfutott.';
+$a->strings['Profile Photos'] = 'Profilfényképek';
+$a->strings['Meow!'] = 'Miáú!';
diff --git a/catavatar/lang/is/strings.php b/catavatar/lang/is/strings.php
index a4266e21..cb2e2214 100644
--- a/catavatar/lang/is/strings.php
+++ b/catavatar/lang/is/strings.php
@@ -3,14 +3,7 @@
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
- return ($n % 10 != 1 || $n % 100 == 11);;
+ return intval($n % 10 != 1 || $n % 100 == 11);
}}
-;
-$a->strings["Use Cat as Avatar"] = "";
-$a->strings["More Random Cat!"] = "";
-$a->strings["Reset to email Cat"] = "";
-$a->strings["Cat Avatar Settings"] = "";
-$a->strings["The cat hadn't found itself."] = "";
-$a->strings["There was an error, the cat ran away."] = "";
-$a->strings["Profile Photos"] = "Forsíðumyndir";
-$a->strings["Meow!"] = "Mjá!";
+$a->strings['Profile Photos'] = 'Forsíðumyndir';
+$a->strings['Meow!'] = 'Mjá!';
diff --git a/catavatar/lang/it/messages.po b/catavatar/lang/it/messages.po
index a190615c..e05bd277 100644
--- a/catavatar/lang/it/messages.po
+++ b/catavatar/lang/it/messages.po
@@ -3,14 +3,19 @@
# This file is distributed under the same license as the Friendica catavatar addon package.
#
#
+# Translators:
+# fabrixxm , 2018
+# Davide Pesenti , 2018
+# Sylke Vicious , 2021
+#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-04-13 09:35+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: Davide Pesenti , 2018\n"
+"POT-Creation-Date: 2020-12-29 00:53+0000\n"
+"PO-Revision-Date: 2018-04-07 05:23+0000\n"
+"Last-Translator: Sylke Vicious , 2021\n"
"Language-Team: Italian (https://www.transifex.com/Friendica/teams/12172/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -18,34 +23,38 @@ msgstr ""
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: catavatar.php:60
+#: catavatar.php:48
msgid "Use Cat as Avatar"
msgstr "Usa il Gatto come avatar"
-#: catavatar.php:61
+#: catavatar.php:49
msgid "More Random Cat!"
msgstr "Altro Gatto a caso!"
-#: catavatar.php:62
+#: catavatar.php:50
msgid "Reset to email Cat"
msgstr "Reimposta Gatto"
-#: catavatar.php:64
+#: catavatar.php:52
msgid "Cat Avatar Settings"
msgstr "Impostazioni Avatar Gatto"
-#: catavatar.php:100
+#: catavatar.php:53
+msgid "Set default profile avatar or randomize the cat."
+msgstr "Imposta l'immagine di profilo predefinita o crea un gatto casuale."
+
+#: catavatar.php:78
msgid "The cat hadn't found itself."
msgstr "Il gatto non ha trovato sé stesso."
-#: catavatar.php:109
+#: catavatar.php:87
msgid "There was an error, the cat ran away."
msgstr "Si è verificato un errore, il gatto è scappato."
-#: catavatar.php:115
+#: catavatar.php:93
msgid "Profile Photos"
msgstr "Foto del profilo"
-#: catavatar.php:130
+#: catavatar.php:108
msgid "Meow!"
msgstr "Miao!"
diff --git a/catavatar/lang/it/strings.php b/catavatar/lang/it/strings.php
index a3c1aa98..3a33374a 100644
--- a/catavatar/lang/it/strings.php
+++ b/catavatar/lang/it/strings.php
@@ -2,14 +2,15 @@
if(! function_exists("string_plural_select_it")) {
function string_plural_select_it($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Use Cat as Avatar"] = "Usa il Gatto come avatar";
-$a->strings["More Random Cat!"] = "Altro Gatto a caso!";
-$a->strings["Reset to email Cat"] = "Reimposta Gatto";
-$a->strings["Cat Avatar Settings"] = "Impostazioni Avatar Gatto";
-$a->strings["The cat hadn't found itself."] = "Il gatto non ha trovato sé stesso.";
-$a->strings["There was an error, the cat ran away."] = "Si è verificato un errore, il gatto è scappato.";
-$a->strings["Profile Photos"] = "Foto del profilo";
-$a->strings["Meow!"] = "Miao!";
+$a->strings['Use Cat as Avatar'] = 'Usa il Gatto come avatar';
+$a->strings['More Random Cat!'] = 'Altro Gatto a caso!';
+$a->strings['Reset to email Cat'] = 'Reimposta Gatto';
+$a->strings['Cat Avatar Settings'] = 'Impostazioni Avatar Gatto';
+$a->strings['Set default profile avatar or randomize the cat.'] = 'Imposta l\'immagine di profilo predefinita o crea un gatto casuale.';
+$a->strings['The cat hadn\'t found itself.'] = 'Il gatto non ha trovato sé stesso.';
+$a->strings['There was an error, the cat ran away.'] = 'Si è verificato un errore, il gatto è scappato.';
+$a->strings['Profile Photos'] = 'Foto del profilo';
+$a->strings['Meow!'] = 'Miao!';
diff --git a/catavatar/lang/nl/strings.php b/catavatar/lang/nl/strings.php
index f97a6ef5..27994280 100644
--- a/catavatar/lang/nl/strings.php
+++ b/catavatar/lang/nl/strings.php
@@ -3,14 +3,13 @@
if(! function_exists("string_plural_select_nl")) {
function string_plural_select_nl($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Use Cat as Avatar"] = "Gebruik een kat als avatar";
-$a->strings["More Random Cat!"] = "Meer willekeurige kat!";
-$a->strings["Reset to email Cat"] = "Email kat opnieuw instellen.";
-$a->strings["Cat Avatar Settings"] = "Kat Avatar instellingen";
-$a->strings["The cat hadn't found itself."] = "Het katje kon zichzelf niet vinden.";
-$a->strings["There was an error, the cat ran away."] = "Er was een fout, de kat liep weg.";
-$a->strings["Profile Photos"] = "Profielfoto's";
-$a->strings["Meow!"] = "Miauw!";
+$a->strings['Use Cat as Avatar'] = 'Gebruik een kat als avatar';
+$a->strings['More Random Cat!'] = 'Meer willekeurige kat!';
+$a->strings['Reset to email Cat'] = 'Email kat opnieuw instellen.';
+$a->strings['Cat Avatar Settings'] = 'Kat Avatar instellingen';
+$a->strings['The cat hadn\'t found itself.'] = 'Het katje kon zichzelf niet vinden.';
+$a->strings['There was an error, the cat ran away.'] = 'Er was een fout, de kat liep weg.';
+$a->strings['Profile Photos'] = 'Profielfoto\'s';
+$a->strings['Meow!'] = 'Miauw!';
diff --git a/catavatar/lang/pl/messages.po b/catavatar/lang/pl/messages.po
index b1d66bc7..5bcf50b3 100644
--- a/catavatar/lang/pl/messages.po
+++ b/catavatar/lang/pl/messages.po
@@ -3,14 +3,18 @@
# This file is distributed under the same license as the Friendica catavatar addon package.
#
#
+# Translators:
+# Waldemar Stoczkowski, 2018
+# Piotr Strębski , 2022
+#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-04-13 09:35+0000\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: Waldemar Stoczkowski , 2018\n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2018-04-07 05:23+0000\n"
+"Last-Translator: Piotr Strębski , 2022\n"
"Language-Team: Polish (https://www.transifex.com/Friendica/teams/12172/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -18,34 +22,38 @@ msgstr ""
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
-#: catavatar.php:60
-msgid "Use Cat as Avatar"
-msgstr "Użyj kota jako awatara"
+#: catavatar.php:48
+msgid "Set default profile avatar or randomize the cat."
+msgstr "Ustaw domyślny awatar profilu lub użyj losowego kota."
-#: catavatar.php:61
-msgid "More Random Cat!"
-msgstr "Więcej losowych kotów!"
-
-#: catavatar.php:62
-msgid "Reset to email Cat"
-msgstr "Resetuj na e-mail Kot"
-
-#: catavatar.php:64
+#: catavatar.php:53
msgid "Cat Avatar Settings"
msgstr "Ustawienia Kot Avatar"
-#: catavatar.php:100
+#: catavatar.php:56
+msgid "Use Cat as Avatar"
+msgstr "Użyj kota jako awatara"
+
+#: catavatar.php:57
+msgid "Another random Cat!"
+msgstr "Inny losowy kot!"
+
+#: catavatar.php:58
+msgid "Reset to email Cat"
+msgstr "Resetuj Kota na e-mail"
+
+#: catavatar.php:77
msgid "The cat hadn't found itself."
msgstr "Kot się nie znalazł."
-#: catavatar.php:109
+#: catavatar.php:86
msgid "There was an error, the cat ran away."
msgstr "Wystąpił błąd, kot uciekł."
-#: catavatar.php:115
+#: catavatar.php:92
msgid "Profile Photos"
msgstr "Zdjęcie profilowe"
-#: catavatar.php:130
+#: catavatar.php:102
msgid "Meow!"
msgstr "Miau!"
diff --git a/catavatar/lang/pl/strings.php b/catavatar/lang/pl/strings.php
index 203d1a97..cb15c046 100644
--- a/catavatar/lang/pl/strings.php
+++ b/catavatar/lang/pl/strings.php
@@ -2,14 +2,15 @@
if(! function_exists("string_plural_select_pl")) {
function string_plural_select_pl($n){
- return ($n==1 ? 0 : ($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14) ? 1 : $n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14) ? 2 : 3);;
+ $n = intval($n);
+ if ($n==1) { return 0; } else if (($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["Use Cat as Avatar"] = "Użyj kota jako awatara";
-$a->strings["More Random Cat!"] = "Więcej losowych kotów!";
-$a->strings["Reset to email Cat"] = "Resetuj na e-mail Kot";
-$a->strings["Cat Avatar Settings"] = "Ustawienia Kot Avatar";
-$a->strings["The cat hadn't found itself."] = "Kot się nie znalazł.";
-$a->strings["There was an error, the cat ran away."] = "Wystąpił błąd, kot uciekł.";
-$a->strings["Profile Photos"] = "Zdjęcie profilowe";
-$a->strings["Meow!"] = "Miau!";
+$a->strings['Set default profile avatar or randomize the cat.'] = 'Ustaw domyślny awatar profilu lub użyj losowego kota.';
+$a->strings['Cat Avatar Settings'] = 'Ustawienia Kot Avatar';
+$a->strings['Use Cat as Avatar'] = 'Użyj kota jako awatara';
+$a->strings['Another random Cat!'] = 'Inny losowy kot!';
+$a->strings['Reset to email Cat'] = 'Resetuj Kota na e-mail';
+$a->strings['The cat hadn\'t found itself.'] = 'Kot się nie znalazł.';
+$a->strings['There was an error, the cat ran away.'] = 'Wystąpił błąd, kot uciekł.';
+$a->strings['Profile Photos'] = 'Zdjęcie profilowe';
+$a->strings['Meow!'] = 'Miau!';
diff --git a/catavatar/lang/ru/messages.po b/catavatar/lang/ru/messages.po
new file mode 100644
index 00000000..8a53c182
--- /dev/null
+++ b/catavatar/lang/ru/messages.po
@@ -0,0 +1,54 @@
+# ADDON catavatar
+# Copyright (C)
+# This file is distributed under the same license as the Friendica catavatar addon package.
+#
+#
+# Translators:
+# Alexander An , 2020
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-04-13 09:35+0000\n"
+"PO-Revision-Date: 2018-04-07 05:23+0000\n"
+"Last-Translator: Alexander An , 2020\n"
+"Language-Team: Russian (https://www.transifex.com/Friendica/teams/12172/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"
+
+#: catavatar.php:60
+msgid "Use Cat as Avatar"
+msgstr "Поставить кота на аватар"
+
+#: catavatar.php:61
+msgid "More Random Cat!"
+msgstr "Сгенерировать ещё котов!"
+
+#: catavatar.php:62
+msgid "Reset to email Cat"
+msgstr "Сбросить на кота по-умолчанию"
+
+#: catavatar.php:64
+msgid "Cat Avatar Settings"
+msgstr "Настройки Cat Avatar"
+
+#: catavatar.php:100
+msgid "The cat hadn't found itself."
+msgstr "Кот не нашёл сам себя."
+
+#: catavatar.php:109
+msgid "There was an error, the cat ran away."
+msgstr "Возникла ошибка, кот убежал."
+
+#: catavatar.php:115
+msgid "Profile Photos"
+msgstr "Фото профиля"
+
+#: catavatar.php:130
+msgid "Meow!"
+msgstr "Мяу!"
diff --git a/catavatar/lang/ru/strings.php b/catavatar/lang/ru/strings.php
new file mode 100644
index 00000000..e8ab1b5f
--- /dev/null
+++ b/catavatar/lang/ru/strings.php
@@ -0,0 +1,15 @@
+=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; }
+}}
+$a->strings['Use Cat as Avatar'] = 'Поставить кота на аватар';
+$a->strings['More Random Cat!'] = 'Сгенерировать ещё котов!';
+$a->strings['Reset to email Cat'] = 'Сбросить на кота по-умолчанию';
+$a->strings['Cat Avatar Settings'] = 'Настройки Cat Avatar';
+$a->strings['The cat hadn\'t found itself.'] = 'Кот не нашёл сам себя.';
+$a->strings['There was an error, the cat ran away.'] = 'Возникла ошибка, кот убежал.';
+$a->strings['Profile Photos'] = 'Фото профиля';
+$a->strings['Meow!'] = 'Мяу!';
diff --git a/catavatar/lang/sv/messages.po b/catavatar/lang/sv/messages.po
new file mode 100644
index 00000000..c53de04d
--- /dev/null
+++ b/catavatar/lang/sv/messages.po
@@ -0,0 +1,58 @@
+# ADDON catavatar
+# Copyright (C)
+# This file is distributed under the same license as the Friendica catavatar addon package.
+#
+#
+# Translators:
+# Bjoessi , 2019
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2018-04-07 05:23+0000\n"
+"Last-Translator: Bjoessi , 2019\n"
+"Language-Team: Swedish (https://www.transifex.com/Friendica/teams/12172/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"
+
+#: catavatar.php:48
+msgid "Set default profile avatar or randomize the cat."
+msgstr ""
+
+#: catavatar.php:53
+msgid "Cat Avatar Settings"
+msgstr "Inställningar för profilkatt"
+
+#: catavatar.php:56
+msgid "Use Cat as Avatar"
+msgstr "Använd katt som profilbild"
+
+#: catavatar.php:57
+msgid "Another random Cat!"
+msgstr ""
+
+#: catavatar.php:58
+msgid "Reset to email Cat"
+msgstr "Återställ till epost-katt"
+
+#: catavatar.php:77
+msgid "The cat hadn't found itself."
+msgstr ""
+
+#: catavatar.php:86
+msgid "There was an error, the cat ran away."
+msgstr ""
+
+#: catavatar.php:92
+msgid "Profile Photos"
+msgstr ""
+
+#: catavatar.php:102
+msgid "Meow!"
+msgstr ""
diff --git a/catavatar/lang/sv/strings.php b/catavatar/lang/sv/strings.php
new file mode 100644
index 00000000..1bdcc993
--- /dev/null
+++ b/catavatar/lang/sv/strings.php
@@ -0,0 +1,10 @@
+strings['Cat Avatar Settings'] = 'Inställningar för profilkatt';
+$a->strings['Use Cat as Avatar'] = 'Använd katt som profilbild';
+$a->strings['Reset to email Cat'] = 'Återställ till epost-katt';
diff --git a/catavatar/templates/settings.tpl b/catavatar/templates/settings.tpl
index 19f5f0bb..7659a9c8 100644
--- a/catavatar/templates/settings.tpl
+++ b/catavatar/templates/settings.tpl
@@ -1,24 +1,2 @@
-
-
';
+ }
+
+ if (isset($_POST['value'])) {
+ $value = $_POST['value'];
+ } else {
+ $value = '';
+ }
+
+ $o .= '';
+
+ return $o;
+}
diff --git a/convert/lang/C/messages.po b/convert/lang/C/messages.po
deleted file mode 100644
index e69de29b..00000000
diff --git a/cookienotice/cookienotice.php b/cookienotice/cookienotice.php
index 097f3c25..2bd6f9b1 100644
--- a/cookienotice/cookienotice.php
+++ b/cookienotice/cookienotice.php
@@ -8,10 +8,9 @@
*/
use Friendica\App;
-use Friendica\Core\Config;
use Friendica\Core\Hook;
-use Friendica\Core\L10n;
use Friendica\Core\Renderer;
+use Friendica\DI;
/**
* cookienotice_install
@@ -29,26 +28,25 @@ function cookienotice_install()
* cookienotice_addon_admin
* creates the admins config panel
*
- * @param App $a
* @param string $s The existing config panel html so far
*
* @return void
*/
-function cookienotice_addon_admin(App $a, &$s)
+function cookienotice_addon_admin(&$s)
{
- if (!is_site_admin()) {
+ if (!DI::userSession()->isSiteAdmin()) {
return;
}
- $text = Config::get('cookienotice', 'text', L10n::t('This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'));
- $oktext = Config::get('cookienotice', 'oktext', L10n::t('OK'));
+ $text = DI::config()->get('cookienotice', 'text', DI::l10n()->t('This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'));
+ $oktext = DI::config()->get('cookienotice', 'oktext', DI::l10n()->t('OK'));
- $t = Renderer::getMarkupTemplate('admin.tpl', __DIR__);
+ $t = Renderer::getMarkupTemplate('admin.tpl', 'addon/cookienotice/');
$s .= Renderer::replaceMacros($t, [
- '$description' => L10n::t('Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'),
- '$text' => ['cookienotice-text', L10n::t('Cookie Usage Notice'), $text],
- '$oktext' => ['cookienotice-oktext', L10n::t('OK Button Text'), $oktext],
- '$submit' => L10n::t('Save Settings')
+ '$description' => DI::l10n()->t('Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'),
+ '$text' => ['cookienotice-text', DI::l10n()->t('Cookie Usage Notice'), $text],
+ '$oktext' => ['cookienotice-oktext', DI::l10n()->t('OK Button Text'), $oktext],
+ '$submit' => DI::l10n()->t('Save Settings')
]);
return;
@@ -58,20 +56,17 @@ function cookienotice_addon_admin(App $a, &$s)
* cookienotice_addon_admin_post
* handles the post request from the admin panel
*
- * @param App $a
- *
* @return void
*/
-function cookienotice_addon_admin_post(App $a)
+function cookienotice_addon_admin_post()
{
- if (!is_site_admin()) {
+ if (!DI::userSession()->isSiteAdmin()) {
return;
}
if ($_POST['cookienotice-submit']) {
- Config::set('cookienotice', 'text', trim(strip_tags($_POST['cookienotice-text'])));
- Config::set('cookienotice', 'oktext', trim(strip_tags($_POST['cookienotice-oktext'])));
- info(L10n::t('cookienotice Settings saved.'));
+ DI::config()->set('cookienotice', 'text', trim(strip_tags($_POST['cookienotice-text'])));
+ DI::config()->set('cookienotice', 'oktext', trim(strip_tags($_POST['cookienotice-oktext'])));
}
}
@@ -80,18 +75,14 @@ function cookienotice_addon_admin_post(App $a)
* page_content_top hook
* adds css and scripts to the section of the html
*
- * @param App $a
* @param string $b unused - the header html incl. nav
*
* @return void
*/
-function cookienotice_page_content_top(App $a, &$b)
+function cookienotice_page_content_top(string &$b)
{
- $stylesheetPath = __DIR__ . '/cookienotice.css';
- $footerscriptPath = __DIR__ . '/cookienotice.js';
-
- $a->registerStylesheet($stylesheetPath);
- $a->registerFooterScript($footerscriptPath);
+ DI::page()->registerStylesheet(__DIR__ . '/cookienotice.css');
+ DI::page()->registerFooterScript(__DIR__ . '/cookienotice.js');
}
/**
@@ -99,17 +90,16 @@ function cookienotice_page_content_top(App $a, &$b)
* page_end hook
* ads our cookienotice box to the end of the html
*
- * @param App $a
* @param string $b the page html
*
* @return void
*/
-function cookienotice_page_end(App $a, &$b)
+function cookienotice_page_end(string &$b)
{
- $text = (string)Config::get('cookienotice', 'text', L10n::t('This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'));
- $oktext = (string)Config::get('cookienotice', 'oktext', L10n::t('OK'));
+ $text = (string)DI::config()->get('cookienotice', 'text', DI::l10n()->t('This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'));
+ $oktext = (string)DI::config()->get('cookienotice', 'oktext', DI::l10n()->t('OK'));
- $page_end_tpl = Renderer::getMarkupTemplate('cookienotice.tpl', __DIR__);
+ $page_end_tpl = Renderer::getMarkupTemplate('cookienotice.tpl', 'addon/cookienotice/');
$page_end = Renderer::replaceMacros($page_end_tpl, [
'$text' => $text,
diff --git a/cookienotice/lang/C/messages.po b/cookienotice/lang/C/messages.po
index 7d198f85..15055bb7 100644
--- a/cookienotice/lang/C/messages.po
+++ b/cookienotice/lang/C/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-01-30 10:48+0100\n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,52 +17,36 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: cookienotice.php:63
+#: cookienotice.php:42
msgid ""
"This website uses cookies. If you continue browsing this website, you agree "
"to the usage of cookies."
msgstr ""
-#: cookienotice.php:64 cookienotice.php:133
+#: cookienotice.php:43 cookienotice.php:108
msgid "OK"
msgstr ""
-#: cookienotice.php:68
-msgid "\"cookienotice\" Settings"
-msgstr ""
-
-#: cookienotice.php:69
+#: cookienotice.php:47
msgid ""
"Configure your cookie usage notice. It should just be a notice, "
"saying that the website uses cookies. It is shown as long as a user didnt "
"confirm clicking the OK button."
msgstr ""
-#: cookienotice.php:70
+#: cookienotice.php:48
msgid "Cookie Usage Notice"
msgstr ""
-#: cookienotice.php:70
-msgid "The cookie usage notice"
-msgstr ""
-
-#: cookienotice.php:71
+#: cookienotice.php:49
msgid "OK Button Text"
msgstr ""
-#: cookienotice.php:71
-msgid "The OK Button text"
-msgstr ""
-
-#: cookienotice.php:72
+#: cookienotice.php:50
msgid "Save Settings"
msgstr ""
-#: cookienotice.php:97
-msgid "cookienotice Settings saved."
-msgstr ""
-
-#: cookienotice.php:132
+#: cookienotice.php:107
msgid ""
"This website uses cookies to recognize revisiting and logged in users. You "
"accept the usage of these cookies by continue browsing this website."
diff --git a/cookienotice/lang/ar/messages.po b/cookienotice/lang/ar/messages.po
new file mode 100644
index 00000000..52d630db
--- /dev/null
+++ b/cookienotice/lang/ar/messages.po
@@ -0,0 +1,65 @@
+# ADDON cookienotice
+# Copyright (C)
+# This file is distributed under the same license as the Friendica cookienotice addon package.
+#
+#
+# Translators:
+# Farida Khalaf , 2021
+# abidin toumi , 2021
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2019-01-23 16:01+0000\n"
+"Last-Translator: abidin toumi , 2021\n"
+"Language-Team: Arabic (https://www.transifex.com/Friendica/teams/12172/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"
+
+#: cookienotice.php:42
+msgid ""
+"This website uses cookies. If you continue browsing this website, you agree "
+"to the usage of cookies."
+msgstr ""
+"هذا الموقع يستخدم ملف تعريف الارتباط. إذا واصلت تصفح هذا الموقع ، فإنك توافق"
+" على استخدام ملفات تعريف الارتباط."
+
+#: cookienotice.php:43 cookienotice.php:108
+msgid "OK"
+msgstr "موافق"
+
+#: cookienotice.php:47
+msgid ""
+"Configure your cookie usage notice. It should just be a notice, "
+"saying that the website uses cookies. It is shown as long as a user didnt "
+"confirm clicking the OK button."
+msgstr ""
+"تهيئة إشعار استخدام ملف تعريف الارتباط الخاص بك.\n"
+" يجب أن يكون مجرد إشعار ، يقول أن الموقع يستخدم ملفات تعريف الارتباط. \n"
+"يتم عرضه طالما لم يؤكد المستخدم النقر فوق الزر \"موافق\""
+
+#: cookienotice.php:48
+msgid "Cookie Usage Notice"
+msgstr "إشعار استخدام ملفات تعريف الارتباط"
+
+#: cookienotice.php:49
+msgid "OK Button Text"
+msgstr "زر الموافقة"
+
+#: cookienotice.php:50
+msgid "Save Settings"
+msgstr "احفظ الإعدادات"
+
+#: cookienotice.php:107
+msgid ""
+"This website uses cookies to recognize revisiting and logged in users. You "
+"accept the usage of these cookies by continue browsing this website."
+msgstr ""
+"يستخدم هذا الموقع ملفات تعريف الارتباط للتعرف على إعادة الزيارة والمستخدمين الذين ولجوا.\n"
+" استمراريتك في تصفح هذا الموقع يعني تقبلك استخدام ملفات تعريف الارتباط "
diff --git a/cookienotice/lang/ar/strings.php b/cookienotice/lang/ar/strings.php
new file mode 100644
index 00000000..77502ced
--- /dev/null
+++ b/cookienotice/lang/ar/strings.php
@@ -0,0 +1,17 @@
+=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; }
+}}
+$a->strings['This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'] = 'هذا الموقع يستخدم ملف تعريف الارتباط. إذا واصلت تصفح هذا الموقع ، فإنك توافق على استخدام ملفات تعريف الارتباط.';
+$a->strings['OK'] = 'موافق';
+$a->strings['Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'] = 'تهيئة إشعار استخدام ملف تعريف الارتباط الخاص بك.
+ يجب أن يكون مجرد إشعار ، يقول أن الموقع يستخدم ملفات تعريف الارتباط.
+يتم عرضه طالما لم يؤكد المستخدم النقر فوق الزر "موافق"';
+$a->strings['Cookie Usage Notice'] = 'إشعار استخدام ملفات تعريف الارتباط';
+$a->strings['OK Button Text'] = 'زر الموافقة';
+$a->strings['Save Settings'] = 'احفظ الإعدادات';
+$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = 'يستخدم هذا الموقع ملفات تعريف الارتباط للتعرف على إعادة الزيارة والمستخدمين الذين ولجوا.
+ استمراريتك في تصفح هذا الموقع يعني تقبلك استخدام ملفات تعريف الارتباط ';
diff --git a/cookienotice/lang/ca/strings.php b/cookienotice/lang/ca/strings.php
index fd662e21..9f5795b7 100644
--- a/cookienotice/lang/ca/strings.php
+++ b/cookienotice/lang/ca/strings.php
@@ -3,17 +3,16 @@
if(! function_exists("string_plural_select_ca")) {
function string_plural_select_ca($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["This website uses cookies. If you continue browsing this website, you agree to the usage of cookies."] = "Aquest lloc web utilitza cookies. Si continueu navegant per aquest lloc web, esteu d’acord amb l’ús de cookies.";
-$a->strings["OK"] = "D'acord";
-$a->strings["\"cookienotice\" Settings"] = "Configuració 'cookienotice'";
-$a->strings["Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button."] = "Configureu l’avís d’ús de cookies. Només hauria de ser un avís, dient que el lloc web utilitza cookies. Es mostra sempre que un usuari no confirmi el seu clic al botó D'acord";
-$a->strings["Cookie Usage Notice"] = "Avís d’ús de cookies";
-$a->strings["The cookie usage notice"] = "L’avís d’ús de cookies";
-$a->strings["OK Button Text"] = "Text del botó d’acord";
-$a->strings["The OK Button text"] = "Text del botó D'acord";
-$a->strings["Save Settings"] = "Desa la configuració";
-$a->strings["cookienotice Settings saved."] = "Cookienotice S'ha desat la configuració.";
-$a->strings["This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website."] = "Aquest lloc web utilitza cookies per reconèixer la revisió i la sessió d’usuaris. Accepteu l’ús d’aquestes cookies continuant navegant per aquest lloc web.";
+$a->strings['This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'] = 'Aquest lloc web utilitza cookies. Si continueu navegant per aquest lloc web, esteu d’acord amb l’ús de cookies.';
+$a->strings['OK'] = 'D\'acord';
+$a->strings['"cookienotice" Settings'] = 'Configuració \'cookienotice\'';
+$a->strings['Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'] = 'Configureu l’avís d’ús de cookies. Només hauria de ser un avís, dient que el lloc web utilitza cookies. Es mostra sempre que un usuari no confirmi el seu clic al botó D\'acord';
+$a->strings['Cookie Usage Notice'] = 'Avís d’ús de cookies';
+$a->strings['The cookie usage notice'] = 'L’avís d’ús de cookies';
+$a->strings['OK Button Text'] = 'Text del botó d’acord';
+$a->strings['The OK Button text'] = 'Text del botó D\'acord';
+$a->strings['Save Settings'] = 'Desa la configuració';
+$a->strings['cookienotice Settings saved.'] = 'Cookienotice S\'ha desat la configuració.';
+$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = 'Aquest lloc web utilitza cookies per reconèixer la revisió i la sessió d’usuaris. Accepteu l’ús d’aquestes cookies continuant navegant per aquest lloc web.';
diff --git a/cookienotice/lang/cs/strings.php b/cookienotice/lang/cs/strings.php
index 3a759f02..2c200355 100644
--- a/cookienotice/lang/cs/strings.php
+++ b/cookienotice/lang/cs/strings.php
@@ -3,17 +3,16 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
$n = intval($n);
- return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
+ if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; }
}}
-;
-$a->strings["This website uses cookies. If you continue browsing this website, you agree to the usage of cookies."] = "Tato stránka používá cookies. Pokud budete pokračovat v používání této stránky, souhlasíte s používáním cookies.";
-$a->strings["OK"] = "OK";
-$a->strings["\"cookienotice\" Settings"] = "Nastavení „cookienotice“";
-$a->strings["Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button."] = "Nastavte si vaše oznámení o používání cookies. Mělo by to být pouze oznámení říkající, že stránka používá cookies. Zobrazí se, dokud uživatel neklikne na tlačítko OK.";
-$a->strings["Cookie Usage Notice"] = "Oznámení o používání cookies";
-$a->strings["The cookie usage notice"] = "Oznámení o používání cookies";
-$a->strings["OK Button Text"] = "Text tlačítka OK";
-$a->strings["The OK Button text"] = "Text tlačítka OK";
-$a->strings["Save Settings"] = "Uložit nastavení";
-$a->strings["cookienotice Settings saved."] = "Nastavení cookienotice uložena.";
-$a->strings["This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website."] = "Tato stránka používá cookies pro rozpoznávání znovu navštěvujících a přihlášených uživatelů. Pokud budete pokračovat v používání této stránky, souhlasíte s používáním cookies.";
+$a->strings['This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'] = 'Tato stránka používá cookies. Pokud budete pokračovat v používání této stránky, souhlasíte s používáním cookies.';
+$a->strings['OK'] = 'OK';
+$a->strings['"cookienotice" Settings'] = 'Nastavení „cookienotice“';
+$a->strings['Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'] = 'Nastavte si vaše oznámení o používání cookies. Mělo by to být pouze oznámení říkající, že stránka používá cookies. Zobrazí se, dokud uživatel neklikne na tlačítko OK.';
+$a->strings['Cookie Usage Notice'] = 'Oznámení o používání cookies';
+$a->strings['The cookie usage notice'] = 'Oznámení o používání cookies';
+$a->strings['OK Button Text'] = 'Text tlačítka OK';
+$a->strings['The OK Button text'] = 'Text tlačítka OK';
+$a->strings['Save Settings'] = 'Uložit nastavení';
+$a->strings['cookienotice Settings saved.'] = 'Nastavení cookienotice uložena.';
+$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = 'Tato stránka používá cookies pro rozpoznávání znovu navštěvujících a přihlášených uživatelů. Pokud budete pokračovat v používání této stránky, souhlasíte s používáním cookies.';
diff --git a/cookienotice/lang/da-dk/messages.po b/cookienotice/lang/da-dk/messages.po
new file mode 100644
index 00000000..538e8397
--- /dev/null
+++ b/cookienotice/lang/da-dk/messages.po
@@ -0,0 +1,53 @@
+# ADDON cookienotice
+# Copyright (C)
+# This file is distributed under the same license as the Friendica cookienotice addon package.
+#
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2019-01-23 16:01+0000\n"
+"Language-Team: Danish (Denmark) (https://www.transifex.com/Friendica/teams/12172/da_DK/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: da_DK\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: cookienotice.php:42
+msgid ""
+"This website uses cookies. If you continue browsing this website, you agree "
+"to the usage of cookies."
+msgstr ""
+
+#: cookienotice.php:43 cookienotice.php:108
+msgid "OK"
+msgstr ""
+
+#: cookienotice.php:47
+msgid ""
+"Configure your cookie usage notice. It should just be a notice, "
+"saying that the website uses cookies. It is shown as long as a user didnt "
+"confirm clicking the OK button."
+msgstr ""
+
+#: cookienotice.php:48
+msgid "Cookie Usage Notice"
+msgstr ""
+
+#: cookienotice.php:49
+msgid "OK Button Text"
+msgstr ""
+
+#: cookienotice.php:50
+msgid "Save Settings"
+msgstr ""
+
+#: cookienotice.php:107
+msgid ""
+"This website uses cookies to recognize revisiting and logged in users. You "
+"accept the usage of these cookies by continue browsing this website."
+msgstr ""
diff --git a/cookienotice/lang/da-dk/strings.php b/cookienotice/lang/da-dk/strings.php
new file mode 100644
index 00000000..09554750
--- /dev/null
+++ b/cookienotice/lang/da-dk/strings.php
@@ -0,0 +1,7 @@
+, 2019
# Ulf Rompe , 2019
+# foss , 2020
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-01-30 10:48+0100\n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2019-01-23 16:01+0000\n"
-"Last-Translator: Ulf Rompe , 2019\n"
-"Language-Team: German (https://www.transifex.com/Friendica/teams/12172/de/)\n"
+"Last-Translator: foss , 2020\n"
+"Language-Team: German (https://app.transifex.com/Friendica/teams/12172/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"
-#: cookienotice.php:63
+#: cookienotice.php:42
msgid ""
"This website uses cookies. If you continue browsing this website, you agree "
"to the usage of cookies."
msgstr ""
"Diese Webseite verwendet Cookies. Durch die weitere Benutzung der Webseite "
-"stimmen Sie dieser Verwendung zu."
+"stimmst du dieser Verwendung zu."
-#: cookienotice.php:64 cookienotice.php:133
+#: cookienotice.php:43 cookienotice.php:108
msgid "OK"
msgstr "OK"
-#: cookienotice.php:68
-msgid "\"cookienotice\" Settings"
-msgstr "\"cookienotice\"-Einstellungen"
-
-#: cookienotice.php:69
+#: cookienotice.php:47
msgid ""
"Configure your cookie usage notice. It should just be a notice, "
"saying that the website uses cookies. It is shown as long as a user didnt "
@@ -48,35 +45,23 @@ msgstr ""
"sein, der sagt, dass die Webseite Cookies benutzt. Er wird so lange "
"angezeigt, bis der User den Hinweis durch Klicken des OK-Buttons bestätigt."
-#: cookienotice.php:70
+#: cookienotice.php:48
msgid "Cookie Usage Notice"
msgstr "Cookie-Nutzungshinweis"
-#: cookienotice.php:70
-msgid "The cookie usage notice"
-msgstr "Der Hinweis zur Nutzung von Cookies"
-
-#: cookienotice.php:71
+#: cookienotice.php:49
msgid "OK Button Text"
msgstr "OK-Button-Text"
-#: cookienotice.php:71
-msgid "The OK Button text"
-msgstr "Der für den OK-Button verwendete Text"
-
-#: cookienotice.php:72
+#: cookienotice.php:50
msgid "Save Settings"
msgstr "Einstellungen speichern"
-#: cookienotice.php:97
-msgid "cookienotice Settings saved."
-msgstr "cookienotice-Einstellungen wurden gespeichert"
-
-#: cookienotice.php:132
+#: cookienotice.php:107
msgid ""
"This website uses cookies to recognize revisiting and logged in users. You "
"accept the usage of these cookies by continue browsing this website."
msgstr ""
"Diese Webseite verwendet Cookies zur Erkennung von wiederkehrenden Besuchern"
" und eingeloggten Nutzern. Durch die weitere Benutzung der Webseite "
-"akzeptieren Sie die Verwendung der Cookies."
+"akzeptierst du die Verwendung der Cookies."
diff --git a/cookienotice/lang/de/strings.php b/cookienotice/lang/de/strings.php
index b4441c23..a83955ee 100644
--- a/cookienotice/lang/de/strings.php
+++ b/cookienotice/lang/de/strings.php
@@ -3,17 +3,12 @@
if(! function_exists("string_plural_select_de")) {
function string_plural_select_de($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["This website uses cookies. If you continue browsing this website, you agree to the usage of cookies."] = "Diese Webseite verwendet Cookies. Durch die weitere Benutzung der Webseite stimmen Sie dieser Verwendung zu.";
-$a->strings["OK"] = "OK";
-$a->strings["\"cookienotice\" Settings"] = "\"cookienotice\"-Einstellungen";
-$a->strings["Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button."] = "Konfiguriere deinen Cookie-Nutzungshinweis. Es sollte ein Hinweis sein, der sagt, dass die Webseite Cookies benutzt. Er wird so lange angezeigt, bis der User den Hinweis durch Klicken des OK-Buttons bestätigt.";
-$a->strings["Cookie Usage Notice"] = "Cookie-Nutzungshinweis";
-$a->strings["The cookie usage notice"] = "Der Hinweis zur Nutzung von Cookies";
-$a->strings["OK Button Text"] = "OK-Button-Text";
-$a->strings["The OK Button text"] = "Der für den OK-Button verwendete Text";
-$a->strings["Save Settings"] = "Einstellungen speichern";
-$a->strings["cookienotice Settings saved."] = "cookienotice-Einstellungen wurden gespeichert";
-$a->strings["This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website."] = "Diese Webseite verwendet Cookies zur Erkennung von wiederkehrenden Besuchern und eingeloggten Nutzern. Durch die weitere Benutzung der Webseite akzeptieren Sie die Verwendung der Cookies.";
+$a->strings['This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'] = 'Diese Webseite verwendet Cookies. Durch die weitere Benutzung der Webseite stimmst du dieser Verwendung zu.';
+$a->strings['OK'] = 'OK';
+$a->strings['Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'] = 'Konfiguriere deinen Cookie-Nutzungshinweis. Es sollte ein Hinweis sein, der sagt, dass die Webseite Cookies benutzt. Er wird so lange angezeigt, bis der User den Hinweis durch Klicken des OK-Buttons bestätigt.';
+$a->strings['Cookie Usage Notice'] = 'Cookie-Nutzungshinweis';
+$a->strings['OK Button Text'] = 'OK-Button-Text';
+$a->strings['Save Settings'] = 'Einstellungen speichern';
+$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = 'Diese Webseite verwendet Cookies zur Erkennung von wiederkehrenden Besuchern und eingeloggten Nutzern. Durch die weitere Benutzung der Webseite akzeptierst du die Verwendung der Cookies.';
diff --git a/cookienotice/lang/en-gb/strings.php b/cookienotice/lang/en-gb/strings.php
index 0acb4196..09dc7be2 100644
--- a/cookienotice/lang/en-gb/strings.php
+++ b/cookienotice/lang/en-gb/strings.php
@@ -3,17 +3,16 @@
if(! function_exists("string_plural_select_en_gb")) {
function string_plural_select_en_gb($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["This website uses cookies. If you continue browsing this website, you agree to the usage of cookies."] = "This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.";
-$a->strings["OK"] = "OK";
-$a->strings["\"cookienotice\" Settings"] = "\"cookienotice\" settings";
-$a->strings["Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button."] = "Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.";
-$a->strings["Cookie Usage Notice"] = "Cookie usage notice";
-$a->strings["The cookie usage notice"] = "The cookie usage notice";
-$a->strings["OK Button Text"] = "OK button text";
-$a->strings["The OK Button text"] = "OK button text";
-$a->strings["Save Settings"] = "Save settings";
-$a->strings["cookienotice Settings saved."] = "Cookie notice settings saved.";
-$a->strings["This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website."] = "This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.";
+$a->strings['This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'] = 'This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.';
+$a->strings['OK'] = 'OK';
+$a->strings['"cookienotice" Settings'] = '"cookienotice" settings';
+$a->strings['Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'] = 'Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.';
+$a->strings['Cookie Usage Notice'] = 'Cookie usage notice';
+$a->strings['The cookie usage notice'] = 'The cookie usage notice';
+$a->strings['OK Button Text'] = 'OK button text';
+$a->strings['The OK Button text'] = 'OK button text';
+$a->strings['Save Settings'] = 'Save settings';
+$a->strings['cookienotice Settings saved.'] = 'Cookie notice settings saved.';
+$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = 'This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.';
diff --git a/cookienotice/lang/es/messages.po b/cookienotice/lang/es/messages.po
new file mode 100644
index 00000000..bf11f9cb
--- /dev/null
+++ b/cookienotice/lang/es/messages.po
@@ -0,0 +1,65 @@
+# ADDON cookienotice
+# Copyright (C)
+# This file is distributed under the same license as the Friendica cookienotice addon package.
+#
+#
+# Translators:
+# Senex Petrovic , 2021
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2019-01-23 16:01+0000\n"
+"Last-Translator: Senex Petrovic , 2021\n"
+"Language-Team: Spanish (https://www.transifex.com/Friendica/teams/12172/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"
+
+#: cookienotice.php:42
+msgid ""
+"This website uses cookies. If you continue browsing this website, you agree "
+"to the usage of cookies."
+msgstr ""
+"Este sitio web utiliza cookies. Si continúa navegando en este sitio web, "
+"acepta el uso de cookies."
+
+#: cookienotice.php:43 cookienotice.php:108
+msgid "OK"
+msgstr "OK"
+
+#: cookienotice.php:47
+msgid ""
+"Configure your cookie usage notice. It should just be a notice, "
+"saying that the website uses cookies. It is shown as long as a user didnt "
+"confirm clicking the OK button."
+msgstr ""
+"Configura tu nota deñ uso de cookies. Debería ser solo un aviso, "
+"diciendo que el sitio web utiliza cookies. Se muestra siempre que el usuario"
+" no confirmó haciendo clic en el botón Aceptar."
+
+#: cookienotice.php:48
+msgid "Cookie Usage Notice"
+msgstr "Aviso de uso de cookies"
+
+#: cookienotice.php:49
+msgid "OK Button Text"
+msgstr "Texto del botón OK"
+
+#: cookienotice.php:50
+msgid "Save Settings"
+msgstr "Grabar Ajustes"
+
+#: cookienotice.php:107
+msgid ""
+"This website uses cookies to recognize revisiting and logged in users. You "
+"accept the usage of these cookies by continue browsing this website."
+msgstr ""
+"Este sitio web utiliza cookies para reconocer a los usuarios que visitan y "
+"que inician sesión. Acepta el uso de estas cookies al continuar navegando en"
+" este sitio web."
diff --git a/cookienotice/lang/es/strings.php b/cookienotice/lang/es/strings.php
new file mode 100644
index 00000000..0cb2b314
--- /dev/null
+++ b/cookienotice/lang/es/strings.php
@@ -0,0 +1,14 @@
+strings['This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'] = 'Este sitio web utiliza cookies. Si continúa navegando en este sitio web, acepta el uso de cookies.';
+$a->strings['OK'] = 'OK';
+$a->strings['Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'] = 'Configura tu nota deñ uso de cookies. Debería ser solo un aviso, diciendo que el sitio web utiliza cookies. Se muestra siempre que el usuario no confirmó haciendo clic en el botón Aceptar.';
+$a->strings['Cookie Usage Notice'] = 'Aviso de uso de cookies';
+$a->strings['OK Button Text'] = 'Texto del botón OK';
+$a->strings['Save Settings'] = 'Grabar Ajustes';
+$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = 'Este sitio web utiliza cookies para reconocer a los usuarios que visitan y que inician sesión. Acepta el uso de estas cookies al continuar navegando en este sitio web.';
diff --git a/cookienotice/lang/fr/messages.po b/cookienotice/lang/fr/messages.po
index 65ed0d2a..f7ac7c76 100644
--- a/cookienotice/lang/fr/messages.po
+++ b/cookienotice/lang/fr/messages.po
@@ -5,53 +5,63 @@
#
# Translators:
# Vladimir Núñez , 2019
+# bob lebonche , 2021
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-01-20 14:51+0100\n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2019-01-23 16:01+0000\n"
-"Last-Translator: Vladimir Núñez , 2019\n"
+"Last-Translator: bob lebonche , 2021\n"
"Language-Team: French (https://www.transifex.com/Friendica/teams/12172/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"
+"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
-#: cookienotice.php:53
-msgid "\"cookienotice\" Settings"
+#: cookienotice.php:42
+msgid ""
+"This website uses cookies. If you continue browsing this website, you agree "
+"to the usage of cookies."
msgstr ""
+"Ce site utilise des cookies. Si vous poursuivez sur ce site, vous acceptez "
+"l'utilisation de ces cookies."
-#: cookienotice.php:54
+#: cookienotice.php:43 cookienotice.php:108
+msgid "OK"
+msgstr "Ok"
+
+#: cookienotice.php:47
msgid ""
"Configure your cookie usage notice. It should just be a notice, "
"saying that the website uses cookies. It is shown as long as a user didnt "
"confirm clicking the OK button."
msgstr ""
+"Configurez votre politique d'utilisation des cookies. Cela devrait "
+"juste être un avertissement, signalant l'utilisation de cookies par le site."
+" Cela sera affiché tant que l'utilisateur n'aura pas confirmé en cliquant "
+"sur le bouton OK."
-#: cookienotice.php:55
+#: cookienotice.php:48
msgid "Cookie Usage Notice"
-msgstr ""
+msgstr "Politique d'utilisation des cookies."
-#: cookienotice.php:55
-msgid "The cookie usage notice"
-msgstr ""
-
-#: cookienotice.php:56
+#: cookienotice.php:49
msgid "OK Button Text"
msgstr "Bouton OK Texte "
-#: cookienotice.php:56
-msgid "The OK Button text"
-msgstr ""
-
-#: cookienotice.php:57
+#: cookienotice.php:50
msgid "Save Settings"
-msgstr ""
+msgstr "Sauvegarder les réglages"
-#: cookienotice.php:72
-msgid "cookienotice Settings saved."
+#: cookienotice.php:107
+msgid ""
+"This website uses cookies to recognize revisiting and logged in users. You "
+"accept the usage of these cookies by continue browsing this website."
msgstr ""
+"Ce site utilise des cookies pour reconnaître les visiteurs et les "
+"utilisateurs connectés. Vous accepter l'utilisation de ces cookies en "
+"continuant sur ce site."
diff --git a/cookienotice/lang/fr/strings.php b/cookienotice/lang/fr/strings.php
index f975f493..7076d6aa 100644
--- a/cookienotice/lang/fr/strings.php
+++ b/cookienotice/lang/fr/strings.php
@@ -3,14 +3,12 @@
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
$n = intval($n);
- return ($n > 1);;
+ if (($n == 0 || $n == 1)) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; }
}}
-;
-$a->strings["\"cookienotice\" Settings"] = "";
-$a->strings["Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button."] = "";
-$a->strings["Cookie Usage Notice"] = "";
-$a->strings["The cookie usage notice"] = "";
-$a->strings["OK Button Text"] = "Bouton OK Texte ";
-$a->strings["The OK Button text"] = "";
-$a->strings["Save Settings"] = "";
-$a->strings["cookienotice Settings saved."] = "";
+$a->strings['This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'] = 'Ce site utilise des cookies. Si vous poursuivez sur ce site, vous acceptez l\'utilisation de ces cookies.';
+$a->strings['OK'] = 'Ok';
+$a->strings['Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'] = 'Configurez votre politique d\'utilisation des cookies. Cela devrait juste être un avertissement, signalant l\'utilisation de cookies par le site. Cela sera affiché tant que l\'utilisateur n\'aura pas confirmé en cliquant sur le bouton OK.';
+$a->strings['Cookie Usage Notice'] = 'Politique d\'utilisation des cookies.';
+$a->strings['OK Button Text'] = 'Bouton OK Texte ';
+$a->strings['Save Settings'] = 'Sauvegarder les réglages';
+$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = 'Ce site utilise des cookies pour reconnaître les visiteurs et les utilisateurs connectés. Vous accepter l\'utilisation de ces cookies en continuant sur ce site.';
diff --git a/cookienotice/lang/hu/messages.po b/cookienotice/lang/hu/messages.po
new file mode 100644
index 00000000..a9a85fb9
--- /dev/null
+++ b/cookienotice/lang/hu/messages.po
@@ -0,0 +1,66 @@
+# ADDON cookienotice
+# Copyright (C)
+# This file is distributed under the same license as the Friendica cookienotice addon package.
+#
+#
+# Translators:
+# Balázs Úr, 2020
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2019-01-23 16:01+0000\n"
+"Last-Translator: Balázs Úr, 2020\n"
+"Language-Team: Hungarian (https://www.transifex.com/Friendica/teams/12172/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"
+
+#: cookienotice.php:42
+msgid ""
+"This website uses cookies. If you continue browsing this website, you agree "
+"to the usage of cookies."
+msgstr ""
+"Ez a weboldal sütiket használ. Ha folytatja a böngészést a weboldalon, akkor"
+" elfogadja a sütik használatát."
+
+#: cookienotice.php:43 cookienotice.php:108
+msgid "OK"
+msgstr "Rendben"
+
+#: cookienotice.php:47
+msgid ""
+"Configure your cookie usage notice. It should just be a notice, "
+"saying that the website uses cookies. It is shown as long as a user didnt "
+"confirm clicking the OK button."
+msgstr ""
+"Állítsa be a sütihasználati figyelmeztetést. Ennek csak egy "
+"figyelmeztetésnek kell lennie, amely arra hívja fel a figyelmet, hogy a "
+"weboldal sütiket használ. Egészen addig lesz megjelenítve, amíg a "
+"felhasználó nem fogadja el a Rendben gombra kattintva."
+
+#: cookienotice.php:48
+msgid "Cookie Usage Notice"
+msgstr "Sütihasználati figyelmeztetés"
+
+#: cookienotice.php:49
+msgid "OK Button Text"
+msgstr "Rendben gomb szövege"
+
+#: cookienotice.php:50
+msgid "Save Settings"
+msgstr "Beállítások mentése"
+
+#: cookienotice.php:107
+msgid ""
+"This website uses cookies to recognize revisiting and logged in users. You "
+"accept the usage of these cookies by continue browsing this website."
+msgstr ""
+"Ez a weboldal sütiket használ az újralátogatás felismeréséhez és a "
+"bejelentkezett felhasználókhoz. A weboldalon történő böngészés folytatásával"
+" Ön elfogadja ezen sütik használatát."
diff --git a/cookienotice/lang/hu/strings.php b/cookienotice/lang/hu/strings.php
new file mode 100644
index 00000000..9ad07400
--- /dev/null
+++ b/cookienotice/lang/hu/strings.php
@@ -0,0 +1,14 @@
+strings['This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'] = 'Ez a weboldal sütiket használ. Ha folytatja a böngészést a weboldalon, akkor elfogadja a sütik használatát.';
+$a->strings['OK'] = 'Rendben';
+$a->strings['Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'] = 'Állítsa be a sütihasználati figyelmeztetést. Ennek csak egy figyelmeztetésnek kell lennie, amely arra hívja fel a figyelmet, hogy a weboldal sütiket használ. Egészen addig lesz megjelenítve, amíg a felhasználó nem fogadja el a Rendben gombra kattintva.';
+$a->strings['Cookie Usage Notice'] = 'Sütihasználati figyelmeztetés';
+$a->strings['OK Button Text'] = 'Rendben gomb szövege';
+$a->strings['Save Settings'] = 'Beállítások mentése';
+$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = 'Ez a weboldal sütiket használ az újralátogatás felismeréséhez és a bejelentkezett felhasználókhoz. A weboldalon történő böngészés folytatásával Ön elfogadja ezen sütik használatát.';
diff --git a/cookienotice/lang/it/strings.php b/cookienotice/lang/it/strings.php
index b4d84be6..41a83b82 100644
--- a/cookienotice/lang/it/strings.php
+++ b/cookienotice/lang/it/strings.php
@@ -3,17 +3,16 @@
if(! function_exists("string_plural_select_it")) {
function string_plural_select_it($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["This website uses cookies. If you continue browsing this website, you agree to the usage of cookies."] = "Questo sito web utilizza cookie. Proseguendo la navigazione su questo sito, accetti l'utilizzo dei cookie.";
-$a->strings["OK"] = "OK";
-$a->strings["\"cookienotice\" Settings"] = "Impostazioni \"cookienotice\"";
-$a->strings["Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button."] = "Configura la tua notifica di utilizzo dei cookie Dovrebbe essere semplicemente una nota che dice che il sito utilizza dei cookie. Viene mostrata fino a quanto l'utente conferma cliccando il bottone OK.";
-$a->strings["Cookie Usage Notice"] = "Nota Utilizzo Cookie";
-$a->strings["The cookie usage notice"] = "La nota di utilizzo dei cookie";
-$a->strings["OK Button Text"] = "Testo Bottone OK";
-$a->strings["The OK Button text"] = "Il testo del bottone OK";
-$a->strings["Save Settings"] = "Salva Impostazioni";
-$a->strings["cookienotice Settings saved."] = "Impostazioni \"cookienotice\" salvate.";
-$a->strings["This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website."] = "Questo sito utilizza cookie per riconosce gli utenti loggati e quelli che tornano a visitare. Proseguendo la navigazione su questo sito, accetti l'utilizzo di questi cookie. ";
+$a->strings['This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'] = 'Questo sito web utilizza cookie. Proseguendo la navigazione su questo sito, accetti l\'utilizzo dei cookie.';
+$a->strings['OK'] = 'OK';
+$a->strings['"cookienotice" Settings'] = 'Impostazioni "cookienotice"';
+$a->strings['Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'] = 'Configura la tua notifica di utilizzo dei cookie Dovrebbe essere semplicemente una nota che dice che il sito utilizza dei cookie. Viene mostrata fino a quanto l\'utente conferma cliccando il bottone OK.';
+$a->strings['Cookie Usage Notice'] = 'Nota Utilizzo Cookie';
+$a->strings['The cookie usage notice'] = 'La nota di utilizzo dei cookie';
+$a->strings['OK Button Text'] = 'Testo Bottone OK';
+$a->strings['The OK Button text'] = 'Il testo del bottone OK';
+$a->strings['Save Settings'] = 'Salva Impostazioni';
+$a->strings['cookienotice Settings saved.'] = 'Impostazioni "cookienotice" salvate.';
+$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = 'Questo sito utilizza cookie per riconosce gli utenti loggati e quelli che tornano a visitare. Proseguendo la navigazione su questo sito, accetti l\'utilizzo di questi cookie. ';
diff --git a/cookienotice/lang/nl/strings.php b/cookienotice/lang/nl/strings.php
index 4699657e..8247b729 100644
--- a/cookienotice/lang/nl/strings.php
+++ b/cookienotice/lang/nl/strings.php
@@ -3,17 +3,16 @@
if(! function_exists("string_plural_select_nl")) {
function string_plural_select_nl($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["This website uses cookies. If you continue browsing this website, you agree to the usage of cookies."] = "Deze website gebruikt cookies. Door het gebruik van deze website, je akkoord met het gebruik van deze cookies.";
-$a->strings["OK"] = "OK";
-$a->strings["\"cookienotice\" Settings"] = "\"cookienotice\" instellingen";
-$a->strings["Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button."] = "Configureer je meldingen voor het gebruik van cookies. Het dient alleen een melding te zijn die zegt dat de website cookies gebruikt. Dit is te zien als de gebruiker niet heeft bevestigd door op de OK knop te drukken.";
-$a->strings["Cookie Usage Notice"] = "Cookiemelding";
-$a->strings["The cookie usage notice"] = "De cookiemelding";
-$a->strings["OK Button Text"] = "OK knop tekst";
-$a->strings["The OK Button text"] = "De OK knop tekst";
-$a->strings["Save Settings"] = "Instellingen Opslaan";
-$a->strings["cookienotice Settings saved."] = "Cookienotice instellingen opgeslagen.";
-$a->strings["This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website."] = "Deze website gebruikt cookies om terugkerende en ingelogde gebruikers te herkennen. Door gebruik van deze website gaat u akkoord met het gebruik van deze cookies";
+$a->strings['This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'] = 'Deze website gebruikt cookies. Door het gebruik van deze website, je akkoord met het gebruik van deze cookies.';
+$a->strings['OK'] = 'OK';
+$a->strings['"cookienotice" Settings'] = '"cookienotice" instellingen';
+$a->strings['Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'] = 'Configureer je meldingen voor het gebruik van cookies. Het dient alleen een melding te zijn die zegt dat de website cookies gebruikt. Dit is te zien als de gebruiker niet heeft bevestigd door op de OK knop te drukken.';
+$a->strings['Cookie Usage Notice'] = 'Cookiemelding';
+$a->strings['The cookie usage notice'] = 'De cookiemelding';
+$a->strings['OK Button Text'] = 'OK knop tekst';
+$a->strings['The OK Button text'] = 'De OK knop tekst';
+$a->strings['Save Settings'] = 'Instellingen Opslaan';
+$a->strings['cookienotice Settings saved.'] = 'Cookienotice instellingen opgeslagen.';
+$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = 'Deze website gebruikt cookies om terugkerende en ingelogde gebruikers te herkennen. Door gebruik van deze website gaat u akkoord met het gebruik van deze cookies';
diff --git a/cookienotice/lang/pl/messages.po b/cookienotice/lang/pl/messages.po
index be47f834..f1fc16b8 100644
--- a/cookienotice/lang/pl/messages.po
+++ b/cookienotice/lang/pl/messages.po
@@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-01-30 10:48+0100\n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
"PO-Revision-Date: 2019-01-23 16:01+0000\n"
"Last-Translator: Waldemar Stoczkowski, 2019\n"
"Language-Team: Polish (https://www.transifex.com/Friendica/teams/12172/pl/)\n"
@@ -21,7 +21,7 @@ msgstr ""
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
-#: cookienotice.php:63
+#: cookienotice.php:42
msgid ""
"This website uses cookies. If you continue browsing this website, you agree "
"to the usage of cookies."
@@ -29,15 +29,11 @@ msgstr ""
"Ta strona używa plików cookie. Jeśli będziesz kontynuować przeglądanie tej "
"strony, zgadzasz się na użycie plików cookie."
-#: cookienotice.php:64 cookienotice.php:133
+#: cookienotice.php:43 cookienotice.php:108
msgid "OK"
msgstr "OK"
-#: cookienotice.php:68
-msgid "\"cookienotice\" Settings"
-msgstr "Ustawienia \"plików cookie\""
-
-#: cookienotice.php:69
+#: cookienotice.php:47
msgid ""
"Configure your cookie usage notice. It should just be a notice, "
"saying that the website uses cookies. It is shown as long as a user didnt "
@@ -47,31 +43,19 @@ msgstr ""
"prostu komunikat, że strona korzysta z plików cookie. Jest wyświetlany, o "
"ile użytkownik nie potwierdził, klikając przycisk OK."
-#: cookienotice.php:70
+#: cookienotice.php:48
msgid "Cookie Usage Notice"
msgstr "Użyciu plików cookie"
-#: cookienotice.php:70
-msgid "The cookie usage notice"
-msgstr "Powiadomienie o użyciu plików cookie"
-
-#: cookienotice.php:71
+#: cookienotice.php:49
msgid "OK Button Text"
msgstr "Tekst przycisku OK"
-#: cookienotice.php:71
-msgid "The OK Button text"
-msgstr "Tekst przycisku OK"
-
-#: cookienotice.php:72
+#: cookienotice.php:50
msgid "Save Settings"
msgstr "Zapisz ustawienia"
-#: cookienotice.php:97
-msgid "cookienotice Settings saved."
-msgstr "Zapisano stawienia plików cookie."
-
-#: cookienotice.php:132
+#: cookienotice.php:107
msgid ""
"This website uses cookies to recognize revisiting and logged in users. You "
"accept the usage of these cookies by continue browsing this website."
diff --git a/cookienotice/lang/pl/strings.php b/cookienotice/lang/pl/strings.php
index 3643e5ad..b46c1647 100644
--- a/cookienotice/lang/pl/strings.php
+++ b/cookienotice/lang/pl/strings.php
@@ -3,17 +3,12 @@
if(! function_exists("string_plural_select_pl")) {
function string_plural_select_pl($n){
$n = intval($n);
- return ($n==1 ? 0 : ($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14) ? 1 : $n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14) ? 2 : 3);;
+ if ($n==1) { return 0; } else if (($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["This website uses cookies. If you continue browsing this website, you agree to the usage of cookies."] = "Ta strona używa plików cookie. Jeśli będziesz kontynuować przeglądanie tej strony, zgadzasz się na użycie plików cookie.";
-$a->strings["OK"] = "OK";
-$a->strings["\"cookienotice\" Settings"] = "Ustawienia \"plików cookie\"";
-$a->strings["Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button."] = "Skonfiguruj zawiadomienie o użyciu plików cookie. Powinien to być po prostu komunikat, że strona korzysta z plików cookie. Jest wyświetlany, o ile użytkownik nie potwierdził, klikając przycisk OK.";
-$a->strings["Cookie Usage Notice"] = "Użyciu plików cookie";
-$a->strings["The cookie usage notice"] = "Powiadomienie o użyciu plików cookie";
-$a->strings["OK Button Text"] = "Tekst przycisku OK";
-$a->strings["The OK Button text"] = "Tekst przycisku OK";
-$a->strings["Save Settings"] = "Zapisz ustawienia";
-$a->strings["cookienotice Settings saved."] = "Zapisano stawienia plików cookie.";
-$a->strings["This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website."] = "Ta strona używa plików cookie do rozpoznawania ponownych odwiedzin i zalogowanych użytkowników. Akceptujesz użycie tych plików cookie, kontynuując przeglądanie tej witryny.";
+$a->strings['This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'] = 'Ta strona używa plików cookie. Jeśli będziesz kontynuować przeglądanie tej strony, zgadzasz się na użycie plików cookie.';
+$a->strings['OK'] = 'OK';
+$a->strings['Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'] = 'Skonfiguruj zawiadomienie o użyciu plików cookie. Powinien to być po prostu komunikat, że strona korzysta z plików cookie. Jest wyświetlany, o ile użytkownik nie potwierdził, klikając przycisk OK.';
+$a->strings['Cookie Usage Notice'] = 'Użyciu plików cookie';
+$a->strings['OK Button Text'] = 'Tekst przycisku OK';
+$a->strings['Save Settings'] = 'Zapisz ustawienia';
+$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = 'Ta strona używa plików cookie do rozpoznawania ponownych odwiedzin i zalogowanych użytkowników. Akceptujesz użycie tych plików cookie, kontynuując przeglądanie tej witryny.';
diff --git a/cookienotice/lang/sv/messages.po b/cookienotice/lang/sv/messages.po
new file mode 100644
index 00000000..185ae4d0
--- /dev/null
+++ b/cookienotice/lang/sv/messages.po
@@ -0,0 +1,53 @@
+# ADDON cookienotice
+# Copyright (C)
+# This file is distributed under the same license as the Friendica cookienotice addon package.
+#
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2019-01-23 16:01+0000\n"
+"Language-Team: Swedish (https://www.transifex.com/Friendica/teams/12172/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"
+
+#: cookienotice.php:42
+msgid ""
+"This website uses cookies. If you continue browsing this website, you agree "
+"to the usage of cookies."
+msgstr ""
+
+#: cookienotice.php:43 cookienotice.php:108
+msgid "OK"
+msgstr ""
+
+#: cookienotice.php:47
+msgid ""
+"Configure your cookie usage notice. It should just be a notice, "
+"saying that the website uses cookies. It is shown as long as a user didnt "
+"confirm clicking the OK button."
+msgstr ""
+
+#: cookienotice.php:48
+msgid "Cookie Usage Notice"
+msgstr ""
+
+#: cookienotice.php:49
+msgid "OK Button Text"
+msgstr ""
+
+#: cookienotice.php:50
+msgid "Save Settings"
+msgstr ""
+
+#: cookienotice.php:107
+msgid ""
+"This website uses cookies to recognize revisiting and logged in users. You "
+"accept the usage of these cookies by continue browsing this website."
+msgstr ""
diff --git a/cookienotice/lang/sv/strings.php b/cookienotice/lang/sv/strings.php
new file mode 100644
index 00000000..72e9772f
--- /dev/null
+++ b/cookienotice/lang/sv/strings.php
@@ -0,0 +1,7 @@
+strings["This website uses cookies. If you continue browsing this website, you agree to the usage of cookies."] = "本网站将使用 cookies。如果您继续浏览本网站,即表示您同意使用 cookies。";
-$a->strings["OK"] = "好的";
-$a->strings["\"cookienotice\" Settings"] = "“cookie 布告”设置";
-$a->strings["Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button."] = "配置您的 cookie 使用布告。 它将会显示一条布告称此网站使用 cookies 。它将会一直显示直到用户点击确定按钮。";
-$a->strings["Cookie Usage Notice"] = "Cookie 使用布告";
-$a->strings["The cookie usage notice"] = "cookie 使用布告";
-$a->strings["OK Button Text"] = "确认按钮文本";
-$a->strings["The OK Button text"] = "确认按钮文本";
-$a->strings["Save Settings"] = "保存设置";
-$a->strings["cookienotice Settings saved."] = "cookies 布告设置已保存";
-$a->strings["This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website."] = "本网站使用 cookies 来识别登录和重访的用户。如果您继续浏览本网站即表示您接受使用上述 cookies。";
+$a->strings['This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'] = '本网站将使用 cookies。如果您继续浏览本网站,即表示您同意使用 cookies。';
+$a->strings['OK'] = '好的';
+$a->strings['"cookienotice" Settings'] = '“cookie 布告”设置';
+$a->strings['Configure your cookie usage notice. It should just be a notice, saying that the website uses cookies. It is shown as long as a user didnt confirm clicking the OK button.'] = '配置您的 cookie 使用布告。 它将会显示一条布告称此网站使用 cookies 。它将会一直显示直到用户点击确定按钮。';
+$a->strings['Cookie Usage Notice'] = 'Cookie 使用布告';
+$a->strings['The cookie usage notice'] = 'cookie 使用布告';
+$a->strings['OK Button Text'] = '确认按钮文本';
+$a->strings['The OK Button text'] = '确认按钮文本';
+$a->strings['Save Settings'] = '保存设置';
+$a->strings['cookienotice Settings saved.'] = 'cookies 布告设置已保存';
+$a->strings['This website uses cookies to recognize revisiting and logged in users. You accept the usage of these cookies by continue browsing this website.'] = '本网站使用 cookies 来识别登录和重访的用户。如果您继续浏览本网站即表示您接受使用上述 cookies。';
diff --git a/curweather/curweather.php b/curweather/curweather.php
index df7a701a..f614840a 100644
--- a/curweather/curweather.php
+++ b/curweather/curweather.php
@@ -10,14 +10,10 @@
*/
use Friendica\App;
-use Friendica\Core\Cache;
-use Friendica\Core\Config;
+use Friendica\Core\Cache\Enum\Duration;
use Friendica\Core\Hook;
-use Friendica\Core\L10n;
-use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
-use Friendica\Core\Session;
-use Friendica\Util\Network;
+use Friendica\DI;
use Friendica\Util\Proxy as ProxyUtils;
function curweather_install()
@@ -27,22 +23,15 @@ function curweather_install()
Hook::register('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
}
-function curweather_uninstall()
-{
- Hook::unregister('network_mod_init' , 'addon/curweather/curweather.php', 'curweather_network_mod_init');
- Hook::unregister('addon_settings' , 'addon/curweather/curweather.php', 'curweather_addon_settings');
- Hook::unregister('addon_settings_post', 'addon/curweather/curweather.php', 'curweather_addon_settings_post');
-}
-
// get the weather data from OpenWeatherMap
function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cachetime = 0)
{
$url = "http://api.openweathermap.org/data/2.5/weather?q=" . $loc . "&appid=" . $appid . "&lang=" . $lang . "&units=" . $units . "&mode=xml";
- $cached = Cache::get('curweather'.md5($url));
+ $cached = DI::cache()->get('curweather'.md5($url));
$now = new DateTime();
if (!is_null($cached)) {
- $cdate = PConfig::get(local_user(), 'curweather', 'last');
+ $cdate = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'last');
$cached = unserialize($cached);
if ($cdate + $cachetime > $now->getTimestamp()) {
@@ -51,10 +40,10 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
}
try {
- $res = new SimpleXMLElement(Network::fetchUrl($url));
+ $res = new SimpleXMLElement(DI::httpClient()->fetch($url));
} catch (Exception $e) {
if (empty($_SESSION['curweather_notice_shown'])) {
- info(L10n::t('Error fetching weather data. Error was: '.$e->getMessage()));
+ DI::sysmsg()->addNotice(DI::l10n()->t('Error fetching weather data. Error was: ' . $e->getMessage()));
$_SESSION['curweather_notice_shown'] = true;
}
@@ -91,19 +80,19 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
'icon' => (string) $res->weather['icon'],
];
- PConfig::set(local_user(), 'curweather', 'last', $now->getTimestamp());
- Cache::set('curweather'.md5($url), serialize($r), Cache::HOUR);
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'curweather', 'last', $now->getTimestamp());
+ DI::cache()->set('curweather'.md5($url), serialize($r), Duration::HOUR);
return $r;
}
-function curweather_network_mod_init(App $a, &$b)
+function curweather_network_mod_init(string &$body)
{
- if (!intval(PConfig::get(local_user(), 'curweather', 'curweather_enable'))) {
+ if (!intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_enable'))) {
return;
}
- $a->page['htmlhead'] .= '' . "\r\n";
+ DI::page()['htmlhead'] .= '' . "\r\n";
// $rpt value is needed for location
// $lang will be taken from the browser session to honour user settings
@@ -114,15 +103,15 @@ function curweather_network_mod_init(App $a, &$b)
// those parameters will be used to get: cloud status, temperature, preassure
// and relative humidity for display, also the relevent area of the map is
// linked from lat/log of the reply of OWMp
- $rpt = PConfig::get(local_user(), 'curweather', 'curweather_loc');
+ $rpt = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_loc');
// Set the language to the browsers language or default and use metric units
- $lang = Session::get('language', Config::get('system', 'language'));
- $units = PConfig::get( local_user(), 'curweather', 'curweather_units');
- $appid = Config::get('curweather', 'appid');
- $cachetime = intval(Config::get('curweather', 'cachetime'));
+ $lang = DI::session()->get('language', DI::config()->get('system', 'language'));
+ $units = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_units');
+ $appid = DI::config()->get('curweather', 'appid');
+ $cachetime = intval(DI::config()->get('curweather', 'cachetime'));
- if ($units === "") {
+ if ($units === '') {
$units = 'metric';
}
@@ -137,122 +126,116 @@ function curweather_network_mod_init(App $a, &$b)
if ($ok) {
$t = Renderer::getMarkupTemplate("widget.tpl", "addon/curweather/" );
$curweather = Renderer::replaceMacros($t, [
- '$title' => L10n::t("Current Weather"),
+ '$title' => DI::l10n()->t("Current Weather"),
'$icon' => ProxyUtils::proxifyUrl('http://openweathermap.org/img/w/'.$res['icon'].'.png'),
'$city' => $res['city'],
'$lon' => $res['lon'],
'$lat' => $res['lat'],
'$description' => $res['descripion'],
'$temp' => $res['temperature'],
- '$relhumidity' => ['caption'=>L10n::t('Relative Humidity'), 'val'=>$res['humidity']],
- '$pressure' => ['caption'=>L10n::t('Pressure'), 'val'=>$res['pressure']],
- '$wind' => ['caption'=>L10n::t('Wind'), 'val'=> $res['wind']],
- '$lastupdate' => L10n::t('Last Updated').': '.$res['update'].'UTC',
- '$databy' => L10n::t('Data by'),
- '$showonmap' => L10n::t('Show on map')
+ '$relhumidity' => ['caption'=>DI::l10n()->t('Relative Humidity'), 'val'=>$res['humidity']],
+ '$pressure' => ['caption'=>DI::l10n()->t('Pressure'), 'val'=>$res['pressure']],
+ '$wind' => ['caption'=>DI::l10n()->t('Wind'), 'val'=> $res['wind']],
+ '$lastupdate' => DI::l10n()->t('Last Updated').': '.$res['update'].'UTC',
+ '$databy' => DI::l10n()->t('Data by'),
+ '$showonmap' => DI::l10n()->t('Show on map')
]);
} else {
$t = Renderer::getMarkupTemplate('widget-error.tpl', 'addon/curweather/');
$curweather = Renderer::replaceMacros( $t, [
- '$problem' => L10n::t('There was a problem accessing the weather data. But have a look'),
+ '$problem' => DI::l10n()->t('There was a problem accessing the weather data. But have a look'),
'$rpt' => $rpt,
- '$atOWM' => L10n::t('at OpenWeatherMap')
+ '$atOWM' => DI::l10n()->t('at OpenWeatherMap')
]);
}
- $a->page['aside'] = $curweather . $a->page['aside'];
+ DI::page()['aside'] = $curweather . DI::page()['aside'];
}
-function curweather_addon_settings_post(App $a, $post)
+function curweather_addon_settings_post($post)
{
- if (!local_user() || empty($_POST['curweather-settings-submit'])) {
+ if (!DI::userSession()->getLocalUserId() || empty($_POST['curweather-settings-submit'])) {
return;
}
- PConfig::set(local_user(), 'curweather', 'curweather_loc' , trim($_POST['curweather_loc']));
- PConfig::set(local_user(), 'curweather', 'curweather_enable', intval($_POST['curweather_enable']));
- PConfig::set(local_user(), 'curweather', 'curweather_units' , trim($_POST['curweather_units']));
-
- info(L10n::t('Current Weather settings updated.') . EOL);
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_loc' , trim($_POST['curweather_loc']));
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_enable', intval($_POST['curweather_enable']));
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_units' , trim($_POST['curweather_units']));
}
-function curweather_addon_settings(App $a, &$s)
+function curweather_addon_settings(array &$data)
{
- if (!local_user()) {
+ if (!DI::userSession()->getLocalUserId()) {
return;
}
- /* Get the current state of our config variable */
- $curweather_loc = PConfig::get(local_user(), 'curweather', 'curweather_loc');
- $curweather_units = PConfig::get(local_user(), 'curweather', 'curweather_units');
- $appid = Config::get('curweather', 'appid');
+ $curweather_loc = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_loc');
+ $curweather_units = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_units');
+ $appid = DI::config()->get('curweather', 'appid');
- if ($appid == "") {
- $noappidtext = L10n::t('No APPID found, please contact your admin to obtain one.');
+ if ($appid == '') {
+ $noappidtext = DI::l10n()->t('No APPID found, please contact your admin to obtain one.');
} else {
$noappidtext = '';
}
- $enable = intval(PConfig::get(local_user(), 'curweather', 'curweather_enable'));
- $enable_checked = (($enable) ? ' checked="checked" ' : '');
-
- // load template and replace the macros
- $t = Renderer::getMarkupTemplate("settings.tpl", "addon/curweather/" );
+ $enabled = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'curweather', 'curweather_enable'));
- $s = Renderer::replaceMacros($t, [
- '$submit' => L10n::t('Save Settings'),
- '$header' => L10n::t('Current Weather').' '.L10n::t('Settings'),
- '$noappidtext' => $noappidtext,
- '$info' => L10n::t('Enter either the name of your location or the zip code.'),
- '$curweather_loc' => [ 'curweather_loc', L10n::t('Your Location'), $curweather_loc, L10n::t('Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.') ],
- '$curweather_units' => [ 'curweather_units', L10n::t('Units'), $curweather_units, L10n::t('select if the temperature should be displayed in °C or °F'), ['metric'=>'°C', 'imperial'=>'°F']],
- '$enabled' => [ 'curweather_enable', L10n::t('Show weather data'), $enable, '']
+ $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/curweather/');
+ $html = Renderer::replaceMacros($t, [
+ '$noappidtext' => $noappidtext,
+ '$info' => DI::l10n()->t('Enter either the name of your location or the zip code.'),
+ '$curweather_loc' => ['curweather_loc', DI::l10n()->t('Your Location'), $curweather_loc, DI::l10n()->t('Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.')],
+ '$curweather_units' => ['curweather_units', DI::l10n()->t('Units'), $curweather_units, DI::l10n()->t('select if the temperature should be displayed in °C or °F'), ['metric' => '°C', 'imperial' => '°F']],
+ '$enabled' => ['curweather_enable', DI::l10n()->t('Show weather data'), $enabled, ''],
]);
- return;
+ $data = [
+ 'addon' => 'curweather',
+ 'title' => DI::l10n()->t('Current Weather Settings'),
+ 'html' => $html,
+ ];
}
// Config stuff for the admin panel to let the admin of the node set a APPID
// for accessing the API of openweathermap
-function curweather_addon_admin_post(App $a)
+function curweather_addon_admin_post()
{
- if (!is_site_admin()) {
+ if (!DI::userSession()->isSiteAdmin()) {
return;
}
if (!empty($_POST['curweather-submit'])) {
- Config::set('curweather', 'appid', trim($_POST['appid']));
- Config::set('curweather', 'cachetime', trim($_POST['cachetime']));
-
- info(L10n::t('Curweather settings saved.' . PHP_EOL));
+ DI::config()->set('curweather', 'appid', trim($_POST['appid']));
+ DI::config()->set('curweather', 'cachetime', trim($_POST['cachetime']));
}
}
-function curweather_addon_admin(App $a, &$o)
+function curweather_addon_admin(string &$o)
{
- if (!is_site_admin()) {
+ if (!DI::userSession()->isSiteAdmin()) {
return;
}
- $appid = Config::get('curweather', 'appid');
- $cachetime = Config::get('curweather', 'cachetime');
+ $appid = DI::config()->get('curweather', 'appid');
+ $cachetime = DI::config()->get('curweather', 'cachetime');
- $t = Renderer::getMarkupTemplate("admin.tpl", "addon/curweather/" );
+ $t = Renderer::getMarkupTemplate('admin.tpl', 'addon/curweather/' );
$o = Renderer::replaceMacros($t, [
- '$submit' => L10n::t('Save Settings'),
+ '$submit' => DI::l10n()->t('Save Settings'),
'$cachetime' => [
'cachetime',
- L10n::t('Caching Interval'),
+ DI::l10n()->t('Caching Interval'),
$cachetime,
- L10n::t('For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'), [
- '0' => L10n::t('no cache'),
- '300' => '5 ' . L10n::t('minutes'),
- '900' => '15 ' . L10n::t('minutes'),
- '1800' => '30 ' . L10n::t('minutes'),
- '3600' => '60 ' . L10n::t('minutes')
+ DI::l10n()->t('For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'), [
+ '0' => DI::l10n()->t('no cache'),
+ '300' => '5 ' . DI::l10n()->t('minutes'),
+ '900' => '15 ' . DI::l10n()->t('minutes'),
+ '1800' => '30 ' . DI::l10n()->t('minutes'),
+ '3600' => '60 ' . DI::l10n()->t('minutes')
]
],
- '$appid' => ['appid', L10n::t('Your APPID'), $appid, L10n::t('Your API key provided by OpenWeatherMap')]
+ '$appid' => ['appid', DI::l10n()->t('Your APPID'), $appid, DI::l10n()->t('Your API key provided by OpenWeatherMap')]
]);
}
diff --git a/curweather/lang/C/messages.po b/curweather/lang/C/messages.po
index 048c327a..ec442c9c 100644
--- a/curweather/lang/C/messages.po
+++ b/curweather/lang/C/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-25 17:17+0200\n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,114 +17,106 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: curweather.php:31
-msgid "Error fetching weather data.\\nError was: "
-msgstr ""
-
-#: curweather.php:111 curweather.php:172
-msgid "Current Weather"
-msgstr ""
-
-#: curweather.php:118
-msgid "Relative Humidity"
-msgstr ""
-
-#: curweather.php:119
-msgid "Pressure"
-msgstr ""
-
-#: curweather.php:120
-msgid "Wind"
-msgstr ""
-
-#: curweather.php:121
-msgid "Last Updated"
-msgstr ""
-
-#: curweather.php:122
-msgid "Data by"
-msgstr ""
-
-#: curweather.php:123
-msgid "Show on map"
-msgstr ""
-
-#: curweather.php:128
-msgid "There was a problem accessing the weather data. But have a look"
+#: curweather.php:47
+msgid "Error fetching weather data. Error was: "
msgstr ""
#: curweather.php:130
+msgid "Current Weather"
+msgstr ""
+
+#: curweather.php:137
+msgid "Relative Humidity"
+msgstr ""
+
+#: curweather.php:138
+msgid "Pressure"
+msgstr ""
+
+#: curweather.php:139
+msgid "Wind"
+msgstr ""
+
+#: curweather.php:140
+msgid "Last Updated"
+msgstr ""
+
+#: curweather.php:141
+msgid "Data by"
+msgstr ""
+
+#: curweather.php:142
+msgid "Show on map"
+msgstr ""
+
+#: curweather.php:147
+msgid "There was a problem accessing the weather data. But have a look"
+msgstr ""
+
+#: curweather.php:149
msgid "at OpenWeatherMap"
msgstr ""
-#: curweather.php:146
-msgid "Current Weather settings updated."
-msgstr ""
-
-#: curweather.php:161
+#: curweather.php:178
msgid "No APPID found, please contact your admin to obtain one."
msgstr ""
-#: curweather.php:171 curweather.php:200
-msgid "Save Settings"
-msgstr ""
-
-#: curweather.php:172
-msgid "Settings"
-msgstr ""
-
-#: curweather.php:174
+#: curweather.php:188
msgid "Enter either the name of your location or the zip code."
msgstr ""
-#: curweather.php:175
+#: curweather.php:189
msgid "Your Location"
msgstr ""
-#: curweather.php:175
+#: curweather.php:189
msgid ""
"Identifier of your location (name or zip code), e.g. Berlin,DE or "
"14476,DE."
msgstr ""
-#: curweather.php:176
+#: curweather.php:190
msgid "Units"
msgstr ""
-#: curweather.php:176
+#: curweather.php:190
msgid "select if the temperature should be displayed in °C or °F"
msgstr ""
-#: curweather.php:177
+#: curweather.php:191
msgid "Show weather data"
msgstr ""
-#: curweather.php:190
-msgid "Curweather settings saved."
+#: curweather.php:196
+msgid "Current Weather Settings"
msgstr ""
-#: curweather.php:201
+#: curweather.php:227
+msgid "Save Settings"
+msgstr ""
+
+#: curweather.php:230
msgid "Caching Interval"
msgstr ""
-#: curweather.php:201
+#: curweather.php:232
msgid ""
"For how long should the weather data be cached? Choose according your "
"OpenWeatherMap account type."
msgstr ""
-#: curweather.php:201
+#: curweather.php:233
msgid "no cache"
msgstr ""
-#: curweather.php:201
+#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
msgid "minutes"
msgstr ""
-#: curweather.php:202
+#: curweather.php:240
msgid "Your APPID"
msgstr ""
-#: curweather.php:202
+#: curweather.php:240
msgid "Your API key provided by OpenWeatherMap"
msgstr ""
diff --git a/curweather/lang/ar/messages.po b/curweather/lang/ar/messages.po
new file mode 100644
index 00000000..fcb766b6
--- /dev/null
+++ b/curweather/lang/ar/messages.po
@@ -0,0 +1,125 @@
+# ADDON curweather
+# Copyright (C)
+# This file is distributed under the same license as the Friendica curweather addon package.
+#
+#
+# Translators:
+# abidin toumi , 2021
+# Farida Khalaf , 2021
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-10-29 08:35+0000\n"
+"Last-Translator: abidin toumi \n"
+"Language-Team: Arabic (http://www.transifex.com/Friendica/friendica/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"
+
+#: curweather.php:47
+msgid "Error fetching weather data. Error was: "
+msgstr "خطأ في جلب بيانات الطقس. كان الخطأ:"
+
+#: curweather.php:130 curweather.php:192
+msgid "Current Weather"
+msgstr "الطقس الحالي"
+
+#: curweather.php:137
+msgid "Relative Humidity"
+msgstr "نسبة الرطوبة "
+
+#: curweather.php:138
+msgid "Pressure"
+msgstr "الضغط"
+
+#: curweather.php:139
+msgid "Wind"
+msgstr "الرياح"
+
+#: curweather.php:140
+msgid "Last Updated"
+msgstr "آخر تحديث"
+
+#: curweather.php:141
+msgid "Data by"
+msgstr "البيانات بواسطة"
+
+#: curweather.php:142
+msgid "Show on map"
+msgstr "إظهار على الخريطة"
+
+#: curweather.php:147
+msgid "There was a problem accessing the weather data. But have a look"
+msgstr "حدثت مشكلة في الوصول إلى بيانات الطقس. الق نظرة"
+
+#: curweather.php:149
+msgid "at OpenWeatherMap"
+msgstr "في OpenWeatherMap"
+
+#: curweather.php:179
+msgid "No APPID found, please contact your admin to obtain one."
+msgstr "لم يتم العثور على معرف التطبيق ، يرجى الاتصال بالمدير للحصول على واحد."
+
+#: curweather.php:191 curweather.php:229
+msgid "Save Settings"
+msgstr "احفظ الإعدادات"
+
+#: curweather.php:192
+msgid "Settings"
+msgstr "الإعدادات"
+
+#: curweather.php:194
+msgid "Enter either the name of your location or the zip code."
+msgstr "أدخل اسم موقعك الجغرافي أو الرمز البريدي."
+
+#: curweather.php:195
+msgid "Your Location"
+msgstr "موقعك"
+
+#: curweather.php:195
+msgid ""
+"Identifier of your location (name or zip code), e.g. Berlin,DE or "
+"14476,DE."
+msgstr "تعرّيف موقعك (الاسم أو الرمز البريدي) ، على سبيل المثال Berlin,DE أو14476,DE ."
+
+#: curweather.php:196
+msgid "Units"
+msgstr "الوحدات"
+
+#: curweather.php:196
+msgid "select if the temperature should be displayed in °C or °F"
+msgstr "حدد ما إذا كان يجب عرض درجة الحرارة °C أو °F."
+
+#: curweather.php:197
+msgid "Show weather data"
+msgstr "أظهر بيانات الطقس"
+
+#: curweather.php:232
+msgid "Caching Interval"
+msgstr "فترة التخزين المؤقت"
+
+#: curweather.php:234
+msgid ""
+"For how long should the weather data be cached? Choose according your "
+"OpenWeatherMap account type."
+msgstr "إلى متى يجب تخزين بيانات الطقس مؤقتًا؟ اختر وفقًا لنوع حساب OpenWeatherMap. "
+
+#: curweather.php:235
+msgid "no cache"
+msgstr " لا تخزين مؤقت"
+
+#: curweather.php:236 curweather.php:237 curweather.php:238 curweather.php:239
+msgid "minutes"
+msgstr "دقائق"
+
+#: curweather.php:242
+msgid "Your APPID"
+msgstr "معرف التطبيق الخاص بك"
+
+#: curweather.php:242
+msgid "Your API key provided by OpenWeatherMap"
+msgstr " مفتاح API الخاص بك في OpenWeatherMap "
diff --git a/curweather/lang/ar/strings.php b/curweather/lang/ar/strings.php
new file mode 100644
index 00000000..8721dce3
--- /dev/null
+++ b/curweather/lang/ar/strings.php
@@ -0,0 +1,32 @@
+=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; }
+}}
+$a->strings['Error fetching weather data. Error was: '] = 'خطأ في جلب بيانات الطقس. كان الخطأ:';
+$a->strings['Current Weather'] = 'الطقس الحالي';
+$a->strings['Relative Humidity'] = 'نسبة الرطوبة ';
+$a->strings['Pressure'] = 'الضغط';
+$a->strings['Wind'] = 'الرياح';
+$a->strings['Last Updated'] = 'آخر تحديث';
+$a->strings['Data by'] = 'البيانات بواسطة';
+$a->strings['Show on map'] = 'إظهار على الخريطة';
+$a->strings['There was a problem accessing the weather data. But have a look'] = 'حدثت مشكلة في الوصول إلى بيانات الطقس. الق نظرة';
+$a->strings['at OpenWeatherMap'] = 'في OpenWeatherMap';
+$a->strings['No APPID found, please contact your admin to obtain one.'] = 'لم يتم العثور على معرف التطبيق ، يرجى الاتصال بالمدير للحصول على واحد.';
+$a->strings['Save Settings'] = 'احفظ الإعدادات';
+$a->strings['Settings'] = 'الإعدادات';
+$a->strings['Enter either the name of your location or the zip code.'] = 'أدخل اسم موقعك الجغرافي أو الرمز البريدي.';
+$a->strings['Your Location'] = 'موقعك';
+$a->strings['Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.'] = 'تعرّيف موقعك (الاسم أو الرمز البريدي) ، على سبيل المثال Berlin,DE أو14476,DE .';
+$a->strings['Units'] = 'الوحدات';
+$a->strings['select if the temperature should be displayed in °C or °F'] = 'حدد ما إذا كان يجب عرض درجة الحرارة °C أو °F.';
+$a->strings['Show weather data'] = 'أظهر بيانات الطقس';
+$a->strings['Caching Interval'] = 'فترة التخزين المؤقت';
+$a->strings['For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'] = 'إلى متى يجب تخزين بيانات الطقس مؤقتًا؟ اختر وفقًا لنوع حساب OpenWeatherMap. ';
+$a->strings['no cache'] = ' لا تخزين مؤقت';
+$a->strings['minutes'] = 'دقائق';
+$a->strings['Your APPID'] = 'معرف التطبيق الخاص بك';
+$a->strings['Your API key provided by OpenWeatherMap'] = ' مفتاح API الخاص بك في OpenWeatherMap ';
diff --git a/curweather/lang/ca/strings.php b/curweather/lang/ca/strings.php
index 4fed6616..6d065223 100644
--- a/curweather/lang/ca/strings.php
+++ b/curweather/lang/ca/strings.php
@@ -3,33 +3,32 @@
if(! function_exists("string_plural_select_ca")) {
function string_plural_select_ca($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Error fetching weather data.\\nError was: "] = "S'ha produït un error en recuperar les dades meteorològiques. \\\\ NEror ha estat:";
-$a->strings["Current Weather"] = "Temps actual";
-$a->strings["Relative Humidity"] = "Humitat relativa";
-$a->strings["Pressure"] = "pressió";
-$a->strings["Wind"] = "vent";
-$a->strings["Last Updated"] = "Última actualització";
-$a->strings["Data by"] = "Dades de";
-$a->strings["Show on map"] = "Mostra al mapa";
-$a->strings["There was a problem accessing the weather data. But have a look"] = "S'ha produït un problema en accedir a les dades meteorològiques. Però mireu-ho";
-$a->strings["at OpenWeatherMap"] = "a OpenWeatherMap";
-$a->strings["Current Weather settings updated."] = "S'ha actualitzat la configuració meteorològica actual.";
-$a->strings["No APPID found, please contact your admin to obtain one."] = "No s'ha trobat cap APPID. Poseu-vos en contacte amb l'administrador per obtenir-ne una.";
-$a->strings["Save Settings"] = "Desa la configuració";
-$a->strings["Settings"] = "Configuració";
-$a->strings["Enter either the name of your location or the zip code."] = "Introduïu el nom de la vostra ubicació o el codi postal.";
-$a->strings["Your Location"] = "La teva localització";
-$a->strings["Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE."] = "Identificador de la vostra ubicació (nom o codi postal), e.g. Berlin,DE or 14476,DE.";
-$a->strings["Units"] = "unitat";
-$a->strings["select if the temperature should be displayed in °C or °F"] = "seleccioneu si la temperatura ha de mostrar-se en ° C o ° F";
-$a->strings["Show weather data"] = "Mostra dades meteorològiques";
-$a->strings["Curweather settings saved."] = "S'han desat els paràmetres de Curweather.";
-$a->strings["Caching Interval"] = "Interval de cau";
-$a->strings["For how long should the weather data be cached? Choose according your OpenWeatherMap account type."] = "Per quant temps s’han de mantenir en memòria cau les dades meteorològiques? Trieu segons el vostre tipus de compte OpenWeatherMap.";
-$a->strings["no cache"] = "no cau";
-$a->strings["minutes"] = "minuts";
-$a->strings["Your APPID"] = "La vostra APPID";
-$a->strings["Your API key provided by OpenWeatherMap"] = "La vostra clau d’API proporcionada per OpenWeatherMap";
+$a->strings['Error fetching weather data.\nError was: '] = 'S\'ha produït un error en recuperar les dades meteorològiques. \\ NEror ha estat:';
+$a->strings['Current Weather'] = 'Temps actual';
+$a->strings['Relative Humidity'] = 'Humitat relativa';
+$a->strings['Pressure'] = 'pressió';
+$a->strings['Wind'] = 'vent';
+$a->strings['Last Updated'] = 'Última actualització';
+$a->strings['Data by'] = 'Dades de';
+$a->strings['Show on map'] = 'Mostra al mapa';
+$a->strings['There was a problem accessing the weather data. But have a look'] = 'S\'ha produït un problema en accedir a les dades meteorològiques. Però mireu-ho';
+$a->strings['at OpenWeatherMap'] = 'a OpenWeatherMap';
+$a->strings['Current Weather settings updated.'] = 'S\'ha actualitzat la configuració meteorològica actual.';
+$a->strings['No APPID found, please contact your admin to obtain one.'] = 'No s\'ha trobat cap APPID. Poseu-vos en contacte amb l\'administrador per obtenir-ne una.';
+$a->strings['Save Settings'] = 'Desa la configuració';
+$a->strings['Settings'] = 'Configuració';
+$a->strings['Enter either the name of your location or the zip code.'] = 'Introduïu el nom de la vostra ubicació o el codi postal.';
+$a->strings['Your Location'] = 'La teva localització';
+$a->strings['Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.'] = 'Identificador de la vostra ubicació (nom o codi postal), e.g. Berlin,DE or 14476,DE.';
+$a->strings['Units'] = 'unitat';
+$a->strings['select if the temperature should be displayed in °C or °F'] = 'seleccioneu si la temperatura ha de mostrar-se en ° C o ° F';
+$a->strings['Show weather data'] = 'Mostra dades meteorològiques';
+$a->strings['Curweather settings saved.'] = 'S\'han desat els paràmetres de Curweather.';
+$a->strings['Caching Interval'] = 'Interval de cau';
+$a->strings['For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'] = 'Per quant temps s’han de mantenir en memòria cau les dades meteorològiques? Trieu segons el vostre tipus de compte OpenWeatherMap.';
+$a->strings['no cache'] = 'no cau';
+$a->strings['minutes'] = 'minuts';
+$a->strings['Your APPID'] = 'La vostra APPID';
+$a->strings['Your API key provided by OpenWeatherMap'] = 'La vostra clau d’API proporcionada per OpenWeatherMap';
diff --git a/curweather/lang/cs/messages.po b/curweather/lang/cs/messages.po
index 389550eb..eddde113 100644
--- a/curweather/lang/cs/messages.po
+++ b/curweather/lang/cs/messages.po
@@ -11,124 +11,116 @@ msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-25 17:17+0200\n"
-"PO-Revision-Date: 2018-07-05 17:03+0000\n"
-"Last-Translator: Aditoo\n"
-"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-22 11:34+0000\n"
+"Last-Translator: Aditoo, 2018\n"
+"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/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=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
-#: curweather.php:31
-msgid "Error fetching weather data.\\nError was: "
-msgstr "Chyba při získávání dat o počasí.\\nChyba:"
+#: curweather.php:47
+msgid "Error fetching weather data. Error was: "
+msgstr ""
-#: curweather.php:111 curweather.php:172
+#: curweather.php:130
msgid "Current Weather"
msgstr "Aktuální počasí"
-#: curweather.php:118
+#: curweather.php:137
msgid "Relative Humidity"
msgstr "Relativní vlhkost vzduchu"
-#: curweather.php:119
+#: curweather.php:138
msgid "Pressure"
msgstr "Tlak"
-#: curweather.php:120
+#: curweather.php:139
msgid "Wind"
msgstr "Vítr"
-#: curweather.php:121
+#: curweather.php:140
msgid "Last Updated"
msgstr "Naposledy aktualizováno"
-#: curweather.php:122
+#: curweather.php:141
msgid "Data by"
msgstr "Data podle"
-#: curweather.php:123
+#: curweather.php:142
msgid "Show on map"
msgstr "Ukázat na mapě"
-#: curweather.php:128
+#: curweather.php:147
msgid "There was a problem accessing the weather data. But have a look"
msgstr "Při získávání dat o počasí nastala chyba. Podívejte se ale"
-#: curweather.php:130
+#: curweather.php:149
msgid "at OpenWeatherMap"
msgstr "na OpenWeatherMap"
-#: curweather.php:146
-msgid "Current Weather settings updated."
-msgstr "Nastavení pro Aktuální počasí aktualizováno."
-
-#: curweather.php:161
+#: curweather.php:178
msgid "No APPID found, please contact your admin to obtain one."
msgstr "Žádné APPID nebylo nalezeno, prosím kontaktujte svého administrátora pro získání APPID."
-#: curweather.php:171 curweather.php:200
-msgid "Save Settings"
-msgstr "Uložit nastavení"
-
-#: curweather.php:172
-msgid "Settings"
-msgstr "Nastavení"
-
-#: curweather.php:174
+#: curweather.php:188
msgid "Enter either the name of your location or the zip code."
msgstr "Zadejte buď název místa, kde se nacházíte, nebo PSČ."
-#: curweather.php:175
+#: curweather.php:189
msgid "Your Location"
msgstr "Vaše poloha"
-#: curweather.php:175
+#: curweather.php:189
msgid ""
"Identifier of your location (name or zip code), e.g. Berlin,DE or "
"14476,DE."
msgstr "Identifikátor vaší polohy (název nebo PSČ), např. Praha,CZ nebo 11000,CZ."
-#: curweather.php:176
+#: curweather.php:190
msgid "Units"
msgstr "Jednotky"
-#: curweather.php:176
+#: curweather.php:190
msgid "select if the temperature should be displayed in °C or °F"
msgstr "vyberte, jestli by se teplota měla zobrazovat v °C či °F"
-#: curweather.php:177
+#: curweather.php:191
msgid "Show weather data"
msgstr "Ukázat data o počasí"
-#: curweather.php:190
-msgid "Curweather settings saved."
-msgstr "Nastavení Curwather uložena."
+#: curweather.php:196
+msgid "Current Weather Settings"
+msgstr ""
-#: curweather.php:201
+#: curweather.php:227
+msgid "Save Settings"
+msgstr "Uložit nastavení"
+
+#: curweather.php:230
msgid "Caching Interval"
-msgstr "Ukládám interval do mezipaměti"
+msgstr "Interval mezipaměti"
-#: curweather.php:201
+#: curweather.php:232
msgid ""
"For how long should the weather data be cached? Choose according your "
"OpenWeatherMap account type."
msgstr "Na jak dlouho by vaše data o počasí měla být uložena v mezipaměti? Vyberte podle typu vašeho účtu na OpenWeatherMap."
-#: curweather.php:201
+#: curweather.php:233
msgid "no cache"
msgstr "žádná mezipaměť"
-#: curweather.php:201
+#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
msgid "minutes"
msgstr "minut"
-#: curweather.php:202
+#: curweather.php:240
msgid "Your APPID"
msgstr "Vaše APPID"
-#: curweather.php:202
+#: curweather.php:240
msgid "Your API key provided by OpenWeatherMap"
msgstr "Váš API klíč poskytnutý OpenWetherMap"
diff --git a/curweather/lang/cs/strings.php b/curweather/lang/cs/strings.php
index 565fe7d7..78baa8a7 100644
--- a/curweather/lang/cs/strings.php
+++ b/curweather/lang/cs/strings.php
@@ -3,33 +3,28 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
$n = intval($n);
- return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
+ if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; }
}}
-;
-$a->strings["Error fetching weather data.\\nError was: "] = "Chyba při získávání dat o počasí.\\nChyba:";
-$a->strings["Current Weather"] = "Aktuální počasí";
-$a->strings["Relative Humidity"] = "Relativní vlhkost vzduchu";
-$a->strings["Pressure"] = "Tlak";
-$a->strings["Wind"] = "Vítr";
-$a->strings["Last Updated"] = "Naposledy aktualizováno";
-$a->strings["Data by"] = "Data podle";
-$a->strings["Show on map"] = "Ukázat na mapě";
-$a->strings["There was a problem accessing the weather data. But have a look"] = "Při získávání dat o počasí nastala chyba. Podívejte se ale";
-$a->strings["at OpenWeatherMap"] = "na OpenWeatherMap";
-$a->strings["Current Weather settings updated."] = "Nastavení pro Aktuální počasí aktualizováno.";
-$a->strings["No APPID found, please contact your admin to obtain one."] = "Žádné APPID nebylo nalezeno, prosím kontaktujte svého administrátora pro získání APPID.";
-$a->strings["Save Settings"] = "Uložit nastavení";
-$a->strings["Settings"] = "Nastavení";
-$a->strings["Enter either the name of your location or the zip code."] = "Zadejte buď název místa, kde se nacházíte, nebo PSČ.";
-$a->strings["Your Location"] = "Vaše poloha";
-$a->strings["Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE."] = "Identifikátor vaší polohy (název nebo PSČ), např. Praha,CZ nebo 11000,CZ.";
-$a->strings["Units"] = "Jednotky";
-$a->strings["select if the temperature should be displayed in °C or °F"] = "vyberte, jestli by se teplota měla zobrazovat v °C či °F";
-$a->strings["Show weather data"] = "Ukázat data o počasí";
-$a->strings["Curweather settings saved."] = "Nastavení Curwather uložena.";
-$a->strings["Caching Interval"] = "Ukládám interval do mezipaměti";
-$a->strings["For how long should the weather data be cached? Choose according your OpenWeatherMap account type."] = "Na jak dlouho by vaše data o počasí měla být uložena v mezipaměti? Vyberte podle typu vašeho účtu na OpenWeatherMap.";
-$a->strings["no cache"] = "žádná mezipaměť";
-$a->strings["minutes"] = "minut";
-$a->strings["Your APPID"] = "Vaše APPID";
-$a->strings["Your API key provided by OpenWeatherMap"] = "Váš API klíč poskytnutý OpenWetherMap";
+$a->strings['Current Weather'] = 'Aktuální počasí';
+$a->strings['Relative Humidity'] = 'Relativní vlhkost vzduchu';
+$a->strings['Pressure'] = 'Tlak';
+$a->strings['Wind'] = 'Vítr';
+$a->strings['Last Updated'] = 'Naposledy aktualizováno';
+$a->strings['Data by'] = 'Data podle';
+$a->strings['Show on map'] = 'Ukázat na mapě';
+$a->strings['There was a problem accessing the weather data. But have a look'] = 'Při získávání dat o počasí nastala chyba. Podívejte se ale';
+$a->strings['at OpenWeatherMap'] = 'na OpenWeatherMap';
+$a->strings['No APPID found, please contact your admin to obtain one.'] = 'Žádné APPID nebylo nalezeno, prosím kontaktujte svého administrátora pro získání APPID.';
+$a->strings['Enter either the name of your location or the zip code.'] = 'Zadejte buď název místa, kde se nacházíte, nebo PSČ.';
+$a->strings['Your Location'] = 'Vaše poloha';
+$a->strings['Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.'] = 'Identifikátor vaší polohy (název nebo PSČ), např. Praha,CZ nebo 11000,CZ.';
+$a->strings['Units'] = 'Jednotky';
+$a->strings['select if the temperature should be displayed in °C or °F'] = 'vyberte, jestli by se teplota měla zobrazovat v °C či °F';
+$a->strings['Show weather data'] = 'Ukázat data o počasí';
+$a->strings['Save Settings'] = 'Uložit nastavení';
+$a->strings['Caching Interval'] = 'Interval mezipaměti';
+$a->strings['For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'] = 'Na jak dlouho by vaše data o počasí měla být uložena v mezipaměti? Vyberte podle typu vašeho účtu na OpenWeatherMap.';
+$a->strings['no cache'] = 'žádná mezipaměť';
+$a->strings['minutes'] = 'minut';
+$a->strings['Your APPID'] = 'Vaše APPID';
+$a->strings['Your API key provided by OpenWeatherMap'] = 'Váš API klíč poskytnutý OpenWetherMap';
diff --git a/curweather/lang/da-dk/messages.po b/curweather/lang/da-dk/messages.po
new file mode 100644
index 00000000..0fb7fa38
--- /dev/null
+++ b/curweather/lang/da-dk/messages.po
@@ -0,0 +1,123 @@
+# ADDON curweather
+# Copyright (C)
+# This file is distributed under the same license as the Friendica curweather addon package.
+#
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-22 11:34+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Danish (Denmark) (http://www.transifex.com/Friendica/friendica/language/da_DK/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: da_DK\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: curweather.php:47
+msgid "Error fetching weather data. Error was: "
+msgstr ""
+
+#: curweather.php:130
+msgid "Current Weather"
+msgstr ""
+
+#: curweather.php:137
+msgid "Relative Humidity"
+msgstr ""
+
+#: curweather.php:138
+msgid "Pressure"
+msgstr ""
+
+#: curweather.php:139
+msgid "Wind"
+msgstr ""
+
+#: curweather.php:140
+msgid "Last Updated"
+msgstr ""
+
+#: curweather.php:141
+msgid "Data by"
+msgstr ""
+
+#: curweather.php:142
+msgid "Show on map"
+msgstr ""
+
+#: curweather.php:147
+msgid "There was a problem accessing the weather data. But have a look"
+msgstr ""
+
+#: curweather.php:149
+msgid "at OpenWeatherMap"
+msgstr ""
+
+#: curweather.php:178
+msgid "No APPID found, please contact your admin to obtain one."
+msgstr ""
+
+#: curweather.php:188
+msgid "Enter either the name of your location or the zip code."
+msgstr ""
+
+#: curweather.php:189
+msgid "Your Location"
+msgstr ""
+
+#: curweather.php:189
+msgid ""
+"Identifier of your location (name or zip code), e.g. Berlin,DE or "
+"14476,DE."
+msgstr ""
+
+#: curweather.php:190
+msgid "Units"
+msgstr ""
+
+#: curweather.php:190
+msgid "select if the temperature should be displayed in °C or °F"
+msgstr ""
+
+#: curweather.php:191
+msgid "Show weather data"
+msgstr ""
+
+#: curweather.php:196
+msgid "Current Weather Settings"
+msgstr ""
+
+#: curweather.php:227
+msgid "Save Settings"
+msgstr ""
+
+#: curweather.php:230
+msgid "Caching Interval"
+msgstr ""
+
+#: curweather.php:232
+msgid ""
+"For how long should the weather data be cached? Choose according your "
+"OpenWeatherMap account type."
+msgstr ""
+
+#: curweather.php:233
+msgid "no cache"
+msgstr ""
+
+#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
+msgid "minutes"
+msgstr ""
+
+#: curweather.php:240
+msgid "Your APPID"
+msgstr ""
+
+#: curweather.php:240
+msgid "Your API key provided by OpenWeatherMap"
+msgstr ""
diff --git a/curweather/lang/da-dk/strings.php b/curweather/lang/da-dk/strings.php
new file mode 100644
index 00000000..09554750
--- /dev/null
+++ b/curweather/lang/da-dk/strings.php
@@ -0,0 +1,7 @@
+, 2016
+# Till Mohr , 2021
# Tobias Diekershoff , 2014-2015
-# Tobias Diekershoff , 2016
+# Tobias Diekershoff , 2016,2021-2022
+# Ulf Rompe , 2019
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-25 17:17+0200\n"
-"PO-Revision-Date: 2016-09-26 10:17+0000\n"
-"Last-Translator: Tobias Diekershoff \n"
-"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-22 11:34+0000\n"
+"Last-Translator: Tobias Diekershoff , 2016,2021-2022\n"
+"Language-Team: German (http://app.transifex.com/Friendica/friendica/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"
-#: curweather.php:31
-msgid "Error fetching weather data.\\nError was: "
-msgstr "Fehler beim abrufen der Wetterdaten.\\nDie Fehlermeldung lautet:"
+#: curweather.php:47
+msgid "Error fetching weather data. Error was: "
+msgstr "Fehler beim Abrufen der Wetterdaten. Die Fehlermeldung lautet:"
-#: curweather.php:111 curweather.php:172
+#: curweather.php:130
msgid "Current Weather"
msgstr "Aktuelles Wetter"
-#: curweather.php:118
+#: curweather.php:137
msgid "Relative Humidity"
msgstr "Relative Luftfeuchtigkeit"
-#: curweather.php:119
+#: curweather.php:138
msgid "Pressure"
msgstr "Luftdruck"
-#: curweather.php:120
+#: curweather.php:139
msgid "Wind"
msgstr "Wind"
-#: curweather.php:121
+#: curweather.php:140
msgid "Last Updated"
msgstr "Letzte Aktualisierung"
-#: curweather.php:122
+#: curweather.php:141
msgid "Data by"
msgstr "Daten von"
-#: curweather.php:123
+#: curweather.php:142
msgid "Show on map"
msgstr "Karte anzeigen"
-#: curweather.php:128
+#: curweather.php:147
msgid "There was a problem accessing the weather data. But have a look"
-msgstr "Es gab ein Problem beim Abrufen der Wetterdaten. Aber werf doch mal einen Blick"
+msgstr "Es gab ein Problem beim Abrufen der Wetterdaten. Aber wirf doch mal einen Blick"
-#: curweather.php:130
+#: curweather.php:149
msgid "at OpenWeatherMap"
msgstr "auf OpenWeatherMap"
-#: curweather.php:146
-msgid "Current Weather settings updated."
-msgstr "Einstellungen des Aktuellen Wetter Addons aktualisiert."
-
-#: curweather.php:161
+#: curweather.php:178
msgid "No APPID found, please contact your admin to obtain one."
-msgstr "Keine APPID gefunden, bitte kontaktiere deinen Admin damit eine eingerichtet wird."
+msgstr "Keine APPID gefunden, bitte kontaktiere deinen Admin, damit eine eingerichtet wird."
-#: curweather.php:171 curweather.php:200
-msgid "Save Settings"
-msgstr "Einstellungen speichern"
-
-#: curweather.php:172
-msgid "Settings"
-msgstr "Einstellungen"
-
-#: curweather.php:174
+#: curweather.php:188
msgid "Enter either the name of your location or the zip code."
msgstr "Gib entweder den Namen oder die PLZ deines Ortes ein."
-#: curweather.php:175
+#: curweather.php:189
msgid "Your Location"
msgstr "Deinen Standort festlegen"
-#: curweather.php:175
+#: curweather.php:189
msgid ""
"Identifier of your location (name or zip code), e.g. Berlin,DE or "
"14476,DE."
msgstr "Identifikator deines Standorts (Name oder Postleitzahl), z.B. Berlin,DE oder 14476,DE."
-#: curweather.php:176
+#: curweather.php:190
msgid "Units"
msgstr "Einheiten"
-#: curweather.php:176
-msgid "select if the temperature should be displayed in °C or °F"
-msgstr "wähle ob die Temperatur in °C oder °F angezeigt werden soll"
-
-#: curweather.php:177
-msgid "Show weather data"
-msgstr "Zeige Wetter Daten"
-
#: curweather.php:190
-msgid "Curweather settings saved."
-msgstr "Curweather Einstellungen gespeichert."
+msgid "select if the temperature should be displayed in °C or °F"
+msgstr "wähle, ob die Temperatur in °C oder °F angezeigt werden soll"
-#: curweather.php:201
+#: curweather.php:191
+msgid "Show weather data"
+msgstr "Zeige Wetterdaten"
+
+#: curweather.php:196
+msgid "Current Weather Settings"
+msgstr "Aktuelles Wetter Einstellungen"
+
+#: curweather.php:227
+msgid "Save Settings"
+msgstr "Einstellungen speichern"
+
+#: curweather.php:230
msgid "Caching Interval"
-msgstr "Cache Intervall"
+msgstr "Cache-Intervall"
-#: curweather.php:201
+#: curweather.php:232
msgid ""
"For how long should the weather data be cached? Choose according your "
"OpenWeatherMap account type."
-msgstr "Wie lange sollen die Wetter Daten gecached werden? Wähle einen für deinen OpenWeatherMap Account passende Einstellung."
+msgstr "Wie lange sollen die Wetterdaten zwischengespeichert werden? Wähle eine für deinen OpenWeatherMap-Account passende Einstellung."
-#: curweather.php:201
+#: curweather.php:233
msgid "no cache"
msgstr "kein Cache"
-#: curweather.php:201
+#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
msgid "minutes"
msgstr "Minuten"
-#: curweather.php:202
+#: curweather.php:240
msgid "Your APPID"
msgstr "Deine APPID"
-#: curweather.php:202
+#: curweather.php:240
msgid "Your API key provided by OpenWeatherMap"
-msgstr "Der API Schlüssel von OpenWeatherMap"
+msgstr "Der API-Schlüssel von OpenWeatherMap"
diff --git a/curweather/lang/de/strings.php b/curweather/lang/de/strings.php
index 2f1f0e3d..89980429 100644
--- a/curweather/lang/de/strings.php
+++ b/curweather/lang/de/strings.php
@@ -2,33 +2,31 @@
if(! function_exists("string_plural_select_de")) {
function string_plural_select_de($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Error fetching weather data.\\nError was: "] = "Fehler beim abrufen der Wetterdaten.\\nDie Fehlermeldung lautet:";
-$a->strings["Current Weather"] = "Aktuelles Wetter";
-$a->strings["Relative Humidity"] = "Relative Luftfeuchtigkeit";
-$a->strings["Pressure"] = "Luftdruck";
-$a->strings["Wind"] = "Wind";
-$a->strings["Last Updated"] = "Letzte Aktualisierung";
-$a->strings["Data by"] = "Daten von";
-$a->strings["Show on map"] = "Karte anzeigen";
-$a->strings["There was a problem accessing the weather data. But have a look"] = "Es gab ein Problem beim Abrufen der Wetterdaten. Aber werf doch mal einen Blick";
-$a->strings["at OpenWeatherMap"] = "auf OpenWeatherMap";
-$a->strings["Current Weather settings updated."] = "Einstellungen des Aktuellen Wetter Addons aktualisiert.";
-$a->strings["No APPID found, please contact your admin to obtain one."] = "Keine APPID gefunden, bitte kontaktiere deinen Admin damit eine eingerichtet wird.";
-$a->strings["Save Settings"] = "Einstellungen speichern";
-$a->strings["Settings"] = "Einstellungen";
-$a->strings["Enter either the name of your location or the zip code."] = "Gib entweder den Namen oder die PLZ deines Ortes ein.";
-$a->strings["Your Location"] = "Deinen Standort festlegen";
-$a->strings["Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE."] = "Identifikator deines Standorts (Name oder Postleitzahl), z.B. Berlin,DE oder 14476,DE.";
-$a->strings["Units"] = "Einheiten";
-$a->strings["select if the temperature should be displayed in °C or °F"] = "wähle ob die Temperatur in °C oder °F angezeigt werden soll";
-$a->strings["Show weather data"] = "Zeige Wetter Daten";
-$a->strings["Curweather settings saved."] = "Curweather Einstellungen gespeichert.";
-$a->strings["Caching Interval"] = "Cache Intervall";
-$a->strings["For how long should the weather data be cached? Choose according your OpenWeatherMap account type."] = "Wie lange sollen die Wetter Daten gecached werden? Wähle einen für deinen OpenWeatherMap Account passende Einstellung.";
-$a->strings["no cache"] = "kein Cache";
-$a->strings["minutes"] = "Minuten";
-$a->strings["Your APPID"] = "Deine APPID";
-$a->strings["Your API key provided by OpenWeatherMap"] = "Der API Schlüssel von OpenWeatherMap";
+$a->strings['Error fetching weather data. Error was: '] = 'Fehler beim Abrufen der Wetterdaten. Die Fehlermeldung lautet:';
+$a->strings['Current Weather'] = 'Aktuelles Wetter';
+$a->strings['Relative Humidity'] = 'Relative Luftfeuchtigkeit';
+$a->strings['Pressure'] = 'Luftdruck';
+$a->strings['Wind'] = 'Wind';
+$a->strings['Last Updated'] = 'Letzte Aktualisierung';
+$a->strings['Data by'] = 'Daten von';
+$a->strings['Show on map'] = 'Karte anzeigen';
+$a->strings['There was a problem accessing the weather data. But have a look'] = 'Es gab ein Problem beim Abrufen der Wetterdaten. Aber wirf doch mal einen Blick';
+$a->strings['at OpenWeatherMap'] = 'auf OpenWeatherMap';
+$a->strings['No APPID found, please contact your admin to obtain one.'] = 'Keine APPID gefunden, bitte kontaktiere deinen Admin, damit eine eingerichtet wird.';
+$a->strings['Enter either the name of your location or the zip code.'] = 'Gib entweder den Namen oder die PLZ deines Ortes ein.';
+$a->strings['Your Location'] = 'Deinen Standort festlegen';
+$a->strings['Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.'] = 'Identifikator deines Standorts (Name oder Postleitzahl), z.B. Berlin,DE oder 14476,DE.';
+$a->strings['Units'] = 'Einheiten';
+$a->strings['select if the temperature should be displayed in °C or °F'] = 'wähle, ob die Temperatur in °C oder °F angezeigt werden soll';
+$a->strings['Show weather data'] = 'Zeige Wetterdaten';
+$a->strings['Current Weather Settings'] = 'Aktuelles Wetter Einstellungen';
+$a->strings['Save Settings'] = 'Einstellungen speichern';
+$a->strings['Caching Interval'] = 'Cache-Intervall';
+$a->strings['For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'] = 'Wie lange sollen die Wetterdaten zwischengespeichert werden? Wähle eine für deinen OpenWeatherMap-Account passende Einstellung.';
+$a->strings['no cache'] = 'kein Cache';
+$a->strings['minutes'] = 'Minuten';
+$a->strings['Your APPID'] = 'Deine APPID';
+$a->strings['Your API key provided by OpenWeatherMap'] = 'Der API-Schlüssel von OpenWeatherMap';
diff --git a/curweather/lang/es/messages.po b/curweather/lang/es/messages.po
index 6dfd444d..9678d701 100644
--- a/curweather/lang/es/messages.po
+++ b/curweather/lang/es/messages.po
@@ -4,14 +4,15 @@
#
#
# Translators:
-# Alberto Díaz Tormo , 2016
+# Albert, 2016
+# Senex Petrovic , 2021
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-25 17:17+0200\n"
-"PO-Revision-Date: 2016-10-23 11:30+0000\n"
-"Last-Translator: Alberto Díaz Tormo \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-04-01 09:48+0000\n"
+"Last-Translator: Senex Petrovic \n"
"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,114 +20,106 @@ msgstr ""
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: curweather.php:31
-msgid "Error fetching weather data.\\nError was: "
-msgstr "Error al traer información del clima.\\nError era: "
+#: curweather.php:47
+msgid "Error fetching weather data. Error was: "
+msgstr "Error al obtener datos meteorológicos. El error fue:"
-#: curweather.php:111 curweather.php:172
+#: curweather.php:130 curweather.php:192
msgid "Current Weather"
msgstr "Clima actual"
-#: curweather.php:118
+#: curweather.php:137
msgid "Relative Humidity"
msgstr "Humedad relativa"
-#: curweather.php:119
+#: curweather.php:138
msgid "Pressure"
msgstr "Presión"
-#: curweather.php:120
+#: curweather.php:139
msgid "Wind"
msgstr "Viento"
-#: curweather.php:121
+#: curweather.php:140
msgid "Last Updated"
msgstr "Última actualización"
-#: curweather.php:122
+#: curweather.php:141
msgid "Data by"
msgstr "Información por"
-#: curweather.php:123
+#: curweather.php:142
msgid "Show on map"
msgstr "Mostrar en mapa"
-#: curweather.php:128
+#: curweather.php:147
msgid "There was a problem accessing the weather data. But have a look"
msgstr "Hubo un problema al acceder a la información del clima. Pero eche un vistazo"
-#: curweather.php:130
+#: curweather.php:149
msgid "at OpenWeatherMap"
msgstr "en OpenWeatherMap"
-#: curweather.php:146
-msgid "Current Weather settings updated."
-msgstr "Ajustes de clima actual actualizados"
-
-#: curweather.php:161
+#: curweather.php:179
msgid "No APPID found, please contact your admin to obtain one."
msgstr "No se encontró APPID, por favor contacte con su administrador para obtener una."
-#: curweather.php:171 curweather.php:200
+#: curweather.php:191 curweather.php:229
msgid "Save Settings"
msgstr "Guardar ajustes"
-#: curweather.php:172
+#: curweather.php:192
msgid "Settings"
msgstr "Ajustes"
-#: curweather.php:174
+#: curweather.php:194
msgid "Enter either the name of your location or the zip code."
msgstr "Introduzca el nombre de su ubicación o el código postal."
-#: curweather.php:175
+#: curweather.php:195
msgid "Your Location"
msgstr "Su ubicación"
-#: curweather.php:175
+#: curweather.php:195
msgid ""
"Identifier of your location (name or zip code), e.g. Berlin,DE or "
"14476,DE."
msgstr "Identificador de su ubicación (nombre o código postal), ej. Berlin,DE o 14476,DE."
-#: curweather.php:176
+#: curweather.php:196
msgid "Units"
msgstr "Unidades"
-#: curweather.php:176
+#: curweather.php:196
msgid "select if the temperature should be displayed in °C or °F"
msgstr "seleccionar si la temperatura debería ser mostrada en °C o °F"
-#: curweather.php:177
+#: curweather.php:197
msgid "Show weather data"
msgstr "Mostrar información de clima"
-#: curweather.php:190
-msgid "Curweather settings saved."
-msgstr "Ajustes de clima guardados."
-
-#: curweather.php:201
+#: curweather.php:232
msgid "Caching Interval"
msgstr "Obteniendo intervalo"
-#: curweather.php:201
+#: curweather.php:234
msgid ""
"For how long should the weather data be cached? Choose according your "
"OpenWeatherMap account type."
msgstr "¿Durante cuánto tiempo debería ser obtenida la información de clima? Eliga de acuerdo a su tipo de cuenta de OpenWeatherMap."
-#: curweather.php:201
+#: curweather.php:235
msgid "no cache"
msgstr "sin almacenamiento"
-#: curweather.php:201
+#: curweather.php:236 curweather.php:237 curweather.php:238 curweather.php:239
msgid "minutes"
msgstr "minutos"
-#: curweather.php:202
+#: curweather.php:242
msgid "Your APPID"
msgstr "Su APPID"
-#: curweather.php:202
+#: curweather.php:242
msgid "Your API key provided by OpenWeatherMap"
msgstr "Su clave API provista por OpenWeatherMap"
diff --git a/curweather/lang/es/strings.php b/curweather/lang/es/strings.php
index f968076a..25f3f22a 100644
--- a/curweather/lang/es/strings.php
+++ b/curweather/lang/es/strings.php
@@ -2,33 +2,31 @@
if(! function_exists("string_plural_select_es")) {
function string_plural_select_es($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Error fetching weather data.\\nError was: "] = "Error al traer información del clima.\\nError era: ";
-$a->strings["Current Weather"] = "Clima actual";
-$a->strings["Relative Humidity"] = "Humedad relativa";
-$a->strings["Pressure"] = "Presión";
-$a->strings["Wind"] = "Viento";
-$a->strings["Last Updated"] = "Última actualización";
-$a->strings["Data by"] = "Información por";
-$a->strings["Show on map"] = "Mostrar en mapa";
-$a->strings["There was a problem accessing the weather data. But have a look"] = "Hubo un problema al acceder a la información del clima. Pero eche un vistazo";
-$a->strings["at OpenWeatherMap"] = "en OpenWeatherMap";
-$a->strings["Current Weather settings updated."] = "Ajustes de clima actual actualizados";
-$a->strings["No APPID found, please contact your admin to obtain one."] = "No se encontró APPID, por favor contacte con su administrador para obtener una.";
-$a->strings["Save Settings"] = "Guardar ajustes";
-$a->strings["Settings"] = "Ajustes";
-$a->strings["Enter either the name of your location or the zip code."] = "Introduzca el nombre de su ubicación o el código postal.";
-$a->strings["Your Location"] = "Su ubicación";
-$a->strings["Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE."] = "Identificador de su ubicación (nombre o código postal), ej. Berlin,DE o 14476,DE.";
-$a->strings["Units"] = "Unidades";
-$a->strings["select if the temperature should be displayed in °C or °F"] = "seleccionar si la temperatura debería ser mostrada en °C o °F";
-$a->strings["Show weather data"] = "Mostrar información de clima";
-$a->strings["Curweather settings saved."] = "Ajustes de clima guardados.";
-$a->strings["Caching Interval"] = "Obteniendo intervalo";
-$a->strings["For how long should the weather data be cached? Choose according your OpenWeatherMap account type."] = "¿Durante cuánto tiempo debería ser obtenida la información de clima? Eliga de acuerdo a su tipo de cuenta de OpenWeatherMap.";
-$a->strings["no cache"] = "sin almacenamiento";
-$a->strings["minutes"] = "minutos";
-$a->strings["Your APPID"] = "Su APPID";
-$a->strings["Your API key provided by OpenWeatherMap"] = "Su clave API provista por OpenWeatherMap";
+$a->strings['Error fetching weather data. Error was: '] = 'Error al obtener datos meteorológicos. El error fue:';
+$a->strings['Current Weather'] = 'Clima actual';
+$a->strings['Relative Humidity'] = 'Humedad relativa';
+$a->strings['Pressure'] = 'Presión';
+$a->strings['Wind'] = 'Viento';
+$a->strings['Last Updated'] = 'Última actualización';
+$a->strings['Data by'] = 'Información por';
+$a->strings['Show on map'] = 'Mostrar en mapa';
+$a->strings['There was a problem accessing the weather data. But have a look'] = 'Hubo un problema al acceder a la información del clima. Pero eche un vistazo';
+$a->strings['at OpenWeatherMap'] = 'en OpenWeatherMap';
+$a->strings['No APPID found, please contact your admin to obtain one.'] = 'No se encontró APPID, por favor contacte con su administrador para obtener una.';
+$a->strings['Save Settings'] = 'Guardar ajustes';
+$a->strings['Settings'] = 'Ajustes';
+$a->strings['Enter either the name of your location or the zip code.'] = 'Introduzca el nombre de su ubicación o el código postal.';
+$a->strings['Your Location'] = 'Su ubicación';
+$a->strings['Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.'] = 'Identificador de su ubicación (nombre o código postal), ej. Berlin,DE o 14476,DE.';
+$a->strings['Units'] = 'Unidades';
+$a->strings['select if the temperature should be displayed in °C or °F'] = 'seleccionar si la temperatura debería ser mostrada en °C o °F';
+$a->strings['Show weather data'] = 'Mostrar información de clima';
+$a->strings['Caching Interval'] = 'Obteniendo intervalo';
+$a->strings['For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'] = '¿Durante cuánto tiempo debería ser obtenida la información de clima? Eliga de acuerdo a su tipo de cuenta de OpenWeatherMap.';
+$a->strings['no cache'] = 'sin almacenamiento';
+$a->strings['minutes'] = 'minutos';
+$a->strings['Your APPID'] = 'Su APPID';
+$a->strings['Your API key provided by OpenWeatherMap'] = 'Su clave API provista por OpenWeatherMap';
diff --git a/curweather/lang/fi-fi/strings.php b/curweather/lang/fi-fi/strings.php
index d942398d..df84451e 100644
--- a/curweather/lang/fi-fi/strings.php
+++ b/curweather/lang/fi-fi/strings.php
@@ -3,33 +3,31 @@
if(! function_exists("string_plural_select_fi_fi")) {
function string_plural_select_fi_fi($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Error fetching weather data.\\nError was: "] = "Säätietojen noutamisessa tapahtui virhe.\\nLisätietoja: ";
-$a->strings["Current Weather"] = "Sää";
-$a->strings["Relative Humidity"] = "Suhteellinen kosteus";
-$a->strings["Pressure"] = "Ilmanpaine";
-$a->strings["Wind"] = "Tuuli";
-$a->strings["Last Updated"] = "Viimeksi päivitetty";
-$a->strings["Data by"] = "Tiedot tuottaa";
-$a->strings["Show on map"] = "Näytä kartalla";
-$a->strings["There was a problem accessing the weather data. But have a look"] = "Säätietohaussa tapahtui virhe. Voit kuitenkin katsoa";
-$a->strings["at OpenWeatherMap"] = "OpenWeatherMappiä";
-$a->strings["Current Weather settings updated."] = "Sääasetukset päivitetty.";
-$a->strings["No APPID found, please contact your admin to obtain one."] = "APPID puuttuu, ota yhteyttä ylläpitäjään.";
-$a->strings["Save Settings"] = "Tallenna asetukset";
-$a->strings["Settings"] = "Asetukset";
-$a->strings["Enter either the name of your location or the zip code."] = "Syötä sijaintisi nimi tai postinumero.";
-$a->strings["Your Location"] = "Sijaintisi";
-$a->strings["Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE."] = "Sijantisi (paikka tai postinumero), esim. Helsinki,FI tai 00100,FI.";
-$a->strings["Units"] = "Yksiköt";
-$a->strings["select if the temperature should be displayed in °C or °F"] = "ota käyttöön Celsius-asteikko (°C) tai Fahrenheit-asteikko (°F)";
-$a->strings["Show weather data"] = "Näytä säätiedot";
-$a->strings["Curweather settings saved."] = "Curweather -asetukset tallennettu.";
-$a->strings["Caching Interval"] = "Välimuistin aikaväli";
-$a->strings["For how long should the weather data be cached? Choose according your OpenWeatherMap account type."] = "";
-$a->strings["no cache"] = "Ei välimuistia";
-$a->strings["minutes"] = "minuuttia";
-$a->strings["Your APPID"] = "Sinun APPID";
-$a->strings["Your API key provided by OpenWeatherMap"] = "API-avain OpenWeatherMapiltä";
+$a->strings['Error fetching weather data.\nError was: '] = 'Säätietojen noutamisessa tapahtui virhe.\nLisätietoja: ';
+$a->strings['Current Weather'] = 'Sää';
+$a->strings['Relative Humidity'] = 'Suhteellinen kosteus';
+$a->strings['Pressure'] = 'Ilmanpaine';
+$a->strings['Wind'] = 'Tuuli';
+$a->strings['Last Updated'] = 'Viimeksi päivitetty';
+$a->strings['Data by'] = 'Tiedot tuottaa';
+$a->strings['Show on map'] = 'Näytä kartalla';
+$a->strings['There was a problem accessing the weather data. But have a look'] = 'Säätietohaussa tapahtui virhe. Voit kuitenkin katsoa';
+$a->strings['at OpenWeatherMap'] = 'OpenWeatherMappiä';
+$a->strings['Current Weather settings updated.'] = 'Sääasetukset päivitetty.';
+$a->strings['No APPID found, please contact your admin to obtain one.'] = 'APPID puuttuu, ota yhteyttä ylläpitäjään.';
+$a->strings['Save Settings'] = 'Tallenna asetukset';
+$a->strings['Settings'] = 'Asetukset';
+$a->strings['Enter either the name of your location or the zip code.'] = 'Syötä sijaintisi nimi tai postinumero.';
+$a->strings['Your Location'] = 'Sijaintisi';
+$a->strings['Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.'] = 'Sijantisi (paikka tai postinumero), esim. Helsinki,FI tai 00100,FI.';
+$a->strings['Units'] = 'Yksiköt';
+$a->strings['select if the temperature should be displayed in °C or °F'] = 'ota käyttöön Celsius-asteikko (°C) tai Fahrenheit-asteikko (°F)';
+$a->strings['Show weather data'] = 'Näytä säätiedot';
+$a->strings['Curweather settings saved.'] = 'Curweather -asetukset tallennettu.';
+$a->strings['Caching Interval'] = 'Välimuistin aikaväli';
+$a->strings['no cache'] = 'Ei välimuistia';
+$a->strings['minutes'] = 'minuuttia';
+$a->strings['Your APPID'] = 'Sinun APPID';
+$a->strings['Your API key provided by OpenWeatherMap'] = 'API-avain OpenWeatherMapiltä';
diff --git a/curweather/lang/fr/messages.po b/curweather/lang/fr/messages.po
index 0518bb21..57ed6b8b 100644
--- a/curweather/lang/fr/messages.po
+++ b/curweather/lang/fr/messages.po
@@ -4,131 +4,125 @@
#
#
# Translators:
+# bob lebonche , 2021
+# Hypolite Petovan , 2022
# Hypolite Petovan , 2016
-# Nicola Spanti , 2015
+# ea1cd8241cb389ffb6f92bc6891eff5d_dc12308 <70dced5587d47e18d88f9298024d96f8_93383>, 2015
# StefOfficiel , 2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-03-12 08:10+0100\n"
-"PO-Revision-Date: 2016-09-24 03:15+0000\n"
-"Last-Translator: Hypolite Petovan \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-22 11:34+0000\n"
+"Last-Translator: Hypolite Petovan , 2022\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/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"
+"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
-#: curweather.php:31
-msgid "Error fetching weather data.\\nError was: "
-msgstr "Erreur durant la récupération de la météo.\\nL'erreur était : "
+#: curweather.php:47
+msgid "Error fetching weather data. Error was: "
+msgstr "Erreur de récupération des données météo. L'erreur était :"
-#: curweather.php:111 curweather.php:172
+#: curweather.php:130
msgid "Current Weather"
msgstr "Météo actuelle"
-#: curweather.php:118
+#: curweather.php:137
msgid "Relative Humidity"
msgstr "Humidité relative"
-#: curweather.php:119
+#: curweather.php:138
msgid "Pressure"
msgstr "Pression"
-#: curweather.php:120
+#: curweather.php:139
msgid "Wind"
msgstr "Vent"
-#: curweather.php:121
+#: curweather.php:140
msgid "Last Updated"
msgstr "Dernière mise-à-jour"
-#: curweather.php:122
+#: curweather.php:141
msgid "Data by"
msgstr "Données de"
-#: curweather.php:123
+#: curweather.php:142
msgid "Show on map"
msgstr "Montrer sur la carte"
-#: curweather.php:128
+#: curweather.php:147
msgid "There was a problem accessing the weather data. But have a look"
msgstr "Une erreur est survenue lors de l'accès aux données météo. Vous pouvez quand même jeter un oeil"
-#: curweather.php:130
+#: curweather.php:149
msgid "at OpenWeatherMap"
msgstr "à OpenWeatherMap"
-#: curweather.php:146
-msgid "Current Weather settings updated."
-msgstr "Paramètres de la Météo Actuelle mis à jour."
+#: curweather.php:178
+msgid "No APPID found, please contact your admin to obtain one."
+msgstr "Pas d'APPID trouvé, merci de contacter votre administrateur pour en obtenir un."
-#: curweather.php:161
-msgid "No APPID found, please contact your admin to optain one."
-msgstr "APPID introuvable, veuillez contacter votre administrateur pour en obtenir un."
-
-#: curweather.php:171 curweather.php:200
-msgid "Save Settings"
-msgstr "Sauvegarder les paramètres"
-
-#: curweather.php:172
-msgid "Settings"
-msgstr "Paramètres"
-
-#: curweather.php:174
+#: curweather.php:188
msgid "Enter either the name of your location or the zip code."
msgstr "Entrez le nom de votre emplacement ou votre code postal."
-#: curweather.php:175
+#: curweather.php:189
msgid "Your Location"
msgstr "Votre position"
-#: curweather.php:175
+#: curweather.php:189
msgid ""
"Identifier of your location (name or zip code), e.g. Berlin,DE or "
"14476,DE."
msgstr "Identifiant de votre emplacement (nom ou code postal), par exemple Paris 08, Fr ou 75008, FR."
-#: curweather.php:176
+#: curweather.php:190
msgid "Units"
msgstr "Unités"
-#: curweather.php:176
-msgid "select if the temperatur should be displayed in °C or °F"
-msgstr "choisissez si la température doit être affichée en °C ou °F"
+#: curweather.php:190
+msgid "select if the temperature should be displayed in °C or °F"
+msgstr "Sélectionner si la température devrait être affichée en °C ou en °F"
-#: curweather.php:177
+#: curweather.php:191
msgid "Show weather data"
msgstr "Montrer les données météos"
-#: curweather.php:190
-msgid "Curweather settings saved."
-msgstr "Paramètres Curweather sauvés."
+#: curweather.php:196
+msgid "Current Weather Settings"
+msgstr "Paramètres de Météo"
-#: curweather.php:201
+#: curweather.php:227
+msgid "Save Settings"
+msgstr "Sauvegarder les paramètres"
+
+#: curweather.php:230
msgid "Caching Interval"
msgstr "Intervalle de mise en cache."
-#: curweather.php:201
+#: curweather.php:232
msgid ""
"For how long should the weather data be cached? Choose according your "
"OpenWeatherMap account type."
msgstr "Pendant combien de temps les données météo doivent-elles être mises en cache? Choisissez en fonction du type de compte OpenWeatherMap."
-#: curweather.php:201
+#: curweather.php:233
msgid "no cache"
msgstr "pas de cache"
-#: curweather.php:201
+#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
msgid "minutes"
msgstr "minutes"
-#: curweather.php:202
+#: curweather.php:240
msgid "Your APPID"
msgstr "Votre APPID"
-#: curweather.php:202
+#: curweather.php:240
msgid "Your API key provided by OpenWeatherMap"
msgstr "Votre clé pour l'API de OpenWeatherMap"
diff --git a/curweather/lang/fr/strings.php b/curweather/lang/fr/strings.php
index 466a0508..be5c1ba5 100644
--- a/curweather/lang/fr/strings.php
+++ b/curweather/lang/fr/strings.php
@@ -2,33 +2,31 @@
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
- return ($n > 1);;
+ $n = intval($n);
+ if (($n == 0 || $n == 1)) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; }
}}
-;
-$a->strings["Error fetching weather data.\\nError was: "] = "Erreur durant la récupération de la météo.\\nL'erreur était : ";
-$a->strings["Current Weather"] = "Météo actuelle";
-$a->strings["Relative Humidity"] = "Humidité relative";
-$a->strings["Pressure"] = "Pression";
-$a->strings["Wind"] = "Vent";
-$a->strings["Last Updated"] = "Dernière mise-à-jour";
-$a->strings["Data by"] = "Données de";
-$a->strings["Show on map"] = "Montrer sur la carte";
-$a->strings["There was a problem accessing the weather data. But have a look"] = "Une erreur est survenue lors de l'accès aux données météo. Vous pouvez quand même jeter un oeil";
-$a->strings["at OpenWeatherMap"] = "à OpenWeatherMap";
-$a->strings["Current Weather settings updated."] = "Paramètres de la Météo Actuelle mis à jour.";
-$a->strings["No APPID found, please contact your admin to optain one."] = "APPID introuvable, veuillez contacter votre administrateur pour en obtenir un.";
-$a->strings["Save Settings"] = "Sauvegarder les paramètres";
-$a->strings["Settings"] = "Paramètres";
-$a->strings["Enter either the name of your location or the zip code."] = "Entrez le nom de votre emplacement ou votre code postal.";
-$a->strings["Your Location"] = "Votre position";
-$a->strings["Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE."] = "Identifiant de votre emplacement (nom ou code postal), par exemple Paris 08, Fr ou 75008, FR.";
-$a->strings["Units"] = "Unités";
-$a->strings["select if the temperatur should be displayed in °C or °F"] = "choisissez si la température doit être affichée en °C ou °F";
-$a->strings["Show weather data"] = "Montrer les données météos";
-$a->strings["Curweather settings saved."] = "Paramètres Curweather sauvés.";
-$a->strings["Caching Interval"] = "Intervalle de mise en cache.";
-$a->strings["For how long should the weather data be cached? Choose according your OpenWeatherMap account type."] = "Pendant combien de temps les données météo doivent-elles être mises en cache? Choisissez en fonction du type de compte OpenWeatherMap.";
-$a->strings["no cache"] = "pas de cache";
-$a->strings["minutes"] = "minutes";
-$a->strings["Your APPID"] = "Votre APPID";
-$a->strings["Your API key provided by OpenWeatherMap"] = "Votre clé pour l'API de OpenWeatherMap";
+$a->strings['Error fetching weather data. Error was: '] = 'Erreur de récupération des données météo. L\'erreur était :';
+$a->strings['Current Weather'] = 'Météo actuelle';
+$a->strings['Relative Humidity'] = 'Humidité relative';
+$a->strings['Pressure'] = 'Pression';
+$a->strings['Wind'] = 'Vent';
+$a->strings['Last Updated'] = 'Dernière mise-à-jour';
+$a->strings['Data by'] = 'Données de';
+$a->strings['Show on map'] = 'Montrer sur la carte';
+$a->strings['There was a problem accessing the weather data. But have a look'] = 'Une erreur est survenue lors de l\'accès aux données météo. Vous pouvez quand même jeter un oeil';
+$a->strings['at OpenWeatherMap'] = 'à OpenWeatherMap';
+$a->strings['No APPID found, please contact your admin to obtain one.'] = 'Pas d\'APPID trouvé, merci de contacter votre administrateur pour en obtenir un.';
+$a->strings['Enter either the name of your location or the zip code.'] = 'Entrez le nom de votre emplacement ou votre code postal.';
+$a->strings['Your Location'] = 'Votre position';
+$a->strings['Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.'] = 'Identifiant de votre emplacement (nom ou code postal), par exemple Paris 08, Fr ou 75008, FR.';
+$a->strings['Units'] = 'Unités';
+$a->strings['select if the temperature should be displayed in °C or °F'] = 'Sélectionner si la température devrait être affichée en °C ou en °F';
+$a->strings['Show weather data'] = 'Montrer les données météos';
+$a->strings['Current Weather Settings'] = 'Paramètres de Météo';
+$a->strings['Save Settings'] = 'Sauvegarder les paramètres';
+$a->strings['Caching Interval'] = 'Intervalle de mise en cache.';
+$a->strings['For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'] = 'Pendant combien de temps les données météo doivent-elles être mises en cache? Choisissez en fonction du type de compte OpenWeatherMap.';
+$a->strings['no cache'] = 'pas de cache';
+$a->strings['minutes'] = 'minutes';
+$a->strings['Your APPID'] = 'Votre APPID';
+$a->strings['Your API key provided by OpenWeatherMap'] = 'Votre clé pour l\'API de OpenWeatherMap';
diff --git a/curweather/lang/hu/messages.po b/curweather/lang/hu/messages.po
new file mode 100644
index 00000000..e2429bc9
--- /dev/null
+++ b/curweather/lang/hu/messages.po
@@ -0,0 +1,124 @@
+# ADDON curweather
+# Copyright (C)
+# This file is distributed under the same license as the Friendica curweather addon package.
+#
+#
+# Translators:
+# Balázs Úr, 2020-2021
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-22 11:34+0000\n"
+"Last-Translator: Balázs Úr, 2020-2021\n"
+"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/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"
+
+#: curweather.php:47
+msgid "Error fetching weather data. Error was: "
+msgstr "Hiba az időjárásadatok lekérésekor. A hiba ez volt: "
+
+#: curweather.php:130
+msgid "Current Weather"
+msgstr "Jelenlegi időjárás"
+
+#: curweather.php:137
+msgid "Relative Humidity"
+msgstr "Relatív páratartalom"
+
+#: curweather.php:138
+msgid "Pressure"
+msgstr "Légnyomás"
+
+#: curweather.php:139
+msgid "Wind"
+msgstr "Szél"
+
+#: curweather.php:140
+msgid "Last Updated"
+msgstr "Utoljára frissítve"
+
+#: curweather.php:141
+msgid "Data by"
+msgstr "Adatszolgáltató"
+
+#: curweather.php:142
+msgid "Show on map"
+msgstr "Megjelenítés térképen"
+
+#: curweather.php:147
+msgid "There was a problem accessing the weather data. But have a look"
+msgstr "Probléma történt az időjárási adatokhoz való hozzáféréskor. De nézzen körül itt:"
+
+#: curweather.php:149
+msgid "at OpenWeatherMap"
+msgstr "OpenWeatherMap"
+
+#: curweather.php:178
+msgid "No APPID found, please contact your admin to obtain one."
+msgstr "Nem található alkalmazásazonosító. Vegye fel a kapcsolatot az adminisztrátorral, hogy beszerezzen egyet."
+
+#: curweather.php:188
+msgid "Enter either the name of your location or the zip code."
+msgstr "Adja meg a tartózkodási helyének nevét vagy irányítószámát."
+
+#: curweather.php:189
+msgid "Your Location"
+msgstr "Az Ön tartózkodási helye"
+
+#: curweather.php:189
+msgid ""
+"Identifier of your location (name or zip code), e.g. Berlin,DE or "
+"14476,DE."
+msgstr "A tartózkodási helyének azonosítója (neve vagy irányítószáma), például Budapest,HU vagy 1234,HU."
+
+#: curweather.php:190
+msgid "Units"
+msgstr "Mértékegységek"
+
+#: curweather.php:190
+msgid "select if the temperature should be displayed in °C or °F"
+msgstr "Annak kiválasztása, hogy a hőmérsékletet °C vagy °F fokban kell megjeleníteni."
+
+#: curweather.php:191
+msgid "Show weather data"
+msgstr "Időjárási adatok megjelenítése"
+
+#: curweather.php:196
+msgid "Current Weather Settings"
+msgstr "Jelenlegi időjárás beállításai"
+
+#: curweather.php:227
+msgid "Save Settings"
+msgstr "Beállítások mentése"
+
+#: curweather.php:230
+msgid "Caching Interval"
+msgstr "Gyorsítótárazási időköz"
+
+#: curweather.php:232
+msgid ""
+"For how long should the weather data be cached? Choose according your "
+"OpenWeatherMap account type."
+msgstr "Mennyi ideig kell az időjárási adatokat gyorsítótárazni? Válasszon az OpenWeatherMap fióktípusa szerint."
+
+#: curweather.php:233
+msgid "no cache"
+msgstr "nincs gyorsítótár"
+
+#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
+msgid "minutes"
+msgstr "perc"
+
+#: curweather.php:240
+msgid "Your APPID"
+msgstr "Az alkalmazásazonosítója"
+
+#: curweather.php:240
+msgid "Your API key provided by OpenWeatherMap"
+msgstr "Az OpenWeatherMap által biztosított API-kulcsa"
diff --git a/curweather/lang/hu/strings.php b/curweather/lang/hu/strings.php
new file mode 100644
index 00000000..b80ffc89
--- /dev/null
+++ b/curweather/lang/hu/strings.php
@@ -0,0 +1,32 @@
+strings['Error fetching weather data. Error was: '] = 'Hiba az időjárásadatok lekérésekor. A hiba ez volt: ';
+$a->strings['Current Weather'] = 'Jelenlegi időjárás';
+$a->strings['Relative Humidity'] = 'Relatív páratartalom';
+$a->strings['Pressure'] = 'Légnyomás';
+$a->strings['Wind'] = 'Szél';
+$a->strings['Last Updated'] = 'Utoljára frissítve';
+$a->strings['Data by'] = 'Adatszolgáltató';
+$a->strings['Show on map'] = 'Megjelenítés térképen';
+$a->strings['There was a problem accessing the weather data. But have a look'] = 'Probléma történt az időjárási adatokhoz való hozzáféréskor. De nézzen körül itt:';
+$a->strings['at OpenWeatherMap'] = 'OpenWeatherMap';
+$a->strings['No APPID found, please contact your admin to obtain one.'] = 'Nem található alkalmazásazonosító. Vegye fel a kapcsolatot az adminisztrátorral, hogy beszerezzen egyet.';
+$a->strings['Enter either the name of your location or the zip code.'] = 'Adja meg a tartózkodási helyének nevét vagy irányítószámát.';
+$a->strings['Your Location'] = 'Az Ön tartózkodási helye';
+$a->strings['Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.'] = 'A tartózkodási helyének azonosítója (neve vagy irányítószáma), például Budapest,HU vagy 1234,HU.';
+$a->strings['Units'] = 'Mértékegységek';
+$a->strings['select if the temperature should be displayed in °C or °F'] = 'Annak kiválasztása, hogy a hőmérsékletet °C vagy °F fokban kell megjeleníteni.';
+$a->strings['Show weather data'] = 'Időjárási adatok megjelenítése';
+$a->strings['Current Weather Settings'] = 'Jelenlegi időjárás beállításai';
+$a->strings['Save Settings'] = 'Beállítások mentése';
+$a->strings['Caching Interval'] = 'Gyorsítótárazási időköz';
+$a->strings['For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'] = 'Mennyi ideig kell az időjárási adatokat gyorsítótárazni? Válasszon az OpenWeatherMap fióktípusa szerint.';
+$a->strings['no cache'] = 'nincs gyorsítótár';
+$a->strings['minutes'] = 'perc';
+$a->strings['Your APPID'] = 'Az alkalmazásazonosítója';
+$a->strings['Your API key provided by OpenWeatherMap'] = 'Az OpenWeatherMap által biztosított API-kulcsa';
diff --git a/curweather/lang/it/messages.po b/curweather/lang/it/messages.po
index fe0f0770..5a7e2cac 100644
--- a/curweather/lang/it/messages.po
+++ b/curweather/lang/it/messages.po
@@ -5,14 +5,15 @@
#
# Translators:
# fabrixxm , 2014-2015
+# Sylke Vicious , 2021
# Tobias Diekershoff , 2016
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-25 17:17+0200\n"
-"PO-Revision-Date: 2017-09-20 06:07+0000\n"
-"Last-Translator: Tobias Diekershoff \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-02-16 12:57+0000\n"
+"Last-Translator: Sylke Vicious \n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -20,114 +21,106 @@ msgstr ""
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: curweather.php:31
-msgid "Error fetching weather data.\\nError was: "
-msgstr "Errore recuperando i dati meteo: "
+#: curweather.php:47
+msgid "Error fetching weather data. Error was: "
+msgstr "Errore durante il recupero dei dati meteo. L'errore è stato:"
-#: curweather.php:111 curweather.php:172
+#: curweather.php:130 curweather.php:192
msgid "Current Weather"
msgstr "Meteo"
-#: curweather.php:118
+#: curweather.php:137
msgid "Relative Humidity"
msgstr "Umidità Relativa"
-#: curweather.php:119
+#: curweather.php:138
msgid "Pressure"
msgstr "Pressione"
-#: curweather.php:120
+#: curweather.php:139
msgid "Wind"
msgstr "Vento"
-#: curweather.php:121
+#: curweather.php:140
msgid "Last Updated"
msgstr "Ultimo Aggiornamento: "
-#: curweather.php:122
+#: curweather.php:141
msgid "Data by"
msgstr "Data da"
-#: curweather.php:123
+#: curweather.php:142
msgid "Show on map"
msgstr "Mostra sulla mappa"
-#: curweather.php:128
+#: curweather.php:147
msgid "There was a problem accessing the weather data. But have a look"
msgstr "C'è stato un problema accedendo ai dati meteo, ma dai un'occhiata"
-#: curweather.php:130
+#: curweather.php:149
msgid "at OpenWeatherMap"
msgstr "a OpenWeatherMap"
-#: curweather.php:146
-msgid "Current Weather settings updated."
-msgstr "Impostazioni Meteo aggiornate."
-
-#: curweather.php:161
+#: curweather.php:179
msgid "No APPID found, please contact your admin to obtain one."
msgstr "APPID non trovata, contatta il tuo amministratore per averne una."
-#: curweather.php:171 curweather.php:200
+#: curweather.php:191 curweather.php:229
msgid "Save Settings"
msgstr "Salva Impostazioni"
-#: curweather.php:172
+#: curweather.php:192
msgid "Settings"
msgstr "Impostazioni"
-#: curweather.php:174
+#: curweather.php:194
msgid "Enter either the name of your location or the zip code."
msgstr "Inserisci il nome della tua posizione o il CAP"
-#: curweather.php:175
+#: curweather.php:195
msgid "Your Location"
msgstr "La tua Posizione"
-#: curweather.php:175
+#: curweather.php:195
msgid ""
"Identifier of your location (name or zip code), e.g. Berlin,DE or "
"14476,DE."
msgstr "Identificatore della tua posizione (nome o CAP), p.e. Roma, IT or 00186,IT."
-#: curweather.php:176
+#: curweather.php:196
msgid "Units"
msgstr "Unità"
-#: curweather.php:176
+#: curweather.php:196
msgid "select if the temperature should be displayed in °C or °F"
msgstr "scegli se la temperatura deve essere mostrata in °C o in °F"
-#: curweather.php:177
+#: curweather.php:197
msgid "Show weather data"
msgstr "Mostra dati meteo"
-#: curweather.php:190
-msgid "Curweather settings saved."
-msgstr "Impostazioni Curweather salvati."
-
-#: curweather.php:201
+#: curweather.php:232
msgid "Caching Interval"
msgstr "Intervallo di cache"
-#: curweather.php:201
+#: curweather.php:234
msgid ""
"For how long should the weather data be cached? Choose according your "
"OpenWeatherMap account type."
msgstr "Per quanto tempo i dati meteo devono essere memorizzati? Scegli a seconda del tuo tipo di account su OpenWeatherMap."
-#: curweather.php:201
+#: curweather.php:235
msgid "no cache"
msgstr "nessuna cache"
-#: curweather.php:201
+#: curweather.php:236 curweather.php:237 curweather.php:238 curweather.php:239
msgid "minutes"
msgstr "minuti"
-#: curweather.php:202
+#: curweather.php:242
msgid "Your APPID"
msgstr "Il tuo APPID"
-#: curweather.php:202
+#: curweather.php:242
msgid "Your API key provided by OpenWeatherMap"
msgstr "La tua chiave API da OpenWeatherMap"
diff --git a/curweather/lang/it/strings.php b/curweather/lang/it/strings.php
index 99525cc1..a497dace 100644
--- a/curweather/lang/it/strings.php
+++ b/curweather/lang/it/strings.php
@@ -2,33 +2,31 @@
if(! function_exists("string_plural_select_it")) {
function string_plural_select_it($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Error fetching weather data.\\nError was: "] = "Errore recuperando i dati meteo: ";
-$a->strings["Current Weather"] = "Meteo";
-$a->strings["Relative Humidity"] = "Umidità Relativa";
-$a->strings["Pressure"] = "Pressione";
-$a->strings["Wind"] = "Vento";
-$a->strings["Last Updated"] = "Ultimo Aggiornamento: ";
-$a->strings["Data by"] = "Data da";
-$a->strings["Show on map"] = "Mostra sulla mappa";
-$a->strings["There was a problem accessing the weather data. But have a look"] = "C'è stato un problema accedendo ai dati meteo, ma dai un'occhiata";
-$a->strings["at OpenWeatherMap"] = "a OpenWeatherMap";
-$a->strings["Current Weather settings updated."] = "Impostazioni Meteo aggiornate.";
-$a->strings["No APPID found, please contact your admin to obtain one."] = "APPID non trovata, contatta il tuo amministratore per averne una.";
-$a->strings["Save Settings"] = "Salva Impostazioni";
-$a->strings["Settings"] = "Impostazioni";
-$a->strings["Enter either the name of your location or the zip code."] = "Inserisci il nome della tua posizione o il CAP";
-$a->strings["Your Location"] = "La tua Posizione";
-$a->strings["Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE."] = "Identificatore della tua posizione (nome o CAP), p.e. Roma, IT or 00186,IT.";
-$a->strings["Units"] = "Unità";
-$a->strings["select if the temperature should be displayed in °C or °F"] = "scegli se la temperatura deve essere mostrata in °C o in °F";
-$a->strings["Show weather data"] = "Mostra dati meteo";
-$a->strings["Curweather settings saved."] = "Impostazioni Curweather salvati.";
-$a->strings["Caching Interval"] = "Intervallo di cache";
-$a->strings["For how long should the weather data be cached? Choose according your OpenWeatherMap account type."] = "Per quanto tempo i dati meteo devono essere memorizzati? Scegli a seconda del tuo tipo di account su OpenWeatherMap.";
-$a->strings["no cache"] = "nessuna cache";
-$a->strings["minutes"] = "minuti";
-$a->strings["Your APPID"] = "Il tuo APPID";
-$a->strings["Your API key provided by OpenWeatherMap"] = "La tua chiave API da OpenWeatherMap";
+$a->strings['Error fetching weather data. Error was: '] = 'Errore durante il recupero dei dati meteo. L\'errore è stato:';
+$a->strings['Current Weather'] = 'Meteo';
+$a->strings['Relative Humidity'] = 'Umidità Relativa';
+$a->strings['Pressure'] = 'Pressione';
+$a->strings['Wind'] = 'Vento';
+$a->strings['Last Updated'] = 'Ultimo Aggiornamento: ';
+$a->strings['Data by'] = 'Data da';
+$a->strings['Show on map'] = 'Mostra sulla mappa';
+$a->strings['There was a problem accessing the weather data. But have a look'] = 'C\'è stato un problema accedendo ai dati meteo, ma dai un\'occhiata';
+$a->strings['at OpenWeatherMap'] = 'a OpenWeatherMap';
+$a->strings['No APPID found, please contact your admin to obtain one.'] = 'APPID non trovata, contatta il tuo amministratore per averne una.';
+$a->strings['Save Settings'] = 'Salva Impostazioni';
+$a->strings['Settings'] = 'Impostazioni';
+$a->strings['Enter either the name of your location or the zip code.'] = 'Inserisci il nome della tua posizione o il CAP';
+$a->strings['Your Location'] = 'La tua Posizione';
+$a->strings['Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.'] = 'Identificatore della tua posizione (nome o CAP), p.e. Roma, IT or 00186,IT.';
+$a->strings['Units'] = 'Unità';
+$a->strings['select if the temperature should be displayed in °C or °F'] = 'scegli se la temperatura deve essere mostrata in °C o in °F';
+$a->strings['Show weather data'] = 'Mostra dati meteo';
+$a->strings['Caching Interval'] = 'Intervallo di cache';
+$a->strings['For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'] = 'Per quanto tempo i dati meteo devono essere memorizzati? Scegli a seconda del tuo tipo di account su OpenWeatherMap.';
+$a->strings['no cache'] = 'nessuna cache';
+$a->strings['minutes'] = 'minuti';
+$a->strings['Your APPID'] = 'Il tuo APPID';
+$a->strings['Your API key provided by OpenWeatherMap'] = 'La tua chiave API da OpenWeatherMap';
diff --git a/curweather/lang/nl/strings.php b/curweather/lang/nl/strings.php
index 9a4a4d29..ee7d7127 100644
--- a/curweather/lang/nl/strings.php
+++ b/curweather/lang/nl/strings.php
@@ -3,33 +3,32 @@
if(! function_exists("string_plural_select_nl")) {
function string_plural_select_nl($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Error fetching weather data.\\nError was: "] = "Fout bij het ophalen van de weer data:\\nFout was:";
-$a->strings["Current Weather"] = "Het weer";
-$a->strings["Relative Humidity"] = "Relatieve vochtigheid";
-$a->strings["Pressure"] = "Luchtdruk";
-$a->strings["Wind"] = "Wind";
-$a->strings["Last Updated"] = "Laatste wijziging";
-$a->strings["Data by"] = "Data afkomstig van";
-$a->strings["Show on map"] = "Toon op kaart";
-$a->strings["There was a problem accessing the weather data. But have a look"] = "Er was een probleem met het ophalen van de data. Bekijk het";
-$a->strings["at OpenWeatherMap"] = "Op OpenWeatherMap";
-$a->strings["Current Weather settings updated."] = "Huidige weerinstellingen opgeslagen";
-$a->strings["No APPID found, please contact your admin to obtain one."] = "Geen APPID gevonden. Contacteer je node-admin om dit te verkrijgen";
-$a->strings["Save Settings"] = "Instellingen opslaan";
-$a->strings["Settings"] = "Instellingen";
-$a->strings["Enter either the name of your location or the zip code."] = "Voor de naam of de postcode van je locatie in";
-$a->strings["Your Location"] = "Uw locatie";
-$a->strings["Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE."] = "ID van je locatie (naam of postocde), vb. Amsterdam, NL of 2000,BE";
-$a->strings["Units"] = "Eenheden";
-$a->strings["select if the temperature should be displayed in °C or °F"] = "Selecteer of de temperatuur in °C of °F moet weergegeven worden";
-$a->strings["Show weather data"] = "Toon weer ";
-$a->strings["Curweather settings saved."] = "Curweather instellingen opgeslagen";
-$a->strings["Caching Interval"] = "Caching interval";
-$a->strings["For how long should the weather data be cached? Choose according your OpenWeatherMap account type."] = "Voor hoe lang moet de weer data opgeslagen worden? Kies dit volgens je OpenWeatherMap account type.";
-$a->strings["no cache"] = "Geen cache";
-$a->strings["minutes"] = "Minuten";
-$a->strings["Your APPID"] = "Uw APPID";
-$a->strings["Your API key provided by OpenWeatherMap"] = "Je OpenWeatherMap API-Key";
+$a->strings['Error fetching weather data.\nError was: '] = 'Fout bij het ophalen van de weer data:\nFout was:';
+$a->strings['Current Weather'] = 'Het weer';
+$a->strings['Relative Humidity'] = 'Relatieve vochtigheid';
+$a->strings['Pressure'] = 'Luchtdruk';
+$a->strings['Wind'] = 'Wind';
+$a->strings['Last Updated'] = 'Laatste wijziging';
+$a->strings['Data by'] = 'Data afkomstig van';
+$a->strings['Show on map'] = 'Toon op kaart';
+$a->strings['There was a problem accessing the weather data. But have a look'] = 'Er was een probleem met het ophalen van de data. Bekijk het';
+$a->strings['at OpenWeatherMap'] = 'Op OpenWeatherMap';
+$a->strings['Current Weather settings updated.'] = 'Huidige weerinstellingen opgeslagen';
+$a->strings['No APPID found, please contact your admin to obtain one.'] = 'Geen APPID gevonden. Contacteer je node-admin om dit te verkrijgen';
+$a->strings['Save Settings'] = 'Instellingen opslaan';
+$a->strings['Settings'] = 'Instellingen';
+$a->strings['Enter either the name of your location or the zip code.'] = 'Voor de naam of de postcode van je locatie in';
+$a->strings['Your Location'] = 'Uw locatie';
+$a->strings['Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.'] = 'ID van je locatie (naam of postocde), vb. Amsterdam, NL of 2000,BE';
+$a->strings['Units'] = 'Eenheden';
+$a->strings['select if the temperature should be displayed in °C or °F'] = 'Selecteer of de temperatuur in °C of °F moet weergegeven worden';
+$a->strings['Show weather data'] = 'Toon weer ';
+$a->strings['Curweather settings saved.'] = 'Curweather instellingen opgeslagen';
+$a->strings['Caching Interval'] = 'Caching interval';
+$a->strings['For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'] = 'Voor hoe lang moet de weer data opgeslagen worden? Kies dit volgens je OpenWeatherMap account type.';
+$a->strings['no cache'] = 'Geen cache';
+$a->strings['minutes'] = 'Minuten';
+$a->strings['Your APPID'] = 'Uw APPID';
+$a->strings['Your API key provided by OpenWeatherMap'] = 'Je OpenWeatherMap API-Key';
diff --git a/curweather/lang/pl/messages.po b/curweather/lang/pl/messages.po
index f71410e0..636797ed 100644
--- a/curweather/lang/pl/messages.po
+++ b/curweather/lang/pl/messages.po
@@ -4,14 +4,15 @@
#
#
# Translators:
-# Waldemar Stoczkowski , 2018
+# Piotr Strębski , 2022
+# Waldemar Stoczkowski, 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-25 17:17+0200\n"
-"PO-Revision-Date: 2018-08-04 12:10+0000\n"
-"Last-Translator: Waldemar Stoczkowski \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-22 11:34+0000\n"
+"Last-Translator: Piotr Strębski , 2022\n"
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,114 +20,106 @@ msgstr ""
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
-#: curweather.php:31
-msgid "Error fetching weather data.\\nError was: "
-msgstr "Błąd podczas pobierania danych pogodowych. \\nError był:"
+#: curweather.php:47
+msgid "Error fetching weather data. Error was: "
+msgstr "Błąd podczas pobierania danych pogodowych. Wystąpił błąd:"
-#: curweather.php:111 curweather.php:172
+#: curweather.php:130
msgid "Current Weather"
msgstr "Obecna pogoda"
-#: curweather.php:118
+#: curweather.php:137
msgid "Relative Humidity"
msgstr "Względna wilgotność"
-#: curweather.php:119
+#: curweather.php:138
msgid "Pressure"
msgstr "Ciśnienie"
-#: curweather.php:120
+#: curweather.php:139
msgid "Wind"
msgstr "Wiatr"
-#: curweather.php:121
+#: curweather.php:140
msgid "Last Updated"
msgstr "Ostatnio zaktualizowano"
-#: curweather.php:122
+#: curweather.php:141
msgid "Data by"
msgstr "Dane wg"
-#: curweather.php:123
+#: curweather.php:142
msgid "Show on map"
msgstr "Pokaż na mapie"
-#: curweather.php:128
+#: curweather.php:147
msgid "There was a problem accessing the weather data. But have a look"
msgstr "Wystąpił problem z dostępem do danych pogodowych. Ale spójrz"
-#: curweather.php:130
+#: curweather.php:149
msgid "at OpenWeatherMap"
msgstr "w OpenWeatherMap"
-#: curweather.php:146
-msgid "Current Weather settings updated."
-msgstr "Zaktualizowano bieżące ustawienia pogody."
-
-#: curweather.php:161
+#: curweather.php:178
msgid "No APPID found, please contact your admin to obtain one."
msgstr "Nie znaleziono APPID, skontaktuj się z administratorem, aby go uzyskać."
-#: curweather.php:171 curweather.php:200
-msgid "Save Settings"
-msgstr "Zapisz ustawienia"
-
-#: curweather.php:172
-msgid "Settings"
-msgstr "Ustawienia"
-
-#: curweather.php:174
+#: curweather.php:188
msgid "Enter either the name of your location or the zip code."
msgstr "Wprowadź nazwę swojej lokalizacji lub kod pocztowy."
-#: curweather.php:175
+#: curweather.php:189
msgid "Your Location"
msgstr "Twoja lokalizacja"
-#: curweather.php:175
+#: curweather.php:189
msgid ""
"Identifier of your location (name or zip code), e.g. Berlin,DE or "
"14476,DE."
msgstr "Identyfikator Twojej lokalizacji (nazwa lub kod pocztowy), np. Lublin, LU lub 20001, LU."
-#: curweather.php:176
+#: curweather.php:190
msgid "Units"
msgstr "Jednostka"
-#: curweather.php:176
+#: curweather.php:190
msgid "select if the temperature should be displayed in °C or °F"
msgstr "wybierz, czy temperatura powinna być wyświetlana w °C lub °F"
-#: curweather.php:177
+#: curweather.php:191
msgid "Show weather data"
msgstr "Pokaż dane pogodowe"
-#: curweather.php:190
-msgid "Curweather settings saved."
-msgstr "Ustawienia pogodowe zostały zapisane."
+#: curweather.php:196
+msgid "Current Weather Settings"
+msgstr "Bieżące ustawienia pogody"
-#: curweather.php:201
+#: curweather.php:227
+msgid "Save Settings"
+msgstr "Zapisz ustawienia"
+
+#: curweather.php:230
msgid "Caching Interval"
msgstr "Interwał buforowania"
-#: curweather.php:201
+#: curweather.php:232
msgid ""
"For how long should the weather data be cached? Choose according your "
"OpenWeatherMap account type."
msgstr "Od jak dawna powinny być buforowane dane pogodowe? Wybierz zgodnie z typem konta OpenWeatherMap."
-#: curweather.php:201
+#: curweather.php:233
msgid "no cache"
msgstr "Brak pamięci podręcznej"
-#: curweather.php:201
+#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
msgid "minutes"
msgstr "minut"
-#: curweather.php:202
+#: curweather.php:240
msgid "Your APPID"
msgstr "Twój APPID"
-#: curweather.php:202
+#: curweather.php:240
msgid "Your API key provided by OpenWeatherMap"
msgstr "Twój klucz API dostarczony przez OpenWeatherMap"
diff --git a/curweather/lang/pl/strings.php b/curweather/lang/pl/strings.php
index aa4df64f..c0e588be 100644
--- a/curweather/lang/pl/strings.php
+++ b/curweather/lang/pl/strings.php
@@ -3,33 +3,30 @@
if(! function_exists("string_plural_select_pl")) {
function string_plural_select_pl($n){
$n = intval($n);
- return ($n==1 ? 0 : ($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14) ? 1 : $n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14) ? 2 : 3);;
+ if ($n==1) { return 0; } else if (($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["Error fetching weather data.\\nError was: "] = "Błąd podczas pobierania danych pogodowych. \\nError był:";
-$a->strings["Current Weather"] = "Obecna pogoda";
-$a->strings["Relative Humidity"] = "Względna wilgotność";
-$a->strings["Pressure"] = "Ciśnienie";
-$a->strings["Wind"] = "Wiatr";
-$a->strings["Last Updated"] = "Ostatnio zaktualizowano";
-$a->strings["Data by"] = "Dane wg";
-$a->strings["Show on map"] = "Pokaż na mapie";
-$a->strings["There was a problem accessing the weather data. But have a look"] = "Wystąpił problem z dostępem do danych pogodowych. Ale spójrz";
-$a->strings["at OpenWeatherMap"] = "w OpenWeatherMap";
-$a->strings["Current Weather settings updated."] = "Zaktualizowano bieżące ustawienia pogody.";
-$a->strings["No APPID found, please contact your admin to obtain one."] = "Nie znaleziono APPID, skontaktuj się z administratorem, aby go uzyskać.";
-$a->strings["Save Settings"] = "Zapisz ustawienia";
-$a->strings["Settings"] = "Ustawienia";
-$a->strings["Enter either the name of your location or the zip code."] = "Wprowadź nazwę swojej lokalizacji lub kod pocztowy.";
-$a->strings["Your Location"] = "Twoja lokalizacja";
-$a->strings["Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE."] = "Identyfikator Twojej lokalizacji (nazwa lub kod pocztowy), np. Lublin, LU lub 20001, LU.";
-$a->strings["Units"] = "Jednostka";
-$a->strings["select if the temperature should be displayed in °C or °F"] = "wybierz, czy temperatura powinna być wyświetlana w °C lub °F";
-$a->strings["Show weather data"] = "Pokaż dane pogodowe";
-$a->strings["Curweather settings saved."] = "Ustawienia pogodowe zostały zapisane.";
-$a->strings["Caching Interval"] = "Interwał buforowania";
-$a->strings["For how long should the weather data be cached? Choose according your OpenWeatherMap account type."] = "Od jak dawna powinny być buforowane dane pogodowe? Wybierz zgodnie z typem konta OpenWeatherMap.";
-$a->strings["no cache"] = "Brak pamięci podręcznej";
-$a->strings["minutes"] = "minut";
-$a->strings["Your APPID"] = "Twój APPID";
-$a->strings["Your API key provided by OpenWeatherMap"] = "Twój klucz API dostarczony przez OpenWeatherMap";
+$a->strings['Error fetching weather data. Error was: '] = 'Błąd podczas pobierania danych pogodowych. Wystąpił błąd:';
+$a->strings['Current Weather'] = 'Obecna pogoda';
+$a->strings['Relative Humidity'] = 'Względna wilgotność';
+$a->strings['Pressure'] = 'Ciśnienie';
+$a->strings['Wind'] = 'Wiatr';
+$a->strings['Last Updated'] = 'Ostatnio zaktualizowano';
+$a->strings['Data by'] = 'Dane wg';
+$a->strings['Show on map'] = 'Pokaż na mapie';
+$a->strings['There was a problem accessing the weather data. But have a look'] = 'Wystąpił problem z dostępem do danych pogodowych. Ale spójrz';
+$a->strings['at OpenWeatherMap'] = 'w OpenWeatherMap';
+$a->strings['No APPID found, please contact your admin to obtain one.'] = 'Nie znaleziono APPID, skontaktuj się z administratorem, aby go uzyskać.';
+$a->strings['Enter either the name of your location or the zip code.'] = 'Wprowadź nazwę swojej lokalizacji lub kod pocztowy.';
+$a->strings['Your Location'] = 'Twoja lokalizacja';
+$a->strings['Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.'] = 'Identyfikator Twojej lokalizacji (nazwa lub kod pocztowy), np. Lublin, LU lub 20001, LU.';
+$a->strings['Units'] = 'Jednostka';
+$a->strings['select if the temperature should be displayed in °C or °F'] = 'wybierz, czy temperatura powinna być wyświetlana w °C lub °F';
+$a->strings['Show weather data'] = 'Pokaż dane pogodowe';
+$a->strings['Current Weather Settings'] = 'Bieżące ustawienia pogody';
+$a->strings['Save Settings'] = 'Zapisz ustawienia';
+$a->strings['Caching Interval'] = 'Interwał buforowania';
+$a->strings['For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'] = 'Od jak dawna powinny być buforowane dane pogodowe? Wybierz zgodnie z typem konta OpenWeatherMap.';
+$a->strings['no cache'] = 'Brak pamięci podręcznej';
+$a->strings['minutes'] = 'minut';
+$a->strings['Your APPID'] = 'Twój APPID';
+$a->strings['Your API key provided by OpenWeatherMap'] = 'Twój klucz API dostarczony przez OpenWeatherMap';
diff --git a/curweather/lang/pt-br/strings.php b/curweather/lang/pt-br/strings.php
index f50bc4a0..60285cca 100644
--- a/curweather/lang/pt-br/strings.php
+++ b/curweather/lang/pt-br/strings.php
@@ -2,33 +2,33 @@
if(! function_exists("string_plural_select_pt_br")) {
function string_plural_select_pt_br($n){
- return ($n > 1);;
+ $n = intval($n);
+ return intval($n > 1);
}}
-;
-$a->strings["Error fetching weather data.\\nError was: "] = "Houve um erro na obtenção de dados do clima\\nErro:";
-$a->strings["Current Weather"] = "Clima atual";
-$a->strings["Relative Humidity"] = "Umidade relativa";
-$a->strings["Pressure"] = "Pressão";
-$a->strings["Wind"] = "Vento";
-$a->strings["Last Updated"] = "Atualizado";
-$a->strings["Data by"] = "Dados de";
-$a->strings["Show on map"] = "Mostrar no mapa";
-$a->strings["There was a problem accessing the weather data. But have a look"] = "Houve um problema no acesso aos dados do clima. Mas dê uma olhada";
-$a->strings["at OpenWeatherMap"] = "em OpenWeatherMap";
-$a->strings["Current Weather settings updated."] = "Atualização das Configurações de clima.";
-$a->strings["No APPID found, please contact your admin to optain one."] = "Não foi encontrado nenhum AppID; fale com seu administrador para receber um.";
-$a->strings["Save Settings"] = "Salvar Configurações";
-$a->strings["Settings"] = "Configurações";
-$a->strings["Enter either the name of your location or the zip code."] = "Informe sua localização ou seu CEP.";
-$a->strings["Your Location"] = "Sua localização";
-$a->strings["Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE."] = "Identificador da sua localização (nome ou CEP), p.ex. Rio,BR ou 20021,BR.";
-$a->strings["Units"] = "Unidades";
-$a->strings["select if the temperatur should be displayed in °C or °F"] = "selecione se a temperatura será exibida em °C or °F";
-$a->strings["Show weather data"] = "Mostrar dados do clima";
-$a->strings["Curweather settings saved."] = "As configurações do Curweather foram salvas.";
-$a->strings["Caching Interval"] = "Intervalo de cache";
-$a->strings["For how long should the weather data be cached? Choose according your OpenWeatherMap account type."] = "Por quanto tempo os dados do clima devem ser guardados em cache? Escolha de acordo com o tipo da sua conta no OpenWeatherMap.";
-$a->strings["no cache"] = "sem cache";
-$a->strings["minutes"] = "minutos";
-$a->strings["Your APPID"] = "Seu AppID";
-$a->strings["Your API key provided by OpenWeatherMap"] = "Sua chave de API fornecida pelo OpenWeatherMap";
+$a->strings['Error fetching weather data.\nError was: '] = 'Houve um erro na obtenção de dados do clima\nErro:';
+$a->strings['Current Weather'] = 'Clima atual';
+$a->strings['Relative Humidity'] = 'Umidade relativa';
+$a->strings['Pressure'] = 'Pressão';
+$a->strings['Wind'] = 'Vento';
+$a->strings['Last Updated'] = 'Atualizado';
+$a->strings['Data by'] = 'Dados de';
+$a->strings['Show on map'] = 'Mostrar no mapa';
+$a->strings['There was a problem accessing the weather data. But have a look'] = 'Houve um problema no acesso aos dados do clima. Mas dê uma olhada';
+$a->strings['at OpenWeatherMap'] = 'em OpenWeatherMap';
+$a->strings['Current Weather settings updated.'] = 'Atualização das Configurações de clima.';
+$a->strings['No APPID found, please contact your admin to optain one.'] = 'Não foi encontrado nenhum AppID; fale com seu administrador para receber um.';
+$a->strings['Save Settings'] = 'Salvar Configurações';
+$a->strings['Settings'] = 'Configurações';
+$a->strings['Enter either the name of your location or the zip code.'] = 'Informe sua localização ou seu CEP.';
+$a->strings['Your Location'] = 'Sua localização';
+$a->strings['Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.'] = 'Identificador da sua localização (nome ou CEP), p.ex. Rio,BR ou 20021,BR.';
+$a->strings['Units'] = 'Unidades';
+$a->strings['select if the temperatur should be displayed in °C or °F'] = 'selecione se a temperatura será exibida em °C or °F';
+$a->strings['Show weather data'] = 'Mostrar dados do clima';
+$a->strings['Curweather settings saved.'] = 'As configurações do Curweather foram salvas.';
+$a->strings['Caching Interval'] = 'Intervalo de cache';
+$a->strings['For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'] = 'Por quanto tempo os dados do clima devem ser guardados em cache? Escolha de acordo com o tipo da sua conta no OpenWeatherMap.';
+$a->strings['no cache'] = 'sem cache';
+$a->strings['minutes'] = 'minutos';
+$a->strings['Your APPID'] = 'Seu AppID';
+$a->strings['Your API key provided by OpenWeatherMap'] = 'Sua chave de API fornecida pelo OpenWeatherMap';
diff --git a/curweather/lang/ro/strings.php b/curweather/lang/ro/strings.php
index 0d0ac9e3..ebca5d6c 100644
--- a/curweather/lang/ro/strings.php
+++ b/curweather/lang/ro/strings.php
@@ -2,12 +2,12 @@
if(! function_exists("string_plural_select_ro")) {
function string_plural_select_ro($n){
- return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
+ $n = intval($n);
+ if ($n==1) { return 0; } else if ((($n%100>19)||(($n%100==0)&&($n!=0)))) { return 2; } else { return 1; }
}}
-;
-$a->strings["Current Weather"] = "Starea Vremii";
-$a->strings["Current Weather settings updated."] = "Configurări actualizate pentru Starea Vremii";
-$a->strings["Current Weather Settings"] = "Configurări pentru Starea Vremii";
-$a->strings["Weather Location: "] = "Locație Meteo:";
-$a->strings["Enable Current Weather"] = "Activare Starea Vremii";
-$a->strings["Submit"] = "Trimite";
+$a->strings['Current Weather'] = 'Starea Vremii';
+$a->strings['Current Weather settings updated.'] = 'Configurări actualizate pentru Starea Vremii';
+$a->strings['Current Weather Settings'] = 'Configurări pentru Starea Vremii';
+$a->strings['Weather Location: '] = 'Locație Meteo:';
+$a->strings['Enable Current Weather'] = 'Activare Starea Vremii';
+$a->strings['Submit'] = 'Trimite';
diff --git a/curweather/lang/ru/messages.po b/curweather/lang/ru/messages.po
new file mode 100644
index 00000000..bb3945de
--- /dev/null
+++ b/curweather/lang/ru/messages.po
@@ -0,0 +1,124 @@
+# ADDON curweather
+# Copyright (C)
+# This file is distributed under the same license as the Friendica curweather addon package.
+#
+#
+# Translators:
+# Alexander An , 2022
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-22 11:34+0000\n"
+"Last-Translator: Alexander An , 2022\n"
+"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/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"
+
+#: curweather.php:47
+msgid "Error fetching weather data. Error was: "
+msgstr "Ошибка получения данных о погоде. Ошибка:"
+
+#: curweather.php:130
+msgid "Current Weather"
+msgstr "Погода сейчас"
+
+#: curweather.php:137
+msgid "Relative Humidity"
+msgstr "Относительная влажность"
+
+#: curweather.php:138
+msgid "Pressure"
+msgstr "Давление"
+
+#: curweather.php:139
+msgid "Wind"
+msgstr "Ветер"
+
+#: curweather.php:140
+msgid "Last Updated"
+msgstr "Обновлено"
+
+#: curweather.php:141
+msgid "Data by"
+msgstr "Данные из"
+
+#: curweather.php:142
+msgid "Show on map"
+msgstr "Показать на карте"
+
+#: curweather.php:147
+msgid "There was a problem accessing the weather data. But have a look"
+msgstr "Не получилось получить данные о погоде. Но вы можете посмотреть"
+
+#: curweather.php:149
+msgid "at OpenWeatherMap"
+msgstr "OpenWeatherMap"
+
+#: curweather.php:178
+msgid "No APPID found, please contact your admin to obtain one."
+msgstr "Не найден APPID, свяжитесь с вашим администратором, чтобы получить его."
+
+#: curweather.php:188
+msgid "Enter either the name of your location or the zip code."
+msgstr "Введите ваше местоположение или индекс."
+
+#: curweather.php:189
+msgid "Your Location"
+msgstr "Ваше местонахождение"
+
+#: curweather.php:189
+msgid ""
+"Identifier of your location (name or zip code), e.g. Berlin,DE or "
+"14476,DE."
+msgstr "Ваше местоположение (имя или индекс), например Berlin,DE или 14476,DE."
+
+#: curweather.php:190
+msgid "Units"
+msgstr "Единицы"
+
+#: curweather.php:190
+msgid "select if the temperature should be displayed in °C or °F"
+msgstr "выберите как должна отображаться температура - в °C или °F"
+
+#: curweather.php:191
+msgid "Show weather data"
+msgstr "Показать данные о погоде"
+
+#: curweather.php:196
+msgid "Current Weather Settings"
+msgstr "Текущие настройки"
+
+#: curweather.php:227
+msgid "Save Settings"
+msgstr "Сохранить настройки"
+
+#: curweather.php:230
+msgid "Caching Interval"
+msgstr "Интервал кэширования"
+
+#: curweather.php:232
+msgid ""
+"For how long should the weather data be cached? Choose according your "
+"OpenWeatherMap account type."
+msgstr "Как долго кэшировать данные о погоде? Выберите в соответствии с типом вашей учётной записи OpenWeatherMap."
+
+#: curweather.php:233
+msgid "no cache"
+msgstr "не кэшировать"
+
+#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
+msgid "minutes"
+msgstr "мин."
+
+#: curweather.php:240
+msgid "Your APPID"
+msgstr "Ваш APPID"
+
+#: curweather.php:240
+msgid "Your API key provided by OpenWeatherMap"
+msgstr "Ваш ключ API, полученный у OpenWeatherMap"
diff --git a/curweather/lang/ru/strings.php b/curweather/lang/ru/strings.php
index ab5e2246..9926cdce 100644
--- a/curweather/lang/ru/strings.php
+++ b/curweather/lang/ru/strings.php
@@ -1,3 +1,32 @@
-strings["Submit"] = "Подтвердить";
+=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; }
+}}
+$a->strings['Error fetching weather data. Error was: '] = 'Ошибка получения данных о погоде. Ошибка:';
+$a->strings['Current Weather'] = 'Погода сейчас';
+$a->strings['Relative Humidity'] = 'Относительная влажность';
+$a->strings['Pressure'] = 'Давление';
+$a->strings['Wind'] = 'Ветер';
+$a->strings['Last Updated'] = 'Обновлено';
+$a->strings['Data by'] = 'Данные из';
+$a->strings['Show on map'] = 'Показать на карте';
+$a->strings['There was a problem accessing the weather data. But have a look'] = 'Не получилось получить данные о погоде. Но вы можете посмотреть';
+$a->strings['at OpenWeatherMap'] = 'OpenWeatherMap';
+$a->strings['No APPID found, please contact your admin to obtain one.'] = 'Не найден APPID, свяжитесь с вашим администратором, чтобы получить его.';
+$a->strings['Enter either the name of your location or the zip code.'] = 'Введите ваше местоположение или индекс.';
+$a->strings['Your Location'] = 'Ваше местонахождение';
+$a->strings['Identifier of your location (name or zip code), e.g. Berlin,DE or 14476,DE.'] = 'Ваше местоположение (имя или индекс), например Berlin,DE или 14476,DE.';
+$a->strings['Units'] = 'Единицы';
+$a->strings['select if the temperature should be displayed in °C or °F'] = 'выберите как должна отображаться температура - в °C или °F';
+$a->strings['Show weather data'] = 'Показать данные о погоде';
+$a->strings['Current Weather Settings'] = 'Текущие настройки';
+$a->strings['Save Settings'] = 'Сохранить настройки';
+$a->strings['Caching Interval'] = 'Интервал кэширования';
+$a->strings['For how long should the weather data be cached? Choose according your OpenWeatherMap account type.'] = 'Как долго кэшировать данные о погоде? Выберите в соответствии с типом вашей учётной записи OpenWeatherMap.';
+$a->strings['no cache'] = 'не кэшировать';
+$a->strings['minutes'] = 'мин.';
+$a->strings['Your APPID'] = 'Ваш APPID';
+$a->strings['Your API key provided by OpenWeatherMap'] = 'Ваш ключ API, полученный у OpenWeatherMap';
diff --git a/curweather/lang/sv/messages.po b/curweather/lang/sv/messages.po
new file mode 100644
index 00000000..18436e39
--- /dev/null
+++ b/curweather/lang/sv/messages.po
@@ -0,0 +1,125 @@
+# ADDON curweather
+# Copyright (C)
+# This file is distributed under the same license as the Friendica curweather addon package.
+#
+#
+# Translators:
+# Hypolite Petovan , 2019
+# Kristoffer Grundström , 2022
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2022-01-16 01:04+0000\n"
+"Last-Translator: Kristoffer Grundström \n"
+"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/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"
+
+#: curweather.php:47
+msgid "Error fetching weather data. Error was: "
+msgstr ""
+
+#: curweather.php:130
+msgid "Current Weather"
+msgstr "Nuvarande väder"
+
+#: curweather.php:137
+msgid "Relative Humidity"
+msgstr "Relativ luftfuktighet"
+
+#: curweather.php:138
+msgid "Pressure"
+msgstr "Tryck"
+
+#: curweather.php:139
+msgid "Wind"
+msgstr "Vind"
+
+#: curweather.php:140
+msgid "Last Updated"
+msgstr "Uppdaterades senast"
+
+#: curweather.php:141
+msgid "Data by"
+msgstr "Data av"
+
+#: curweather.php:142
+msgid "Show on map"
+msgstr "Visa på karta"
+
+#: curweather.php:147
+msgid "There was a problem accessing the weather data. But have a look"
+msgstr ""
+
+#: curweather.php:149
+msgid "at OpenWeatherMap"
+msgstr "vid OpenWeatherMap"
+
+#: curweather.php:178
+msgid "No APPID found, please contact your admin to obtain one."
+msgstr ""
+
+#: curweather.php:188
+msgid "Enter either the name of your location or the zip code."
+msgstr ""
+
+#: curweather.php:189
+msgid "Your Location"
+msgstr "Din plats"
+
+#: curweather.php:189
+msgid ""
+"Identifier of your location (name or zip code), e.g. Berlin,DE or "
+"14476,DE."
+msgstr ""
+
+#: curweather.php:190
+msgid "Units"
+msgstr "Enheter"
+
+#: curweather.php:190
+msgid "select if the temperature should be displayed in °C or °F"
+msgstr ""
+
+#: curweather.php:191
+msgid "Show weather data"
+msgstr "Visa väder-data"
+
+#: curweather.php:196
+msgid "Current Weather Settings"
+msgstr ""
+
+#: curweather.php:227
+msgid "Save Settings"
+msgstr "Spara inställningar"
+
+#: curweather.php:230
+msgid "Caching Interval"
+msgstr ""
+
+#: curweather.php:232
+msgid ""
+"For how long should the weather data be cached? Choose according your "
+"OpenWeatherMap account type."
+msgstr ""
+
+#: curweather.php:233
+msgid "no cache"
+msgstr "ingen cache"
+
+#: curweather.php:234 curweather.php:235 curweather.php:236 curweather.php:237
+msgid "minutes"
+msgstr "minuter"
+
+#: curweather.php:240
+msgid "Your APPID"
+msgstr "Ditt APP-ID"
+
+#: curweather.php:240
+msgid "Your API key provided by OpenWeatherMap"
+msgstr ""
diff --git a/curweather/lang/sv/strings.php b/curweather/lang/sv/strings.php
index 3ec569a7..a27e6649 100644
--- a/curweather/lang/sv/strings.php
+++ b/curweather/lang/sv/strings.php
@@ -1,3 +1,22 @@
-strings["Submit"] = "Spara";
+strings['Current Weather'] = 'Nuvarande väder';
+$a->strings['Relative Humidity'] = 'Relativ luftfuktighet';
+$a->strings['Pressure'] = 'Tryck';
+$a->strings['Wind'] = 'Vind';
+$a->strings['Last Updated'] = 'Uppdaterades senast';
+$a->strings['Data by'] = 'Data av';
+$a->strings['Show on map'] = 'Visa på karta';
+$a->strings['at OpenWeatherMap'] = 'vid OpenWeatherMap';
+$a->strings['Your Location'] = 'Din plats';
+$a->strings['Units'] = 'Enheter';
+$a->strings['Show weather data'] = 'Visa väder-data';
+$a->strings['Save Settings'] = 'Spara inställningar';
+$a->strings['no cache'] = 'ingen cache';
+$a->strings['minutes'] = 'minuter';
+$a->strings['Your APPID'] = 'Ditt APP-ID';
diff --git a/curweather/templates/settings.tpl b/curweather/templates/settings.tpl
index 09f6f506..d250b9bb 100644
--- a/curweather/templates/settings.tpl
+++ b/curweather/templates/settings.tpl
@@ -1,15 +1,6 @@
-
-
';
+ '$enabled' => ['enabled', DI::l10n()->t('Enable Diaspora Post Addon'), $enabled],
+ '$handle' => ['handle', DI::l10n()->t('Diaspora handle'), $handle, null, null, 'placeholder="user@domain.tld"'],
+ '$password' => ['password', DI::l10n()->t('Diaspora password'), '', DI::l10n()->t('Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.')],
+ '$aspect_select' => $aspect_select,
+ '$post_by_default' => ['post_by_default', DI::l10n()->t('Post to Diaspora by default'), $def_enabled],
+ ]);
+ $data = [
+ 'connector' => 'diaspora',
+ 'title' => DI::l10n()->t('Diaspora Export'),
+ 'image' => 'images/diaspora-logo.png',
+ 'enabled' => $enabled,
+ 'html' => $html,
+ ];
}
-function diaspora_settings_post(App $a, &$b)
+function diaspora_settings_post(array &$b)
{
if (!empty($_POST['diaspora-submit'])) {
- PConfig::set(local_user(),'diaspora', 'post' , intval($_POST['diaspora']));
- PConfig::set(local_user(),'diaspora', 'post_by_default', intval($_POST['diaspora_bydefault']));
- PConfig::set(local_user(),'diaspora', 'handle' , trim($_POST['handle']));
- PConfig::set(local_user(),'diaspora', 'password' , trim($_POST['password']));
- PConfig::set(local_user(),'diaspora', 'aspect' , trim($_POST['aspect']));
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(),'diaspora', 'post' , intval($_POST['enabled']));
+ if (intval($_POST['enabled'])) {
+ if (isset($_POST['handle'])) {
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(),'diaspora', 'handle' , trim($_POST['handle']));
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(),'diaspora', 'password' , trim($_POST['password']));
+ }
+ if (!empty($_POST['aspect'])) {
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(),'diaspora', 'aspect' , trim($_POST['aspect']));
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(),'diaspora', 'post_by_default', intval($_POST['post_by_default']));
+ }
+ } else {
+ DI::pConfig()->delete(DI::userSession()->getLocalUserId(), 'diaspora', 'password');
+ }
}
}
-function diaspora_hook_fork(&$a, &$b)
+function diaspora_hook_fork(array &$b)
{
if ($b['name'] != 'notifier_normal') {
return;
@@ -190,19 +145,19 @@ function diaspora_hook_fork(&$a, &$b)
$post = $b['data'];
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
- !strstr($post['postopts'], 'diaspora') || ($post['parent'] != $post['id'])) {
+ !strstr($post['postopts'] ?? '', 'diaspora') || ($post['parent'] != $post['id'])) {
$b['execute'] = false;
return;
}
}
-function diaspora_post_local(App $a, array &$b)
+function diaspora_post_local(array &$b)
{
if ($b['edit']) {
return;
}
- if (!local_user() || (local_user() != $b['uid'])) {
+ if (!DI::userSession()->getLocalUserId() || (DI::userSession()->getLocalUserId() != $b['uid'])) {
return;
}
@@ -210,11 +165,11 @@ function diaspora_post_local(App $a, array &$b)
return;
}
- $diaspora_post = intval(PConfig::get(local_user(),'diaspora','post'));
+ $diaspora_post = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'diaspora','post'));
$diaspora_enable = (($diaspora_post && !empty($_REQUEST['diaspora_enable'])) ? intval($_REQUEST['diaspora_enable']) : 0);
- if ($b['api_source'] && intval(PConfig::get(local_user(),'diaspora','post_by_default'))) {
+ if ($b['api_source'] && intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'diaspora','post_by_default'))) {
$diaspora_enable = 1;
}
@@ -229,11 +184,11 @@ function diaspora_post_local(App $a, array &$b)
$b['postopts'] .= 'diaspora';
}
-function diaspora_send(App $a, array &$b)
+function diaspora_send(array &$b)
{
- $hostname = $a->getHostName();
+ $hostname = DI::baseUrl()->getHost();
- Logger::log('diaspora_send: invoked');
+ Logger::notice('diaspora_send: invoked');
if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
return;
@@ -247,6 +202,8 @@ function diaspora_send(App $a, array &$b)
return;
}
+ $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b));
+
// Dont't post if the post doesn't belong to us.
// This is a check for forum postings
$self = DBA::selectFirst('contact', ['id'], ['uid' => $b['uid'], 'self' => true]);
@@ -255,28 +212,14 @@ function diaspora_send(App $a, array &$b)
return;
}
- Logger::log('diaspora_send: prepare posting', Logger::DEBUG);
+ Logger::info('diaspora_send: prepare posting');
- $handle = PConfig::get($b['uid'],'diaspora','handle');
- $password = PConfig::get($b['uid'],'diaspora','password');
- $aspect = PConfig::get($b['uid'],'diaspora','aspect');
+ $handle = DI::pConfig()->get($b['uid'],'diaspora','handle');
+ $password = DI::pConfig()->get($b['uid'],'diaspora','password');
+ $aspect = DI::pConfig()->get($b['uid'],'diaspora','aspect');
if ($handle && $password) {
- Logger::log('diaspora_send: all values seem to be okay', Logger::DEBUG);
-
- $tag_arr = [];
- $tags = '';
- $x = preg_match_all('/\#\[(.*?)\](.*?)\[/',$b['tag'],$matches,PREG_SET_ORDER);
-
- if ($x) {
- foreach ($matches as $mtch) {
- $tag_arr[] = $mtch[2];
- }
- }
-
- if (count($tag_arr)) {
- $tags = implode(',',$tag_arr);
- }
+ Logger::info('diaspora_send: all values seem to be okay');
$title = $b['title'];
$body = $b['body'];
@@ -307,20 +250,20 @@ function diaspora_send(App $a, array &$b)
require_once "addon/diaspora/diasphp.php";
try {
- Logger::log('diaspora_send: prepare', Logger::DEBUG);
+ Logger::info('diaspora_send: prepare');
$conn = new Diaspora_Connection($handle, $password);
- Logger::log('diaspora_send: try to log in '.$handle, Logger::DEBUG);
+ Logger::info('diaspora_send: try to log in '.$handle);
$conn->logIn();
- Logger::log('diaspora_send: try to send '.$body, Logger::DEBUG);
+ Logger::info('diaspora_send: try to send '.$body);
$conn->provider = $hostname;
$conn->postStatusMessage($body, $aspect);
- Logger::log('diaspora_send: success');
+ Logger::notice('diaspora_send: success');
} catch (Exception $e) {
- Logger::log("diaspora_send: Error submitting the post: " . $e->getMessage());
+ Logger::notice("diaspora_send: Error submitting the post: " . $e->getMessage());
- Logger::log('diaspora_send: requeueing '.$b['uid'], Logger::DEBUG);
+ Logger::info('diaspora_send: requeueing '.$b['uid']);
Worker::defer();
}
diff --git a/diaspora/lang/C/messages.po b/diaspora/lang/C/messages.po
index 6764eaf1..262e4cd8 100644
--- a/diaspora/lang/C/messages.po
+++ b/diaspora/lang/C/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-22 13:18+0200\n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,44 +17,84 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: diaspora.php:37
+#: diaspora.php:44
msgid "Post to Diaspora"
msgstr ""
-#: diaspora.php:142
+#: diaspora.php:67
+#, php-format
msgid ""
-"Can't login to your Diaspora account. Please check username and password and "
-"ensure you used the complete address (including http...)"
+"Please remember: You can always be reached from Diaspora with your Friendica "
+"handle %s. "
msgstr ""
-#: diaspora.php:149 diaspora.php:153
-msgid "Diaspora Export"
+#: diaspora.php:68
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
msgstr ""
-#: diaspora.php:163
+#: diaspora.php:69
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle "
+"%s instead."
+msgstr ""
+
+#: diaspora.php:79
+msgid "All aspects"
+msgstr ""
+
+#: diaspora.php:80
+msgid "Public"
+msgstr ""
+
+#: diaspora.php:86
+msgid "Post to aspect:"
+msgstr ""
+
+#: diaspora.php:87
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr ""
+
+#: diaspora.php:90
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr ""
+
+#: diaspora.php:97
+msgid "Information"
+msgstr ""
+
+#: diaspora.php:98
+msgid "Error"
+msgstr ""
+
+#: diaspora.php:104
msgid "Enable Diaspora Post Addon"
msgstr ""
-#: diaspora.php:168
-msgid "Diaspora username"
+#: diaspora.php:105
+msgid "Diaspora handle"
msgstr ""
-#: diaspora.php:173
+#: diaspora.php:106
msgid "Diaspora password"
msgstr ""
-#: diaspora.php:178
-msgid "Diaspora site URL"
+#: diaspora.php:106
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
msgstr ""
-#: diaspora.php:183
+#: diaspora.php:108
msgid "Post to Diaspora by default"
msgstr ""
-#: diaspora.php:189
-msgid "Save Settings"
-msgstr ""
-
-#: diaspora.php:324
-msgid "Diaspora post failed. Queued for retry."
+#: diaspora.php:113
+msgid "Diaspora Export"
msgstr ""
diff --git a/diaspora/lang/ar/messages.po b/diaspora/lang/ar/messages.po
new file mode 100644
index 00000000..55e0f1a2
--- /dev/null
+++ b/diaspora/lang/ar/messages.po
@@ -0,0 +1,107 @@
+# ADDON diaspora
+# Copyright (C)
+# This file is distributed under the same license as the Friendica diaspora addon package.
+#
+#
+# Translators:
+# abidin toumi , 2021
+# Farida Khalaf , 2021
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-10-29 10:03+0000\n"
+"Last-Translator: abidin toumi \n"
+"Language-Team: Arabic (http://www.transifex.com/Friendica/friendica/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"
+
+#: diaspora.php:43
+msgid "Post to Diaspora"
+msgstr "شارك في دياسبورا"
+
+#: diaspora.php:68
+#, php-format
+msgid ""
+"Please remember: You can always be reached from Diaspora with your Friendica"
+" handle %s. "
+msgstr "تذكر: يمكن الوصول إليك من دياسبورا باستخدام معرف فرنديكا%s."
+
+#: diaspora.php:69
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
+msgstr "يجب استخدام هذا الموصل في حالة كنت تريد استخدام حساب دياسبورا القديم."
+
+#: diaspora.php:70
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle"
+" %s instead."
+msgstr "على أي حال ، من الأفضل أن تطلع متراسليك في دياسبورا بمعرفك الجديد %s. "
+
+#: diaspora.php:80
+msgid "All aspects"
+msgstr "كل الفئات"
+
+#: diaspora.php:81
+msgid "Public"
+msgstr "علني"
+
+#: diaspora.php:87
+msgid "Post to aspect:"
+msgstr "انشر إلى الفئات:"
+
+#: diaspora.php:88
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr "متصل بحساب دياسبورا %s"
+
+#: diaspora.php:91
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr "لا يمكن تسجيل الدخول إلى حساب الدياسبورا. يرجى التحقق من المعرف (على شاكلة user@domain.tld) وكلمة المرور."
+
+#: diaspora.php:99
+msgid "Diaspora Export"
+msgstr "تصدير الدياسبورا"
+
+#: diaspora.php:100
+msgid "Information"
+msgstr "معلومات"
+
+#: diaspora.php:101
+msgid "Error"
+msgstr "خطأ"
+
+#: diaspora.php:102
+msgid "Save Settings"
+msgstr "احفظ الإعدادات"
+
+#: diaspora.php:106
+msgid "Enable Diaspora Post Addon"
+msgstr "تفعيل إضافة مشاركة دياسبورا"
+
+#: diaspora.php:107
+msgid "Diaspora handle"
+msgstr "معرف الدياسبورا"
+
+#: diaspora.php:108
+msgid "Diaspora password"
+msgstr "كلمة مرور الدياسبورا"
+
+#: diaspora.php:108
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
+msgstr "تنبيه خصوصية: سيتم تخزين كلمة مرور دياسبورا دون تشفير للاستيثاق منك في خادم دياسبورا. هذا يعني أنه يمكن لمسؤول عقدة فرنديكا الوصول إليها."
+
+#: diaspora.php:110
+msgid "Post to Diaspora by default"
+msgstr "شارك في دياسبورا افتراضيا"
diff --git a/diaspora/lang/ar/strings.php b/diaspora/lang/ar/strings.php
new file mode 100644
index 00000000..93fe0374
--- /dev/null
+++ b/diaspora/lang/ar/strings.php
@@ -0,0 +1,25 @@
+=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; }
+}}
+$a->strings['Post to Diaspora'] = 'شارك في دياسبورا';
+$a->strings['Please remember: You can always be reached from Diaspora with your Friendica handle %s. '] = 'تذكر: يمكن الوصول إليك من دياسبورا باستخدام معرف فرنديكا%s.';
+$a->strings['This connector is only meant if you still want to use your old Diaspora account for some time. '] = 'يجب استخدام هذا الموصل في حالة كنت تريد استخدام حساب دياسبورا القديم.';
+$a->strings['However, it is preferred that you tell your Diaspora contacts the new handle %s instead.'] = 'على أي حال ، من الأفضل أن تطلع متراسليك في دياسبورا بمعرفك الجديد %s. ';
+$a->strings['All aspects'] = 'كل الفئات';
+$a->strings['Public'] = 'علني';
+$a->strings['Post to aspect:'] = 'انشر إلى الفئات:';
+$a->strings['Connected with your Diaspora account %s'] = 'متصل بحساب دياسبورا %s';
+$a->strings['Can\'t login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.'] = 'لا يمكن تسجيل الدخول إلى حساب الدياسبورا. يرجى التحقق من المعرف (على شاكلة user@domain.tld) وكلمة المرور.';
+$a->strings['Diaspora Export'] = 'تصدير الدياسبورا';
+$a->strings['Information'] = 'معلومات';
+$a->strings['Error'] = 'خطأ';
+$a->strings['Save Settings'] = 'احفظ الإعدادات';
+$a->strings['Enable Diaspora Post Addon'] = 'تفعيل إضافة مشاركة دياسبورا';
+$a->strings['Diaspora handle'] = 'معرف الدياسبورا';
+$a->strings['Diaspora password'] = 'كلمة مرور الدياسبورا';
+$a->strings['Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.'] = 'تنبيه خصوصية: سيتم تخزين كلمة مرور دياسبورا دون تشفير للاستيثاق منك في خادم دياسبورا. هذا يعني أنه يمكن لمسؤول عقدة فرنديكا الوصول إليها.';
+$a->strings['Post to Diaspora by default'] = 'شارك في دياسبورا افتراضيا';
diff --git a/diaspora/lang/ca/strings.php b/diaspora/lang/ca/strings.php
index ce48df19..808fbaf8 100644
--- a/diaspora/lang/ca/strings.php
+++ b/diaspora/lang/ca/strings.php
@@ -3,16 +3,15 @@
if(! function_exists("string_plural_select_ca")) {
function string_plural_select_ca($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Diaspora"] = "Publicar a diàspora";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "No es pot iniciar la sessió al vostre compte de Diaspora. Comproveu nom d'usuari i contrasenya i assegureu-vos que heu utilitzat l'adreça completa (inclosa http ...)";
-$a->strings["Diaspora Export"] = "Exportació de diàspora";
-$a->strings["Enable Diaspora Post Addon"] = "Habilita Addon Post de Diaspora";
-$a->strings["Diaspora username"] = "Nom d'usuari de diàspora";
-$a->strings["Diaspora password"] = "Contrasenya de diàspora";
-$a->strings["Diaspora site URL"] = "URL del lloc de diàspora";
-$a->strings["Post to Diaspora by default"] = "Publica a Diaspora de manera predeterminada";
-$a->strings["Save Settings"] = "Desa la configuració";
-$a->strings["Diaspora post failed. Queued for retry."] = "La publicació de la diàspora ha fallat Feu cua per tornar a provar.";
+$a->strings['Post to Diaspora'] = 'Publicar a diàspora';
+$a->strings['Can\'t login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)'] = 'No es pot iniciar la sessió al vostre compte de Diaspora. Comproveu nom d\'usuari i contrasenya i assegureu-vos que heu utilitzat l\'adreça completa (inclosa http ...)';
+$a->strings['Diaspora Export'] = 'Exportació de diàspora';
+$a->strings['Enable Diaspora Post Addon'] = 'Habilita Addon Post de Diaspora';
+$a->strings['Diaspora username'] = 'Nom d\'usuari de diàspora';
+$a->strings['Diaspora password'] = 'Contrasenya de diàspora';
+$a->strings['Diaspora site URL'] = 'URL del lloc de diàspora';
+$a->strings['Post to Diaspora by default'] = 'Publica a Diaspora de manera predeterminada';
+$a->strings['Save Settings'] = 'Desa la configuració';
+$a->strings['Diaspora post failed. Queued for retry.'] = 'La publicació de la diàspora ha fallat Feu cua per tornar a provar.';
diff --git a/diaspora/lang/cs/strings.php b/diaspora/lang/cs/strings.php
index 649b02c7..db5d6428 100644
--- a/diaspora/lang/cs/strings.php
+++ b/diaspora/lang/cs/strings.php
@@ -3,16 +3,15 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
$n = intval($n);
- return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
+ if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; }
}}
-;
-$a->strings["Post to Diaspora"] = "Odeslat na Diasporu";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Nelze se přihlásit na váš účet Diaspora. Prosím ověřte své uživatelské jméno a heslo a ujistěte se, že jste použili kompletní adresu (včetně http...)";
-$a->strings["Diaspora Export"] = "Diaspora export";
-$a->strings["Enable Diaspora Post Addon"] = "Povolit doplněk Diaspora Post";
-$a->strings["Diaspora username"] = "Uživatelské jméno na Diaspora";
-$a->strings["Diaspora password"] = "Heslo na Diaspora";
-$a->strings["Diaspora site URL"] = "Adresa webu Diaspora";
-$a->strings["Post to Diaspora by default"] = "Ve výchozím stavu zasílat příspěvky na Diaspora";
-$a->strings["Save Settings"] = "Uložit nastavení";
-$a->strings["Diaspora post failed. Queued for retry."] = "Zaslání příspěvku na Diasporu selhalo. Příspěvek byl zařazen do fronty pro opakované odeslání.";
+$a->strings['Post to Diaspora'] = 'Odeslat na Diasporu';
+$a->strings['Can\'t login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)'] = 'Nelze se přihlásit na váš účet Diaspora. Prosím ověřte své uživatelské jméno a heslo a ujistěte se, že jste použili kompletní adresu (včetně http...)';
+$a->strings['Diaspora Export'] = 'Diaspora export';
+$a->strings['Enable Diaspora Post Addon'] = 'Povolit doplněk Diaspora Post';
+$a->strings['Diaspora username'] = 'Uživatelské jméno na Diaspora';
+$a->strings['Diaspora password'] = 'Heslo na Diaspora';
+$a->strings['Diaspora site URL'] = 'Adresa webu Diaspora';
+$a->strings['Post to Diaspora by default'] = 'Ve výchozím stavu zasílat příspěvky na Diaspora';
+$a->strings['Save Settings'] = 'Uložit nastavení';
+$a->strings['Diaspora post failed. Queued for retry.'] = 'Zaslání příspěvku na Diasporu selhalo. Příspěvek byl zařazen do fronty pro opakované odeslání.';
diff --git a/diaspora/lang/da-dk/messages.po b/diaspora/lang/da-dk/messages.po
new file mode 100644
index 00000000..c544d33e
--- /dev/null
+++ b/diaspora/lang/da-dk/messages.po
@@ -0,0 +1,102 @@
+# ADDON diaspora
+# Copyright (C)
+# This file is distributed under the same license as the Friendica diaspora addon package.
+#
+#
+# Translators:
+# Anton , 2022
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: 2014-06-22 11:39+0000\n"
+"Last-Translator: Anton , 2022\n"
+"Language-Team: Danish (Denmark) (http://www.transifex.com/Friendica/friendica/language/da_DK/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: da_DK\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: diaspora.php:44
+msgid "Post to Diaspora"
+msgstr "Læg op på Diaspora"
+
+#: diaspora.php:67
+#, php-format
+msgid ""
+"Please remember: You can always be reached from Diaspora with your Friendica"
+" handle %s. "
+msgstr "Husk på: Du kan altid kontaktes fra Diaspora med dit Friendica handle %s. "
+
+#: diaspora.php:68
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
+msgstr ""
+
+#: diaspora.php:69
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle"
+" %s instead."
+msgstr ""
+
+#: diaspora.php:79
+msgid "All aspects"
+msgstr "Alle aspekter"
+
+#: diaspora.php:80
+msgid "Public"
+msgstr "Offentlig"
+
+#: diaspora.php:86
+msgid "Post to aspect:"
+msgstr ""
+
+#: diaspora.php:87
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr "Forbundet til din Diaspora-konto %s"
+
+#: diaspora.php:90
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr ""
+
+#: diaspora.php:97
+msgid "Information"
+msgstr "Information"
+
+#: diaspora.php:98
+msgid "Error"
+msgstr "Fejl"
+
+#: diaspora.php:104
+msgid "Enable Diaspora Post Addon"
+msgstr "Aktiver Diaspora-tilføjelsen"
+
+#: diaspora.php:105
+msgid "Diaspora handle"
+msgstr "Diaspora handle"
+
+#: diaspora.php:106
+msgid "Diaspora password"
+msgstr "Diaspora adgangskode"
+
+#: diaspora.php:106
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
+msgstr ""
+
+#: diaspora.php:108
+msgid "Post to Diaspora by default"
+msgstr "Læg op på Diaspora som standard"
+
+#: diaspora.php:113
+msgid "Diaspora Export"
+msgstr ""
diff --git a/diaspora/lang/da-dk/strings.php b/diaspora/lang/da-dk/strings.php
new file mode 100644
index 00000000..73b1eedc
--- /dev/null
+++ b/diaspora/lang/da-dk/strings.php
@@ -0,0 +1,18 @@
+strings['Post to Diaspora'] = 'Læg op på Diaspora';
+$a->strings['Please remember: You can always be reached from Diaspora with your Friendica handle %s. '] = 'Husk på: Du kan altid kontaktes fra Diaspora med dit Friendica handle %s. ';
+$a->strings['All aspects'] = 'Alle aspekter';
+$a->strings['Public'] = 'Offentlig';
+$a->strings['Connected with your Diaspora account %s'] = 'Forbundet til din Diaspora-konto %s';
+$a->strings['Information'] = 'Information';
+$a->strings['Error'] = 'Fejl';
+$a->strings['Enable Diaspora Post Addon'] = 'Aktiver Diaspora-tilføjelsen';
+$a->strings['Diaspora handle'] = 'Diaspora handle';
+$a->strings['Diaspora password'] = 'Diaspora adgangskode';
+$a->strings['Post to Diaspora by default'] = 'Læg op på Diaspora som standard';
diff --git a/diaspora/lang/de/messages.po b/diaspora/lang/de/messages.po
index 22187254..34fd85b1 100644
--- a/diaspora/lang/de/messages.po
+++ b/diaspora/lang/de/messages.po
@@ -4,59 +4,103 @@
#
#
# Translators:
-# bavatar , 2014
+# foss , 2020
+# Till Mohr , 2021
+# Tobias Diekershoff , 2014
+# Tobias Diekershoff , 2018,2020
+# Ulf Rompe , 2019
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-22 13:18+0200\n"
-"PO-Revision-Date: 2014-07-08 19:10+0000\n"
-"Last-Translator: bavatar \n"
-"Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: 2014-06-22 11:39+0000\n"
+"Last-Translator: Till Mohr , 2021\n"
+"Language-Team: German (http://app.transifex.com/Friendica/friendica/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"
-#: diaspora.php:37
+#: diaspora.php:44
msgid "Post to Diaspora"
msgstr "Auf Diaspora veröffentlichen"
-#: diaspora.php:142
+#: diaspora.php:67
+#, php-format
msgid ""
-"Can't login to your Diaspora account. Please check username and password and"
-" ensure you used the complete address (including http...)"
-msgstr "Anmeldung bei deinem Diaspora Account fehlgeschlagen. Bitte überprüfe Nutzername und Passwort und stelle sicher, dass die komplette Adresse (inklusive des htto...) verwendet wurde."
+"Please remember: You can always be reached from Diaspora with your Friendica"
+" handle %s. "
+msgstr "Denke daran: Du kannst jederzeit über deinen Friendica-Account %s von Diaspora aus erreicht werden."
-#: diaspora.php:149 diaspora.php:153
-msgid "Diaspora Export"
-msgstr "Diaspora Export"
+#: diaspora.php:68
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
+msgstr "Dieser Connector ist ausschließlich dafür gedacht, deinen alten Diaspora-Account noch ein wenig weiter zu betreiben."
-#: diaspora.php:163
+#: diaspora.php:69
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle"
+" %s instead."
+msgstr "Du solltest allerdings deinen Diaspora Kontakten deinen Friendica Account %s mitteilen, damit sie diesem folgen."
+
+#: diaspora.php:79
+msgid "All aspects"
+msgstr "Alle Aspekte"
+
+#: diaspora.php:80
+msgid "Public"
+msgstr "Öffentlich"
+
+#: diaspora.php:86
+msgid "Post to aspect:"
+msgstr "Bei aspect veröffentlichen:"
+
+#: diaspora.php:87
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr "Verbunden mit deinem Diaspora-Konto %s"
+
+#: diaspora.php:90
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr "Anmeldung bei deinem Diaspora-Konto fehlgeschlagen. Bitte überprüfe Handle (im Format user@domain.tld) und Passwort."
+
+#: diaspora.php:97
+msgid "Information"
+msgstr "Information"
+
+#: diaspora.php:98
+msgid "Error"
+msgstr "Fehler"
+
+#: diaspora.php:104
msgid "Enable Diaspora Post Addon"
-msgstr "Veröffentlichungen bei Diaspora erlauben"
+msgstr "Diaspora-Post-Addon aktivieren"
-#: diaspora.php:168
-msgid "Diaspora username"
-msgstr "Diaspora Nutzername"
+#: diaspora.php:105
+msgid "Diaspora handle"
+msgstr "Diaspora-Handle"
-#: diaspora.php:173
+#: diaspora.php:106
msgid "Diaspora password"
-msgstr "Diaspora Passwort"
+msgstr "Diaspora-Passwort"
-#: diaspora.php:178
-msgid "Diaspora site URL"
-msgstr "URL der Diaspora Seite"
+#: diaspora.php:106
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
+msgstr "Datenschutzhinweis: Dein Diaspora-Passwort wird unverschlüsselt gespeichert, um dich an deinem Diaspora-Pod zu authentifizieren. Dadurch kann der Administrator deines Friendica-Knotens Zugriff darauf erlangen."
-#: diaspora.php:183
+#: diaspora.php:108
msgid "Post to Diaspora by default"
msgstr "Veröffentliche öffentliche Beiträge standardmäßig bei Diaspora"
-#: diaspora.php:189
-msgid "Save Settings"
-msgstr "Einstellungen speichern"
-
-#: diaspora.php:324
-msgid "Diaspora post failed. Queued for retry."
-msgstr "Veröffentlichung bei Diaspora gescheitert. Wir versuchen es später erneut."
+#: diaspora.php:113
+msgid "Diaspora Export"
+msgstr "Diaspora-Export"
diff --git a/diaspora/lang/de/strings.php b/diaspora/lang/de/strings.php
index 22990765..8168199a 100644
--- a/diaspora/lang/de/strings.php
+++ b/diaspora/lang/de/strings.php
@@ -2,16 +2,23 @@
if(! function_exists("string_plural_select_de")) {
function string_plural_select_de($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Diaspora"] = "Auf Diaspora veröffentlichen";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Anmeldung bei deinem Diaspora Account fehlgeschlagen. Bitte überprüfe Nutzername und Passwort und stelle sicher, dass die komplette Adresse (inklusive des htto...) verwendet wurde.";
-$a->strings["Diaspora Export"] = "Diaspora Export";
-$a->strings["Enable Diaspora Post Addon"] = "Veröffentlichungen bei Diaspora erlauben";
-$a->strings["Diaspora username"] = "Diaspora Nutzername";
-$a->strings["Diaspora password"] = "Diaspora Passwort";
-$a->strings["Diaspora site URL"] = "URL der Diaspora Seite";
-$a->strings["Post to Diaspora by default"] = "Veröffentliche öffentliche Beiträge standardmäßig bei Diaspora";
-$a->strings["Save Settings"] = "Einstellungen speichern";
-$a->strings["Diaspora post failed. Queued for retry."] = "Veröffentlichung bei Diaspora gescheitert. Wir versuchen es später erneut.";
+$a->strings['Post to Diaspora'] = 'Auf Diaspora veröffentlichen';
+$a->strings['Please remember: You can always be reached from Diaspora with your Friendica handle %s. '] = 'Denke daran: Du kannst jederzeit über deinen Friendica-Account %s von Diaspora aus erreicht werden.';
+$a->strings['This connector is only meant if you still want to use your old Diaspora account for some time. '] = 'Dieser Connector ist ausschließlich dafür gedacht, deinen alten Diaspora-Account noch ein wenig weiter zu betreiben.';
+$a->strings['However, it is preferred that you tell your Diaspora contacts the new handle %s instead.'] = 'Du solltest allerdings deinen Diaspora Kontakten deinen Friendica Account %s mitteilen, damit sie diesem folgen.';
+$a->strings['All aspects'] = 'Alle Aspekte';
+$a->strings['Public'] = 'Öffentlich';
+$a->strings['Post to aspect:'] = 'Bei aspect veröffentlichen:';
+$a->strings['Connected with your Diaspora account %s'] = 'Verbunden mit deinem Diaspora-Konto %s';
+$a->strings['Can\'t login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.'] = 'Anmeldung bei deinem Diaspora-Konto fehlgeschlagen. Bitte überprüfe Handle (im Format user@domain.tld) und Passwort.';
+$a->strings['Information'] = 'Information';
+$a->strings['Error'] = 'Fehler';
+$a->strings['Enable Diaspora Post Addon'] = 'Diaspora-Post-Addon aktivieren';
+$a->strings['Diaspora handle'] = 'Diaspora-Handle';
+$a->strings['Diaspora password'] = 'Diaspora-Passwort';
+$a->strings['Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.'] = 'Datenschutzhinweis: Dein Diaspora-Passwort wird unverschlüsselt gespeichert, um dich an deinem Diaspora-Pod zu authentifizieren. Dadurch kann der Administrator deines Friendica-Knotens Zugriff darauf erlangen.';
+$a->strings['Post to Diaspora by default'] = 'Veröffentliche öffentliche Beiträge standardmäßig bei Diaspora';
+$a->strings['Diaspora Export'] = 'Diaspora-Export';
diff --git a/diaspora/lang/en-gb/messages.po b/diaspora/lang/en-gb/messages.po
index ce3dd2f9..798e3b2d 100644
--- a/diaspora/lang/en-gb/messages.po
+++ b/diaspora/lang/en-gb/messages.po
@@ -4,13 +4,13 @@
#
#
# Translators:
-# Andy H3 , 2018
+# Andy H3 , 2018,2020
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-22 13:18+0200\n"
-"PO-Revision-Date: 2018-03-22 08:36+0000\n"
+"POT-Creation-Date: 2020-05-07 00:15-0400\n"
+"PO-Revision-Date: 2020-06-23 16:10+0000\n"
"Last-Translator: Andy H3 \n"
"Language-Team: English (United Kingdom) (http://www.transifex.com/Friendica/friendica/language/en_GB/)\n"
"MIME-Version: 1.0\n"
@@ -19,44 +19,96 @@ msgstr ""
"Language: en_GB\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: diaspora.php:37
+#: diaspora.php:53
msgid "Post to Diaspora"
msgstr "Post to Diaspora"
-#: diaspora.php:142
+#: diaspora.php:78
+#, php-format
msgid ""
-"Can't login to your Diaspora account. Please check username and password and"
-" ensure you used the complete address (including http...)"
-msgstr "Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"
+"Please remember: You can always be reached from Diaspora with your Friendica"
+" handle %s. "
+msgstr "Please remember: You can always be reached from Diaspora with your Friendica handle %s. "
-#: diaspora.php:149 diaspora.php:153
+#: diaspora.php:79
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
+msgstr "This connector is only meant if you still want to use your old Diaspora account for some time. "
+
+#: diaspora.php:80
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle"
+" %s instead."
+msgstr "It's preferrable that you tell your Diaspora contacts the new handle %s instead."
+
+#: diaspora.php:90
+msgid "All aspects"
+msgstr "All aspects"
+
+#: diaspora.php:91
+msgid "Public"
+msgstr "Public"
+
+#: diaspora.php:97
+msgid "Post to aspect:"
+msgstr "Post to aspect:"
+
+#: diaspora.php:98
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr "Connected with your Diaspora account %s"
+
+#: diaspora.php:101
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr "Can't login to your Diaspora account. Please check handle (in the format user@domain.tld) and password."
+
+#: diaspora.php:109
msgid "Diaspora Export"
msgstr "Diaspora Export"
-#: diaspora.php:163
-msgid "Enable Diaspora Post Addon"
-msgstr "Enable Diaspora export"
+#: diaspora.php:110
+msgid "Information"
+msgstr "Information"
-#: diaspora.php:168
-msgid "Diaspora username"
-msgstr "Diaspora username"
+#: diaspora.php:111
+msgid "Error"
+msgstr "Error"
-#: diaspora.php:173
-msgid "Diaspora password"
-msgstr "Diaspora password"
-
-#: diaspora.php:178
-msgid "Diaspora site URL"
-msgstr "Diaspora site URL"
-
-#: diaspora.php:183
-msgid "Post to Diaspora by default"
-msgstr "Post to Diaspora by default"
-
-#: diaspora.php:189
+#: diaspora.php:112
msgid "Save Settings"
msgstr "Save settings"
-#: diaspora.php:324
-msgid "Diaspora post failed. Queued for retry."
-msgstr "Diaspora post failed. Queued for retry."
+#: diaspora.php:116
+msgid "Enable Diaspora Post Addon"
+msgstr "Enable Diaspora export"
+
+#: diaspora.php:117
+msgid "Diaspora handle"
+msgstr "Diaspora handle"
+
+#: diaspora.php:118
+msgid "Diaspora password"
+msgstr "Diaspora password"
+
+#: diaspora.php:118
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
+msgstr "Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it."
+
+#: diaspora.php:120
+msgid "Post to Diaspora by default"
+msgstr "Post to Diaspora by default"
+
+#: diaspora.php:138
+msgid "Diaspora settings updated."
+msgstr "Diaspora settings updated."
+
+#: diaspora.php:141
+msgid "Diaspora connector disabled."
+msgstr "Diaspora connector disabled."
diff --git a/diaspora/lang/en-gb/strings.php b/diaspora/lang/en-gb/strings.php
index 5e375913..15402393 100644
--- a/diaspora/lang/en-gb/strings.php
+++ b/diaspora/lang/en-gb/strings.php
@@ -2,16 +2,26 @@
if(! function_exists("string_plural_select_en_gb")) {
function string_plural_select_en_gb($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Diaspora"] = "Post to Diaspora";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)";
-$a->strings["Diaspora Export"] = "Diaspora Export";
-$a->strings["Enable Diaspora Post Addon"] = "Enable Diaspora export";
-$a->strings["Diaspora username"] = "Diaspora username";
-$a->strings["Diaspora password"] = "Diaspora password";
-$a->strings["Diaspora site URL"] = "Diaspora site URL";
-$a->strings["Post to Diaspora by default"] = "Post to Diaspora by default";
-$a->strings["Save Settings"] = "Save settings";
-$a->strings["Diaspora post failed. Queued for retry."] = "Diaspora post failed. Queued for retry.";
+$a->strings['Post to Diaspora'] = 'Post to Diaspora';
+$a->strings['Please remember: You can always be reached from Diaspora with your Friendica handle %s. '] = 'Please remember: You can always be reached from Diaspora with your Friendica handle %s. ';
+$a->strings['This connector is only meant if you still want to use your old Diaspora account for some time. '] = 'This connector is only meant if you still want to use your old Diaspora account for some time. ';
+$a->strings['However, it is preferred that you tell your Diaspora contacts the new handle %s instead.'] = 'It\'s preferrable that you tell your Diaspora contacts the new handle %s instead.';
+$a->strings['All aspects'] = 'All aspects';
+$a->strings['Public'] = 'Public';
+$a->strings['Post to aspect:'] = 'Post to aspect:';
+$a->strings['Connected with your Diaspora account %s'] = 'Connected with your Diaspora account %s';
+$a->strings['Can\'t login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.'] = 'Can\'t login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.';
+$a->strings['Diaspora Export'] = 'Diaspora Export';
+$a->strings['Information'] = 'Information';
+$a->strings['Error'] = 'Error';
+$a->strings['Save Settings'] = 'Save settings';
+$a->strings['Enable Diaspora Post Addon'] = 'Enable Diaspora export';
+$a->strings['Diaspora handle'] = 'Diaspora handle';
+$a->strings['Diaspora password'] = 'Diaspora password';
+$a->strings['Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.'] = 'Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.';
+$a->strings['Post to Diaspora by default'] = 'Post to Diaspora by default';
+$a->strings['Diaspora settings updated.'] = 'Diaspora settings updated.';
+$a->strings['Diaspora connector disabled.'] = 'Diaspora connector disabled.';
diff --git a/diaspora/lang/en-us/messages.po b/diaspora/lang/en-us/messages.po
new file mode 100644
index 00000000..ac7cef47
--- /dev/null
+++ b/diaspora/lang/en-us/messages.po
@@ -0,0 +1,114 @@
+# ADDON diaspora
+# Copyright (C)
+# This file is distributed under the same license as the Friendica diaspora addon package.
+#
+#
+# Translators:
+# Andy H3 , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2020-05-07 00:15-0400\n"
+"PO-Revision-Date: 2020-05-07 06:50+0000\n"
+"Last-Translator: Transifex Bot <>\n"
+"Language-Team: English (United States) (http://www.transifex.com/Friendica/friendica/language/en_US/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: en_US\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: diaspora.php:53
+msgid "Post to Diaspora"
+msgstr "Post to Diaspora"
+
+#: diaspora.php:78
+#, php-format
+msgid ""
+"Please remember: You can always be reached from Diaspora with your Friendica"
+" handle %s. "
+msgstr ""
+
+#: diaspora.php:79
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
+msgstr ""
+
+#: diaspora.php:80
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle"
+" %s instead."
+msgstr ""
+
+#: diaspora.php:90
+msgid "All aspects"
+msgstr ""
+
+#: diaspora.php:91
+msgid "Public"
+msgstr ""
+
+#: diaspora.php:97
+msgid "Post to aspect:"
+msgstr ""
+
+#: diaspora.php:98
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr ""
+
+#: diaspora.php:101
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr ""
+
+#: diaspora.php:109
+msgid "Diaspora Export"
+msgstr "Diaspora Export"
+
+#: diaspora.php:110
+msgid "Information"
+msgstr ""
+
+#: diaspora.php:111
+msgid "Error"
+msgstr ""
+
+#: diaspora.php:112
+msgid "Save Settings"
+msgstr "Save settings"
+
+#: diaspora.php:116
+msgid "Enable Diaspora Post Addon"
+msgstr "Enable Diaspora export"
+
+#: diaspora.php:117
+msgid "Diaspora handle"
+msgstr ""
+
+#: diaspora.php:118
+msgid "Diaspora password"
+msgstr "Diaspora password"
+
+#: diaspora.php:118
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
+msgstr ""
+
+#: diaspora.php:120
+msgid "Post to Diaspora by default"
+msgstr "Post to Diaspora by default"
+
+#: diaspora.php:138
+msgid "Diaspora settings updated."
+msgstr ""
+
+#: diaspora.php:141
+msgid "Diaspora connector disabled."
+msgstr ""
diff --git a/diaspora/lang/en-us/strings.php b/diaspora/lang/en-us/strings.php
new file mode 100644
index 00000000..11d4ab78
--- /dev/null
+++ b/diaspora/lang/en-us/strings.php
@@ -0,0 +1,13 @@
+strings['Post to Diaspora'] = 'Post to Diaspora';
+$a->strings['Diaspora Export'] = 'Diaspora Export';
+$a->strings['Save Settings'] = 'Save settings';
+$a->strings['Enable Diaspora Post Addon'] = 'Enable Diaspora export';
+$a->strings['Diaspora password'] = 'Diaspora password';
+$a->strings['Post to Diaspora by default'] = 'Post to Diaspora by default';
diff --git a/diaspora/lang/es/messages.po b/diaspora/lang/es/messages.po
index a7beaa04..e40ac314 100644
--- a/diaspora/lang/es/messages.po
+++ b/diaspora/lang/es/messages.po
@@ -4,14 +4,16 @@
#
#
# Translators:
+# Boris Daniel Martinez Millàn , 2021
+# Senex Petrovic , 2021
# Tupambae.org, 2016
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-22 13:18+0200\n"
-"PO-Revision-Date: 2016-04-18 19:36+0000\n"
-"Last-Translator: Tupambae.org\n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-04-01 09:53+0000\n"
+"Last-Translator: Senex Petrovic \n"
"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,44 +21,88 @@ msgstr ""
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: diaspora.php:37
+#: diaspora.php:43
msgid "Post to Diaspora"
msgstr "Publicar hacia Diaspora*"
-#: diaspora.php:142
+#: diaspora.php:68
+#, php-format
msgid ""
-"Can't login to your Diaspora account. Please check username and password and"
-" ensure you used the complete address (including http...)"
-msgstr "No se puede ingresar a tu cuenta de Diaspora*. Por favor verificar nombre de usuario, contraseña y asegura de usar la dirección completa, incluyendo https.. ."
+"Please remember: You can always be reached from Diaspora with your Friendica"
+" handle %s. "
+msgstr "Recuerde: siempre puede ser contactado desde Diaspora con su identificador de Friendica %s. "
-#: diaspora.php:149 diaspora.php:153
+#: diaspora.php:69
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
+msgstr "Este conector solo está diseñado si aún desea usar su antigua cuenta de Diaspora durante algún tiempo."
+
+#: diaspora.php:70
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle"
+" %s instead."
+msgstr "Sin embargo, es preferible que le diga a sus contactos de Diaspora el nuevo identificador %s en su lugar."
+
+#: diaspora.php:80
+msgid "All aspects"
+msgstr "Todos los aspectos"
+
+#: diaspora.php:81
+msgid "Public"
+msgstr "Publico"
+
+#: diaspora.php:87
+msgid "Post to aspect:"
+msgstr "Publicar para aspecto"
+
+#: diaspora.php:88
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr "Conectado con tu cuenta de Diaspora %s"
+
+#: diaspora.php:91
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr "No puedo iniciar sesión en su cuenta de Diaspora. Compruebe el identificador (en formato user@domain.tld) y la contraseña."
+
+#: diaspora.php:99
msgid "Diaspora Export"
msgstr "Exportar a Diaspora*"
-#: diaspora.php:163
-msgid "Enable Diaspora Post Addon"
-msgstr "Habilitar publicar a traves de Diaspora* addon."
+#: diaspora.php:100
+msgid "Information"
+msgstr "Información"
-#: diaspora.php:168
-msgid "Diaspora username"
-msgstr "Nombre de usuario de Diaspora*."
+#: diaspora.php:101
+msgid "Error"
+msgstr "Error"
-#: diaspora.php:173
-msgid "Diaspora password"
-msgstr "Contraseña Diaspora*"
-
-#: diaspora.php:178
-msgid "Diaspora site URL"
-msgstr "URL sitio Diaspora*"
-
-#: diaspora.php:183
-msgid "Post to Diaspora by default"
-msgstr "Publicar hacia Diaspora* como estándar."
-
-#: diaspora.php:189
+#: diaspora.php:102
msgid "Save Settings"
msgstr "Guardar configuración"
-#: diaspora.php:324
-msgid "Diaspora post failed. Queued for retry."
-msgstr "La publicación hacia Diaspora* fallo, puesto en espera para nuevo intento."
+#: diaspora.php:106
+msgid "Enable Diaspora Post Addon"
+msgstr "Habilitar publicar a traves de Diaspora* plugin."
+
+#: diaspora.php:107
+msgid "Diaspora handle"
+msgstr "Diaspora handle"
+
+#: diaspora.php:108
+msgid "Diaspora password"
+msgstr "Contraseña Diaspora*"
+
+#: diaspora.php:108
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
+msgstr "Aviso de privacidad: su contraseña de Diaspora se almacenará sin cifrar para autenticarlo con su pod de Diaspora. Esto significa que su administrador de nodo de Friendica puede tener acceso a él."
+
+#: diaspora.php:110
+msgid "Post to Diaspora by default"
+msgstr "Publicar hacia Diaspora* como estándar."
diff --git a/diaspora/lang/es/strings.php b/diaspora/lang/es/strings.php
index e25594c3..d7fa1bd8 100644
--- a/diaspora/lang/es/strings.php
+++ b/diaspora/lang/es/strings.php
@@ -2,16 +2,24 @@
if(! function_exists("string_plural_select_es")) {
function string_plural_select_es($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Diaspora"] = "Publicar hacia Diaspora*";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "No se puede ingresar a tu cuenta de Diaspora*. Por favor verificar nombre de usuario, contraseña y asegura de usar la dirección completa, incluyendo https.. .";
-$a->strings["Diaspora Export"] = "Exportar a Diaspora*";
-$a->strings["Enable Diaspora Post Addon"] = "Habilitar publicar a traves de Diaspora* addon.";
-$a->strings["Diaspora username"] = "Nombre de usuario de Diaspora*.";
-$a->strings["Diaspora password"] = "Contraseña Diaspora*";
-$a->strings["Diaspora site URL"] = "URL sitio Diaspora*";
-$a->strings["Post to Diaspora by default"] = "Publicar hacia Diaspora* como estándar.";
-$a->strings["Save Settings"] = "Guardar configuración";
-$a->strings["Diaspora post failed. Queued for retry."] = "La publicación hacia Diaspora* fallo, puesto en espera para nuevo intento.";
+$a->strings['Post to Diaspora'] = 'Publicar hacia Diaspora*';
+$a->strings['Please remember: You can always be reached from Diaspora with your Friendica handle %s. '] = 'Recuerde: siempre puede ser contactado desde Diaspora con su identificador de Friendica %s. ';
+$a->strings['This connector is only meant if you still want to use your old Diaspora account for some time. '] = 'Este conector solo está diseñado si aún desea usar su antigua cuenta de Diaspora durante algún tiempo.';
+$a->strings['However, it is preferred that you tell your Diaspora contacts the new handle %s instead.'] = 'Sin embargo, es preferible que le diga a sus contactos de Diaspora el nuevo identificador %s en su lugar.';
+$a->strings['All aspects'] = 'Todos los aspectos';
+$a->strings['Public'] = 'Publico';
+$a->strings['Post to aspect:'] = 'Publicar para aspecto';
+$a->strings['Connected with your Diaspora account %s'] = 'Conectado con tu cuenta de Diaspora %s';
+$a->strings['Can\'t login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.'] = 'No puedo iniciar sesión en su cuenta de Diaspora. Compruebe el identificador (en formato user@domain.tld) y la contraseña.';
+$a->strings['Diaspora Export'] = 'Exportar a Diaspora*';
+$a->strings['Information'] = 'Información';
+$a->strings['Error'] = 'Error';
+$a->strings['Save Settings'] = 'Guardar configuración';
+$a->strings['Enable Diaspora Post Addon'] = 'Habilitar publicar a traves de Diaspora* plugin.';
+$a->strings['Diaspora handle'] = 'Diaspora handle';
+$a->strings['Diaspora password'] = 'Contraseña Diaspora*';
+$a->strings['Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.'] = 'Aviso de privacidad: su contraseña de Diaspora se almacenará sin cifrar para autenticarlo con su pod de Diaspora. Esto significa que su administrador de nodo de Friendica puede tener acceso a él.';
+$a->strings['Post to Diaspora by default'] = 'Publicar hacia Diaspora* como estándar.';
diff --git a/diaspora/lang/fi-fi/strings.php b/diaspora/lang/fi-fi/strings.php
index 8d14a70b..74d969ad 100644
--- a/diaspora/lang/fi-fi/strings.php
+++ b/diaspora/lang/fi-fi/strings.php
@@ -3,16 +3,15 @@
if(! function_exists("string_plural_select_fi_fi")) {
function string_plural_select_fi_fi($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Diaspora"] = "Lähetä Diasporaan";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Kirjautuminen Diasporaan epäonnistui. Tarkista että käyttäjätunnus ja salasana ovat oikein ja varmista että kirjoitit täydellisen osoitteen (mukaan lukien http...).";
-$a->strings["Diaspora Export"] = "Diaspora Export";
-$a->strings["Enable Diaspora Post Addon"] = "Ota Diaspora-viestilisäosa käyttöön";
-$a->strings["Diaspora username"] = "Diaspora -käyttäjätunnus";
-$a->strings["Diaspora password"] = "Diaspora -salasana";
-$a->strings["Diaspora site URL"] = "Diaspora -sivuston URL-osoite";
-$a->strings["Post to Diaspora by default"] = "Lähetä Diasporaan oletuksena";
-$a->strings["Save Settings"] = "Tallenna asetukset";
-$a->strings["Diaspora post failed. Queued for retry."] = "Diaspora -julkaisu epäonnistui. Jonossa uudelleenyritykseen.";
+$a->strings['Post to Diaspora'] = 'Lähetä Diasporaan';
+$a->strings['Can\'t login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)'] = 'Kirjautuminen Diasporaan epäonnistui. Tarkista että käyttäjätunnus ja salasana ovat oikein ja varmista että kirjoitit täydellisen osoitteen (mukaan lukien http...).';
+$a->strings['Diaspora Export'] = 'Diaspora Export';
+$a->strings['Enable Diaspora Post Addon'] = 'Ota Diaspora-viestilisäosa käyttöön';
+$a->strings['Diaspora username'] = 'Diaspora -käyttäjätunnus';
+$a->strings['Diaspora password'] = 'Diaspora -salasana';
+$a->strings['Diaspora site URL'] = 'Diaspora -sivuston URL-osoite';
+$a->strings['Post to Diaspora by default'] = 'Lähetä Diasporaan oletuksena';
+$a->strings['Save Settings'] = 'Tallenna asetukset';
+$a->strings['Diaspora post failed. Queued for retry.'] = 'Diaspora -julkaisu epäonnistui. Jonossa uudelleenyritykseen.';
diff --git a/diaspora/lang/fr/messages.po b/diaspora/lang/fr/messages.po
index d8f79f97..abb4287c 100644
--- a/diaspora/lang/fr/messages.po
+++ b/diaspora/lang/fr/messages.po
@@ -4,60 +4,102 @@
#
#
# Translators:
+# bob lebonche , 2021
# Damien Goutte-Gattat , 2015
-# Nicola Spanti , 2015
+# ea1cd8241cb389ffb6f92bc6891eff5d_dc12308 <70dced5587d47e18d88f9298024d96f8_93383>, 2015
+# Vincent Vindarel , 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-22 13:18+0200\n"
-"PO-Revision-Date: 2015-08-30 17:12+0000\n"
-"Last-Translator: Nicola Spanti \n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: 2014-06-22 11:39+0000\n"
+"Last-Translator: bob lebonche , 2021\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/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"
+"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
-#: diaspora.php:37
+#: diaspora.php:44
msgid "Post to Diaspora"
msgstr "Publier sur Diaspora"
-#: diaspora.php:142
+#: diaspora.php:67
+#, php-format
msgid ""
-"Can't login to your Diaspora account. Please check username and password and"
-" ensure you used the complete address (including http...)"
-msgstr "Impossible de se connecter à votre compte Diaspora. Veuillez vérifier votre identifiant et votre mot de passe, et assurez-vous d’avoir indiqué l’adresse complète (y compris le « http:// » initial)."
+"Please remember: You can always be reached from Diaspora with your Friendica"
+" handle %s. "
+msgstr "Attention : vous pouvez toujours être joint par Diaspora avec votre identifiant Friendica %s. "
-#: diaspora.php:149 diaspora.php:153
-msgid "Diaspora Export"
-msgstr "Export Diaspora"
+#: diaspora.php:68
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
+msgstr "Ce connecteur ne doit être utilisé que si vous souhaitez encore utiliser votre ancien compte Diaspora."
-#: diaspora.php:163
+#: diaspora.php:69
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle"
+" %s instead."
+msgstr "Quoi qu'il en soit, il est préférable de communiquer son nouvel identifiant à ses contacts Diaspora %s."
+
+#: diaspora.php:79
+msgid "All aspects"
+msgstr "Tous les aspects"
+
+#: diaspora.php:80
+msgid "Public"
+msgstr "Public"
+
+#: diaspora.php:86
+msgid "Post to aspect:"
+msgstr "Publier avec l'aspect:"
+
+#: diaspora.php:87
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr "Connecté avec votre compte Diaspora %s"
+
+#: diaspora.php:90
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr "Connexion impossible à votre compte Diaspora. Merci de vérifier votre identifiant (au format user@domain.tld) et votre mot de passe."
+
+#: diaspora.php:97
+msgid "Information"
+msgstr "Information"
+
+#: diaspora.php:98
+msgid "Error"
+msgstr "Erreur"
+
+#: diaspora.php:104
msgid "Enable Diaspora Post Addon"
msgstr "Activer l’extension « Publier sur Diaspora »"
-#: diaspora.php:168
-msgid "Diaspora username"
+#: diaspora.php:105
+msgid "Diaspora handle"
msgstr "Identifiant Diaspora"
-#: diaspora.php:173
+#: diaspora.php:106
msgid "Diaspora password"
msgstr "Mot de passe Diaspora"
-#: diaspora.php:178
-msgid "Diaspora site URL"
-msgstr "Adresse du site Diaspora"
+#: diaspora.php:106
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
+msgstr "Vie privée : Votre mot de passe Diaspora sera stocké sans encryption pour vous identifier sur votre pod. Cela signifie que l’administrateur de votre pod Diaspora peut y avoir accès."
-#: diaspora.php:183
+#: diaspora.php:108
msgid "Post to Diaspora by default"
msgstr "Publier sur Diaspora par défaut"
-#: diaspora.php:189
-msgid "Save Settings"
-msgstr "Sauvegarder les paramètres"
-
-#: diaspora.php:324
-msgid "Diaspora post failed. Queued for retry."
-msgstr "Échec de la publication sur Diaspora. Une nouvelle tentative est planifiée."
+#: diaspora.php:113
+msgid "Diaspora Export"
+msgstr "Export Diaspora"
diff --git a/diaspora/lang/fr/strings.php b/diaspora/lang/fr/strings.php
index c9037b6a..c208f4ef 100644
--- a/diaspora/lang/fr/strings.php
+++ b/diaspora/lang/fr/strings.php
@@ -2,16 +2,23 @@
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
- return ($n > 1);;
+ $n = intval($n);
+ if (($n == 0 || $n == 1)) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; }
}}
-;
-$a->strings["Post to Diaspora"] = "Publier sur Diaspora";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Impossible de se connecter à votre compte Diaspora. Veuillez vérifier votre identifiant et votre mot de passe, et assurez-vous d’avoir indiqué l’adresse complète (y compris le « http:// » initial).";
-$a->strings["Diaspora Export"] = "Export Diaspora";
-$a->strings["Enable Diaspora Post Addon"] = "Activer l’extension « Publier sur Diaspora »";
-$a->strings["Diaspora username"] = "Identifiant Diaspora";
-$a->strings["Diaspora password"] = "Mot de passe Diaspora";
-$a->strings["Diaspora site URL"] = "Adresse du site Diaspora";
-$a->strings["Post to Diaspora by default"] = "Publier sur Diaspora par défaut";
-$a->strings["Save Settings"] = "Sauvegarder les paramètres";
-$a->strings["Diaspora post failed. Queued for retry."] = "Échec de la publication sur Diaspora. Une nouvelle tentative est planifiée.";
+$a->strings['Post to Diaspora'] = 'Publier sur Diaspora';
+$a->strings['Please remember: You can always be reached from Diaspora with your Friendica handle %s. '] = 'Attention : vous pouvez toujours être joint par Diaspora avec votre identifiant Friendica %s. ';
+$a->strings['This connector is only meant if you still want to use your old Diaspora account for some time. '] = 'Ce connecteur ne doit être utilisé que si vous souhaitez encore utiliser votre ancien compte Diaspora.';
+$a->strings['However, it is preferred that you tell your Diaspora contacts the new handle %s instead.'] = 'Quoi qu\'il en soit, il est préférable de communiquer son nouvel identifiant à ses contacts Diaspora %s.';
+$a->strings['All aspects'] = 'Tous les aspects';
+$a->strings['Public'] = 'Public';
+$a->strings['Post to aspect:'] = 'Publier avec l\'aspect:';
+$a->strings['Connected with your Diaspora account %s'] = 'Connecté avec votre compte Diaspora %s';
+$a->strings['Can\'t login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.'] = 'Connexion impossible à votre compte Diaspora. Merci de vérifier votre identifiant (au format user@domain.tld) et votre mot de passe.';
+$a->strings['Information'] = 'Information';
+$a->strings['Error'] = 'Erreur';
+$a->strings['Enable Diaspora Post Addon'] = 'Activer l’extension « Publier sur Diaspora »';
+$a->strings['Diaspora handle'] = 'Identifiant Diaspora';
+$a->strings['Diaspora password'] = 'Mot de passe Diaspora';
+$a->strings['Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.'] = 'Vie privée : Votre mot de passe Diaspora sera stocké sans encryption pour vous identifier sur votre pod. Cela signifie que l’administrateur de votre pod Diaspora peut y avoir accès.';
+$a->strings['Post to Diaspora by default'] = 'Publier sur Diaspora par défaut';
+$a->strings['Diaspora Export'] = 'Export Diaspora';
diff --git a/diaspora/lang/hu/messages.po b/diaspora/lang/hu/messages.po
new file mode 100644
index 00000000..9ca3f322
--- /dev/null
+++ b/diaspora/lang/hu/messages.po
@@ -0,0 +1,102 @@
+# ADDON diaspora
+# Copyright (C)
+# This file is distributed under the same license as the Friendica diaspora addon package.
+#
+#
+# Translators:
+# Balázs Úr, 2020
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: 2014-06-22 11:39+0000\n"
+"Last-Translator: Balázs Úr, 2020\n"
+"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/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"
+
+#: diaspora.php:44
+msgid "Post to Diaspora"
+msgstr "Beküldés a Diasporára"
+
+#: diaspora.php:67
+#, php-format
+msgid ""
+"Please remember: You can always be reached from Diaspora with your Friendica"
+" handle %s. "
+msgstr "Ne feledje: Ön mindig elérhető a Diasporáról a(z) %s Friendica kezelőjével. "
+
+#: diaspora.php:68
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
+msgstr "Ez az összekötő csak akkor szükséges, ha továbbra is használni szeretné a régi Diaspora-fiókját egy ideig. "
+
+#: diaspora.php:69
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle"
+" %s instead."
+msgstr "Azonban az ajánlott eljárás az, hogy inkább mondja meg a Diaspora partnereinek az új %s kezelőt."
+
+#: diaspora.php:79
+msgid "All aspects"
+msgstr "Minden szempont"
+
+#: diaspora.php:80
+msgid "Public"
+msgstr "Nyilvános"
+
+#: diaspora.php:86
+msgid "Post to aspect:"
+msgstr "Beküldés a szempontba:"
+
+#: diaspora.php:87
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr "Kapcsolódva a(z) %s Diaspora-fiókjával"
+
+#: diaspora.php:90
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr "Nem lehet bejelentkezni a Diaspora-fiókjába. Ellenőrizze a kezelőt (felhasználó@tartomány.tld formátumban) és a jelszót."
+
+#: diaspora.php:97
+msgid "Information"
+msgstr "Információ"
+
+#: diaspora.php:98
+msgid "Error"
+msgstr "Hiba"
+
+#: diaspora.php:104
+msgid "Enable Diaspora Post Addon"
+msgstr "A Diaspora-beküldő bővítmény engedélyezése"
+
+#: diaspora.php:105
+msgid "Diaspora handle"
+msgstr "Diaspora kezelő"
+
+#: diaspora.php:106
+msgid "Diaspora password"
+msgstr "Diaspora jelszó"
+
+#: diaspora.php:106
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
+msgstr "Adatvédelmi figyelmeztetés: a Diaspora jelszava titkosítatlanul lesz eltárolva, hogy hitelesítse Önt a Diaspora csomópontján. Ez azt jelenti, hogy a Friendica csomópontjának adminisztrátora hozzáférhet."
+
+#: diaspora.php:108
+msgid "Post to Diaspora by default"
+msgstr "Beküldés a Diasporára alapértelmezetten"
+
+#: diaspora.php:113
+msgid "Diaspora Export"
+msgstr "Diaspora exportálás"
diff --git a/diaspora/lang/hu/strings.php b/diaspora/lang/hu/strings.php
new file mode 100644
index 00000000..aa3875e7
--- /dev/null
+++ b/diaspora/lang/hu/strings.php
@@ -0,0 +1,24 @@
+strings['Post to Diaspora'] = 'Beküldés a Diasporára';
+$a->strings['Please remember: You can always be reached from Diaspora with your Friendica handle %s. '] = 'Ne feledje: Ön mindig elérhető a Diasporáról a(z) %s Friendica kezelőjével. ';
+$a->strings['This connector is only meant if you still want to use your old Diaspora account for some time. '] = 'Ez az összekötő csak akkor szükséges, ha továbbra is használni szeretné a régi Diaspora-fiókját egy ideig. ';
+$a->strings['However, it is preferred that you tell your Diaspora contacts the new handle %s instead.'] = 'Azonban az ajánlott eljárás az, hogy inkább mondja meg a Diaspora partnereinek az új %s kezelőt.';
+$a->strings['All aspects'] = 'Minden szempont';
+$a->strings['Public'] = 'Nyilvános';
+$a->strings['Post to aspect:'] = 'Beküldés a szempontba:';
+$a->strings['Connected with your Diaspora account %s'] = 'Kapcsolódva a(z) %s Diaspora-fiókjával';
+$a->strings['Can\'t login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.'] = 'Nem lehet bejelentkezni a Diaspora-fiókjába. Ellenőrizze a kezelőt (felhasználó@tartomány.tld formátumban) és a jelszót.';
+$a->strings['Information'] = 'Információ';
+$a->strings['Error'] = 'Hiba';
+$a->strings['Enable Diaspora Post Addon'] = 'A Diaspora-beküldő bővítmény engedélyezése';
+$a->strings['Diaspora handle'] = 'Diaspora kezelő';
+$a->strings['Diaspora password'] = 'Diaspora jelszó';
+$a->strings['Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.'] = 'Adatvédelmi figyelmeztetés: a Diaspora jelszava titkosítatlanul lesz eltárolva, hogy hitelesítse Önt a Diaspora csomópontján. Ez azt jelenti, hogy a Friendica csomópontjának adminisztrátora hozzáférhet.';
+$a->strings['Post to Diaspora by default'] = 'Beküldés a Diasporára alapértelmezetten';
+$a->strings['Diaspora Export'] = 'Diaspora exportálás';
diff --git a/diaspora/lang/is/strings.php b/diaspora/lang/is/strings.php
index 6149a41b..68807841 100644
--- a/diaspora/lang/is/strings.php
+++ b/diaspora/lang/is/strings.php
@@ -3,16 +3,14 @@
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
- return ($n % 10 != 1 || $n % 100 == 11);;
+ return intval($n % 10 != 1 || $n % 100 == 11);
}}
-;
-$a->strings["Post to Diaspora"] = "Senda færslu á Diaspora";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "";
-$a->strings["Diaspora Export"] = "Diaspora útflutningur";
-$a->strings["Enable Diaspora Post Addon"] = "Virkja sendiviðbót fyrir Diaspora";
-$a->strings["Diaspora username"] = "Notandanafn á Diaspora";
-$a->strings["Diaspora password"] = "Lykilorð á Diaspora";
-$a->strings["Diaspora site URL"] = "Slóð á Diaspora-vefsvæði";
-$a->strings["Post to Diaspora by default"] = "Senda sjálfgefið færslur á Diaspora";
-$a->strings["Save Settings"] = "Vista stillingar";
-$a->strings["Diaspora post failed. Queued for retry."] = "Færsla Diaspora mistókst. Sett í biðröð til endurtekningar.";
+$a->strings['Post to Diaspora'] = 'Senda færslu á Diaspora';
+$a->strings['Diaspora Export'] = 'Diaspora útflutningur';
+$a->strings['Enable Diaspora Post Addon'] = 'Virkja sendiviðbót fyrir Diaspora';
+$a->strings['Diaspora username'] = 'Notandanafn á Diaspora';
+$a->strings['Diaspora password'] = 'Lykilorð á Diaspora';
+$a->strings['Diaspora site URL'] = 'Slóð á Diaspora-vefsvæði';
+$a->strings['Post to Diaspora by default'] = 'Senda sjálfgefið færslur á Diaspora';
+$a->strings['Save Settings'] = 'Vista stillingar';
+$a->strings['Diaspora post failed. Queued for retry.'] = 'Færsla Diaspora mistókst. Sett í biðröð til endurtekningar.';
diff --git a/diaspora/lang/it/messages.po b/diaspora/lang/it/messages.po
index 8c3265dc..f193a623 100644
--- a/diaspora/lang/it/messages.po
+++ b/diaspora/lang/it/messages.po
@@ -5,13 +5,14 @@
#
# Translators:
# fabrixxm , 2014,2018
+# Sylke Vicious , 2020
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-22 13:18+0200\n"
-"PO-Revision-Date: 2018-03-19 13:21+0000\n"
-"Last-Translator: fabrixxm \n"
+"POT-Creation-Date: 2020-05-07 00:15-0400\n"
+"PO-Revision-Date: 2020-09-01 10:54+0000\n"
+"Last-Translator: Sylke Vicious \n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,44 +20,96 @@ msgstr ""
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: diaspora.php:37
+#: diaspora.php:53
msgid "Post to Diaspora"
msgstr "Invia a Diaspora"
-#: diaspora.php:142
+#: diaspora.php:78
+#, php-format
msgid ""
-"Can't login to your Diaspora account. Please check username and password and"
-" ensure you used the complete address (including http...)"
-msgstr "Non riesco ad autenticarmi con il tuo account Diaspora. Controlla il nome utente e la password e assicurati di aver usato l'indirizzo completo (compreso \"http\" o \"https\")"
+"Please remember: You can always be reached from Diaspora with your Friendica"
+" handle %s. "
+msgstr "Ricorda: Puoi sempre essere raggiunto da Diaspora con il tuo indirizzo Friendica %s."
-#: diaspora.php:149 diaspora.php:153
+#: diaspora.php:79
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
+msgstr "Questo connettore è utile solo se vuoi utilizzare il tuo vecchio account Diaspora per un po'."
+
+#: diaspora.php:80
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle"
+" %s instead."
+msgstr "Comunque, è preferibile che tu comunichi ai tuoi contatti Diaspora il nuovo indirizzo %s."
+
+#: diaspora.php:90
+msgid "All aspects"
+msgstr "Tutti gli aspetti"
+
+#: diaspora.php:91
+msgid "Public"
+msgstr "Pubblico"
+
+#: diaspora.php:97
+msgid "Post to aspect:"
+msgstr "Invia all'aspetto:"
+
+#: diaspora.php:98
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr "Connesso con il tuo account Diaspora %s"
+
+#: diaspora.php:101
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr "Non è stato possibile accedere al tuo account Diaspora. Per favore controlla l'indirizzo (nel formato utente@dominio.tld) e password."
+
+#: diaspora.php:109
msgid "Diaspora Export"
msgstr "Esporta Diaspora"
-#: diaspora.php:163
-msgid "Enable Diaspora Post Addon"
-msgstr "Abilita il componente aggiuntivo di invio a Diaspora"
+#: diaspora.php:110
+msgid "Information"
+msgstr "Informazione"
-#: diaspora.php:168
-msgid "Diaspora username"
-msgstr "Nome utente Diaspora"
+#: diaspora.php:111
+msgid "Error"
+msgstr "Errore"
-#: diaspora.php:173
-msgid "Diaspora password"
-msgstr "Password Diaspora"
-
-#: diaspora.php:178
-msgid "Diaspora site URL"
-msgstr "Indirizzo sito Diaspora"
-
-#: diaspora.php:183
-msgid "Post to Diaspora by default"
-msgstr "Invia sempre a Diaspora"
-
-#: diaspora.php:189
+#: diaspora.php:112
msgid "Save Settings"
msgstr "Salva Impostazioni"
-#: diaspora.php:324
-msgid "Diaspora post failed. Queued for retry."
-msgstr "Invio a Diaspora fallito. In attesa di riprovare."
+#: diaspora.php:116
+msgid "Enable Diaspora Post Addon"
+msgstr "Abilita il componente aggiuntivo di invio a Diaspora"
+
+#: diaspora.php:117
+msgid "Diaspora handle"
+msgstr "Indirizzo Diaspora"
+
+#: diaspora.php:118
+msgid "Diaspora password"
+msgstr "Password Diaspora"
+
+#: diaspora.php:118
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
+msgstr "Nota sulla privacy: La tua password Diaspora sarà memorizzata in modo non criptato per autenticarti al tuo pod Diaspora. Questo significa che l'amministratore del tuo nodo Friendica può aver accesso a questa."
+
+#: diaspora.php:120
+msgid "Post to Diaspora by default"
+msgstr "Invia sempre a Diaspora"
+
+#: diaspora.php:138
+msgid "Diaspora settings updated."
+msgstr "Impostazioni Diaspora aggiornate."
+
+#: diaspora.php:141
+msgid "Diaspora connector disabled."
+msgstr "Connettore Diaspora disabilitato."
diff --git a/diaspora/lang/it/strings.php b/diaspora/lang/it/strings.php
index a7778c94..e83526db 100644
--- a/diaspora/lang/it/strings.php
+++ b/diaspora/lang/it/strings.php
@@ -2,16 +2,26 @@
if(! function_exists("string_plural_select_it")) {
function string_plural_select_it($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Diaspora"] = "Invia a Diaspora";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Non riesco ad autenticarmi con il tuo account Diaspora. Controlla il nome utente e la password e assicurati di aver usato l'indirizzo completo (compreso \"http\" o \"https\")";
-$a->strings["Diaspora Export"] = "Esporta Diaspora";
-$a->strings["Enable Diaspora Post Addon"] = "Abilita il componente aggiuntivo di invio a Diaspora";
-$a->strings["Diaspora username"] = "Nome utente Diaspora";
-$a->strings["Diaspora password"] = "Password Diaspora";
-$a->strings["Diaspora site URL"] = "Indirizzo sito Diaspora";
-$a->strings["Post to Diaspora by default"] = "Invia sempre a Diaspora";
-$a->strings["Save Settings"] = "Salva Impostazioni";
-$a->strings["Diaspora post failed. Queued for retry."] = "Invio a Diaspora fallito. In attesa di riprovare.";
+$a->strings['Post to Diaspora'] = 'Invia a Diaspora';
+$a->strings['Please remember: You can always be reached from Diaspora with your Friendica handle %s. '] = 'Ricorda: Puoi sempre essere raggiunto da Diaspora con il tuo indirizzo Friendica %s.';
+$a->strings['This connector is only meant if you still want to use your old Diaspora account for some time. '] = 'Questo connettore è utile solo se vuoi utilizzare il tuo vecchio account Diaspora per un po\'.';
+$a->strings['However, it is preferred that you tell your Diaspora contacts the new handle %s instead.'] = 'Comunque, è preferibile che tu comunichi ai tuoi contatti Diaspora il nuovo indirizzo %s.';
+$a->strings['All aspects'] = 'Tutti gli aspetti';
+$a->strings['Public'] = 'Pubblico';
+$a->strings['Post to aspect:'] = 'Invia all\'aspetto:';
+$a->strings['Connected with your Diaspora account %s'] = 'Connesso con il tuo account Diaspora %s';
+$a->strings['Can\'t login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.'] = 'Non è stato possibile accedere al tuo account Diaspora. Per favore controlla l\'indirizzo (nel formato utente@dominio.tld) e password.';
+$a->strings['Diaspora Export'] = 'Esporta Diaspora';
+$a->strings['Information'] = 'Informazione';
+$a->strings['Error'] = 'Errore';
+$a->strings['Save Settings'] = 'Salva Impostazioni';
+$a->strings['Enable Diaspora Post Addon'] = 'Abilita il componente aggiuntivo di invio a Diaspora';
+$a->strings['Diaspora handle'] = 'Indirizzo Diaspora';
+$a->strings['Diaspora password'] = 'Password Diaspora';
+$a->strings['Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.'] = 'Nota sulla privacy: La tua password Diaspora sarà memorizzata in modo non criptato per autenticarti al tuo pod Diaspora. Questo significa che l\'amministratore del tuo nodo Friendica può aver accesso a questa.';
+$a->strings['Post to Diaspora by default'] = 'Invia sempre a Diaspora';
+$a->strings['Diaspora settings updated.'] = 'Impostazioni Diaspora aggiornate.';
+$a->strings['Diaspora connector disabled.'] = 'Connettore Diaspora disabilitato.';
diff --git a/diaspora/lang/nl/messages.po b/diaspora/lang/nl/messages.po
index 25fee146..94be0bc1 100644
--- a/diaspora/lang/nl/messages.po
+++ b/diaspora/lang/nl/messages.po
@@ -4,14 +4,15 @@
#
#
# Translators:
+# Casper , 2020
# Jeroen De Meerleer , 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-22 13:18+0200\n"
-"PO-Revision-Date: 2018-08-24 13:55+0000\n"
-"Last-Translator: Jeroen De Meerleer \n"
+"POT-Creation-Date: 2020-05-07 00:15-0400\n"
+"PO-Revision-Date: 2020-09-04 21:05+0000\n"
+"Last-Translator: Casper \n"
"Language-Team: Dutch (http://www.transifex.com/Friendica/friendica/language/nl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,44 +20,96 @@ msgstr ""
"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: diaspora.php:37
+#: diaspora.php:53
msgid "Post to Diaspora"
msgstr "Plaatsen op Diaspora"
-#: diaspora.php:142
+#: diaspora.php:78
+#, php-format
msgid ""
-"Can't login to your Diaspora account. Please check username and password and"
-" ensure you used the complete address (including http...)"
-msgstr "Kan niet inloggen op je Diaspora account. Gelieve je gebruikersnaam en wachtwoord te controleren en het volledige adres (inclusief http) te controleren"
+"Please remember: You can always be reached from Diaspora with your Friendica"
+" handle %s. "
+msgstr "Let op: vanuit Diaspora ben je altijd bereikbaar met je Friendica-handvat %s. "
-#: diaspora.php:149 diaspora.php:153
+#: diaspora.php:79
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
+msgstr "Deze connector is alleen bedoeld als je je oude diaspora-account nog enige tijd wilt gebruiken."
+
+#: diaspora.php:80
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle"
+" %s instead."
+msgstr "Het verdient echter de voorkeur dat u uw diaspora contacteert met de nieuwe handle %s."
+
+#: diaspora.php:90
+msgid "All aspects"
+msgstr "Alle aspecten"
+
+#: diaspora.php:91
+msgid "Public"
+msgstr "Openbaar"
+
+#: diaspora.php:97
+msgid "Post to aspect:"
+msgstr "Post naar aspect:"
+
+#: diaspora.php:98
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr "Verbonden met uw diaspora-account %s"
+
+#: diaspora.php:101
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr "U kunt niet inloggen op uw Diaspora-account. Controleer de handle (in het formaat gebruiker@domein.tld) en het wachtwoord."
+
+#: diaspora.php:109
msgid "Diaspora Export"
msgstr "Diaspora Exporteren"
-#: diaspora.php:163
-msgid "Enable Diaspora Post Addon"
-msgstr "Diaspora Post Addon inschakelen"
+#: diaspora.php:110
+msgid "Information"
+msgstr "Informatie"
-#: diaspora.php:168
-msgid "Diaspora username"
-msgstr "Diaspora gebruikersnaam"
+#: diaspora.php:111
+msgid "Error"
+msgstr "Fout"
-#: diaspora.php:173
-msgid "Diaspora password"
-msgstr "Diaspora wachtwoord"
-
-#: diaspora.php:178
-msgid "Diaspora site URL"
-msgstr "Diaspora pod URL"
-
-#: diaspora.php:183
-msgid "Post to Diaspora by default"
-msgstr "Plaatsen op Diaspora als standaard instellen "
-
-#: diaspora.php:189
+#: diaspora.php:112
msgid "Save Settings"
msgstr "Instellingen opslaan"
-#: diaspora.php:324
-msgid "Diaspora post failed. Queued for retry."
-msgstr "Posten naar Diaspora mislukt. In wachtrij geplaatst om opnieuw te proberen."
+#: diaspora.php:116
+msgid "Enable Diaspora Post Addon"
+msgstr "Diaspora Post Addon inschakelen"
+
+#: diaspora.php:117
+msgid "Diaspora handle"
+msgstr ""
+
+#: diaspora.php:118
+msgid "Diaspora password"
+msgstr "Diaspora wachtwoord"
+
+#: diaspora.php:118
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
+msgstr "Privacyverklaring: uw diaspora-wachtwoord wordt onversleuteld opgeslagen om u te authenticeren met uw diaspora-pod. Dit betekent dat uw Friendica-knooppuntbeheerder er toegang toe heeft."
+
+#: diaspora.php:120
+msgid "Post to Diaspora by default"
+msgstr "Plaatsen op Diaspora als standaard instellen "
+
+#: diaspora.php:138
+msgid "Diaspora settings updated."
+msgstr ""
+
+#: diaspora.php:141
+msgid "Diaspora connector disabled."
+msgstr ""
diff --git a/diaspora/lang/nl/strings.php b/diaspora/lang/nl/strings.php
index 698a875a..58bdf52d 100644
--- a/diaspora/lang/nl/strings.php
+++ b/diaspora/lang/nl/strings.php
@@ -3,16 +3,22 @@
if(! function_exists("string_plural_select_nl")) {
function string_plural_select_nl($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Diaspora"] = "Plaatsen op Diaspora";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Kan niet inloggen op je Diaspora account. Gelieve je gebruikersnaam en wachtwoord te controleren en het volledige adres (inclusief http) te controleren";
-$a->strings["Diaspora Export"] = "Diaspora Exporteren";
-$a->strings["Enable Diaspora Post Addon"] = "Diaspora Post Addon inschakelen";
-$a->strings["Diaspora username"] = "Diaspora gebruikersnaam";
-$a->strings["Diaspora password"] = "Diaspora wachtwoord";
-$a->strings["Diaspora site URL"] = "Diaspora pod URL";
-$a->strings["Post to Diaspora by default"] = "Plaatsen op Diaspora als standaard instellen ";
-$a->strings["Save Settings"] = "Instellingen opslaan";
-$a->strings["Diaspora post failed. Queued for retry."] = "Posten naar Diaspora mislukt. In wachtrij geplaatst om opnieuw te proberen.";
+$a->strings['Post to Diaspora'] = 'Plaatsen op Diaspora';
+$a->strings['Please remember: You can always be reached from Diaspora with your Friendica handle %s. '] = 'Let op: vanuit Diaspora ben je altijd bereikbaar met je Friendica-handvat %s. ';
+$a->strings['This connector is only meant if you still want to use your old Diaspora account for some time. '] = 'Deze connector is alleen bedoeld als je je oude diaspora-account nog enige tijd wilt gebruiken.';
+$a->strings['However, it is preferred that you tell your Diaspora contacts the new handle %s instead.'] = 'Het verdient echter de voorkeur dat u uw diaspora contacteert met de nieuwe handle %s.';
+$a->strings['All aspects'] = 'Alle aspecten';
+$a->strings['Public'] = 'Openbaar';
+$a->strings['Post to aspect:'] = 'Post naar aspect:';
+$a->strings['Connected with your Diaspora account %s'] = 'Verbonden met uw diaspora-account %s';
+$a->strings['Can\'t login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.'] = 'U kunt niet inloggen op uw Diaspora-account. Controleer de handle (in het formaat gebruiker@domein.tld) en het wachtwoord.';
+$a->strings['Diaspora Export'] = 'Diaspora Exporteren';
+$a->strings['Information'] = 'Informatie';
+$a->strings['Error'] = 'Fout';
+$a->strings['Save Settings'] = 'Instellingen opslaan';
+$a->strings['Enable Diaspora Post Addon'] = 'Diaspora Post Addon inschakelen';
+$a->strings['Diaspora password'] = 'Diaspora wachtwoord';
+$a->strings['Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.'] = 'Privacyverklaring: uw diaspora-wachtwoord wordt onversleuteld opgeslagen om u te authenticeren met uw diaspora-pod. Dit betekent dat uw Friendica-knooppuntbeheerder er toegang toe heeft.';
+$a->strings['Post to Diaspora by default'] = 'Plaatsen op Diaspora als standaard instellen ';
diff --git a/diaspora/lang/pl/messages.po b/diaspora/lang/pl/messages.po
index 086155b0..943a0422 100644
--- a/diaspora/lang/pl/messages.po
+++ b/diaspora/lang/pl/messages.po
@@ -4,14 +4,15 @@
#
#
# Translators:
-# Waldemar Stoczkowski , 2018
+# Piotr Strębski , 2022
+# Waldemar Stoczkowski, 2018,2020
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-22 13:18+0200\n"
-"PO-Revision-Date: 2018-08-04 10:21+0000\n"
-"Last-Translator: Waldemar Stoczkowski \n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: 2014-06-22 11:39+0000\n"
+"Last-Translator: Piotr Strębski , 2022\n"
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,44 +20,84 @@ msgstr ""
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
-#: diaspora.php:37
+#: diaspora.php:44
msgid "Post to Diaspora"
msgstr "Napisz do Diaspory"
-#: diaspora.php:142
+#: diaspora.php:67
+#, php-format
msgid ""
-"Can't login to your Diaspora account. Please check username and password and"
-" ensure you used the complete address (including http...)"
-msgstr "Nie możesz zalogować się na swoje konto Diaspora. Sprawdź nazwę użytkownika i hasło i upewnij się, że użyłeś pełnego adresu (w tym http ...)"
+"Please remember: You can always be reached from Diaspora with your Friendica"
+" handle %s. "
+msgstr "Pamiętaj: Zawsze można do Ciebie dotrzeć z Diaspory za pomocą uchwytu Friendica %s. "
-#: diaspora.php:149 diaspora.php:153
-msgid "Diaspora Export"
-msgstr "Eksportuj do Diaspory"
+#: diaspora.php:68
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
+msgstr "Ten łącznik jest przeznaczony do tego, gdy nadal chcesz korzystać ze starego konta Diaspora przez jakiś czas."
-#: diaspora.php:163
+#: diaspora.php:69
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle"
+" %s instead."
+msgstr "Jednak zaleca się, aby zamiast tego poinformować swoją Diasporę o kontakt z nowym uchwytem %s."
+
+#: diaspora.php:79
+msgid "All aspects"
+msgstr "Wszystkie aspekty"
+
+#: diaspora.php:80
+msgid "Public"
+msgstr "Publiczny"
+
+#: diaspora.php:86
+msgid "Post to aspect:"
+msgstr "Napisz do aspektu:"
+
+#: diaspora.php:87
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr "Połączony ze swoim kontem Diaspora %s"
+
+#: diaspora.php:90
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr "Nie można zalogować się na Twoje konto w Diasporze. Sprawdź uchwyt (w formacie użytkownik@domena.tld) i hasło."
+
+#: diaspora.php:97
+msgid "Information"
+msgstr "Informacja"
+
+#: diaspora.php:98
+msgid "Error"
+msgstr "Błąd"
+
+#: diaspora.php:104
msgid "Enable Diaspora Post Addon"
msgstr "Włącz dodatek Diaspora"
-#: diaspora.php:168
-msgid "Diaspora username"
-msgstr "Nazwa użytkownika Diaspora"
+#: diaspora.php:105
+msgid "Diaspora handle"
+msgstr "Uchwyt Diaspory"
-#: diaspora.php:173
+#: diaspora.php:106
msgid "Diaspora password"
msgstr "Hasło Diaspora"
-#: diaspora.php:178
-msgid "Diaspora site URL"
-msgstr "Adres URL witryny Diaspora"
+#: diaspora.php:106
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
+msgstr "Informacja o ochronie prywatności: Twoje hasło Diaspora będzie przechowywane w postaci niezaszyfrowanej w celu uwierzytelnienia użytkownika za pomocą Diaspora. Oznacza to, że administrator węzła Friendica może mieć do niego dostęp."
-#: diaspora.php:183
+#: diaspora.php:108
msgid "Post to Diaspora by default"
msgstr "Wyślij domyślnie do Diaspory"
-#: diaspora.php:189
-msgid "Save Settings"
-msgstr "Zapisz ustawienia"
-
-#: diaspora.php:324
-msgid "Diaspora post failed. Queued for retry."
-msgstr "Post do Diaspora nie powiódł się. W kolejce do ponowienia."
+#: diaspora.php:113
+msgid "Diaspora Export"
+msgstr "Eksportuj do Diaspory"
diff --git a/diaspora/lang/pl/strings.php b/diaspora/lang/pl/strings.php
index fd9158da..7e15915b 100644
--- a/diaspora/lang/pl/strings.php
+++ b/diaspora/lang/pl/strings.php
@@ -3,16 +3,22 @@
if(! function_exists("string_plural_select_pl")) {
function string_plural_select_pl($n){
$n = intval($n);
- return ($n==1 ? 0 : ($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14) ? 1 : $n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14) ? 2 : 3);;
+ if ($n==1) { return 0; } else if (($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["Post to Diaspora"] = "Napisz do Diaspory";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Nie możesz zalogować się na swoje konto Diaspora. Sprawdź nazwę użytkownika i hasło i upewnij się, że użyłeś pełnego adresu (w tym http ...)";
-$a->strings["Diaspora Export"] = "Eksportuj do Diaspory";
-$a->strings["Enable Diaspora Post Addon"] = "Włącz dodatek Diaspora";
-$a->strings["Diaspora username"] = "Nazwa użytkownika Diaspora";
-$a->strings["Diaspora password"] = "Hasło Diaspora";
-$a->strings["Diaspora site URL"] = "Adres URL witryny Diaspora";
-$a->strings["Post to Diaspora by default"] = "Wyślij domyślnie do Diaspory";
-$a->strings["Save Settings"] = "Zapisz ustawienia";
-$a->strings["Diaspora post failed. Queued for retry."] = "Post do Diaspora nie powiódł się. W kolejce do ponowienia.";
+$a->strings['Post to Diaspora'] = 'Napisz do Diaspory';
+$a->strings['Please remember: You can always be reached from Diaspora with your Friendica handle %s. '] = 'Pamiętaj: Zawsze można do Ciebie dotrzeć z Diaspory za pomocą uchwytu Friendica %s. ';
+$a->strings['This connector is only meant if you still want to use your old Diaspora account for some time. '] = 'Ten łącznik jest przeznaczony do tego, gdy nadal chcesz korzystać ze starego konta Diaspora przez jakiś czas.';
+$a->strings['However, it is preferred that you tell your Diaspora contacts the new handle %s instead.'] = 'Jednak zaleca się, aby zamiast tego poinformować swoją Diasporę o kontakt z nowym uchwytem %s.';
+$a->strings['All aspects'] = 'Wszystkie aspekty';
+$a->strings['Public'] = 'Publiczny';
+$a->strings['Post to aspect:'] = 'Napisz do aspektu:';
+$a->strings['Connected with your Diaspora account %s'] = 'Połączony ze swoim kontem Diaspora %s';
+$a->strings['Can\'t login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.'] = 'Nie można zalogować się na Twoje konto w Diasporze. Sprawdź uchwyt (w formacie użytkownik@domena.tld) i hasło.';
+$a->strings['Information'] = 'Informacja';
+$a->strings['Error'] = 'Błąd';
+$a->strings['Enable Diaspora Post Addon'] = 'Włącz dodatek Diaspora';
+$a->strings['Diaspora handle'] = 'Uchwyt Diaspory';
+$a->strings['Diaspora password'] = 'Hasło Diaspora';
+$a->strings['Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.'] = 'Informacja o ochronie prywatności: Twoje hasło Diaspora będzie przechowywane w postaci niezaszyfrowanej w celu uwierzytelnienia użytkownika za pomocą Diaspora. Oznacza to, że administrator węzła Friendica może mieć do niego dostęp.';
+$a->strings['Post to Diaspora by default'] = 'Wyślij domyślnie do Diaspory';
+$a->strings['Diaspora Export'] = 'Eksportuj do Diaspory';
diff --git a/diaspora/lang/pt-br/strings.php b/diaspora/lang/pt-br/strings.php
new file mode 100644
index 00000000..4c341ac1
--- /dev/null
+++ b/diaspora/lang/pt-br/strings.php
@@ -0,0 +1,15 @@
+ 1);
+}}
+$a->strings['Post to Diaspora'] = 'Publicar na Diaspora';
+$a->strings['Can\'t login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)'] = 'Não foi possível entrar na sua conta Diaspora. Verifique seu nome de usuário e senha e certifique-se que usou o endereço completo (incluindo http...).';
+$a->strings['Enable Diaspora Post Addon'] = 'Habilitar plug-in para publicar na Diaspora';
+$a->strings['Diaspora username'] = 'Nome de usuário da Diaspora';
+$a->strings['Diaspora password'] = 'Senha da Diaspora';
+$a->strings['Post to Diaspora by default'] = 'Publicar na Diaspora por padrão';
+$a->strings['Save Settings'] = 'Salvar Configurações';
+$a->strings['Diaspora post failed. Queued for retry.'] = 'Falha ao publicar na Diaspora. Na fila para tentar novamente.';
diff --git a/diaspora/lang/ro/strings.php b/diaspora/lang/ro/strings.php
index 3173251c..16a86dfa 100644
--- a/diaspora/lang/ro/strings.php
+++ b/diaspora/lang/ro/strings.php
@@ -3,16 +3,14 @@
if(! function_exists("string_plural_select_ro")) {
function string_plural_select_ro($n){
$n = intval($n);
- return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
+ if ($n==1) { return 0; } else if ((($n%100>19)||(($n%100==0)&&($n!=0)))) { return 2; } else { return 1; }
}}
-;
-$a->strings["Post to Diaspora"] = "Postați pe Diaspora";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Nu se poate face autentificarea pe contul dvs. Diaspora. Verificați numele de utilizator şi parola şi asigurați-vă că ați folosit adresa completă (inclusiv http ... )";
-$a->strings["Diaspora Export"] = "Exportare pe Diaspora ";
-$a->strings["Enable Diaspora Post Addon"] = "";
-$a->strings["Diaspora username"] = "Utilizator Diaspora";
-$a->strings["Diaspora password"] = "Parola Diaspora";
-$a->strings["Diaspora site URL"] = "URL site Diaspora";
-$a->strings["Post to Diaspora by default"] = "Postați implicit pe Diaspora";
-$a->strings["Save Settings"] = "Salvare Configurări";
-$a->strings["Diaspora post failed. Queued for retry."] = "Postarea pe Diaspora a eșuat. S-a pus în așteptare pentru reîncercare.";
+$a->strings['Post to Diaspora'] = 'Postați pe Diaspora';
+$a->strings['Can\'t login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)'] = 'Nu se poate face autentificarea pe contul dvs. Diaspora. Verificați numele de utilizator şi parola şi asigurați-vă că ați folosit adresa completă (inclusiv http ... )';
+$a->strings['Diaspora Export'] = 'Exportare pe Diaspora ';
+$a->strings['Diaspora username'] = 'Utilizator Diaspora';
+$a->strings['Diaspora password'] = 'Parola Diaspora';
+$a->strings['Diaspora site URL'] = 'URL site Diaspora';
+$a->strings['Post to Diaspora by default'] = 'Postați implicit pe Diaspora';
+$a->strings['Save Settings'] = 'Salvare Configurări';
+$a->strings['Diaspora post failed. Queued for retry.'] = 'Postarea pe Diaspora a eșuat. S-a pus în așteptare pentru reîncercare.';
diff --git a/diaspora/lang/ru/messages.po b/diaspora/lang/ru/messages.po
index 34a8c323..3c064fa1 100644
--- a/diaspora/lang/ru/messages.po
+++ b/diaspora/lang/ru/messages.po
@@ -4,14 +4,15 @@
#
#
# Translators:
+# Alexander An , 2020
# Stanislav N. , 2017-2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-06-22 13:18+0200\n"
-"PO-Revision-Date: 2018-05-25 00:01+0000\n"
-"Last-Translator: Stanislav N. \n"
+"POT-Creation-Date: 2020-05-07 00:15-0400\n"
+"PO-Revision-Date: 2020-10-09 19:03+0000\n"
+"Last-Translator: Alexander An \n"
"Language-Team: Russian (http://www.transifex.com/Friendica/friendica/language/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,44 +20,96 @@ msgstr ""
"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"
-#: diaspora.php:37
+#: diaspora.php:53
msgid "Post to Diaspora"
msgstr "Отправить в Diaspora"
-#: diaspora.php:142
+#: diaspora.php:78
+#, php-format
msgid ""
-"Can't login to your Diaspora account. Please check username and password and"
-" ensure you used the complete address (including http...)"
-msgstr "Невозможно войти в вашу учетную запись Diaspora. Пожалуйста, проверьте имя пользователя, пароль и убедитесь, что вы ввели полный адрес пода (включая http/https)"
+"Please remember: You can always be reached from Diaspora with your Friendica"
+" handle %s. "
+msgstr "Помните: с вами всегда можно связаться из сети Diaspora по вашему адресу Friendica %s."
-#: diaspora.php:149 diaspora.php:153
+#: diaspora.php:79
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
+msgstr "Этот коннектор предназначен только для тех случаев, когда вы хотите использовать вашу старую учётную запись в Diaspora в течение какого-то времени."
+
+#: diaspora.php:80
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle"
+" %s instead."
+msgstr "Но будет лучше, если вы просто предложите вашим контактам в Diaspora использовать ваш новый адрес %s."
+
+#: diaspora.php:90
+msgid "All aspects"
+msgstr "Все контакты"
+
+#: diaspora.php:91
+msgid "Public"
+msgstr "Публично"
+
+#: diaspora.php:97
+msgid "Post to aspect:"
+msgstr "Для группы:"
+
+#: diaspora.php:98
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr "Соединено с вашей учётной записью Diaspora %s"
+
+#: diaspora.php:101
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr "Не получается зайти в вашу учётную запись Diaspora. Пожалуйста, проверьте правильность имени (в формате user@domain.tld) и пароль."
+
+#: diaspora.php:109
msgid "Diaspora Export"
msgstr "Экспорт в Diaspora"
-#: diaspora.php:163
-msgid "Enable Diaspora Post Addon"
-msgstr "Включить аддон Diaspora Post"
+#: diaspora.php:110
+msgid "Information"
+msgstr "Информация"
-#: diaspora.php:168
-msgid "Diaspora username"
-msgstr "Имя пользователя Diaspora"
+#: diaspora.php:111
+msgid "Error"
+msgstr "Ошибка"
-#: diaspora.php:173
-msgid "Diaspora password"
-msgstr "Пароль Diaspora"
-
-#: diaspora.php:178
-msgid "Diaspora site URL"
-msgstr "URL пода Diaspora"
-
-#: diaspora.php:183
-msgid "Post to Diaspora by default"
-msgstr "Отправлять в Diaspora по умолчанию"
-
-#: diaspora.php:189
+#: diaspora.php:112
msgid "Save Settings"
msgstr "Сохранить настройки"
-#: diaspora.php:324
-msgid "Diaspora post failed. Queued for retry."
-msgstr "Ошибка отправки сообщения в Diaspora. В очереди на еще одну попытку."
+#: diaspora.php:116
+msgid "Enable Diaspora Post Addon"
+msgstr "Включить аддон Diaspora Post"
+
+#: diaspora.php:117
+msgid "Diaspora handle"
+msgstr "Имя в Diaspora"
+
+#: diaspora.php:118
+msgid "Diaspora password"
+msgstr "Пароль Diaspora"
+
+#: diaspora.php:118
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
+msgstr "Предупреждение: Ваш пароль для Diaspora будет сохранён в открытом виде, чтобы производить вход в ваш сервер Diaspora. Это означает, что администратор этого узла Friendica может получить к нему доступ."
+
+#: diaspora.php:120
+msgid "Post to Diaspora by default"
+msgstr "Отправлять в Diaspora по умолчанию"
+
+#: diaspora.php:138
+msgid "Diaspora settings updated."
+msgstr "Настройки Diaspora обновлены."
+
+#: diaspora.php:141
+msgid "Diaspora connector disabled."
+msgstr "Коннектор Diaspora отключён."
diff --git a/diaspora/lang/ru/strings.php b/diaspora/lang/ru/strings.php
index c414f622..cfdbde20 100644
--- a/diaspora/lang/ru/strings.php
+++ b/diaspora/lang/ru/strings.php
@@ -3,16 +3,25 @@
if(! function_exists("string_plural_select_ru")) {
function string_plural_select_ru($n){
$n = intval($n);
- return ($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);;
+ if ($n%10==1 && $n%100!=11) { return 0; } else if ($n%10>=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["Post to Diaspora"] = "Отправить в Diaspora";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Невозможно войти в вашу учетную запись Diaspora. Пожалуйста, проверьте имя пользователя, пароль и убедитесь, что вы ввели полный адрес пода (включая http/https)";
-$a->strings["Diaspora Export"] = "Экспорт в Diaspora";
-$a->strings["Enable Diaspora Post Addon"] = "Включить аддон Diaspora Post";
-$a->strings["Diaspora username"] = "Имя пользователя Diaspora";
-$a->strings["Diaspora password"] = "Пароль Diaspora";
-$a->strings["Diaspora site URL"] = "URL пода Diaspora";
-$a->strings["Post to Diaspora by default"] = "Отправлять в Diaspora по умолчанию";
-$a->strings["Save Settings"] = "Сохранить настройки";
-$a->strings["Diaspora post failed. Queued for retry."] = "Ошибка отправки сообщения в Diaspora. В очереди на еще одну попытку.";
+$a->strings['Post to Diaspora'] = 'Отправить в Diaspora';
+$a->strings['Please remember: You can always be reached from Diaspora with your Friendica handle %s. '] = 'Помните: с вами всегда можно связаться из сети Diaspora по вашему адресу Friendica %s.';
+$a->strings['This connector is only meant if you still want to use your old Diaspora account for some time. '] = 'Этот коннектор предназначен только для тех случаев, когда вы хотите использовать вашу старую учётную запись в Diaspora в течение какого-то времени.';
+$a->strings['However, it is preferred that you tell your Diaspora contacts the new handle %s instead.'] = 'Но будет лучше, если вы просто предложите вашим контактам в Diaspora использовать ваш новый адрес %s.';
+$a->strings['All aspects'] = 'Все контакты';
+$a->strings['Public'] = 'Публично';
+$a->strings['Post to aspect:'] = 'Для группы:';
+$a->strings['Connected with your Diaspora account %s'] = 'Соединено с вашей учётной записью Diaspora %s';
+$a->strings['Can\'t login to your Diaspora account. Please check handle (in the format user@domain.tld) and password.'] = 'Не получается зайти в вашу учётную запись Diaspora. Пожалуйста, проверьте правильность имени (в формате user@domain.tld) и пароль.';
+$a->strings['Diaspora Export'] = 'Экспорт в Diaspora';
+$a->strings['Information'] = 'Информация';
+$a->strings['Error'] = 'Ошибка';
+$a->strings['Save Settings'] = 'Сохранить настройки';
+$a->strings['Enable Diaspora Post Addon'] = 'Включить аддон Diaspora Post';
+$a->strings['Diaspora handle'] = 'Имя в Diaspora';
+$a->strings['Diaspora password'] = 'Пароль Diaspora';
+$a->strings['Privacy notice: Your Diaspora password will be stored unencrypted to authenticate you with your Diaspora pod. This means your Friendica node administrator can have access to it.'] = 'Предупреждение: Ваш пароль для Diaspora будет сохранён в открытом виде, чтобы производить вход в ваш сервер Diaspora. Это означает, что администратор этого узла Friendica может получить к нему доступ.';
+$a->strings['Post to Diaspora by default'] = 'Отправлять в Diaspora по умолчанию';
+$a->strings['Diaspora settings updated.'] = 'Настройки Diaspora обновлены.';
+$a->strings['Diaspora connector disabled.'] = 'Коннектор Diaspora отключён.';
diff --git a/diaspora/lang/sv/messages.po b/diaspora/lang/sv/messages.po
new file mode 100644
index 00000000..b23149c9
--- /dev/null
+++ b/diaspora/lang/sv/messages.po
@@ -0,0 +1,102 @@
+# ADDON diaspora
+# Copyright (C)
+# This file is distributed under the same license as the Friendica diaspora addon package.
+#
+#
+# Translators:
+# Kristoffer Grundström , 2022
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: 2022-01-15 23:38+0000\n"
+"Last-Translator: Kristoffer Grundström \n"
+"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/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"
+
+#: diaspora.php:44
+msgid "Post to Diaspora"
+msgstr ""
+
+#: diaspora.php:67
+#, php-format
+msgid ""
+"Please remember: You can always be reached from Diaspora with your Friendica"
+" handle %s. "
+msgstr ""
+
+#: diaspora.php:68
+msgid ""
+"This connector is only meant if you still want to use your old Diaspora "
+"account for some time. "
+msgstr ""
+
+#: diaspora.php:69
+#, php-format
+msgid ""
+"However, it is preferred that you tell your Diaspora contacts the new handle"
+" %s instead."
+msgstr ""
+
+#: diaspora.php:79
+msgid "All aspects"
+msgstr ""
+
+#: diaspora.php:80
+msgid "Public"
+msgstr ""
+
+#: diaspora.php:86
+msgid "Post to aspect:"
+msgstr ""
+
+#: diaspora.php:87
+#, php-format
+msgid "Connected with your Diaspora account %s"
+msgstr ""
+
+#: diaspora.php:90
+msgid ""
+"Can't login to your Diaspora account. Please check handle (in the format "
+"user@domain.tld) and password."
+msgstr ""
+
+#: diaspora.php:97
+msgid "Information"
+msgstr ""
+
+#: diaspora.php:98
+msgid "Error"
+msgstr ""
+
+#: diaspora.php:104
+msgid "Enable Diaspora Post Addon"
+msgstr ""
+
+#: diaspora.php:105
+msgid "Diaspora handle"
+msgstr ""
+
+#: diaspora.php:106
+msgid "Diaspora password"
+msgstr "Lösenord för Diaspora"
+
+#: diaspora.php:106
+msgid ""
+"Privacy notice: Your Diaspora password will be stored unencrypted to "
+"authenticate you with your Diaspora pod. This means your Friendica node "
+"administrator can have access to it."
+msgstr ""
+
+#: diaspora.php:108
+msgid "Post to Diaspora by default"
+msgstr ""
+
+#: diaspora.php:113
+msgid "Diaspora Export"
+msgstr ""
diff --git a/diaspora/lang/sv/strings.php b/diaspora/lang/sv/strings.php
new file mode 100644
index 00000000..0a2ccf31
--- /dev/null
+++ b/diaspora/lang/sv/strings.php
@@ -0,0 +1,8 @@
+strings['Diaspora password'] = 'Lösenord för Diaspora';
diff --git a/diaspora/lang/zh-cn/strings.php b/diaspora/lang/zh-cn/strings.php
index 307a634f..060506e2 100644
--- a/diaspora/lang/zh-cn/strings.php
+++ b/diaspora/lang/zh-cn/strings.php
@@ -2,16 +2,16 @@
if(! function_exists("string_plural_select_zh_cn")) {
function string_plural_select_zh_cn($n){
- return 0;;
+ $n = intval($n);
+ return intval(0);
}}
-;
-$a->strings["Post to Diaspora"] = "发到 Diaspora";
-$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "无法登录到你的 Diaspora 账户。请检查用户名和密码并确保你用了完整的地址(包括http...)";
-$a->strings["Diaspora Export"] = "Diaspora 导出";
-$a->strings["Enable Diaspora Post Addon"] = "启用 Diaspora 发文插件";
-$a->strings["Diaspora username"] = "Diaspora 用户名";
-$a->strings["Diaspora password"] = "Diaspora 密码";
-$a->strings["Diaspora site URL"] = "Diaspora 站点 URL";
-$a->strings["Post to Diaspora by default"] = "默认发文到 Diaspora";
-$a->strings["Save Settings"] = "保存设置";
-$a->strings["Diaspora post failed. Queued for retry."] = "Diaspora 发文失败。已经放入队列以重试。";
+$a->strings['Post to Diaspora'] = '发到 Diaspora';
+$a->strings['Can\'t login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)'] = '无法登录到你的 Diaspora 账户。请检查用户名和密码并确保你用了完整的地址(包括http...)';
+$a->strings['Diaspora Export'] = 'Diaspora 导出';
+$a->strings['Enable Diaspora Post Addon'] = '启用 Diaspora 发文插件';
+$a->strings['Diaspora username'] = 'Diaspora 用户名';
+$a->strings['Diaspora password'] = 'Diaspora 密码';
+$a->strings['Diaspora site URL'] = 'Diaspora 站点 URL';
+$a->strings['Post to Diaspora by default'] = '默认发文到 Diaspora';
+$a->strings['Save Settings'] = '保存设置';
+$a->strings['Diaspora post failed. Queued for retry.'] = 'Diaspora 发文失败。已经放入队列以重试。';
diff --git a/diaspora/templates/connector_settings.tpl b/diaspora/templates/connector_settings.tpl
new file mode 100644
index 00000000..9f8e270e
--- /dev/null
+++ b/diaspora/templates/connector_settings.tpl
@@ -0,0 +1,32 @@
+{{if $info}}
+
+
+
{{$l10n.info_header}}
+
+
+ {{$info nofilter}}
+
+
+{{/if}}
+{{if $error}}
+
+
+
{{$l10n.error_header}}
+
+
+ {{$error nofilter}}
+
+
+{{/if}}
+
+ {{include file="field_checkbox.tpl" field=$enabled}}
+
+{{if $aspect_select}}
+ {{include file="field_select.tpl" field=$aspect_select}}
+
+ {{include file="field_checkbox.tpl" field=$post_by_default}}
+{{else}}
+ {{include file="field_input.tpl" field=$handle}}
+
+ {{include file="field_password.tpl" field=$password}}
+{{/if}}
diff --git a/discourse/README b/discourse/README
new file mode 100644
index 00000000..338b10bf
--- /dev/null
+++ b/discourse/README
@@ -0,0 +1,28 @@
+Discourse connector
+===================
+
+The Discourse connectors detects incoming mails from Discourse and
+improves them by fetching the content and user data via API.
+
+Prerequisites
+-------------
+The user has to configure the mail interface so that the user's mails
+can be fetched via Friendica. Then the user has to activate the
+mailing list mode in Discourse.
+
+The mailing list mode in Discourse knows two different options:
+1. Get all posts - including your own. This will create duplicates
+ if you post via Friendica.
+2. Don't get your own posts. Then you will missing all your posts
+ that you made directly on Discourse. Since you cannot create
+ a new post via this connector (only comments are possible)
+ this is not a good choice either.
+
+Known problems
+--------------
+- You can't create starting posts
+- Either you don't get your own posts you made directly on Discourse
+ or you do get duplicates for every post you made via Friendica.
+- Non public categories are currently only working via some workaround
+ without the API, which most likely will cause some content problems.
+- links to Discourse profiles in the posts are invalid.
diff --git a/discourse/discourse.php b/discourse/discourse.php
new file mode 100644
index 00000000..3d27c5b0
--- /dev/null
+++ b/discourse/discourse.php
@@ -0,0 +1,343 @@
+
+ *
+ */
+
+use Friendica\App;
+use Friendica\Content\Text\Markdown;
+use Friendica\Core\Hook;
+use Friendica\Core\Logger;
+use Friendica\Core\Protocol;
+use Friendica\Core\Renderer;
+use Friendica\Database\DBA;
+use Friendica\DI;
+use Friendica\Model\Contact;
+use Friendica\Util\DateTimeFormat;
+use Friendica\Util\Strings;
+
+/* Todo:
+ * - Obtaining API tokens to be able to read non public posts as well
+ * - Handling duplicates (possibly using some non visible marker)
+ * - Fetching missing posts
+ * - Fetch topic information
+ * - Support mail free mode when write tokens are available
+ * - Fix incomplete (relative) links (hosts are missing)
+*/
+
+function discourse_install()
+{
+ Hook::register('email_getmessage', __FILE__, 'discourse_email_getmessage');
+ Hook::register('connector_settings', __FILE__, 'discourse_settings');
+ Hook::register('connector_settings_post', __FILE__, 'discourse_settings_post');
+}
+
+function discourse_settings(array &$data)
+{
+ if (!DI::userSession()->getLocalUserId()) {
+ return;
+ }
+
+ $enabled = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'discourse', 'enabled'));
+
+ $t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/discourse/');
+ $html = Renderer::replaceMacros($t, [
+ '$enabled' => ['enabled', DI::l10n()->t('Enable processing of Discourse mailing list mails'), $enabled, DI::l10n()->t('If enabled, incoming mails from Discourse will be improved so they look much better. To make it work, you have to configure the e-mail settings in Friendica. You also have to enable the mailing list mode in Discourse. Then you have to add the Discourse mail account as contact.')],
+ ]);
+
+ $data = [
+ 'connector' => 'discourse',
+ 'title' => DI::l10n()->t('Discourse'),
+ 'image' => 'images/discourse.png',
+ 'enabled' => $enabled,
+ 'html' => $html,
+ ];
+}
+
+function discourse_settings_post()
+{
+ if (!DI::userSession()->getLocalUserId() || empty($_POST['discourse-submit'])) {
+ return;
+ }
+
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'discourse', 'enabled', intval($_POST['enabled']));
+}
+
+function discourse_email_getmessage(&$message)
+{
+ if (empty($message['item']['uid'])) {
+ return;
+ }
+
+ if (!DI::pConfig()->get($message['item']['uid'], 'discourse', 'enabled')) {
+ return;
+ }
+
+ // We do assume that all Discourse servers are running with SSL
+ if (preg_match('=topic/(.*\d)/(.*\d)@(.*)=', $message['item']['uri'], $matches) &&
+ discourse_fetch_post_from_api($message, $matches[2], $matches[3])) {
+ Logger::info('Fetched comment via API (message-id mode)', ['host' => $matches[3], 'topic' => $matches[1], 'post' => $matches[2]]);
+ return;
+ }
+
+ if (preg_match('=topic/(.*\d)@(.*)=', $message['item']['uri'], $matches) &&
+ discourse_fetch_topic_from_api($message, 'https://' . $matches[2], $matches[1], 1)) {
+ Logger::info('Fetched starting post via API (message-id mode)', ['host' => $matches[2], 'topic' => $matches[1]]);
+ return;
+ }
+
+ // Search in the text part for the link to the discourse entry and the text body
+ if (!empty($message['text'])) {
+ $message = discourse_get_text($message);
+ }
+
+ if (empty($message['item']['plink']) || !preg_match('=(http.*)/t/.*/(.*\d)/(.*\d)=', $message['item']['plink'], $matches)) {
+ Logger::info('This is no Discourse post');
+ return;
+ }
+
+ if (discourse_fetch_topic_from_api($message, $matches[1], $matches[2], $matches[3])) {
+ Logger::info('Fetched post via API (plink mode)', ['host' => $matches[1], 'topic' => $matches[2], 'id' => $matches[3]]);
+ return;
+ }
+
+ Logger::info('Fallback mode', ['plink' => $message['item']['plink']]);
+ // Search in the HTML part for the discourse entry and the author profile
+ if (!empty($message['html'])) {
+ $message = discourse_get_html($message);
+ }
+
+ // Remove the title on comments, they don't serve any purpose there
+ if ($message['item']['thr-parent'] != $message['item']['uri']) {
+ unset($message['item']['title']);
+ }
+}
+
+function discourse_fetch_post($host, $topic, $pid)
+{
+ $url = $host . '/t/' . $topic . '/' . $pid . '.json';
+ $curlResult = DI::httpClient()->get($url);
+ if (!$curlResult->isSuccess()) {
+ Logger::info('No success', ['url' => $url]);
+ return false;
+ }
+
+ $raw = $curlResult->getBody();
+ $data = json_decode($raw, true);
+ $posts = $data['post_stream']['posts'];
+ foreach($posts as $post) {
+ if ($post['post_number'] != $pid) {
+ /// @todo Possibly fetch missing posts here
+ continue;
+ }
+ Logger::info('Got post data from topic', $post);
+ return $post;
+ }
+
+ Logger::info('Post not found', ['host' => $host, 'topic' => $topic, 'pid' => $pid]);
+ return false;
+}
+
+function discourse_fetch_topic_from_api(&$message, $host, $topic, $pid)
+{
+ $post = discourse_fetch_post($host, $topic, $pid);
+ if (empty($post)) {
+ return false;
+ }
+
+ $message = discourse_process_post($message, $post, $host);
+ return true;
+}
+
+function discourse_fetch_post_from_api(&$message, $post, $host)
+{
+ $hostaddr = 'https://' . $host;
+ $url = $hostaddr . '/posts/' . $post . '.json';
+ $curlResult = DI::httpClient()->get($url);
+ if (!$curlResult->isSuccess()) {
+ return false;
+ }
+
+ $raw = $curlResult->getBody();
+ $data = json_decode($raw, true);
+ if (empty($data)) {
+ return false;
+ }
+
+ $message = discourse_process_post($message, $data, $hostaddr);
+
+ Logger::info('Got API data', $message);
+ return true;
+}
+
+function discourse_get_user($post, $hostaddr)
+{
+ $host = parse_url($hostaddr, PHP_URL_HOST);
+
+ // Currently unused contact fields:
+ // - display_username
+ // - user_id
+
+ $contact = [];
+ $contact['uid'] = 0;
+ $contact['network'] = Protocol::DISCOURSE;
+ $contact['name'] = $contact['nick'] = $post['username'];
+ if (!empty($post['name'])) {
+ $contact['name'] = $post['name'];
+ }
+
+ $contact['about'] = $post['user_title'];
+
+ if (parse_url($post['avatar_template'], PHP_URL_SCHEME)) {
+ $contact['photo'] = str_replace('{size}', '300', $post['avatar_template']);
+ } else {
+ $contact['photo'] = $hostaddr . str_replace('{size}', '300', $post['avatar_template']);
+ }
+
+ $contact['addr'] = $contact['nick'] . '@' . $host;
+ $contact['contact-type'] = Contact::TYPE_PERSON;
+ $contact['url'] = $hostaddr . '/u/' . $contact['nick'];
+ $contact['nurl'] = Strings::normaliseLink($contact['url']);
+ $contact['baseurl'] = $hostaddr;
+ Logger::info('Contact', $contact);
+ $contact['id'] = Contact::getIdForURL($contact['url'], 0, false, $contact);
+ if (!empty($contact['id'])) {
+ $avatar = $contact['photo'];
+ unset($contact['photo']);
+ DBA::update('contact', $contact, ['id' => $contact['id']]);
+ Contact::updateAvatar($contact['id'], $avatar);
+ $contact['photo'] = $avatar;
+ }
+
+ return $contact;
+}
+
+function discourse_process_post($message, $post, $hostaddr)
+{
+ $host = parse_url($hostaddr, PHP_URL_HOST);
+
+ $message['html'] = $post['cooked'];
+
+ $contact = discourse_get_user($post, $hostaddr);
+ $message['item']['author-id'] = $contact['id'];
+ $message['item']['author-link'] = $contact['url'];
+ $message['item']['author-name'] = $contact['name'];
+ $message['item']['author-avatar'] = $contact['photo'];
+ $message['item']['created'] = DateTimeFormat::utc($post['created_at']);
+ $message['item']['plink'] = $hostaddr . '/t/' . $post['topic_slug'] . '/' . $post['topic_id'] . '/' . $post['post_number'];
+
+ if ($post['post_number'] == 1) {
+ $message['item']['parent-uri'] = $message['item']['uri'] = 'topic/' . $post['topic_id'] . '@' . $host;
+
+ // Remove the Discourse forum name from the subject
+ $pattern = '=\[.*\].*\s(\[.*\].*)=';
+ if (preg_match($pattern, $message['item']['title'])) {
+ $message['item']['title'] = preg_replace($pattern, '$1', $message['item']['title']);
+ }
+ /// @ToDo Fetch thread information
+ } else {
+ $message['item']['uri'] = 'topic/' . $post['topic_id'] . '/' . $post['id'] . '@' . $host;
+ unset($message['item']['title']);
+ if (empty($post['reply_to_post_number']) || $post['reply_to_post_number'] == 1) {
+ $message['item']['parent-uri'] = 'topic/' . $post['topic_id'] . '@' . $host;
+ } else {
+ $reply = discourse_fetch_post($hostaddr, $post['topic_id'], $post['reply_to_post_number']);
+ $message['item']['parent-uri'] = 'topic/' . $post['topic_id'] . '/' . $reply['id'] . '@' . $host;
+ }
+ }
+
+ return $message;
+}
+
+function discourse_get_html($message)
+{
+ $doc = new DOMDocument();
+ $doc2 = new DOMDocument();
+ $doc->preserveWhiteSpace = false;
+
+ $html = mb_convert_encoding($message['html'], 'HTML-ENTITIES', "UTF-8");
+ @$doc->loadHTML($html, LIBXML_HTML_NODEFDTD);
+
+ $xpath = new DomXPath($doc);
+
+ // Fetch the first 'div' before the 'hr' - hopefully this fits for all systems
+ $result = $xpath->query("//hr//preceding::div[1]");
+ $div = $doc2->importNode($result->item(0), true);
+ $doc2->appendChild($div);
+ $message['html'] = $doc2->saveHTML();
+ Logger::info('Found html body', ['html' => $message['html']]);
+
+ $profile = discourse_get_profile($xpath);
+ if (!empty($profile['url'])) {
+ Logger::info('Found profile', $profile);
+ $message['item']['author-id'] = Contact::getIdForURL($profile['url'], 0, false, $profile);
+ $message['item']['author-link'] = $profile['url'];
+ $message['item']['author-name'] = $profile['name'];
+ $message['item']['author-avatar'] = $profile['photo'];
+ }
+
+ return $message;
+}
+
+function discourse_get_text($message)
+{
+ $text = $message['text'];
+ $text = str_replace("\r", '', $text);
+ $pos = strpos($text, "\n---\n");
+ if ($pos == 0) {
+ Logger::info('No separator found', ['text' => $text]);
+ return $message;
+ }
+
+ $message['text'] = trim(substr($text, 0, $pos));
+
+ Logger::info('Found text body', ['text' => $message['text']]);
+
+ $message['text'] = Markdown::toBBCode($message['text']);
+
+ $text = substr($text, $pos);
+ Logger::info('Found footer', ['text' => $text]);
+ if (preg_match('=\((http.*/t/.*/.*\d/.*\d)\)=', $text, $link)) {
+ $message['item']['plink'] = $link[1];
+ Logger::info('Found plink', ['plink' => $message['item']['plink']]);
+ }
+ return $message;
+}
+
+function discourse_get_profile($xpath)
+{
+ $profile = [];
+ $list = $xpath->query("//td//following::img");
+ foreach ($list as $node) {
+ $attr = [];
+ foreach ($node->attributes as $attribute) {
+ $attr[$attribute->name] = $attribute->value;
+ }
+
+ if (!empty($attr['src']) && !empty($attr['title'])
+ && !empty($attr['width']) && !empty($attr['height'])
+ && ($attr['width'] == $attr['height'])) {
+ $profile = ['photo' => $attr['src'], 'name' => $attr['title']];
+ break;
+ }
+ }
+
+ $list = $xpath->query("//td//following::a");
+ foreach ($list as $node) {
+ if (!empty(trim($node->textContent)) && $node->attributes->length) {
+ $attr = [];
+ foreach ($node->attributes as $attribute) {
+ $attr[$attribute->name] = $attribute->value;
+ }
+ if (!empty($attr['href']) && (strpos($attr['href'], '/' . $profile['name']))) {
+ $profile['url'] = $attr['href'];
+ break;
+ }
+ }
+ }
+ return $profile;
+}
diff --git a/discourse/lang/C/messages.po b/discourse/lang/C/messages.po
new file mode 100644
index 00000000..ba0809ee
--- /dev/null
+++ b/discourse/lang/C/messages.po
@@ -0,0 +1,34 @@
+# ADDON discourse
+# Copyright (C)
+# This file is distributed under the same license as the Friendica discourse addon package.
+#
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: discourse.php:49
+msgid "Enable processing of Discourse mailing list mails"
+msgstr ""
+
+#: discourse.php:49
+msgid ""
+"If enabled, incoming mails from Discourse will be improved so they look much "
+"better. To make it work, you have to configure the e-mail settings in "
+"Friendica. You also have to enable the mailing list mode in Discourse. Then "
+"you have to add the Discourse mail account as contact."
+msgstr ""
+
+#: discourse.php:54
+msgid "Discourse"
+msgstr ""
diff --git a/discourse/templates/connector_settings.tpl b/discourse/templates/connector_settings.tpl
new file mode 100644
index 00000000..2f3f4ce7
--- /dev/null
+++ b/discourse/templates/connector_settings.tpl
@@ -0,0 +1 @@
+{{include file="field_checkbox.tpl" field=$enabled}}
diff --git a/dwpost/dwpost.css b/dwpost/dwpost.css
deleted file mode 100644
index 3b0ee32a..00000000
--- a/dwpost/dwpost.css
+++ /dev/null
@@ -1,15 +0,0 @@
-
-#dwpost-enable-label, #dwpost-username-label, #dwpost-password-label, #dwpost-bydefault-label {
-float: left;
-width: 200px;
-margin-top: 10px;
-}
-
-#dwpost-checkbox, #dwpost-username, #dwpost-password, #dwpost-bydefault {
-float: left;
-margin-top: 10px;
-}
-
-#dwpost-submit {
-margin-top: 15px;
-}
diff --git a/dwpost/dwpost.php b/dwpost/dwpost.php
index ebba0232..6c1742e4 100644
--- a/dwpost/dwpost.php
+++ b/dwpost/dwpost.php
@@ -11,12 +11,13 @@
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Hook;
-use Friendica\Core\L10n;
use Friendica\Core\Logger;
-use Friendica\Core\PConfig;
-use Friendica\Database\DBA;
+use Friendica\Core\Renderer;
+use Friendica\DI;
+use Friendica\Model\Post;
+use Friendica\Model\Tag;
+use Friendica\Model\User;
use Friendica\Util\DateTimeFormat;
-use Friendica\Util\Network;
use Friendica\Util\XML;
function dwpost_install()
@@ -28,107 +29,71 @@ function dwpost_install()
Hook::register('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
}
-function dwpost_uninstall()
+function dwpost_jot_nets(array &$jotnets_fields)
{
- Hook::unregister('post_local', 'addon/dwpost/dwpost.php', 'dwpost_post_local');
- Hook::unregister('notifier_normal', 'addon/dwpost/dwpost.php', 'dwpost_send');
- Hook::unregister('jot_networks', 'addon/dwpost/dwpost.php', 'dwpost_jot_nets');
- Hook::unregister('connector_settings', 'addon/dwpost/dwpost.php', 'dwpost_settings');
- Hook::unregister('connector_settings_post', 'addon/dwpost/dwpost.php', 'dwpost_settings_post');
-}
-
-function dwpost_jot_nets(App $a, array &$jotnets_fields)
-{
- if (!local_user()) {
+ if (!DI::userSession()->getLocalUserId()) {
return;
}
- if (PConfig::get(local_user(), 'dwpost', 'post')) {
+ if (DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'dwpost', 'post')) {
$jotnets_fields[] = [
'type' => 'checkbox',
'field' => [
'dwpost_enable',
- L10n::t('Post to Dreamwidth'),
- PConfig::get(local_user(), 'dwpost', 'post_by_default')
+ DI::l10n()->t('Post to Dreamwidth'),
+ DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'dwpost', 'post_by_default')
]
];
}
}
-function dwpost_settings(App $a, &$s)
+function dwpost_settings(array &$data)
{
- if (!local_user()) {
+ if (!DI::userSession()->getLocalUserId()) {
return;
}
- /* Add our stylesheet to the page so we can make our settings look nice */
- $a->page['htmlhead'] .= '' . "\r\n";
+ $enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'dwpost', 'post', false);
+ $dw_username = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'dwpost', 'dw_username');
+ $def_enabled = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'dwpost', 'post_by_default');
- /* Get the current state of our config variables */
- $enabled = PConfig::get(local_user(), 'dwpost', 'post');
+ $t = Renderer::getMarkupTemplate('connector_settings.tpl', 'addon/dwpost/');
+ $html = Renderer::replaceMacros($t, [
+ '$enabled' => ['dwpost', DI::l10n()->t('Enable Dreamwidth Post Addon'), $enabled],
+ '$username' => ['dw_username', DI::l10n()->t('Dreamwidth username'), $dw_username],
+ '$password' => ['dw_password', DI::l10n()->t('Dreamwidth password')],
+ '$bydefault' => ['dw_bydefault', DI::l10n()->t('Post to Dreamwidth by default'), $def_enabled],
+ ]);
- $checked = (($enabled) ? ' checked="checked" ' : '');
-
- $def_enabled = PConfig::get(local_user(), 'dwpost', 'post_by_default');
-
- $def_checked = (($def_enabled) ? ' checked="checked" ' : '');
-
- $dw_username = PConfig::get(local_user(), 'dwpost', 'dw_username');
- $dw_password = PConfig::get(local_user(), 'dwpost', 'dw_password');
-
- /* Add some HTML to the existing form */
- $s .= '';
- $s .= '
'. L10n::t("Dreamwidth Export").'
';
- $s .= '';
- $s .= '
';
- $s .= '';
- $s .= '
'. L10n::t("Dreamwidth Export").'
';
- $s .= '';
-
- $s .= '
';
- $s .= '';
- $s .= '';
- $s .= '
';
-
- $s .= '
';
- $s .= '';
- $s .= '';
- $s .= '
';
-
- $s .= '
';
- $s .= '';
- $s .= '';
- $s .= '
';
-
- $s .= '
';
- $s .= '';
- $s .= '';
- $s .= '
';
-
- /* provide a submit button */
- $s .= '
';
+ $data = [
+ 'connector' => 'dwpost',
+ 'title' => DI::l10n()->t('Dreamwidth Export'),
+ 'image' => 'images/dreamwidth.png',
+ 'enabled' => $enabled,
+ 'html' => $html,
+ ];
}
-function dwpost_settings_post(App $a, array &$b)
+function dwpost_settings_post(array &$b)
{
if (!empty($_POST['dwpost-submit'])) {
- PConfig::set(local_user(), 'dwpost', 'post', intval($_POST['dwpost']));
- PConfig::set(local_user(), 'dwpost', 'post_by_default', intval($_POST['dw_bydefault']));
- PConfig::set(local_user(), 'dwpost', 'dw_username', trim($_POST['dw_username']));
- PConfig::set(local_user(), 'dwpost', 'dw_password', trim($_POST['dw_password']));
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'dwpost', 'post', intval($_POST['dwpost']));
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'dwpost', 'post_by_default', intval($_POST['dw_bydefault']));
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'dwpost', 'dw_username', trim($_POST['dw_username']));
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'dwpost', 'dw_password', trim($_POST['dw_password']));
}
}
-function dwpost_post_local(App $a, array &$b)
+function dwpost_post_local(array &$b)
{
// This can probably be changed to allow editing by pointing to a different API endpoint
if ($b['edit']) {
return;
}
- if ((!local_user()) || (local_user() != $b['uid'])) {
+ if ((!DI::userSession()->getLocalUserId()) || (DI::userSession()->getLocalUserId() != $b['uid'])) {
return;
}
@@ -136,11 +101,11 @@ function dwpost_post_local(App $a, array &$b)
return;
}
- $dw_post = intval(PConfig::get(local_user(),'dwpost','post'));
+ $dw_post = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'dwpost','post'));
$dw_enable = (($dw_post && !empty($_REQUEST['dwpost_enable'])) ? intval($_REQUEST['dwpost_enable']) : 0);
- if ($b['api_source'] && intval(PConfig::get(local_user(),'dwpost','post_by_default'))) {
+ if ($b['api_source'] && intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'dwpost','post_by_default'))) {
$dw_enable = 1;
}
@@ -155,13 +120,13 @@ function dwpost_post_local(App $a, array &$b)
$b['postopts'] .= 'dwpost';
}
-function dwpost_send(App $a, array &$b)
+function dwpost_send(array &$b)
{
if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
return;
}
- if (!strstr($b['postopts'],'dwpost')) {
+ if (strpos($b['postopts'] ?? '', 'dwpost') === false) {
return;
}
@@ -169,30 +134,26 @@ function dwpost_send(App $a, array &$b)
return;
}
+ $b['body'] = Post\Media::addAttachmentsToBody($b['uri-id'], DI::contentItem()->addSharedPost($b));
+
/*
* dreamwidth post in the LJ user's timezone.
* Hopefully the person's Friendica account
* will be set to the same thing.
*/
- $tz = 'UTC';
- $x = q("SELECT `timezone` FROM `user` WHERE `uid` = %d LIMIT 1",
- intval($b['uid'])
- );
+ $user = User::getById($b['uid']);
+ $tz = $user['timezone'] ?: 'UTC';
- if (DBA::isResult($x) && !empty($x[0]['timezone'])) {
- $tz = $x[0]['timezone'];
- }
-
- $dw_username = PConfig::get($b['uid'],'dwpost','dw_username');
- $dw_password = PConfig::get($b['uid'],'dwpost','dw_password');
+ $dw_username = DI::pConfig()->get($b['uid'],'dwpost','dw_username');
+ $dw_password = DI::pConfig()->get($b['uid'],'dwpost','dw_password');
$dw_blog = 'http://www.dreamwidth.org/interface/xmlrpc';
if ($dw_username && $dw_password && $dw_blog) {
$title = $b['title'];
- $post = BBCode::convert($b['body']);
+ $post = BBCode::convertForUriId($b['uri-id'], $b['body'], BBCode::CONNECTORS);
$post = XML::escape($post);
- $tags = dwpost_get_tags($b['tag']);
+ $tags = Tag::getCSVByURIId($b['uri-id'], [Tag::HASHTAG]);
$date = DateTimeFormat::convert($b['created'], $tz);
$year = intval(substr($date,0,4));
@@ -228,21 +189,12 @@ function dwpost_send(App $a, array &$b)
EOT;
- Logger::log('dwpost: data: ' . $xml, Logger::DATA);
+ Logger::debug('dwpost: data: ' . $xml);
if ($dw_blog !== 'test') {
- $x = Network::post($dw_blog, $xml, ["Content-Type: text/xml"])->getBody();
+ $x = DI::httpClient()->post($dw_blog, $xml, ['Content-Type' => 'text/xml'])->getBody();
}
- Logger::log('posted to dreamwidth: ' . ($x) ? $x : '', Logger::DEBUG);
+ Logger::info('posted to dreamwidth: ' . ($x) ? $x : '');
}
}
-
-function dwpost_get_tags($post)
-{
- preg_match_all("/\]([^\[#]+)\[/", $post, $matches);
-
- $tags = implode(', ', $matches[1]);
-
- return $tags;
-}
diff --git a/dwpost/lang/C/messages.po b/dwpost/lang/C/messages.po
index c81e9f0f..0b27a70c 100644
--- a/dwpost/lang/C/messages.po
+++ b/dwpost/lang/C/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-27 05:01-0500\n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,30 +17,26 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: dwpost.php:39
+#: dwpost.php:43
msgid "Post to Dreamwidth"
msgstr ""
-#: dwpost.php:70
-msgid "Dreamwidth Post Settings"
+#: dwpost.php:63
+msgid "Enable Dreamwidth Post Addon"
msgstr ""
-#: dwpost.php:72
-msgid "Enable dreamwidth Post Addon"
+#: dwpost.php:64
+msgid "Dreamwidth username"
msgstr ""
-#: dwpost.php:77
-msgid "dreamwidth username"
+#: dwpost.php:65
+msgid "Dreamwidth password"
msgstr ""
-#: dwpost.php:82
-msgid "dreamwidth password"
+#: dwpost.php:66
+msgid "Post to Dreamwidth by default"
msgstr ""
-#: dwpost.php:87
-msgid "Post to dreamwidth by default"
-msgstr ""
-
-#: dwpost.php:93
-msgid "Submit"
+#: dwpost.php:71
+msgid "Dreamwidth Export"
msgstr ""
diff --git a/dwpost/lang/ar/messages.po b/dwpost/lang/ar/messages.po
new file mode 100644
index 00000000..12d05554
--- /dev/null
+++ b/dwpost/lang/ar/messages.po
@@ -0,0 +1,49 @@
+# ADDON dwpost
+# Copyright (C)
+# This file is distributed under the same license as the Friendica dwpost addon package.
+#
+#
+# Translators:
+# abidin toumi , 2021
+# Farida Khalaf , 2021
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-10-29 10:04+0000\n"
+"Last-Translator: abidin toumi \n"
+"Language-Team: Arabic (http://www.transifex.com/Friendica/friendica/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"
+
+#: dwpost.php:41
+msgid "Post to Dreamwidth"
+msgstr "انشر على دريمويدز"
+
+#: dwpost.php:72 dwpost.php:76
+msgid "Dreamwidth Export"
+msgstr " تصدير دريمويدز"
+
+#: dwpost.php:80
+msgid "Enable dreamwidth Post Addon"
+msgstr "فعل إضافة مشاركة دريمويدز "
+
+#: dwpost.php:85
+msgid "dreamwidth username"
+msgstr " اسم مستخدم دريمويدز"
+
+#: dwpost.php:90
+msgid "dreamwidth password"
+msgstr "كلمة مرور دريمويدز"
+
+#: dwpost.php:95
+msgid "Post to dreamwidth by default"
+msgstr " شارك على دريمويدز افتراضيا"
+
+#: dwpost.php:100
+msgid "Save Settings"
+msgstr "احفظ الإعدادات"
diff --git a/dwpost/lang/ar/strings.php b/dwpost/lang/ar/strings.php
new file mode 100644
index 00000000..ef2eb30c
--- /dev/null
+++ b/dwpost/lang/ar/strings.php
@@ -0,0 +1,14 @@
+=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; }
+}}
+$a->strings['Post to Dreamwidth'] = 'انشر على دريمويدز';
+$a->strings['Dreamwidth Export'] = ' تصدير دريمويدز';
+$a->strings['Enable dreamwidth Post Addon'] = 'فعل إضافة مشاركة دريمويدز ';
+$a->strings['dreamwidth username'] = ' اسم مستخدم دريمويدز';
+$a->strings['dreamwidth password'] = 'كلمة مرور دريمويدز';
+$a->strings['Post to dreamwidth by default'] = ' شارك على دريمويدز افتراضيا';
+$a->strings['Save Settings'] = 'احفظ الإعدادات';
diff --git a/dwpost/lang/ca/strings.php b/dwpost/lang/ca/strings.php
index cd5c1e1a..58d2bde9 100644
--- a/dwpost/lang/ca/strings.php
+++ b/dwpost/lang/ca/strings.php
@@ -3,13 +3,12 @@
if(! function_exists("string_plural_select_ca")) {
function string_plural_select_ca($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Dreamwidth"] = "Publica a Dreamwidth";
-$a->strings["Dreamwidth Post Settings"] = "Configuració de la publicació de Dreamwidth";
-$a->strings["Enable dreamwidth Post Addon"] = "Habilita Addon Post Post";
-$a->strings["dreamwidth username"] = "nom d'usuari de dreamwidth";
-$a->strings["dreamwidth password"] = "contrasenya de dreamwidth";
-$a->strings["Post to dreamwidth by default"] = "Publica l'amplada de somni de manera predeterminada";
-$a->strings["Submit"] = "sotmetre's";
+$a->strings['Post to Dreamwidth'] = 'Publica a Dreamwidth';
+$a->strings['Dreamwidth Post Settings'] = 'Configuració de la publicació de Dreamwidth';
+$a->strings['Enable dreamwidth Post Addon'] = 'Habilita Addon Post Post';
+$a->strings['dreamwidth username'] = 'nom d\'usuari de dreamwidth';
+$a->strings['dreamwidth password'] = 'contrasenya de dreamwidth';
+$a->strings['Post to dreamwidth by default'] = 'Publica l\'amplada de somni de manera predeterminada';
+$a->strings['Submit'] = 'sotmetre\'s';
diff --git a/dwpost/lang/cs/messages.po b/dwpost/lang/cs/messages.po
index e5a9b25d..fc32a371 100644
--- a/dwpost/lang/cs/messages.po
+++ b/dwpost/lang/cs/messages.po
@@ -10,40 +10,36 @@ msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-27 05:01-0500\n"
-"PO-Revision-Date: 2018-06-14 10:13+0000\n"
-"Last-Translator: Aditoo\n"
-"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: 2014-06-22 11:41+0000\n"
+"Last-Translator: Aditoo, 2018\n"
+"Language-Team: Czech (http://app.transifex.com/Friendica/friendica/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=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
-#: dwpost.php:39
+#: dwpost.php:43
msgid "Post to Dreamwidth"
-msgstr "Poslat na Dreamwidth"
+msgstr "Odeslat na Dreamwidth"
-#: dwpost.php:70
-msgid "Dreamwidth Post Settings"
-msgstr "Nastavení Dreamwidth Post"
+#: dwpost.php:63
+msgid "Enable Dreamwidth Post Addon"
+msgstr ""
-#: dwpost.php:72
-msgid "Enable dreamwidth Post Addon"
-msgstr "Povolit doplněk Dreamwidth Post"
+#: dwpost.php:64
+msgid "Dreamwidth username"
+msgstr ""
-#: dwpost.php:77
-msgid "dreamwidth username"
-msgstr "dreamwidth uživatelské jméno"
+#: dwpost.php:65
+msgid "Dreamwidth password"
+msgstr ""
-#: dwpost.php:82
-msgid "dreamwidth password"
-msgstr "dreamwidth heslo"
+#: dwpost.php:66
+msgid "Post to Dreamwidth by default"
+msgstr ""
-#: dwpost.php:87
-msgid "Post to dreamwidth by default"
-msgstr "Ve výchozím stavu posílat na dreamwidth"
-
-#: dwpost.php:93
-msgid "Submit"
-msgstr "Odeslat"
+#: dwpost.php:71
+msgid "Dreamwidth Export"
+msgstr ""
diff --git a/dwpost/lang/cs/strings.php b/dwpost/lang/cs/strings.php
index 0c1f68a4..7378f061 100644
--- a/dwpost/lang/cs/strings.php
+++ b/dwpost/lang/cs/strings.php
@@ -3,13 +3,6 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
$n = intval($n);
- return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
+ if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; }
}}
-;
-$a->strings["Post to Dreamwidth"] = "Poslat na Dreamwidth";
-$a->strings["Dreamwidth Post Settings"] = "Nastavení Dreamwidth Post";
-$a->strings["Enable dreamwidth Post Addon"] = "Povolit doplněk Dreamwidth Post";
-$a->strings["dreamwidth username"] = "dreamwidth uživatelské jméno";
-$a->strings["dreamwidth password"] = "dreamwidth heslo";
-$a->strings["Post to dreamwidth by default"] = "Ve výchozím stavu posílat na dreamwidth";
-$a->strings["Submit"] = "Odeslat";
+$a->strings['Post to Dreamwidth'] = 'Odeslat na Dreamwidth';
diff --git a/dwpost/lang/da-dk/messages.po b/dwpost/lang/da-dk/messages.po
new file mode 100644
index 00000000..e220f28f
--- /dev/null
+++ b/dwpost/lang/da-dk/messages.po
@@ -0,0 +1,43 @@
+# ADDON dwpost
+# Copyright (C)
+# This file is distributed under the same license as the Friendica dwpost addon package.
+#
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: 2014-06-22 11:41+0000\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: Danish (Denmark) (http://www.transifex.com/Friendica/friendica/language/da_DK/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: da_DK\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: dwpost.php:43
+msgid "Post to Dreamwidth"
+msgstr ""
+
+#: dwpost.php:63
+msgid "Enable Dreamwidth Post Addon"
+msgstr ""
+
+#: dwpost.php:64
+msgid "Dreamwidth username"
+msgstr ""
+
+#: dwpost.php:65
+msgid "Dreamwidth password"
+msgstr ""
+
+#: dwpost.php:66
+msgid "Post to Dreamwidth by default"
+msgstr ""
+
+#: dwpost.php:71
+msgid "Dreamwidth Export"
+msgstr ""
diff --git a/dwpost/lang/da-dk/strings.php b/dwpost/lang/da-dk/strings.php
new file mode 100644
index 00000000..09554750
--- /dev/null
+++ b/dwpost/lang/da-dk/strings.php
@@ -0,0 +1,7 @@
+, 2014
-# bavatar , 2014
+# Andreas H., 2014
+# Tobias Diekershoff , 2014
+# Tobias Diekershoff , 2018,2021-2022
+# Ulf Rompe , 2019
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-27 05:01-0500\n"
-"PO-Revision-Date: 2014-10-15 12:18+0000\n"
-"Last-Translator: Abrax \n"
-"Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: 2014-06-22 11:41+0000\n"
+"Last-Translator: Tobias Diekershoff , 2018,2021-2022\n"
+"Language-Team: German (http://app.transifex.com/Friendica/friendica/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"
-#: dwpost.php:39
+#: dwpost.php:43
msgid "Post to Dreamwidth"
msgstr "In Dreamwidth veröffentlichen"
-#: dwpost.php:70
-msgid "Dreamwidth Post Settings"
-msgstr "Dreamwidth Veröffentlichungs-Einstellungen"
+#: dwpost.php:63
+msgid "Enable Dreamwidth Post Addon"
+msgstr "Dreamwidth-Post-Addon aktivieren"
-#: dwpost.php:72
-msgid "Enable dreamwidth Post Addon"
-msgstr "Dreamwidth Post Addon aktivieren"
+#: dwpost.php:64
+msgid "Dreamwidth username"
+msgstr "Dreamwidth-Benutzername"
-#: dwpost.php:77
-msgid "dreamwidth username"
-msgstr "Dreamwidth Benutzername"
+#: dwpost.php:65
+msgid "Dreamwidth password"
+msgstr "Dreamwidth-Passwort"
-#: dwpost.php:82
-msgid "dreamwidth password"
-msgstr "Dreamwidth Passwort"
-
-#: dwpost.php:87
-msgid "Post to dreamwidth by default"
+#: dwpost.php:66
+msgid "Post to Dreamwidth by default"
msgstr "Standardmäßig bei Dreamwidth veröffentlichen"
-#: dwpost.php:93
-msgid "Submit"
-msgstr "Senden"
+#: dwpost.php:71
+msgid "Dreamwidth Export"
+msgstr "Dreamwidth Export"
diff --git a/dwpost/lang/de/strings.php b/dwpost/lang/de/strings.php
index a810f79e..aea4bde0 100644
--- a/dwpost/lang/de/strings.php
+++ b/dwpost/lang/de/strings.php
@@ -2,13 +2,12 @@
if(! function_exists("string_plural_select_de")) {
function string_plural_select_de($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Dreamwidth"] = "In Dreamwidth veröffentlichen";
-$a->strings["Dreamwidth Post Settings"] = "Dreamwidth Veröffentlichungs-Einstellungen";
-$a->strings["Enable dreamwidth Post Addon"] = "Dreamwidth Post Addon aktivieren";
-$a->strings["dreamwidth username"] = "Dreamwidth Benutzername";
-$a->strings["dreamwidth password"] = "Dreamwidth Passwort";
-$a->strings["Post to dreamwidth by default"] = "Standardmäßig bei Dreamwidth veröffentlichen";
-$a->strings["Submit"] = "Senden";
+$a->strings['Post to Dreamwidth'] = 'In Dreamwidth veröffentlichen';
+$a->strings['Enable Dreamwidth Post Addon'] = 'Dreamwidth-Post-Addon aktivieren';
+$a->strings['Dreamwidth username'] = 'Dreamwidth-Benutzername';
+$a->strings['Dreamwidth password'] = 'Dreamwidth-Passwort';
+$a->strings['Post to Dreamwidth by default'] = 'Standardmäßig bei Dreamwidth veröffentlichen';
+$a->strings['Dreamwidth Export'] = 'Dreamwidth Export';
diff --git a/dwpost/lang/en-gb/strings.php b/dwpost/lang/en-gb/strings.php
index 1f03e9b1..b7270d79 100644
--- a/dwpost/lang/en-gb/strings.php
+++ b/dwpost/lang/en-gb/strings.php
@@ -2,13 +2,13 @@
if(! function_exists("string_plural_select_en_gb")) {
function string_plural_select_en_gb($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Dreamwidth"] = "Post to Dreamwidth";
-$a->strings["Dreamwidth Post Settings"] = "Dreamwidth Post Settings";
-$a->strings["Enable dreamwidth Post Addon"] = "Enable Dreamwidth post addon";
-$a->strings["dreamwidth username"] = "Dreamwidth username";
-$a->strings["dreamwidth password"] = "Dreamwidth password";
-$a->strings["Post to dreamwidth by default"] = "Post to Dreamwidth by default";
-$a->strings["Submit"] = "Submit";
+$a->strings['Post to Dreamwidth'] = 'Post to Dreamwidth';
+$a->strings['Dreamwidth Post Settings'] = 'Dreamwidth Post Settings';
+$a->strings['Enable dreamwidth Post Addon'] = 'Enable Dreamwidth post addon';
+$a->strings['dreamwidth username'] = 'Dreamwidth username';
+$a->strings['dreamwidth password'] = 'Dreamwidth password';
+$a->strings['Post to dreamwidth by default'] = 'Post to Dreamwidth by default';
+$a->strings['Submit'] = 'Submit';
diff --git a/dwpost/lang/es/messages.po b/dwpost/lang/es/messages.po
index 18036677..44c1c0f8 100644
--- a/dwpost/lang/es/messages.po
+++ b/dwpost/lang/es/messages.po
@@ -4,14 +4,15 @@
#
#
# Translators:
-# Alberto Díaz Tormo , 2016
+# Albert, 2016
+# Senex Petrovic , 2021
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-27 05:01-0500\n"
-"PO-Revision-Date: 2016-10-23 11:33+0000\n"
-"Last-Translator: Alberto Díaz Tormo \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-04-01 09:54+0000\n"
+"Last-Translator: Senex Petrovic \n"
"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,30 +20,30 @@ msgstr ""
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: dwpost.php:39
+#: dwpost.php:41
msgid "Post to Dreamwidth"
msgstr "Publicar en Dreamwidth"
-#: dwpost.php:70
-msgid "Dreamwidth Post Settings"
-msgstr "Ajustes de publicación de Dreamwidth"
+#: dwpost.php:72 dwpost.php:76
+msgid "Dreamwidth Export"
+msgstr "Dreamwidth Exportar"
-#: dwpost.php:72
+#: dwpost.php:80
msgid "Enable dreamwidth Post Addon"
-msgstr "Activar el addon de publicación dreamwidth"
+msgstr "Activar el módulo de publicación en Dreamwidth"
-#: dwpost.php:77
+#: dwpost.php:85
msgid "dreamwidth username"
msgstr "Nombre de usuario de dreamwidth"
-#: dwpost.php:82
+#: dwpost.php:90
msgid "dreamwidth password"
msgstr "Contraseña de dreamwidth"
-#: dwpost.php:87
+#: dwpost.php:95
msgid "Post to dreamwidth by default"
msgstr "Publicar en dreamwidth por defecto"
-#: dwpost.php:93
-msgid "Submit"
-msgstr "Enviar"
+#: dwpost.php:100
+msgid "Save Settings"
+msgstr "Guardar ajustes"
diff --git a/dwpost/lang/es/strings.php b/dwpost/lang/es/strings.php
index 4c5c116f..9f5a983b 100644
--- a/dwpost/lang/es/strings.php
+++ b/dwpost/lang/es/strings.php
@@ -2,13 +2,13 @@
if(! function_exists("string_plural_select_es")) {
function string_plural_select_es($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Dreamwidth"] = "Publicar en Dreamwidth";
-$a->strings["Dreamwidth Post Settings"] = "Ajustes de publicación de Dreamwidth";
-$a->strings["Enable dreamwidth Post Addon"] = "Activar el addon de publicación dreamwidth";
-$a->strings["dreamwidth username"] = "Nombre de usuario de dreamwidth";
-$a->strings["dreamwidth password"] = "Contraseña de dreamwidth";
-$a->strings["Post to dreamwidth by default"] = "Publicar en dreamwidth por defecto";
-$a->strings["Submit"] = "Enviar";
+$a->strings['Post to Dreamwidth'] = 'Publicar en Dreamwidth';
+$a->strings['Dreamwidth Export'] = 'Dreamwidth Exportar';
+$a->strings['Enable dreamwidth Post Addon'] = 'Activar el módulo de publicación en Dreamwidth';
+$a->strings['dreamwidth username'] = 'Nombre de usuario de dreamwidth';
+$a->strings['dreamwidth password'] = 'Contraseña de dreamwidth';
+$a->strings['Post to dreamwidth by default'] = 'Publicar en dreamwidth por defecto';
+$a->strings['Save Settings'] = 'Guardar ajustes';
diff --git a/dwpost/lang/fi-fi/strings.php b/dwpost/lang/fi-fi/strings.php
index 4c8de909..51a5ea57 100644
--- a/dwpost/lang/fi-fi/strings.php
+++ b/dwpost/lang/fi-fi/strings.php
@@ -2,13 +2,13 @@
if(! function_exists("string_plural_select_fi_fi")) {
function string_plural_select_fi_fi($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Dreamwidth"] = "Lähetä Dreamwidthiin";
-$a->strings["Dreamwidth Post Settings"] = "Dreamwidth -viestin asetukset";
-$a->strings["Enable dreamwidth Post Addon"] = "Ota Dreamwidth-viestilisäosa käyttöön";
-$a->strings["dreamwidth username"] = "dreamwidth -käyttäjätunnus";
-$a->strings["dreamwidth password"] = "dreamwidth -salasana";
-$a->strings["Post to dreamwidth by default"] = "Lähetä Dreamwidthiin oletuksena";
-$a->strings["Submit"] = "Lähetä";
+$a->strings['Post to Dreamwidth'] = 'Lähetä Dreamwidthiin';
+$a->strings['Dreamwidth Post Settings'] = 'Dreamwidth -viestin asetukset';
+$a->strings['Enable dreamwidth Post Addon'] = 'Ota Dreamwidth-viestilisäosa käyttöön';
+$a->strings['dreamwidth username'] = 'dreamwidth -käyttäjätunnus';
+$a->strings['dreamwidth password'] = 'dreamwidth -salasana';
+$a->strings['Post to dreamwidth by default'] = 'Lähetä Dreamwidthiin oletuksena';
+$a->strings['Submit'] = 'Lähetä';
diff --git a/dwpost/lang/fr/messages.po b/dwpost/lang/fr/messages.po
index 1277d590..dd93d852 100644
--- a/dwpost/lang/fr/messages.po
+++ b/dwpost/lang/fr/messages.po
@@ -4,46 +4,44 @@
#
#
# Translators:
-# Nicola Spanti , 2015
+# bob lebonche , 2021
+# Hypolite Petovan , 2022
+# ea1cd8241cb389ffb6f92bc6891eff5d_dc12308 <70dced5587d47e18d88f9298024d96f8_93383>, 2015
# StefOfficiel , 2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-27 05:01-0500\n"
-"PO-Revision-Date: 2015-08-30 17:12+0000\n"
-"Last-Translator: Nicola Spanti \n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: 2014-06-22 11:41+0000\n"
+"Last-Translator: Hypolite Petovan , 2022\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/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"
+"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
-#: dwpost.php:39
+#: dwpost.php:43
msgid "Post to Dreamwidth"
msgstr "Publier sur Dreamwidth"
-#: dwpost.php:70
-msgid "Dreamwidth Post Settings"
-msgstr "Paramètres pour Dreamwidth"
+#: dwpost.php:63
+msgid "Enable Dreamwidth Post Addon"
+msgstr "Activer l'extension Dreamwidth"
-#: dwpost.php:72
-msgid "Enable dreamwidth Post Addon"
-msgstr ""
-
-#: dwpost.php:77
-msgid "dreamwidth username"
+#: dwpost.php:64
+msgid "Dreamwidth username"
msgstr "Nom d'utilisateur Dreamwidth"
-#: dwpost.php:82
-msgid "dreamwidth password"
-msgstr "Mot de passe dreamwidth"
+#: dwpost.php:65
+msgid "Dreamwidth password"
+msgstr "Mot de passe Dreamwidth"
-#: dwpost.php:87
-msgid "Post to dreamwidth by default"
-msgstr "Poster sur Dreamwidth par défaut"
+#: dwpost.php:66
+msgid "Post to Dreamwidth by default"
+msgstr "Publier sur Dreamwidth par défaut"
-#: dwpost.php:93
-msgid "Submit"
-msgstr "Envoyer"
+#: dwpost.php:71
+msgid "Dreamwidth Export"
+msgstr "Export Dreamwidth"
diff --git a/dwpost/lang/fr/strings.php b/dwpost/lang/fr/strings.php
index 5ecda471..f33e7404 100644
--- a/dwpost/lang/fr/strings.php
+++ b/dwpost/lang/fr/strings.php
@@ -2,13 +2,12 @@
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
- return ($n > 1);;
+ $n = intval($n);
+ if (($n == 0 || $n == 1)) { return 0; } else if ($n != 0 && $n % 1000000 == 0) { return 1; } else { return 2; }
}}
-;
-$a->strings["Post to Dreamwidth"] = "Publier sur Dreamwidth";
-$a->strings["Dreamwidth Post Settings"] = "Paramètres pour Dreamwidth";
-$a->strings["Enable dreamwidth Post Addon"] = "";
-$a->strings["dreamwidth username"] = "Nom d'utilisateur Dreamwidth";
-$a->strings["dreamwidth password"] = "Mot de passe dreamwidth";
-$a->strings["Post to dreamwidth by default"] = "Poster sur Dreamwidth par défaut";
-$a->strings["Submit"] = "Envoyer";
+$a->strings['Post to Dreamwidth'] = 'Publier sur Dreamwidth';
+$a->strings['Enable Dreamwidth Post Addon'] = 'Activer l\'extension Dreamwidth';
+$a->strings['Dreamwidth username'] = 'Nom d\'utilisateur Dreamwidth';
+$a->strings['Dreamwidth password'] = 'Mot de passe Dreamwidth';
+$a->strings['Post to Dreamwidth by default'] = 'Publier sur Dreamwidth par défaut';
+$a->strings['Dreamwidth Export'] = 'Export Dreamwidth';
diff --git a/dwpost/lang/hu/messages.po b/dwpost/lang/hu/messages.po
new file mode 100644
index 00000000..98356f65
--- /dev/null
+++ b/dwpost/lang/hu/messages.po
@@ -0,0 +1,44 @@
+# ADDON dwpost
+# Copyright (C)
+# This file is distributed under the same license as the Friendica dwpost addon package.
+#
+#
+# Translators:
+# Balázs Úr, 2020-2021
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: 2014-06-22 11:41+0000\n"
+"Last-Translator: Balázs Úr, 2020-2021\n"
+"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/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"
+
+#: dwpost.php:43
+msgid "Post to Dreamwidth"
+msgstr "Beküldés a Dreamwidth-re"
+
+#: dwpost.php:63
+msgid "Enable Dreamwidth Post Addon"
+msgstr "A Dreamwidth-beküldő bővítmény engedélyezése"
+
+#: dwpost.php:64
+msgid "Dreamwidth username"
+msgstr "Dreamwidth felhasználónév"
+
+#: dwpost.php:65
+msgid "Dreamwidth password"
+msgstr "Dreamwidth jelszó"
+
+#: dwpost.php:66
+msgid "Post to Dreamwidth by default"
+msgstr "Beküldés a Dreamwidth-re alapértelmezetten"
+
+#: dwpost.php:71
+msgid "Dreamwidth Export"
+msgstr "Dreamwidth exportálás"
diff --git a/dwpost/lang/hu/strings.php b/dwpost/lang/hu/strings.php
new file mode 100644
index 00000000..f994189f
--- /dev/null
+++ b/dwpost/lang/hu/strings.php
@@ -0,0 +1,13 @@
+strings['Post to Dreamwidth'] = 'Beküldés a Dreamwidth-re';
+$a->strings['Enable Dreamwidth Post Addon'] = 'A Dreamwidth-beküldő bővítmény engedélyezése';
+$a->strings['Dreamwidth username'] = 'Dreamwidth felhasználónév';
+$a->strings['Dreamwidth password'] = 'Dreamwidth jelszó';
+$a->strings['Post to Dreamwidth by default'] = 'Beküldés a Dreamwidth-re alapértelmezetten';
+$a->strings['Dreamwidth Export'] = 'Dreamwidth exportálás';
diff --git a/dwpost/lang/it/messages.po b/dwpost/lang/it/messages.po
index 9ce05fe2..5f7c2ee2 100644
--- a/dwpost/lang/it/messages.po
+++ b/dwpost/lang/it/messages.po
@@ -5,13 +5,14 @@
#
# Translators:
# fabrixxm , 2014,2018
+# Sylke Vicious , 2020-2021
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-27 05:01-0500\n"
-"PO-Revision-Date: 2018-03-19 13:21+0000\n"
-"Last-Translator: fabrixxm \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-02-16 12:55+0000\n"
+"Last-Translator: Sylke Vicious \n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,30 +20,30 @@ msgstr ""
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: dwpost.php:39
+#: dwpost.php:41
msgid "Post to Dreamwidth"
msgstr "Invia a Dreamwidth"
-#: dwpost.php:70
-msgid "Dreamwidth Post Settings"
-msgstr "Impostazioni Invio a Dreeamwidth"
+#: dwpost.php:72 dwpost.php:76
+msgid "Dreamwidth Export"
+msgstr "Esporta Dreamwidth"
-#: dwpost.php:72
+#: dwpost.php:80
msgid "Enable dreamwidth Post Addon"
msgstr "Abilita il componente aggiuntivo di invio a Dreamwidth"
-#: dwpost.php:77
+#: dwpost.php:85
msgid "dreamwidth username"
msgstr "Nome utente Dreamwidth"
-#: dwpost.php:82
+#: dwpost.php:90
msgid "dreamwidth password"
msgstr "password Dreamwidth"
-#: dwpost.php:87
+#: dwpost.php:95
msgid "Post to dreamwidth by default"
msgstr "Invia sempre a Dreamwidth"
-#: dwpost.php:93
-msgid "Submit"
-msgstr "Salva"
+#: dwpost.php:100
+msgid "Save Settings"
+msgstr "Salva Impostazioni"
diff --git a/dwpost/lang/it/strings.php b/dwpost/lang/it/strings.php
index 0f40abc6..0234c1f7 100644
--- a/dwpost/lang/it/strings.php
+++ b/dwpost/lang/it/strings.php
@@ -2,13 +2,13 @@
if(! function_exists("string_plural_select_it")) {
function string_plural_select_it($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Dreamwidth"] = "Invia a Dreamwidth";
-$a->strings["Dreamwidth Post Settings"] = "Impostazioni Invio a Dreeamwidth";
-$a->strings["Enable dreamwidth Post Addon"] = "Abilita il componente aggiuntivo di invio a Dreamwidth";
-$a->strings["dreamwidth username"] = "Nome utente Dreamwidth";
-$a->strings["dreamwidth password"] = "password Dreamwidth";
-$a->strings["Post to dreamwidth by default"] = "Invia sempre a Dreamwidth";
-$a->strings["Submit"] = "Salva";
+$a->strings['Post to Dreamwidth'] = 'Invia a Dreamwidth';
+$a->strings['Dreamwidth Export'] = 'Esporta Dreamwidth';
+$a->strings['Enable dreamwidth Post Addon'] = 'Abilita il componente aggiuntivo di invio a Dreamwidth';
+$a->strings['dreamwidth username'] = 'Nome utente Dreamwidth';
+$a->strings['dreamwidth password'] = 'password Dreamwidth';
+$a->strings['Post to dreamwidth by default'] = 'Invia sempre a Dreamwidth';
+$a->strings['Save Settings'] = 'Salva Impostazioni';
diff --git a/dwpost/lang/nl/strings.php b/dwpost/lang/nl/strings.php
index ddf5083a..902c9c12 100644
--- a/dwpost/lang/nl/strings.php
+++ b/dwpost/lang/nl/strings.php
@@ -3,13 +3,12 @@
if(! function_exists("string_plural_select_nl")) {
function string_plural_select_nl($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Post to Dreamwidth"] = "Plaatsen op Dreamwidth";
-$a->strings["Dreamwidth Post Settings"] = "Dreamwidth Post instellingen";
-$a->strings["Enable dreamwidth Post Addon"] = "Dreamwidth Post Addon inschakelen";
-$a->strings["dreamwidth username"] = "Dreawidth gebruikersnaam";
-$a->strings["dreamwidth password"] = "Dreamwidth wachtwoord";
-$a->strings["Post to dreamwidth by default"] = "Plaatsen op Dreamwidth als standaard instellen ";
-$a->strings["Submit"] = "Opslaan";
+$a->strings['Post to Dreamwidth'] = 'Plaatsen op Dreamwidth';
+$a->strings['Dreamwidth Post Settings'] = 'Dreamwidth Post instellingen';
+$a->strings['Enable dreamwidth Post Addon'] = 'Dreamwidth Post Addon inschakelen';
+$a->strings['dreamwidth username'] = 'Dreawidth gebruikersnaam';
+$a->strings['dreamwidth password'] = 'Dreamwidth wachtwoord';
+$a->strings['Post to dreamwidth by default'] = 'Plaatsen op Dreamwidth als standaard instellen ';
+$a->strings['Submit'] = 'Opslaan';
diff --git a/dwpost/lang/pl/messages.po b/dwpost/lang/pl/messages.po
index 3eb0942e..ebc3924f 100644
--- a/dwpost/lang/pl/messages.po
+++ b/dwpost/lang/pl/messages.po
@@ -4,14 +4,15 @@
#
#
# Translators:
-# Waldemar Stoczkowski , 2018
+# Piotr Strębski , 2022
+# Waldemar Stoczkowski, 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-27 05:01-0500\n"
-"PO-Revision-Date: 2018-08-04 10:46+0000\n"
-"Last-Translator: Waldemar Stoczkowski \n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: 2014-06-22 11:41+0000\n"
+"Last-Translator: Piotr Strębski , 2022\n"
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,30 +20,26 @@ msgstr ""
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
-#: dwpost.php:39
+#: dwpost.php:43
msgid "Post to Dreamwidth"
msgstr "Opublikuj w Dreamwidth"
-#: dwpost.php:70
-msgid "Dreamwidth Post Settings"
-msgstr "Ustawienia postów w Dreamwerze"
+#: dwpost.php:63
+msgid "Enable Dreamwidth Post Addon"
+msgstr "Włącz dodatek Dreamwidth Post"
-#: dwpost.php:72
-msgid "Enable dreamwidth Post Addon"
-msgstr "Włącz dodatek dreamwidth Post"
+#: dwpost.php:64
+msgid "Dreamwidth username"
+msgstr "Nazwa użytkownika Dreamwidth"
-#: dwpost.php:77
-msgid "dreamwidth username"
-msgstr "nazwa użytkownika dreamwidth"
+#: dwpost.php:65
+msgid "Dreamwidth password"
+msgstr "Hasło Dreamwidth"
-#: dwpost.php:82
-msgid "dreamwidth password"
-msgstr "hasło dreamwidth"
+#: dwpost.php:66
+msgid "Post to Dreamwidth by default"
+msgstr "Publikuj domyślnie w serwisie Dreamwidth"
-#: dwpost.php:87
-msgid "Post to dreamwidth by default"
-msgstr "Opublikuj domyślnie w serwisie dreamwidth"
-
-#: dwpost.php:93
-msgid "Submit"
-msgstr "Wyślij"
+#: dwpost.php:71
+msgid "Dreamwidth Export"
+msgstr "Eksport do Dreamwidth"
diff --git a/dwpost/lang/pl/strings.php b/dwpost/lang/pl/strings.php
index 7ed9b44e..699e2493 100644
--- a/dwpost/lang/pl/strings.php
+++ b/dwpost/lang/pl/strings.php
@@ -3,13 +3,11 @@
if(! function_exists("string_plural_select_pl")) {
function string_plural_select_pl($n){
$n = intval($n);
- return ($n==1 ? 0 : ($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14) ? 1 : $n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14) ? 2 : 3);;
+ if ($n==1) { return 0; } else if (($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["Post to Dreamwidth"] = "Opublikuj w Dreamwidth";
-$a->strings["Dreamwidth Post Settings"] = "Ustawienia postów w Dreamwerze";
-$a->strings["Enable dreamwidth Post Addon"] = "Włącz dodatek dreamwidth Post";
-$a->strings["dreamwidth username"] = "nazwa użytkownika dreamwidth";
-$a->strings["dreamwidth password"] = "hasło dreamwidth";
-$a->strings["Post to dreamwidth by default"] = "Opublikuj domyślnie w serwisie dreamwidth";
-$a->strings["Submit"] = "Wyślij";
+$a->strings['Post to Dreamwidth'] = 'Opublikuj w Dreamwidth';
+$a->strings['Enable Dreamwidth Post Addon'] = 'Włącz dodatek Dreamwidth Post';
+$a->strings['Dreamwidth username'] = 'Nazwa użytkownika Dreamwidth';
+$a->strings['Dreamwidth password'] = 'Hasło Dreamwidth';
+$a->strings['Post to Dreamwidth by default'] = 'Publikuj domyślnie w serwisie Dreamwidth';
+$a->strings['Dreamwidth Export'] = 'Eksport do Dreamwidth';
diff --git a/dwpost/lang/pt-br/strings.php b/dwpost/lang/pt-br/strings.php
index 03dc7d2d..f65d10a2 100644
--- a/dwpost/lang/pt-br/strings.php
+++ b/dwpost/lang/pt-br/strings.php
@@ -1,9 +1,14 @@
-strings["Post to Dreamwidth"] = "Publicar no Dreamwidth";
-$a->strings["Dreamwidth Post Settings"] = "Configurações de publicação no Dreamwidth";
-$a->strings["Enable dreamwidth Post Addon"] = "Habilitar o addon de publicação no Dreamwidth";
-$a->strings["dreamwidth username"] = "Nome de usuário do Dreamwidth";
-$a->strings["dreamwidth password"] = "Senha do Dreamwidth";
-$a->strings["Post to dreamwidth by default"] = "Publicar no Dreamwidth por padrão";
-$a->strings["Submit"] = "Enviar";
+ 1);
+}}
+$a->strings['Post to Dreamwidth'] = 'Publicar no Dreamwidth';
+$a->strings['Dreamwidth Post Settings'] = 'Configurações de publicação no Dreamwidth';
+$a->strings['Enable dreamwidth Post Addon'] = 'Habilitar plug-in para publicar no Dreamwidth';
+$a->strings['dreamwidth username'] = 'Nome de usuário no Dreamwidth';
+$a->strings['dreamwidth password'] = 'Senha do Dreamwidth';
+$a->strings['Post to dreamwidth by default'] = 'Publicar no Dreamwidth por padrão';
+$a->strings['Submit'] = 'Enviar';
diff --git a/dwpost/lang/ro/strings.php b/dwpost/lang/ro/strings.php
index ed3ece27..782ca09e 100644
--- a/dwpost/lang/ro/strings.php
+++ b/dwpost/lang/ro/strings.php
@@ -2,13 +2,13 @@
if(! function_exists("string_plural_select_ro")) {
function string_plural_select_ro($n){
- return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
+ $n = intval($n);
+ if ($n==1) { return 0; } else if ((($n%100>19)||(($n%100==0)&&($n!=0)))) { return 2; } else { return 1; }
}}
-;
-$a->strings["Post to Dreamwidth"] = "Postați pe Dreamwidth";
-$a->strings["Dreamwidth Post Settings"] = "Configurări Postări Dreamwidth ";
-$a->strings["Enable dreamwidth Post Addon"] = "Activare Modul Postare pe Dreamwidth";
-$a->strings["dreamwidth username"] = "Utilizator Dreamwidth";
-$a->strings["dreamwidth password"] = "Parola Dreamwidth ";
-$a->strings["Post to dreamwidth by default"] = "Postați implicit pe Dreamwidth";
-$a->strings["Submit"] = "Trimite";
+$a->strings['Post to Dreamwidth'] = 'Postați pe Dreamwidth';
+$a->strings['Dreamwidth Post Settings'] = 'Configurări Postări Dreamwidth ';
+$a->strings['Enable dreamwidth Post Addon'] = 'Activare Modul Postare pe Dreamwidth';
+$a->strings['dreamwidth username'] = 'Utilizator Dreamwidth';
+$a->strings['dreamwidth password'] = 'Parola Dreamwidth ';
+$a->strings['Post to dreamwidth by default'] = 'Postați implicit pe Dreamwidth';
+$a->strings['Submit'] = 'Trimite';
diff --git a/dwpost/lang/ru/strings.php b/dwpost/lang/ru/strings.php
index 5c351320..c44d13f4 100644
--- a/dwpost/lang/ru/strings.php
+++ b/dwpost/lang/ru/strings.php
@@ -3,13 +3,12 @@
if(! function_exists("string_plural_select_ru")) {
function string_plural_select_ru($n){
$n = intval($n);
- return ($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);;
+ if ($n%10==1 && $n%100!=11) { return 0; } else if ($n%10>=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["Post to Dreamwidth"] = "Отправить в Dreamwidth";
-$a->strings["Dreamwidth Post Settings"] = "Настройки сообщений Dreamwidth";
-$a->strings["Enable dreamwidth Post Addon"] = "Включить аддон dreamwidth Post";
-$a->strings["dreamwidth username"] = "Имя пользователя Dreamwidth";
-$a->strings["dreamwidth password"] = "Пароль Dreamwidth";
-$a->strings["Post to dreamwidth by default"] = "Отправлять сообщения в Dreamwidth по умолчанию";
-$a->strings["Submit"] = "Добавить";
+$a->strings['Post to Dreamwidth'] = 'Отправить в Dreamwidth';
+$a->strings['Dreamwidth Post Settings'] = 'Настройки сообщений Dreamwidth';
+$a->strings['Enable dreamwidth Post Addon'] = 'Включить аддон dreamwidth Post';
+$a->strings['dreamwidth username'] = 'Имя пользователя Dreamwidth';
+$a->strings['dreamwidth password'] = 'Пароль Dreamwidth';
+$a->strings['Post to dreamwidth by default'] = 'Отправлять сообщения в Dreamwidth по умолчанию';
+$a->strings['Submit'] = 'Добавить';
diff --git a/dwpost/lang/sv/messages.po b/dwpost/lang/sv/messages.po
new file mode 100644
index 00000000..6e3aa388
--- /dev/null
+++ b/dwpost/lang/sv/messages.po
@@ -0,0 +1,43 @@
+# ADDON dwpost
+# Copyright (C)
+# This file is distributed under the same license as the Friendica dwpost addon package.
+#
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:17-0500\n"
+"PO-Revision-Date: 2021-12-22 16:17+0000\n"
+"Last-Translator: Transifex Bot <>\n"
+"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/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"
+
+#: dwpost.php:43
+msgid "Post to Dreamwidth"
+msgstr ""
+
+#: dwpost.php:63
+msgid "Enable Dreamwidth Post Addon"
+msgstr ""
+
+#: dwpost.php:64
+msgid "Dreamwidth username"
+msgstr ""
+
+#: dwpost.php:65
+msgid "Dreamwidth password"
+msgstr ""
+
+#: dwpost.php:66
+msgid "Post to Dreamwidth by default"
+msgstr ""
+
+#: dwpost.php:71
+msgid "Dreamwidth Export"
+msgstr ""
diff --git a/dwpost/lang/sv/strings.php b/dwpost/lang/sv/strings.php
index 3ec569a7..72e9772f 100644
--- a/dwpost/lang/sv/strings.php
+++ b/dwpost/lang/sv/strings.php
@@ -1,3 +1,7 @@
-strings["Submit"] = "Spara";
+
+
+
+
+```
+
+
+2\. Create links
+
+```html
+
+
+
+
+
+
+
+```
+
+
+3\. Enjoy!
+
+
+## License
+
+fancyBox is licensed under the [GPLv3](http://choosealicense.com/licenses/gpl-3.0) license for all open source applications.
+A commercial license is required for all commercial applications (including sites, themes and apps you plan to sell).
+
+[Read more about fancyBox license](http://fancyapps.com/fancybox/3/#license).
+
+## Bugs and feature requests
+
+If you find a bug, please report it [here on Github](https://github.com/fancyapps/fancybox/issues).
+
+Guidelines for bug reports:
+
+1. Use the GitHub issue search — check if the issue has already been reported.
+2. Check if the issue has been fixed — try to reproduce it using the latest master or development branch in the repository.
+3. Isolate the problem — create a reduced test case and a live example. You can use CodePen to fork any demo found on documentation to use it as a template.
+
+A good bug report shouldn't leave others needing to chase you up for more information.
+Please try to be as detailed as possible in your report.
+
+
+Feature requests are welcome. Please look for existing ones and use GitHub's "reactions" feature to vote.
+
+Please do not use the issue tracker for personal support requests - use Stack Overflow ([fancybox-3](http://stackoverflow.com/questions/tagged/fancybox-3) tag) instead.
diff --git a/fancybox/asset/fancybox/fancybox.config.js b/fancybox/asset/fancybox/fancybox.config.js
new file mode 100644
index 00000000..233b423f
--- /dev/null
+++ b/fancybox/asset/fancybox/fancybox.config.js
@@ -0,0 +1,13 @@
+$(document).ready(function() {
+ $.fancybox.defaults.loop = "true";
+ // this disables the colorbox hook found in frio/js/modal.js:34
+ $("body").off("click", ".wall-item-body a img");
+
+ // Adds ALT/TITLE text to fancybox
+ $('a[data-fancybox').fancybox({
+ afterLoad : function(instance, current) {
+ current.$image.attr('alt', current.opts.$orig.find('img').attr('alt') );
+ current.$image.attr('title', current.opts.$orig.find('img').attr('title') );
+ }
+ });
+});
\ No newline at end of file
diff --git a/fancybox/asset/fancybox/jquery.fancybox.css b/fancybox/asset/fancybox/jquery.fancybox.css
new file mode 100644
index 00000000..16b01254
--- /dev/null
+++ b/fancybox/asset/fancybox/jquery.fancybox.css
@@ -0,0 +1,895 @@
+body.compensate-for-scrollbar {
+ overflow: hidden;
+}
+
+.fancybox-active {
+ height: auto;
+}
+
+.fancybox-is-hidden {
+ left: -9999px;
+ margin: 0;
+ position: absolute !important;
+ top: -9999px;
+ visibility: hidden;
+}
+
+.fancybox-container {
+ -webkit-backface-visibility: hidden;
+ height: 100%;
+ left: 0;
+ outline: none;
+ position: fixed;
+ -webkit-tap-highlight-color: transparent;
+ top: 0;
+ -ms-touch-action: manipulation;
+ touch-action: manipulation;
+ transform: translateZ(0);
+ width: 100%;
+ z-index: 99992;
+}
+
+.fancybox-container * {
+ box-sizing: border-box;
+}
+
+.fancybox-outer,
+.fancybox-inner,
+.fancybox-bg,
+.fancybox-stage {
+ bottom: 0;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+}
+
+.fancybox-outer {
+ -webkit-overflow-scrolling: touch;
+ overflow-y: auto;
+}
+
+.fancybox-bg {
+ background: rgb(30, 30, 30);
+ opacity: 0;
+ transition-duration: inherit;
+ transition-property: opacity;
+ transition-timing-function: cubic-bezier(.47, 0, .74, .71);
+}
+
+.fancybox-is-open .fancybox-bg {
+ opacity: .9;
+ transition-timing-function: cubic-bezier(.22, .61, .36, 1);
+}
+
+.fancybox-infobar,
+.fancybox-toolbar,
+.fancybox-caption,
+.fancybox-navigation .fancybox-button {
+ direction: ltr;
+ opacity: 0;
+ position: absolute;
+ transition: opacity .25s ease, visibility 0s ease .25s;
+ visibility: hidden;
+ z-index: 99997;
+}
+
+.fancybox-show-infobar .fancybox-infobar,
+.fancybox-show-toolbar .fancybox-toolbar,
+.fancybox-show-caption .fancybox-caption,
+.fancybox-show-nav .fancybox-navigation .fancybox-button {
+ opacity: 1;
+ transition: opacity .25s ease 0s, visibility 0s ease 0s;
+ visibility: visible;
+}
+
+.fancybox-infobar {
+ color: #ccc;
+ font-size: 13px;
+ -webkit-font-smoothing: subpixel-antialiased;
+ height: 44px;
+ left: 0;
+ line-height: 44px;
+ min-width: 44px;
+ mix-blend-mode: difference;
+ padding: 0 10px;
+ pointer-events: none;
+ top: 0;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.fancybox-toolbar {
+ right: 0;
+ top: 0;
+}
+
+.fancybox-stage {
+ direction: ltr;
+ overflow: visible;
+ transform: translateZ(0);
+ z-index: 99994;
+}
+
+.fancybox-is-open .fancybox-stage {
+ overflow: hidden;
+}
+
+.fancybox-slide {
+ -webkit-backface-visibility: hidden;
+ /* Using without prefix would break IE11 */
+ display: none;
+ height: 100%;
+ left: 0;
+ outline: none;
+ overflow: auto;
+ -webkit-overflow-scrolling: touch;
+ padding: 44px;
+ position: absolute;
+ text-align: center;
+ top: 0;
+ transition-property: transform, opacity;
+ white-space: normal;
+ width: 100%;
+ z-index: 99994;
+}
+
+.fancybox-slide::before {
+ content: '';
+ display: inline-block;
+ font-size: 0;
+ height: 100%;
+ vertical-align: middle;
+ width: 0;
+}
+
+.fancybox-is-sliding .fancybox-slide,
+.fancybox-slide--previous,
+.fancybox-slide--current,
+.fancybox-slide--next {
+ display: block;
+}
+
+.fancybox-slide--image {
+ overflow: hidden;
+ padding: 44px 0;
+}
+
+.fancybox-slide--image::before {
+ display: none;
+}
+
+.fancybox-slide--html {
+ padding: 6px;
+}
+
+.fancybox-content {
+ background: #fff;
+ display: inline-block;
+ margin: 0;
+ max-width: 100%;
+ overflow: auto;
+ -webkit-overflow-scrolling: touch;
+ padding: 44px;
+ position: relative;
+ text-align: left;
+ vertical-align: middle;
+}
+
+.fancybox-slide--image .fancybox-content {
+ animation-timing-function: cubic-bezier(.5, 0, .14, 1);
+ -webkit-backface-visibility: hidden;
+ background: transparent;
+ background-repeat: no-repeat;
+ background-size: 100% 100%;
+ left: 0;
+ max-width: none;
+ overflow: visible;
+ padding: 0;
+ position: absolute;
+ top: 0;
+ -ms-transform-origin: top left;
+ transform-origin: top left;
+ transition-property: transform, opacity;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ z-index: 99995;
+}
+
+.fancybox-can-zoomOut .fancybox-content {
+ cursor: zoom-out;
+}
+
+.fancybox-can-zoomIn .fancybox-content {
+ cursor: zoom-in;
+}
+
+.fancybox-can-swipe .fancybox-content,
+.fancybox-can-pan .fancybox-content {
+ cursor: -webkit-grab;
+ cursor: grab;
+}
+
+.fancybox-is-grabbing .fancybox-content {
+ cursor: -webkit-grabbing;
+ cursor: grabbing;
+}
+
+.fancybox-container [data-selectable='true'] {
+ cursor: text;
+}
+
+.fancybox-image,
+.fancybox-spaceball {
+ background: transparent;
+ border: 0;
+ height: 100%;
+ left: 0;
+ margin: 0;
+ max-height: none;
+ max-width: none;
+ padding: 0;
+ position: absolute;
+ top: 0;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ width: 100%;
+}
+
+.fancybox-spaceball {
+ z-index: 1;
+}
+
+.fancybox-slide--video .fancybox-content,
+.fancybox-slide--map .fancybox-content,
+.fancybox-slide--pdf .fancybox-content,
+.fancybox-slide--iframe .fancybox-content {
+ height: 100%;
+ overflow: visible;
+ padding: 0;
+ width: 100%;
+}
+
+.fancybox-slide--video .fancybox-content {
+ background: #000;
+}
+
+.fancybox-slide--map .fancybox-content {
+ background: #e5e3df;
+}
+
+.fancybox-slide--iframe .fancybox-content {
+ background: #fff;
+}
+
+.fancybox-video,
+.fancybox-iframe {
+ background: transparent;
+ border: 0;
+ display: block;
+ height: 100%;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+ width: 100%;
+}
+
+/* Fix iOS */
+.fancybox-iframe {
+ left: 0;
+ position: absolute;
+ top: 0;
+}
+
+.fancybox-error {
+ background: #fff;
+ cursor: default;
+ max-width: 400px;
+ padding: 40px;
+ width: 100%;
+}
+
+.fancybox-error p {
+ color: #444;
+ font-size: 16px;
+ line-height: 20px;
+ margin: 0;
+ padding: 0;
+}
+
+/* Buttons */
+
+.fancybox-button {
+ background: rgba(30, 30, 30, .6);
+ border: 0;
+ border-radius: 0;
+ box-shadow: none;
+ cursor: pointer;
+ display: inline-block;
+ height: 44px;
+ margin: 0;
+ padding: 10px;
+ position: relative;
+ transition: color .2s;
+ vertical-align: top;
+ visibility: inherit;
+ width: 44px;
+}
+
+.fancybox-button,
+.fancybox-button:visited,
+.fancybox-button:link {
+ color: #ccc;
+}
+
+.fancybox-button:hover {
+ color: #fff;
+}
+
+.fancybox-button:focus {
+ outline: none;
+}
+
+.fancybox-button.fancybox-focus {
+ outline: 1px dotted;
+}
+
+.fancybox-button[disabled],
+.fancybox-button[disabled]:hover {
+ color: #888;
+ cursor: default;
+ outline: none;
+}
+
+/* Fix IE11 */
+.fancybox-button div {
+ height: 100%;
+}
+
+.fancybox-button svg {
+ display: block;
+ height: 100%;
+ overflow: visible;
+ position: relative;
+ width: 100%;
+}
+
+.fancybox-button svg path {
+ fill: currentColor;
+ stroke-width: 0;
+}
+
+.fancybox-button--play svg:nth-child(2),
+.fancybox-button--fsenter svg:nth-child(2) {
+ display: none;
+}
+
+.fancybox-button--pause svg:nth-child(1),
+.fancybox-button--fsexit svg:nth-child(1) {
+ display: none;
+}
+
+.fancybox-progress {
+ background: #ff5268;
+ height: 2px;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+ -ms-transform: scaleX(0);
+ transform: scaleX(0);
+ -ms-transform-origin: 0;
+ transform-origin: 0;
+ transition-property: transform;
+ transition-timing-function: linear;
+ z-index: 99998;
+}
+
+/* Close button on the top right corner of html content */
+
+.fancybox-close-small {
+ background: transparent;
+ border: 0;
+ border-radius: 0;
+ color: #ccc;
+ cursor: pointer;
+ opacity: .8;
+ padding: 8px;
+ position: absolute;
+ right: -12px;
+ top: -44px;
+ z-index: 401;
+}
+
+.fancybox-close-small:hover {
+ color: #fff;
+ opacity: 1;
+}
+
+.fancybox-slide--html .fancybox-close-small {
+ color: currentColor;
+ padding: 10px;
+ right: 0;
+ top: 0;
+}
+
+.fancybox-slide--image.fancybox-is-scaling .fancybox-content {
+ overflow: hidden;
+}
+
+.fancybox-is-scaling .fancybox-close-small,
+.fancybox-is-zoomable.fancybox-can-pan .fancybox-close-small {
+ display: none;
+}
+
+/* Navigation arrows */
+
+.fancybox-navigation .fancybox-button {
+ background-clip: content-box;
+ height: 100px;
+ opacity: 0;
+ position: absolute;
+ top: calc(50% - 50px);
+ width: 70px;
+}
+
+.fancybox-navigation .fancybox-button div {
+ padding: 7px;
+}
+
+.fancybox-navigation .fancybox-button--arrow_left {
+ left: 0;
+ left: env(safe-area-inset-left);
+ padding: 31px 26px 31px 6px;
+}
+
+.fancybox-navigation .fancybox-button--arrow_right {
+ padding: 31px 6px 31px 26px;
+ right: 0;
+ right: env(safe-area-inset-right);
+}
+
+/* Caption */
+
+.fancybox-caption {
+ background: linear-gradient(to top,
+ rgba(0, 0, 0, .85) 0%,
+ rgba(0, 0, 0, .3) 50%,
+ rgba(0, 0, 0, .15) 65%,
+ rgba(0, 0, 0, .075) 75.5%,
+ rgba(0, 0, 0, .037) 82.85%,
+ rgba(0, 0, 0, .019) 88%,
+ rgba(0, 0, 0, 0) 100%);
+ bottom: 0;
+ color: #eee;
+ font-size: 14px;
+ font-weight: 400;
+ left: 0;
+ line-height: 1.5;
+ padding: 75px 44px 25px 44px;
+ pointer-events: none;
+ right: 0;
+ text-align: center;
+ z-index: 99996;
+}
+
+@supports (padding: max(0px)) {
+ .fancybox-caption {
+ padding: 75px max(44px, env(safe-area-inset-right)) max(25px, env(safe-area-inset-bottom)) max(44px, env(safe-area-inset-left));
+ }
+}
+
+.fancybox-caption--separate {
+ margin-top: -50px;
+}
+
+.fancybox-caption__body {
+ max-height: 50vh;
+ overflow: auto;
+ pointer-events: all;
+}
+
+.fancybox-caption a,
+.fancybox-caption a:link,
+.fancybox-caption a:visited {
+ color: #ccc;
+ text-decoration: none;
+}
+
+.fancybox-caption a:hover {
+ color: #fff;
+ text-decoration: underline;
+}
+
+/* Loading indicator */
+
+.fancybox-loading {
+ animation: fancybox-rotate 1s linear infinite;
+ background: transparent;
+ border: 4px solid #888;
+ border-bottom-color: #fff;
+ border-radius: 50%;
+ height: 50px;
+ left: 50%;
+ margin: -25px 0 0 -25px;
+ opacity: .7;
+ padding: 0;
+ position: absolute;
+ top: 50%;
+ width: 50px;
+ z-index: 99999;
+}
+
+@keyframes fancybox-rotate {
+ 100% {
+ transform: rotate(360deg);
+ }
+}
+
+/* Transition effects */
+
+.fancybox-animated {
+ transition-timing-function: cubic-bezier(0, 0, .25, 1);
+}
+
+/* transitionEffect: slide */
+
+.fancybox-fx-slide.fancybox-slide--previous {
+ opacity: 0;
+ transform: translate3d(-100%, 0, 0);
+}
+
+.fancybox-fx-slide.fancybox-slide--next {
+ opacity: 0;
+ transform: translate3d(100%, 0, 0);
+}
+
+.fancybox-fx-slide.fancybox-slide--current {
+ opacity: 1;
+ transform: translate3d(0, 0, 0);
+}
+
+/* transitionEffect: fade */
+
+.fancybox-fx-fade.fancybox-slide--previous,
+.fancybox-fx-fade.fancybox-slide--next {
+ opacity: 0;
+ transition-timing-function: cubic-bezier(.19, 1, .22, 1);
+}
+
+.fancybox-fx-fade.fancybox-slide--current {
+ opacity: 1;
+}
+
+/* transitionEffect: zoom-in-out */
+
+.fancybox-fx-zoom-in-out.fancybox-slide--previous {
+ opacity: 0;
+ transform: scale3d(1.5, 1.5, 1.5);
+}
+
+.fancybox-fx-zoom-in-out.fancybox-slide--next {
+ opacity: 0;
+ transform: scale3d(.5, .5, .5);
+}
+
+.fancybox-fx-zoom-in-out.fancybox-slide--current {
+ opacity: 1;
+ transform: scale3d(1, 1, 1);
+}
+
+/* transitionEffect: rotate */
+
+.fancybox-fx-rotate.fancybox-slide--previous {
+ opacity: 0;
+ -ms-transform: rotate(-360deg);
+ transform: rotate(-360deg);
+}
+
+.fancybox-fx-rotate.fancybox-slide--next {
+ opacity: 0;
+ -ms-transform: rotate(360deg);
+ transform: rotate(360deg);
+}
+
+.fancybox-fx-rotate.fancybox-slide--current {
+ opacity: 1;
+ -ms-transform: rotate(0deg);
+ transform: rotate(0deg);
+}
+
+/* transitionEffect: circular */
+
+.fancybox-fx-circular.fancybox-slide--previous {
+ opacity: 0;
+ transform: scale3d(0, 0, 0) translate3d(-100%, 0, 0);
+}
+
+.fancybox-fx-circular.fancybox-slide--next {
+ opacity: 0;
+ transform: scale3d(0, 0, 0) translate3d(100%, 0, 0);
+}
+
+.fancybox-fx-circular.fancybox-slide--current {
+ opacity: 1;
+ transform: scale3d(1, 1, 1) translate3d(0, 0, 0);
+}
+
+/* transitionEffect: tube */
+
+.fancybox-fx-tube.fancybox-slide--previous {
+ transform: translate3d(-100%, 0, 0) scale(.1) skew(-10deg);
+}
+
+.fancybox-fx-tube.fancybox-slide--next {
+ transform: translate3d(100%, 0, 0) scale(.1) skew(10deg);
+}
+
+.fancybox-fx-tube.fancybox-slide--current {
+ transform: translate3d(0, 0, 0) scale(1);
+}
+
+/* Styling for Small-Screen Devices */
+@media all and (max-height: 576px) {
+ .fancybox-slide {
+ padding-left: 6px;
+ padding-right: 6px;
+ }
+
+ .fancybox-slide--image {
+ padding: 6px 0;
+ }
+
+ .fancybox-close-small {
+ right: -6px;
+ }
+
+ .fancybox-slide--image .fancybox-close-small {
+ background: #4e4e4e;
+ color: #f2f4f6;
+ height: 36px;
+ opacity: 1;
+ padding: 6px;
+ right: 0;
+ top: 0;
+ width: 36px;
+ }
+
+ .fancybox-caption {
+ padding-left: 12px;
+ padding-right: 12px;
+ }
+
+ @supports (padding: max(0px)) {
+ .fancybox-caption {
+ padding-left: max(12px, env(safe-area-inset-left));
+ padding-right: max(12px, env(safe-area-inset-right));
+ }
+ }
+}
+/* Share */
+
+.fancybox-share {
+ background: #f4f4f4;
+ border-radius: 3px;
+ max-width: 90%;
+ padding: 30px;
+ text-align: center;
+}
+
+.fancybox-share h1 {
+ color: #222;
+ font-size: 35px;
+ font-weight: 700;
+ margin: 0 0 20px 0;
+}
+
+.fancybox-share p {
+ margin: 0;
+ padding: 0;
+}
+
+.fancybox-share__button {
+ border: 0;
+ border-radius: 3px;
+ display: inline-block;
+ font-size: 14px;
+ font-weight: 700;
+ line-height: 40px;
+ margin: 0 5px 10px 5px;
+ min-width: 130px;
+ padding: 0 15px;
+ text-decoration: none;
+ transition: all .2s;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ white-space: nowrap;
+}
+
+.fancybox-share__button:visited,
+.fancybox-share__button:link {
+ color: #fff;
+}
+
+.fancybox-share__button:hover {
+ text-decoration: none;
+}
+
+.fancybox-share__button--fb {
+ background: #3b5998;
+}
+
+.fancybox-share__button--fb:hover {
+ background: #344e86;
+}
+
+.fancybox-share__button--pt {
+ background: #bd081d;
+}
+
+.fancybox-share__button--pt:hover {
+ background: #aa0719;
+}
+
+.fancybox-share__button--tw {
+ background: #1da1f2;
+}
+
+.fancybox-share__button--tw:hover {
+ background: #0d95e8;
+}
+
+.fancybox-share__button svg {
+ height: 25px;
+ margin-right: 7px;
+ position: relative;
+ top: -1px;
+ vertical-align: middle;
+ width: 25px;
+}
+
+.fancybox-share__button svg path {
+ fill: #fff;
+}
+
+.fancybox-share__input {
+ background: transparent;
+ border: 0;
+ border-bottom: 1px solid #d7d7d7;
+ border-radius: 0;
+ color: #5d5b5b;
+ font-size: 14px;
+ margin: 10px 0 0 0;
+ outline: none;
+ padding: 10px 15px;
+ width: 100%;
+}
+/* Thumbs */
+
+.fancybox-thumbs {
+ background: #ddd;
+ bottom: 0;
+ display: none;
+ margin: 0;
+ -webkit-overflow-scrolling: touch;
+ -ms-overflow-style: -ms-autohiding-scrollbar;
+ padding: 2px 2px 4px 2px;
+ position: absolute;
+ right: 0;
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+ top: 0;
+ width: 212px;
+ z-index: 99995;
+}
+
+.fancybox-thumbs-x {
+ overflow-x: auto;
+ overflow-y: hidden;
+}
+
+.fancybox-show-thumbs .fancybox-thumbs {
+ display: block;
+}
+
+.fancybox-show-thumbs .fancybox-inner {
+ right: 212px;
+}
+
+.fancybox-thumbs__list {
+ font-size: 0;
+ height: 100%;
+ list-style: none;
+ margin: 0;
+ overflow-x: hidden;
+ overflow-y: auto;
+ padding: 0;
+ position: absolute;
+ position: relative;
+ white-space: nowrap;
+ width: 100%;
+}
+
+.fancybox-thumbs-x .fancybox-thumbs__list {
+ overflow: hidden;
+}
+
+.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar {
+ width: 7px;
+}
+
+.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar-track {
+ background: #fff;
+ border-radius: 10px;
+ box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
+}
+
+.fancybox-thumbs-y .fancybox-thumbs__list::-webkit-scrollbar-thumb {
+ background: #2a2a2a;
+ border-radius: 10px;
+}
+
+.fancybox-thumbs__list a {
+ -webkit-backface-visibility: hidden;
+ backface-visibility: hidden;
+ background-color: rgba(0, 0, 0, .1);
+ background-position: center center;
+ background-repeat: no-repeat;
+ background-size: cover;
+ cursor: pointer;
+ float: left;
+ height: 75px;
+ margin: 2px;
+ max-height: calc(100% - 8px);
+ max-width: calc(50% - 4px);
+ outline: none;
+ overflow: hidden;
+ padding: 0;
+ position: relative;
+ -webkit-tap-highlight-color: transparent;
+ width: 100px;
+}
+
+.fancybox-thumbs__list a::before {
+ border: 6px solid #ff5268;
+ bottom: 0;
+ content: '';
+ left: 0;
+ opacity: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+ transition: all .2s cubic-bezier(.25, .46, .45, .94);
+ z-index: 99991;
+}
+
+.fancybox-thumbs__list a:focus::before {
+ opacity: .5;
+}
+
+.fancybox-thumbs__list a.fancybox-thumbs-active::before {
+ opacity: 1;
+}
+
+/* Styling for Small-Screen Devices */
+@media all and (max-width: 576px) {
+ .fancybox-thumbs {
+ width: 110px;
+ }
+
+ .fancybox-show-thumbs .fancybox-inner {
+ right: 110px;
+ }
+
+ .fancybox-thumbs__list a {
+ max-width: calc(100% - 10px);
+ }
+}
\ No newline at end of file
diff --git a/fancybox/asset/fancybox/jquery.fancybox.js b/fancybox/asset/fancybox/jquery.fancybox.js
new file mode 100644
index 00000000..806b2703
--- /dev/null
+++ b/fancybox/asset/fancybox/jquery.fancybox.js
@@ -0,0 +1,5632 @@
+// ==================================================
+// fancyBox v3.5.7
+//
+// Licensed GPLv3 for open source use
+// or fancyBox Commercial License for commercial use
+//
+// http://fancyapps.com/fancybox/
+// Copyright 2019 fancyApps
+//
+// ==================================================
+(function (window, document, $, undefined) {
+ "use strict";
+
+ window.console = window.console || {
+ info: function (stuff) {}
+ };
+
+ // If there's no jQuery, fancyBox can't work
+ // =========================================
+
+ if (!$) {
+ return;
+ }
+
+ // Check if fancyBox is already initialized
+ // ========================================
+
+ if ($.fn.fancybox) {
+ console.info("fancyBox already initialized");
+
+ return;
+ }
+
+ // Private default settings
+ // ========================
+
+ var defaults = {
+ // Close existing modals
+ // Set this to false if you do not need to stack multiple instances
+ closeExisting: false,
+
+ // Enable infinite gallery navigation
+ loop: false,
+
+ // Horizontal space between slides
+ gutter: 50,
+
+ // Enable keyboard navigation
+ keyboard: true,
+
+ // Should allow caption to overlap the content
+ preventCaptionOverlap: true,
+
+ // Should display navigation arrows at the screen edges
+ arrows: true,
+
+ // Should display counter at the top left corner
+ infobar: true,
+
+ // Should display close button (using `btnTpl.smallBtn` template) over the content
+ // Can be true, false, "auto"
+ // If "auto" - will be automatically enabled for "html", "inline" or "ajax" items
+ smallBtn: "auto",
+
+ // Should display toolbar (buttons at the top)
+ // Can be true, false, "auto"
+ // If "auto" - will be automatically hidden if "smallBtn" is enabled
+ toolbar: "auto",
+
+ // What buttons should appear in the top right corner.
+ // Buttons will be created using templates from `btnTpl` option
+ // and they will be placed into toolbar (class="fancybox-toolbar"` element)
+ buttons: [
+ "zoom",
+ //"share",
+ "slideShow",
+ //"fullScreen",
+ //"download",
+ "thumbs",
+ "close"
+ ],
+
+ // Detect "idle" time in seconds
+ idleTime: 3,
+
+ // Disable right-click and use simple image protection for images
+ protect: false,
+
+ // Shortcut to make content "modal" - disable keyboard navigtion, hide buttons, etc
+ modal: false,
+
+ image: {
+ // Wait for images to load before displaying
+ // true - wait for image to load and then display;
+ // false - display thumbnail and load the full-sized image over top,
+ // requires predefined image dimensions (`data-width` and `data-height` attributes)
+ preload: false
+ },
+
+ ajax: {
+ // Object containing settings for ajax request
+ settings: {
+ // This helps to indicate that request comes from the modal
+ // Feel free to change naming
+ data: {
+ fancybox: true
+ }
+ }
+ },
+
+ iframe: {
+ // Iframe template
+ tpl: '',
+
+ // Preload iframe before displaying it
+ // This allows to calculate iframe content width and height
+ // (note: Due to "Same Origin Policy", you can't get cross domain data).
+ preload: true,
+
+ // Custom CSS styling for iframe wrapping element
+ // You can use this to set custom iframe dimensions
+ css: {},
+
+ // Iframe tag attributes
+ attr: {
+ scrolling: "auto"
+ }
+ },
+
+ // For HTML5 video only
+ video: {
+ tpl: '",
+ format: "", // custom video format
+ autoStart: true
+ },
+
+ // Default content type if cannot be detected automatically
+ defaultType: "image",
+
+ // Open/close animation type
+ // Possible values:
+ // false - disable
+ // "zoom" - zoom images from/to thumbnail
+ // "fade"
+ // "zoom-in-out"
+ //
+ animationEffect: "zoom",
+
+ // Duration in ms for open/close animation
+ animationDuration: 366,
+
+ // Should image change opacity while zooming
+ // If opacity is "auto", then opacity will be changed if image and thumbnail have different aspect ratios
+ zoomOpacity: "auto",
+
+ // Transition effect between slides
+ //
+ // Possible values:
+ // false - disable
+ // "fade'
+ // "slide'
+ // "circular'
+ // "tube'
+ // "zoom-in-out'
+ // "rotate'
+ //
+ transitionEffect: "fade",
+
+ // Duration in ms for transition animation
+ transitionDuration: 366,
+
+ // Custom CSS class for slide element
+ slideClass: "",
+
+ // Custom CSS class for layout
+ baseClass: "",
+
+ // Base template for layout
+ baseTpl: '
',
+
+ btnTpl: {
+ download: '' +
+ '' +
+ "",
+
+ zoom: '",
+
+ close: '",
+
+ // Arrows
+ arrowLeft: '",
+
+ arrowRight: '",
+
+ // This small close button will be appended to your html/inline/ajax content by default,
+ // if "smallBtn" option is not set to false
+ smallBtn: '"
+ },
+
+ // Container is injected into this element
+ parentEl: "body",
+
+ // Hide browser vertical scrollbars; use at your own risk
+ hideScrollbar: true,
+
+ // Focus handling
+ // ==============
+
+ // Try to focus on the first focusable element after opening
+ autoFocus: true,
+
+ // Put focus back to active element after closing
+ backFocus: true,
+
+ // Do not let user to focus on element outside modal content
+ trapFocus: true,
+
+ // Module specific options
+ // =======================
+
+ fullScreen: {
+ autoStart: false
+ },
+
+ // Set `touch: false` to disable panning/swiping
+ touch: {
+ vertical: true, // Allow to drag content vertically
+ momentum: true // Continue movement after releasing mouse/touch when panning
+ },
+
+ // Hash value when initializing manually,
+ // set `false` to disable hash change
+ hash: null,
+
+ // Customize or add new media types
+ // Example:
+ /*
+ media : {
+ youtube : {
+ params : {
+ autoplay : 0
+ }
+ }
+ }
+ */
+ media: {},
+
+ slideShow: {
+ autoStart: false,
+ speed: 3000
+ },
+
+ thumbs: {
+ autoStart: false, // Display thumbnails on opening
+ hideOnClose: true, // Hide thumbnail grid when closing animation starts
+ parentEl: ".fancybox-container", // Container is injected into this element
+ axis: "y" // Vertical (y) or horizontal (x) scrolling
+ },
+
+ // Use mousewheel to navigate gallery
+ // If 'auto' - enabled for images only
+ wheel: "auto",
+
+ // Callbacks
+ //==========
+
+ // See Documentation/API/Events for more information
+ // Example:
+ /*
+ afterShow: function( instance, current ) {
+ console.info( 'Clicked element:' );
+ console.info( current.opts.$orig );
+ }
+ */
+
+ onInit: $.noop, // When instance has been initialized
+
+ beforeLoad: $.noop, // Before the content of a slide is being loaded
+ afterLoad: $.noop, // When the content of a slide is done loading
+
+ beforeShow: $.noop, // Before open animation starts
+ afterShow: $.noop, // When content is done loading and animating
+
+ beforeClose: $.noop, // Before the instance attempts to close. Return false to cancel the close.
+ afterClose: $.noop, // After instance has been closed
+
+ onActivate: $.noop, // When instance is brought to front
+ onDeactivate: $.noop, // When other instance has been activated
+
+ // Interaction
+ // ===========
+
+ // Use options below to customize taken action when user clicks or double clicks on the fancyBox area,
+ // each option can be string or method that returns value.
+ //
+ // Possible values:
+ // "close" - close instance
+ // "next" - move to next gallery item
+ // "nextOrClose" - move to next gallery item or close if gallery has only one item
+ // "toggleControls" - show/hide controls
+ // "zoom" - zoom image (if loaded)
+ // false - do nothing
+
+ // Clicked on the content
+ clickContent: function (current, event) {
+ return current.type === "image" ? "zoom" : false;
+ },
+
+ // Clicked on the slide
+ clickSlide: "close",
+
+ // Clicked on the background (backdrop) element;
+ // if you have not changed the layout, then most likely you need to use `clickSlide` option
+ clickOutside: "close",
+
+ // Same as previous two, but for double click
+ dblclickContent: false,
+ dblclickSlide: false,
+ dblclickOutside: false,
+
+ // Custom options when mobile device is detected
+ // =============================================
+
+ mobile: {
+ preventCaptionOverlap: false,
+ idleTime: false,
+ clickContent: function (current, event) {
+ return current.type === "image" ? "toggleControls" : false;
+ },
+ clickSlide: function (current, event) {
+ return current.type === "image" ? "toggleControls" : "close";
+ },
+ dblclickContent: function (current, event) {
+ return current.type === "image" ? "zoom" : false;
+ },
+ dblclickSlide: function (current, event) {
+ return current.type === "image" ? "zoom" : false;
+ }
+ },
+
+ // Internationalization
+ // ====================
+
+ lang: "en",
+ i18n: {
+ en: {
+ CLOSE: "Close",
+ NEXT: "Next",
+ PREV: "Previous",
+ ERROR: "The requested content cannot be loaded. Please try again later.",
+ PLAY_START: "Start slideshow",
+ PLAY_STOP: "Pause slideshow",
+ FULL_SCREEN: "Full screen",
+ THUMBS: "Thumbnails",
+ DOWNLOAD: "Download",
+ SHARE: "Share",
+ ZOOM: "Zoom"
+ },
+ de: {
+ CLOSE: "Schließen",
+ NEXT: "Weiter",
+ PREV: "Zurück",
+ ERROR: "Die angeforderten Daten konnten nicht geladen werden. Bitte versuchen Sie es später nochmal.",
+ PLAY_START: "Diaschau starten",
+ PLAY_STOP: "Diaschau beenden",
+ FULL_SCREEN: "Vollbild",
+ THUMBS: "Vorschaubilder",
+ DOWNLOAD: "Herunterladen",
+ SHARE: "Teilen",
+ ZOOM: "Vergrößern"
+ }
+ }
+ };
+
+ // Few useful variables and methods
+ // ================================
+
+ var $W = $(window);
+ var $D = $(document);
+
+ var called = 0;
+
+ // Check if an object is a jQuery object and not a native JavaScript object
+ // ========================================================================
+ var isQuery = function (obj) {
+ return obj && obj.hasOwnProperty && obj instanceof $;
+ };
+
+ // Handle multiple browsers for "requestAnimationFrame" and "cancelAnimationFrame"
+ // ===============================================================================
+ var requestAFrame = (function () {
+ return (
+ window.requestAnimationFrame ||
+ window.webkitRequestAnimationFrame ||
+ window.mozRequestAnimationFrame ||
+ window.oRequestAnimationFrame ||
+ // if all else fails, use setTimeout
+ function (callback) {
+ return window.setTimeout(callback, 1000 / 60);
+ }
+ );
+ })();
+
+ var cancelAFrame = (function () {
+ return (
+ window.cancelAnimationFrame ||
+ window.webkitCancelAnimationFrame ||
+ window.mozCancelAnimationFrame ||
+ window.oCancelAnimationFrame ||
+ function (id) {
+ window.clearTimeout(id);
+ }
+ );
+ })();
+
+ // Detect the supported transition-end event property name
+ // =======================================================
+ var transitionEnd = (function () {
+ var el = document.createElement("fakeelement"),
+ t;
+
+ var transitions = {
+ transition: "transitionend",
+ OTransition: "oTransitionEnd",
+ MozTransition: "transitionend",
+ WebkitTransition: "webkitTransitionEnd"
+ };
+
+ for (t in transitions) {
+ if (el.style[t] !== undefined) {
+ return transitions[t];
+ }
+ }
+
+ return "transitionend";
+ })();
+
+ // Force redraw on an element.
+ // This helps in cases where the browser doesn't redraw an updated element properly
+ // ================================================================================
+ var forceRedraw = function ($el) {
+ return $el && $el.length && $el[0].offsetHeight;
+ };
+
+ // Exclude array (`buttons`) options from deep merging
+ // ===================================================
+ var mergeOpts = function (opts1, opts2) {
+ var rez = $.extend(true, {}, opts1, opts2);
+
+ $.each(opts2, function (key, value) {
+ if ($.isArray(value)) {
+ rez[key] = value;
+ }
+ });
+
+ return rez;
+ };
+
+ // How much of an element is visible in viewport
+ // =============================================
+
+ var inViewport = function (elem) {
+ var elemCenter, rez;
+
+ if (!elem || elem.ownerDocument !== document) {
+ return false;
+ }
+
+ $(".fancybox-container").css("pointer-events", "none");
+
+ elemCenter = {
+ x: elem.getBoundingClientRect().left + elem.offsetWidth / 2,
+ y: elem.getBoundingClientRect().top + elem.offsetHeight / 2
+ };
+
+ rez = document.elementFromPoint(elemCenter.x, elemCenter.y) === elem;
+
+ $(".fancybox-container").css("pointer-events", "");
+
+ return rez;
+ };
+
+ // Class definition
+ // ================
+
+ var FancyBox = function (content, opts, index) {
+ var self = this;
+
+ self.opts = mergeOpts({
+ index: index
+ }, $.fancybox.defaults);
+
+ if ($.isPlainObject(opts)) {
+ self.opts = mergeOpts(self.opts, opts);
+ }
+
+ if ($.fancybox.isMobile) {
+ self.opts = mergeOpts(self.opts, self.opts.mobile);
+ }
+
+ self.id = self.opts.id || ++called;
+
+ self.currIndex = parseInt(self.opts.index, 10) || 0;
+ self.prevIndex = null;
+
+ self.prevPos = null;
+ self.currPos = 0;
+
+ self.firstRun = true;
+
+ // All group items
+ self.group = [];
+
+ // Existing slides (for current, next and previous gallery items)
+ self.slides = {};
+
+ // Create group elements
+ self.addContent(content);
+
+ if (!self.group.length) {
+ return;
+ }
+
+ self.init();
+ };
+
+ $.extend(FancyBox.prototype, {
+ // Create DOM structure
+ // ====================
+
+ init: function () {
+ var self = this,
+ firstItem = self.group[self.currIndex],
+ firstItemOpts = firstItem.opts,
+ $container,
+ buttonStr;
+
+ if (firstItemOpts.closeExisting) {
+ $.fancybox.close(true);
+ }
+
+ // Hide scrollbars
+ // ===============
+
+ $("body").addClass("fancybox-active");
+
+ if (
+ !$.fancybox.getInstance() &&
+ firstItemOpts.hideScrollbar !== false &&
+ !$.fancybox.isMobile &&
+ document.body.scrollHeight > window.innerHeight
+ ) {
+ $("head").append(
+ '"
+ );
+
+ $("body").addClass("compensate-for-scrollbar");
+ }
+
+ // Build html markup and set references
+ // ====================================
+
+ // Build html code for buttons and insert into main template
+ buttonStr = "";
+
+ $.each(firstItemOpts.buttons, function (index, value) {
+ buttonStr += firstItemOpts.btnTpl[value] || "";
+ });
+
+ // Create markup from base template, it will be initially hidden to
+ // avoid unnecessary work like painting while initializing is not complete
+ $container = $(
+ self.translate(
+ self,
+ firstItemOpts.baseTpl
+ .replace("{{buttons}}", buttonStr)
+ .replace("{{arrows}}", firstItemOpts.btnTpl.arrowLeft + firstItemOpts.btnTpl.arrowRight)
+ )
+ )
+ .attr("id", "fancybox-container-" + self.id)
+ .addClass(firstItemOpts.baseClass)
+ .data("FancyBox", self)
+ .appendTo(firstItemOpts.parentEl);
+
+ // Create object holding references to jQuery wrapped nodes
+ self.$refs = {
+ container: $container
+ };
+
+ ["bg", "inner", "infobar", "toolbar", "stage", "caption", "navigation"].forEach(function (item) {
+ self.$refs[item] = $container.find(".fancybox-" + item);
+ });
+
+ self.trigger("onInit");
+
+ // Enable events, deactive previous instances
+ self.activate();
+
+ // Build slides, load and reveal content
+ self.jumpTo(self.currIndex);
+ },
+
+ // Simple i18n support - replaces object keys found in template
+ // with corresponding values
+ // ============================================================
+
+ translate: function (obj, str) {
+ var arr = obj.opts.i18n[obj.opts.lang] || obj.opts.i18n.en;
+
+ return str.replace(/\{\{(\w+)\}\}/g, function (match, n) {
+ return arr[n] === undefined ? match : arr[n];
+ });
+ },
+
+ // Populate current group with fresh content
+ // Check if each object has valid type and content
+ // ===============================================
+
+ addContent: function (content) {
+ var self = this,
+ items = $.makeArray(content),
+ thumbs;
+
+ $.each(items, function (i, item) {
+ var obj = {},
+ opts = {},
+ $item,
+ type,
+ found,
+ src,
+ srcParts;
+
+ // Step 1 - Make sure we have an object
+ // ====================================
+
+ if ($.isPlainObject(item)) {
+ // We probably have manual usage here, something like
+ // $.fancybox.open( [ { src : "image.jpg", type : "image" } ] )
+
+ obj = item;
+ opts = item.opts || item;
+ } else if ($.type(item) === "object" && $(item).length) {
+ // Here we probably have jQuery collection returned by some selector
+ $item = $(item);
+
+ // Support attributes like `data-options='{"touch" : false}'` and `data-touch='false'`
+ opts = $item.data() || {};
+ opts = $.extend(true, {}, opts, opts.options);
+
+ // Here we store clicked element
+ opts.$orig = $item;
+
+ obj.src = self.opts.src || opts.src || $item.attr("href");
+
+ // Assume that simple syntax is used, for example:
+ // `$.fancybox.open( $("#test"), {} );`
+ if (!obj.type && !obj.src) {
+ obj.type = "inline";
+ obj.src = item;
+ }
+ } else {
+ // Assume we have a simple html code, for example:
+ // $.fancybox.open( '
Hi!
' );
+ obj = {
+ type: "html",
+ src: item + ""
+ };
+ }
+
+ // Each gallery object has full collection of options
+ obj.opts = $.extend(true, {}, self.opts, opts);
+
+ // Do not merge buttons array
+ if ($.isArray(opts.buttons)) {
+ obj.opts.buttons = opts.buttons;
+ }
+
+ if ($.fancybox.isMobile && obj.opts.mobile) {
+ obj.opts = mergeOpts(obj.opts, obj.opts.mobile);
+ }
+
+ // Step 2 - Make sure we have content type, if not - try to guess
+ // ==============================================================
+
+ type = obj.type || obj.opts.type;
+ src = obj.src || "";
+
+ if (!type && src) {
+ if ((found = src.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))) {
+ type = "video";
+
+ if (!obj.opts.video.format) {
+ obj.opts.video.format = "video/" + (found[1] === "ogv" ? "ogg" : found[1]);
+ }
+ } else if (src.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)) {
+ type = "image";
+ } else if (src.match(/\.(pdf)((\?|#).*)?$/i)) {
+ type = "iframe";
+ obj = $.extend(true, obj, {
+ contentType: "pdf",
+ opts: {
+ iframe: {
+ preload: false
+ }
+ }
+ });
+ } else if (src.charAt(0) === "#") {
+ type = "inline";
+ }
+ }
+
+ if (type) {
+ obj.type = type;
+ } else {
+ self.trigger("objectNeedsType", obj);
+ }
+
+ if (!obj.contentType) {
+ obj.contentType = $.inArray(obj.type, ["html", "inline", "ajax"]) > -1 ? "html" : obj.type;
+ }
+
+ // Step 3 - Some adjustments
+ // =========================
+
+ obj.index = self.group.length;
+
+ if (obj.opts.smallBtn == "auto") {
+ obj.opts.smallBtn = $.inArray(obj.type, ["html", "inline", "ajax"]) > -1;
+ }
+
+ if (obj.opts.toolbar === "auto") {
+ obj.opts.toolbar = !obj.opts.smallBtn;
+ }
+
+ // Find thumbnail image, check if exists and if is in the viewport
+ obj.$thumb = obj.opts.$thumb || null;
+
+ if (obj.opts.$trigger && obj.index === self.opts.index) {
+ obj.$thumb = obj.opts.$trigger.find("img:first");
+
+ if (obj.$thumb.length) {
+ obj.opts.$orig = obj.opts.$trigger;
+ }
+ }
+
+ if (!(obj.$thumb && obj.$thumb.length) && obj.opts.$orig) {
+ obj.$thumb = obj.opts.$orig.find("img:first");
+ }
+
+ if (obj.$thumb && !obj.$thumb.length) {
+ obj.$thumb = null;
+ }
+
+ obj.thumb = obj.opts.thumb || (obj.$thumb ? obj.$thumb[0].src : null);
+
+ // "caption" is a "special" option, it can be used to customize caption per gallery item
+ if ($.type(obj.opts.caption) === "function") {
+ obj.opts.caption = obj.opts.caption.apply(item, [self, obj]);
+ }
+
+ if ($.type(self.opts.caption) === "function") {
+ obj.opts.caption = self.opts.caption.apply(item, [self, obj]);
+ }
+
+ // Make sure we have caption as a string or jQuery object
+ if (!(obj.opts.caption instanceof $)) {
+ obj.opts.caption = obj.opts.caption === undefined ? "" : obj.opts.caption + "";
+ }
+
+ // Check if url contains "filter" used to filter the content
+ // Example: "ajax.html #something"
+ if (obj.type === "ajax") {
+ srcParts = src.split(/\s+/, 2);
+
+ if (srcParts.length > 1) {
+ obj.src = srcParts.shift();
+
+ obj.opts.filter = srcParts.shift();
+ }
+ }
+
+ // Hide all buttons and disable interactivity for modal items
+ if (obj.opts.modal) {
+ obj.opts = $.extend(true, obj.opts, {
+ trapFocus: true,
+ // Remove buttons
+ infobar: 0,
+ toolbar: 0,
+
+ smallBtn: 0,
+
+ // Disable keyboard navigation
+ keyboard: 0,
+
+ // Disable some modules
+ slideShow: 0,
+ fullScreen: 0,
+ thumbs: 0,
+ touch: 0,
+
+ // Disable click event handlers
+ clickContent: false,
+ clickSlide: false,
+ clickOutside: false,
+ dblclickContent: false,
+ dblclickSlide: false,
+ dblclickOutside: false
+ });
+ }
+
+ // Step 4 - Add processed object to group
+ // ======================================
+
+ self.group.push(obj);
+ });
+
+ // Update controls if gallery is already opened
+ if (Object.keys(self.slides).length) {
+ self.updateControls();
+
+ // Update thumbnails, if needed
+ thumbs = self.Thumbs;
+
+ if (thumbs && thumbs.isActive) {
+ thumbs.create();
+
+ thumbs.focus();
+ }
+ }
+ },
+
+ // Attach an event handler functions for:
+ // - navigation buttons
+ // - browser scrolling, resizing;
+ // - focusing
+ // - keyboard
+ // - detecting inactivity
+ // ======================================
+
+ addEvents: function () {
+ var self = this;
+
+ self.removeEvents();
+
+ // Make navigation elements clickable
+ // ==================================
+
+ self.$refs.container
+ .on("click.fb-close", "[data-fancybox-close]", function (e) {
+ e.stopPropagation();
+ e.preventDefault();
+
+ self.close(e);
+ })
+ .on("touchstart.fb-prev click.fb-prev", "[data-fancybox-prev]", function (e) {
+ e.stopPropagation();
+ e.preventDefault();
+
+ self.previous();
+ })
+ .on("touchstart.fb-next click.fb-next", "[data-fancybox-next]", function (e) {
+ e.stopPropagation();
+ e.preventDefault();
+
+ self.next();
+ })
+ .on("click.fb", "[data-fancybox-zoom]", function (e) {
+ // Click handler for zoom button
+ self[self.isScaledDown() ? "scaleToActual" : "scaleToFit"]();
+ });
+
+ // Handle page scrolling and browser resizing
+ // ==========================================
+
+ $W.on("orientationchange.fb resize.fb", function (e) {
+ if (e && e.originalEvent && e.originalEvent.type === "resize") {
+ if (self.requestId) {
+ cancelAFrame(self.requestId);
+ }
+
+ self.requestId = requestAFrame(function () {
+ self.update(e);
+ });
+ } else {
+ if (self.current && self.current.type === "iframe") {
+ self.$refs.stage.hide();
+ }
+
+ setTimeout(
+ function () {
+ self.$refs.stage.show();
+
+ self.update(e);
+ },
+ $.fancybox.isMobile ? 600 : 250
+ );
+ }
+ });
+
+ $D.on("keydown.fb", function (e) {
+ var instance = $.fancybox ? $.fancybox.getInstance() : null,
+ current = instance.current,
+ keycode = e.keyCode || e.which;
+
+ // Trap keyboard focus inside of the modal
+ // =======================================
+
+ if (keycode == 9) {
+ if (current.opts.trapFocus) {
+ self.focus(e);
+ }
+
+ return;
+ }
+
+ // Enable keyboard navigation
+ // ==========================
+
+ if (!current.opts.keyboard || e.ctrlKey || e.altKey || e.shiftKey || $(e.target).is("input,textarea,video,audio,select")) {
+ return;
+ }
+
+ // Backspace and Esc keys
+ if (keycode === 8 || keycode === 27) {
+ e.preventDefault();
+
+ self.close(e);
+
+ return;
+ }
+
+ // Left arrow and Up arrow
+ if (keycode === 37 || keycode === 38) {
+ e.preventDefault();
+
+ self.previous();
+
+ return;
+ }
+
+ // Righ arrow and Down arrow
+ if (keycode === 39 || keycode === 40) {
+ e.preventDefault();
+
+ self.next();
+
+ return;
+ }
+
+ self.trigger("afterKeydown", e, keycode);
+ });
+
+ // Hide controls after some inactivity period
+ if (self.group[self.currIndex].opts.idleTime) {
+ self.idleSecondsCounter = 0;
+
+ $D.on(
+ "mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",
+ function (e) {
+ self.idleSecondsCounter = 0;
+
+ if (self.isIdle) {
+ self.showControls();
+ }
+
+ self.isIdle = false;
+ }
+ );
+
+ self.idleInterval = window.setInterval(function () {
+ self.idleSecondsCounter++;
+
+ if (self.idleSecondsCounter >= self.group[self.currIndex].opts.idleTime && !self.isDragging) {
+ self.isIdle = true;
+ self.idleSecondsCounter = 0;
+
+ self.hideControls();
+ }
+ }, 1000);
+ }
+ },
+
+ // Remove events added by the core
+ // ===============================
+
+ removeEvents: function () {
+ var self = this;
+
+ $W.off("orientationchange.fb resize.fb");
+ $D.off("keydown.fb .fb-idle");
+
+ this.$refs.container.off(".fb-close .fb-prev .fb-next");
+
+ if (self.idleInterval) {
+ window.clearInterval(self.idleInterval);
+
+ self.idleInterval = null;
+ }
+ },
+
+ // Change to previous gallery item
+ // ===============================
+
+ previous: function (duration) {
+ return this.jumpTo(this.currPos - 1, duration);
+ },
+
+ // Change to next gallery item
+ // ===========================
+
+ next: function (duration) {
+ return this.jumpTo(this.currPos + 1, duration);
+ },
+
+ // Switch to selected gallery item
+ // ===============================
+
+ jumpTo: function (pos, duration) {
+ var self = this,
+ groupLen = self.group.length,
+ firstRun,
+ isMoved,
+ loop,
+ current,
+ previous,
+ slidePos,
+ stagePos,
+ prop,
+ diff;
+
+ if (self.isDragging || self.isClosing || (self.isAnimating && self.firstRun)) {
+ return;
+ }
+
+ // Should loop?
+ pos = parseInt(pos, 10);
+ loop = self.current ? self.current.opts.loop : self.opts.loop;
+
+ if (!loop && (pos < 0 || pos >= groupLen)) {
+ return false;
+ }
+
+ // Check if opening for the first time; this helps to speed things up
+ firstRun = self.firstRun = !Object.keys(self.slides).length;
+
+ // Create slides
+ previous = self.current;
+
+ self.prevIndex = self.currIndex;
+ self.prevPos = self.currPos;
+
+ current = self.createSlide(pos);
+
+ if (groupLen > 1) {
+ if (loop || current.index < groupLen - 1) {
+ self.createSlide(pos + 1);
+ }
+
+ if (loop || current.index > 0) {
+ self.createSlide(pos - 1);
+ }
+ }
+
+ self.current = current;
+ self.currIndex = current.index;
+ self.currPos = current.pos;
+
+ self.trigger("beforeShow", firstRun);
+
+ self.updateControls();
+
+ // Validate duration length
+ current.forcedDuration = undefined;
+
+ if ($.isNumeric(duration)) {
+ current.forcedDuration = duration;
+ } else {
+ duration = current.opts[firstRun ? "animationDuration" : "transitionDuration"];
+ }
+
+ duration = parseInt(duration, 10);
+
+ // Check if user has swiped the slides or if still animating
+ isMoved = self.isMoved(current);
+
+ // Make sure current slide is visible
+ current.$slide.addClass("fancybox-slide--current");
+
+ // Fresh start - reveal container, current slide and start loading content
+ if (firstRun) {
+ if (current.opts.animationEffect && duration) {
+ self.$refs.container.css("transition-duration", duration + "ms");
+ }
+
+ self.$refs.container.addClass("fancybox-is-open").trigger("focus");
+
+ // Attempt to load content into slide
+ // This will later call `afterLoad` -> `revealContent`
+ self.loadSlide(current);
+
+ self.preload("image");
+
+ return;
+ }
+
+ // Get actual slide/stage positions (before cleaning up)
+ slidePos = $.fancybox.getTranslate(previous.$slide);
+ stagePos = $.fancybox.getTranslate(self.$refs.stage);
+
+ // Clean up all slides
+ $.each(self.slides, function (index, slide) {
+ $.fancybox.stop(slide.$slide, true);
+ });
+
+ if (previous.pos !== current.pos) {
+ previous.isComplete = false;
+ }
+
+ previous.$slide.removeClass("fancybox-slide--complete fancybox-slide--current");
+
+ // If slides are out of place, then animate them to correct position
+ if (isMoved) {
+ // Calculate horizontal swipe distance
+ diff = slidePos.left - (previous.pos * slidePos.width + previous.pos * previous.opts.gutter);
+
+ $.each(self.slides, function (index, slide) {
+ slide.$slide.removeClass("fancybox-animated").removeClass(function (index, className) {
+ return (className.match(/(^|\s)fancybox-fx-\S+/g) || []).join(" ");
+ });
+
+ // Make sure that each slide is in equal distance
+ // This is mostly needed for freshly added slides, because they are not yet positioned
+ var leftPos = slide.pos * slidePos.width + slide.pos * slide.opts.gutter;
+
+ $.fancybox.setTranslate(slide.$slide, {
+ top: 0,
+ left: leftPos - stagePos.left + diff
+ });
+
+ if (slide.pos !== current.pos) {
+ slide.$slide.addClass("fancybox-slide--" + (slide.pos > current.pos ? "next" : "previous"));
+ }
+
+ // Redraw to make sure that transition will start
+ forceRedraw(slide.$slide);
+
+ // Animate the slide
+ $.fancybox.animate(
+ slide.$slide, {
+ top: 0,
+ left: (slide.pos - current.pos) * slidePos.width + (slide.pos - current.pos) * slide.opts.gutter
+ },
+ duration,
+ function () {
+ slide.$slide
+ .css({
+ transform: "",
+ opacity: ""
+ })
+ .removeClass("fancybox-slide--next fancybox-slide--previous");
+
+ if (slide.pos === self.currPos) {
+ self.complete();
+ }
+ }
+ );
+ });
+ } else if (duration && current.opts.transitionEffect) {
+ // Set transition effect for previously active slide
+ prop = "fancybox-animated fancybox-fx-" + current.opts.transitionEffect;
+
+ previous.$slide.addClass("fancybox-slide--" + (previous.pos > current.pos ? "next" : "previous"));
+
+ $.fancybox.animate(
+ previous.$slide,
+ prop,
+ duration,
+ function () {
+ previous.$slide.removeClass(prop).removeClass("fancybox-slide--next fancybox-slide--previous");
+ },
+ false
+ );
+ }
+
+ if (current.isLoaded) {
+ self.revealContent(current);
+ } else {
+ self.loadSlide(current);
+ }
+
+ self.preload("image");
+ },
+
+ // Create new "slide" element
+ // These are gallery items that are actually added to DOM
+ // =======================================================
+
+ createSlide: function (pos) {
+ var self = this,
+ $slide,
+ index;
+
+ index = pos % self.group.length;
+ index = index < 0 ? self.group.length + index : index;
+
+ if (!self.slides[pos] && self.group[index]) {
+ $slide = $('').appendTo(self.$refs.stage);
+
+ self.slides[pos] = $.extend(true, {}, self.group[index], {
+ pos: pos,
+ $slide: $slide,
+ isLoaded: false
+ });
+
+ self.updateSlide(self.slides[pos]);
+ }
+
+ return self.slides[pos];
+ },
+
+ // Scale image to the actual size of the image;
+ // x and y values should be relative to the slide
+ // ==============================================
+
+ scaleToActual: function (x, y, duration) {
+ var self = this,
+ current = self.current,
+ $content = current.$content,
+ canvasWidth = $.fancybox.getTranslate(current.$slide).width,
+ canvasHeight = $.fancybox.getTranslate(current.$slide).height,
+ newImgWidth = current.width,
+ newImgHeight = current.height,
+ imgPos,
+ posX,
+ posY,
+ scaleX,
+ scaleY;
+
+ if (self.isAnimating || self.isMoved() || !$content || !(current.type == "image" && current.isLoaded && !current.hasError)) {
+ return;
+ }
+
+ self.isAnimating = true;
+
+ $.fancybox.stop($content);
+
+ x = x === undefined ? canvasWidth * 0.5 : x;
+ y = y === undefined ? canvasHeight * 0.5 : y;
+
+ imgPos = $.fancybox.getTranslate($content);
+
+ imgPos.top -= $.fancybox.getTranslate(current.$slide).top;
+ imgPos.left -= $.fancybox.getTranslate(current.$slide).left;
+
+ scaleX = newImgWidth / imgPos.width;
+ scaleY = newImgHeight / imgPos.height;
+
+ // Get center position for original image
+ posX = canvasWidth * 0.5 - newImgWidth * 0.5;
+ posY = canvasHeight * 0.5 - newImgHeight * 0.5;
+
+ // Make sure image does not move away from edges
+ if (newImgWidth > canvasWidth) {
+ posX = imgPos.left * scaleX - (x * scaleX - x);
+
+ if (posX > 0) {
+ posX = 0;
+ }
+
+ if (posX < canvasWidth - newImgWidth) {
+ posX = canvasWidth - newImgWidth;
+ }
+ }
+
+ if (newImgHeight > canvasHeight) {
+ posY = imgPos.top * scaleY - (y * scaleY - y);
+
+ if (posY > 0) {
+ posY = 0;
+ }
+
+ if (posY < canvasHeight - newImgHeight) {
+ posY = canvasHeight - newImgHeight;
+ }
+ }
+
+ self.updateCursor(newImgWidth, newImgHeight);
+
+ $.fancybox.animate(
+ $content, {
+ top: posY,
+ left: posX,
+ scaleX: scaleX,
+ scaleY: scaleY
+ },
+ duration || 366,
+ function () {
+ self.isAnimating = false;
+ }
+ );
+
+ // Stop slideshow
+ if (self.SlideShow && self.SlideShow.isActive) {
+ self.SlideShow.stop();
+ }
+ },
+
+ // Scale image to fit inside parent element
+ // ========================================
+
+ scaleToFit: function (duration) {
+ var self = this,
+ current = self.current,
+ $content = current.$content,
+ end;
+
+ if (self.isAnimating || self.isMoved() || !$content || !(current.type == "image" && current.isLoaded && !current.hasError)) {
+ return;
+ }
+
+ self.isAnimating = true;
+
+ $.fancybox.stop($content);
+
+ end = self.getFitPos(current);
+
+ self.updateCursor(end.width, end.height);
+
+ $.fancybox.animate(
+ $content, {
+ top: end.top,
+ left: end.left,
+ scaleX: end.width / $content.width(),
+ scaleY: end.height / $content.height()
+ },
+ duration || 366,
+ function () {
+ self.isAnimating = false;
+ }
+ );
+ },
+
+ // Calculate image size to fit inside viewport
+ // ===========================================
+
+ getFitPos: function (slide) {
+ var self = this,
+ $content = slide.$content,
+ $slide = slide.$slide,
+ width = slide.width || slide.opts.width,
+ height = slide.height || slide.opts.height,
+ maxWidth,
+ maxHeight,
+ minRatio,
+ aspectRatio,
+ rez = {};
+
+ if (!slide.isLoaded || !$content || !$content.length) {
+ return false;
+ }
+
+ maxWidth = $.fancybox.getTranslate(self.$refs.stage).width;
+ maxHeight = $.fancybox.getTranslate(self.$refs.stage).height;
+
+ maxWidth -=
+ parseFloat($slide.css("paddingLeft")) +
+ parseFloat($slide.css("paddingRight")) +
+ parseFloat($content.css("marginLeft")) +
+ parseFloat($content.css("marginRight"));
+
+ maxHeight -=
+ parseFloat($slide.css("paddingTop")) +
+ parseFloat($slide.css("paddingBottom")) +
+ parseFloat($content.css("marginTop")) +
+ parseFloat($content.css("marginBottom"));
+
+ if (!width || !height) {
+ width = maxWidth;
+ height = maxHeight;
+ }
+
+ minRatio = Math.min(1, maxWidth / width, maxHeight / height);
+
+ width = minRatio * width;
+ height = minRatio * height;
+
+ // Adjust width/height to precisely fit into container
+ if (width > maxWidth - 0.5) {
+ width = maxWidth;
+ }
+
+ if (height > maxHeight - 0.5) {
+ height = maxHeight;
+ }
+
+ if (slide.type === "image") {
+ rez.top = Math.floor((maxHeight - height) * 0.5) + parseFloat($slide.css("paddingTop"));
+ rez.left = Math.floor((maxWidth - width) * 0.5) + parseFloat($slide.css("paddingLeft"));
+ } else if (slide.contentType === "video") {
+ // Force aspect ratio for the video
+ // "I say the whole world must learn of our peaceful ways… by force!"
+ aspectRatio = slide.opts.width && slide.opts.height ? width / height : slide.opts.ratio || 16 / 9;
+
+ if (height > width / aspectRatio) {
+ height = width / aspectRatio;
+ } else if (width > height * aspectRatio) {
+ width = height * aspectRatio;
+ }
+ }
+
+ rez.width = width;
+ rez.height = height;
+
+ return rez;
+ },
+
+ // Update content size and position for all slides
+ // ==============================================
+
+ update: function (e) {
+ var self = this;
+
+ $.each(self.slides, function (key, slide) {
+ self.updateSlide(slide, e);
+ });
+ },
+
+ // Update slide content position and size
+ // ======================================
+
+ updateSlide: function (slide, e) {
+ var self = this,
+ $content = slide && slide.$content,
+ width = slide.width || slide.opts.width,
+ height = slide.height || slide.opts.height,
+ $slide = slide.$slide;
+
+ // First, prevent caption overlap, if needed
+ self.adjustCaption(slide);
+
+ // Then resize content to fit inside the slide
+ if ($content && (width || height || slide.contentType === "video") && !slide.hasError) {
+ $.fancybox.stop($content);
+
+ $.fancybox.setTranslate($content, self.getFitPos(slide));
+
+ if (slide.pos === self.currPos) {
+ self.isAnimating = false;
+
+ self.updateCursor();
+ }
+ }
+
+ // Then some adjustments
+ self.adjustLayout(slide);
+
+ if ($slide.length) {
+ $slide.trigger("refresh");
+
+ if (slide.pos === self.currPos) {
+ self.$refs.toolbar
+ .add(self.$refs.navigation.find(".fancybox-button--arrow_right"))
+ .toggleClass("compensate-for-scrollbar", $slide.get(0).scrollHeight > $slide.get(0).clientHeight);
+ }
+ }
+
+ self.trigger("onUpdate", slide, e);
+ },
+
+ // Horizontally center slide
+ // =========================
+
+ centerSlide: function (duration) {
+ var self = this,
+ current = self.current,
+ $slide = current.$slide;
+
+ if (self.isClosing || !current) {
+ return;
+ }
+
+ $slide.siblings().css({
+ transform: "",
+ opacity: ""
+ });
+
+ $slide
+ .parent()
+ .children()
+ .removeClass("fancybox-slide--previous fancybox-slide--next");
+
+ $.fancybox.animate(
+ $slide, {
+ top: 0,
+ left: 0,
+ opacity: 1
+ },
+ duration === undefined ? 0 : duration,
+ function () {
+ // Clean up
+ $slide.css({
+ transform: "",
+ opacity: ""
+ });
+
+ if (!current.isComplete) {
+ self.complete();
+ }
+ },
+ false
+ );
+ },
+
+ // Check if current slide is moved (swiped)
+ // ========================================
+
+ isMoved: function (slide) {
+ var current = slide || this.current,
+ slidePos,
+ stagePos;
+
+ if (!current) {
+ return false;
+ }
+
+ stagePos = $.fancybox.getTranslate(this.$refs.stage);
+ slidePos = $.fancybox.getTranslate(current.$slide);
+
+ return (
+ !current.$slide.hasClass("fancybox-animated") &&
+ (Math.abs(slidePos.top - stagePos.top) > 0.5 || Math.abs(slidePos.left - stagePos.left) > 0.5)
+ );
+ },
+
+ // Update cursor style depending if content can be zoomed
+ // ======================================================
+
+ updateCursor: function (nextWidth, nextHeight) {
+ var self = this,
+ current = self.current,
+ $container = self.$refs.container,
+ canPan,
+ isZoomable;
+
+ if (!current || self.isClosing || !self.Guestures) {
+ return;
+ }
+
+ $container.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan");
+
+ canPan = self.canPan(nextWidth, nextHeight);
+
+ isZoomable = canPan ? true : self.isZoomable();
+
+ $container.toggleClass("fancybox-is-zoomable", isZoomable);
+
+ $("[data-fancybox-zoom]").prop("disabled", !isZoomable);
+
+ if (canPan) {
+ $container.addClass("fancybox-can-pan");
+ } else if (
+ isZoomable &&
+ (current.opts.clickContent === "zoom" || ($.isFunction(current.opts.clickContent) && current.opts.clickContent(current) == "zoom"))
+ ) {
+ $container.addClass("fancybox-can-zoomIn");
+ } else if (current.opts.touch && (current.opts.touch.vertical || self.group.length > 1) && current.contentType !== "video") {
+ $container.addClass("fancybox-can-swipe");
+ }
+ },
+
+ // Check if current slide is zoomable
+ // ==================================
+
+ isZoomable: function () {
+ var self = this,
+ current = self.current,
+ fitPos;
+
+ // Assume that slide is zoomable if:
+ // - image is still loading
+ // - actual size of the image is smaller than available area
+ if (current && !self.isClosing && current.type === "image" && !current.hasError) {
+ if (!current.isLoaded) {
+ return true;
+ }
+
+ fitPos = self.getFitPos(current);
+
+ if (fitPos && (current.width > fitPos.width || current.height > fitPos.height)) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ // Check if current image dimensions are smaller than actual
+ // =========================================================
+
+ isScaledDown: function (nextWidth, nextHeight) {
+ var self = this,
+ rez = false,
+ current = self.current,
+ $content = current.$content;
+
+ if (nextWidth !== undefined && nextHeight !== undefined) {
+ rez = nextWidth < current.width && nextHeight < current.height;
+ } else if ($content) {
+ rez = $.fancybox.getTranslate($content);
+ rez = rez.width < current.width && rez.height < current.height;
+ }
+
+ return rez;
+ },
+
+ // Check if image dimensions exceed parent element
+ // ===============================================
+
+ canPan: function (nextWidth, nextHeight) {
+ var self = this,
+ current = self.current,
+ pos = null,
+ rez = false;
+
+ if (current.type === "image" && (current.isComplete || (nextWidth && nextHeight)) && !current.hasError) {
+ rez = self.getFitPos(current);
+
+ if (nextWidth !== undefined && nextHeight !== undefined) {
+ pos = {
+ width: nextWidth,
+ height: nextHeight
+ };
+ } else if (current.isComplete) {
+ pos = $.fancybox.getTranslate(current.$content);
+ }
+
+ if (pos && rez) {
+ rez = Math.abs(pos.width - rez.width) > 1.5 || Math.abs(pos.height - rez.height) > 1.5;
+ }
+ }
+
+ return rez;
+ },
+
+ // Load content into the slide
+ // ===========================
+
+ loadSlide: function (slide) {
+ var self = this,
+ type,
+ $slide,
+ ajaxLoad;
+
+ if (slide.isLoading || slide.isLoaded) {
+ return;
+ }
+
+ slide.isLoading = true;
+
+ if (self.trigger("beforeLoad", slide) === false) {
+ slide.isLoading = false;
+
+ return false;
+ }
+
+ type = slide.type;
+ $slide = slide.$slide;
+
+ $slide
+ .off("refresh")
+ .trigger("onReset")
+ .addClass(slide.opts.slideClass);
+
+ // Create content depending on the type
+ switch (type) {
+ case "image":
+ self.setImage(slide);
+
+ break;
+
+ case "iframe":
+ self.setIframe(slide);
+
+ break;
+
+ case "html":
+ self.setContent(slide, slide.src || slide.content);
+
+ break;
+
+ case "video":
+ self.setContent(
+ slide,
+ slide.opts.video.tpl
+ .replace(/\{\{src\}\}/gi, slide.src)
+ .replace("{{format}}", slide.opts.videoFormat || slide.opts.video.format || "")
+ .replace("{{poster}}", slide.thumb || "")
+ );
+
+ break;
+
+ case "inline":
+ if ($(slide.src).length) {
+ self.setContent(slide, $(slide.src));
+ } else {
+ self.setError(slide);
+ }
+
+ break;
+
+ case "ajax":
+ self.showLoading(slide);
+
+ ajaxLoad = $.ajax(
+ $.extend({}, slide.opts.ajax.settings, {
+ url: slide.src,
+ success: function (data, textStatus) {
+ if (textStatus === "success") {
+ self.setContent(slide, data);
+ }
+ },
+ error: function (jqXHR, textStatus) {
+ if (jqXHR && textStatus !== "abort") {
+ self.setError(slide);
+ }
+ }
+ })
+ );
+
+ $slide.one("onReset", function () {
+ ajaxLoad.abort();
+ });
+
+ break;
+
+ default:
+ self.setError(slide);
+
+ break;
+ }
+
+ return true;
+ },
+
+ // Use thumbnail image, if possible
+ // ================================
+
+ setImage: function (slide) {
+ var self = this,
+ ghost;
+
+ // Check if need to show loading icon
+ setTimeout(function () {
+ var $img = slide.$image;
+
+ if (!self.isClosing && slide.isLoading && (!$img || !$img.length || !$img[0].complete) && !slide.hasError) {
+ self.showLoading(slide);
+ }
+ }, 50);
+
+ //Check if image has srcset
+ self.checkSrcset(slide);
+
+ // This will be wrapper containing both ghost and actual image
+ slide.$content = $('')
+ .addClass("fancybox-is-hidden")
+ .appendTo(slide.$slide.addClass("fancybox-slide--image"));
+
+ // If we have a thumbnail, we can display it while actual image is loading
+ // Users will not stare at black screen and actual image will appear gradually
+ if (slide.opts.preload !== false && slide.opts.width && slide.opts.height && slide.thumb) {
+ slide.width = slide.opts.width;
+ slide.height = slide.opts.height;
+
+ ghost = document.createElement("img");
+
+ ghost.onerror = function () {
+ $(this).remove();
+
+ slide.$ghost = null;
+ };
+
+ ghost.onload = function () {
+ self.afterLoad(slide);
+ };
+
+ slide.$ghost = $(ghost)
+ .addClass("fancybox-image")
+ .appendTo(slide.$content)
+ .attr("src", slide.thumb);
+ }
+
+ // Start loading actual image
+ self.setBigImage(slide);
+ },
+
+ // Check if image has srcset and get the source
+ // ============================================
+ checkSrcset: function (slide) {
+ var srcset = slide.opts.srcset || slide.opts.image.srcset,
+ found,
+ temp,
+ pxRatio,
+ windowWidth;
+
+ // If we have "srcset", then we need to find first matching "src" value.
+ // This is necessary, because when you set an src attribute, the browser will preload the image
+ // before any javascript or even CSS is applied.
+ if (srcset) {
+ pxRatio = window.devicePixelRatio || 1;
+ windowWidth = window.innerWidth * pxRatio;
+
+ temp = srcset.split(",").map(function (el) {
+ var ret = {};
+
+ el.trim()
+ .split(/\s+/)
+ .forEach(function (el, i) {
+ var value = parseInt(el.substring(0, el.length - 1), 10);
+
+ if (i === 0) {
+ return (ret.url = el);
+ }
+
+ if (value) {
+ ret.value = value;
+ ret.postfix = el[el.length - 1];
+ }
+ });
+
+ return ret;
+ });
+
+ // Sort by value
+ temp.sort(function (a, b) {
+ return a.value - b.value;
+ });
+
+ // Ok, now we have an array of all srcset values
+ for (var j = 0; j < temp.length; j++) {
+ var el = temp[j];
+
+ if ((el.postfix === "w" && el.value >= windowWidth) || (el.postfix === "x" && el.value >= pxRatio)) {
+ found = el;
+ break;
+ }
+ }
+
+ // If not found, take the last one
+ if (!found && temp.length) {
+ found = temp[temp.length - 1];
+ }
+
+ if (found) {
+ slide.src = found.url;
+
+ // If we have default width/height values, we can calculate height for matching source
+ if (slide.width && slide.height && found.postfix == "w") {
+ slide.height = (slide.width / slide.height) * found.value;
+ slide.width = found.value;
+ }
+
+ slide.opts.srcset = srcset;
+ }
+ }
+ },
+
+ // Create full-size image
+ // ======================
+
+ setBigImage: function (slide) {
+ var self = this,
+ img = document.createElement("img"),
+ $img = $(img);
+
+ slide.$image = $img
+ .one("error", function () {
+ self.setError(slide);
+ })
+ .one("load", function () {
+ var sizes;
+
+ if (!slide.$ghost) {
+ self.resolveImageSlideSize(slide, this.naturalWidth, this.naturalHeight);
+
+ self.afterLoad(slide);
+ }
+
+ if (self.isClosing) {
+ return;
+ }
+
+ if (slide.opts.srcset) {
+ sizes = slide.opts.sizes;
+
+ if (!sizes || sizes === "auto") {
+ sizes =
+ (slide.width / slide.height > 1 && $W.width() / $W.height() > 1 ? "100" : Math.round((slide.width / slide.height) * 100)) +
+ "vw";
+ }
+
+ $img.attr("sizes", sizes).attr("srcset", slide.opts.srcset);
+ }
+
+ // Hide temporary image after some delay
+ if (slide.$ghost) {
+ setTimeout(function () {
+ if (slide.$ghost && !self.isClosing) {
+ slide.$ghost.hide();
+ }
+ }, Math.min(300, Math.max(1000, slide.height / 1600)));
+ }
+
+ self.hideLoading(slide);
+ })
+ .addClass("fancybox-image")
+ .attr("src", slide.src)
+ .appendTo(slide.$content);
+
+ if ((img.complete || img.readyState == "complete") && $img.naturalWidth && $img.naturalHeight) {
+ $img.trigger("load");
+ } else if (img.error) {
+ $img.trigger("error");
+ }
+ },
+
+ // Computes the slide size from image size and maxWidth/maxHeight
+ // ==============================================================
+
+ resolveImageSlideSize: function (slide, imgWidth, imgHeight) {
+ var maxWidth = parseInt(slide.opts.width, 10),
+ maxHeight = parseInt(slide.opts.height, 10);
+
+ // Sets the default values from the image
+ slide.width = imgWidth;
+ slide.height = imgHeight;
+
+ if (maxWidth > 0) {
+ slide.width = maxWidth;
+ slide.height = Math.floor((maxWidth * imgHeight) / imgWidth);
+ }
+
+ if (maxHeight > 0) {
+ slide.width = Math.floor((maxHeight * imgWidth) / imgHeight);
+ slide.height = maxHeight;
+ }
+ },
+
+ // Create iframe wrapper, iframe and bindings
+ // ==========================================
+
+ setIframe: function (slide) {
+ var self = this,
+ opts = slide.opts.iframe,
+ $slide = slide.$slide,
+ $iframe;
+
+ slide.$content = $('')
+ .css(opts.css)
+ .appendTo($slide);
+
+ $slide.addClass("fancybox-slide--" + slide.contentType);
+
+ slide.$iframe = $iframe = $(opts.tpl.replace(/\{rnd\}/g, new Date().getTime()))
+ .attr(opts.attr)
+ .appendTo(slide.$content);
+
+ if (opts.preload) {
+ self.showLoading(slide);
+
+ // Unfortunately, it is not always possible to determine if iframe is successfully loaded
+ // (due to browser security policy)
+
+ $iframe.on("load.fb error.fb", function (e) {
+ this.isReady = 1;
+
+ slide.$slide.trigger("refresh");
+
+ self.afterLoad(slide);
+ });
+
+ // Recalculate iframe content size
+ // ===============================
+
+ $slide.on("refresh.fb", function () {
+ var $content = slide.$content,
+ frameWidth = opts.css.width,
+ frameHeight = opts.css.height,
+ $contents,
+ $body;
+
+ if ($iframe[0].isReady !== 1) {
+ return;
+ }
+
+ try {
+ $contents = $iframe.contents();
+ $body = $contents.find("body");
+ } catch (ignore) {}
+
+ // Calculate content dimensions, if it is accessible
+ if ($body && $body.length && $body.children().length) {
+ // Avoid scrolling to top (if multiple instances)
+ $slide.css("overflow", "visible");
+
+ $content.css({
+ width: "100%",
+ "max-width": "100%",
+ height: "9999px"
+ });
+
+ if (frameWidth === undefined) {
+ frameWidth = Math.ceil(Math.max($body[0].clientWidth, $body.outerWidth(true)));
+ }
+
+ $content.css("width", frameWidth ? frameWidth : "").css("max-width", "");
+
+ if (frameHeight === undefined) {
+ frameHeight = Math.ceil(Math.max($body[0].clientHeight, $body.outerHeight(true)));
+ }
+
+ $content.css("height", frameHeight ? frameHeight : "");
+
+ $slide.css("overflow", "auto");
+ }
+
+ $content.removeClass("fancybox-is-hidden");
+ });
+ } else {
+ self.afterLoad(slide);
+ }
+
+ $iframe.attr("src", slide.src);
+
+ // Remove iframe if closing or changing gallery item
+ $slide.one("onReset", function () {
+ // This helps IE not to throw errors when closing
+ try {
+ $(this)
+ .find("iframe")
+ .hide()
+ .unbind()
+ .attr("src", "//about:blank");
+ } catch (ignore) {}
+
+ $(this)
+ .off("refresh.fb")
+ .empty();
+
+ slide.isLoaded = false;
+ slide.isRevealed = false;
+ });
+ },
+
+ // Wrap and append content to the slide
+ // ======================================
+
+ setContent: function (slide, content) {
+ var self = this;
+
+ if (self.isClosing) {
+ return;
+ }
+
+ self.hideLoading(slide);
+
+ if (slide.$content) {
+ $.fancybox.stop(slide.$content);
+ }
+
+ slide.$slide.empty();
+
+ // If content is a jQuery object, then it will be moved to the slide.
+ // The placeholder is created so we will know where to put it back.
+ if (isQuery(content) && content.parent().length) {
+ // Make sure content is not already moved to fancyBox
+ if (content.hasClass("fancybox-content") || content.parent().hasClass("fancybox-content")) {
+ content.parents(".fancybox-slide").trigger("onReset");
+ }
+
+ // Create temporary element marking original place of the content
+ slide.$placeholder = $("
")
+ .hide()
+ .insertAfter(content);
+
+ // Make sure content is visible
+ content.css("display", "inline-block");
+ } else if (!slide.hasError) {
+ // If content is just a plain text, try to convert it to html
+ if ($.type(content) === "string") {
+ content = $("
")
+ .append($.trim(content))
+ .contents();
+ }
+
+ // If "filter" option is provided, then filter content
+ if (slide.opts.filter) {
+ content = $("
")
+ .html(content)
+ .find(slide.opts.filter);
+ }
+ }
+
+ slide.$slide.one("onReset", function () {
+ // Pause all html5 video/audio
+ $(this)
+ .find("video,audio")
+ .trigger("pause");
+
+ // Put content back
+ if (slide.$placeholder) {
+ slide.$placeholder.after(content.removeClass("fancybox-content").hide()).remove();
+
+ slide.$placeholder = null;
+ }
+
+ // Remove custom close button
+ if (slide.$smallBtn) {
+ slide.$smallBtn.remove();
+
+ slide.$smallBtn = null;
+ }
+
+ // Remove content and mark slide as not loaded
+ if (!slide.hasError) {
+ $(this).empty();
+
+ slide.isLoaded = false;
+ slide.isRevealed = false;
+ }
+ });
+
+ $(content).appendTo(slide.$slide);
+
+ if ($(content).is("video,audio")) {
+ $(content).addClass("fancybox-video");
+
+ $(content).wrap("");
+
+ slide.contentType = "video";
+
+ slide.opts.width = slide.opts.width || $(content).attr("width");
+ slide.opts.height = slide.opts.height || $(content).attr("height");
+ }
+
+ slide.$content = slide.$slide
+ .children()
+ .filter("div,form,main,video,audio,article,.fancybox-content")
+ .first();
+
+ slide.$content.siblings().hide();
+
+ // Re-check if there is a valid content
+ // (in some cases, ajax response can contain various elements or plain text)
+ if (!slide.$content.length) {
+ slide.$content = slide.$slide
+ .wrapInner("")
+ .children()
+ .first();
+ }
+
+ slide.$content.addClass("fancybox-content");
+
+ slide.$slide.addClass("fancybox-slide--" + slide.contentType);
+
+ self.afterLoad(slide);
+ },
+
+ // Display error message
+ // =====================
+
+ setError: function (slide) {
+ slide.hasError = true;
+
+ slide.$slide
+ .trigger("onReset")
+ .removeClass("fancybox-slide--" + slide.contentType)
+ .addClass("fancybox-slide--error");
+
+ slide.contentType = "html";
+
+ this.setContent(slide, this.translate(slide, slide.opts.errorTpl));
+
+ if (slide.pos === this.currPos) {
+ this.isAnimating = false;
+ }
+ },
+
+ // Show loading icon inside the slide
+ // ==================================
+
+ showLoading: function (slide) {
+ var self = this;
+
+ slide = slide || self.current;
+
+ if (slide && !slide.$spinner) {
+ slide.$spinner = $(self.translate(self, self.opts.spinnerTpl))
+ .appendTo(slide.$slide)
+ .hide()
+ .fadeIn("fast");
+ }
+ },
+
+ // Remove loading icon from the slide
+ // ==================================
+
+ hideLoading: function (slide) {
+ var self = this;
+
+ slide = slide || self.current;
+
+ if (slide && slide.$spinner) {
+ slide.$spinner.stop().remove();
+
+ delete slide.$spinner;
+ }
+ },
+
+ // Adjustments after slide content has been loaded
+ // ===============================================
+
+ afterLoad: function (slide) {
+ var self = this;
+
+ if (self.isClosing) {
+ return;
+ }
+
+ slide.isLoading = false;
+ slide.isLoaded = true;
+
+ self.trigger("afterLoad", slide);
+
+ self.hideLoading(slide);
+
+ // Add small close button
+ if (slide.opts.smallBtn && (!slide.$smallBtn || !slide.$smallBtn.length)) {
+ slide.$smallBtn = $(self.translate(slide, slide.opts.btnTpl.smallBtn)).appendTo(slide.$content);
+ }
+
+ // Disable right click
+ if (slide.opts.protect && slide.$content && !slide.hasError) {
+ slide.$content.on("contextmenu.fb", function (e) {
+ if (e.button == 2) {
+ e.preventDefault();
+ }
+
+ return true;
+ });
+
+ // Add fake element on top of the image
+ // This makes a bit harder for user to select image
+ if (slide.type === "image") {
+ $('').appendTo(slide.$content);
+ }
+ }
+
+ self.adjustCaption(slide);
+
+ self.adjustLayout(slide);
+
+ if (slide.pos === self.currPos) {
+ self.updateCursor();
+ }
+
+ self.revealContent(slide);
+ },
+
+ // Prevent caption overlap,
+ // fix css inconsistency across browsers
+ // =====================================
+
+ adjustCaption: function (slide) {
+ var self = this,
+ current = slide || self.current,
+ caption = current.opts.caption,
+ preventOverlap = current.opts.preventCaptionOverlap,
+ $caption = self.$refs.caption,
+ $clone,
+ captionH = false;
+
+ $caption.toggleClass("fancybox-caption--separate", preventOverlap);
+
+ if (preventOverlap && caption && caption.length) {
+ if (current.pos !== self.currPos) {
+ $clone = $caption.clone().appendTo($caption.parent());
+
+ $clone
+ .children()
+ .eq(0)
+ .empty()
+ .html(caption);
+
+ captionH = $clone.outerHeight(true);
+
+ $clone.empty().remove();
+ } else if (self.$caption) {
+ captionH = self.$caption.outerHeight(true);
+ }
+
+ current.$slide.css("padding-bottom", captionH || "");
+ }
+ },
+
+ // Simple hack to fix inconsistency across browsers, described here (affects Edge, too):
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=748518
+ // ====================================================================================
+
+ adjustLayout: function (slide) {
+ var self = this,
+ current = slide || self.current,
+ scrollHeight,
+ marginBottom,
+ inlinePadding,
+ actualPadding;
+
+ if (current.isLoaded && current.opts.disableLayoutFix !== true) {
+ current.$content.css("margin-bottom", "");
+
+ // If we would always set margin-bottom for the content,
+ // then it would potentially break vertical align
+ if (current.$content.outerHeight() > current.$slide.height() + 0.5) {
+ inlinePadding = current.$slide[0].style["padding-bottom"];
+ actualPadding = current.$slide.css("padding-bottom");
+
+ if (parseFloat(actualPadding) > 0) {
+ scrollHeight = current.$slide[0].scrollHeight;
+
+ current.$slide.css("padding-bottom", 0);
+
+ if (Math.abs(scrollHeight - current.$slide[0].scrollHeight) < 1) {
+ marginBottom = actualPadding;
+ }
+
+ current.$slide.css("padding-bottom", inlinePadding);
+ }
+ }
+
+ current.$content.css("margin-bottom", marginBottom);
+ }
+ },
+
+ // Make content visible
+ // This method is called right after content has been loaded or
+ // user navigates gallery and transition should start
+ // ============================================================
+
+ revealContent: function (slide) {
+ var self = this,
+ $slide = slide.$slide,
+ end = false,
+ start = false,
+ isMoved = self.isMoved(slide),
+ isRevealed = slide.isRevealed,
+ effect,
+ effectClassName,
+ duration,
+ opacity;
+
+ slide.isRevealed = true;
+
+ effect = slide.opts[self.firstRun ? "animationEffect" : "transitionEffect"];
+ duration = slide.opts[self.firstRun ? "animationDuration" : "transitionDuration"];
+
+ duration = parseInt(slide.forcedDuration === undefined ? duration : slide.forcedDuration, 10);
+
+ if (isMoved || slide.pos !== self.currPos || !duration) {
+ effect = false;
+ }
+
+ // Check if can zoom
+ if (effect === "zoom") {
+ if (slide.pos === self.currPos && duration && slide.type === "image" && !slide.hasError && (start = self.getThumbPos(slide))) {
+ end = self.getFitPos(slide);
+ } else {
+ effect = "fade";
+ }
+ }
+
+ // Zoom animation
+ // ==============
+ if (effect === "zoom") {
+ self.isAnimating = true;
+
+ end.scaleX = end.width / start.width;
+ end.scaleY = end.height / start.height;
+
+ // Check if we need to animate opacity
+ opacity = slide.opts.zoomOpacity;
+
+ if (opacity == "auto") {
+ opacity = Math.abs(slide.width / slide.height - start.width / start.height) > 0.1;
+ }
+
+ if (opacity) {
+ start.opacity = 0.1;
+ end.opacity = 1;
+ }
+
+ // Draw image at start position
+ $.fancybox.setTranslate(slide.$content.removeClass("fancybox-is-hidden"), start);
+
+ forceRedraw(slide.$content);
+
+ // Start animation
+ $.fancybox.animate(slide.$content, end, duration, function () {
+ self.isAnimating = false;
+
+ self.complete();
+ });
+
+ return;
+ }
+
+ self.updateSlide(slide);
+
+ // Simply show content if no effect
+ // ================================
+ if (!effect) {
+ slide.$content.removeClass("fancybox-is-hidden");
+
+ if (!isRevealed && isMoved && slide.type === "image" && !slide.hasError) {
+ slide.$content.hide().fadeIn("fast");
+ }
+
+ if (slide.pos === self.currPos) {
+ self.complete();
+ }
+
+ return;
+ }
+
+ // Prepare for CSS transiton
+ // =========================
+ $.fancybox.stop($slide);
+
+ //effectClassName = "fancybox-animated fancybox-slide--" + (slide.pos >= self.prevPos ? "next" : "previous") + " fancybox-fx-" + effect;
+ effectClassName = "fancybox-slide--" + (slide.pos >= self.prevPos ? "next" : "previous") + " fancybox-animated fancybox-fx-" + effect;
+
+ $slide.addClass(effectClassName).removeClass("fancybox-slide--current"); //.addClass(effectClassName);
+
+ slide.$content.removeClass("fancybox-is-hidden");
+
+ // Force reflow
+ forceRedraw($slide);
+
+ if (slide.type !== "image") {
+ slide.$content.hide().show(0);
+ }
+
+ $.fancybox.animate(
+ $slide,
+ "fancybox-slide--current",
+ duration,
+ function () {
+ $slide.removeClass(effectClassName).css({
+ transform: "",
+ opacity: ""
+ });
+
+ if (slide.pos === self.currPos) {
+ self.complete();
+ }
+ },
+ true
+ );
+ },
+
+ // Check if we can and have to zoom from thumbnail
+ //================================================
+
+ getThumbPos: function (slide) {
+ var rez = false,
+ $thumb = slide.$thumb,
+ thumbPos,
+ btw,
+ brw,
+ bbw,
+ blw;
+
+ if (!$thumb || !inViewport($thumb[0])) {
+ return false;
+ }
+
+ thumbPos = $.fancybox.getTranslate($thumb);
+
+ btw = parseFloat($thumb.css("border-top-width") || 0);
+ brw = parseFloat($thumb.css("border-right-width") || 0);
+ bbw = parseFloat($thumb.css("border-bottom-width") || 0);
+ blw = parseFloat($thumb.css("border-left-width") || 0);
+
+ rez = {
+ top: thumbPos.top + btw,
+ left: thumbPos.left + blw,
+ width: thumbPos.width - brw - blw,
+ height: thumbPos.height - btw - bbw,
+ scaleX: 1,
+ scaleY: 1
+ };
+
+ return thumbPos.width > 0 && thumbPos.height > 0 ? rez : false;
+ },
+
+ // Final adjustments after current gallery item is moved to position
+ // and it`s content is loaded
+ // ==================================================================
+
+ complete: function () {
+ var self = this,
+ current = self.current,
+ slides = {},
+ $el;
+
+ if (self.isMoved() || !current.isLoaded) {
+ return;
+ }
+
+ if (!current.isComplete) {
+ current.isComplete = true;
+
+ current.$slide.siblings().trigger("onReset");
+
+ self.preload("inline");
+
+ // Trigger any CSS transiton inside the slide
+ forceRedraw(current.$slide);
+
+ current.$slide.addClass("fancybox-slide--complete");
+
+ // Remove unnecessary slides
+ $.each(self.slides, function (key, slide) {
+ if (slide.pos >= self.currPos - 1 && slide.pos <= self.currPos + 1) {
+ slides[slide.pos] = slide;
+ } else if (slide) {
+ $.fancybox.stop(slide.$slide);
+
+ slide.$slide.off().remove();
+ }
+ });
+
+ self.slides = slides;
+ }
+
+ self.isAnimating = false;
+
+ self.updateCursor();
+
+ self.trigger("afterShow");
+
+ // Autoplay first html5 video/audio
+ if (!!current.opts.video.autoStart) {
+ current.$slide
+ .find("video,audio")
+ .filter(":visible:first")
+ .trigger("play")
+ .one("ended", function () {
+ if (Document.exitFullscreen) {
+ Document.exitFullscreen();
+ } else if (this.webkitExitFullscreen) {
+ this.webkitExitFullscreen();
+ }
+
+ self.next();
+ });
+ }
+
+ // Try to focus on the first focusable element
+ if (current.opts.autoFocus && current.contentType === "html") {
+ // Look for the first input with autofocus attribute
+ $el = current.$content.find("input[autofocus]:enabled:visible:first");
+
+ if ($el.length) {
+ $el.trigger("focus");
+ } else {
+ self.focus(null, true);
+ }
+ }
+
+ // Avoid jumping
+ current.$slide.scrollTop(0).scrollLeft(0);
+ },
+
+ // Preload next and previous slides
+ // ================================
+
+ preload: function (type) {
+ var self = this,
+ prev,
+ next;
+
+ if (self.group.length < 2) {
+ return;
+ }
+
+ next = self.slides[self.currPos + 1];
+ prev = self.slides[self.currPos - 1];
+
+ if (prev && prev.type === type) {
+ self.loadSlide(prev);
+ }
+
+ if (next && next.type === type) {
+ self.loadSlide(next);
+ }
+ },
+
+ // Try to find and focus on the first focusable element
+ // ====================================================
+
+ focus: function (e, firstRun) {
+ var self = this,
+ focusableStr = [
+ "a[href]",
+ "area[href]",
+ 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',
+ "select:not([disabled]):not([aria-hidden])",
+ "textarea:not([disabled]):not([aria-hidden])",
+ "button:not([disabled]):not([aria-hidden])",
+ "iframe",
+ "object",
+ "embed",
+ "video",
+ "audio",
+ "[contenteditable]",
+ '[tabindex]:not([tabindex^="-"])'
+ ].join(","),
+ focusableItems,
+ focusedItemIndex;
+
+ if (self.isClosing) {
+ return;
+ }
+
+ if (e || !self.current || !self.current.isComplete) {
+ // Focus on any element inside fancybox
+ focusableItems = self.$refs.container.find("*:visible");
+ } else {
+ // Focus inside current slide
+ focusableItems = self.current.$slide.find("*:visible" + (firstRun ? ":not(.fancybox-close-small)" : ""));
+ }
+
+ focusableItems = focusableItems.filter(focusableStr).filter(function () {
+ return $(this).css("visibility") !== "hidden" && !$(this).hasClass("disabled");
+ });
+
+ if (focusableItems.length) {
+ focusedItemIndex = focusableItems.index(document.activeElement);
+
+ if (e && e.shiftKey) {
+ // Back tab
+ if (focusedItemIndex < 0 || focusedItemIndex == 0) {
+ e.preventDefault();
+
+ focusableItems.eq(focusableItems.length - 1).trigger("focus");
+ }
+ } else {
+ // Outside or Forward tab
+ if (focusedItemIndex < 0 || focusedItemIndex == focusableItems.length - 1) {
+ if (e) {
+ e.preventDefault();
+ }
+
+ focusableItems.eq(0).trigger("focus");
+ }
+ }
+ } else {
+ self.$refs.container.trigger("focus");
+ }
+ },
+
+ // Activates current instance - brings container to the front and enables keyboard,
+ // notifies other instances about deactivating
+ // =================================================================================
+
+ activate: function () {
+ var self = this;
+
+ // Deactivate all instances
+ $(".fancybox-container").each(function () {
+ var instance = $(this).data("FancyBox");
+
+ // Skip self and closing instances
+ if (instance && instance.id !== self.id && !instance.isClosing) {
+ instance.trigger("onDeactivate");
+
+ instance.removeEvents();
+
+ instance.isVisible = false;
+ }
+ });
+
+ self.isVisible = true;
+
+ if (self.current || self.isIdle) {
+ self.update();
+
+ self.updateControls();
+ }
+
+ self.trigger("onActivate");
+
+ self.addEvents();
+ },
+
+ // Start closing procedure
+ // This will start "zoom-out" animation if needed and clean everything up afterwards
+ // =================================================================================
+
+ close: function (e, d) {
+ var self = this,
+ current = self.current,
+ effect,
+ duration,
+ $content,
+ domRect,
+ opacity,
+ start,
+ end;
+
+ var done = function () {
+ self.cleanUp(e);
+ };
+
+ if (self.isClosing) {
+ return false;
+ }
+
+ self.isClosing = true;
+
+ // If beforeClose callback prevents closing, make sure content is centered
+ if (self.trigger("beforeClose", e) === false) {
+ self.isClosing = false;
+
+ requestAFrame(function () {
+ self.update();
+ });
+
+ return false;
+ }
+
+ // Remove all events
+ // If there are multiple instances, they will be set again by "activate" method
+ self.removeEvents();
+
+ $content = current.$content;
+ effect = current.opts.animationEffect;
+ duration = $.isNumeric(d) ? d : effect ? current.opts.animationDuration : 0;
+
+ current.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated");
+
+ if (e !== true) {
+ $.fancybox.stop(current.$slide);
+ } else {
+ effect = false;
+ }
+
+ // Remove other slides
+ current.$slide
+ .siblings()
+ .trigger("onReset")
+ .remove();
+
+ // Trigger animations
+ if (duration) {
+ self.$refs.container
+ .removeClass("fancybox-is-open")
+ .addClass("fancybox-is-closing")
+ .css("transition-duration", duration + "ms");
+ }
+
+ // Clean up
+ self.hideLoading(current);
+
+ self.hideControls(true);
+
+ self.updateCursor();
+
+ // Check if possible to zoom-out
+ if (
+ effect === "zoom" &&
+ !($content && duration && current.type === "image" && !self.isMoved() && !current.hasError && (end = self.getThumbPos(current)))
+ ) {
+ effect = "fade";
+ }
+
+ if (effect === "zoom") {
+ $.fancybox.stop($content);
+
+ domRect = $.fancybox.getTranslate($content);
+
+ start = {
+ top: domRect.top,
+ left: domRect.left,
+ scaleX: domRect.width / end.width,
+ scaleY: domRect.height / end.height,
+ width: end.width,
+ height: end.height
+ };
+
+ // Check if we need to animate opacity
+ opacity = current.opts.zoomOpacity;
+
+ if (opacity == "auto") {
+ opacity = Math.abs(current.width / current.height - end.width / end.height) > 0.1;
+ }
+
+ if (opacity) {
+ end.opacity = 0;
+ }
+
+ $.fancybox.setTranslate($content, start);
+
+ forceRedraw($content);
+
+ $.fancybox.animate($content, end, duration, done);
+
+ return true;
+ }
+
+ if (effect && duration) {
+ $.fancybox.animate(
+ current.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),
+ "fancybox-animated fancybox-fx-" + effect,
+ duration,
+ done
+ );
+ } else {
+ // If skip animation
+ if (e === true) {
+ setTimeout(done, duration);
+ } else {
+ done();
+ }
+ }
+
+ return true;
+ },
+
+ // Final adjustments after removing the instance
+ // =============================================
+
+ cleanUp: function (e) {
+ var self = this,
+ instance,
+ $focus = self.current.opts.$orig,
+ x,
+ y;
+
+ self.current.$slide.trigger("onReset");
+
+ self.$refs.container.empty().remove();
+
+ self.trigger("afterClose", e);
+
+ // Place back focus
+ if (!!self.current.opts.backFocus) {
+ if (!$focus || !$focus.length || !$focus.is(":visible")) {
+ $focus = self.$trigger;
+ }
+
+ if ($focus && $focus.length) {
+ x = window.scrollX;
+ y = window.scrollY;
+
+ $focus.trigger("focus");
+
+ $("html, body")
+ .scrollTop(y)
+ .scrollLeft(x);
+ }
+ }
+
+ self.current = null;
+
+ // Check if there are other instances
+ instance = $.fancybox.getInstance();
+
+ if (instance) {
+ instance.activate();
+ } else {
+ $("body").removeClass("fancybox-active compensate-for-scrollbar");
+
+ $("#fancybox-style-noscroll").remove();
+ }
+ },
+
+ // Call callback and trigger an event
+ // ==================================
+
+ trigger: function (name, slide) {
+ var args = Array.prototype.slice.call(arguments, 1),
+ self = this,
+ obj = slide && slide.opts ? slide : self.current,
+ rez;
+
+ if (obj) {
+ args.unshift(obj);
+ } else {
+ obj = self;
+ }
+
+ args.unshift(self);
+
+ if ($.isFunction(obj.opts[name])) {
+ rez = obj.opts[name].apply(obj, args);
+ }
+
+ if (rez === false) {
+ return rez;
+ }
+
+ if (name === "afterClose" || !self.$refs) {
+ $D.trigger(name + ".fb", args);
+ } else {
+ self.$refs.container.trigger(name + ".fb", args);
+ }
+ },
+
+ // Update infobar values, navigation button states and reveal caption
+ // ==================================================================
+
+ updateControls: function () {
+ var self = this,
+ current = self.current,
+ index = current.index,
+ $container = self.$refs.container,
+ $caption = self.$refs.caption,
+ caption = current.opts.caption;
+
+ // Recalculate content dimensions
+ current.$slide.trigger("refresh");
+
+ // Set caption
+ if (caption && caption.length) {
+ self.$caption = $caption;
+
+ $caption
+ .children()
+ .eq(0)
+ .html(caption);
+ } else {
+ self.$caption = null;
+ }
+
+ if (!self.hasHiddenControls && !self.isIdle) {
+ self.showControls();
+ }
+
+ // Update info and navigation elements
+ $container.find("[data-fancybox-count]").html(self.group.length);
+ $container.find("[data-fancybox-index]").html(index + 1);
+
+ $container.find("[data-fancybox-prev]").prop("disabled", !current.opts.loop && index <= 0);
+ $container.find("[data-fancybox-next]").prop("disabled", !current.opts.loop && index >= self.group.length - 1);
+
+ if (current.type === "image") {
+ // Re-enable buttons; update download button source
+ $container
+ .find("[data-fancybox-zoom]")
+ .show()
+ .end()
+ .find("[data-fancybox-download]")
+ .attr("href", current.opts.image.src || current.src)
+ .show();
+ } else if (current.opts.toolbar) {
+ $container.find("[data-fancybox-download],[data-fancybox-zoom]").hide();
+ }
+
+ // Make sure focus is not on disabled button/element
+ if ($(document.activeElement).is(":hidden,[disabled]")) {
+ self.$refs.container.trigger("focus");
+ }
+ },
+
+ // Hide toolbar and caption
+ // ========================
+
+ hideControls: function (andCaption) {
+ var self = this,
+ arr = ["infobar", "toolbar", "nav"];
+
+ if (andCaption || !self.current.opts.preventCaptionOverlap) {
+ arr.push("caption");
+ }
+
+ this.$refs.container.removeClass(
+ arr
+ .map(function (i) {
+ return "fancybox-show-" + i;
+ })
+ .join(" ")
+ );
+
+ this.hasHiddenControls = true;
+ },
+
+ showControls: function () {
+ var self = this,
+ opts = self.current ? self.current.opts : self.opts,
+ $container = self.$refs.container;
+
+ self.hasHiddenControls = false;
+ self.idleSecondsCounter = 0;
+
+ $container
+ .toggleClass("fancybox-show-toolbar", !!(opts.toolbar && opts.buttons))
+ .toggleClass("fancybox-show-infobar", !!(opts.infobar && self.group.length > 1))
+ .toggleClass("fancybox-show-caption", !!self.$caption)
+ .toggleClass("fancybox-show-nav", !!(opts.arrows && self.group.length > 1))
+ .toggleClass("fancybox-is-modal", !!opts.modal);
+ },
+
+ // Toggle toolbar and caption
+ // ==========================
+
+ toggleControls: function () {
+ if (this.hasHiddenControls) {
+ this.showControls();
+ } else {
+ this.hideControls();
+ }
+ }
+ });
+
+ $.fancybox = {
+ version: "3.5.7",
+ defaults: defaults,
+
+ // Get current instance and execute a command.
+ //
+ // Examples of usage:
+ //
+ // $instance = $.fancybox.getInstance();
+ // $.fancybox.getInstance().jumpTo( 1 );
+ // $.fancybox.getInstance( 'jumpTo', 1 );
+ // $.fancybox.getInstance( function() {
+ // console.info( this.currIndex );
+ // });
+ // ======================================================
+
+ getInstance: function (command) {
+ var instance = $('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),
+ args = Array.prototype.slice.call(arguments, 1);
+
+ if (instance instanceof FancyBox) {
+ if ($.type(command) === "string") {
+ instance[command].apply(instance, args);
+ } else if ($.type(command) === "function") {
+ command.apply(instance, args);
+ }
+
+ return instance;
+ }
+
+ return false;
+ },
+
+ // Create new instance
+ // ===================
+
+ open: function (items, opts, index) {
+ return new FancyBox(items, opts, index);
+ },
+
+ // Close current or all instances
+ // ==============================
+
+ close: function (all) {
+ var instance = this.getInstance();
+
+ if (instance) {
+ instance.close();
+
+ // Try to find and close next instance
+ if (all === true) {
+ this.close(all);
+ }
+ }
+ },
+
+ // Close all instances and unbind all events
+ // =========================================
+
+ destroy: function () {
+ this.close(true);
+
+ $D.add("body").off("click.fb-start", "**");
+ },
+
+ // Try to detect mobile devices
+ // ============================
+
+ isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),
+
+ // Detect if 'translate3d' support is available
+ // ============================================
+
+ use3d: (function () {
+ var div = document.createElement("div");
+
+ return (
+ window.getComputedStyle &&
+ window.getComputedStyle(div) &&
+ window.getComputedStyle(div).getPropertyValue("transform") &&
+ !(document.documentMode && document.documentMode < 11)
+ );
+ })(),
+
+ // Helper function to get current visual state of an element
+ // returns array[ top, left, horizontal-scale, vertical-scale, opacity ]
+ // =====================================================================
+
+ getTranslate: function ($el) {
+ var domRect;
+
+ if (!$el || !$el.length) {
+ return false;
+ }
+
+ domRect = $el[0].getBoundingClientRect();
+
+ return {
+ top: domRect.top || 0,
+ left: domRect.left || 0,
+ width: domRect.width,
+ height: domRect.height,
+ opacity: parseFloat($el.css("opacity"))
+ };
+ },
+
+ // Shortcut for setting "translate3d" properties for element
+ // Can set be used to set opacity, too
+ // ========================================================
+
+ setTranslate: function ($el, props) {
+ var str = "",
+ css = {};
+
+ if (!$el || !props) {
+ return;
+ }
+
+ if (props.left !== undefined || props.top !== undefined) {
+ str =
+ (props.left === undefined ? $el.position().left : props.left) +
+ "px, " +
+ (props.top === undefined ? $el.position().top : props.top) +
+ "px";
+
+ if (this.use3d) {
+ str = "translate3d(" + str + ", 0px)";
+ } else {
+ str = "translate(" + str + ")";
+ }
+ }
+
+ if (props.scaleX !== undefined && props.scaleY !== undefined) {
+ str += " scale(" + props.scaleX + ", " + props.scaleY + ")";
+ } else if (props.scaleX !== undefined) {
+ str += " scaleX(" + props.scaleX + ")";
+ }
+
+ if (str.length) {
+ css.transform = str;
+ }
+
+ if (props.opacity !== undefined) {
+ css.opacity = props.opacity;
+ }
+
+ if (props.width !== undefined) {
+ css.width = props.width;
+ }
+
+ if (props.height !== undefined) {
+ css.height = props.height;
+ }
+
+ return $el.css(css);
+ },
+
+ // Simple CSS transition handler
+ // =============================
+
+ animate: function ($el, to, duration, callback, leaveAnimationName) {
+ var self = this,
+ from;
+
+ if ($.isFunction(duration)) {
+ callback = duration;
+ duration = null;
+ }
+
+ self.stop($el);
+
+ from = self.getTranslate($el);
+
+ $el.on(transitionEnd, function (e) {
+ // Skip events from child elements and z-index change
+ if (e && e.originalEvent && (!$el.is(e.originalEvent.target) || e.originalEvent.propertyName == "z-index")) {
+ return;
+ }
+
+ self.stop($el);
+
+ if ($.isNumeric(duration)) {
+ $el.css("transition-duration", "");
+ }
+
+ if ($.isPlainObject(to)) {
+ if (to.scaleX !== undefined && to.scaleY !== undefined) {
+ self.setTranslate($el, {
+ top: to.top,
+ left: to.left,
+ width: from.width * to.scaleX,
+ height: from.height * to.scaleY,
+ scaleX: 1,
+ scaleY: 1
+ });
+ }
+ } else if (leaveAnimationName !== true) {
+ $el.removeClass(to);
+ }
+
+ if ($.isFunction(callback)) {
+ callback(e);
+ }
+ });
+
+ if ($.isNumeric(duration)) {
+ $el.css("transition-duration", duration + "ms");
+ }
+
+ // Start animation by changing CSS properties or class name
+ if ($.isPlainObject(to)) {
+ if (to.scaleX !== undefined && to.scaleY !== undefined) {
+ delete to.width;
+ delete to.height;
+
+ if ($el.parent().hasClass("fancybox-slide--image")) {
+ $el.parent().addClass("fancybox-is-scaling");
+ }
+ }
+
+ $.fancybox.setTranslate($el, to);
+ } else {
+ $el.addClass(to);
+ }
+
+ // Make sure that `transitionend` callback gets fired
+ $el.data(
+ "timer",
+ setTimeout(function () {
+ $el.trigger(transitionEnd);
+ }, duration + 33)
+ );
+ },
+
+ stop: function ($el, callCallback) {
+ if ($el && $el.length) {
+ clearTimeout($el.data("timer"));
+
+ if (callCallback) {
+ $el.trigger(transitionEnd);
+ }
+
+ $el.off(transitionEnd).css("transition-duration", "");
+
+ $el.parent().removeClass("fancybox-is-scaling");
+ }
+ }
+ };
+
+ // Default click handler for "fancyboxed" links
+ // ============================================
+
+ function _run(e, opts) {
+ var items = [],
+ index = 0,
+ $target,
+ value,
+ instance;
+
+ // Avoid opening multiple times
+ if (e && e.isDefaultPrevented()) {
+ return;
+ }
+
+ e.preventDefault();
+
+ opts = opts || {};
+
+ if (e && e.data) {
+ opts = mergeOpts(e.data.options, opts);
+ }
+
+ $target = opts.$target || $(e.currentTarget).trigger("blur");
+ instance = $.fancybox.getInstance();
+
+ if (instance && instance.$trigger && instance.$trigger.is($target)) {
+ return;
+ }
+
+ if (opts.selector) {
+ items = $(opts.selector);
+ } else {
+ // Get all related items and find index for clicked one
+ value = $target.attr("data-fancybox") || "";
+
+ if (value) {
+ items = e.data ? e.data.items : [];
+ items = items.length ? items.filter('[data-fancybox="' + value + '"]') : $('[data-fancybox="' + value + '"]');
+ } else {
+ items = [$target];
+ }
+ }
+
+ index = $(items).index($target);
+
+ // Sometimes current item can not be found
+ if (index < 0) {
+ index = 0;
+ }
+
+ instance = $.fancybox.open(items, opts, index);
+
+ // Save last active element
+ instance.$trigger = $target;
+ }
+
+ // Create a jQuery plugin
+ // ======================
+
+ $.fn.fancybox = function (options) {
+ var selector;
+
+ options = options || {};
+ selector = options.selector || false;
+
+ if (selector) {
+ // Use body element instead of document so it executes first
+ $("body")
+ .off("click.fb-start", selector)
+ .on("click.fb-start", selector, {
+ options: options
+ }, _run);
+ } else {
+ this.off("click.fb-start").on(
+ "click.fb-start", {
+ items: this,
+ options: options
+ },
+ _run
+ );
+ }
+
+ return this;
+ };
+
+ // Self initializing plugin for all elements having `data-fancybox` attribute
+ // ==========================================================================
+
+ $D.on("click.fb-start", "[data-fancybox]", _run);
+
+ // Enable "trigger elements"
+ // =========================
+
+ $D.on("click.fb-start", "[data-fancybox-trigger]", function (e) {
+ $('[data-fancybox="' + $(this).attr("data-fancybox-trigger") + '"]')
+ .eq($(this).attr("data-fancybox-index") || 0)
+ .trigger("click.fb-start", {
+ $trigger: $(this)
+ });
+ });
+
+ // Track focus event for better accessibility styling
+ // ==================================================
+ (function () {
+ var buttonStr = ".fancybox-button",
+ focusStr = "fancybox-focus",
+ $pressed = null;
+
+ $D.on("mousedown mouseup focus blur", buttonStr, function (e) {
+ switch (e.type) {
+ case "mousedown":
+ $pressed = $(this);
+ break;
+ case "mouseup":
+ $pressed = null;
+ break;
+ case "focusin":
+ $(buttonStr).removeClass(focusStr);
+
+ if (!$(this).is($pressed) && !$(this).is("[disabled]")) {
+ $(this).addClass(focusStr);
+ }
+ break;
+ case "focusout":
+ $(buttonStr).removeClass(focusStr);
+ break;
+ }
+ });
+ })();
+})(window, document, jQuery);
+// ==========================================================================
+//
+// Media
+// Adds additional media type support
+//
+// ==========================================================================
+(function ($) {
+ "use strict";
+
+ // Object containing properties for each media type
+ var defaults = {
+ youtube: {
+ matcher: /(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,
+ params: {
+ autoplay: 1,
+ autohide: 1,
+ fs: 1,
+ rel: 0,
+ hd: 1,
+ wmode: "transparent",
+ enablejsapi: 1,
+ html5: 1
+ },
+ paramPlace: 8,
+ type: "iframe",
+ url: "https://www.youtube-nocookie.com/embed/$4",
+ thumb: "https://img.youtube.com/vi/$4/hqdefault.jpg"
+ },
+
+ vimeo: {
+ matcher: /^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,
+ params: {
+ autoplay: 1,
+ hd: 1,
+ show_title: 1,
+ show_byline: 1,
+ show_portrait: 0,
+ fullscreen: 1
+ },
+ paramPlace: 3,
+ type: "iframe",
+ url: "//player.vimeo.com/video/$2"
+ },
+
+ instagram: {
+ matcher: /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,
+ type: "image",
+ url: "//$1/p/$2/media/?size=l"
+ },
+
+ // Examples:
+ // http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16
+ // https://www.google.com/maps/@37.7852006,-122.4146355,14.65z
+ // https://www.google.com/maps/@52.2111123,2.9237542,6.61z?hl=en
+ // https://www.google.com/maps/place/Googleplex/@37.4220041,-122.0833494,17z/data=!4m5!3m4!1s0x0:0x6c296c66619367e0!8m2!3d37.4219998!4d-122.0840572
+ gmap_place: {
+ matcher: /(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,
+ type: "iframe",
+ url: function (rez) {
+ return (
+ "//maps.google." +
+ rez[2] +
+ "/?ll=" +
+ (rez[9] ? rez[9] + "&z=" + Math.floor(rez[10]) + (rez[12] ? rez[12].replace(/^\//, "&") : "") : rez[12] + "").replace(/\?/, "&") +
+ "&output=" +
+ (rez[12] && rez[12].indexOf("layer=c") > 0 ? "svembed" : "embed")
+ );
+ }
+ },
+
+ // Examples:
+ // https://www.google.com/maps/search/Empire+State+Building/
+ // https://www.google.com/maps/search/?api=1&query=centurylink+field
+ // https://www.google.com/maps/search/?api=1&query=47.5951518,-122.3316393
+ gmap_search: {
+ matcher: /(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,
+ type: "iframe",
+ url: function (rez) {
+ return "//maps.google." + rez[2] + "/maps?q=" + rez[5].replace("query=", "q=").replace("api=1", "") + "&output=embed";
+ }
+ }
+ };
+
+ // Formats matching url to final form
+ var format = function (url, rez, params) {
+ if (!url) {
+ return;
+ }
+
+ params = params || "";
+
+ if ($.type(params) === "object") {
+ params = $.param(params, true);
+ }
+
+ $.each(rez, function (key, value) {
+ url = url.replace("$" + key, value || "");
+ });
+
+ if (params.length) {
+ url += (url.indexOf("?") > 0 ? "&" : "?") + params;
+ }
+
+ return url;
+ };
+
+ $(document).on("objectNeedsType.fb", function (e, instance, item) {
+ var url = item.src || "",
+ type = false,
+ media,
+ thumb,
+ rez,
+ params,
+ urlParams,
+ paramObj,
+ provider;
+
+ media = $.extend(true, {}, defaults, item.opts.media);
+
+ // Look for any matching media type
+ $.each(media, function (providerName, providerOpts) {
+ rez = url.match(providerOpts.matcher);
+
+ if (!rez) {
+ return;
+ }
+
+ type = providerOpts.type;
+ provider = providerName;
+ paramObj = {};
+
+ if (providerOpts.paramPlace && rez[providerOpts.paramPlace]) {
+ urlParams = rez[providerOpts.paramPlace];
+
+ if (urlParams[0] == "?") {
+ urlParams = urlParams.substring(1);
+ }
+
+ urlParams = urlParams.split("&");
+
+ for (var m = 0; m < urlParams.length; ++m) {
+ var p = urlParams[m].split("=", 2);
+
+ if (p.length == 2) {
+ paramObj[p[0]] = decodeURIComponent(p[1].replace(/\+/g, " "));
+ }
+ }
+ }
+
+ params = $.extend(true, {}, providerOpts.params, item.opts[providerName], paramObj);
+
+ url =
+ $.type(providerOpts.url) === "function" ? providerOpts.url.call(this, rez, params, item) : format(providerOpts.url, rez, params);
+
+ thumb =
+ $.type(providerOpts.thumb) === "function" ? providerOpts.thumb.call(this, rez, params, item) : format(providerOpts.thumb, rez);
+
+ if (providerName === "youtube") {
+ url = url.replace(/&t=((\d+)m)?(\d+)s/, function (match, p1, m, s) {
+ return "&start=" + ((m ? parseInt(m, 10) * 60 : 0) + parseInt(s, 10));
+ });
+ } else if (providerName === "vimeo") {
+ url = url.replace("&%23", "#");
+ }
+
+ return false;
+ });
+
+ // If it is found, then change content type and update the url
+
+ if (type) {
+ if (!item.opts.thumb && !(item.opts.$thumb && item.opts.$thumb.length)) {
+ item.opts.thumb = thumb;
+ }
+
+ if (type === "iframe") {
+ item.opts = $.extend(true, item.opts, {
+ iframe: {
+ preload: false,
+ attr: {
+ scrolling: "no"
+ }
+ }
+ });
+ }
+
+ $.extend(item, {
+ type: type,
+ src: url,
+ origSrc: item.src,
+ contentSource: provider,
+ contentType: type === "image" ? "image" : provider == "gmap_place" || provider == "gmap_search" ? "map" : "video"
+ });
+ } else if (url) {
+ item.type = item.opts.defaultType;
+ }
+ });
+
+ // Load YouTube/Video API on request to detect when video finished playing
+ var VideoAPILoader = {
+ youtube: {
+ src: "https://www.youtube.com/iframe_api",
+ class: "YT",
+ loading: false,
+ loaded: false
+ },
+
+ vimeo: {
+ src: "https://player.vimeo.com/api/player.js",
+ class: "Vimeo",
+ loading: false,
+ loaded: false
+ },
+
+ load: function (vendor) {
+ var _this = this,
+ script;
+
+ if (this[vendor].loaded) {
+ setTimeout(function () {
+ _this.done(vendor);
+ });
+ return;
+ }
+
+ if (this[vendor].loading) {
+ return;
+ }
+
+ this[vendor].loading = true;
+
+ script = document.createElement("script");
+ script.type = "text/javascript";
+ script.src = this[vendor].src;
+
+ if (vendor === "youtube") {
+ window.onYouTubeIframeAPIReady = function () {
+ _this[vendor].loaded = true;
+ _this.done(vendor);
+ };
+ } else {
+ script.onload = function () {
+ _this[vendor].loaded = true;
+ _this.done(vendor);
+ };
+ }
+
+ document.body.appendChild(script);
+ },
+ done: function (vendor) {
+ var instance, $el, player;
+
+ if (vendor === "youtube") {
+ delete window.onYouTubeIframeAPIReady;
+ }
+
+ instance = $.fancybox.getInstance();
+
+ if (instance) {
+ $el = instance.current.$content.find("iframe");
+
+ if (vendor === "youtube" && YT !== undefined && YT) {
+ player = new YT.Player($el.attr("id"), {
+ events: {
+ onStateChange: function (e) {
+ if (e.data == 0) {
+ instance.next();
+ }
+ }
+ }
+ });
+ } else if (vendor === "vimeo" && Vimeo !== undefined && Vimeo) {
+ player = new Vimeo.Player($el);
+
+ player.on("ended", function () {
+ instance.next();
+ });
+ }
+ }
+ }
+ };
+
+ $(document).on({
+ "afterShow.fb": function (e, instance, current) {
+ if (instance.group.length > 1 && (current.contentSource === "youtube" || current.contentSource === "vimeo")) {
+ VideoAPILoader.load(current.contentSource);
+ }
+ }
+ });
+})(jQuery);
+// ==========================================================================
+//
+// Guestures
+// Adds touch guestures, handles click and tap events
+//
+// ==========================================================================
+(function (window, document, $) {
+ "use strict";
+
+ var requestAFrame = (function () {
+ return (
+ window.requestAnimationFrame ||
+ window.webkitRequestAnimationFrame ||
+ window.mozRequestAnimationFrame ||
+ window.oRequestAnimationFrame ||
+ // if all else fails, use setTimeout
+ function (callback) {
+ return window.setTimeout(callback, 1000 / 60);
+ }
+ );
+ })();
+
+ var cancelAFrame = (function () {
+ return (
+ window.cancelAnimationFrame ||
+ window.webkitCancelAnimationFrame ||
+ window.mozCancelAnimationFrame ||
+ window.oCancelAnimationFrame ||
+ function (id) {
+ window.clearTimeout(id);
+ }
+ );
+ })();
+
+ var getPointerXY = function (e) {
+ var result = [];
+
+ e = e.originalEvent || e || window.e;
+ e = e.touches && e.touches.length ? e.touches : e.changedTouches && e.changedTouches.length ? e.changedTouches : [e];
+
+ for (var key in e) {
+ if (e[key].pageX) {
+ result.push({
+ x: e[key].pageX,
+ y: e[key].pageY
+ });
+ } else if (e[key].clientX) {
+ result.push({
+ x: e[key].clientX,
+ y: e[key].clientY
+ });
+ }
+ }
+
+ return result;
+ };
+
+ var distance = function (point2, point1, what) {
+ if (!point1 || !point2) {
+ return 0;
+ }
+
+ if (what === "x") {
+ return point2.x - point1.x;
+ } else if (what === "y") {
+ return point2.y - point1.y;
+ }
+
+ return Math.sqrt(Math.pow(point2.x - point1.x, 2) + Math.pow(point2.y - point1.y, 2));
+ };
+
+ var isClickable = function ($el) {
+ if (
+ $el.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe') ||
+ $.isFunction($el.get(0).onclick) ||
+ $el.data("selectable")
+ ) {
+ return true;
+ }
+
+ // Check for attributes like data-fancybox-next or data-fancybox-close
+ for (var i = 0, atts = $el[0].attributes, n = atts.length; i < n; i++) {
+ if (atts[i].nodeName.substr(0, 14) === "data-fancybox-") {
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ var hasScrollbars = function (el) {
+ var overflowY = window.getComputedStyle(el)["overflow-y"],
+ overflowX = window.getComputedStyle(el)["overflow-x"],
+ vertical = (overflowY === "scroll" || overflowY === "auto") && el.scrollHeight > el.clientHeight,
+ horizontal = (overflowX === "scroll" || overflowX === "auto") && el.scrollWidth > el.clientWidth;
+
+ return vertical || horizontal;
+ };
+
+ var isScrollable = function ($el) {
+ var rez = false;
+
+ while (true) {
+ rez = hasScrollbars($el.get(0));
+
+ if (rez) {
+ break;
+ }
+
+ $el = $el.parent();
+
+ if (!$el.length || $el.hasClass("fancybox-stage") || $el.is("body")) {
+ break;
+ }
+ }
+
+ return rez;
+ };
+
+ var Guestures = function (instance) {
+ var self = this;
+
+ self.instance = instance;
+
+ self.$bg = instance.$refs.bg;
+ self.$stage = instance.$refs.stage;
+ self.$container = instance.$refs.container;
+
+ self.destroy();
+
+ self.$container.on("touchstart.fb.touch mousedown.fb.touch", $.proxy(self, "ontouchstart"));
+ };
+
+ Guestures.prototype.destroy = function () {
+ var self = this;
+
+ self.$container.off(".fb.touch");
+
+ $(document).off(".fb.touch");
+
+ if (self.requestId) {
+ cancelAFrame(self.requestId);
+ self.requestId = null;
+ }
+
+ if (self.tapped) {
+ clearTimeout(self.tapped);
+ self.tapped = null;
+ }
+ };
+
+ Guestures.prototype.ontouchstart = function (e) {
+ var self = this,
+ $target = $(e.target),
+ instance = self.instance,
+ current = instance.current,
+ $slide = current.$slide,
+ $content = current.$content,
+ isTouchDevice = e.type == "touchstart";
+
+ // Do not respond to both (touch and mouse) events
+ if (isTouchDevice) {
+ self.$container.off("mousedown.fb.touch");
+ }
+
+ // Ignore right click
+ if (e.originalEvent && e.originalEvent.button == 2) {
+ return;
+ }
+
+ // Ignore taping on links, buttons, input elements
+ if (!$slide.length || !$target.length || isClickable($target) || isClickable($target.parent())) {
+ return;
+ }
+ // Ignore clicks on the scrollbar
+ if (!$target.is("img") && e.originalEvent.clientX > $target[0].clientWidth + $target.offset().left) {
+ return;
+ }
+
+ // Ignore clicks while zooming or closing
+ if (!current || instance.isAnimating || current.$slide.hasClass("fancybox-animated")) {
+ e.stopPropagation();
+ e.preventDefault();
+
+ return;
+ }
+
+ self.realPoints = self.startPoints = getPointerXY(e);
+
+ if (!self.startPoints.length) {
+ return;
+ }
+
+ // Allow other scripts to catch touch event if "touch" is set to false
+ if (current.touch) {
+ e.stopPropagation();
+ }
+
+ self.startEvent = e;
+
+ self.canTap = true;
+ self.$target = $target;
+ self.$content = $content;
+ self.opts = current.opts.touch;
+
+ self.isPanning = false;
+ self.isSwiping = false;
+ self.isZooming = false;
+ self.isScrolling = false;
+ self.canPan = instance.canPan();
+
+ self.startTime = new Date().getTime();
+ self.distanceX = self.distanceY = self.distance = 0;
+
+ self.canvasWidth = Math.round($slide[0].clientWidth);
+ self.canvasHeight = Math.round($slide[0].clientHeight);
+
+ self.contentLastPos = null;
+ self.contentStartPos = $.fancybox.getTranslate(self.$content) || {
+ top: 0,
+ left: 0
+ };
+ self.sliderStartPos = $.fancybox.getTranslate($slide);
+
+ // Since position will be absolute, but we need to make it relative to the stage
+ self.stagePos = $.fancybox.getTranslate(instance.$refs.stage);
+
+ self.sliderStartPos.top -= self.stagePos.top;
+ self.sliderStartPos.left -= self.stagePos.left;
+
+ self.contentStartPos.top -= self.stagePos.top;
+ self.contentStartPos.left -= self.stagePos.left;
+
+ $(document)
+ .off(".fb.touch")
+ .on(isTouchDevice ? "touchend.fb.touch touchcancel.fb.touch" : "mouseup.fb.touch mouseleave.fb.touch", $.proxy(self, "ontouchend"))
+ .on(isTouchDevice ? "touchmove.fb.touch" : "mousemove.fb.touch", $.proxy(self, "ontouchmove"));
+
+ if ($.fancybox.isMobile) {
+ document.addEventListener("scroll", self.onscroll, true);
+ }
+
+ // Skip if clicked outside the sliding area
+ if (!(self.opts || self.canPan) || !($target.is(self.$stage) || self.$stage.find($target).length)) {
+ if ($target.is(".fancybox-image")) {
+ e.preventDefault();
+ }
+
+ if (!($.fancybox.isMobile && $target.parents(".fancybox-caption").length)) {
+ return;
+ }
+ }
+
+ self.isScrollable = isScrollable($target) || isScrollable($target.parent());
+
+ // Check if element is scrollable and try to prevent default behavior (scrolling)
+ if (!($.fancybox.isMobile && self.isScrollable)) {
+ e.preventDefault();
+ }
+
+ // One finger or mouse click - swipe or pan an image
+ if (self.startPoints.length === 1 || current.hasError) {
+ if (self.canPan) {
+ $.fancybox.stop(self.$content);
+
+ self.isPanning = true;
+ } else {
+ self.isSwiping = true;
+ }
+
+ self.$container.addClass("fancybox-is-grabbing");
+ }
+
+ // Two fingers - zoom image
+ if (self.startPoints.length === 2 && current.type === "image" && (current.isLoaded || current.$ghost)) {
+ self.canTap = false;
+ self.isSwiping = false;
+ self.isPanning = false;
+
+ self.isZooming = true;
+
+ $.fancybox.stop(self.$content);
+
+ self.centerPointStartX = (self.startPoints[0].x + self.startPoints[1].x) * 0.5 - $(window).scrollLeft();
+ self.centerPointStartY = (self.startPoints[0].y + self.startPoints[1].y) * 0.5 - $(window).scrollTop();
+
+ self.percentageOfImageAtPinchPointX = (self.centerPointStartX - self.contentStartPos.left) / self.contentStartPos.width;
+ self.percentageOfImageAtPinchPointY = (self.centerPointStartY - self.contentStartPos.top) / self.contentStartPos.height;
+
+ self.startDistanceBetweenFingers = distance(self.startPoints[0], self.startPoints[1]);
+ }
+ };
+
+ Guestures.prototype.onscroll = function (e) {
+ var self = this;
+
+ self.isScrolling = true;
+
+ document.removeEventListener("scroll", self.onscroll, true);
+ };
+
+ Guestures.prototype.ontouchmove = function (e) {
+ var self = this;
+
+ // Make sure user has not released over iframe or disabled element
+ if (e.originalEvent.buttons !== undefined && e.originalEvent.buttons === 0) {
+ self.ontouchend(e);
+ return;
+ }
+
+ if (self.isScrolling) {
+ self.canTap = false;
+ return;
+ }
+
+ self.newPoints = getPointerXY(e);
+
+ if (!(self.opts || self.canPan) || !self.newPoints.length || !self.newPoints.length) {
+ return;
+ }
+
+ if (!(self.isSwiping && self.isSwiping === true)) {
+ e.preventDefault();
+ }
+
+ self.distanceX = distance(self.newPoints[0], self.startPoints[0], "x");
+ self.distanceY = distance(self.newPoints[0], self.startPoints[0], "y");
+
+ self.distance = distance(self.newPoints[0], self.startPoints[0]);
+
+ // Skip false ontouchmove events (Chrome)
+ if (self.distance > 0) {
+ if (self.isSwiping) {
+ self.onSwipe(e);
+ } else if (self.isPanning) {
+ self.onPan();
+ } else if (self.isZooming) {
+ self.onZoom();
+ }
+ }
+ };
+
+ Guestures.prototype.onSwipe = function (e) {
+ var self = this,
+ instance = self.instance,
+ swiping = self.isSwiping,
+ left = self.sliderStartPos.left || 0,
+ angle;
+
+ // If direction is not yet determined
+ if (swiping === true) {
+ // We need at least 10px distance to correctly calculate an angle
+ if (Math.abs(self.distance) > 10) {
+ self.canTap = false;
+
+ if (instance.group.length < 2 && self.opts.vertical) {
+ self.isSwiping = "y";
+ } else if (instance.isDragging || self.opts.vertical === false || (self.opts.vertical === "auto" && $(window).width() > 800)) {
+ self.isSwiping = "x";
+ } else {
+ angle = Math.abs((Math.atan2(self.distanceY, self.distanceX) * 180) / Math.PI);
+
+ self.isSwiping = angle > 45 && angle < 135 ? "y" : "x";
+ }
+
+ if (self.isSwiping === "y" && $.fancybox.isMobile && self.isScrollable) {
+ self.isScrolling = true;
+
+ return;
+ }
+
+ instance.isDragging = self.isSwiping;
+
+ // Reset points to avoid jumping, because we dropped first swipes to calculate the angle
+ self.startPoints = self.newPoints;
+
+ $.each(instance.slides, function (index, slide) {
+ var slidePos, stagePos;
+
+ $.fancybox.stop(slide.$slide);
+
+ slidePos = $.fancybox.getTranslate(slide.$slide);
+ stagePos = $.fancybox.getTranslate(instance.$refs.stage);
+
+ slide.$slide
+ .css({
+ transform: "",
+ opacity: "",
+ "transition-duration": ""
+ })
+ .removeClass("fancybox-animated")
+ .removeClass(function (index, className) {
+ return (className.match(/(^|\s)fancybox-fx-\S+/g) || []).join(" ");
+ });
+
+ if (slide.pos === instance.current.pos) {
+ self.sliderStartPos.top = slidePos.top - stagePos.top;
+ self.sliderStartPos.left = slidePos.left - stagePos.left;
+ }
+
+ $.fancybox.setTranslate(slide.$slide, {
+ top: slidePos.top - stagePos.top,
+ left: slidePos.left - stagePos.left
+ });
+ });
+
+ // Stop slideshow
+ if (instance.SlideShow && instance.SlideShow.isActive) {
+ instance.SlideShow.stop();
+ }
+ }
+
+ return;
+ }
+
+ // Sticky edges
+ if (swiping == "x") {
+ if (
+ self.distanceX > 0 &&
+ (self.instance.group.length < 2 || (self.instance.current.index === 0 && !self.instance.current.opts.loop))
+ ) {
+ left = left + Math.pow(self.distanceX, 0.8);
+ } else if (
+ self.distanceX < 0 &&
+ (self.instance.group.length < 2 ||
+ (self.instance.current.index === self.instance.group.length - 1 && !self.instance.current.opts.loop))
+ ) {
+ left = left - Math.pow(-self.distanceX, 0.8);
+ } else {
+ left = left + self.distanceX;
+ }
+ }
+
+ self.sliderLastPos = {
+ top: swiping == "x" ? 0 : self.sliderStartPos.top + self.distanceY,
+ left: left
+ };
+
+ if (self.requestId) {
+ cancelAFrame(self.requestId);
+
+ self.requestId = null;
+ }
+
+ self.requestId = requestAFrame(function () {
+ if (self.sliderLastPos) {
+ $.each(self.instance.slides, function (index, slide) {
+ var pos = slide.pos - self.instance.currPos;
+
+ $.fancybox.setTranslate(slide.$slide, {
+ top: self.sliderLastPos.top,
+ left: self.sliderLastPos.left + pos * self.canvasWidth + pos * slide.opts.gutter
+ });
+ });
+
+ self.$container.addClass("fancybox-is-sliding");
+ }
+ });
+ };
+
+ Guestures.prototype.onPan = function () {
+ var self = this;
+
+ // Prevent accidental movement (sometimes, when tapping casually, finger can move a bit)
+ if (distance(self.newPoints[0], self.realPoints[0]) < ($.fancybox.isMobile ? 10 : 5)) {
+ self.startPoints = self.newPoints;
+ return;
+ }
+
+ self.canTap = false;
+
+ self.contentLastPos = self.limitMovement();
+
+ if (self.requestId) {
+ cancelAFrame(self.requestId);
+ }
+
+ self.requestId = requestAFrame(function () {
+ $.fancybox.setTranslate(self.$content, self.contentLastPos);
+ });
+ };
+
+ // Make panning sticky to the edges
+ Guestures.prototype.limitMovement = function () {
+ var self = this;
+
+ var canvasWidth = self.canvasWidth;
+ var canvasHeight = self.canvasHeight;
+
+ var distanceX = self.distanceX;
+ var distanceY = self.distanceY;
+
+ var contentStartPos = self.contentStartPos;
+
+ var currentOffsetX = contentStartPos.left;
+ var currentOffsetY = contentStartPos.top;
+
+ var currentWidth = contentStartPos.width;
+ var currentHeight = contentStartPos.height;
+
+ var minTranslateX, minTranslateY, maxTranslateX, maxTranslateY, newOffsetX, newOffsetY;
+
+ if (currentWidth > canvasWidth) {
+ newOffsetX = currentOffsetX + distanceX;
+ } else {
+ newOffsetX = currentOffsetX;
+ }
+
+ newOffsetY = currentOffsetY + distanceY;
+
+ // Slow down proportionally to traveled distance
+ minTranslateX = Math.max(0, canvasWidth * 0.5 - currentWidth * 0.5);
+ minTranslateY = Math.max(0, canvasHeight * 0.5 - currentHeight * 0.5);
+
+ maxTranslateX = Math.min(canvasWidth - currentWidth, canvasWidth * 0.5 - currentWidth * 0.5);
+ maxTranslateY = Math.min(canvasHeight - currentHeight, canvasHeight * 0.5 - currentHeight * 0.5);
+
+ // ->
+ if (distanceX > 0 && newOffsetX > minTranslateX) {
+ newOffsetX = minTranslateX - 1 + Math.pow(-minTranslateX + currentOffsetX + distanceX, 0.8) || 0;
+ }
+
+ // <-
+ if (distanceX < 0 && newOffsetX < maxTranslateX) {
+ newOffsetX = maxTranslateX + 1 - Math.pow(maxTranslateX - currentOffsetX - distanceX, 0.8) || 0;
+ }
+
+ // \/
+ if (distanceY > 0 && newOffsetY > minTranslateY) {
+ newOffsetY = minTranslateY - 1 + Math.pow(-minTranslateY + currentOffsetY + distanceY, 0.8) || 0;
+ }
+
+ // /\
+ if (distanceY < 0 && newOffsetY < maxTranslateY) {
+ newOffsetY = maxTranslateY + 1 - Math.pow(maxTranslateY - currentOffsetY - distanceY, 0.8) || 0;
+ }
+
+ return {
+ top: newOffsetY,
+ left: newOffsetX
+ };
+ };
+
+ Guestures.prototype.limitPosition = function (newOffsetX, newOffsetY, newWidth, newHeight) {
+ var self = this;
+
+ var canvasWidth = self.canvasWidth;
+ var canvasHeight = self.canvasHeight;
+
+ if (newWidth > canvasWidth) {
+ newOffsetX = newOffsetX > 0 ? 0 : newOffsetX;
+ newOffsetX = newOffsetX < canvasWidth - newWidth ? canvasWidth - newWidth : newOffsetX;
+ } else {
+ // Center horizontally
+ newOffsetX = Math.max(0, canvasWidth / 2 - newWidth / 2);
+ }
+
+ if (newHeight > canvasHeight) {
+ newOffsetY = newOffsetY > 0 ? 0 : newOffsetY;
+ newOffsetY = newOffsetY < canvasHeight - newHeight ? canvasHeight - newHeight : newOffsetY;
+ } else {
+ // Center vertically
+ newOffsetY = Math.max(0, canvasHeight / 2 - newHeight / 2);
+ }
+
+ return {
+ top: newOffsetY,
+ left: newOffsetX
+ };
+ };
+
+ Guestures.prototype.onZoom = function () {
+ var self = this;
+
+ // Calculate current distance between points to get pinch ratio and new width and height
+ var contentStartPos = self.contentStartPos;
+
+ var currentWidth = contentStartPos.width;
+ var currentHeight = contentStartPos.height;
+
+ var currentOffsetX = contentStartPos.left;
+ var currentOffsetY = contentStartPos.top;
+
+ var endDistanceBetweenFingers = distance(self.newPoints[0], self.newPoints[1]);
+
+ var pinchRatio = endDistanceBetweenFingers / self.startDistanceBetweenFingers;
+
+ var newWidth = Math.floor(currentWidth * pinchRatio);
+ var newHeight = Math.floor(currentHeight * pinchRatio);
+
+ // This is the translation due to pinch-zooming
+ var translateFromZoomingX = (currentWidth - newWidth) * self.percentageOfImageAtPinchPointX;
+ var translateFromZoomingY = (currentHeight - newHeight) * self.percentageOfImageAtPinchPointY;
+
+ // Point between the two touches
+ var centerPointEndX = (self.newPoints[0].x + self.newPoints[1].x) / 2 - $(window).scrollLeft();
+ var centerPointEndY = (self.newPoints[0].y + self.newPoints[1].y) / 2 - $(window).scrollTop();
+
+ // And this is the translation due to translation of the centerpoint
+ // between the two fingers
+ var translateFromTranslatingX = centerPointEndX - self.centerPointStartX;
+ var translateFromTranslatingY = centerPointEndY - self.centerPointStartY;
+
+ // The new offset is the old/current one plus the total translation
+ var newOffsetX = currentOffsetX + (translateFromZoomingX + translateFromTranslatingX);
+ var newOffsetY = currentOffsetY + (translateFromZoomingY + translateFromTranslatingY);
+
+ var newPos = {
+ top: newOffsetY,
+ left: newOffsetX,
+ scaleX: pinchRatio,
+ scaleY: pinchRatio
+ };
+
+ self.canTap = false;
+
+ self.newWidth = newWidth;
+ self.newHeight = newHeight;
+
+ self.contentLastPos = newPos;
+
+ if (self.requestId) {
+ cancelAFrame(self.requestId);
+ }
+
+ self.requestId = requestAFrame(function () {
+ $.fancybox.setTranslate(self.$content, self.contentLastPos);
+ });
+ };
+
+ Guestures.prototype.ontouchend = function (e) {
+ var self = this;
+
+ var swiping = self.isSwiping;
+ var panning = self.isPanning;
+ var zooming = self.isZooming;
+ var scrolling = self.isScrolling;
+
+ self.endPoints = getPointerXY(e);
+ self.dMs = Math.max(new Date().getTime() - self.startTime, 1);
+
+ self.$container.removeClass("fancybox-is-grabbing");
+
+ $(document).off(".fb.touch");
+
+ document.removeEventListener("scroll", self.onscroll, true);
+
+ if (self.requestId) {
+ cancelAFrame(self.requestId);
+
+ self.requestId = null;
+ }
+
+ self.isSwiping = false;
+ self.isPanning = false;
+ self.isZooming = false;
+ self.isScrolling = false;
+
+ self.instance.isDragging = false;
+
+ if (self.canTap) {
+ return self.onTap(e);
+ }
+
+ self.speed = 100;
+
+ // Speed in px/ms
+ self.velocityX = (self.distanceX / self.dMs) * 0.5;
+ self.velocityY = (self.distanceY / self.dMs) * 0.5;
+
+ if (panning) {
+ self.endPanning();
+ } else if (zooming) {
+ self.endZooming();
+ } else {
+ self.endSwiping(swiping, scrolling);
+ }
+
+ return;
+ };
+
+ Guestures.prototype.endSwiping = function (swiping, scrolling) {
+ var self = this,
+ ret = false,
+ len = self.instance.group.length,
+ distanceX = Math.abs(self.distanceX),
+ canAdvance = swiping == "x" && len > 1 && ((self.dMs > 130 && distanceX > 10) || distanceX > 50),
+ speedX = 300;
+
+ self.sliderLastPos = null;
+
+ // Close if swiped vertically / navigate if horizontally
+ if (swiping == "y" && !scrolling && Math.abs(self.distanceY) > 50) {
+ // Continue vertical movement
+ $.fancybox.animate(
+ self.instance.current.$slide, {
+ top: self.sliderStartPos.top + self.distanceY + self.velocityY * 150,
+ opacity: 0
+ },
+ 200
+ );
+ ret = self.instance.close(true, 250);
+ } else if (canAdvance && self.distanceX > 0) {
+ ret = self.instance.previous(speedX);
+ } else if (canAdvance && self.distanceX < 0) {
+ ret = self.instance.next(speedX);
+ }
+
+ if (ret === false && (swiping == "x" || swiping == "y")) {
+ self.instance.centerSlide(200);
+ }
+
+ self.$container.removeClass("fancybox-is-sliding");
+ };
+
+ // Limit panning from edges
+ // ========================
+ Guestures.prototype.endPanning = function () {
+ var self = this,
+ newOffsetX,
+ newOffsetY,
+ newPos;
+
+ if (!self.contentLastPos) {
+ return;
+ }
+
+ if (self.opts.momentum === false || self.dMs > 350) {
+ newOffsetX = self.contentLastPos.left;
+ newOffsetY = self.contentLastPos.top;
+ } else {
+ // Continue movement
+ newOffsetX = self.contentLastPos.left + self.velocityX * 500;
+ newOffsetY = self.contentLastPos.top + self.velocityY * 500;
+ }
+
+ newPos = self.limitPosition(newOffsetX, newOffsetY, self.contentStartPos.width, self.contentStartPos.height);
+
+ newPos.width = self.contentStartPos.width;
+ newPos.height = self.contentStartPos.height;
+
+ $.fancybox.animate(self.$content, newPos, 366);
+ };
+
+ Guestures.prototype.endZooming = function () {
+ var self = this;
+
+ var current = self.instance.current;
+
+ var newOffsetX, newOffsetY, newPos, reset;
+
+ var newWidth = self.newWidth;
+ var newHeight = self.newHeight;
+
+ if (!self.contentLastPos) {
+ return;
+ }
+
+ newOffsetX = self.contentLastPos.left;
+ newOffsetY = self.contentLastPos.top;
+
+ reset = {
+ top: newOffsetY,
+ left: newOffsetX,
+ width: newWidth,
+ height: newHeight,
+ scaleX: 1,
+ scaleY: 1
+ };
+
+ // Reset scalex/scaleY values; this helps for perfomance and does not break animation
+ $.fancybox.setTranslate(self.$content, reset);
+
+ if (newWidth < self.canvasWidth && newHeight < self.canvasHeight) {
+ self.instance.scaleToFit(150);
+ } else if (newWidth > current.width || newHeight > current.height) {
+ self.instance.scaleToActual(self.centerPointStartX, self.centerPointStartY, 150);
+ } else {
+ newPos = self.limitPosition(newOffsetX, newOffsetY, newWidth, newHeight);
+
+ $.fancybox.animate(self.$content, newPos, 150);
+ }
+ };
+
+ Guestures.prototype.onTap = function (e) {
+ var self = this;
+ var $target = $(e.target);
+
+ var instance = self.instance;
+ var current = instance.current;
+
+ var endPoints = (e && getPointerXY(e)) || self.startPoints;
+
+ var tapX = endPoints[0] ? endPoints[0].x - $(window).scrollLeft() - self.stagePos.left : 0;
+ var tapY = endPoints[0] ? endPoints[0].y - $(window).scrollTop() - self.stagePos.top : 0;
+
+ var where;
+
+ var process = function (prefix) {
+ var action = current.opts[prefix];
+
+ if ($.isFunction(action)) {
+ action = action.apply(instance, [current, e]);
+ }
+
+ if (!action) {
+ return;
+ }
+
+ switch (action) {
+ case "close":
+ instance.close(self.startEvent);
+
+ break;
+
+ case "toggleControls":
+ instance.toggleControls();
+
+ break;
+
+ case "next":
+ instance.next();
+
+ break;
+
+ case "nextOrClose":
+ if (instance.group.length > 1) {
+ instance.next();
+ } else {
+ instance.close(self.startEvent);
+ }
+
+ break;
+
+ case "zoom":
+ if (current.type == "image" && (current.isLoaded || current.$ghost)) {
+ if (instance.canPan()) {
+ instance.scaleToFit();
+ } else if (instance.isScaledDown()) {
+ instance.scaleToActual(tapX, tapY);
+ } else if (instance.group.length < 2) {
+ instance.close(self.startEvent);
+ }
+ }
+
+ break;
+ }
+ };
+
+ // Ignore right click
+ if (e.originalEvent && e.originalEvent.button == 2) {
+ return;
+ }
+
+ // Skip if clicked on the scrollbar
+ if (!$target.is("img") && tapX > $target[0].clientWidth + $target.offset().left) {
+ return;
+ }
+
+ // Check where is clicked
+ if ($target.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container")) {
+ where = "Outside";
+ } else if ($target.is(".fancybox-slide")) {
+ where = "Slide";
+ } else if (
+ instance.current.$content &&
+ instance.current.$content
+ .find($target)
+ .addBack()
+ .filter($target).length
+ ) {
+ where = "Content";
+ } else {
+ return;
+ }
+
+ // Check if this is a double tap
+ if (self.tapped) {
+ // Stop previously created single tap
+ clearTimeout(self.tapped);
+ self.tapped = null;
+
+ // Skip if distance between taps is too big
+ if (Math.abs(tapX - self.tapX) > 50 || Math.abs(tapY - self.tapY) > 50) {
+ return this;
+ }
+
+ // OK, now we assume that this is a double-tap
+ process("dblclick" + where);
+ } else {
+ // Single tap will be processed if user has not clicked second time within 300ms
+ // or there is no need to wait for double-tap
+ self.tapX = tapX;
+ self.tapY = tapY;
+
+ if (current.opts["dblclick" + where] && current.opts["dblclick" + where] !== current.opts["click" + where]) {
+ self.tapped = setTimeout(function () {
+ self.tapped = null;
+
+ if (!instance.isAnimating) {
+ process("click" + where);
+ }
+ }, 500);
+ } else {
+ process("click" + where);
+ }
+ }
+
+ return this;
+ };
+
+ $(document)
+ .on("onActivate.fb", function (e, instance) {
+ if (instance && !instance.Guestures) {
+ instance.Guestures = new Guestures(instance);
+ }
+ })
+ .on("beforeClose.fb", function (e, instance) {
+ if (instance && instance.Guestures) {
+ instance.Guestures.destroy();
+ }
+ });
+})(window, document, jQuery);
+// ==========================================================================
+//
+// SlideShow
+// Enables slideshow functionality
+//
+// Example of usage:
+// $.fancybox.getInstance().SlideShow.start()
+//
+// ==========================================================================
+(function (document, $) {
+ "use strict";
+
+ $.extend(true, $.fancybox.defaults, {
+ btnTpl: {
+ slideShow: '"
+ },
+ slideShow: {
+ autoStart: false,
+ speed: 3000,
+ progress: true
+ }
+ });
+
+ var SlideShow = function (instance) {
+ this.instance = instance;
+ this.init();
+ };
+
+ $.extend(SlideShow.prototype, {
+ timer: null,
+ isActive: false,
+ $button: null,
+
+ init: function () {
+ var self = this,
+ instance = self.instance,
+ opts = instance.group[instance.currIndex].opts.slideShow;
+
+ self.$button = instance.$refs.toolbar.find("[data-fancybox-play]").on("click", function () {
+ self.toggle();
+ });
+
+ if (instance.group.length < 2 || !opts) {
+ self.$button.hide();
+ } else if (opts.progress) {
+ self.$progress = $('').appendTo(instance.$refs.inner);
+ }
+ },
+
+ set: function (force) {
+ var self = this,
+ instance = self.instance,
+ current = instance.current;
+
+ // Check if reached last element
+ if (current && (force === true || current.opts.loop || instance.currIndex < instance.group.length - 1)) {
+ if (self.isActive && current.contentType !== "video") {
+ if (self.$progress) {
+ $.fancybox.animate(self.$progress.show(), {
+ scaleX: 1
+ }, current.opts.slideShow.speed);
+ }
+
+ self.timer = setTimeout(function () {
+ if (!instance.current.opts.loop && instance.current.index == instance.group.length - 1) {
+ instance.jumpTo(0);
+ } else {
+ instance.next();
+ }
+ }, current.opts.slideShow.speed);
+ }
+ } else {
+ self.stop();
+ instance.idleSecondsCounter = 0;
+ instance.showControls();
+ }
+ },
+
+ clear: function () {
+ var self = this;
+
+ clearTimeout(self.timer);
+
+ self.timer = null;
+
+ if (self.$progress) {
+ self.$progress.removeAttr("style").hide();
+ }
+ },
+
+ start: function () {
+ var self = this,
+ current = self.instance.current;
+
+ if (current) {
+ self.$button
+ .attr("title", (current.opts.i18n[current.opts.lang] || current.opts.i18n.en).PLAY_STOP)
+ .removeClass("fancybox-button--play")
+ .addClass("fancybox-button--pause");
+
+ self.isActive = true;
+
+ if (current.isComplete) {
+ self.set(true);
+ }
+
+ self.instance.trigger("onSlideShowChange", true);
+ }
+ },
+
+ stop: function () {
+ var self = this,
+ current = self.instance.current;
+
+ self.clear();
+
+ self.$button
+ .attr("title", (current.opts.i18n[current.opts.lang] || current.opts.i18n.en).PLAY_START)
+ .removeClass("fancybox-button--pause")
+ .addClass("fancybox-button--play");
+
+ self.isActive = false;
+
+ self.instance.trigger("onSlideShowChange", false);
+
+ if (self.$progress) {
+ self.$progress.removeAttr("style").hide();
+ }
+ },
+
+ toggle: function () {
+ var self = this;
+
+ if (self.isActive) {
+ self.stop();
+ } else {
+ self.start();
+ }
+ }
+ });
+
+ $(document).on({
+ "onInit.fb": function (e, instance) {
+ if (instance && !instance.SlideShow) {
+ instance.SlideShow = new SlideShow(instance);
+ }
+ },
+
+ "beforeShow.fb": function (e, instance, current, firstRun) {
+ var SlideShow = instance && instance.SlideShow;
+
+ if (firstRun) {
+ if (SlideShow && current.opts.slideShow.autoStart) {
+ SlideShow.start();
+ }
+ } else if (SlideShow && SlideShow.isActive) {
+ SlideShow.clear();
+ }
+ },
+
+ "afterShow.fb": function (e, instance, current) {
+ var SlideShow = instance && instance.SlideShow;
+
+ if (SlideShow && SlideShow.isActive) {
+ SlideShow.set();
+ }
+ },
+
+ "afterKeydown.fb": function (e, instance, current, keypress, keycode) {
+ var SlideShow = instance && instance.SlideShow;
+
+ // "P" or Spacebar
+ if (SlideShow && current.opts.slideShow && (keycode === 80 || keycode === 32) && !$(document.activeElement).is("button,a,input")) {
+ keypress.preventDefault();
+
+ SlideShow.toggle();
+ }
+ },
+
+ "beforeClose.fb onDeactivate.fb": function (e, instance) {
+ var SlideShow = instance && instance.SlideShow;
+
+ if (SlideShow) {
+ SlideShow.stop();
+ }
+ }
+ });
+
+ // Page Visibility API to pause slideshow when window is not active
+ $(document).on("visibilitychange", function () {
+ var instance = $.fancybox.getInstance(),
+ SlideShow = instance && instance.SlideShow;
+
+ if (SlideShow && SlideShow.isActive) {
+ if (document.hidden) {
+ SlideShow.clear();
+ } else {
+ SlideShow.set();
+ }
+ }
+ });
+})(document, jQuery);
+// ==========================================================================
+//
+// FullScreen
+// Adds fullscreen functionality
+//
+// ==========================================================================
+(function (document, $) {
+ "use strict";
+
+ // Collection of methods supported by user browser
+ var fn = (function () {
+ var fnMap = [
+ ["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"],
+ // new WebKit
+ [
+ "webkitRequestFullscreen",
+ "webkitExitFullscreen",
+ "webkitFullscreenElement",
+ "webkitFullscreenEnabled",
+ "webkitfullscreenchange",
+ "webkitfullscreenerror"
+ ],
+ // old WebKit (Safari 5.1)
+ [
+ "webkitRequestFullScreen",
+ "webkitCancelFullScreen",
+ "webkitCurrentFullScreenElement",
+ "webkitCancelFullScreen",
+ "webkitfullscreenchange",
+ "webkitfullscreenerror"
+ ],
+ [
+ "mozRequestFullScreen",
+ "mozCancelFullScreen",
+ "mozFullScreenElement",
+ "mozFullScreenEnabled",
+ "mozfullscreenchange",
+ "mozfullscreenerror"
+ ],
+ ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"]
+ ];
+
+ var ret = {};
+
+ for (var i = 0; i < fnMap.length; i++) {
+ var val = fnMap[i];
+
+ if (val && val[1] in document) {
+ for (var j = 0; j < val.length; j++) {
+ ret[fnMap[0][j]] = val[j];
+ }
+
+ return ret;
+ }
+ }
+
+ return false;
+ })();
+
+ if (fn) {
+ var FullScreen = {
+ request: function (elem) {
+ elem = elem || document.documentElement;
+
+ elem[fn.requestFullscreen](elem.ALLOW_KEYBOARD_INPUT);
+ },
+ exit: function () {
+ document[fn.exitFullscreen]();
+ },
+ toggle: function (elem) {
+ elem = elem || document.documentElement;
+
+ if (this.isFullscreen()) {
+ this.exit();
+ } else {
+ this.request(elem);
+ }
+ },
+ isFullscreen: function () {
+ return Boolean(document[fn.fullscreenElement]);
+ },
+ enabled: function () {
+ return Boolean(document[fn.fullscreenEnabled]);
+ }
+ };
+
+ $.extend(true, $.fancybox.defaults, {
+ btnTpl: {
+ fullScreen: '"
+ },
+ fullScreen: {
+ autoStart: false
+ }
+ });
+
+ $(document).on(fn.fullscreenchange, function () {
+ var isFullscreen = FullScreen.isFullscreen(),
+ instance = $.fancybox.getInstance();
+
+ if (instance) {
+ // If image is zooming, then force to stop and reposition properly
+ if (instance.current && instance.current.type === "image" && instance.isAnimating) {
+ instance.isAnimating = false;
+
+ instance.update(true, true, 0);
+
+ if (!instance.isComplete) {
+ instance.complete();
+ }
+ }
+
+ instance.trigger("onFullscreenChange", isFullscreen);
+
+ instance.$refs.container.toggleClass("fancybox-is-fullscreen", isFullscreen);
+
+ instance.$refs.toolbar
+ .find("[data-fancybox-fullscreen]")
+ .toggleClass("fancybox-button--fsenter", !isFullscreen)
+ .toggleClass("fancybox-button--fsexit", isFullscreen);
+ }
+ });
+ }
+
+ $(document).on({
+ "onInit.fb": function (e, instance) {
+ var $container;
+
+ if (!fn) {
+ instance.$refs.toolbar.find("[data-fancybox-fullscreen]").remove();
+
+ return;
+ }
+
+ if (instance && instance.group[instance.currIndex].opts.fullScreen) {
+ $container = instance.$refs.container;
+
+ $container.on("click.fb-fullscreen", "[data-fancybox-fullscreen]", function (e) {
+ e.stopPropagation();
+ e.preventDefault();
+
+ FullScreen.toggle();
+ });
+
+ if (instance.opts.fullScreen && instance.opts.fullScreen.autoStart === true) {
+ FullScreen.request();
+ }
+
+ // Expose API
+ instance.FullScreen = FullScreen;
+ } else if (instance) {
+ instance.$refs.toolbar.find("[data-fancybox-fullscreen]").hide();
+ }
+ },
+
+ "afterKeydown.fb": function (e, instance, current, keypress, keycode) {
+ // "F"
+ if (instance && instance.FullScreen && keycode === 70) {
+ keypress.preventDefault();
+
+ instance.FullScreen.toggle();
+ }
+ },
+
+ "beforeClose.fb": function (e, instance) {
+ if (instance && instance.FullScreen && instance.$refs.container.hasClass("fancybox-is-fullscreen")) {
+ FullScreen.exit();
+ }
+ }
+ });
+})(document, jQuery);
+// ==========================================================================
+//
+// Thumbs
+// Displays thumbnails in a grid
+//
+// ==========================================================================
+(function (document, $) {
+ "use strict";
+
+ var CLASS = "fancybox-thumbs",
+ CLASS_ACTIVE = CLASS + "-active";
+
+ // Make sure there are default values
+ $.fancybox.defaults = $.extend(
+ true, {
+ btnTpl: {
+ thumbs: '"
+ },
+ thumbs: {
+ autoStart: false, // Display thumbnails on opening
+ hideOnClose: true, // Hide thumbnail grid when closing animation starts
+ parentEl: ".fancybox-container", // Container is injected into this element
+ axis: "y" // Vertical (y) or horizontal (x) scrolling
+ }
+ },
+ $.fancybox.defaults
+ );
+
+ var FancyThumbs = function (instance) {
+ this.init(instance);
+ };
+
+ $.extend(FancyThumbs.prototype, {
+ $button: null,
+ $grid: null,
+ $list: null,
+ isVisible: false,
+ isActive: false,
+
+ init: function (instance) {
+ var self = this,
+ group = instance.group,
+ enabled = 0;
+
+ self.instance = instance;
+ self.opts = group[instance.currIndex].opts.thumbs;
+
+ instance.Thumbs = self;
+
+ self.$button = instance.$refs.toolbar.find("[data-fancybox-thumbs]");
+
+ // Enable thumbs if at least two group items have thumbnails
+ for (var i = 0, len = group.length; i < len; i++) {
+ if (group[i].thumb) {
+ enabled++;
+ }
+
+ if (enabled > 1) {
+ break;
+ }
+ }
+
+ if (enabled > 1 && !!self.opts) {
+ self.$button.removeAttr("style").on("click", function () {
+ self.toggle();
+ });
+
+ self.isActive = true;
+ } else {
+ self.$button.hide();
+ }
+ },
+
+ create: function () {
+ var self = this,
+ instance = self.instance,
+ parentEl = self.opts.parentEl,
+ list = [],
+ src;
+
+ if (!self.$grid) {
+ // Create main element
+ self.$grid = $('').appendTo(
+ instance.$refs.container
+ .find(parentEl)
+ .addBack()
+ .filter(parentEl)
+ );
+
+ // Add "click" event that performs gallery navigation
+ self.$grid.on("click", "a", function () {
+ instance.jumpTo($(this).attr("data-index"));
+ });
+ }
+
+ // Build the list
+ if (!self.$list) {
+ self.$list = $('
'}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,i=e.fancybox.getInstance(),a=i.current||null;a&&("function"===e.type(a.opts.share.url)&&(t=a.opts.share.url.apply(a,[i,a])),o=a.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===a.type?encodeURIComponent(a.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,i.$caption?encodeURIComponent(i.$caption.text()):""),e.fancybox.open({src:i.translate(i,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,n){"use strict";function o(){var e=t.location.hash.substr(1),n=e.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return{hash:e,index:o<1?1:o,gallery:i}}function i(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function a(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,""!==(n=e.hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""))&&n)}n.escapeSelector||(n.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),n(function(){!1!==n.fancybox.defaults.hash&&(n(e).on({"onInit.fb":function(t,e){var n,i;!1!==e.group[e.currIndex].opts.hash&&(n=o(),(i=a(e))&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i,s){var r;i&&!1!==i.opts.hash&&(r=a(o))&&(o.currentHash=r+(o.group.length>1?"-"+(i.index+1):""),t.location.hash!=="#"+o.currentHash&&(s&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),s&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300)))},"beforeClose.fb":function(n,o,i){i&&!1!==i.opts.hash&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),n(t).on("hashchange.fb",function(){var t=o(),e=null;n.each(n(".fancybox-container").get().reverse(),function(t,o){var i=n(o).data("FancyBox");if(i&&i.currentHash)return e=i,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&i(t)}),setTimeout(function(){n.fancybox.getInstance()||i(o())},50))})}(window,document,jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,i=(new Date).getTime();e.group.length<2||!1===o.opts.wheel||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,i-n<250||(n=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);
\ No newline at end of file
diff --git a/fancybox/createrelease b/fancybox/createrelease
new file mode 100755
index 00000000..d31f3a63
--- /dev/null
+++ b/fancybox/createrelease
@@ -0,0 +1,15 @@
+MODULE=fancybox
+
+cd ..
+
+# old releases not needed anymore
+mkdir -p $MODULE/dist
+rm $MODULE/dist/*
+
+# create release for actual version
+zip -r9 $MODULE/dist/release.zip $MODULE/* -x $MODULE/dist/\* -x $MODULE/test/\* $MODULE/createrelease
+
+echo dist/release.zip created.
+
+cd $MODULE
+
diff --git a/fancybox/fancybox.php b/fancybox/fancybox.php
new file mode 100644
index 00000000..1a9ff634
--- /dev/null
+++ b/fancybox/fancybox.php
@@ -0,0 +1,60 @@
+
+ */
+
+use Friendica\App;
+use Friendica\Core\Hook;
+use Friendica\DI;
+
+function fancybox_install()
+{
+ Hook::register('head', __FILE__, 'fancybox_head');
+ Hook::register('footer', __FILE__, 'fancybox_footer');
+ Hook::register('prepare_body_final', __FILE__, 'fancybox_render');
+}
+
+function fancybox_head(string &$b)
+{
+ DI::page()->registerStylesheet(__DIR__ . '/asset/fancybox/jquery.fancybox.min.css');
+}
+
+function fancybox_footer(string &$str)
+{
+ DI::page()->registerFooterScript(__DIR__ . '/asset/fancybox/jquery.fancybox.min.js');
+ DI::page()->registerFooterScript(__DIR__ . '/asset/fancybox/fancybox.config.js');
+}
+
+function fancybox_render(array &$b){
+ $gallery = 'gallery-' . $b['item']['uri-id'] ?? random_int(1000000, 10000000);
+
+ // performWithEscapedBlocks escapes block defined with 2nd par pattern that won't be processed.
+ // We don't want to touch images in class="type-link":
+ $b['html'] = \Friendica\Util\Strings::performWithEscapedBlocks(
+ $b['html'],
+ '#
.*?
#s',
+ function ($text) use ($gallery) {
+ // This processes images inlined in posts
+ // Frio / Vier hooks für lightbox are un-hooked in fancybox-config.js. So this works for them, too!
+ //if (!in_array(DI::app()->getCurrentTheme(),['vier','frio']))
+ $text = preg_replace(
+ '#]*href="([^"]*)"[^>]*>(]*src="[^"]*"[^>]*>)#',
+ '$2',
+ $text);
+
+ // Local content images attached:
+ $text = preg_replace_callback(
+ '#
';
+ $data = [
+ 'addon' => 'fromapp',
+ 'title' => DI::l10n()->t('FromApp Settings'),
+ 'html' => $html,
+ ];
}
-function fromapp_post_hook(&$a, &$item)
+function fromapp_post_hook(&$item)
{
- if (! local_user()) {
+ if (!DI::userSession()->getLocalUserId()) {
return;
}
- if (local_user() != $item['uid']) {
+ if (DI::userSession()->getLocalUserId() != $item['uid']) {
return;
}
- $app = PConfig::get(local_user(), 'fromapp', 'app');
- $force = intval(PConfig::get(local_user(), 'fromapp', 'force'));
+ $app = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'fromapp', 'app');
+ $force = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'fromapp', 'force'));
if (is_null($app) || (! strlen($app))) {
return;
diff --git a/fromapp/lang/C/messages.po b/fromapp/lang/C/messages.po
index 18f24e02..ce4a7827 100644
--- a/fromapp/lang/C/messages.po
+++ b/fromapp/lang/C/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-02-19 16:42+0100\n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,25 +17,17 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: fromapp.php:40
-msgid "Fromapp settings updated."
-msgstr ""
-
-#: fromapp.php:65 fromapp.php:69
-msgid "FromApp Settings"
-msgstr ""
-
-#: fromapp.php:72
+#: fromapp.php:45
msgid ""
"The application name you would like to show your posts originating from. "
"Separate different app names with a comma. A random one will then be "
"selected for every posting."
msgstr ""
-#: fromapp.php:76
+#: fromapp.php:46
msgid "Use this application name even if another application was used."
msgstr ""
-#: fromapp.php:83
-msgid "Save Settings"
+#: fromapp.php:51
+msgid "FromApp Settings"
msgstr ""
diff --git a/fromapp/lang/ar/messages.po b/fromapp/lang/ar/messages.po
new file mode 100644
index 00000000..5b85425a
--- /dev/null
+++ b/fromapp/lang/ar/messages.po
@@ -0,0 +1,40 @@
+# ADDON fromapp
+# Copyright (C)
+# This file is distributed under the same license as the Friendica fromapp addon package.
+#
+#
+# Translators:
+# abidin toumi , 2021
+# Farida Khalaf , 2021
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-10-29 10:32+0000\n"
+"Last-Translator: abidin toumi \n"
+"Language-Team: Arabic (http://www.transifex.com/Friendica/friendica/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"
+
+#: fromapp.php:53 fromapp.php:57
+msgid "FromApp Settings"
+msgstr "من إعدادات التطبيق"
+
+#: fromapp.php:60
+msgid ""
+"The application name you would like to show your posts originating from. "
+"Separate different app names with a comma. A random one will then be "
+"selected for every posting."
+msgstr "اسم التطبيق الذي تود إظهار منشوراتك منه. \nافصل بين أسماء التطبيقات المختلفة بفاصلة.\n سيتم اختيار اسم واحد عشوائي لكل عملية نشر."
+
+#: fromapp.php:64
+msgid "Use this application name even if another application was used."
+msgstr "استخدم اسم هذا التطبيق حتى إذا تم استخدام تطبيق آخر."
+
+#: fromapp.php:71
+msgid "Save Settings"
+msgstr "احفظ الإعدادات"
diff --git a/fromapp/lang/ar/strings.php b/fromapp/lang/ar/strings.php
new file mode 100644
index 00000000..d0608957
--- /dev/null
+++ b/fromapp/lang/ar/strings.php
@@ -0,0 +1,13 @@
+=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; }
+}}
+$a->strings['FromApp Settings'] = 'من إعدادات التطبيق';
+$a->strings['The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting.'] = 'اسم التطبيق الذي تود إظهار منشوراتك منه.
+افصل بين أسماء التطبيقات المختلفة بفاصلة.
+ سيتم اختيار اسم واحد عشوائي لكل عملية نشر.';
+$a->strings['Use this application name even if another application was used.'] = 'استخدم اسم هذا التطبيق حتى إذا تم استخدام تطبيق آخر.';
+$a->strings['Save Settings'] = 'احفظ الإعدادات';
diff --git a/fromapp/lang/ca/strings.php b/fromapp/lang/ca/strings.php
index c24ff44d..f3ea0512 100644
--- a/fromapp/lang/ca/strings.php
+++ b/fromapp/lang/ca/strings.php
@@ -3,11 +3,10 @@
if(! function_exists("string_plural_select_ca")) {
function string_plural_select_ca($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Fromapp settings updated."] = "S'ha actualitzat la configuració de Fromapp";
-$a->strings["FromApp Settings"] = "Configuració de FromApp";
-$a->strings["The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting."] = "El nom de l'aplicació que voleu mostrar de les vostres publicacions originàries. Separeu diferents noms d'aplicacions amb una coma. A continuació, se seleccionarà un aleatori per a cada publicació.";
-$a->strings["Use this application name even if another application was used."] = "Utilitzeu aquest nom d’aplicació encara que s’hagi utilitzat una altra aplicació.";
-$a->strings["Save Settings"] = "Desa la Configuració";
+$a->strings['Fromapp settings updated.'] = 'S\'ha actualitzat la configuració de Fromapp';
+$a->strings['FromApp Settings'] = 'Configuració de FromApp';
+$a->strings['The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting.'] = 'El nom de l\'aplicació que voleu mostrar de les vostres publicacions originàries. Separeu diferents noms d\'aplicacions amb una coma. A continuació, se seleccionarà un aleatori per a cada publicació.';
+$a->strings['Use this application name even if another application was used.'] = 'Utilitzeu aquest nom d’aplicació encara que s’hagi utilitzat una altra aplicació.';
+$a->strings['Save Settings'] = 'Desa la Configuració';
diff --git a/fromapp/lang/cs/strings.php b/fromapp/lang/cs/strings.php
index a8024c13..28482f40 100644
--- a/fromapp/lang/cs/strings.php
+++ b/fromapp/lang/cs/strings.php
@@ -3,11 +3,10 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
$n = intval($n);
- return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
+ if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; }
}}
-;
-$a->strings["Fromapp settings updated."] = "Nastavení FromApp aktualizována.";
-$a->strings["FromApp Settings"] = "Nastavení FromApp";
-$a->strings["The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting."] = "Název aplikace, ze které píšete své příspěvky, kterou chcete zobrazovat. Oddělujte různé názvy aplikací čárkou. Pro každý příspěvek bude zvolena náhodná.";
-$a->strings["Use this application name even if another application was used."] = "Použít toto jméno aplikace, i když byla použita jiná aplikace";
-$a->strings["Save Settings"] = "Uložit nastavení";
+$a->strings['Fromapp settings updated.'] = 'Nastavení FromApp aktualizována.';
+$a->strings['FromApp Settings'] = 'Nastavení FromApp';
+$a->strings['The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting.'] = 'Název aplikace, ze které píšete své příspěvky, kterou chcete zobrazovat. Oddělujte různé názvy aplikací čárkou. Pro každý příspěvek bude zvolena náhodná.';
+$a->strings['Use this application name even if another application was used.'] = 'Použít toto jméno aplikace, i když byla použita jiná aplikace';
+$a->strings['Save Settings'] = 'Uložit nastavení';
diff --git a/fromapp/lang/da-dk/messages.po b/fromapp/lang/da-dk/messages.po
new file mode 100644
index 00000000..8a7aaf02
--- /dev/null
+++ b/fromapp/lang/da-dk/messages.po
@@ -0,0 +1,35 @@
+# ADDON fromapp
+# Copyright (C)
+# This file is distributed under the same license as the Friendica fromapp addon package.
+#
+#
+# Translators:
+# Anton , 2022
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-22 12:33+0000\n"
+"Last-Translator: Anton , 2022\n"
+"Language-Team: Danish (Denmark) (http://www.transifex.com/Friendica/friendica/language/da_DK/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: da_DK\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: fromapp.php:45
+msgid ""
+"The application name you would like to show your posts originating from. "
+"Separate different app names with a comma. A random one will then be "
+"selected for every posting."
+msgstr "Det app navn du vil vise at dine opslag kommer fra. Separér forskellige app navne med et komma. Et tilfældigt navn vil så blive valgt til hvert opslag."
+
+#: fromapp.php:46
+msgid "Use this application name even if another application was used."
+msgstr "Brug dette app-navn, også selvom en anden app faktisk blev brugt."
+
+#: fromapp.php:51
+msgid "FromApp Settings"
+msgstr "FraApp Indstillinger"
diff --git a/fromapp/lang/da-dk/strings.php b/fromapp/lang/da-dk/strings.php
new file mode 100644
index 00000000..4e2bb036
--- /dev/null
+++ b/fromapp/lang/da-dk/strings.php
@@ -0,0 +1,10 @@
+strings['The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting.'] = 'Det app navn du vil vise at dine opslag kommer fra. Separér forskellige app navne med et komma. Et tilfældigt navn vil så blive valgt til hvert opslag.';
+$a->strings['Use this application name even if another application was used.'] = 'Brug dette app-navn, også selvom en anden app faktisk blev brugt.';
+$a->strings['FromApp Settings'] = 'FraApp Indstillinger';
diff --git a/fromapp/lang/de/messages.po b/fromapp/lang/de/messages.po
index 96b5832e..fa4c8c63 100644
--- a/fromapp/lang/de/messages.po
+++ b/fromapp/lang/de/messages.po
@@ -12,35 +12,27 @@ msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-02-19 16:42+0100\n"
-"PO-Revision-Date: 2019-02-21 05:57+0000\n"
-"Last-Translator: Tobias Diekershoff \n"
-"Language-Team: German (http://www.transifex.com/Friendica/friendica/language/de/)\n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-22 12:33+0000\n"
+"Last-Translator: Tobias Diekershoff , 2019\n"
+"Language-Team: German (http://app.transifex.com/Friendica/friendica/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"
-#: fromapp.php:40
-msgid "Fromapp settings updated."
-msgstr "Fromapp-Einstellungen aktualisiert."
-
-#: fromapp.php:65 fromapp.php:69
-msgid "FromApp Settings"
-msgstr "FromApp-Einstellungen"
-
-#: fromapp.php:72
+#: fromapp.php:45
msgid ""
"The application name you would like to show your posts originating from. "
"Separate different app names with a comma. A random one will then be "
"selected for every posting."
msgstr "Der Name der Applikation der als Quelle deiner Beiträge angezeigt werden soll. Unterschiedliche Namen können mit einem Komma von einander getrennt werden. Ist mehr als ein Name angegeben, wird für jeden Beitrag ein zufälliger Name aus der Liste ausgewählt."
-#: fromapp.php:76
+#: fromapp.php:46
msgid "Use this application name even if another application was used."
msgstr "Verwende diesen Namen, selbst wenn eine andere Applikation verwendet wurde"
-#: fromapp.php:83
-msgid "Save Settings"
-msgstr "Einstellungen speichern"
+#: fromapp.php:51
+msgid "FromApp Settings"
+msgstr "FromApp-Einstellungen"
diff --git a/fromapp/lang/de/strings.php b/fromapp/lang/de/strings.php
index abcf7bfb..00fd8ef0 100644
--- a/fromapp/lang/de/strings.php
+++ b/fromapp/lang/de/strings.php
@@ -3,11 +3,8 @@
if(! function_exists("string_plural_select_de")) {
function string_plural_select_de($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Fromapp settings updated."] = "Fromapp-Einstellungen aktualisiert.";
-$a->strings["FromApp Settings"] = "FromApp-Einstellungen";
-$a->strings["The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting."] = "Der Name der Applikation der als Quelle deiner Beiträge angezeigt werden soll. Unterschiedliche Namen können mit einem Komma von einander getrennt werden. Ist mehr als ein Name angegeben, wird für jeden Beitrag ein zufälliger Name aus der Liste ausgewählt.";
-$a->strings["Use this application name even if another application was used."] = "Verwende diesen Namen, selbst wenn eine andere Applikation verwendet wurde";
-$a->strings["Save Settings"] = "Einstellungen speichern";
+$a->strings['The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting.'] = 'Der Name der Applikation der als Quelle deiner Beiträge angezeigt werden soll. Unterschiedliche Namen können mit einem Komma von einander getrennt werden. Ist mehr als ein Name angegeben, wird für jeden Beitrag ein zufälliger Name aus der Liste ausgewählt.';
+$a->strings['Use this application name even if another application was used.'] = 'Verwende diesen Namen, selbst wenn eine andere Applikation verwendet wurde';
+$a->strings['FromApp Settings'] = 'FromApp-Einstellungen';
diff --git a/fromapp/lang/en-gb/strings.php b/fromapp/lang/en-gb/strings.php
index b2be2285..d68745f6 100644
--- a/fromapp/lang/en-gb/strings.php
+++ b/fromapp/lang/en-gb/strings.php
@@ -3,11 +3,10 @@
if(! function_exists("string_plural_select_en_gb")) {
function string_plural_select_en_gb($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Fromapp settings updated."] = "FromApp settings updated.";
-$a->strings["FromApp Settings"] = "FromApp";
-$a->strings["The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting."] = "The application name you would like to show your posts originating from. Separate different app names with a comma and a random one will be selected for every post.";
-$a->strings["Use this application name even if another application was used."] = "Use this application name even if another application was used.";
-$a->strings["Save Settings"] = "Save settings";
+$a->strings['Fromapp settings updated.'] = 'FromApp settings updated.';
+$a->strings['FromApp Settings'] = 'FromApp';
+$a->strings['The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting.'] = 'The application name you would like to show your posts originating from. Separate different app names with a comma and a random one will be selected for every post.';
+$a->strings['Use this application name even if another application was used.'] = 'Use this application name even if another application was used.';
+$a->strings['Save Settings'] = 'Save settings';
diff --git a/fromapp/lang/es/messages.po b/fromapp/lang/es/messages.po
index 4abce4a8..34234226 100644
--- a/fromapp/lang/es/messages.po
+++ b/fromapp/lang/es/messages.po
@@ -4,14 +4,15 @@
#
#
# Translators:
-# Alberto Díaz Tormo , 2016
+# Albert, 2016
+# Senex Petrovic , 2021
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-27 05:01-0500\n"
-"PO-Revision-Date: 2016-10-23 13:48+0000\n"
-"Last-Translator: Alberto Díaz Tormo \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-04-01 09:55+0000\n"
+"Last-Translator: Senex Petrovic \n"
"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,23 +20,21 @@ msgstr ""
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: fromapp.php:38
-msgid "Fromapp settings updated."
-msgstr "Ajustes de Fromapp actualizados."
-
-#: fromapp.php:64
+#: fromapp.php:53 fromapp.php:57
msgid "FromApp Settings"
msgstr "Ajustes de FromApp"
-#: fromapp.php:66
+#: fromapp.php:60
msgid ""
-"The application name you would like to show your posts originating from."
-msgstr "El nombre de la aplicación desde la que le gustaría que se mostrasen sus publicaciones."
+"The application name you would like to show your posts originating from. "
+"Separate different app names with a comma. A random one will then be "
+"selected for every posting."
+msgstr "El nombre de la aplicación desde la que le gustaría mostrar sus publicaciones. Separe los diferentes nombres de aplicaciones con una coma. Luego, se seleccionará uno al azar para cada publicación."
-#: fromapp.php:70
+#: fromapp.php:64
msgid "Use this application name even if another application was used."
msgstr "Utilice este nombre de aplicación incluso si otra aplicación fue utilizada."
-#: fromapp.php:77
-msgid "Submit"
-msgstr "Enviar"
+#: fromapp.php:71
+msgid "Save Settings"
+msgstr "Guardar Ajustes"
diff --git a/fromapp/lang/es/strings.php b/fromapp/lang/es/strings.php
index 84e1dcf8..6f9a8133 100644
--- a/fromapp/lang/es/strings.php
+++ b/fromapp/lang/es/strings.php
@@ -2,11 +2,10 @@
if(! function_exists("string_plural_select_es")) {
function string_plural_select_es($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Fromapp settings updated."] = "Ajustes de Fromapp actualizados.";
-$a->strings["FromApp Settings"] = "Ajustes de FromApp";
-$a->strings["The application name you would like to show your posts originating from."] = "El nombre de la aplicación desde la que le gustaría que se mostrasen sus publicaciones.";
-$a->strings["Use this application name even if another application was used."] = "Utilice este nombre de aplicación incluso si otra aplicación fue utilizada.";
-$a->strings["Submit"] = "Enviar";
+$a->strings['FromApp Settings'] = 'Ajustes de FromApp';
+$a->strings['The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting.'] = 'El nombre de la aplicación desde la que le gustaría mostrar sus publicaciones. Separe los diferentes nombres de aplicaciones con una coma. Luego, se seleccionará uno al azar para cada publicación.';
+$a->strings['Use this application name even if another application was used.'] = 'Utilice este nombre de aplicación incluso si otra aplicación fue utilizada.';
+$a->strings['Save Settings'] = 'Guardar Ajustes';
diff --git a/fromapp/lang/fi-fi/strings.php b/fromapp/lang/fi-fi/strings.php
index a41ae8b8..caff9111 100644
--- a/fromapp/lang/fi-fi/strings.php
+++ b/fromapp/lang/fi-fi/strings.php
@@ -2,11 +2,9 @@
if(! function_exists("string_plural_select_fi_fi")) {
function string_plural_select_fi_fi($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Fromapp settings updated."] = "FromApp -asetukset päivitettiin.";
-$a->strings["FromApp Settings"] = "FromApp -asetukset";
-$a->strings["The application name you would like to show your posts originating from."] = "";
-$a->strings["Use this application name even if another application was used."] = "";
-$a->strings["Submit"] = "Lähetä";
+$a->strings['Fromapp settings updated.'] = 'FromApp -asetukset päivitettiin.';
+$a->strings['FromApp Settings'] = 'FromApp -asetukset';
+$a->strings['Submit'] = 'Lähetä';
diff --git a/fromapp/lang/fr/messages.po b/fromapp/lang/fr/messages.po
new file mode 100644
index 00000000..fec75102
--- /dev/null
+++ b/fromapp/lang/fr/messages.po
@@ -0,0 +1,37 @@
+# ADDON fromapp
+# Copyright (C)
+# This file is distributed under the same license as the Friendica fromapp addon package.
+#
+#
+# Translators:
+# bob lebonche , 2021
+# Hypolite Petovan , 2016
+# StefOfficiel , 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-22 12:33+0000\n"
+"Last-Translator: bob lebonche , 2021\n"
+"Language-Team: French (http://www.transifex.com/Friendica/friendica/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=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
+
+#: fromapp.php:45
+msgid ""
+"The application name you would like to show your posts originating from. "
+"Separate different app names with a comma. A random one will then be "
+"selected for every posting."
+msgstr "Nom de l'application d'origine de votre publication. Séparer les noms des différentes applications par une virgule. Une application sera seléctionnée aléatoirement pour chaque publication. "
+
+#: fromapp.php:46
+msgid "Use this application name even if another application was used."
+msgstr "Utilisez le nom de cette application même si une autre application a été utilisé."
+
+#: fromapp.php:51
+msgid "FromApp Settings"
+msgstr "Paramètres de FromApp"
diff --git a/fromapp/lang/fr/strings.php b/fromapp/lang/fr/strings.php
index a92ac854..9e49bf9f 100644
--- a/fromapp/lang/fr/strings.php
+++ b/fromapp/lang/fr/strings.php
@@ -1,7 +1,10 @@
-strings["Fromapp settings updated."] = "Réglages FromApp mis-à-jour";
-$a->strings["FromApp Settings"] = "FromApp";
-$a->strings["The application name you would like to show your posts originating from."] = "Le nom d'application que vous souhaiteriez que vos publications affichent comme source.";
-$a->strings["Use this application name even if another application was used."] = "Afficher ce nom d'application même si une autre a été utilisée.";
-$a->strings["Submit"] = "Envoyer";
+strings['The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting.'] = 'Nom de l\'application d\'origine de votre publication. Séparer les noms des différentes applications par une virgule. Une application sera seléctionnée aléatoirement pour chaque publication. ';
+$a->strings['Use this application name even if another application was used.'] = 'Utilisez le nom de cette application même si une autre application a été utilisé.';
+$a->strings['FromApp Settings'] = 'Paramètres de FromApp';
diff --git a/fromapp/lang/hu/messages.po b/fromapp/lang/hu/messages.po
new file mode 100644
index 00000000..89168952
--- /dev/null
+++ b/fromapp/lang/hu/messages.po
@@ -0,0 +1,35 @@
+# ADDON fromapp
+# Copyright (C)
+# This file is distributed under the same license as the Friendica fromapp addon package.
+#
+#
+# Translators:
+# Balázs Úr, 2020
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-22 12:33+0000\n"
+"Last-Translator: Balázs Úr, 2020\n"
+"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/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"
+
+#: fromapp.php:45
+msgid ""
+"The application name you would like to show your posts originating from. "
+"Separate different app names with a comma. A random one will then be "
+"selected for every posting."
+msgstr "Az alkalmazás neve, amelyet meg szeretne jeleníteni a bejegyzései származási helyeként. A különböző alkalmazásnevek vesszővel választhatók el. Ezután véletlenszerűen lesz kiválasztva az egyikük minden egyes beküldésnél."
+
+#: fromapp.php:46
+msgid "Use this application name even if another application was used."
+msgstr "Ezen alkalmazásnév használata akkor is, ha egy másik alkalmazás lett használva."
+
+#: fromapp.php:51
+msgid "FromApp Settings"
+msgstr "FromApp-beállítások"
diff --git a/fromapp/lang/hu/strings.php b/fromapp/lang/hu/strings.php
new file mode 100644
index 00000000..6d903f3c
--- /dev/null
+++ b/fromapp/lang/hu/strings.php
@@ -0,0 +1,10 @@
+strings['The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting.'] = 'Az alkalmazás neve, amelyet meg szeretne jeleníteni a bejegyzései származási helyeként. A különböző alkalmazásnevek vesszővel választhatók el. Ezután véletlenszerűen lesz kiválasztva az egyikük minden egyes beküldésnél.';
+$a->strings['Use this application name even if another application was used.'] = 'Ezen alkalmazásnév használata akkor is, ha egy másik alkalmazás lett használva.';
+$a->strings['FromApp Settings'] = 'FromApp-beállítások';
diff --git a/fromapp/lang/it/strings.php b/fromapp/lang/it/strings.php
index ffaa40cd..7febfcd7 100644
--- a/fromapp/lang/it/strings.php
+++ b/fromapp/lang/it/strings.php
@@ -3,11 +3,10 @@
if(! function_exists("string_plural_select_it")) {
function string_plural_select_it($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Fromapp settings updated."] = "Impostazioni \"FromApp\" aggiornato.";
-$a->strings["FromApp Settings"] = "Imnpostazioni \"FromApp\"";
-$a->strings["The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting."] = "Il nome applicazione che vuoi compaia come origine dei tuoi messaggi. Separa differenti nomi con una virgola. Di questi, un nome a caso verrà selezionato per ogni invio.";
-$a->strings["Use this application name even if another application was used."] = "Usa questo nome anche se un'altra applicazione è stata effettivamente usata.";
-$a->strings["Save Settings"] = "Salva Impostazioni";
+$a->strings['Fromapp settings updated.'] = 'Impostazioni "FromApp" aggiornato.';
+$a->strings['FromApp Settings'] = 'Imnpostazioni "FromApp"';
+$a->strings['The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting.'] = 'Il nome applicazione che vuoi compaia come origine dei tuoi messaggi. Separa differenti nomi con una virgola. Di questi, un nome a caso verrà selezionato per ogni invio.';
+$a->strings['Use this application name even if another application was used.'] = 'Usa questo nome anche se un\'altra applicazione è stata effettivamente usata.';
+$a->strings['Save Settings'] = 'Salva Impostazioni';
diff --git a/fromapp/lang/nl/strings.php b/fromapp/lang/nl/strings.php
index 17852479..ab13e074 100644
--- a/fromapp/lang/nl/strings.php
+++ b/fromapp/lang/nl/strings.php
@@ -3,11 +3,10 @@
if(! function_exists("string_plural_select_nl")) {
function string_plural_select_nl($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Fromapp settings updated."] = "Fromapp instellingen opgeslagen";
-$a->strings["FromApp Settings"] = "FromApp instellingen";
-$a->strings["The application name you would like to show your posts originating from."] = "De applicatienaam die je wilt laten verschijnen bij je berichten";
-$a->strings["Use this application name even if another application was used."] = "Gebruik deze applicatienaam zelfs als een andere applicatie werd gebruikt";
-$a->strings["Submit"] = "Opslaan";
+$a->strings['Fromapp settings updated.'] = 'Fromapp instellingen opgeslagen';
+$a->strings['FromApp Settings'] = 'FromApp instellingen';
+$a->strings['The application name you would like to show your posts originating from.'] = 'De applicatienaam die je wilt laten verschijnen bij je berichten';
+$a->strings['Use this application name even if another application was used.'] = 'Gebruik deze applicatienaam zelfs als een andere applicatie werd gebruikt';
+$a->strings['Submit'] = 'Opslaan';
diff --git a/fromapp/lang/pl/messages.po b/fromapp/lang/pl/messages.po
index e34a8541..4bfc3f81 100644
--- a/fromapp/lang/pl/messages.po
+++ b/fromapp/lang/pl/messages.po
@@ -9,9 +9,9 @@ msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-02-19 16:42+0100\n"
-"PO-Revision-Date: 2019-03-07 19:25+0000\n"
-"Last-Translator: Waldemar Stoczkowski\n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-22 12:33+0000\n"
+"Last-Translator: Waldemar Stoczkowski, 2018-2019\n"
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,25 +19,17 @@ msgstr ""
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
-#: fromapp.php:40
-msgid "Fromapp settings updated."
-msgstr "Zaktualizowano ustawienia Fromapp."
-
-#: fromapp.php:65 fromapp.php:69
-msgid "FromApp Settings"
-msgstr "Ustawienia FromApp"
-
-#: fromapp.php:72
+#: fromapp.php:45
msgid ""
"The application name you would like to show your posts originating from. "
"Separate different app names with a comma. A random one will then be "
"selected for every posting."
msgstr "Nazwa aplikacji, z której chcesz wyświetlać swoje posty. Oddziel różne nazwy aplikacji przecinkami. Zostanie losowo wybrana dla każdej lokalizacji."
-#: fromapp.php:76
+#: fromapp.php:46
msgid "Use this application name even if another application was used."
msgstr "Użyj tej nazwy aplikacji, nawet jeśli użyto innej aplikacji."
-#: fromapp.php:83
-msgid "Save Settings"
-msgstr "Zapisz ustawienia"
+#: fromapp.php:51
+msgid "FromApp Settings"
+msgstr "Ustawienia FromApp"
diff --git a/fromapp/lang/pl/strings.php b/fromapp/lang/pl/strings.php
index e65f47d5..f7b2da50 100644
--- a/fromapp/lang/pl/strings.php
+++ b/fromapp/lang/pl/strings.php
@@ -3,11 +3,8 @@
if(! function_exists("string_plural_select_pl")) {
function string_plural_select_pl($n){
$n = intval($n);
- return ($n==1 ? 0 : ($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14) ? 1 : $n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14) ? 2 : 3);;
+ if ($n==1) { return 0; } else if (($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["Fromapp settings updated."] = "Zaktualizowano ustawienia Fromapp.";
-$a->strings["FromApp Settings"] = "Ustawienia FromApp";
-$a->strings["The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting."] = "Nazwa aplikacji, z której chcesz wyświetlać swoje posty. Oddziel różne nazwy aplikacji przecinkami. Zostanie losowo wybrana dla każdej lokalizacji.";
-$a->strings["Use this application name even if another application was used."] = "Użyj tej nazwy aplikacji, nawet jeśli użyto innej aplikacji.";
-$a->strings["Save Settings"] = "Zapisz ustawienia";
+$a->strings['The application name you would like to show your posts originating from. Separate different app names with a comma. A random one will then be selected for every posting.'] = 'Nazwa aplikacji, z której chcesz wyświetlać swoje posty. Oddziel różne nazwy aplikacji przecinkami. Zostanie losowo wybrana dla każdej lokalizacji.';
+$a->strings['Use this application name even if another application was used.'] = 'Użyj tej nazwy aplikacji, nawet jeśli użyto innej aplikacji.';
+$a->strings['FromApp Settings'] = 'Ustawienia FromApp';
diff --git a/fromapp/lang/ro/strings.php b/fromapp/lang/ro/strings.php
index 075f881f..adc01c05 100644
--- a/fromapp/lang/ro/strings.php
+++ b/fromapp/lang/ro/strings.php
@@ -2,11 +2,11 @@
if(! function_exists("string_plural_select_ro")) {
function string_plural_select_ro($n){
- return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
+ $n = intval($n);
+ if ($n==1) { return 0; } else if ((($n%100>19)||(($n%100==0)&&($n!=0)))) { return 2; } else { return 1; }
}}
-;
-$a->strings["Fromapp settings updated."] = "Configurările Fromapp au fost actualizate.";
-$a->strings["FromApp Settings"] = "Configurări FromApp";
-$a->strings["The application name you would like to show your posts originating from."] = "Denumirea aplicației pe care doriți să o afișați ca și origine pentru postările dvs.";
-$a->strings["Use this application name even if another application was used."] = "Utilizați numele acestei aplicații chiar dacă o altă aplicație a fost utilizată.";
-$a->strings["Submit"] = "Trimite";
+$a->strings['Fromapp settings updated.'] = 'Configurările Fromapp au fost actualizate.';
+$a->strings['FromApp Settings'] = 'Configurări FromApp';
+$a->strings['The application name you would like to show your posts originating from.'] = 'Denumirea aplicației pe care doriți să o afișați ca și origine pentru postările dvs.';
+$a->strings['Use this application name even if another application was used.'] = 'Utilizați numele acestei aplicații chiar dacă o altă aplicație a fost utilizată.';
+$a->strings['Submit'] = 'Trimite';
diff --git a/fromapp/lang/ru/strings.php b/fromapp/lang/ru/strings.php
index c67a3e76..9289d408 100644
--- a/fromapp/lang/ru/strings.php
+++ b/fromapp/lang/ru/strings.php
@@ -2,11 +2,11 @@
if(! function_exists("string_plural_select_ru")) {
function string_plural_select_ru($n){
- return ($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 = intval($n);
+ if ($n%10==1 && $n%100!=11) { return 0; } else if ($n%10>=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["Fromapp settings updated."] = "Настройки Fromapp обновлены.";
-$a->strings["FromApp Settings"] = "Настройки Fromapp";
-$a->strings["The application name you would like to show your posts originating from."] = "Имя приложения, которое будет показываться при просмотре сообщения.";
-$a->strings["Use this application name even if another application was used."] = "Использовать это имя приложения даже если используется другое приложение.";
-$a->strings["Submit"] = "Добавить";
+$a->strings['Fromapp settings updated.'] = 'Настройки Fromapp обновлены.';
+$a->strings['FromApp Settings'] = 'Настройки Fromapp';
+$a->strings['The application name you would like to show your posts originating from.'] = 'Имя приложения, которое будет показываться при просмотре сообщения.';
+$a->strings['Use this application name even if another application was used.'] = 'Использовать это имя приложения даже если используется другое приложение.';
+$a->strings['Submit'] = 'Добавить';
diff --git a/fromapp/lang/sv/messages.po b/fromapp/lang/sv/messages.po
new file mode 100644
index 00000000..bc9e43fe
--- /dev/null
+++ b/fromapp/lang/sv/messages.po
@@ -0,0 +1,34 @@
+# ADDON fromapp
+# Copyright (C)
+# This file is distributed under the same license as the Friendica fromapp addon package.
+#
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2021-12-22 15:15+0000\n"
+"Last-Translator: Transifex Bot <>\n"
+"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/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"
+
+#: fromapp.php:45
+msgid ""
+"The application name you would like to show your posts originating from. "
+"Separate different app names with a comma. A random one will then be "
+"selected for every posting."
+msgstr ""
+
+#: fromapp.php:46
+msgid "Use this application name even if another application was used."
+msgstr ""
+
+#: fromapp.php:51
+msgid "FromApp Settings"
+msgstr ""
diff --git a/fromapp/lang/sv/strings.php b/fromapp/lang/sv/strings.php
index 3ec569a7..72e9772f 100644
--- a/fromapp/lang/sv/strings.php
+++ b/fromapp/lang/sv/strings.php
@@ -1,3 +1,7 @@
-strings["Submit"] = "Spara";
+
*/
-use Friendica\Core\Cache;
-use Friendica\Core\Config;
+
+use Friendica\App;
use Friendica\Core\Hook;
-use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
-use Friendica\Util\Network;
-use Friendica\Util\Strings;
+use Friendica\DI;
function geocoordinates_install()
{
@@ -20,90 +18,83 @@ function geocoordinates_install()
Hook::register('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
}
-
-function geocoordinates_uninstall()
+function geocoordinates_resolve_item(array &$item)
{
- Hook::unregister('post_local', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
- Hook::unregister('post_remote', 'addon/geocoordinates/geocoordinates.php', 'geocoordinates_post_hook');
-}
-
-function geocoordinates_resolve_item(&$item)
-{
- if((!$item["coord"]) || ($item["location"]))
+ if ((!$item['coord']) || ($item['location'])) {
return;
+ }
- $key = Config::get("geocoordinates", "api_key");
- if ($key == "")
+ $key = DI::config()->get('geocoordinates', 'api_key');
+ if ($key == '') {
return;
+ }
- $language = Config::get("geocoordinates", "language");
- if ($language == "")
- $language = "de";
+ $language = DI::config()->get('geocoordinates', 'language');
+ if ($language == '') {
+ $language = 'de';
+ }
- $coords = explode(' ',$item["coord"]);
+ $coords = explode(' ', $item['coord']);
- if (count($coords) < 2)
+ if (count($coords) < 2) {
return;
+ }
$coords[0] = round($coords[0], 5);
$coords[1] = round($coords[1], 5);
- $result = Cache::get("geocoordinates:".$language.":".$coords[0]."-".$coords[1]);
+ $result = DI::cache()->get('geocoordinates:' . $language . ':' . $coords[0] . '-' . $coords[1]);
if (!is_null($result)) {
- $item["location"] = $result;
+ $item['location'] = $result;
return;
}
- $s = Network::fetchUrl("https://api.opencagedata.com/geocode/v1/json?q=".$coords[0].",".$coords[1]."&key=".$key."&language=".$language);
+ $s = DI::httpClient()->fetch('https://api.opencagedata.com/geocode/v1/json?q=' . $coords[0] . ',' . $coords[1] . '&key=' . $key . '&language=' . $language);
if (!$s) {
- Logger::log("API could not be queried", Logger::DEBUG);
+ Logger::info('API could not be queried');
return;
}
$data = json_decode($s);
- if ($data->status->code != "200") {
- Logger::log("API returned error ".$data->status->code." ".$data->status->message, Logger::DEBUG);
+ if ($data->status->code != '200') {
+ Logger::info('API returned error ' . $data->status->code . ' ' . $data->status->message);
return;
}
if (($data->total_results == 0) || (count($data->results) == 0)) {
- Logger::log("No results found for coordinates ".$item["coord"], Logger::DEBUG);
+ Logger::info('No results found for coordinates ' . $item['coord']);
return;
}
- $item["location"] = $data->results[0]->formatted;
+ $item['location'] = $data->results[0]->formatted;
- Logger::log("Got location for coordinates ".$coords[0]."-".$coords[1].": ".$item["location"], Logger::DEBUG);
+ Logger::info('Got location for coordinates ' . $coords[0] . '-' . $coords[1] . ': ' . $item['location']);
- if ($item["location"] != "")
- Cache::set("geocoordinates:".$language.":".$coords[0]."-".$coords[1], $item["location"]);
+ if ($item['location'] != '') {
+ DI::cache()->set('geocoordinates:' . $language.':' . $coords[0] . '-' . $coords[1], $item['location']);
+ }
}
-function geocoordinates_post_hook($a, &$item)
+function geocoordinates_post_hook(&$item)
{
geocoordinates_resolve_item($item);
}
-function geocoordinates_addon_admin(&$a, &$o)
+function geocoordinates_addon_admin(string &$o)
{
-
- $t = Renderer::getMarkupTemplate("admin.tpl", "addon/geocoordinates/");
+ $t = Renderer::getMarkupTemplate('admin.tpl', 'addon/geocoordinates/');
$o = Renderer::replaceMacros($t, [
- '$submit' => L10n::t('Save Settings'),
- '$api_key' => ['api_key', L10n::t('API Key'), Config::get('geocoordinates', 'api_key'), ''],
- '$language' => ['language', L10n::t('Language code (IETF format)'), Config::get('geocoordinates', 'language'), ''],
+ '$submit' => DI::l10n()->t('Save Settings'),
+ '$api_key' => ['api_key', DI::l10n()->t('API Key'), DI::config()->get('geocoordinates', 'api_key'), ''],
+ '$language' => ['language', DI::l10n()->t('Language code (IETF format)'), DI::config()->get('geocoordinates', 'language'), ''],
]);
}
-function geocoordinates_addon_admin_post(&$a)
+function geocoordinates_addon_admin_post()
{
- $api_key = (!empty($_POST['api_key']) ? Strings::escapeTags(trim($_POST['api_key'])) : '');
- Config::set('geocoordinates', 'api_key', $api_key);
-
- $language = (!empty($_POST['language']) ? Strings::escapeTags(trim($_POST['language'])) : '');
- Config::set('geocoordinates', 'language', $language);
- info(L10n::t('Settings updated.'). EOL);
+ DI::config()->set('geocoordinates', 'api_key', trim($_POST['api_key'] ?? ''));
+ DI::config()->set('geocoordinates', 'language', trim($_POST['language'] ?? ''));
}
diff --git a/geonames/README.md b/geonames/README.md
index 16b85b37..7673840d 100644
--- a/geonames/README.md
+++ b/geonames/README.md
@@ -7,10 +7,12 @@ Use [Geonames service](https://www.geonames.org) to resolve nearest populated lo
## Installation
-Pre-requisite: Register a username at https://www.geonames.org/login and set it in `config/addon.config.php`
+Pre-requisite: Register a username at https://www.geonames.org/login and set it in `config/geonames.config.php`:
- 'geonames' => [
- 'username' => 'your_username'
- ],
+ return [
+ 'geonames' => [
+ 'username' => 'your_username'
+ ],
+ ];
Also visit https://geonames.org/manageaccount and enable access to the free web services.
diff --git a/geonames/config/geonames.config.php b/geonames/config/geonames.config.php
index 6af3634e..179fb56c 100644
--- a/geonames/config/geonames.config.php
+++ b/geonames/config/geonames.config.php
@@ -1,7 +1,7 @@
[
diff --git a/geonames/geonames.css b/geonames/geonames.css
deleted file mode 100644
index 0c67e7fc..00000000
--- a/geonames/geonames.css
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-#geonames-enable-label {
- float: left;
- width: 200px;
- margin-bottom: 25px;
-}
-
-#geonames-checkbox {
- float: left;
-}
-
-
diff --git a/geonames/geonames.php b/geonames/geonames.php
index c052cef6..dcbd65f8 100644
--- a/geonames/geonames.php
+++ b/geonames/geonames.php
@@ -7,14 +7,11 @@
*/
use Friendica\App;
-use Friendica\Core\Config;
use Friendica\Core\Hook;
-use Friendica\Core\L10n;
use Friendica\Core\Logger;
-use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
-use Friendica\Util\ConfigFileLoader;
-use Friendica\Util\Network;
+use Friendica\DI;
+use Friendica\Core\Config\Util\ConfigFileManager;
use Friendica\Util\XML;
function geonames_install()
@@ -36,12 +33,12 @@ function geonames_install()
Hook::register('addon_settings_post', __FILE__, 'geonames_addon_settings_post');
}
-function geonames_load_config(App $a, ConfigFileLoader $loader)
+function geonames_load_config(ConfigFileManager $loader)
{
- $a->getConfigCache()->load($loader->loadAddonConfig('geonames'));
+ DI::app()->getConfigCache()->load($loader->loadAddonConfig('geonames'), \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC);
}
-function geonames_post_hook(App $a, array &$item)
+function geonames_post_hook(array &$item)
{
/* An item was posted on the local system.
* We are going to look for specific items:
@@ -49,13 +46,13 @@ function geonames_post_hook(App $a, array &$item)
* - The profile owner must have allowed our addon
*/
- Logger::log('geonames invoked');
+ Logger::notice('geonames invoked');
- if (!local_user()) { /* non-zero if this is a logged in user of this system */
+ if (!DI::userSession()->getLocalUserId()) { /* non-zero if this is a logged in user of this system */
return;
}
- if (local_user() != $item['uid']) { /* Does this person own the post? */
+ if (DI::userSession()->getLocalUserId() != $item['uid']) { /* Does this person own the post? */
return;
}
@@ -65,8 +62,8 @@ function geonames_post_hook(App $a, array &$item)
/* Retrieve our personal config setting */
- $geo_account = Config::get('geonames', 'username');
- $active = PConfig::get(local_user(), 'geonames', 'enable');
+ $geo_account = DI::config()->get('geonames', 'username');
+ $active = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'geonames', 'enable');
if (!$geo_account || !$active) {
return;
@@ -80,7 +77,7 @@ function geonames_post_hook(App $a, array &$item)
/* OK, we're allowed to do our stuff. */
- $s = Network::fetchUrl('http://api.geonames.org/findNearbyPlaceName?lat=' . $coords[0] . '&lng=' . $coords[1] . '&username=' . $geo_account);
+ $s = DI::httpClient()->fetch('http://api.geonames.org/findNearbyPlaceName?lat=' . $coords[0] . '&lng=' . $coords[1] . '&username=' . $geo_account);
if (!$s) {
return;
@@ -100,52 +97,46 @@ function geonames_post_hook(App $a, array &$item)
* We will make sure we've got a valid user account
* and if so set our configuration setting for this person.
*
- * @param App $a
* @param array $post The $_POST array
*/
-function geonames_addon_settings_post(App $a, array $post)
+function geonames_addon_settings_post(array $post)
{
- if (!local_user() || empty($_POST['geonames-submit'])) {
+ if (!DI::userSession()->getLocalUserId() || empty($_POST['geonames-submit'])) {
return;
}
- PConfig::set(local_user(), 'geonames', 'enable', intval($_POST['geonames-enable']));
-
- info(L10n::t('Geonames settings updated.'));
+ DI::pConfig()->set(DI::userSession()->getLocalUserId(), 'geonames', 'enable', intval($_POST['geonames-enable']));
}
/**
* Called from the Addon Setting form.
* Add our own settings info to the page.
*
- * @param App $a
- * @param string $s
+ * @param array $data
* @throws Exception
*/
-function geonames_addon_settings(App $a, &$s)
+function geonames_addon_settings(array &$data)
{
- if (!local_user()) {
+ if (!DI::userSession()->getLocalUserId()) {
return;
}
- $geo_account = Config::get('geonames', 'username');
-
+ $geo_account = DI::config()->get('geonames', 'username');
if (!$geo_account) {
return;
}
- /* Add our stylesheet to the page so we can make our settings look nice */
- $stylesheetPath = __DIR__ . '/geonames.css';
- $a->registerStylesheet($stylesheetPath);
+ $enabled = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'geonames', 'enable'));
- /* Get the current state of our config variable */
- $enabled = intval(PConfig::get(local_user(), 'geonames', 'enable'));
-
- $t = Renderer::getMarkupTemplate('settings.tpl', __DIR__);
- $s .= Renderer::replaceMacros($t, [
- '$title' => L10n::t('Geonames Settings'),
- '$description' => L10n::t('Replace numerical coordinates by the nearest populated location name in your posts.'),
- '$enable' => ['geonames-enable', L10n::t('Enable Geonames Addon'), $enabled],
- '$submit' => L10n::t('Save Settings')
+ $t = Renderer::getMarkupTemplate('settings.tpl', 'addon/geonames/');
+ $html = Renderer::replaceMacros($t, [
+ '$info' => DI::l10n()->t('Replace numerical coordinates by the nearest populated location name in your posts.'),
+ '$enable' => ['geonames-enable', DI::l10n()->t('Enable Geonames Addon'), $enabled],
]);
+
+ $data = [
+ 'addon' => 'geonames',
+ 'title' => DI::l10n()->t('Geonames Settings'),
+ 'html' => $html,
+ ];
}
diff --git a/geonames/lang/C/messages.po b/geonames/lang/C/messages.po
index 81c239d2..c7f73046 100644
--- a/geonames/lang/C/messages.po
+++ b/geonames/lang/C/messages.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-27 05:01-0500\n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -17,18 +17,16 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: geonames.php:143
-msgid "Geonames settings updated."
+#: geonames.php:135
+msgid ""
+"Replace numerical coordinates by the nearest populated location name in your "
+"posts."
msgstr ""
-#: geonames.php:179
-msgid "Geonames Settings"
-msgstr ""
-
-#: geonames.php:181
+#: geonames.php:136
msgid "Enable Geonames Addon"
msgstr ""
-#: geonames.php:187
-msgid "Submit"
+#: geonames.php:141
+msgid "Geonames Settings"
msgstr ""
diff --git a/geonames/lang/ar/messages.po b/geonames/lang/ar/messages.po
new file mode 100644
index 00000000..aa10cf93
--- /dev/null
+++ b/geonames/lang/ar/messages.po
@@ -0,0 +1,39 @@
+# ADDON geonames
+# Copyright (C)
+# This file is distributed under the same license as the Friendica geonames addon package.
+#
+#
+# Translators:
+# abidin toumi , 2021
+# Farida Khalaf , 2021
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-10-29 10:33+0000\n"
+"Last-Translator: abidin toumi \n"
+"Language-Team: Arabic (http://www.transifex.com/Friendica/friendica/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"
+
+#: geonames.php:141
+msgid "Geonames Settings"
+msgstr "إعدادات الأسماء الجغرافية"
+
+#: geonames.php:142
+msgid ""
+"Replace numerical coordinates by the nearest populated location name in your"
+" posts."
+msgstr "استبدل الإحداثيات الرقمية بأقرب اسم موقع مأهول في مشاركاتك."
+
+#: geonames.php:143
+msgid "Enable Geonames Addon"
+msgstr " تفعيل إضافة الأسماء الجغرافية"
+
+#: geonames.php:144
+msgid "Save Settings"
+msgstr "احفظ الإعدادات"
diff --git a/geonames/lang/ar/strings.php b/geonames/lang/ar/strings.php
new file mode 100644
index 00000000..f69c6665
--- /dev/null
+++ b/geonames/lang/ar/strings.php
@@ -0,0 +1,11 @@
+=3 && $n%100<=10) { return 3; } else if ($n%100>=11 && $n%100<=99) { return 4; } else { return 5; }
+}}
+$a->strings['Geonames Settings'] = 'إعدادات الأسماء الجغرافية';
+$a->strings['Replace numerical coordinates by the nearest populated location name in your posts.'] = 'استبدل الإحداثيات الرقمية بأقرب اسم موقع مأهول في مشاركاتك.';
+$a->strings['Enable Geonames Addon'] = ' تفعيل إضافة الأسماء الجغرافية';
+$a->strings['Save Settings'] = 'احفظ الإعدادات';
diff --git a/geonames/lang/cs/strings.php b/geonames/lang/cs/strings.php
index f8f41c1b..bab1bdff 100644
--- a/geonames/lang/cs/strings.php
+++ b/geonames/lang/cs/strings.php
@@ -3,10 +3,9 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
$n = intval($n);
- return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
+ if (($n == 1 && $n % 1 == 0)) { return 0; } else if (($n >= 2 && $n <= 4 && $n % 1 == 0)) { return 1; } else if (($n % 1 != 0 )) { return 2; } else { return 3; }
}}
-;
-$a->strings["Geonames settings updated."] = "Nastavení Geonames aktualizována.";
-$a->strings["Geonames Settings"] = "Nastavení Geonames";
-$a->strings["Enable Geonames Addon"] = "Povolit doplněk Geonames";
-$a->strings["Submit"] = "Odeslat";
+$a->strings['Geonames settings updated.'] = 'Nastavení Geonames aktualizována.';
+$a->strings['Geonames Settings'] = 'Nastavení Geonames';
+$a->strings['Enable Geonames Addon'] = 'Povolit doplněk Geonames';
+$a->strings['Submit'] = 'Odeslat';
diff --git a/geonames/lang/da-dk/messages.po b/geonames/lang/da-dk/messages.po
new file mode 100644
index 00000000..fda74982
--- /dev/null
+++ b/geonames/lang/da-dk/messages.po
@@ -0,0 +1,34 @@
+# ADDON geonames
+# Copyright (C)
+# This file is distributed under the same license as the Friendica geonames addon package.
+#
+#
+# Translators:
+# Anton , 2022
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-23 08:27+0000\n"
+"Last-Translator: Anton , 2022\n"
+"Language-Team: Danish (Denmark) (http://www.transifex.com/Friendica/friendica/language/da_DK/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: da_DK\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: geonames.php:135
+msgid ""
+"Replace numerical coordinates by the nearest populated location name in your"
+" posts."
+msgstr "Erstat numeriske koordinater med den nærmeste beboede lokation i dine opslag."
+
+#: geonames.php:136
+msgid "Enable Geonames Addon"
+msgstr "Aktivér geonavne tilføjelse"
+
+#: geonames.php:141
+msgid "Geonames Settings"
+msgstr "Geonavne Indstillinger"
diff --git a/geonames/lang/da-dk/strings.php b/geonames/lang/da-dk/strings.php
new file mode 100644
index 00000000..2b27fd28
--- /dev/null
+++ b/geonames/lang/da-dk/strings.php
@@ -0,0 +1,10 @@
+strings['Replace numerical coordinates by the nearest populated location name in your posts.'] = 'Erstat numeriske koordinater med den nærmeste beboede lokation i dine opslag.';
+$a->strings['Enable Geonames Addon'] = 'Aktivér geonavne tilføjelse';
+$a->strings['Geonames Settings'] = 'Geonavne Indstillinger';
diff --git a/geonames/lang/de/messages.po b/geonames/lang/de/messages.po
index fdc3ed63..cbb9f74d 100644
--- a/geonames/lang/de/messages.po
+++ b/geonames/lang/de/messages.po
@@ -4,34 +4,34 @@
#
#
# Translators:
-# Abrax , 2014
-# bavatar , 2014
+# Andreas H., 2014
+# Tobias Diekershoff , 2014
+# Tobias Diekershoff , 2018,2021
+# Ulf Rompe , 2019
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-27 05:01-0500\n"
-"PO-Revision-Date: 2014-10-15 12:28+0000\n"
-"Last-Translator: Abrax \n"
-"Language-Team: German (http://www.transifex.com/projects/p/friendica/language/de/)\n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-23 08:27+0000\n"
+"Last-Translator: Tobias Diekershoff , 2018,2021\n"
+"Language-Team: German (http://app.transifex.com/Friendica/friendica/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"
-#: geonames.php:143
-msgid "Geonames settings updated."
-msgstr "Geonames Einstellungen aktualisiert"
+#: geonames.php:135
+msgid ""
+"Replace numerical coordinates by the nearest populated location name in your"
+" posts."
+msgstr "Ersetze numerische Koordinaten in Beiträgen mit dem Namen der nächst gelegenen Siedlung."
-#: geonames.php:179
-msgid "Geonames Settings"
-msgstr "Geonames Einstellungen"
-
-#: geonames.php:181
+#: geonames.php:136
msgid "Enable Geonames Addon"
-msgstr "Geonames Addon aktivieren"
+msgstr "Geonames-Addon aktivieren"
-#: geonames.php:187
-msgid "Submit"
-msgstr "Senden"
+#: geonames.php:141
+msgid "Geonames Settings"
+msgstr "Geonames-Einstellungen"
diff --git a/geonames/lang/de/strings.php b/geonames/lang/de/strings.php
index 26f2246e..3a31e793 100644
--- a/geonames/lang/de/strings.php
+++ b/geonames/lang/de/strings.php
@@ -2,10 +2,9 @@
if(! function_exists("string_plural_select_de")) {
function string_plural_select_de($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Geonames settings updated."] = "Geonames Einstellungen aktualisiert";
-$a->strings["Geonames Settings"] = "Geonames Einstellungen";
-$a->strings["Enable Geonames Addon"] = "Geonames Addon aktivieren";
-$a->strings["Submit"] = "Senden";
+$a->strings['Replace numerical coordinates by the nearest populated location name in your posts.'] = 'Ersetze numerische Koordinaten in Beiträgen mit dem Namen der nächst gelegenen Siedlung.';
+$a->strings['Enable Geonames Addon'] = 'Geonames-Addon aktivieren';
+$a->strings['Geonames Settings'] = 'Geonames-Einstellungen';
diff --git a/geonames/lang/es/messages.po b/geonames/lang/es/messages.po
index 84de85aa..e03b5a7d 100644
--- a/geonames/lang/es/messages.po
+++ b/geonames/lang/es/messages.po
@@ -5,13 +5,14 @@
#
# Translators:
# Albert, 2016
+# Senex Petrovic , 2021
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-27 05:01-0500\n"
-"PO-Revision-Date: 2016-11-16 16:35+0000\n"
-"Last-Translator: Albert\n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-04-01 09:56+0000\n"
+"Last-Translator: Senex Petrovic \n"
"Language-Team: Spanish (http://www.transifex.com/Friendica/friendica/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,18 +20,20 @@ msgstr ""
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: geonames.php:143
-msgid "Geonames settings updated."
-msgstr "Ajustes de geonombres actualizados."
-
-#: geonames.php:179
+#: geonames.php:141
msgid "Geonames Settings"
msgstr "Ajustes de Geonombres"
-#: geonames.php:181
-msgid "Enable Geonames Addon"
-msgstr "Habilitar Addon de Geonombres"
+#: geonames.php:142
+msgid ""
+"Replace numerical coordinates by the nearest populated location name in your"
+" posts."
+msgstr "Reemplace las coordenadas numéricas por el nombre de la ubicación poblada más cercana en sus publicaciones."
-#: geonames.php:187
-msgid "Submit"
-msgstr "Enviar"
+#: geonames.php:143
+msgid "Enable Geonames Addon"
+msgstr "Habilitar Plugin de Geonombres"
+
+#: geonames.php:144
+msgid "Save Settings"
+msgstr "Guardar Ajustes"
diff --git a/geonames/lang/es/strings.php b/geonames/lang/es/strings.php
index d2cb635d..ef08df42 100644
--- a/geonames/lang/es/strings.php
+++ b/geonames/lang/es/strings.php
@@ -2,10 +2,10 @@
if(! function_exists("string_plural_select_es")) {
function string_plural_select_es($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Geonames settings updated."] = "Ajustes de geonombres actualizados.";
-$a->strings["Geonames Settings"] = "Ajustes de Geonombres";
-$a->strings["Enable Geonames Addon"] = "Habilitar Addon de Geonombres";
-$a->strings["Submit"] = "Enviar";
+$a->strings['Geonames Settings'] = 'Ajustes de Geonombres';
+$a->strings['Replace numerical coordinates by the nearest populated location name in your posts.'] = 'Reemplace las coordenadas numéricas por el nombre de la ubicación poblada más cercana en sus publicaciones.';
+$a->strings['Enable Geonames Addon'] = 'Habilitar Plugin de Geonombres';
+$a->strings['Save Settings'] = 'Guardar Ajustes';
diff --git a/geonames/lang/fi-fi/strings.php b/geonames/lang/fi-fi/strings.php
index d3bb53b6..95ca2896 100644
--- a/geonames/lang/fi-fi/strings.php
+++ b/geonames/lang/fi-fi/strings.php
@@ -2,10 +2,10 @@
if(! function_exists("string_plural_select_fi_fi")) {
function string_plural_select_fi_fi($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Geonames settings updated."] = "Geonames -asetukset päivitetty.";
-$a->strings["Geonames Settings"] = "Geonames -asetukset";
-$a->strings["Enable Geonames Addon"] = "Ota Geonames -lisäosa käyttöön";
-$a->strings["Submit"] = "Lähetä";
+$a->strings['Geonames settings updated.'] = 'Geonames -asetukset päivitetty.';
+$a->strings['Geonames Settings'] = 'Geonames -asetukset';
+$a->strings['Enable Geonames Addon'] = 'Ota Geonames -lisäosa käyttöön';
+$a->strings['Submit'] = 'Lähetä';
diff --git a/geonames/lang/fr/messages.po b/geonames/lang/fr/messages.po
new file mode 100644
index 00000000..b1cd8ce1
--- /dev/null
+++ b/geonames/lang/fr/messages.po
@@ -0,0 +1,36 @@
+# ADDON geonames
+# Copyright (C)
+# This file is distributed under the same license as the Friendica geonames addon package.
+#
+#
+# Translators:
+# bob lebonche , 2021
+# ButterflyOfFire, 2020
+# Hypolite Petovan , 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-23 08:27+0000\n"
+"Last-Translator: bob lebonche , 2021\n"
+"Language-Team: French (http://www.transifex.com/Friendica/friendica/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=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;\n"
+
+#: geonames.php:135
+msgid ""
+"Replace numerical coordinates by the nearest populated location name in your"
+" posts."
+msgstr "Remplacer les coordonnées par le nom de la localité la plus proche dans votre publication."
+
+#: geonames.php:136
+msgid "Enable Geonames Addon"
+msgstr "Activer l'application complémentaire Geonames"
+
+#: geonames.php:141
+msgid "Geonames Settings"
+msgstr "Paramètres Geonames"
diff --git a/geonames/lang/fr/strings.php b/geonames/lang/fr/strings.php
index 10d6631e..297e3b73 100644
--- a/geonames/lang/fr/strings.php
+++ b/geonames/lang/fr/strings.php
@@ -1,6 +1,10 @@
-strings["Geonames settings updated."] = "Réglages Geonames sauvés.";
-$a->strings["Geonames Settings"] = "Réglages Geonames";
-$a->strings["Enable Geonames Addon"] = "Activer Geonames";
-$a->strings["Submit"] = "Envoyer";
+strings['Replace numerical coordinates by the nearest populated location name in your posts.'] = 'Remplacer les coordonnées par le nom de la localité la plus proche dans votre publication.';
+$a->strings['Enable Geonames Addon'] = 'Activer l\'application complémentaire Geonames';
+$a->strings['Geonames Settings'] = 'Paramètres Geonames';
diff --git a/geonames/lang/hu/messages.po b/geonames/lang/hu/messages.po
new file mode 100644
index 00000000..522f5146
--- /dev/null
+++ b/geonames/lang/hu/messages.po
@@ -0,0 +1,34 @@
+# ADDON geonames
+# Copyright (C)
+# This file is distributed under the same license as the Friendica geonames addon package.
+#
+#
+# Translators:
+# Balázs Úr, 2020-2021
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-23 08:27+0000\n"
+"Last-Translator: Balázs Úr, 2020-2021\n"
+"Language-Team: Hungarian (http://www.transifex.com/Friendica/friendica/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"
+
+#: geonames.php:135
+msgid ""
+"Replace numerical coordinates by the nearest populated location name in your"
+" posts."
+msgstr "Számokkal megadott koordináták cseréje a bejegyzéseiben a legközelebbi lakott hely nevére."
+
+#: geonames.php:136
+msgid "Enable Geonames Addon"
+msgstr "A földrajzi nevek bővítmény engedélyezése"
+
+#: geonames.php:141
+msgid "Geonames Settings"
+msgstr "Földrajzi nevek beállításai"
diff --git a/geonames/lang/hu/strings.php b/geonames/lang/hu/strings.php
new file mode 100644
index 00000000..86d69a60
--- /dev/null
+++ b/geonames/lang/hu/strings.php
@@ -0,0 +1,10 @@
+strings['Replace numerical coordinates by the nearest populated location name in your posts.'] = 'Számokkal megadott koordináták cseréje a bejegyzéseiben a legközelebbi lakott hely nevére.';
+$a->strings['Enable Geonames Addon'] = 'A földrajzi nevek bővítmény engedélyezése';
+$a->strings['Geonames Settings'] = 'Földrajzi nevek beállításai';
diff --git a/geonames/lang/is/strings.php b/geonames/lang/is/strings.php
index 8462f4c3..b1b57912 100644
--- a/geonames/lang/is/strings.php
+++ b/geonames/lang/is/strings.php
@@ -3,10 +3,6 @@
if(! function_exists("string_plural_select_is")) {
function string_plural_select_is($n){
$n = intval($n);
- return ($n % 10 != 1 || $n % 100 == 11);;
+ return intval($n % 10 != 1 || $n % 100 == 11);
}}
-;
-$a->strings["Geonames settings updated."] = "";
-$a->strings["Geonames Settings"] = "";
-$a->strings["Enable Geonames Addon"] = "";
-$a->strings["Submit"] = "Senda inn";
+$a->strings['Submit'] = 'Senda inn';
diff --git a/geonames/lang/it/messages.po b/geonames/lang/it/messages.po
index f186dd42..0297cef2 100644
--- a/geonames/lang/it/messages.po
+++ b/geonames/lang/it/messages.po
@@ -5,13 +5,14 @@
#
# Translators:
# fabrixxm , 2014-2015,2018
+# Sylke Vicious , 2021
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-27 05:01-0500\n"
-"PO-Revision-Date: 2018-03-19 13:22+0000\n"
-"Last-Translator: fabrixxm \n"
+"POT-Creation-Date: 2021-02-01 18:15+0100\n"
+"PO-Revision-Date: 2021-02-16 12:59+0000\n"
+"Last-Translator: Sylke Vicious \n"
"Language-Team: Italian (http://www.transifex.com/Friendica/friendica/language/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,18 +20,20 @@ msgstr ""
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: geonames.php:143
-msgid "Geonames settings updated."
-msgstr "Impostazioni di Geonames aggiornate."
-
-#: geonames.php:179
+#: geonames.php:141
msgid "Geonames Settings"
msgstr "Impostazioni Geonames"
-#: geonames.php:181
+#: geonames.php:142
+msgid ""
+"Replace numerical coordinates by the nearest populated location name in your"
+" posts."
+msgstr "Sostituisci le coordinate numeriche con il nome della località abitata più vicina nei tuoi messaggi."
+
+#: geonames.php:143
msgid "Enable Geonames Addon"
msgstr "Abilita componente aggiuntivo Geonames"
-#: geonames.php:187
-msgid "Submit"
-msgstr "Invia"
+#: geonames.php:144
+msgid "Save Settings"
+msgstr "Salva Impostazioni"
diff --git a/geonames/lang/it/strings.php b/geonames/lang/it/strings.php
index 33148f6b..797dd4b4 100644
--- a/geonames/lang/it/strings.php
+++ b/geonames/lang/it/strings.php
@@ -2,10 +2,10 @@
if(! function_exists("string_plural_select_it")) {
function string_plural_select_it($n){
- return ($n != 1);;
+ $n = intval($n);
+ return intval($n != 1);
}}
-;
-$a->strings["Geonames settings updated."] = "Impostazioni di Geonames aggiornate.";
-$a->strings["Geonames Settings"] = "Impostazioni Geonames";
-$a->strings["Enable Geonames Addon"] = "Abilita componente aggiuntivo Geonames";
-$a->strings["Submit"] = "Invia";
+$a->strings['Geonames Settings'] = 'Impostazioni Geonames';
+$a->strings['Replace numerical coordinates by the nearest populated location name in your posts.'] = 'Sostituisci le coordinate numeriche con il nome della località abitata più vicina nei tuoi messaggi.';
+$a->strings['Enable Geonames Addon'] = 'Abilita componente aggiuntivo Geonames';
+$a->strings['Save Settings'] = 'Salva Impostazioni';
diff --git a/geonames/lang/nl/strings.php b/geonames/lang/nl/strings.php
index baaf2e1e..044702ad 100644
--- a/geonames/lang/nl/strings.php
+++ b/geonames/lang/nl/strings.php
@@ -3,10 +3,9 @@
if(! function_exists("string_plural_select_nl")) {
function string_plural_select_nl($n){
$n = intval($n);
- return ($n != 1);;
+ return intval($n != 1);
}}
-;
-$a->strings["Geonames settings updated."] = "Geonames instellingen opgeslagen";
-$a->strings["Geonames Settings"] = "Geonames Instellingen";
-$a->strings["Enable Geonames Addon"] = "Geonames Addon inschakelen";
-$a->strings["Submit"] = "Toepassen";
+$a->strings['Geonames settings updated.'] = 'Geonames instellingen opgeslagen';
+$a->strings['Geonames Settings'] = 'Geonames Instellingen';
+$a->strings['Enable Geonames Addon'] = 'Geonames Addon inschakelen';
+$a->strings['Submit'] = 'Toepassen';
diff --git a/geonames/lang/pl/messages.po b/geonames/lang/pl/messages.po
index 16164435..b0f9f4f6 100644
--- a/geonames/lang/pl/messages.po
+++ b/geonames/lang/pl/messages.po
@@ -4,14 +4,15 @@
#
#
# Translators:
-# Waldemar Stoczkowski , 2018
+# Piotr Strębski , 2022
+# Waldemar Stoczkowski, 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-02-27 05:01-0500\n"
-"PO-Revision-Date: 2018-03-31 19:23+0000\n"
-"Last-Translator: Waldemar Stoczkowski \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2014-06-23 08:27+0000\n"
+"Last-Translator: Piotr Strębski , 2022\n"
"Language-Team: Polish (http://www.transifex.com/Friendica/friendica/language/pl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -19,18 +20,16 @@ msgstr ""
"Language: pl\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
-#: geonames.php:143
-msgid "Geonames settings updated."
-msgstr "Zaktualizowano ustawienia Geonames."
+#: geonames.php:135
+msgid ""
+"Replace numerical coordinates by the nearest populated location name in your"
+" posts."
+msgstr "Zastąp w swoich wpisach współrzędne numeryczne nazwą najbliższej zaludnionej lokalizacji."
-#: geonames.php:179
-msgid "Geonames Settings"
-msgstr "Ustawienia Geonames"
-
-#: geonames.php:181
+#: geonames.php:136
msgid "Enable Geonames Addon"
msgstr "Włącz dodatek Geonames"
-#: geonames.php:187
-msgid "Submit"
-msgstr "Wyślij"
+#: geonames.php:141
+msgid "Geonames Settings"
+msgstr "Ustawienia Geonames"
diff --git a/geonames/lang/pl/strings.php b/geonames/lang/pl/strings.php
index 4a04e148..2690516f 100644
--- a/geonames/lang/pl/strings.php
+++ b/geonames/lang/pl/strings.php
@@ -2,10 +2,9 @@
if(! function_exists("string_plural_select_pl")) {
function string_plural_select_pl($n){
- return ($n==1 ? 0 : ($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14) ? 1 : $n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14) ? 2 : 3);;
+ $n = intval($n);
+ if ($n==1) { return 0; } else if (($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14)) { return 1; } else if ($n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["Geonames settings updated."] = "Zaktualizowano ustawienia Geonames.";
-$a->strings["Geonames Settings"] = "Ustawienia Geonames";
-$a->strings["Enable Geonames Addon"] = "Włącz dodatek Geonames";
-$a->strings["Submit"] = "Wyślij";
+$a->strings['Replace numerical coordinates by the nearest populated location name in your posts.'] = 'Zastąp w swoich wpisach współrzędne numeryczne nazwą najbliższej zaludnionej lokalizacji.';
+$a->strings['Enable Geonames Addon'] = 'Włącz dodatek Geonames';
+$a->strings['Geonames Settings'] = 'Ustawienia Geonames';
diff --git a/geonames/lang/ro/strings.php b/geonames/lang/ro/strings.php
index b6258552..2747a877 100644
--- a/geonames/lang/ro/strings.php
+++ b/geonames/lang/ro/strings.php
@@ -2,10 +2,10 @@
if(! function_exists("string_plural_select_ro")) {
function string_plural_select_ro($n){
- return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
+ $n = intval($n);
+ if ($n==1) { return 0; } else if ((($n%100>19)||(($n%100==0)&&($n!=0)))) { return 2; } else { return 1; }
}}
-;
-$a->strings["Geonames settings updated."] = "Configurări Geonume actualizate.";
-$a->strings["Geonames Settings"] = "Configurări Geonume";
-$a->strings["Enable Geonames Addon"] = "Permite Modul Geonume";
-$a->strings["Submit"] = "Trimite";
+$a->strings['Geonames settings updated.'] = 'Configurări Geonume actualizate.';
+$a->strings['Geonames Settings'] = 'Configurări Geonume';
+$a->strings['Enable Geonames Addon'] = 'Permite Modul Geonume';
+$a->strings['Submit'] = 'Trimite';
diff --git a/geonames/lang/ru/strings.php b/geonames/lang/ru/strings.php
index 282db750..7269f50c 100644
--- a/geonames/lang/ru/strings.php
+++ b/geonames/lang/ru/strings.php
@@ -3,10 +3,9 @@
if(! function_exists("string_plural_select_ru")) {
function string_plural_select_ru($n){
$n = intval($n);
- return ($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);;
+ if ($n%10==1 && $n%100!=11) { return 0; } else if ($n%10>=2 && $n%10<=4 && ($n%100<12 || $n%100>14)) { return 1; } else if ($n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)) { return 2; } else { return 3; }
}}
-;
-$a->strings["Geonames settings updated."] = "Настройки Geonames обновлены.";
-$a->strings["Geonames Settings"] = "Настройки Geonames";
-$a->strings["Enable Geonames Addon"] = "Включить аддон Geonames";
-$a->strings["Submit"] = "Добавить";
+$a->strings['Geonames settings updated.'] = 'Настройки Geonames обновлены.';
+$a->strings['Geonames Settings'] = 'Настройки Geonames';
+$a->strings['Enable Geonames Addon'] = 'Включить аддон Geonames';
+$a->strings['Submit'] = 'Добавить';
diff --git a/geonames/lang/sv/messages.po b/geonames/lang/sv/messages.po
new file mode 100644
index 00000000..54a96ebe
--- /dev/null
+++ b/geonames/lang/sv/messages.po
@@ -0,0 +1,33 @@
+# ADDON geonames
+# Copyright (C)
+# This file is distributed under the same license as the Friendica geonames addon package.
+#
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: friendica\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2021-11-21 19:14-0500\n"
+"PO-Revision-Date: 2021-12-22 17:23+0000\n"
+"Last-Translator: Transifex Bot <>\n"
+"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/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"
+
+#: geonames.php:135
+msgid ""
+"Replace numerical coordinates by the nearest populated location name in your"
+" posts."
+msgstr ""
+
+#: geonames.php:136
+msgid "Enable Geonames Addon"
+msgstr ""
+
+#: geonames.php:141
+msgid "Geonames Settings"
+msgstr ""
diff --git a/geonames/lang/sv/strings.php b/geonames/lang/sv/strings.php
index 3ec569a7..72e9772f 100644
--- a/geonames/lang/sv/strings.php
+++ b/geonames/lang/sv/strings.php
@@ -1,3 +1,7 @@
-strings["Submit"] = "Spara";
+
-