-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finalize almost all the translation system.
JS loading is next
- Loading branch information
Showing
8 changed files
with
362 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Miiverse\DB; | ||
|
||
class AddPostLanguages extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
$schema = DB::getSchemaBuilder(); | ||
|
||
$schema->table('posts', function (Blueprint $table) { | ||
$table->smallInteger('language')->default(1); | ||
}); | ||
|
||
// Edit user language column | ||
$schema->table('users', function (Blueprint $table) { | ||
$table->dropColumn('lang'); | ||
|
||
$table->smallInteger('language')->default(1); | ||
$table->smallInteger('post_language')->default(99); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
$schema = DB::getSchemaBuilder(); | ||
|
||
$schema->table('posts', function (Blueprint $table) { | ||
$table->dropColumn('language'); | ||
}); | ||
|
||
$schema->table('users', function (Blueprint $table) { | ||
$table->dropColumn('language'); | ||
$table->dropColumn('post_language'); | ||
|
||
$table->string('lang', 2)->default('en'); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
/* | ||
* Translation file for settings | ||
*/ | ||
|
||
return [ | ||
// Account settings | ||
'account' => [ | ||
'title' => ':name Settings', | ||
|
||
'display_language' => [ | ||
'title' => 'In what language you want :name to be displayed in?', | ||
'note' => 'Note: This setting does not affect what language posts are displayed in.', | ||
], | ||
|
||
'post_language' => [ | ||
'title' => 'In what language do you want to see posts in :name?', | ||
'note' => 'Note: This setting does not affect what language :name is displayed in.', | ||
|
||
'all_languages' => 'All Languages', | ||
], | ||
|
||
'submit' => 'Save Settings', | ||
], | ||
|
||
// Profile Settings | ||
'profile' => [ | ||
'title' => 'Profile Settings', | ||
|
||
// Profile Comment | ||
'comment' => [ | ||
'section_name' => 'Profile Comment', | ||
'placeholder' => 'Write about yourself here.', | ||
'note' => 'Attention', | ||
'note_content' => 'Please refrain from including any of the following information:<br> | ||
- Your address, telephone number, e-mail address, the name of your school, or any other information that could personally identify you. <br> | ||
- Links to external websites which could be used to contact you directly.<br> | ||
- Any other content prohibited by the :name Code of Conduct.<br> | ||
Posting such information is against the :name Code of Conduct and may result in your profile being hidden from the public.', | ||
], | ||
|
||
// Submit button | ||
'submit' => 'Save Settings', | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{% set class = 'setting-account' %} | ||
{% extends '@3ds/_master.twig' %} | ||
|
||
{% block content %} | ||
{% set name = config('general.name') %} | ||
<div id="header" class="icon-header"> | ||
<div id="header-body"> | ||
<h1 id="page-title"> | ||
<span>{{ __('settings.account.title', { name: name }) }}</span> | ||
</h1> | ||
</div> | ||
</div> | ||
|
||
<div class="body-content"> | ||
<div class="settings-list-content"> | ||
<form id="account-settings-form" class="setting-form" method="post" action="{{ route('settings.accountsave') }}"> | ||
<ul class="settings-list"> | ||
<li class="scroll"> | ||
<p class="settings-label"> | ||
<label for="select_language">{{ __('settings.account.display_language.title', { name: name }) }}</label> | ||
</p> | ||
<p class="note">{{ __('settings.account.display_language.note', { name: name }) }}</p> | ||
<div class="select-content"> | ||
<div class="select-button"> | ||
<span class="select-button-content">{{ selected_display_language }}</span> | ||
<select class="scroll-focus" name="language" id="select_language"> | ||
{% for language in display_languages %} | ||
<option value="{{ language.code }}"{% if language.selected %} selected=""{% endif %}>{{ language.title }}</option> | ||
{% endfor %} | ||
</select> | ||
</div> | ||
</div> | ||
</li> | ||
<li class="scroll"> | ||
<p class="settings-label"> | ||
<label for="select_visible_language">{{ __('settings.account.post_language.title', { name: name }) }}</label> | ||
</p> | ||
<p class="note">{{ __('settings.account.post_language.note', { name: name }) }}</p> | ||
<div class="select-content"> | ||
<div class="select-button"> | ||
<span class="select-button-content">{{ selected_post_language }}</span> | ||
<select class="scroll-focus" name="visible_language" id="select_visible_language"> | ||
{% for language in post_languages %} | ||
<option value="{{ language.code }}"{% if language.selected %} selected=""{% endif %}>{{ language.title }}</option> | ||
{% endfor %} | ||
</select> | ||
</div> | ||
</div> | ||
</li> | ||
<div class="form-buttons scroll"> | ||
<input type="submit" class="black-button apply-button scroll-focus" value="{{ __('settings.account.submit') }}"> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{% set class = 'setting-profile' %} | ||
{% extends '@3ds/_master.twig' %} | ||
|
||
{% block content %} | ||
{% set name = config('general.name') %} | ||
<div id="header" class="icon-header"> | ||
<div id="header-body"> | ||
<h1 id="page-title"><span>{{ __('settings.profile.title') }}</span></h1> | ||
</div> | ||
</div> | ||
<div class="body-content"> | ||
<div class="settings-list-content"> | ||
<form id="profile-settings-form" class="setting-form" method="post" action="{{ route('settings.profile') }}"> | ||
<ul class="display-name"></ul> | ||
<ul class="settings-list"> | ||
<li class="setting-profile-comment scroll"> | ||
<p class="settings-label">{{ __('settings.profile.comment.section_name') }}</p> | ||
<textarea id="profile-text" class="textarea scroll-focus" name="profile_comment" maxlength="400" placeholder="{{ __('settings.profile.comment.placeholder') }}"></textarea> | ||
<p class="note-attention">{{ __('settings.profile.comment.note') }}</p> | ||
<p class="note">{{ __('settings.profile.comment.note_content', { name: config('general.name') })|raw }}</p> | ||
</li> | ||
</ul> | ||
<div class="form-buttons scroll"> | ||
<input type="submit" class="black-button apply-button scroll-focus" value="{{ __('settings.profile.submit') }}"> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.