Changed language display on client to Indonesia/Indonesian

This commit is contained in:
Gregorio Chiko Putra 2017-09-08 14:51:16 +07:00
parent 7edda5c225
commit 29cfda5ba0
11 changed files with 43 additions and 44 deletions

View File

@ -29,7 +29,7 @@ class Home
public function login() public function login()
{ {
if (Session::exists('userid')) { if (Session::exists('userid')) {
Session::flash('info', 'You already logged in'); Session::flash('info', 'Anda telah masuk.');
Redirect::to('/'); Redirect::to('/');
} else { } else {
View::render('Access/login.html', [ View::render('Access/login.html', [
@ -40,14 +40,14 @@ class Home
public function logout() { public function logout() {
if ($this->delete() != true) { if ($this->delete() != true) {
$info = "There's an error. Please try again."; $info = "Terjadi kesalahan. Silahkan coba lagi dalam beberapa saat.";
} else { } else {
Session::delete('userid'); Session::delete('userid');
Session::delete('username'); Session::delete('username');
Session::delete('full_name'); Session::delete('full_name');
Session::delete('privilage'); Session::delete('privilage');
$info = "Logged out success"; $info = "Berhasil keluar.";
} }
Session::flash('info', $info); Session::flash('info', $info);
Redirect::to('/'); Redirect::to('/');
@ -69,7 +69,7 @@ class Home
{ {
foreach ($args as $value) { foreach ($args as $value) {
if ($value == '') { if ($value == '') {
Session::flash('info', 'All data must not be empty'); Session::flash('info', 'Semua data harus diisi.');
Redirect::to('/'); Redirect::to('/');
die(); die();
} }
@ -92,7 +92,7 @@ class Home
$data = $this->access->showAll($table); $data = $this->access->showAll($table);
foreach ($data as $users) { foreach ($data as $users) {
if ($args['username'] == $users['username']) { if ($args['username'] == $users['username']) {
Session::flash('info', 'Username already exists'); Session::flash('info', 'Username telah digunakan. Silahkan gunakan username lain.');
Redirect::to('./register'); Redirect::to('./register');
die(); die();
} }
@ -113,16 +113,16 @@ class Home
['username', '=', $username] ['username', '=', $username]
]); ]);
if ($user == false) { if ($user == false) {
$info = "Invalid username/password"; $info = "Username/password salah.";
} else { } else {
$hash = Hash::compare($password, $user['salt'], $user['password']); $hash = Hash::compare($password, $user['salt'], $user['password']);
if ($hash == true) { if ($hash == true) {
if ($user['max_user'] <= 0) { if ($user['max_user'] <= 0) {
$info = "Max user reached!"; $info = "Telah mencapai maksimal user yang diizinkan. Silahkan logout pada perangkat lain terlebih dahulu.";
} else { } else {
if ($this->access->update($table, ['status' => 1], $user['id']) != true) { if ($this->access->update($table, ['status' => 1], $user['id']) != true) {
$info = "There's an error. Please try again."; $info = "Terjadi kesalahan. Silahkan coba lagi dalam beberapa saat.";
} else { } else {
$max_user = $user['max_user'] - 1; $max_user = $user['max_user'] - 1;
if ($this->access->update($table, ['max_user' => $max_user], $user['id']) == true) { if ($this->access->update($table, ['max_user' => $max_user], $user['id']) == true) {
@ -131,7 +131,7 @@ class Home
Session::put('full_name', $user['full_name']); Session::put('full_name', $user['full_name']);
Session::put('privilage', $user['privilage']); Session::put('privilage', $user['privilage']);
$info = "Logged in success"; $info = "Berhasil masuk";
} }
} }
} }

View File

@ -183,7 +183,7 @@ class Posts
foreach ($args as $value) { foreach ($args as $value) {
if ($value == '') { if ($value == '') {
Session::flash('info', 'All data must not be empty'); Session::flash('info', 'Semua data harus diisi.');
if ($this->table == 'pengumuman') { if ($this->table == 'pengumuman') {
Redirect::to('/posts/entry'); Redirect::to('/posts/entry');
} elseif ($this->table == 'kategori') { } elseif ($this->table == 'kategori') {
@ -194,7 +194,7 @@ class Posts
} }
if ($this->post->entry($this->table, $args)) { if ($this->post->entry($this->table, $args)) {
Session::flash('info', 'Data successfuly uploaded'); Session::flash('info', 'Data berhasil diunggah.');
if ($this->table == 'kategori') { if ($this->table == 'kategori') {
Redirect::to('/posts/category'); Redirect::to('/posts/category');
@ -229,7 +229,7 @@ class Posts
]; ];
if ($old_data == $new_data) { if ($old_data == $new_data) {
Session::flash('info', 'Data must not be same'); Session::flash('info', 'Tidak ada data yang diubah.');
Redirect::to("./$id"); Redirect::to("./$id");
die(); die();
} }
@ -242,10 +242,10 @@ class Posts
} }
if ($this->post->update($this->table, $args, $id)) { if ($this->post->update($this->table, $args, $id)) {
Session::flash('info', 'Data successfuly updated'); Session::flash('info', 'Data berhasil diperbarui.');
Redirect::to('/'); Redirect::to('/');
} else { } else {
Session::flash('info', 'Data cannot be uploaded'); Session::flash('info', 'Terjadi kesalahan. Silahkan coba lagi dalam beberapa saat.');
Redirect::to("./$id"); Redirect::to("./$id");
} }
} }
@ -260,7 +260,7 @@ class Posts
$id = $args['id']; $id = $args['id'];
if ($this->post->delete($this->table, $id)) { if ($this->post->delete($this->table, $id)) {
Session::flash('info', 'Data successfuly removed'); Session::flash('info', 'Data berhasil di nonaktifkan');
if ($this->table = 'kategori') { if ($this->table = 'kategori') {
Redirect::to('/posts/category'); Redirect::to('/posts/category');

View File

@ -1,18 +1,18 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}Login{% endblock %} {% block title %}Masuk{% endblock %}
{% block body %} {% block body %}
<form method="post"> <form method="post">
<h2>Login</h2> <h2>Login</h2>
<label for="username">Username: </label> <label for="username">Username: </label>
<input type="text" name="username" value="" placeholder="Type your username" maxlength="25" autocomplete="off"> <input type="text" name="username" value="" placeholder="Tulis username" maxlength="25" autocomplete="off">
<br> <br>
<label for="password">Password: </label> <label for="password">Password: </label>
<input type="password" name="password" value="" placeholder="Type your password"> <input type="password" name="password" value="" placeholder="Tulis password">
<input type="hidden" name="_method" value="put"> <input type="hidden" name="_method" value="put">
@ -20,6 +20,6 @@
<br> <br>
<button type="submit">Login</button> <button type="submit">Masuk</button>
</form> </form>
{% endblock %} {% endblock %}

View File

@ -7,17 +7,17 @@
<h2>Registrasi</h2> <h2>Registrasi</h2>
<label for="full_name">Nama Lengkap: </label> <label for="full_name">Nama Lengkap: </label>
<input type="text" name="full_name" value="" placeholder="Type your name" maxlength="50" autocomplete="off"> <input type="text" name="full_name" value="" placeholder="Tulis nama anda" maxlength="50" autocomplete="off">
<br> <br>
<label for="username">Username: </label> <label for="username">Username: </label>
<input type="text" name="username" value="" placeholder="Type your username" maxlength="25" autocomplete="off"> <input type="text" name="username" value="" placeholder="Tulis username" maxlength="25" autocomplete="off">
<br> <br>
<label for="password">Password: </label> <label for="password">Password: </label>
<input type="password" name="password" value="" placeholder="Type your password"> <input type="password" name="password" value="" placeholder="Tulis password">
<input type="hidden" name="_method" value="post"> <input type="hidden" name="_method" value="post">

View File

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}Edit Pengumuman{% endblock %} {% block title %}Ubah Pengumuman{% endblock %}
{% block body %} {% block body %}
<form method="post"> <form method="post">
@ -57,7 +57,7 @@
<label>Diubah pada: </label> <label>Diubah pada: </label>
<span> <span>
{% if post.edited_at is empty %} {% if post.edited_at is empty %}
Tidak pernah -
{% else %} {% else %}
{{ post.edited_at }} {{ post.edited_at }}
{% endif %} {% endif %}
@ -105,7 +105,7 @@
disabled disabled
{% endif %} {% endif %}
> >
Edit Ubah
</button> </button>
</form> </form>
@ -119,7 +119,7 @@
<!-- Token --> <!-- Token -->
<input type="hidden" name="_token" value="{{ token }}"> <input type="hidden" name="_token" value="{{ token }}">
<button type="submit">Nonaktif</button> <button type="submit">Nonaktifkan</button>
</form> </form>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@ -15,17 +15,17 @@
<br> <br>
<label for="expired_at">Berlaku dari</label> <label for="expired_at">Berlaku dari: </label>
<input type="date" name="valid_at" value="{{ timestamp }}"> <input type="date" name="valid_at" value="{{ timestamp }}">
<br> <br>
<label for="expired_at">Berlaku sampai</label> <label for="expired_at">Berlaku sampai: </label>
<input type="date" name="expired_at" value="{{ timestamp }}"> <input type="date" name="expired_at" value="{{ timestamp }}">
<br> <br>
<label for="content">Konten</label> <label for="content">Konten: </label>
<textarea name="content" rows="3" cols="30" maxlength="255"></textarea> <textarea name="content" rows="3" cols="30" maxlength="255"></textarea>
<input type="hidden" name="creator" value="{{ user }}"> <input type="hidden" name="creator" value="{{ user }}">
@ -41,6 +41,6 @@
<br> <br>
<button type="submit">Entry</button> <button type="submit">Unggah</button>
</form> </form>
{% endblock %} {% endblock %}

View File

@ -13,14 +13,14 @@
<input type="hidden" name="_addon" value="kategori"> <input type="hidden" name="_addon" value="kategori">
<input type="hidden" name="_token" value="{{ token }}"> <input type="hidden" name="_token" value="{{ token }}">
<button type="submit">Remove</button> <button type="submit">Nonaktifkan</button>
</form> </form>
</li><br> </li><br>
{% endfor %} {% endfor %}
</ul> </ul>
<form method="post"> <form method="post">
<label for="category">Tambah</label> <label for="category">Nama Kategori: </label>
<input type="text" name="category" value="" placeholder="Kategori"> <input type="text" name="category" value="" placeholder="Kategori">
<input type="hidden" name="_method" value="post"> <input type="hidden" name="_method" value="post">
@ -29,7 +29,7 @@
<input type="hidden" name="_token" value="{{ token }}"> <input type="hidden" name="_token" value="{{ token }}">
<button type="submit">Entry</button> <button type="submit">Tambah</button>
</form> </form>
</form> </form>

View File

@ -29,6 +29,6 @@
{% if status %} {% if status %}
<a href="/posts/entry">+ Tambah Pengumuman</a> <a href="/posts/entry">+ Tambah Pengumuman</a>
<a href="/posts/category">+ Tambah Kategori</a> <a href="/posts/category">+ Tambah Kategori</a>
<a href="/logout">Logout</a> <a href="/logout">Keluar</a>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@ -1,11 +1,10 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}Sorry :-({% endblock %} {% block title %}Maaf, terjadi kesalahan :'({% endblock %}
{% block body %} {% block body %}
<h2>URL not found - Error 404</h2> <h2>404 - Halaman tidak ditemukan</h2>
Cannot specify the requested URL. Checking typo ...<br> Tidak dapat menemukan halaman yang anda cari.<br>
<span style="font-size: small;">Sshh! No typos.</span>
{% endblock %} {% endblock %}

View File

@ -1,10 +1,10 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}Sorry :-({% endblock %} {% block title %}Maaf, terjadi kesalahan :'({% endblock %}
{% block body %} {% block body %}
<h2>Invalid Token</h2> <h2>498 - Token tidak berlaku</h2>
Your token is no longer valid. Please try again.<br> Token anda sudah tidak berlaku. Silahkan coba lagi.<br>
{% endblock %} {% endblock %}

View File

@ -1,10 +1,10 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}Sorry :-({% endblock %} {% block title %}Maaf, terjadi kesalahan :'({% endblock %}
{% block body %} {% block body %}
<h2>Aw, crap!</h2> <h2>500 - Kesalahan Server</h2>
We couldn't get what you want. Please come back home. Terjadi masalah pada server. Silahkan coba dalam beberapa saat, atau hubungi admin.
{% endblock %} {% endblock %}