diff --git a/.styleci.yml b/.styleci.yml
index 18ead89..af16329 100644
--- a/.styleci.yml
+++ b/.styleci.yml
@@ -4,4 +4,6 @@ finder:
exclude:
- store
- vendor
+ not-path:
+ - resources/lang
name: "*.php"
\ No newline at end of file
diff --git a/composer.json b/composer.json
index c3d02cc..781e66d 100644
--- a/composer.json
+++ b/composer.json
@@ -12,7 +12,8 @@
"symfony/console": "^3.3",
"twig/extensions": "~1.0",
"twig/twig": "~2.0",
- "cloudinary/cloudinary_php": "^1.8"
+ "cloudinary/cloudinary_php": "^1.8",
+ "illuminate/translation": "5.2.*"
},
"autoload": {
"classmap": [
@@ -24,5 +25,9 @@
"files": [
"utility.php"
]
+ },
+ "config": {
+ "sort-packages": true,
+ "optimize-autoloader": true
}
}
diff --git a/composer.lock b/composer.lock
index cc6be78..041b611 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1,23 +1,23 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "8d430c254f47b62f7d2e72072cc92635",
+ "content-hash": "328b356470d639205462c2e486884a33",
"packages": [
{
"name": "cloudinary/cloudinary_php",
- "version": "1.8.0",
+ "version": "1.10.0",
"source": {
"type": "git",
"url": "https://github.com/cloudinary/cloudinary_php.git",
- "reference": "641b0901ca616c540b773abb802987a502aa8b89"
+ "reference": "aca317781ec1ad6614187a73dd0058026a02474e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/cloudinary/cloudinary_php/zipball/641b0901ca616c540b773abb802987a502aa8b89",
- "reference": "641b0901ca616c540b773abb802987a502aa8b89",
+ "url": "https://api.github.com/repos/cloudinary/cloudinary_php/zipball/aca317781ec1ad6614187a73dd0058026a02474e",
+ "reference": "aca317781ec1ad6614187a73dd0058026a02474e",
"shasum": ""
},
"require": {
@@ -26,7 +26,7 @@
"php": ">=5.3.0"
},
"require-dev": {
- "phpunit/phpunit": "5.7.*"
+ "phpunit/phpunit": "4.8.*"
},
"type": "library",
"autoload": {
@@ -56,7 +56,7 @@
"image management",
"sdk"
],
- "time": "2017-05-03T14:29:33+00:00"
+ "time": "2018-05-10T14:02:04+00:00"
},
{
"name": "doctrine/annotations",
@@ -342,16 +342,16 @@
},
{
"name": "doctrine/dbal",
- "version": "v2.6.3",
+ "version": "v2.7.1",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "e3eed9b1facbb0ced3a0995244843a189e7d1b13"
+ "reference": "11037b4352c008373561dc6fc836834eed80c3b5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/e3eed9b1facbb0ced3a0995244843a189e7d1b13",
- "reference": "e3eed9b1facbb0ced3a0995244843a189e7d1b13",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/11037b4352c008373561dc6fc836834eed80c3b5",
+ "reference": "11037b4352c008373561dc6fc836834eed80c3b5",
"shasum": ""
},
"require": {
@@ -360,9 +360,11 @@
"php": "^7.1"
},
"require-dev": {
- "phpunit/phpunit": "^5.4.6",
+ "doctrine/coding-standard": "^4.0",
+ "phpunit/phpunit": "^7.0",
"phpunit/phpunit-mock-objects": "!=3.2.4,!=3.2.5",
- "symfony/console": "2.*||^3.0"
+ "symfony/console": "^2.0.5||^3.0",
+ "symfony/phpunit-bridge": "^3.4.5|^4.0.5"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
@@ -373,7 +375,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.6.x-dev"
+ "dev-master": "2.7.x-dev"
}
},
"autoload": {
@@ -411,7 +413,7 @@
"persistence",
"queryobject"
],
- "time": "2017-11-19T13:38:54+00:00"
+ "time": "2018-04-07T18:44:18+00:00"
},
{
"name": "doctrine/inflector",
@@ -854,22 +856,67 @@
"homepage": "http://laravel.com",
"time": "2016-08-05T14:49:58+00:00"
},
+ {
+ "name": "illuminate/translation",
+ "version": "v5.2.45",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/illuminate/translation.git",
+ "reference": "19247e4194e110d2d37713709e0e4b8bd0cae620"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/illuminate/translation/zipball/19247e4194e110d2d37713709e0e4b8bd0cae620",
+ "reference": "19247e4194e110d2d37713709e0e4b8bd0cae620",
+ "shasum": ""
+ },
+ "require": {
+ "illuminate/filesystem": "5.2.*",
+ "illuminate/support": "5.2.*",
+ "php": ">=5.5.9",
+ "symfony/translation": "2.8.*|3.0.*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.2-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Illuminate\\Translation\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Taylor Otwell",
+ "email": "taylor@laravel.com"
+ }
+ ],
+ "description": "The Illuminate Translation package.",
+ "homepage": "http://laravel.com",
+ "time": "2016-08-01T13:49:14+00:00"
+ },
{
"name": "nesbot/carbon",
- "version": "1.23.0",
+ "version": "1.27.0",
"source": {
"type": "git",
"url": "https://github.com/briannesbitt/Carbon.git",
- "reference": "4a874a39b2b00d7e0146cd46fab6f47c41ce9e65"
+ "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4a874a39b2b00d7e0146cd46fab6f47c41ce9e65",
- "reference": "4a874a39b2b00d7e0146cd46fab6f47c41ce9e65",
+ "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ef81c39b67200dcd7401c24363dcac05ac3a4fe9",
+ "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9",
"shasum": ""
},
"require": {
- "php": ">=5.3.0",
+ "php": ">=5.3.9",
"symfony/translation": "~2.6 || ~3.0 || ~4.0"
},
"require-dev": {
@@ -877,14 +924,9 @@
"phpunit/phpunit": "^4.8.35 || ^5.7"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.23-dev"
- }
- },
"autoload": {
"psr-4": {
- "Carbon\\": "src/Carbon/"
+ "": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -905,20 +947,20 @@
"datetime",
"time"
],
- "time": "2018-02-28T09:22:05+00:00"
+ "time": "2018-04-23T09:02:57+00:00"
},
{
"name": "paragonie/random_compat",
- "version": "v1.4.2",
+ "version": "v1.4.3",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
- "reference": "965cdeb01fdcab7653253aa81d40441d261f1e66"
+ "reference": "9b3899e3c3ddde89016f576edb8c489708ad64cd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/random_compat/zipball/965cdeb01fdcab7653253aa81d40441d261f1e66",
- "reference": "965cdeb01fdcab7653253aa81d40441d261f1e66",
+ "url": "https://api.github.com/repos/paragonie/random_compat/zipball/9b3899e3c3ddde89016f576edb8c489708ad64cd",
+ "reference": "9b3899e3c3ddde89016f576edb8c489708ad64cd",
"shasum": ""
},
"require": {
@@ -953,7 +995,7 @@
"pseudorandom",
"random"
],
- "time": "2017-03-13T16:22:52+00:00"
+ "time": "2018-04-04T21:48:54+00:00"
},
{
"name": "phroute/phroute",
@@ -1048,16 +1090,16 @@
},
{
"name": "symfony/console",
- "version": "v3.4.5",
+ "version": "v3.4.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "067339e9b8ec30d5f19f5950208893ff026b94f7"
+ "reference": "5b1fdfa8eb93464bcc36c34da39cedffef822cdf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/067339e9b8ec30d5f19f5950208893ff026b94f7",
- "reference": "067339e9b8ec30d5f19f5950208893ff026b94f7",
+ "url": "https://api.github.com/repos/symfony/console/zipball/5b1fdfa8eb93464bcc36c34da39cedffef822cdf",
+ "reference": "5b1fdfa8eb93464bcc36c34da39cedffef822cdf",
"shasum": ""
},
"require": {
@@ -1078,7 +1120,7 @@
"symfony/process": "~3.3|~4.0"
},
"suggest": {
- "psr/log": "For using the console logger",
+ "psr/log-implementation": "For using the console logger",
"symfony/event-dispatcher": "",
"symfony/lock": "",
"symfony/process": ""
@@ -1113,20 +1155,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2018-02-26T15:46:28+00:00"
+ "time": "2018-04-30T01:22:56+00:00"
},
{
"name": "symfony/debug",
- "version": "v4.0.5",
+ "version": "v4.0.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "1721e4e7effb23480966690cdcdc7d2a4152d489"
+ "reference": "e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/1721e4e7effb23480966690cdcdc7d2a4152d489",
- "reference": "1721e4e7effb23480966690cdcdc7d2a4152d489",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e",
+ "reference": "e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e",
"shasum": ""
},
"require": {
@@ -1169,7 +1211,7 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2018-02-28T21:50:02+00:00"
+ "time": "2018-04-30T16:59:37+00:00"
},
{
"name": "symfony/finder",
@@ -1222,16 +1264,16 @@
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.7.0",
+ "version": "v1.8.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b"
+ "reference": "3296adf6a6454a050679cde90f95350ad604b171"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b",
- "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
+ "reference": "3296adf6a6454a050679cde90f95350ad604b171",
"shasum": ""
},
"require": {
@@ -1243,7 +1285,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.7-dev"
+ "dev-master": "1.8-dev"
}
},
"autoload": {
@@ -1277,38 +1319,34 @@
"portable",
"shim"
],
- "time": "2018-01-30T19:27:44+00:00"
+ "time": "2018-04-26T10:06:28+00:00"
},
{
"name": "symfony/translation",
- "version": "v4.0.5",
+ "version": "v3.0.9",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938"
+ "reference": "eee6c664853fd0576f21ae25725cfffeafe83f26"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/e20a9b7f9f62cb33a11638b345c248e7d510c938",
- "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/eee6c664853fd0576f21ae25725cfffeafe83f26",
+ "reference": "eee6c664853fd0576f21ae25725cfffeafe83f26",
"shasum": ""
},
"require": {
- "php": "^7.1.3",
+ "php": ">=5.5.9",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
- "symfony/config": "<3.4",
- "symfony/dependency-injection": "<3.4",
- "symfony/yaml": "<3.4"
+ "symfony/config": "<2.8"
},
"require-dev": {
"psr/log": "~1.0",
- "symfony/config": "~3.4|~4.0",
- "symfony/dependency-injection": "~3.4|~4.0",
- "symfony/finder": "~2.8|~3.0|~4.0",
- "symfony/intl": "~3.4|~4.0",
- "symfony/yaml": "~3.4|~4.0"
+ "symfony/config": "~2.8|~3.0",
+ "symfony/intl": "~2.8|~3.0",
+ "symfony/yaml": "~2.8|~3.0"
},
"suggest": {
"psr/log": "To use logging capability in translator",
@@ -1318,7 +1356,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-master": "3.0-dev"
}
},
"autoload": {
@@ -1345,7 +1383,7 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
- "time": "2018-02-22T10:50:29+00:00"
+ "time": "2016-07-30T07:22:48+00:00"
},
{
"name": "twig/extensions",
@@ -1405,16 +1443,16 @@
},
{
"name": "twig/twig",
- "version": "v2.4.5",
+ "version": "v2.4.8",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "43b23931c606aa6d6a91ca47d9f7570633351a6c"
+ "reference": "7b604c89da162034bdf4bb66310f358d313dd16d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/43b23931c606aa6d6a91ca47d9f7570633351a6c",
- "reference": "43b23931c606aa6d6a91ca47d9f7570633351a6c",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/7b604c89da162034bdf4bb66310f358d313dd16d",
+ "reference": "7b604c89da162034bdf4bb66310f358d313dd16d",
"shasum": ""
},
"require": {
@@ -1423,8 +1461,8 @@
},
"require-dev": {
"psr/container": "^1.0",
- "symfony/debug": "~2.7",
- "symfony/phpunit-bridge": "~3.3@dev"
+ "symfony/debug": "^2.7",
+ "symfony/phpunit-bridge": "^3.3"
},
"type": "library",
"extra": {
@@ -1467,7 +1505,7 @@
"keywords": [
"templating"
],
- "time": "2018-03-03T01:41:58+00:00"
+ "time": "2018-04-02T09:24:19+00:00"
}
],
"packages-dev": [],
diff --git a/database/2018_05_15_165421_add_default_language.php b/database/2018_05_15_165421_add_default_language.php
new file mode 100644
index 0000000..a52d24f
--- /dev/null
+++ b/database/2018_05_15_165421_add_default_language.php
@@ -0,0 +1,37 @@
+table('users', function (Blueprint $table) {
+ $table->string('lang', 2)
+ ->default('en');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ $schema = DB::getSchemaBuilder();
+
+ $schema->table('users', function (Blueprint $table) {
+ $table->dropColumn('lang');
+ });
+ }
+}
diff --git a/public/index.php b/public/index.php
index 0d2bfa5..211d7ab 100644
--- a/public/index.php
+++ b/public/index.php
@@ -24,6 +24,8 @@
);
ConsoleAuth::check();
+Translation::init();
+
// Set base variables
$templateBases = [
'ctr',
diff --git a/resources/lang/en/community.php b/resources/lang/en/community.php
new file mode 100644
index 0000000..c253ab3
--- /dev/null
+++ b/resources/lang/en/community.php
@@ -0,0 +1,74 @@
+ [
+ 'header' => [
+ 'desc' => 'Check out the communities for games that you play or games that you\'re curious about!',
+ 'title' => 'Communities',
+ ],
+ 'favorites' => 'Favorite Communities',
+ 'search' => [
+ 'desc' => 'Search Communities',
+ 'name' => 'Search',
+ ],
+ 'communities' => [
+ 'filter' => [
+ 'name' => 'Filter',
+ 'select' => 'Please make a selection.',
+ 'options' => [
+ 'all' => 'All Software',
+ 'games' => ':console Games',
+ 'vc' => 'Virtual Console',
+ 'other' => 'Others',
+ ],
+ ],
+ 'new' => 'New Communities',
+ 'special' => 'Special',
+ 'platforms' => [
+ '3ds' => '3DS Games',
+ 'wiiu' => 'Wii U Games',
+ 'wiiu-3ds' => 'Wii U Games・3DS Games',
+ 'switch' => 'Switch Games',
+ 'switch-wiiu' => 'Switch Games・Wii U Games',
+ 'wii' => 'Wii Games',
+ 'ds' => 'DS Games',
+ 'wii-ds' => 'Wii Games・DS Games',
+ 'special' => 'Special Community',
+ ],
+ 'empty' => 'There are no communities in this category.',
+ 'more' => 'Show More',
+ ],
+ 'footer' => [
+ 'console' => ':console Communities',
+ ],
+ ],
+
+ 'listing' => [
+ 'filter' => [
+ 'name' => 'Filter',
+ 'select' => 'Please make a selection.',
+ 'options' => [
+ 'all' => 'All Software',
+ 'games' => ':console Games',
+ 'vc' => 'Virtual Console',
+ 'other' => 'Others',
+ ],
+ ],
+ 'communities' => [
+ 'platforms' => [
+ '3ds' => '3DS Games',
+ 'wiiu' => 'Wii U Games',
+ 'wiiu-3ds' => 'Wii U Games・3DS Games',
+ 'switch' => 'Switch Games',
+ 'switch-wiiu' => 'Switch Games・Wii U Games',
+ 'wii' => 'Wii Games',
+ 'ds' => 'DS Games',
+ 'wii-ds' => 'Wii Games・DS Games',
+ ],
+ 'empty' => 'There are no communities in this category.',
+ ],
+ ],
+];
\ No newline at end of file
diff --git a/resources/lang/en/errors.php b/resources/lang/en/errors.php
new file mode 100644
index 0000000..5fd5109
--- /dev/null
+++ b/resources/lang/en/errors.php
@@ -0,0 +1,16 @@
+ [
+ 'title' => 'Error',
+ 'desc' => 'The screen could not be displayed.',
+ ],
+
+ '404' => [
+ 'title' => 'Error',
+ 'desc' => 'The screen could not be displayed.',
+ ],
+];
\ No newline at end of file
diff --git a/resources/lang/en/gate.php b/resources/lang/en/gate.php
new file mode 100644
index 0000000..b64c672
--- /dev/null
+++ b/resources/lang/en/gate.php
@@ -0,0 +1,41 @@
+ [
+ 'controls' => [
+ 'back' => 'Back',
+ 'close' => 'Close',
+ 'next' => 'Next',
+ ],
+ 'intro' => [
+ 'title' => 'Welcome to :name!',
+ 'message' => ':name lets you share your in-game experiences with people from all over the world.',
+ ],
+ 'about' => [
+ 'title' => 'About :name',
+ 'message1' => ':name is a recreation of Miiverse made by fans for fans.',
+ 'message2' => 'Since this is a recreation, it may not have the same features as the defunct Miiverse and we\'re working on making them available as soon as possible.',
+ ],
+ 'config' => [
+ 'title' => 'Configuring your :name Account',
+ 'message' => 'We need some data from you before you can start using :name.',
+ 'display_name' => 'Display Name',
+ 'nnid' => 'Nintendo Network ID',
+ 'nnid_label' => 'We use your Nintendo Network ID to fetch your Mii image.',
+ ],
+ 'finish' => [
+ 'title' => 'Have fun in :name!',
+ 'start' => 'Start',
+ ],
+ ],
+
+ 'welcome_guest' => [
+ 'title' => ':name is a gaming community that connects people from all over the world using Mii characters.
Use :name to share your gaming experiences and meet people from around the world.',
+ 'message' => 'You will need a Nintendo Network ID in order to create posts or create a profile. Select Link ID to link a new or existing ID.',
+ 'link' => 'Link ID',
+ 'exit' => 'Exit',
+ ],
+];
\ No newline at end of file
diff --git a/resources/views/ctr/community/index.twig b/resources/views/ctr/community/index.twig
index 48e7bef..5dcadd5 100644
--- a/resources/views/ctr/community/index.twig
+++ b/resources/views/ctr/community/index.twig
@@ -5,23 +5,23 @@
There are no communities in this category.
+{{ __('community.index.communities.empty') }}
There are no communities in this category.
+{{ __('community.index.communities.empty') }}
There are no communities in this category.
+{{ __('community.listing.communities.empty') }}
The screen could not be displayed.
-{{ __('errors.403.desc') }}
+The screen could not be displayed.
+{{ __('errors.404.desc') }}