1
0
Fork 0
mirror of synced 2024-06-24 01:00:35 +12:00

Merge branch 'master' into ro-locale

This commit is contained in:
Eldad A. Fux 2019-10-01 09:05:33 +03:00 committed by GitHub
commit 15ad75ff8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
63 changed files with 2276 additions and 463 deletions

View file

@ -63,24 +63,24 @@ RUN \
RUN echo "upload_max_filesize = 4M" > /etc/php/7.3/fpm/conf.d/appwrite.ini
# nginx conf (with ssl certificates)
ADD ./docker/nginx.conf /etc/nginx/nginx.conf
ADD ./docker/ssl/nginx.crt /etc/nginx/ssl/nginx.crt
ADD ./docker/ssl/nginx.key /etc/nginx/ssl/nginx.key
COPY ./docker/nginx.conf /etc/nginx/nginx.conf
COPY ./docker/ssl/nginx.crt /etc/nginx/ssl/nginx.crt
COPY ./docker/ssl/nginx.key /etc/nginx/ssl/nginx.key
# php conf
RUN mkdir -p /var/run/php
ADD ./docker/www.conf /etc/php/7.3/fpm/pool.d/www.conf
COPY ./docker/www.conf /etc/php/7.3/fpm/pool.d/www.conf
# supervisord conf
ADD ./docker/supervisord.conf /etc/supervisord.conf
ADD ./docker/entrypoint.sh /entrypoint.sh
COPY ./docker/supervisord.conf /etc/supervisord.conf
COPY ./docker/entrypoint.sh /entrypoint.sh
RUN chmod 775 /entrypoint.sh
# add PHP files
ADD ./app /usr/share/nginx/html/app
ADD ./public /usr/share/nginx/html/public
ADD ./src /usr/share/nginx/html/src
ADD ./vendor /usr/share/nginx/html/vendor
COPY ./app /usr/share/nginx/html/app
COPY ./public /usr/share/nginx/html/public
COPY ./src /usr/share/nginx/html/src
COPY ./vendor /usr/share/nginx/html/vendor
WORKDIR /storage/uploads
RUN chown -Rf www-data.www-data /storage/uploads && chmod -Rf 0755 /storage/uploads
@ -90,4 +90,4 @@ RUN chown -Rf www-data.www-data /storage/cache && chmod -Rf 0755 /storage/cache
EXPOSE 80
CMD ["/bin/bash", "/entrypoint.sh"]
CMD ["/bin/bash", "/entrypoint.sh"]

View file

@ -2,7 +2,7 @@
<a href="https://appwrite.io" target="_blank"><img width="260" height="39" src="https://appwrite.io/images/github-logo.png" alt="Appwrite Logo"></a>
<br />
<br />
<b>Simple Backend Server for your [Vue / Angular / React / iOS / Android / Flutter / *ANY*] Frontend App</b>
<b>Simple Backend Server for your [Vue / Angular / React / iOS / Android / Flutter / *ANY OTHER*] Frontend App</b>
<br />
<br />
</p>
@ -37,9 +37,9 @@ curl -o docker-compose.yml https://appwrite.io/docker-compose.yml?port=80 && \
docker-compose up -d --remove-orphans
```
Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please notice that on non-linux native hosts the server might take a few minutes to start after installation completes.
Once the Docker installation is completed, go to http://localhost to access the Appwrite console from your browser. Please notice that on non-linux native hosts the server might take a few minutes to start after the completion of the installation.
For advanced, production and custom installation check out our Docker [environment variables](/docs/EnviornementVariables.md) docs.
For advanced, production and custom installation, check out our Docker [environment variables](/docs/EnviornementVariables.md) docs.
### Changing Port Number
@ -50,9 +50,9 @@ In case your port 80 is already taken, change the port number in the command abo
Getting started with Appwrite is as easy as creating a new project, choosing your platform and integrating its SDK in your code. You can easily get started with your platform of choice by reading one of our getting started tutorials.
* [Getting Started for Web](https://appwrite.io/docs/getting-started-for-web)
* [Getting Started for Server](https://appwrite.io/docs/getting-started-for-server)
* Getting Started for Android (soon...)
* Getting Started for iOS (soon...)
* [Getting Started for Server](https://appwrite.io/docs/getting-started-for-server)
### Services
@ -69,7 +69,7 @@ For the complete API documentation, visit [https://appwrite.io/docs](https://app
### SDKs
Currently we are supporting a few SDK libraries and we are constantly working on adding new ones.
Currently, we are supporting only a few SDK libraries and are constantly working on including new ones.
Below is a list of currently supported platforms and languages. If you wish to help us add support to your platform of choice you can go over to our [SDK Generator](https://github.com/appwrite/sdk-generator) project and view our contribution guide.
@ -82,7 +82,7 @@ Below is a list of currently supported platforms and languages. If you wish to h
## Security
For security issues, please email [security@appwrite.io](mailto:security@appwrite.io) instead of posting a public issue in GitHub.
For security issues, kindly email us [security@appwrite.io](mailto:security@appwrite.io) instead of posting a public issue in GitHub.
## Follow Us
@ -109,4 +109,6 @@ Created by [Eldad Fux](https://twitter.com/eldadfux) with the amazing help of ou
* 🇫🇮 Pessi Päivärinne ([Github](https://github.com/pessip))
* 🇺🇳 Sergi Vos ([Github](https://github.com/sergivb01), [Twitter](https://twitter.com/sergivb01), [Linkedin](https://www.linkedin.com/in/sergivb01/))
* 🇮🇱 Tomer Cohen ([Github](https://github.com/tomer), [Twitter](https://twitter.com/tomer))
* 🇬🇷 Panagiotis Skarlas ([Github](https://github.com/1qk1), [Twitter](https://twitter.com/qktweets))
* 🇬🇷 Panagiotis Skarlas ([Github](https://github.com/1qk1), [Twitter](https://twitter.com/qktweets))
* 🇷🇺 Alexey Pyltsyn ([Github](https://github.com/lex111))
* 🇩🇪 Robin C ([Github](https://github.com/Taminoful))

View file

@ -1,7 +1,7 @@
<?php
// Init
require_once __DIR__ . '/init.php';
require_once __DIR__.'/init.php';
global $env, $utopia, $request, $response, $register, $consoleDB, $project, $domain, $sentry, $version, $service, $providers;
@ -20,16 +20,16 @@ use Database\Validator\Authorization;
use Event\Event;
use Utopia\Validator\WhiteList;
/**
/*
* Configuration files
*/
$roles = include __DIR__ . '/config/roles.php'; // User roles and scopes
$sdks = include __DIR__ . '/config/sdks.php'; // List of SDK clients
$services = include __DIR__ . '/config/services.php'; // List of SDK clients
$roles = include __DIR__.'/config/roles.php'; // User roles and scopes
$sdks = include __DIR__.'/config/sdks.php'; // List of SDK clients
$services = include __DIR__.'/config/services.php'; // List of SDK clients
$webhook = new Event('v1-webhooks', 'WebhooksV1');
$audit = new Event('v1-audits', 'AuditsV1');
$usage = new Event('v1-usage', 'UsageV1');
$webhook = new Event('v1-webhooks', 'WebhooksV1');
$audit = new Event('v1-audits', 'AuditsV1');
$usage = new Event('v1-usage', 'UsageV1');
$clientsConsole = array_map(function ($node) {
return $node['url'];
@ -37,6 +37,7 @@ $clientsConsole = array_map(function ($node) {
if (isset($node['type']) && $node['type'] === 'web' && isset($node['url']) && !empty($node['url'])) {
return true;
}
return false;
}));
@ -46,19 +47,20 @@ $clients = array_merge($clientsConsole, array_map(function ($node) {
if (isset($node['type']) && $node['type'] === 'web' && isset($node['url']) && !empty($node['url'])) {
return true;
}
return false;
})));
$utopia->init(function () use ($utopia, $request, $response, $register, &$user, $project, $roles, $webhook, $audit, $usage, $domain, $clients) {
$route = $utopia->match($request);
$referrer = $request->getServer('HTTP_REFERER', '');
$origin = $request->getServer('HTTP_ORIGIN', parse_url($referrer, PHP_URL_SCHEME) . '://' . parse_url($referrer, PHP_URL_HOST));
$referrer = $request->getServer('HTTP_REFERER', '');
$origin = $request->getServer('HTTP_ORIGIN', parse_url($referrer, PHP_URL_SCHEME).'://'.parse_url($referrer, PHP_URL_HOST));
$refDomain = (in_array($origin, $clients))
? $origin : 'http://localhost';
/**
/*
* Security Headers
*
* As recommended at:
@ -66,7 +68,7 @@ $utopia->init(function () use ($utopia, $request, $response, $register, &$user,
*/
$response
->addHeader('Server', 'Appwrite')
->addHeader('X-XSS-Protection', '1; mode=block; report=/v1/xss?url=' . urlencode($request->getServer('REQUEST_URI')))
->addHeader('X-XSS-Protection', '1; mode=block; report=/v1/xss?url='.urlencode($request->getServer('REQUEST_URI')))
//->addHeader('X-Frame-Options', ($refDomain == 'http://localhost') ? 'SAMEORIGIN' : 'ALLOW-FROM ' . $refDomain)
->addHeader('X-Content-Type-Options', 'nosniff')
->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE')
@ -75,7 +77,7 @@ $utopia->init(function () use ($utopia, $request, $response, $register, &$user,
->addHeader('Access-Control-Allow-Credentials', 'true')
;
/**
/*
* Validate Client Domain - Check to avoid CSRF attack
* Adding appwrite api domains to allow XDOMAIN communication
*/
@ -84,10 +86,10 @@ $utopia->init(function () use ($utopia, $request, $response, $register, &$user,
if (!$hostValidator->isValid($request->getServer('HTTP_ORIGIN', $request->getServer('HTTP_REFERER', '')))
&& in_array($request->getMethod(), [Request::METHOD_POST, Request::METHOD_PUT, Request::METHOD_PATCH, Request::METHOD_DELETE])
&& empty($request->getHeader('X-Appwrite-Key', ''))) {
throw new Exception('Access from this client host is forbidden. ' . $hostValidator->getDescription(), 403);
throw new Exception('Access from this client host is forbidden. '.$hostValidator->getDescription(), 403);
}
/**
/*
* ACL Check
*/
$role = ($user->isEmpty()) ? Auth::USER_ROLE_GUEST : Auth::USER_ROLE_MEMBER;
@ -111,46 +113,46 @@ $utopia->init(function () use ($utopia, $request, $response, $register, &$user,
}
}
$scope = $route->getLabel('scope', 'none'); // Allowed scope for chosen route
$scopes = $roles[$role]['scopes']; // Allowed scopes for user role
$scope = $route->getLabel('scope', 'none'); // Allowed scope for chosen route
$scopes = $roles[$role]['scopes']; // Allowed scopes for user role
// Check if given key match project API keys
$key = $project->search('secret', $request->getHeader('X-Appwrite-Key', ''), $project->getAttribute('keys', []));
/**
/*
* Try app auth when we have project key and no user
* Mock user to app and grant API key scopes in addition to default app scopes
*/
if (null !== $key && $user->isEmpty()) {
$user = new Document([
'$uid' => 0,
'status' => Auth::USER_STATUS_ACTIVATED,
'email' => 'app.' . $project->getUid() . '@service.' . $domain,
'password' => '',
'name' => $project->getAttribute('name', 'Untitled'),
'$uid' => 0,
'status' => Auth::USER_STATUS_ACTIVATED,
'email' => 'app.'.$project->getUid().'@service.'.$domain,
'password' => '',
'name' => $project->getAttribute('name', 'Untitled'),
]);
$role = Auth::USER_ROLE_APP;
$role = Auth::USER_ROLE_APP;
$scopes = array_merge($roles[$role]['scopes'], $key->getAttribute('scopes', []));
Authorization::disable(); // Cancel security segmentation for API keys.
}
Authorization::setRole('user:' . $user->getUid());
Authorization::setRole('role:' . $role);
Authorization::setRole('user:'.$user->getUid());
Authorization::setRole('role:'.$role);
array_map(function ($node) {
if (isset($node['teamId']) && isset($node['roles'])) {
Authorization::setRole('team:' . $node['teamId']);
Authorization::setRole('team:'.$node['teamId']);
foreach ($node['roles'] as $nodeRole) { // Set all team roles
Authorization::setRole('team:' . $node['teamId'] . '/' . $nodeRole);
Authorization::setRole('team:'.$node['teamId'].'/'.$nodeRole);
}
}
}, $user->getAttribute('memberships', []));
if (!in_array($scope, $scopes)) {
throw new Exception($user->getAttribute('email', 'Guest') . ' (role: ' . strtolower($roles[$role]['label']) . ') missing scope (' . $scope . ')', 401);
throw new Exception($user->getAttribute('email', 'Guest').' (role: '.strtolower($roles[$role]['label']).') missing scope ('.$scope.')', 401);
}
if (Auth::USER_STATUS_BLOCKED == $user->getAttribute('status')) { // Account has not been activated
@ -161,7 +163,7 @@ $utopia->init(function () use ($utopia, $request, $response, $register, &$user,
throw new Exception('Password reset is required', 412);
}
/**
/*
* Background Jobs
*/
$webhook
@ -182,31 +184,31 @@ $utopia->init(function () use ($utopia, $request, $response, $register, &$user,
$usage
->setParam('projectId', $project->getUid())
->setParam('url', $request->getServer('HTTP_HOST', '') . $request->getServer('REQUEST_URI', ''))
->setParam('url', $request->getServer('HTTP_HOST', '').$request->getServer('REQUEST_URI', ''))
->setParam('method', $request->getServer('REQUEST_METHOD', 'UNKNOWN'))
->setParam('request', 0)
->setParam('response', 0)
->setParam('storage', 0)
;
/**
/*
* Abuse Check
*/
$timeLimit = new TimeLimit($route->getLabel('abuse-key', 'url:{url},ip:{ip}'), $route->getLabel('abuse-limit', 0), $route->getLabel('abuse-time', 3600), function () use ($register) {
return $register->get('db');
});
$timeLimit->setNamespace('app_' . $project->getUid());
$timeLimit->setNamespace('app_'.$project->getUid());
$timeLimit
->setParam('{userId}', $user->getUid())
->setParam('{userAgent}', $request->getServer('HTTP_USER_AGENT', ''))
->setParam('{ip}', $request->getIP())
->setParam('{url}', $request->getServer('HTTP_HOST', '') . $route->getURL())
->setParam('{url}', $request->getServer('HTTP_HOST', '').$route->getURL())
;
//TODO make sure we get array here
foreach ($request->getParams() as $key => $value) { // Set request params as potential abuse keys
$timeLimit->setParam('{param-' . $key . '}', (is_array($value)) ? json_encode($value) : $value);
$timeLimit->setParam('{param-'.$key.'}', (is_array($value)) ? json_encode($value) : $value);
}
$abuse = new Abuse($timeLimit);
@ -218,7 +220,7 @@ $utopia->init(function () use ($utopia, $request, $response, $register, &$user,
->addHeader('X-RateLimit-Reset', $timeLimit->time() + $route->getLabel('abuse-time', 3600))
;
}
if ($abuse->check() && $request->getServer('_APP_OPTIONS_ABUSE', 'enabled') !== 'disabled') {
throw new Exception('Too many requests', 429);
}
@ -226,7 +228,7 @@ $utopia->init(function () use ($utopia, $request, $response, $register, &$user,
$utopia->shutdown(function () use ($response, $request, $webhook, $audit, $usage) {
/**
/*
* Trigger Events for background jobs
*/
if (!empty($webhook->getParam('event'))) {
@ -253,7 +255,6 @@ $utopia->options(function () use ($request, $response, $domain, $project) {
->addHeader('Access-Control-Allow-Origin', $origin)
->addHeader('Access-Control-Allow-Credentials', 'true')
->send();
;
});
$utopia->error(function ($error /* @var $error Exception */) use ($request, $response, $utopia, $project, $env, $version, $sentry, $user) {
@ -265,27 +266,27 @@ $utopia->error(function ($error /* @var $error Exception */) use ($request, $res
case 404: // Error allowed publicly
case 412: // Error allowed publicly
case 429: // Error allowed publicly
$code = $error->getCode();
$message = $error->getMessage();
$code = $error->getCode();
$message = $error->getMessage();
break;
default:
$code = 500; // All other errors get the generic 500 server error status code
$message = 'Server Error';
$code = 500; // All other errors get the generic 500 server error status code
$message = 'Server Error';
}
$_SERVER = []; // Reset before reporting to error log to avoid keys being compromised
$output = ((App::ENV_TYPE_DEVELOPMENT == $env)) ? [
'message' => $error->getMessage(),
'code' => $error->getCode(),
'file' => $error->getFile(),
'line' => $error->getLine(),
'trace' => $error->getTrace(),
'version' => $version,
'message' => $error->getMessage(),
'code' => $error->getCode(),
'file' => $error->getFile(),
'line' => $error->getLine(),
'trace' => $error->getTrace(),
'version' => $version,
] : [
'message' => $message,
'code' => $code,
'version' => $version,
'code' => $code,
'version' => $version,
];
$response
@ -295,12 +296,12 @@ $utopia->error(function ($error /* @var $error Exception */) use ($request, $res
->setStatusCode($code)
;
$route = $utopia->match($request);
$template = ($route) ? $route->getLabel('error', null): null;
$route = $utopia->match($request);
$template = ($route) ? $route->getLabel('error', null) : null;
if ($template) {
$layout = new View(__DIR__ . '/views/layouts/default.phtml');
$comp = new View($template);
$layout = new View(__DIR__.'/views/layouts/default.phtml');
$comp = new View($template);
$comp
->setParam('projectName', $project->getAttribute('name'))
@ -310,7 +311,7 @@ $utopia->error(function ($error /* @var $error Exception */) use ($request, $res
;
$layout
->setParam('title', $project->getAttribute('name') . ' - Error')
->setParam('title', $project->getAttribute('name').' - Error')
->setParam('description', 'No Description')
->setParam('body', $comp)
->setParam('version', $version)
@ -344,9 +345,9 @@ $utopia->get('/manifest.json')
[
'src' => 'images/favicon.png',
'sizes' => '256x256',
'type' => 'image/png'
]
]
'type' => 'image/png',
],
],
]);
}
);
@ -357,10 +358,10 @@ $utopia->get('/robots.txt')
->label('docs', false)
->action(
function () use ($response) {
$response->text("# robotstxt.org/
$response->text('# robotstxt.org/
User-agent: *
");
');
}
);
@ -370,14 +371,14 @@ $utopia->get('/humans.txt')
->label('docs', false)
->action(
function () use ($response) {
$response->text("# humanstxt.org/
$response->text('# humanstxt.org/
# The humans responsible & technology colophon
# TEAM
<name> -- <role> -- <twitter>
# THANKS
<name>");
<name>');
}
);
@ -387,15 +388,15 @@ $utopia->get('/v1/info') // This is only visible to gods
->action(
function () use ($response, $user, $project, $version, $env) { //TODO CONSIDER BLOCKING THIS ACTION TO ROLE GOD
$response->json([
'name' => 'API',
'version' => $version,
'environment' => $env,
'time' => date('Y-m-d H:i:s', time()),
'user' => [
'name' => 'API',
'version' => $version,
'environment' => $env,
'time' => date('Y-m-d H:i:s', time()),
'user' => [
'id' => $user->getUid(),
'name' => $user->getAttribute('name', ''),
],
'project' => [
'project' => [
'id' => $project->getUid(),
'name' => $project->getAttribute('name', ''),
],
@ -418,7 +419,7 @@ $utopia->get('/v1/proxy')
->label('docs', false)
->action(
function () use ($response, $console, $clients) {
$view = new View(__DIR__ . '/views/proxy.phtml');
$view = new View(__DIR__.'/views/proxy.phtml');
$view
->setParam('routes', '')
->setParam('clients', array_merge($clients, $console->getAttribute('clients', [])))
@ -449,6 +450,7 @@ $utopia->get('/v1/open-api-2.json')
foreach ($ret as &$match) {
$match = $match == strtoupper($match) ? strtolower($match) : lcfirst($match);
}
return implode('_', $ret);
}
@ -457,7 +459,7 @@ $utopia->get('/v1/open-api-2.json')
return str_replace([' ', '_'], '-', strtolower(preg_replace('/([a-zA-Z])(?=[A-Z])/', '$1-', $input)));
}
foreach ($services as $service) { /** @noinspection PhpIncludeInspection */
foreach ($services as $service) { /* @noinspection PhpIncludeInspection */
if (!$service['sdk']) {
continue;
}
@ -471,7 +473,7 @@ $utopia->get('/v1/open-api-2.json')
'server' => ['Project' => [], 'Key' => []],
];
/**
/*
* Specifications (v3.0.0):
* https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md
*/
@ -540,30 +542,23 @@ $utopia->get('/v1/open-api-2.json')
],
],
],
'Pets' =>
array(
'Pets' => array(
'type' => 'array',
'items' =>
array(
'items' => array(
'$ref' => '#/definitions/Pet',
),
),
'Error' =>
array(
'required' =>
array(
'Error' => array(
'required' => array(
0 => 'code',
1 => 'message',
),
'properties' =>
array(
'code' =>
array(
'properties' => array(
'code' => array(
'type' => 'integer',
'format' => 'int32',
),
'message' =>
array(
'message' => array(
'type' => 'string',
),
),
@ -571,8 +566,8 @@ $utopia->get('/v1/open-api-2.json')
],
'externalDocs' => [
'description' => 'Full API docs, specs and tutorials',
'url' => $request->getServer('REQUEST_SCHEME', 'https') . '://' . $domain . '/docs'
]
'url' => $request->getServer('REQUEST_SCHEME', 'https').'://'.$domain.'/docs',
],
];
foreach ($utopia->getRoutes() as $key => $method) {
@ -585,10 +580,10 @@ $utopia->get('/v1/open-api-2.json')
continue;
}
$url = str_replace('/v1', '', $route->getURL());
$scope = $route->getLabel('scope', '');
$hide = $route->getLabel('sdk.hide', false);
$consumes = [];
$url = str_replace('/v1', '', $route->getURL());
$scope = $route->getLabel('scope', '');
$hide = $route->getLabel('sdk.hide', false);
$consumes = [];
if ($hide) {
continue;
@ -604,7 +599,7 @@ $utopia->get('/v1/open-api-2.json')
200 => [
'description' => 'An paged array of pets',
'schema' => [
'$ref' => '#/definitions/Pet'
'$ref' => '#/definitions/Pet',
],
],
],
@ -615,7 +610,7 @@ $utopia->get('/v1/open-api-2.json')
'weight' => $route->getOrder(),
'cookies' => $route->getLabel('sdk.cookies', false),
'location' => $route->getLabel('sdk.location', false),
'demo' => 'docs/examples/' . fromCamelCaseToDash($route->getLabel('sdk.namespace', 'default')) . '/' . fromCamelCaseToDash($temp['operationId']) . '.md',
'demo' => 'docs/examples/'.fromCamelCaseToDash($route->getLabel('sdk.namespace', 'default')).'/'.fromCamelCaseToDash($temp['operationId']).'.md',
];
}
@ -631,8 +626,8 @@ $utopia->get('/v1/open-api-2.json')
'properties' => [],
],
'required' => [],
]
]
],
],
];
foreach ($route->getParams() as $name => $param) {
@ -647,11 +642,11 @@ $utopia->get('/v1/open-api-2.json')
switch ((!empty($validator)) ? get_class($validator) : '') {
case 'Utopia\Validator\Text':
$node['type'] = 'string';
$node['x-example'] = '[' . strtoupper(fromCamelCase($node['name'])) . ']';
$node['x-example'] = '['.strtoupper(fromCamelCase($node['name'])).']';
break;
case 'Database\Validator\UID':
$node['type'] = 'string';
$node['x-example'] = '[' . strtoupper(fromCamelCase($node['name'])) . ']';
$node['x-example'] = '['.strtoupper(fromCamelCase($node['name'])).']';
break;
case 'Utopia\Validator\Email':
$node['type'] = 'string';
@ -678,7 +673,7 @@ $utopia->get('/v1/open-api-2.json')
$node['type'] = 'array';
$node['collectionFormat'] = 'multi';
$node['items'] = [
'type' => 'string'
'type' => 'string',
];
break;
case 'Auth\Validator\Password':
@ -716,7 +711,7 @@ $utopia->get('/v1/open-api-2.json')
$node['default'] = $param['default'];
}
if (false !== strpos($url, ':' . $name)) { // Param is in URL path
if (false !== strpos($url, ':'.$name)) { // Param is in URL path
$node['in'] = 'path';
$temp['parameters'][] = $node;
} elseif ($key == 'GET') { // Param is in query
@ -732,7 +727,7 @@ $utopia->get('/v1/open-api-2.json')
}
}
$url = str_replace(':' . $name, '{' . $name . '}', $url);
$url = str_replace(':'.$name, '{'.$name.'}', $url);
}
$temp['consumes'] = $consumes;
@ -755,18 +750,18 @@ $name = APP_NAME;
if (array_key_exists($service, $services)) { /** @noinspection PhpIncludeInspection */
include_once $services[$service]['controller'];
$name = APP_NAME . ' ' . ucfirst($services[$service]['name']);
$name = APP_NAME.' '.ucfirst($services[$service]['name']);
} else {
/** @noinspection PhpIncludeInspection */
include_once $services['/']['controller'];
}
if (extension_loaded('newrelic')) {
$route = $utopia->match($request);
$url = (!empty($route)) ? $route->getURL() : '/error';
$route = $utopia->match($request);
$url = (!empty($route)) ? $route->getURL() : '/error';
newrelic_set_appname($name);
newrelic_name_transaction($request->getServer('REQUEST_METHOD', 'UNKNOWN') . ': ' . $url);
newrelic_name_transaction($request->getServer('REQUEST_METHOD', 'UNKNOWN').': '.$url);
}
$utopia->run($request, $response);

View file

@ -38,13 +38,13 @@ $collections = [
'$collection' => Database::SYSTEM_COLLECTION_PLATFORMS,
'name' => 'Localhost (SSL)',
'type' => 'web',
'url' => 'https://' . $request->getServer('HTTP_HOST'),
'url' => 'https://'.$request->getServer('HTTP_HOST'),
],
[
'$collection' => Database::SYSTEM_COLLECTION_PLATFORMS,
'name' => 'Localhost (Non-SSL)',
'type' => 'web',
'url' => 'http://' . $request->getServer('HTTP_HOST'),
'url' => 'http://'.$request->getServer('HTTP_HOST'),
],
],
'legalName' => '',
@ -1076,7 +1076,7 @@ foreach ($providers as $key => $provider) {
$collections[Database::SYSTEM_COLLECTION_PROJECTS]['rules'][] = [
'$collection' => Database::SYSTEM_COLLECTION_RULES,
'label' => 'OAuth '.ucfirst($key).' ID',
'key' => 'usersOauth'.ucfirst($key) . 'Appid',
'key' => 'usersOauth'.ucfirst($key).'Appid',
'type' => 'text',
'default' => '',
'required' => false,

View file

@ -0,0 +1,11 @@
<?php
return [
'AF' => 'Àfrica',
'AN' => 'Antàrtica',
'AS' => 'Àsia',
'EU' => 'Europa',
'NA' => 'Amèrica del Nord',
'OC' => 'Oceania',
'SA' => 'Amèrica del Sud',
];

View file

@ -0,0 +1,197 @@
<?php
return [
'AF' => 'Afganistan',
'AO' => 'Angola',
'AL' => 'Albània',
'AD' => 'Andorra',
'AE' => 'Unió dels Emirats Àrabs Units',
'AR' => 'Argentina',
'AM' => 'Armènia',
'AG' => 'Antigua o Barbuda',
'AU' => 'Austràlia',
'AT' => 'Àustria',
'AZ' => 'Azerbaidjan',
'BI' => 'Burundi',
'BE' => 'Bèlgica',
'BJ' => 'Benín',
'BF' => 'Burkina Faso',
'BD' => 'Bangla Desh',
'BG' => 'Bulgaria',
'BH' => 'Bahrain',
'BS' => 'Bahamas',
'BA' => 'Bòsnia i Hercegovina',
'BY' => 'Bielorússia',
'BZ' => 'Belize',
'BO' => 'Bolívia',
'BR' => 'Brasil',
'BB' => 'Barbados',
'BN' => 'Brunei',
'BT' => 'Bhutan',
'BW' => 'Botswana',
'CF' => 'República Centreafricana',
'CA' => 'Canadà',
'CH' => 'Suïssa',
'CL' => 'Xile',
'CN' => 'Xina',
'CI' => 'Costa d\'Ivori',
'CM' => 'Camerun',
'CD' => 'República Democràtica del Congo',
'CG' => 'República del congo',
'CO' => 'Colòmbia',
'KM' => 'Comores',
'CV' => 'Cap Verd',
'CR' => 'Costa Rica',
'CU' => 'Cuba',
'CY' => 'Xipre',
'CZ' => 'Txèquia',
'DE' => 'Alemanya',
'DJ' => 'Djibouti',
'DM' => 'Dominica',
'DK' => 'Dinamarca',
'DO' => 'República Dominicana',
'DZ' => 'Argelia',
'EC' => 'Equador',
'EG' => 'Egipte',
'ER' => 'Eritrea',
'ES' => 'Espanya',
'EE' => 'Estònia',
'ET' => 'Etiòpia',
'FI' => 'Finlàndia',
'FJ' => 'Fiji',
'FR' => 'França',
'FM' => 'Micronèsia',
'GA' => 'Gabon',
'GB' => 'Regne Unit',
'GE' => 'Geòrgia',
'GH' => 'Ghana',
'GN' => 'Guinea',
'GM' => 'Gàmbia',
'GW' => 'Guinea Bissau',
'GQ' => 'Guinea Equatorial',
'GR' => 'Grècia',
'GD' => 'Granada',
'GT' => 'Guatemala',
'GY' => 'Guaiana',
'HN' => 'Hondures',
'HR' => 'Croàcia',
'HT' => 'Haití',
'HU' => 'Hungria',
'ID' => 'Indonèsia',
'IN' => 'Índia',
'IE' => 'Irlanda',
'IR' => 'Iran',
'IQ' => 'Iraq',
'IS' => 'Islàndia',
'IL' => 'Israel',
'IT' => 'Itàlia',
'JM' => 'Jamaica',
'JO' => 'Jordà',
'JP' => 'Japó',
'KZ' => 'Kazakhstan',
'KE' => 'Kenya',
'KG' => 'Kirguizistan',
'KH' => 'Cambodja',
'KI' => 'Kiribati',
'KN' => 'Sant Cristòfol i Neus',
'KR' => 'Corea del Sud',
'KW' => 'Kuwait',
'LA' => 'Laos',
'LB' => 'Líban',
'LR' => 'Libèria',
'LY' => 'Líbia',
'LC' => 'Santa Llúcia',
'LI' => 'Liechtenstein',
'LK' => 'Sri Lanka',
'LS' => 'Lesoto',
'LT' => 'Lituània',
'LU' => 'Luxemburg',
'LV' => 'Letònia',
'MA' => 'Marroc',
'MC' => 'Mònaco',
'MD' => 'Moldàvia',
'MG' => 'Madagascar',
'MV' => 'Maldives',
'MX' => 'Mèxic',
'MH' => 'Illes Marshall',
'MK' => 'Macedònia',
'ML' => 'Mali',
'MT' => 'Malta',
'MM' => 'Myanmar',
'ME' => 'Montenegro',
'MN' => 'Mongòlia',
'MZ' => 'Moçambic',
'MR' => 'Mauritània',
'MU' => 'Maurici',
'MW' => 'Malawi',
'MY' => 'Malàsia',
'NA' => 'Namíbia',
'NE' => 'Níger',
'NG' => 'Nigèria',
'NI' => 'Nicaragua',
'NL' => 'Països Baixos',
'NO' => 'Noruega',
'NP' => 'Nepal',
'NR' => 'Nauru',
'NZ' => 'Nova Zelanda',
'OM' => 'Oman',
'PK' => 'Pakistan',
'PA' => 'Panamà',
'PE' => 'Perú',
'PH' => 'Filipines',
'PW' => 'Palaos',
'PG' => 'Papua Nova Guinea',
'PL' => 'Polònia',
'KP' => 'Corea del Nord',
'PT' => 'Portugal',
'PY' => 'Paraguai',
'QA' => 'Katar',
'RO' => 'Romania',
'RU' => 'Rússia',
'RW' => 'Rwanda',
'SA' => 'Aràbia Saudita',
'SD' => 'Sudan',
'SN' => 'Senegal',
'SG' => 'Singapur',
'SB' => 'Illes Salomó',
'SL' => 'Sierra Leone',
'SV' => 'El Salvador',
'SM' => 'San Marí',
'SO' => 'Somàlia',
'RS' => 'Sèrbia',
'SS' => 'Sudàn del Sud',
'ST' => 'Santo Tomé y Príncipe',
'SR' => 'Surinam',
'SK' => 'Eslovàquia',
'SI' => 'Eslovènia',
'SE' => 'Suècia',
'SZ' => 'Swazilàndia',
'SC' => 'Seychelles',
'SY' => 'Síria',
'TD' => 'Txad',
'TG' => 'Togo',
'TH' => 'Tailàndia',
'TJ' => 'Tadjikistan',
'TM' => 'Turkmenistan',
'TL' => 'Timor Oriental',
'TO' => 'Tonga',
'TT' => 'Trinitat i Tobago',
'TN' => 'Tunísia',
'TR' => 'Turquia',
'TV' => 'Tuvalu',
'TZ' => 'Tanzània',
'UG' => 'Uganda',
'UA' => 'Ucraïna',
'UY' => 'Uruguai',
'US' => 'Estats Units',
'UZ' => 'Uzbekistan',
'VA' => 'Ciudat del Vaticà',
'VC' => 'Saint Vincent i les Grenadines',
'VE' => 'Veneçuela',
'VN' => 'Vietnam',
'VU' => 'Vanuatu',
'WS' => 'Samoa',
'YE' => 'Iemen',
'ZA' => 'Sud-àfrica',
'ZM' => 'Zàmbia',
'ZW' => 'Zimbabwe',
];

21
app/config/locale/cat.php Normal file
View file

@ -0,0 +1,21 @@
<?php
return [
'settings.inspire' => '"L\'art de ser sabi és l\'art de saber què passar per alt"', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'cat',
'settings.direction' => 'ltr',
// Service - Users
'auth.emails.team' => '%s Equip',
'auth.emails.confirm.title' => 'Confirmació del compte',
'auth.emails.confirm.body' => 'cat.email.auth.confirm.tpl',
'auth.emails.recovery.title' => 'Restablir contrasenya',
'auth.emails.recovery.body' => 'cat.email.auth.recovery.tpl',
'auth.emails.invitation.title' => 'Invitació a l\'Equipo %s a %s',
'auth.emails.invitation.body' => 'cat.email.auth.invitation.tpl',
'locale.country.unknown' => 'Desconegut',
'countries' => include 'cat.countries.php',
'continents' => include 'cat.continents.php',
];

View file

@ -0,0 +1,11 @@
<?php
return [
'AF' => 'Afrika',
'AN' => 'Antarktis',
'AS' => 'Asien',
'EU' => 'Europa',
'NA' => 'Nordamerika',
'OC' => 'Ozeanien',
'SA' => 'Südamerika',
];

View file

@ -0,0 +1,198 @@
<?php
return [
'AF' => 'Afghanistan',
'AO' => 'Angola',
'AL' => 'Albanien',
'AD' => 'Andorra',
'AE' => 'Vereinigte Arabische Emirate',
'AR' => 'Argentinien',
'AM' => 'Armenien',
'AG' => 'Antigua und Barbuda',
'AU' => 'Australien',
'AT' => 'Österreich',
'AZ' => 'Aserbaidschan',
'BI' => 'Burundi',
'BE' => 'Belgien',
'BJ' => 'Benin',
'BF' => 'Burkina Faso',
'BD' => 'Bangladesch',
'BG' => 'Bulgarien',
'BH' => 'Bahrain',
'BS' => 'Bahamas',
'BA' => 'Bosnien und Herzegowina',
'BY' => 'Weißrussland',
'BZ' => 'Belize',
'BO' => 'Bolivien',
'BR' => 'Brazilen',
'BB' => 'Barbados',
'BN' => 'Brunei',
'BT' => 'Bhutan',
'BW' => 'Botswana',
'CF' => 'Zentralafrikanische Republik',
'CA' => 'Kanada',
'CH' => 'Schweiz',
'CL' => 'Chile',
'CN' => 'China',
'CI' => 'Elfenbeinküste',
'CM' => 'Kamerun',
'CD' => 'Demokratische Republik Kongo',
'CG' => 'Republik Kongo',
'CO' => 'Kolumbien',
'KM' => 'Komoren',
'CV' => 'Kap Verde',
'CR' => 'Costa Rica',
'CU' => 'Kuba',
'CY' => 'Zypern',
'CZ' => 'Tschechien',
'DE' => 'Deutschland',
'DJ' => 'Dschibuti',
'DM' => 'Dominica',
'DK' => 'Dänemark',
'DO' => 'Dominikanische Republik',
'DZ' => 'Algerien',
'EC' => 'Ecuador',
'EG' => 'Ägypten',
'ER' => 'Eritrea',
'ES' => 'Spanien',
'EE' => 'Estland',
'ET' => 'Äthiopien',
'FI' => 'Finnland',
'FJ' => 'Fidschi',
'FR' => 'Frankreich',
'FM' => 'Mikronesien',
'GA' => 'Gabun',
'GB' => 'Großbritannien',
'GE' => 'Georgien',
'GH' => 'Ghana',
'GN' => 'Guinea',
'GM' => 'Gambia',
'GW' => 'Guinea-Bissau',
'GQ' => 'Äquatorialguinea',
'GR' => 'Griechenland',
'GD' => 'Grenada',
'GT' => 'Guatemala',
'GY' => 'Guyana',
'HN' => 'Honduras',
'HR' => 'Kroatien',
'HT' => 'Haiti',
'HU' => 'Ungarn',
'ID' => 'Indonesien',
'IN' => 'Indien',
'IE' => 'Irland',
'IR' => 'Iran',
'IQ' => 'Irak',
'IS' => 'Island',
'IL' => 'Israel',
'IT' => 'Italien',
'JM' => 'Jamaika',
'JO' => 'Jordan',
'JP' => 'Japan',
'KZ' => 'Kasachstan',
'KE' => 'Kenia',
'KG' => 'Kirgisistan',
'KH' => 'Kambodscha',
'KI' => 'Kiribati',
'KN' => 'St. Kitts und Nevis',
'KR' => 'Südkorea',
'KW' => 'Kuwait',
'LA' => 'Laos',
'LB' => 'Libanon',
'LR' => 'Liberia',
'LY' => 'Libyen',
'LC' => 'St. Lucia',
'LI' => 'Liechtenstein',
'LK' => 'Sri Lanka',
'LS' => 'Lesotho',
'LT' => 'Litauen',
'LU' => 'Luxemburg',
'LV' => 'Lettland',
'MA' => 'Marokko',
'MC' => 'Monaco',
'MD' => 'Moldawien',
'MG' => 'Madagaskar',
'MV' => 'Malediven',
'MX' => 'Mexiko',
'MH' => 'Marshallinseln',
'MK' => 'Mazedonien',
'ML' => 'Mali',
'MT' => 'Malta',
'MM' => 'Myanmar',
'ME' => 'Montenegro',
'MN' => 'Mongolei',
'MZ' => 'Mosambik',
'MR' => 'Mauretanien',
'MU' => 'Mauritius',
'MW' => 'Malawi',
'MY' => 'Malaysia',
'NA' => 'Namibia',
'NE' => 'Niger',
'NG' => 'Nigeria',
'NI' => 'Nicaragua',
'NL' => 'Niederlande',
'NO' => 'Norwegen',
'NP' => 'Nepal',
'NR' => 'Nauru',
'NZ' => 'Neuseeland',
'OM' => 'Oman',
'PK' => 'Pakistan',
'PA' => 'Panama',
'PE' => 'Peru',
'PH' => 'Philippinen',
'PW' => 'Palau',
'PG' => 'Papua Neu-Guinea',
'PL' => 'Polen',
'KP' => 'Nord Korea',
'PT' => 'Portugal',
'PY' => 'Paraguay',
'QA' => 'Katar',
'RO' => 'Rumänien',
'RU' => 'Russland',
'RW' => 'Ruanda',
'SA' => 'Saudi Arabien',
'SD' => 'Sudan',
'SN' => 'Senegal',
'SG' => 'Singapur',
'SB' => 'Salomon-Inseln',
'SL' => 'Sierra Leone',
'SV' => 'El Salvador',
'SM' => 'San Marino',
'SO' => 'Somalia',
'RS' => 'Serbien',
'SS' => 'Südsudan',
'ST' => 'São Tomé und Príncipe',
'SR' => 'Suriname',
'SK' => 'Slowakei',
'SI' => 'Slowenien',
'SE' => 'Schweden',
'SZ' => 'Swasiland',
'SC' => 'Seychellen',
'SY' => 'Syrien',
'TD' => 'Tschad',
'TG' => 'Togo',
'TH' => 'Thailand',
'TJ' => 'Tadschikistan',
'TM' => 'Turkmenistan',
'TL' => 'Timor-Leste',
'TO' => 'Tonga',
'TT' => 'Trinidad und Tobago',
'TN' => 'Tunesien',
'TR' => 'Türkei',
'TV' => 'Tuvalu',
'TZ' => 'Tansania',
'UG' => 'Uganda',
'UA' => 'Ukraine',
'UY' => 'Uruguay',
'US' => 'Vereinigte Staaten',
'UZ' => 'Usbekistan',
'VA' => 'Vatikanstadt',
'VC' => 'St. Vincent und die Grenadinen',
'VE' => 'Venezuela',
'VN' => 'Vietnam',
'VU' => 'Vanuatu',
'WS' => 'Samoa',
'YE' => 'Jemen',
'ZA' => 'Südafrika',
'ZM' => 'Sambia',
'ZW' => 'Zimbabwe',
];

21
app/config/locale/de.php Normal file
View file

@ -0,0 +1,21 @@
<?php
return [
'settings.inspire' => '"Die Kunst, weise zu sein, ist die Kunst, zu wissen, was zu übersehen ist."', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'de',
'settings.direction' => 'ltr',
// Service - Users
'auth.emails.team' => '%s Team',
'auth.emails.confirm.title' => 'Accountbestätigung',
'auth.emails.confirm.body' => 'de.email.auth.confirm.tpl',
'auth.emails.recovery.title' => 'Passwort zurücksetzen',
'auth.emails.recovery.body' => 'de.email.auth.recovery.tpl',
'auth.emails.invitation.title' => 'Einladung zum %s Team bei %s',
'auth.emails.invitation.body' => 'de.email.auth.invitation.tpl',
'locale.country.unknown' => 'Unbekannt',
'countries' => include 'de.countries.php',
'continents' => include 'de.continents.php',
];

View file

@ -1,4 +1,5 @@
<?php
return [
'AF' => 'Afganistán',
'AO' => 'Angola',

View file

@ -0,0 +1,11 @@
<?php
return [
'AF' => 'Afrikka',
'AN' => 'Antarktis',
'AS' => 'Aasia',
'EU' => 'Eurooppa',
'NA' => 'Pohjois Amerikka',
'OC' => 'Oceania',
'SA' => 'Etelä Amerikka',
];

View file

@ -0,0 +1,198 @@
<?php
return [
'AF' => 'Afganistan',
'AO' => 'Angola',
'AL' => 'Albania',
'AD' => 'Andorra',
'AE' => 'Arabiemiirikunnat',
'AR' => 'Argentiina',
'AM' => 'Armenia',
'AG' => 'Antigua ja Barbuda',
'AU' => 'Australia',
'AT' => 'Itävalta',
'AZ' => 'Azerbaidžan',
'BI' => 'Burundi',
'BE' => 'Belgia',
'BJ' => 'Benin',
'BF' => 'Burkina Faso',
'BD' => 'Bangladesh',
'BG' => 'Bulgaria',
'BH' => 'Bahrain',
'BS' => 'Bahama',
'BA' => 'Bosnia ja Hertsegovina',
'BY' => 'Valkovenäjä',
'BZ' => 'Belize',
'BO' => 'Bolivia',
'BR' => 'Brasilia',
'BB' => 'Barbados',
'BN' => 'Brunei',
'BT' => 'Bhutan',
'BW' => 'Botswana',
'CF' => 'Keski-Afrikan tasavalta',
'CA' => 'Kanada',
'CH' => 'Sveitsi',
'CL' => 'Chile',
'CN' => 'Kiina',
'CI' => 'Norsunluurannikko',
'CM' => 'Kamerun',
'CD' => 'Kongon demokraattinen tasavalta',
'CG' => 'Kongon tasavalta',
'CO' => 'Kolumbia',
'KM' => 'Komorit',
'CV' => 'Kap Verde',
'CR' => 'Costa Rica',
'CU' => 'Kuuba',
'CY' => 'Kypros',
'CZ' => 'Tšekki',
'DE' => 'Saksa',
'DJ' => 'Djibouti',
'DM' => 'Dominica',
'DK' => 'Tanska',
'DO' => 'Dominikaaninen tasavalta',
'DZ' => 'Algeria',
'EC' => 'Ecuador',
'EG' => 'Egypti',
'ER' => 'Eritrea',
'ES' => 'Espanja',
'EE' => 'Viro',
'ET' => 'Etiopia',
'FI' => 'Suomi',
'FJ' => 'Fidži',
'FR' => 'Ranska',
'FM' => 'Mikronesia',
'GA' => 'Gabon',
'GB' => 'Yhdistynyt kuningaskunta',
'GE' => 'Georgia',
'GH' => 'Ghana',
'GN' => 'Guinea',
'GM' => 'Gambia',
'GW' => 'Guinea-Bissau',
'GQ' => 'Päiväntasaajan Guinea',
'GR' => 'Kreikka',
'GD' => 'Grenada',
'GT' => 'Guatemala',
'GY' => 'Guyana',
'HN' => 'Honduras',
'HR' => 'Kroatia',
'HT' => 'Haiti',
'HU' => 'Unkari',
'ID' => 'Indonesia',
'IN' => 'Intia',
'IE' => 'Irlanti',
'IR' => 'Iran',
'IQ' => 'Irak',
'IS' => 'Islanti',
'IL' => 'Israel',
'IT' => 'Italia',
'JM' => 'Jamaika',
'JO' => 'Jordan',
'JP' => 'Japani',
'KZ' => 'Kazakstan',
'KE' => 'Kenia',
'KG' => 'Kirgisia',
'KH' => 'Kambodža',
'KI' => 'Kiribati',
'KN' => 'Saint Kitts ja Nevis',
'KR' => 'Etelä-Korea',
'KW' => 'Kuwait',
'LA' => 'Laos',
'LB' => 'Libanon',
'LR' => 'Liberia',
'LY' => 'Libya',
'LC' => 'Saint Lucia',
'LI' => 'Liechtenstein',
'LK' => 'Sri Lanka',
'LS' => 'Lesotho',
'LT' => 'Liettua',
'LU' => 'Luxemburg',
'LV' => 'Latvia',
'MA' => 'Marokko',
'MC' => 'Monaco',
'MD' => 'Moldova',
'MG' => 'Madagaskar',
'MV' => 'Malediivit',
'MX' => 'Meksiko',
'MH' => 'Marshallinsaaret',
'MK' => 'Makedonia',
'ML' => 'Mali',
'MT' => 'Malta',
'MM' => 'Myanmar',
'ME' => 'Montenegro',
'MN' => 'Mongolia',
'MZ' => 'Mosambik',
'MR' => 'Mauritania',
'MU' => 'Mauritius',
'MW' => 'Malawi',
'MY' => 'Malesia',
'NA' => 'Namibia',
'NE' => 'Niger',
'NG' => 'Nigeria',
'NI' => 'Nicaragua',
'NL' => 'Alankomaat',
'EI' => 'Norja',
'NP' => 'Nepal',
'NR' => 'Nauru',
'NZ' => 'Uusi-Seelanti',
'OM' => 'Oman',
'PK' => 'Pakistan',
'PA' => 'Panama',
'PE' => 'Peru',
'PH' => 'Filippiinit',
'PW' => 'Palau',
'PG' => 'Papua-Uusi-Guinea',
'PL' => 'Puola',
'KP' => 'Pohjois-Korea',
'PT' => 'Portugali',
'PY' => 'Paraguay',
'QA' => 'Qatar',
'RO' => 'Romania',
'RU' => 'Venäjä',
'RW' => 'Ruanda',
'SA' => 'Saudi-Arabia',
'SD' => 'Sudan',
'SN' => 'Senegal',
'SG' => 'Singapore',
'SB' => 'Salomonsaaret',
'SL' => 'Sierra Leone',
'SV' => 'Salvador',
'SM' => 'San Marino',
'SO' => 'Somalia',
'RS' => 'Serbia',
'SS' => 'Etelä-Sudan',
'ST' => 'São Tomé ja Príncipe',
'SR' => 'Suriname',
'SK' => 'Slovakia',
'SI' => 'Slovenia',
'SE' => 'Ruotsi',
'SZ' => 'Swazimaa',
'SC' => 'Seychellit',
'SY' => 'Syyria',
'TD' => 'Tšad',
'TG' => 'Togo',
'TH' => 'Thaimaa',
'TJ' => 'Tadžikistan',
'TM' => 'Turkmenistan',
'TL' => 'Timor-Leste',
'TO' => 'Tonga',
'TT' => 'Trinidad ja Tobago',
'TN' => 'Tunisia',
'TR' => 'Turkki',
'TV' => 'Tuvalu',
'TZ' => 'Tansania',
'UG' => 'Uganda',
'UA' => 'Ukraina',
'UY' => 'Uruguay',
'US' => 'Yhdysvallat',
'UZ' => 'Uzbekistan',
'VA' => 'Vatikaanikaupunki',
'VC' => 'Saint Vincent ja Grenadiinit',
'VE' => 'Venezuela',
'VN' => 'Vietnam',
'VU' => 'Vanuatu',
'WS' => 'Samoa',
'YE' => 'Jemen',
'ZA' => 'Etelä-Afrikka',
'ZM' => 'Sambia',
'ZW' => 'Zimbabwe',
];

21
app/config/locale/fi.php Normal file
View file

@ -0,0 +1,21 @@
<?php
return [
'settings.inspire' => '"The art of being wise is the art of knowing what to overlook."', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'fi',
'settings.direction' => 'ltr',
// Service - Users
'auth.emails.team' => '%s Tiimi',
'auth.emails.confirm.title' => 'Tilin Vahvistus',
'auth.emails.confirm.body' => 'en.email.auth.confirm.tpl',
'auth.emails.recovery.title' => 'Salasanan Nollaus',
'auth.emails.recovery.body' => 'en.email.auth.recovery.tpl',
'auth.emails.invitation.title' => 'Kutsu %s Tiimiin %s',
'auth.emails.invitation.body' => 'en.email.auth.invitation.tpl',
'locale.country.unknown' => 'Unknown',
'countries' => include 'fi.countries.php',
'continents' => include 'fi.continents.php',
];

View file

@ -0,0 +1,11 @@
<?php
return [
'AF' => 'Afrika',
'AN' => 'Antartika',
'AS' => 'Asia',
'EU' => 'Eropa',
'NA' => 'Amerika Utara',
'OC' => 'Oseania',
'SA' => 'Amerika Selatan',
];

View file

@ -0,0 +1,198 @@
<?php
return [
'AF' => 'Afganistan',
'AO' => 'Angola',
'AL' => 'Albania',
'AD' => 'Andorra',
'AE' => 'Uni Emirat Arab',
'AR' => 'Argentina',
'AM' => 'Armenia',
'AG' => 'Antigua dan Barbuda',
'AU' => 'Australia',
'AT' => 'Austria',
'AZ' => 'Azerbaijan',
'BI' => 'Burundi',
'BE' => 'Belgium',
'BJ' => 'Benin',
'BF' => 'Burkina Faso',
'BD' => 'Bangladesh',
'BG' => 'Bulgaria',
'BH' => 'Bahrain',
'BS' => 'Bahama',
'BA' => 'Bosnia dan Herzegovina',
'BY' => 'Belarus',
'BZ' => 'Belize',
'BO' => 'Bolivia',
'BR' => 'Brazil',
'BB' => 'Barbados',
'BN' => 'Brunei',
'BT' => 'Bhutan',
'BW' => 'Botswana',
'CF' => 'Republik Afrika Tengah',
'CA' => 'Kanada',
'CH' => 'Swiss',
'CL' => 'Chili',
'CN' => 'Cina',
'CI' => 'Pantai Gading',
'CM' => 'Kamerun',
'CD' => 'DR Kongo',
'CG' => 'Republik Kongo',
'CO' => 'Kolumbia',
'KM' => 'Komoro',
'CV' => 'Tanjung Verde',
'CR' => 'Kosta Rika',
'CU' => 'Kuba',
'CY' => 'Siprus',
'CZ' => 'Czechia',
'DE' => 'Jerman',
'DJ' => 'Djibouti',
'DM' => 'Dominika',
'DK' => 'Denmark',
'DO' => 'Republik Dominika',
'DZ' => 'Aljazair',
'EC' => 'Ekuador',
'EG' => 'Mesir',
'ER' => 'Eritrea',
'ES' => 'Spanyol',
'EE' => 'Estonia',
'ET' => 'Etiopia',
'FI' => 'Finlandia',
'FJ' => 'Fiji',
'FR' => 'Perancis',
'FM' => 'Mikronesia',
'GA' => 'Gabon',
'GB' => 'Britania Raya',
'GE' => 'Georgia',
'GH' => 'Ghana',
'GN' => 'Guinea',
'GM' => 'Gambia',
'GW' => 'Guinea-Bissau',
'GQ' => 'Guinea Khatulistiwa',
'GR' => 'Yunani',
'GD' => 'Grenada',
'GT' => 'Guatemala',
'GY' => 'Guyana',
'HN' => 'Honduras',
'HR' => 'Kroasia',
'HT' => 'Haiti',
'HU' => 'Hungaria',
'ID' => 'Indonesia',
'IN' => 'India',
'IE' => 'Irlandia',
'IR' => 'Iran',
'IQ' => 'Irak',
'IS' => 'Islandia',
'IL' => 'Israel',
'IT' => 'Italia',
'JM' => 'Jamaika',
'JO' => 'Jordan',
'JP' => 'Jepang',
'KZ' => 'Kazakhstan',
'KE' => 'Kenya',
'KG' => 'Kirgistan',
'KH' => 'Kamboja',
'KI' => 'Kiribati',
'KN' => 'Saint Kitts dan Nevis',
'KR' => 'Korea Selatan',
'KW' => 'Kuwait',
'LA' => 'Laos',
'LB' => 'Lebanon',
'LR' => 'Liberia',
'LY' => 'Libya',
'LC' => 'Saint Lucia',
'LI' => 'Liechtenstein',
'LK' => 'Srilanka',
'LS' => 'Lesotho',
'LT' => 'Lithuania',
'LU' => 'Luksemburg',
'LV' => 'Latvia',
'MA' => 'Maroko',
'MC' => 'Monako',
'MD' => 'Moldova',
'MG' => 'Madagaskar',
'MV' => 'Maladewa',
'MX' => 'Meksiko',
'MH' => 'Pulau Marshall',
'MK' => 'Makedonia',
'ML' => 'Mali',
'MT' => 'Malta',
'MM' => 'Myanmar',
'ME' => 'Montenegro',
'MN' => 'Mongolia',
'MZ' => 'Mozambik',
'MR' => 'Mauritania',
'MU' => 'Mauritius',
'MW' => 'Malawi',
'MY' => 'Malaysia',
'NA' => 'Namibia',
'NE' => 'Niger',
'NG' => 'Nigeria',
'NI' => 'Nikaragua',
'NL' => 'Belanda',
'NO' => 'Norway',
'NP' => 'Nepal',
'NR' => 'Nauru',
'NZ' => 'Selandia Baru',
'OM' => 'Oman',
'PK' => 'Pakistan',
'PA' => 'Panama',
'PE' => 'Peru',
'PH' => 'Filipina',
'PW' => 'Palau',
'PG' => 'Papua Nugini',
'PL' => 'Polandia',
'KP' => 'Korea Utara',
'PT' => 'Portugal',
'PY' => 'Paraguay',
'QA' => 'Qatar',
'RO' => 'Rumania',
'RU' => 'Rusia',
'RW' => 'Rwanda',
'SA' => 'Arab Saudi',
'SD' => 'Sudan',
'SN' => 'Senegal',
'SG' => 'Singapura',
'SB' => 'Pulau Solomon',
'SL' => 'Sierra Leone',
'SV' => 'El Salvador',
'SM' => 'San Marino',
'SO' => 'Somalia',
'RS' => 'Serbia',
'SS' => 'Sudan Selatan',
'ST' => 'São Tomé dan Príncipe',
'SR' => 'Suriname',
'SK' => 'Slovakia',
'SI' => 'Slovenia',
'SE' => 'Swedia',
'SZ' => 'Swaziland',
'SC' => 'Seychelles',
'SY' => 'Suriah',
'TD' => 'Chad',
'TG' => 'Untuk pergi',
'TH' => 'Thailand',
'TJ' => 'Tajikistan',
'TM' => 'Turkmenistan',
'TL' => 'Timor-Leste',
'TO' => 'Tonga',
'TT' => 'Trinidad dan Tobago',
'TN' => 'Tunisia',
'TR' => 'Turki',
'TV' => 'Tuvalu',
'TZ' => 'Tanzania',
'UG' => 'Uganda',
'UA' => 'Ukraina',
'UY' => 'Uruguay',
'US' => 'Amerika Serikat',
'UZ' => 'Uzbekistan',
'VA' => 'Kota Vatikan',
'VC' => 'Saint Vincent dan Grenadines',
'VE' => 'Venezuela',
'VN' => 'Vietnam',
'VU' => 'Vanuatu',
'WS' => 'Samoa',
'YE' => 'Yaman',
'ZA' => 'Afrika Selatan',
'ZM' => 'Zambia',
'ZW' => 'Zimbabwe',
];

21
app/config/locale/id.php Normal file
View file

@ -0,0 +1,21 @@
<?php
return [
'settings.inspire' => '"The art of being wise is the art of knowing what to overlook."', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'id',
'settings.direction' => 'ltr',
// Service - Users
'auth.emails.team' => 'Tim %s',
'auth.emails.confirm.title' => 'Konfirmasi Akun',
'auth.emails.confirm.body' => 'id.email.auth.confirm.tpl',
'auth.emails.recovery.title' => 'Reset Kata Sandi',
'auth.emails.recovery.body' => 'id.email.auth.recovery.tpl',
'auth.emails.invitation.title' => 'Undangan ke Tim %s di %s',
'auth.emails.invitation.body' => 'id.email.auth.invitation.tpl',
'locale.country.unknown' => 'Tidak diketahui',
'countries' => include 'id.countries.php',
'continents' => include 'id.continents.php',
];

View file

@ -1,10 +1,11 @@
<?php
return [
'AF' => 'Africa',
'AN' => 'Antartide',
'AS' => 'Asia',
'EU' => 'Europa',
'NA' => 'Nord America',
'OC' => 'Oceania',
'SA' => 'Sud America',
];
<?php
return [
'AF' => 'Africa',
'AN' => 'Antartide',
'AS' => 'Asia',
'EU' => 'Europa',
'NA' => 'Nord America',
'OC' => 'Oceania',
'SA' => 'Sud America',
];

View file

@ -1,198 +1,198 @@
<?php
return [
'AF' => 'Afghanistan',
'AO' => 'Angola',
'AL' => 'Albania',
'AD' => 'Andorra',
'AE' => 'Emirati Arabi Uniti',
'AR' => 'Argentina',
'AM' => 'Armenia',
'AG' => 'Antigua e Barbuda',
'AU' => 'Australia',
'AT' => 'Austria',
'AZ' => 'Azerbaigian',
'BI' => 'Burundi',
'BE' => 'Belgio',
'BJ' => 'Benin',
'BF' => 'Burkina Faso',
'BD' => 'Bangladesh',
'BG' => 'Bulgaria',
'BH' => 'Bahrein',
'BS' => 'Bahamas',
"BA" => "Bosnia ed Erzegovina",
'BY' => 'Bielorussia',
'BZ' => 'Belize',
'BO' => 'Bolivia',
'BR' => 'Brasile',
'BB' => 'Barbados',
'BN' => 'Brunei',
'BT' => 'Bhutan',
'BW' => 'Botswana',
"CF" => "Repubblica centrafricana",
'CA' => 'Canada',
'CH' => 'Svizzera',
'CL' => 'Cile',
'CN' => 'Cina',
'CI' => 'Costa d\'Avorio',
'CM' => 'Camerun',
'CD' => 'DR Congo',
'CG' => 'Repubblica del Congo',
'CO' => 'Colombia',
'KM' => 'Comore',
'CV' => 'Capo Verde',
'CR' => 'Costa Rica',
'CU' => 'Cuba',
'CY' => 'Cipro',
'CZ' => 'Czechia',
'DE' => 'Germania',
'DJ' => 'Gibuti',
'DM' => 'Dominica',
'DK' => 'Danimarca',
'DO' => 'Repubblica Dominicana',
'DZ' => 'Algeria',
'EC' => 'Ecuador',
'EG' => 'Egitto',
'ER' => 'Eritrea',
'ES' => 'Spagna',
'EE' => 'Estonia',
'ET' => 'Etiopia',
'FI' => 'Finlandia',
'FJ' => 'Figi',
'FR' => 'France',
'FM' => 'Micronesia',
'GA' => 'Gabon',
'GB' => 'Regno Unito',
'GE' => 'Georgia',
'GH' => 'Ghana',
'GN' => 'Guinea',
'GM' => 'Gambia',
'GW' => 'Guinea-Bissau',
'GQ' => 'Guinea equatoriale',
'GR' => 'Grecia',
'GD' => 'Grenada',
'GT' => 'Guatemala',
'GY' => 'Guyana',
'HN' => 'Honduras',
'HR' => 'Croazia',
'HT' => 'Haiti',
'HU' => 'Ungheria',
'ID' => 'Indonesia',
'IN' => 'India',
'IE' => 'Irlanda',
'IR' => 'Iran',
'IQ' => 'Iraq',
'IS' => 'Islanda',
'IL' => 'Israele',
'IT' => 'Italia',
'JM' => 'Giamaica',
'JO' => 'Jordan',
'JP' => 'Giappone',
'KZ' => 'Kazakistan',
'KE' => 'Kenya',
'KG' => 'Kirghizistan',
'KH' => 'Cambogia',
'KI' => 'Kiribati',
'KN' => 'Saint Kitts e Nevis',
"KR" => "Corea del Sud",
'KW' => 'Kuwait',
'LA' => 'Laos',
'LB' => 'Libano',
'LR' => 'Liberia',
'LY' => 'Libia',
'LC' => 'Santa Lucia',
'LI' => 'Liechtenstein',
'LK' => 'Sri Lanka',
'LS' => 'Lesotho',
'LT' => 'Lituania',
'LU' => 'Lussemburgo',
'LV' => 'Lettonia',
'MA' => 'Marocco',
'MC' => 'Monaco',
'MD' => 'Moldavia',
'MG' => 'Madagascar',
'MV' => 'Maldive',
'MX' => 'Messico',
'MH' => 'Isole Marshall',
'MK' => 'Macedonia',
'ML' => 'Mali',
'MT' => 'Malta',
'MM' => 'Myanmar',
'ME' => 'Montenegro',
'MN' => 'Mongolia',
'MZ' => 'Mozambico',
'MR' => 'Mauritania',
'MU' => 'Mauritius',
'MW' => 'Malawi',
'MY' => 'Malaysia',
'NA' => 'Namibia',
'NE' => 'Niger',
'NG' => 'Nigeria',
'NI' => 'Nicaragua',
'NL' => 'Paesi Bassi',
'NO' => 'Norvegia',
'NP' => 'Nepal',
'NR' => 'Nauru',
'NZ' => 'Nuova Zelanda',
'OM' => 'Oman',
'PK' => 'Pakistan',
'PA' => 'Panama',
'PE' => 'Perù',
'PH' => 'Filippine',
'PW' => 'Palau',
'PG' => 'Papua New Guinea',
'PL' => 'Polonia',
'KP' => 'Corea del Nord',
'PT' => 'Portogallo',
'PY' => 'Paraguay',
'QA' => 'Qatar',
'RO' => 'Romania',
'RU' => 'Russia',
'RW' => 'Ruanda',
'SA' => 'Arabia Saudita',
'SD' => 'Sudan',
'SN' => 'Senegal',
'SG' => 'Singapore',
'SB' => 'Isole Salomone',
'SL' => 'Sierra Leone',
'SV' => 'El Salvador',
'SM' => 'San Marino',
'SO' => 'Somalia',
'RS' => 'Serbia',
'SS' => 'Sudan del Sud',
'ST' => 'São Tomé and Príncipe',
'SR' => 'Suriname',
'SK' => 'Slovacchia',
'SI' => 'Slovenia',
'SE' => 'Svezia',
'SZ' => 'Swaziland',
'SC' => 'Seychelles',
'SY' => 'Siria',
'TD' => 'Chad',
'TG' => 'Togo',
'TH' => 'Thailand',
'TJ' => 'Tagikistan',
'TM' => 'Turkmenistan',
'TL' => 'Timor Est',
'TO' => 'Tonga',
'TT' => 'Trinidad e Tobago',
'TN' => 'Tunisia',
'TR' => 'Turchia',
'TV' => 'Tuvalu',
'TZ' => 'Tanzania',
'UG' => 'Uganda',
'UA' => 'Ucraina',
'UY' => 'Uruguay',
'US' => 'Stati Uniti',
'UZ' => 'Uzbekistan',
'VA' => 'Città del Vaticano',
'VC' => 'Saint Vincent e Grenadine',
'VE' => 'Venezuela',
'VN' => 'Vietnam',
'VU' => 'Vanuatu',
'WS' => 'Samoa',
'YE' => 'Yemen',
'ZA' => 'Sudafrica',
'ZM' => 'Zambia',
'ZW' => 'Zimbabwe',
];
<?php
return [
'AF' => 'Afghanistan',
'AO' => 'Angola',
'AL' => 'Albania',
'AD' => 'Andorra',
'AE' => 'Emirati Arabi Uniti',
'AR' => 'Argentina',
'AM' => 'Armenia',
'AG' => 'Antigua e Barbuda',
'AU' => 'Australia',
'AT' => 'Austria',
'AZ' => 'Azerbaigian',
'BI' => 'Burundi',
'BE' => 'Belgio',
'BJ' => 'Benin',
'BF' => 'Burkina Faso',
'BD' => 'Bangladesh',
'BG' => 'Bulgaria',
'BH' => 'Bahrein',
'BS' => 'Bahamas',
'BA' => 'Bosnia ed Erzegovina',
'BY' => 'Bielorussia',
'BZ' => 'Belize',
'BO' => 'Bolivia',
'BR' => 'Brasile',
'BB' => 'Barbados',
'BN' => 'Brunei',
'BT' => 'Bhutan',
'BW' => 'Botswana',
'CF' => 'Repubblica centrafricana',
'CA' => 'Canada',
'CH' => 'Svizzera',
'CL' => 'Cile',
'CN' => 'Cina',
'CI' => 'Costa d\'Avorio',
'CM' => 'Camerun',
'CD' => 'DR Congo',
'CG' => 'Repubblica del Congo',
'CO' => 'Colombia',
'KM' => 'Comore',
'CV' => 'Capo Verde',
'CR' => 'Costa Rica',
'CU' => 'Cuba',
'CY' => 'Cipro',
'CZ' => 'Czechia',
'DE' => 'Germania',
'DJ' => 'Gibuti',
'DM' => 'Dominica',
'DK' => 'Danimarca',
'DO' => 'Repubblica Dominicana',
'DZ' => 'Algeria',
'EC' => 'Ecuador',
'EG' => 'Egitto',
'ER' => 'Eritrea',
'ES' => 'Spagna',
'EE' => 'Estonia',
'ET' => 'Etiopia',
'FI' => 'Finlandia',
'FJ' => 'Figi',
'FR' => 'France',
'FM' => 'Micronesia',
'GA' => 'Gabon',
'GB' => 'Regno Unito',
'GE' => 'Georgia',
'GH' => 'Ghana',
'GN' => 'Guinea',
'GM' => 'Gambia',
'GW' => 'Guinea-Bissau',
'GQ' => 'Guinea equatoriale',
'GR' => 'Grecia',
'GD' => 'Grenada',
'GT' => 'Guatemala',
'GY' => 'Guyana',
'HN' => 'Honduras',
'HR' => 'Croazia',
'HT' => 'Haiti',
'HU' => 'Ungheria',
'ID' => 'Indonesia',
'IN' => 'India',
'IE' => 'Irlanda',
'IR' => 'Iran',
'IQ' => 'Iraq',
'IS' => 'Islanda',
'IL' => 'Israele',
'IT' => 'Italia',
'JM' => 'Giamaica',
'JO' => 'Jordan',
'JP' => 'Giappone',
'KZ' => 'Kazakistan',
'KE' => 'Kenya',
'KG' => 'Kirghizistan',
'KH' => 'Cambogia',
'KI' => 'Kiribati',
'KN' => 'Saint Kitts e Nevis',
'KR' => 'Corea del Sud',
'KW' => 'Kuwait',
'LA' => 'Laos',
'LB' => 'Libano',
'LR' => 'Liberia',
'LY' => 'Libia',
'LC' => 'Santa Lucia',
'LI' => 'Liechtenstein',
'LK' => 'Sri Lanka',
'LS' => 'Lesotho',
'LT' => 'Lituania',
'LU' => 'Lussemburgo',
'LV' => 'Lettonia',
'MA' => 'Marocco',
'MC' => 'Monaco',
'MD' => 'Moldavia',
'MG' => 'Madagascar',
'MV' => 'Maldive',
'MX' => 'Messico',
'MH' => 'Isole Marshall',
'MK' => 'Macedonia',
'ML' => 'Mali',
'MT' => 'Malta',
'MM' => 'Myanmar',
'ME' => 'Montenegro',
'MN' => 'Mongolia',
'MZ' => 'Mozambico',
'MR' => 'Mauritania',
'MU' => 'Mauritius',
'MW' => 'Malawi',
'MY' => 'Malaysia',
'NA' => 'Namibia',
'NE' => 'Niger',
'NG' => 'Nigeria',
'NI' => 'Nicaragua',
'NL' => 'Paesi Bassi',
'NO' => 'Norvegia',
'NP' => 'Nepal',
'NR' => 'Nauru',
'NZ' => 'Nuova Zelanda',
'OM' => 'Oman',
'PK' => 'Pakistan',
'PA' => 'Panama',
'PE' => 'Perù',
'PH' => 'Filippine',
'PW' => 'Palau',
'PG' => 'Papua New Guinea',
'PL' => 'Polonia',
'KP' => 'Corea del Nord',
'PT' => 'Portogallo',
'PY' => 'Paraguay',
'QA' => 'Qatar',
'RO' => 'Romania',
'RU' => 'Russia',
'RW' => 'Ruanda',
'SA' => 'Arabia Saudita',
'SD' => 'Sudan',
'SN' => 'Senegal',
'SG' => 'Singapore',
'SB' => 'Isole Salomone',
'SL' => 'Sierra Leone',
'SV' => 'El Salvador',
'SM' => 'San Marino',
'SO' => 'Somalia',
'RS' => 'Serbia',
'SS' => 'Sudan del Sud',
'ST' => 'São Tomé and Príncipe',
'SR' => 'Suriname',
'SK' => 'Slovacchia',
'SI' => 'Slovenia',
'SE' => 'Svezia',
'SZ' => 'Swaziland',
'SC' => 'Seychelles',
'SY' => 'Siria',
'TD' => 'Chad',
'TG' => 'Togo',
'TH' => 'Thailand',
'TJ' => 'Tagikistan',
'TM' => 'Turkmenistan',
'TL' => 'Timor Est',
'TO' => 'Tonga',
'TT' => 'Trinidad e Tobago',
'TN' => 'Tunisia',
'TR' => 'Turchia',
'TV' => 'Tuvalu',
'TZ' => 'Tanzania',
'UG' => 'Uganda',
'UA' => 'Ucraina',
'UY' => 'Uruguay',
'US' => 'Stati Uniti',
'UZ' => 'Uzbekistan',
'VA' => 'Città del Vaticano',
'VC' => 'Saint Vincent e Grenadine',
'VE' => 'Venezuela',
'VN' => 'Vietnam',
'VU' => 'Vanuatu',
'WS' => 'Samoa',
'YE' => 'Yemen',
'ZA' => 'Sudafrica',
'ZM' => 'Zambia',
'ZW' => 'Zimbabwe',
];

View file

@ -1,18 +1,18 @@
<?php
return [
'settings.inspire' => '"L\'arte di essere saggi è l\'arte di sapere cosa trascurare."', // Questa è la riga stampata nella homepage e nella console 'view-source'
'settings.locale' => 'it',
'settings.direction' => 'ltr',
// Servizio - Utenti
'auth.emails.team' => '%s Squadra',
'auth.emails.confirm.title' => 'Conferma dell\'account',
'auth.emails.confirm.body' => 'en.email.auth.confirm.tpl',
'auth.emails.recovery.title' => 'Reimpostazione della password',
'auth.emails.recovery.body' => 'en.email.auth.recovery.tpl',
'auth.emails.invitation.title' => 'Invito a %s squadra %s',
'auth.emails.invitation.body' => 'en.email.auth.invitation.tpl',
'locale.country.unknown' => 'Sconosciuto',
'countries' => include 'it.countries.php',
'continents' => include 'it.continents.php',
];
<?php
return [
'settings.inspire' => '"L\'arte di essere saggi è l\'arte di sapere cosa trascurare."', // Questa è la riga stampata nella homepage e nella console 'view-source'
'settings.locale' => 'it',
'settings.direction' => 'ltr',
// Servizio - Utenti
'auth.emails.team' => '%s Squadra',
'auth.emails.confirm.title' => 'Conferma dell\'account',
'auth.emails.confirm.body' => 'en.email.auth.confirm.tpl',
'auth.emails.recovery.title' => 'Reimpostazione della password',
'auth.emails.recovery.body' => 'en.email.auth.recovery.tpl',
'auth.emails.invitation.title' => 'Invito a %s squadra %s',
'auth.emails.invitation.body' => 'en.email.auth.invitation.tpl',
'locale.country.unknown' => 'Sconosciuto',
'countries' => include 'it.countries.php',
'continents' => include 'it.continents.php',
];

View file

@ -0,0 +1,11 @@
<?php
return [
'AF' => 'Afrika',
'AN' => 'Antarktis',
'AS' => 'Asia',
'EU' => 'Europa',
'NA' => 'Nord-Amerika',
'OC' => 'Oseania',
'SA' => 'Sør-Amerika',
];

View file

@ -0,0 +1,198 @@
<?php
return [
'AF' => 'Afghanistan',
'AO' => 'Angola',
'AL' => 'Albania',
'AD' => 'Andorra',
'AE' => 'De forente arabiske emirater',
'AR' => 'Argentina',
'AM' => 'Armenia',
'AG' => 'Antigua og Barbuda',
'AU' => 'Australia',
'AT' => 'Østerrike',
'AZ' => 'Aserbajdsjan',
'BI' => 'Burundi',
'BE' => 'Belgia',
'BJ' => 'Benin',
'BF' => 'Burkina Faso',
'BD' => 'Bangladesh',
'BG' => 'Bulgaria',
'BH' => 'Bahrain',
'BS' => 'Bahamas',
'BA' => 'Bosnia-Hercegovina',
'BY' => 'Hviterussland',
'BZ' => 'Belize',
'BO' => 'Bolivia',
'BR' => 'Brasil',
'BB' => 'Barbados',
'BN' => 'Brunei Darussalam',
'BT' => 'Bhutan',
'BW' => 'Botswana',
'CF' => 'Den sentralafrikanske republikk',
'CA' => 'Canada',
'CH' => 'Sveits',
'CL' => 'Chile',
'CN' => 'Kina',
'CI' => 'Elfenbenskysten',
'CM' => 'Kamerun',
'CD' => 'Den demokratiske republikken Kongo',
'CG' => 'Republikken Kongo',
'CO' => 'Colombia',
'KM' => 'Komorene',
'CV' => 'Kapp Verde',
'CR' => 'Costa Rica',
'CU' => 'Cuba',
'CY' => 'Kypros',
'CZ' => 'Tjekkia',
'DE' => 'Tyskland',
'DJ' => 'Djibouti',
'DM' => 'Dominica',
'DK' => 'Danmark',
'DO' => 'Den dominikanske republikk',
'DZ' => 'Algerie',
'EC' => 'Ecuador',
'EG' => 'Egypt',
'ER' => 'Eritrea',
'ES' => 'Spania',
'EE' => 'Estland',
'ET' => 'Etiopia',
'FI' => 'Finland',
'FJ' => 'Fiji',
'FR' => 'Frankrike',
'FM' => 'Mikronesia',
'GA' => 'Gabon',
'GB' => 'Storbritannia',
'GE' => 'Georgia',
'GH' => 'Ghana',
'GN' => 'Guinea',
'GM' => 'Gambia',
'GW' => 'Guinea-Bissau',
'GQ' => 'Ekvatorial-Guinea',
'GR' => 'Hellas',
'GD' => 'Grenada',
'GT' => 'Guatemala',
'GY' => 'Guyana',
'HN' => 'Honduras',
'HR' => 'Kroatia',
'HT' => 'Haiti',
'HU' => 'Ungarn',
'ID' => 'Indonesia',
'IN' => 'India',
'IE' => 'Irland',
'IR' => 'Iran',
'IQ' => 'Irak',
'IS' => 'Island',
'IL' => 'Israel',
'IT' => 'Italia',
'JM' => 'Jamaica',
'JO' => 'Jordan',
'JP' => 'Japan',
'KZ' => 'Kasakhstan',
'KE' => 'Kenya',
'KG' => 'Kirgisistan',
'KH' => 'Kambodsja',
'KI' => 'Kiribati',
'KN' => 'Saint Kitts og Nevis',
'KR' => 'Sør-Korea',
'KW' => 'Kuwait',
'LA' => 'Laos',
'LB' => 'Libanon',
'LR' => 'Liberia',
'LY' => 'Libya',
'LC' => 'Saint Lucia',
'LI' => 'Liechtenstein',
'LK' => 'Sri Lanka',
'LS' => 'Lesotho',
'LT' => 'Litauen',
'LU' => 'Luxembourg',
'LV' => 'Latvia',
'MA' => 'Marokko',
'MC' => 'Monaco',
'MD' => 'Moldova',
'MG' => 'Madagaskar',
'MV' => 'Maldivene',
'MX' => 'Mexico',
'MH' => 'Marshalløyene',
'MK' => 'Nord-Makedonia',
'ML' => 'Mali',
'MT' => 'Malta',
'MM' => 'Myanmar',
'ME' => 'Montenegro',
'MN' => 'Mongolia',
'MZ' => 'Mozambik',
'MR' => 'Mauritania',
'MU' => 'Mauritius',
'MW' => 'Malawi',
'MY' => 'Malaysia',
'NA' => 'Namibia',
'NE' => 'Niger',
'NG' => 'Nigeria',
'NI' => 'Nicaragua',
'NL' => 'Nederland',
'NO' => 'Norge',
'NP' => 'Nepal',
'NR' => 'Nauru',
'NZ' => 'New Zealand',
'OM' => 'Oman',
'PK' => 'Pakistan',
'PA' => 'Panama',
'PE' => 'Peru',
'PH' => 'Filippinene',
'PW' => 'Palau',
'PG' => 'Papua Ny-Guinea',
'PL' => 'Polen',
'KP' => 'Nord-Korea',
'PT' => 'Portugal',
'PY' => 'Paraguay',
'QA' => 'Qatar',
'RO' => 'Romania',
'RU' => 'Russland',
'RW' => 'Rwanda',
'SA' => 'Saudi-Arabia',
'SD' => 'Sudan',
'SN' => 'Senegal',
'SG' => 'Singapore',
'SB' => 'Solomonøyene',
'SL' => 'Sierra Leone',
'SV' => 'El Salvador',
'SM' => 'San Marino',
'SO' => 'Somalia',
'RS' => 'Serbia',
'SS' => 'Sør-Sudan',
'ST' => 'São Tomé og Príncipe',
'SR' => 'Surinam',
'SK' => 'Slovakia',
'SI' => 'Slovenia',
'SE' => 'Sverige',
'SZ' => 'Swaziland',
'SC' => 'Seychellene',
'SY' => 'Syria',
'TD' => 'Tsjad',
'TG' => 'Togo',
'TH' => 'Thailand',
'TJ' => 'Tajikistan',
'TM' => 'Turkmenistan',
'TL' => 'Øst-Timor',
'TO' => 'Tonga',
'TT' => 'Trinidad og Tobago',
'TN' => 'Tunisia',
'TR' => 'Tyrkia',
'TV' => 'Tuvalu',
'TZ' => 'Tanzania',
'UG' => 'Uganda',
'UA' => 'Ukraina',
'UY' => 'Uruguay',
'US' => 'Amerikas forente stater',
'UZ' => 'Usbekistan',
'VA' => 'Vatikanstaten',
'VC' => 'Saint Vincent og Grenadinene',
'VE' => 'Venezuela',
'VN' => 'Vietnam',
'VU' => 'Vanuatu',
'WS' => 'Samoa',
'YE' => 'Jemen',
'ZA' => 'Sør-Africa',
'ZM' => 'Zambia',
'ZW' => 'Zimbabwe',
];

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Hola {{name}},
<br />
<br />
Segueix aquest enllaç per verificar la teva direcció de correu:
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Si no has solicitat verificar aquesta direcció, pots ignorar aquest missatge.
<br />
<br />
Gràcies,
<br />
Equip {{project}}
</div>

View file

@ -0,0 +1,28 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Hola,
<br />
<br />
T'hem enviat aquest correu perquè <b>{{owner}}</b> et vol convidar a formar part
de l'equip <b>{{team}}</b> a {{project}}.
<br />
<br />
Segueix aquest enllaç per unir-te a l'equip <b>{{team}}</b>:
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Si no estàs interessat, pots ignorar aquest missatge.
<br />
<br />
Gràcies,
<br />
Equip {{project}}
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Hola {{name}},
<br />
<br />
Segueix aquest enllaç per restablir la teva contrasenya de {{project}}.
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Si no has demanat restablir la teva contrasenya, pots ignorar aquest missatge.
<br />
<br />
Gràcies,
<br />
Equip {{project}}
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Hallo {{name}},
<br />
<br />
bitte folge diesem Link um deine E-Mail Adresse zu verifizieren.
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Bitte ignoriere diese Nachricht, wenn du das Verifizieren deiner E-Mail Adresse nicht beantragt hast.
<br />
<br />
Vielen dank,
<br />
{{project}} Team
</div>

View file

@ -0,0 +1,27 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Hallo,
<br />
<br />
diese E-Mail wurde dir geschickt, weil <b>{{owner}}</b> dich eingeladen hat Teammitglied im Team <b>{{team}}</b> bei {{project}} zu werden.
<br />
<br />
Folge diesem Link um dem <b>{{team}}</b> Team beizutreten:
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Wenn du daran nicht interessiert bist, kannst du diese Nachricht ignorieren.
<br />
<br />
Vielen dank,
<br />
{{project}} Team
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Hallo {{name}},
<br />
<br />
Folge diesem Link um dein Passwort für {{project}} zurückzusetzen.
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Bitte ignoriere diese Nachricht, wenn du das Zurücksetzen deines Passworts nicht beantragt hast.
<br />
<br />
Vielen dank,
<br />
{{project}} Team
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Hei {{name}},
<br />
<br />
Varmista sähköpostiosoite tästä linkistä.
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Jos et kysynyt tämän sähköpostiosoitteen varmistamista, voit sivuuttaa tämän viestin.
<br />
<br />
kiitos,
<br />
{{project}} tiimi
</div>

View file

@ -0,0 +1,27 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Hei,
<br />
<br />
Sait tämän sähköpostin koska <b>{{owner}}</b> halusi kutsua sinut jäseneksi <b>{{team}}</b> tiimiin, täällä {{project}}.
<br />
<br />
Käytä tätä linkkiä liittyäksesi <b>{{team}}</b> tiimiin:
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Jos et ole kiinnostunut, voit sivuuttaa tämän viestin.
<br />
<br />
kiitos,
<br />
{{project}} tiimi
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Hei {{name}},
<br />
<br />
Resetoi {{project}} salasana tästä linkistä.
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Jos et pyytänyt salasanan nollaamista, voit sivuuttaa tämän viestin-
<br />
<br />
Kiitos,
<br />
{{project}} tiimi
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Halo {{name}},
<br />
<br />
Ikuti link ini untuk memverifikasi alamat email Anda.
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Jika Anda tidak meminta untuk memverifikasi alamat ini, Anda dapat mengabaikan pesan ini.
<br />
<br />
Terima kasih,
<br />
Tim {{project}}
</div>

View file

@ -0,0 +1,27 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Halo,
<br />
<br />
Email ini dikirimkan kepada Anda karena <b>{{owner}}</b> ingin mengundang Anda untuk menjadi anggota tim <b>{{team}}</b> di {{project}}.
<br />
<br />
Ikuti link ini untuk bergabung dengan tim <b>{{team}}</b>:
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Jika Anda tidak tertarik, Anda dapat mengabaikan pesan ini.
<br />
<br />
Terima kasih,
<br />
Tim {{project}}
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Halo {{name}},
<br />
<br />
Ikuti link ini untuk mereset kata sandi {{project}} Anda.
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Jika Anda tidak meminta untuk mereset kata sandi Anda, Anda dapat mengabaikan pesan ini.
<br />
<br />
Terima kasih,
<br />
Tim {{project}}
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Hei {{name}},
<br />
<br />
Følg denne lenken for å verifisere din e-postadresse.
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Hvis du ikke har spurt om å verifisere din e-post, kan du ignorere denne meldingen.
<br />
<br />
Hilsen,
<br />
{{project}}-teamet
</div>

View file

@ -0,0 +1,28 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Hei,
<br />
<br />
Denne mailen ble sendt til deg fordi <b>{{owner}}</b> har invitert deg til å bli medlem av <b>{{team}}</b>-teamet på {{project}}.
<br />
<br />
Follow this link to join the <b>{{team}}</b> team:
Følg denne lenken for å bli med på <b>{{team}}</b>-teamet:
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Hvis du ikke er interresert kan du ignorere denne meldingen.
<br />
<br />
Hilsen,
<br />
{{project}}-teamet
</div>

View file

@ -0,0 +1,25 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Hei {{name}},
<br />
<br />
Follow this link to reset your {{project}} password.
Følg denne lenken for å tilbakestille ditt {{project}}-passord.
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Hvis du ikke har spurt om å tilbakestille passordet ditt, kan du ignorere denne meldingen.
<br />
<br />
Hilsen,
<br />
{{project}}-teamet
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Вітаємо {{name}},
<br />
<br />
Перейдіть за цим посиланням, та підтвердіть свою електронну адресу
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Якщо ви не запитували підтвердження цієї адреси, проігноруйте це повідомлення.
<br />
<br />
Дякуємо,
<br />
команда {{project}}
</div>

View file

@ -0,0 +1,27 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Вітаємо,
<br />
<br />
Цей лист був надісланий вам тому що <b>{{owner}}</b> хоче запросити вас стати членом команди <b>{{team}}</b> у {{project}}.
<br />
<br />
Перейдіть за цим посиланням щоб приєднатись до команди <b>{{team}}</b> :
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Якщо ви не зацікавлені, проігноруйте це повідомлення.
<br />
<br />
Дякуємо,
<br />
Команда {{project}}
</div>

View file

@ -0,0 +1,24 @@
<style>
* {
font-family: sans-serif,Arial;
-webkit-font-smoothing: antialiased;
font-weight: lighter;
}
</style>
<div style="direction: {{direction}}">
Вітаємо, {{name}},
<br />
<br />
Перейдіть за цим посиланням для того щоб скинути свій пароль для {{project}} .
<br />
<a href="{{redirect}}">{{redirect}}</a>
<br />
<br />
Якщо ви не запитували скидання паролю, проігноруйте це повідомлення.
<br />
<br />
Дякуємо,
<br />
команда {{project}}
</div>

View file

@ -0,0 +1,10 @@
<?php
return [
'AF' => 'Африка',
'AN' => 'Антарктика',
'AS' => 'Азія',
'EU' => 'Європа',
'NA' => 'Північна Америка',
'OC' => 'Океанія',
'SA' => 'Південна Америка',
];

View file

@ -0,0 +1,197 @@
<?php
return [
'AF' => 'Афганістан',
'AO' => 'Ангола',
'AL' => 'Албанія',
'AD' => 'Андора',
'AE' => 'Об\'єднані Арабські Емірати',
'AR' => 'Аргентина',
'AM' => 'Арменія',
'AG' => 'Антигуа і Барбуда',
'AU' => 'Австралія',
'AT' => 'Австрія',
'AZ' => 'Азербайджан',
'BI' => 'Бурунді',
'BE' => 'Бельгія',
'BJ' => 'Бенін',
'BF' => 'Буркіна Фасо',
'BD' => 'Бангладеш',
'BG' => 'Болгарія',
'BH' => 'Бахрейн',
'BS' => 'Багамські острови',
'BA' => 'Боснія і Герцеговина',
'BY' => 'Беларусь',
'BZ' => 'Бейліз',
'BO' => 'Болівія',
'BR' => 'Бразилія',
'BB' => 'Барбадос',
'BN' => 'Бруней',
'BT' => 'Бутан',
'BW' => 'Ботсвана',
'CF' => 'Центральноафриканська Республіка',
'CA' => 'Канада',
'CH' => 'Швейцарія',
'CL' => 'Чілі',
'CN' => 'Китай',
'CI' => 'Кот-д\'Ивуар',
'CM' => 'Камерун',
'CD' => 'ДР Конго',
'CG' => 'Республіка Конго',
'CO' => 'Колумбія',
'KM' => 'Комори',
'CV' => 'Кабо-Верде',
'CR' => 'Коста-Ріка',
'CU' => 'Куба',
'CY' => 'Кіпр',
'CZ' => 'Чехія',
'DE' => 'Німеччина',
'DJ' => 'Джибуті',
'DM' => 'Домініка',
'DK' => 'Данія',
'DO' => 'Домініканська Республіка',
'DZ' => 'Алжир',
'EC' => 'Эквадор',
'EG' => 'Єгипет',
'ER' => 'Ерітрея',
'ES' => 'Іспанія',
'EE' => 'Естонія',
'ET' => 'Ефіопія',
'FI' => 'Фінляндія',
'FJ' => 'Фіджи',
'FR' => 'Франція',
'FM' => 'Мікронезія',
'GA' => 'Габон',
'GB' => 'Велика Британія',
'GE' => 'Грузія',
'GH' => 'Гана',
'GN' => 'Гвінея',
'GM' => 'Гамбія',
'GW' => 'Гвінея-Бісау',
'GQ' => 'Экваторіальна Гвінея',
'GR' => 'Греція',
'GD' => 'Гренада',
'GT' => 'Гватемала',
'GY' => 'Гайана',
'HN' => 'Гондурас',
'HR' => 'Хорватія',
'HT' => 'Гаїті',
'HU' => 'Угорщина',
'ID' => 'Індонезія',
'IN' => 'Індія',
'IE' => 'Ірландія',
'IR' => 'Іран',
'IQ' => 'Ірак',
'IS' => 'Ісландія',
'IL' => 'Ізраїль',
'IT' => 'Італія',
'JM' => 'Ямайка',
'JO' => 'Іорданія',
'JP' => 'Японія',
'KZ' => 'Казахстан',
'KE' => 'Кенія',
'KG' => 'Кіргізія',
'KH' => 'Камбоджа',
'KI' => 'Кірібаті',
'KN' => 'Сент-Кітс і Невіс',
'KR' => 'Південна Корея',
'KW' => 'Кувейт',
'LA' => 'Лаос',
'LB' => 'Ліван',
'LR' => 'Ліберія',
'LY' => 'Лівія',
'LC' => 'Сент-Люсія',
'LI' => 'Ліхтенштейн',
'LK' => 'Шрі Ланка',
'LS' => 'Лесото',
'LT' => 'Литва',
'LU' => 'Люксембург',
'LV' => 'Латвія',
'MA' => 'Марокко',
'MC' => 'Монако',
'MD' => 'Молдова',
'MG' => 'Мадагаскар',
'MV' => 'Мальдіви',
'MX' => 'Мексика',
'MH' => 'Маршаллові острови',
'MK' => 'Македонія',
'ML' => 'Малі',
'MT' => 'Мальта',
'MM' => 'М\'янма',
'ME' => 'Чорногорія',
'MN' => 'Монголія',
'MZ' => 'Мозамбік',
'MR' => 'Мавританія',
'MU' => 'Маврікій',
'MW' => 'Малаві',
'MY' => 'Малайзія',
'NA' => 'Намібія',
'NE' => 'Нігер',
'NG' => 'Нігерія',
'NI' => 'Нікарагуа',
'NL' => 'Нідерланди',
'NO' => 'Норвегія',
'NP' => 'Непал',
'NR' => 'Науру',
'NZ' => 'Нова Зеландія',
'OM' => 'Оман',
'PK' => 'Пакістан',
'PA' => 'Панама',
'PE' => 'Перу',
'PH' => 'Філіппіни',
'PW' => 'Палау',
'PG' => 'Папуа Нова Гвінея',
'PL' => 'Польша',
'KP' => 'Північна Корея',
'PT' => 'Португалія',
'PY' => 'Парагвай',
'QA' => 'Катар',
'RO' => 'Румунія',
'RU' => 'Росія',
'RW' => 'Руанда',
'SA' => 'Саудовська Аравія',
'SD' => 'Судан',
'SN' => 'Сенегал',
'SG' => 'Сінгапур',
'SB' => 'Соломонові Острови',
'SL' => 'Сьєрра-Леоне',
'SV' => 'Ель Сальвадор',
'SM' => 'Сан Маріно',
'SO' => 'Сомалі',
'RS' => 'Сербія',
'SS' => 'Південний Судан',
'ST' => 'Сан-Томе і Принсіпі',
'SR' => 'Суринам',
'SK' => 'Словакія',
'SI' => 'Словенія',
'SE' => 'Швеція',
'SZ' => 'Свазіленд',
'SC' => 'Сейшели',
'SY' => 'Сирія',
'TD' => 'Чад',
'TG' => 'Того',
'TH' => 'Таіланд',
'TJ' => 'Таджикістан',
'TM' => 'Туркменістан',
'TL' => 'Східний Тимор',
'TO' => 'Тонга',
'TT' => 'Тринідад і Тобаго',
'TN' => 'Туніс',
'TR' => 'Туреччина',
'TV' => 'Тувалу',
'TZ' => 'Танзанія',
'UG' => 'Уганда',
'UA' => 'Україна',
'UY' => 'Уругвай',
'US' => 'Сполучені Штати',
'UZ' => 'Узбекистан',
'VA' => 'Ватикан',
'VC' => 'Сент-Вінсент і Гренадин',
'VE' => 'Венесуела',
'VN' => 'В\'єтнам',
'VU' => 'Вануату',
'WS' => 'Самоа',
'YE' => 'Ємен',
'ZA' => 'Південна Африка',
'ZM' => 'Замбія',
'ZW' => 'Зімбабве',
];

20
app/config/locale/ua.php Normal file
View file

@ -0,0 +1,20 @@
<?php
return [
'settings.inspire' => '"The art of being wise is the art of knowing what to overlook."', // This is the line printed in the homepage and console 'view-source'
'settings.locale' => 'ua',
'settings.direction' => 'ltr',
'auth.emails.team' => '%s Команда',
'auth.emails.confirm.title' => 'Підтвердження Акаунту' ,
'auth.emails.confirm.body' => 'ua.email.auth.confirm.tpl',
'auth.emails.recovery.title' => 'Скидання пароля',
'auth.emails.recovery.body' => 'ua.email.auth.recovery.tpl',
'auth.emails.invitation.title' => 'Запрошення до %s Команди у %s',
'auth.emails.invitation.body' => 'ua.email.auth.invitation.tpl',
'locale.country.unknown' => 'Невідомо',
'countries' => include 'ua.countries.php',
'continents' => include 'ua.continents.php',
];

View file

@ -1,4 +1,5 @@
<?php
const VERSION = '0.1.15';
return VERSION;

View file

@ -49,9 +49,9 @@ $utopia->post('/v1/auth/register')
->action(
function ($email, $password, $confirm, $success, $failure, $name) use ($request, $response, $register, $audit, $projectDB, $project, $webhook) {
if ('console' === $project->getUid()) {
$whitlistEmails = $project->getAttribute('authWhitelistEmails');
$whitlistIPs = $project->getAttribute('authWhitelistIPs');
$whitlistDomains = $project->getAttribute('authWhitelistDomains');
$whitlistEmails = $project->getAttribute('authWhitelistEmails');
$whitlistIPs = $project->getAttribute('authWhitelistIPs');
$whitlistDomains = $project->getAttribute('authWhitelistDomains');
if (!empty($whitlistEmails) && !in_array($email, $whitlistEmails)) {
throw new Exception('Console registration is restricted to specific emails. Contact your administrator for more information.', 401);
@ -61,11 +61,11 @@ $utopia->post('/v1/auth/register')
throw new Exception('Console registration is restricted to specific IPs. Contact your administrator for more information.', 401);
}
if (!empty($whitlistDomains) && !in_array(substr(strrchr($email, "@"), 1), $whitlistDomains)) {
if (!empty($whitlistDomains) && !in_array(substr(strrchr($email, '@'), 1), $whitlistDomains)) {
throw new Exception('Console registration is restricted to specific domains. Contact your administrator for more information.', 401);
}
}
$profile = $projectDB->getCollection([ // Get user by email address
'limit' => 1,
'first' => true,
@ -77,7 +77,7 @@ $utopia->post('/v1/auth/register')
if (!empty($profile)) {
if ($failure) {
$response->redirect($failure . '?message=User already registered');
$response->redirect($failure.'?message=User already registered');
return;
}
@ -778,7 +778,7 @@ $utopia->get('/v1/auth/oauth/:provider/redirect')
}
$oauthID = $oauth->getUserID($accessToken);
if (empty($oauthID)) {
if (!empty($state['failure'])) {
$response->redirect($state['failure'], 301, 0);
@ -788,7 +788,7 @@ $utopia->get('/v1/auth/oauth/:provider/redirect')
}
$current = Auth::tokenVerify($user->getAttribute('tokens', []), Auth::TOKEN_TYPE_LOGIN, Auth::$secret);
if ($current) {
$projectDB->deleteDocument($current); //throw new Exception('User already logged in', 401);
}
@ -802,7 +802,6 @@ $utopia->get('/v1/auth/oauth/:provider/redirect')
],
]) : $user;
if (empty($user)) { // No user logged in or with oauth provider ID, create new one or connect with account with same email
$name = $oauth->getUserName($accessToken);
$email = $oauth->getUserEmail($accessToken);

View file

@ -5,7 +5,6 @@ include_once 'shared/web.php';
global $utopia, $response, $request, $layout, $version, $providers;
use Utopia\View;
use Utopia\Locale\Locale;
use Database\Database;
use Database\Validator\UID;
@ -83,7 +82,7 @@ $utopia->get('/console/account')
;
$layout
->setParam('title', 'Account - ' . APP_NAME)
->setParam('title', 'Account - '.APP_NAME)
->setParam('body', $page);
});

View file

@ -119,17 +119,17 @@ $utopia->post('/v1/database')
->action(
function ($name, $read, $write, $rules) use ($response, $projectDB, $webhook, $audit) {
$parsedRules = [];
foreach ($rules as &$rule) {
$parsedRules[] = array_merge([
'$collection' => Database::SYSTEM_COLLECTION_RULES,
'$permissions' => [
'read' => $read,
'write' => $write,
]
],
], $rule);
}
try {
$data = $projectDB->createDocument([
'$collection' => Database::SYSTEM_COLLECTION_COLLECTIONS,
@ -201,16 +201,16 @@ $utopia->put('/v1/database/:collectionId')
if (empty($collection->getUid()) || Database::SYSTEM_COLLECTION_COLLECTIONS != $collection->getCollection()) {
throw new Exception('Collection not found', 404);
}
$parsedRules = [];
foreach ($rules as &$rule) {
$parsedRules[] = array_merge([
'$collection' => Database::SYSTEM_COLLECTION_RULES,
'$permissions' => [
'read' => $read,
'write' => $write,
]
],
], $rule);
}

View file

@ -115,11 +115,11 @@ $utopia->get('/v1/health/storage/local')
function () use ($response) {
$device = new Local();
if (!is_readable($device->getRoot(). '/..')) {
if (!is_readable($device->getRoot().'/..')) {
throw new Exception('Device is not readable');
}
if (!is_writable($device->getRoot(). '/..')) {
if (!is_writable($device->getRoot().'/..')) {
throw new Exception('Device is not writable');
}

View file

@ -5,7 +5,6 @@ include_once 'shared/web.php';
global $utopia, $response, $request, $layout, $version, $providers, $sdks;
use Utopia\View;
use Utopia\Locale\Locale;
$layout
->setParam('title', APP_NAME)

View file

@ -1,4 +1,5 @@
<?php
/*
* Created by PhpStorm.
* User: eldadfux

View file

@ -1,8 +1,8 @@
<?php
// Init
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
require_once __DIR__ . '/../vendor/autoload.php';
if (file_exists(__DIR__.'/../vendor/autoload.php')) {
require_once __DIR__.'/../vendor/autoload.php';
}
use Utopia\App;
@ -18,48 +18,48 @@ use Utopia\Locale\Locale;
use Utopia\Registry\Registry;
use PHPMailer\PHPMailer\PHPMailer;
const APP_NAME = 'Appwrite';
const APP_DOMAIN = 'appwrite.io';
const APP_EMAIL_TEAM = 'team@' . APP_DOMAIN;
const APP_EMAIL_SECURITY = 'security@' . APP_DOMAIN;
const APP_USERAGENT = APP_NAME . '-Server/%s Please report abuse at ' . APP_EMAIL_SECURITY;
const APP_MODE_ADMIN = 'admin';
const APP_LOCALES = ['en', 'he', 'pt-br', 'es', 'ro'];
const APP_PAGING_LIMIT = 15;
const APP_NAME = 'Appwrite';
const APP_DOMAIN = 'appwrite.io';
const APP_EMAIL_TEAM = 'team@'.APP_DOMAIN;
const APP_EMAIL_SECURITY = 'security@'.APP_DOMAIN;
const APP_USERAGENT = APP_NAME.'-Server/%s Please report abuse at '.APP_EMAIL_SECURITY;
const APP_MODE_ADMIN = 'admin';
const APP_LOCALES = ['en', 'he', 'pt-br', 'es'];
const APP_PAGING_LIMIT = 15;
$register = new Registry();
$request = new Request();
$response = new Response();
$register = new Registry();
$request = new Request();
$response = new Response();
/**
/*
* ENV vars
*/
$env = $request->getServer('_APP_ENV', App::ENV_TYPE_PRODUCTION);
$domain = $request->getServer('HTTP_HOST', '');
$version = include __DIR__ . '/../app/config/version.php';
$providers = include __DIR__ . '/../app/config/providers.php'; // OAuth providers list
$collections = include __DIR__ . '/../app/config/collections.php'; // OAuth providers list
$redisHost = $request->getServer('_APP_REDIS_HOST', '');
$redisPort = $request->getServer('_APP_REDIS_PORT', '');
$utopia = new App('Asia/Tel_Aviv', $env);
$port = (string)(isset($_SERVER['HTTP_HOST'])) ? parse_url($_SERVER['HTTP_HOST'], PHP_URL_PORT) : '';
$env = $request->getServer('_APP_ENV', App::ENV_TYPE_PRODUCTION);
$domain = $request->getServer('HTTP_HOST', '');
$version = include __DIR__.'/../app/config/version.php';
$providers = include __DIR__.'/../app/config/providers.php'; // OAuth providers list
$collections = include __DIR__.'/../app/config/collections.php'; // OAuth providers list
$redisHost = $request->getServer('_APP_REDIS_HOST', '');
$redisPort = $request->getServer('_APP_REDIS_PORT', '');
$utopia = new App('Asia/Tel_Aviv', $env);
$port = (string) (isset($_SERVER['HTTP_HOST'])) ? parse_url($_SERVER['HTTP_HOST'], PHP_URL_PORT) : '';
Resque::setBackend($redisHost . ':' . $redisPort);
Resque::setBackend($redisHost.':'.$redisPort);
define('COOKIE_DOMAIN', ($request->getServer('HTTP_HOST', null) === 'localhost' || $request->getServer('HTTP_HOST', null) === 'localhost:' . $port) ? false : '.' . $request->getServer('HTTP_HOST', false));
define('COOKIE_DOMAIN', ($request->getServer('HTTP_HOST', null) === 'localhost' || $request->getServer('HTTP_HOST', null) === 'localhost:'.$port) ? false : '.'.$request->getServer('HTTP_HOST', false));
/**
/*
* Registry
*/
$register->set('db', function () use ($request) { // Register DB connection
$dbHost = $request->getServer('_APP_DB_HOST', '');
$dbUser = $request->getServer('_APP_DB_USER', '');
$dbPass = $request->getServer('_APP_DB_PASS', '');
$dbScheme = $request->getServer('_APP_DB_SCHEMA', '');
$dbHost = $request->getServer('_APP_DB_HOST', '');
$dbUser = $request->getServer('_APP_DB_USER', '');
$dbPass = $request->getServer('_APP_DB_PASS', '');
$dbScheme = $request->getServer('_APP_DB_SCHEMA', '');
$pdo = new PDO("mysql:host={$dbHost};dbname={$dbScheme};charset=utf8mb4", $dbUser, $dbPass, array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4',
PDO::ATTR_TIMEOUT => 5 // Seconds
PDO::ATTR_TIMEOUT => 5, // Seconds
));
// Connection settings
@ -73,7 +73,7 @@ $register->set('influxdb', function () use ($request) { // Register DB connectio
$port = $request->getServer('_APP_INFLUXDB_PORT', '');
if (empty($host) || empty($port)) {
return null;
return;
}
$client = new InfluxDB\Client($host, $port, '', '', false, false, 5);
@ -93,6 +93,7 @@ $register->set('cache', function () use ($redisHost, $redisPort) { // Register c
$redis = new Redis();
$redis->connect($redisHost, $redisPort);
return $redis;
});
$register->set('smtp', function () use ($request) {
@ -103,23 +104,23 @@ $register->set('smtp', function () use ($request) {
$username = $request->getServer('_APP_SMTP_USERNAME', '');
$password = $request->getServer('_APP_SMTP_PASSWORD', '');
$mail->XMailer = 'Appwrite Mailer';
$mail->Host = $request->getServer('_APP_SMTP_HOST', 'smtp');
$mail->Port = $request->getServer('_APP_SMTP_PORT', 25);
$mail->SMTPAuth = (!empty($username) && !empty($password));
$mail->Username = $username;
$mail->Password = $password;
$mail->XMailer = 'Appwrite Mailer';
$mail->Host = $request->getServer('_APP_SMTP_HOST', 'smtp');
$mail->Port = $request->getServer('_APP_SMTP_PORT', 25);
$mail->SMTPAuth = (!empty($username) && !empty($password));
$mail->Username = $username;
$mail->Password = $password;
$mail->SMTPSecure = $request->getServer('_APP_SMTP_SECURE', '');
$mail->setFrom('team@appwrite.io', APP_NAME . ' Team');
$mail->addReplyTo('team@appwrite.io', APP_NAME . ' Team');
$mail->setFrom('team@appwrite.io', APP_NAME.' Team');
$mail->addReplyTo('team@appwrite.io', APP_NAME.' Team');
$mail->isHTML(true);
return $mail;
});
/**
/*
* Localization
*/
$locale = $request->getParam('locale', $request->getHeader('X-Appwrite-Locale', null));
@ -128,6 +129,7 @@ Locale::$exceptions = false;
Locale::setLanguage('en', include __DIR__ . '/config/locale/en.php');
Locale::setLanguage('he', include __DIR__ . '/config/locale/he.php');
Locale::setLanguage('ua', include __DIR__ . '/config/locale/ua.php');
Locale::setLanguage('pt-br', include __DIR__ . '/config/locale/pt-br.php');
Locale::setLanguage('es', include __DIR__ . '/config/locale/es.php');
Locale::setLanguage('ro', include __DIR__ . '/config/locale/ro.php');
@ -140,11 +142,11 @@ stream_context_set_default([ // Set global user agent and http settings
'http' => [
'method' => 'GET',
'user_agent' => sprintf(APP_USERAGENT, $version),
'timeout' => 2
]
'timeout' => 2,
],
]);
/**
/*
* Auth & Project Scope
*/
$consoleDB = new Database();
@ -166,19 +168,19 @@ if (is_null($project->getUid()) || Database::SYSTEM_COLLECTION_PROJECTS !== $pro
$mode = $request->getParam('mode', $request->getHeader('X-Appwrite-Mode', 'default'));
Auth::setCookieName('a-session-' . $project->getUid());
Auth::setCookieName('a-session-'.$project->getUid());
if (APP_MODE_ADMIN === $mode) {
Auth::setCookieName('a-session-' . $console->getUid());
Auth::setCookieName('a-session-'.$console->getUid());
}
$session = Auth::decodeSession($request->getCookie(Auth::$cookieName, $request->getHeader('X-Appwrite-Key', '')));
Auth::$unique = $session['id'];
Auth::$secret = $session['secret'];
$session = Auth::decodeSession($request->getCookie(Auth::$cookieName, $request->getHeader('X-Appwrite-Key', '')));
Auth::$unique = $session['id'];
Auth::$secret = $session['secret'];
$projectDB = new Database();
$projectDB->setAdapter(new RedisAdapter(new MySQLAdapter($register), $register));
$projectDB->setNamespace('app_' . $project->getUid());
$projectDB->setNamespace('app_'.$project->getUid());
$projectDB->setMocks($collections);
$user = $projectDB->getDocument(Auth::$unique);
@ -187,7 +189,7 @@ if (APP_MODE_ADMIN === $mode) {
$user = $consoleDB->getDocument(Auth::$unique);
$user
->setAttribute('$uid', 'admin-' . $user->getAttribute('$uid'))
->setAttribute('$uid', 'admin-'.$user->getAttribute('$uid'))
;
}

View file

@ -97,9 +97,9 @@ $cli
];
foreach ($clients as $name => $client) {
Console::info('Fetching API Spec for ' . $name . ' (' . $client['platform'] . ')');
$spec = getSSLPage('https://appwrite.io/v1/open-api-2.json?extensions=1&platform=' . $client['platform']);
$spec = getSSLPage('https://appwrite.test/v1/open-api-2.json?extensions=1&platform=' . $client['platform']);
Console::info('Fetching API Spec for '.$name.' ('.$client['platform'].')');
$spec = getSSLPage('https://appwrite.io/v1/open-api-2.json?extensions=1&platform='.$client['platform']);
$spec = getSSLPage('https://appwrite.test/v1/open-api-2.json?extensions=1&platform='.$client['platform']);
switch ($name) {
case 'php':

View file

@ -86,11 +86,11 @@ $collection = $this->getParam('collection', []);
<table class="vertical">
<thead>
<tr>
<?php foreach($collection['rules'] as $rule): ?>
<?php foreach ($collection['rules'] as $rule): ?>
<th width="220">
<?php echo $rule['label']; ?>
<?php if(!empty($rule['description'])): ?>
<?php if (!empty($rule['description'])): ?>
<span class="tooltip large" data-tooltip="<?php echo $rule['description']; ?>"><i class="icon-question"></i></span>
<?php endif; ?>
</th>
@ -101,9 +101,9 @@ $collection = $this->getParam('collection', []);
</thead>
<tbody data-ls-loop="project-documents.documents" data-ls-as="document">
<tr>
<?php foreach($collection['rules'] as $rule): ?>
<?php foreach ($collection['rules'] as $rule): ?>
<td>
<?php switch($rule['type']):
<?php switch ($rule['type']):
case 'numeric':?>
<span class="tag" data-ls-bind="{{document.<?php echo $rule['key']; ?>|emptyDash}}" data-ls-attrs="title={{document.<?php echo $rule['key']; ?>}}"></span>
<?php break;?>

View file

@ -315,7 +315,7 @@ $providers = $this->getParam('providers', []);
data-param-project-id="{{router.params.project}}"
data-scope="console">
<ul class="list">
<?php foreach ($providers as $provider => $data): if(isset($data['enabled']) && !$data['enabled']) { continue; } ?>
<?php foreach ($providers as $provider => $data): if (isset($data['enabled']) && !$data['enabled']) { continue; } ?>
<li class="clear <?php echo (isset($data['enabled']) && !$data['enabled']) ? 'dev-feature' : ''; ?>">
<div data-ui-modal class="modal close" data-button-text="Settings" data-button-class="pull-end">
<button type="button" class="close pull-end" data-ui-modal-close=""><i class="icon-cancel"></i></button>

View file

@ -13,7 +13,7 @@ $projectURL = $this->getParam('projectURL', '');
<small>Error ID: <?php echo $errorID; ?></small>
<?php if(!empty($projectURL)): ?>
<?php if (!empty($projectURL)): ?>
<hr class="margin-top margin-bottom" />
<p><a href="<?php echo $this->escape($projectURL); ?>" rel="noopener">Back to <?php echo $projectName; ?></a></p>

View file

@ -27,7 +27,7 @@ $canonical = $this->getParam('canonical', '');
<link href="https://fonts.googleapis.com/css?family=Poppins:100,300,400,500,600" rel="stylesheet">
<link rel="apple-touch-icon" href="/images/apple.png">
<link rel="preconnect" href="<?php echo $api; ?>" />
<?php if(!empty($canonical)): ?>
<?php if (!empty($canonical)): ?>
<link rel="canonical" href="<?php echo $canonical; ?>" />
<?php endif; ?>
<?php foreach ($this->getParam('prefetch', []) as $prefetch): ?>
@ -63,7 +63,7 @@ $canonical = $this->getParam('canonical', '');
PAGING_LIMIT: <?PHP echo APP_PAGING_LIMIT; ?>
};
<?php if($litespeed): ?>
<?php if ($litespeed): ?>
document.addEventListener("DOMContentLoaded", function() {
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');

View file

@ -9,7 +9,7 @@
$list = [];
foreach ($clients as $client) {
if(empty($client)) {
if (empty($client)) {
continue;
}

View file

@ -15,7 +15,7 @@ fi
echo "Setting Version #"
echo -e "<?php\nconst VERSION = '$1';\n\nreturn VERSION;" > app/config/version.php
echo -e "<?php\n\nconst VERSION = '$1';\n\nreturn VERSION;" > app/config/version.php
echo 'Updating PHP dependencies and auto-loading...'

View file

@ -99,7 +99,7 @@ abstract class OAuth
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
}
$headers[] = "Content-length: ".strlen($payload);
$headers[] = 'Content-length: '.strlen($payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
// Send the request & save response to $response

View file

@ -24,11 +24,11 @@ class Gitlab extends OAuth
*/
public function getLoginURL(): string
{
return 'https://gitlab.com/oauth/authorize?' .
'client_id=' . urlencode($this->appID) .
'&redirect_uri=' . urlencode($this->callback) .
'&scope=read_user' .
'&state=' . urlencode(json_encode($this->state)) .
return 'https://gitlab.com/oauth/authorize?'.
'client_id='.urlencode($this->appID).
'&redirect_uri='.urlencode($this->callback).
'&scope=read_user'.
'&state='.urlencode(json_encode($this->state)).
'&response_type=code';
}
@ -42,10 +42,10 @@ class Gitlab extends OAuth
$accessToken = $this->request(
'POST',
'https://gitlab.com/oauth/token?'.
'code=' . urlencode($code) .
'&client_id=' . urlencode($this->appID) .
'&client_secret=' . urlencode($this->appSecret) .
'&redirect_uri=' . urlencode($this->callback) .
'code='.urlencode($code).
'&client_id='.urlencode($this->appID).
'&client_secret='.urlencode($this->appSecret).
'&redirect_uri='.urlencode($this->callback).
'&grant_type=authorization_code'
);
@ -55,7 +55,6 @@ class Gitlab extends OAuth
return $accessToken['access_token'];
}
return '';
}
@ -115,9 +114,10 @@ class Gitlab extends OAuth
protected function getUser(string $accessToken): array
{
if (empty($this->user)) {
$user = $this->request('GET', 'https://gitlab.com/api/v4/user?access_token=' . urlencode($accessToken));
$user = $this->request('GET', 'https://gitlab.com/api/v4/user?access_token='.urlencode($accessToken));
$this->user = json_decode($user, true);
}
return $this->user;
}
}

View file

@ -28,11 +28,11 @@ class Google extends OAuth
*/
public function getLoginURL(): string
{
return 'https://accounts.google.com/o/oauth2/v2/auth?' .
'client_id=' . urlencode($this->appID) .
'&redirect_uri=' . urlencode($this->callback) .
'&scope=https://www.googleapis.com/auth/userinfo.email+https://www.googleapis.com/auth/userinfo.profile' .
'&state=' . urlencode(json_encode($this->state)) .
return 'https://accounts.google.com/o/oauth2/v2/auth?'.
'client_id='.urlencode($this->appID).
'&redirect_uri='.urlencode($this->callback).
'&scope=https://www.googleapis.com/auth/userinfo.email+https://www.googleapis.com/auth/userinfo.profile'.
'&state='.urlencode(json_encode($this->state)).
'&response_type=code';
}
@ -45,12 +45,12 @@ class Google extends OAuth
{
$accessToken = $this->request(
'POST',
'https://www.googleapis.com/oauth2/' . $this->version . '/token?' .
'code=' . urlencode($code) .
'&client_id=' . urlencode($this->appID) .
'&client_secret=' . urlencode($this->appSecret) .
'&redirect_uri=' . urlencode($this->callback) .
'&scope=' .
'https://www.googleapis.com/oauth2/'.$this->version.'/token?'.
'code='.urlencode($code).
'&client_id='.urlencode($this->appID).
'&client_secret='.urlencode($this->appSecret).
'&redirect_uri='.urlencode($this->callback).
'&scope='.
'&grant_type=authorization_code'
);
@ -119,9 +119,10 @@ class Google extends OAuth
protected function getUser(string $accessToken): array
{
if (empty($this->user)) {
$user = $this->request('GET', 'https://www.googleapis.com/oauth2/v2/userinfo?access_token=' . urlencode($accessToken));
$user = $this->request('GET', 'https://www.googleapis.com/oauth2/v2/userinfo?access_token='.urlencode($accessToken));
$this->user = json_decode($user, true);
}
return $this->user;
}
}

View file

@ -40,7 +40,7 @@ class Collection extends Structure
$document = new Document(
array_merge($this->merge, ($document instanceof Document) ? $document->getArrayCopy() : $document)
);
if (is_null($document->getCollection())) {
$this->message = 'Missing collection attribute $collection';

View file

@ -186,18 +186,19 @@ class Structure extends Validator
}
if (empty($validator)) { // Error creating validator for property
$this->message = 'Unknown rule type "' . $ruleType . '" for property "' . htmlspecialchars($key, ENT_QUOTES, 'UTF-8') . '"';
$this->message = 'Unknown rule type "'.$ruleType.'" for property "'.htmlspecialchars($key, ENT_QUOTES, 'UTF-8').'"';
if (empty($ruleType)) {
$this->message = 'Unknown property "'.$key.'" type'.
'. Make sure to follow '.strtolower($collection->getAttribute('name', 'unknown')).' collection structure';
}
return false;
}
if ($ruleRequired && ('' === $value || null === $value)) {
$this->message = 'Required property "'.$key.'" has no value';
return false;
}
@ -211,6 +212,7 @@ class Structure extends Validator
if ($ruleArray) { // Array of values validation
if (!is_array($value)) {
$this->message = 'Property "'.$key.'" must be an array';
return false;
}
@ -219,12 +221,14 @@ class Structure extends Validator
foreach ($value as $node) {
if (!$validator->isValid($node)) { // Check if property is valid, if not required can also be empty
$this->message = 'Property "'.$key.'" has invalid input. '.$validator->getDescription();
return false;
}
}
} else { // Single value validation
if ((!$validator->isValid($value)) && !('' === $value && !$ruleRequired)) { // Error when value is not valid, and is not optional and empty
$this->message = 'Property "'.$key.'" has invalid input. '.$validator->getDescription();
return false;
}
}