Added localization for Project Groups

This commit is contained in:
Dmitry Khomutov 2015-10-21 22:09:00 +06:00
parent b536f972c2
commit 708889af63
6 changed files with 32 additions and 11 deletions

View file

@ -14,6 +14,7 @@ use b8\Form;
use b8\Store;
use PHPCI\Controller;
use PHPCI\Model\ProjectGroup;
use PHPCI\Helper\Lang;
/**
* Project Controller - Allows users to create, edit and view projects.
@ -90,11 +91,11 @@ class GroupController extends Controller
$title = new Form\Element\Text('title');
$title->setContainerClass('form-group');
$title->setClass('form-control');
$title->setLabel('Group Title');
$title->setLabel(Lang::get('group_title'));
$title->setValue($group->getTitle());
$submit = new Form\Element\Submit();
$submit->setValue('Save Group');
$submit->setValue(Lang::get('group_save'));
$form->addField($title);
$form->addField($submit);

View file

@ -59,6 +59,7 @@ PHPCI',
'dashboard' => 'Dashboard',
'admin_options' => 'Admin Options',
'add_project' => 'Add Project',
'project_groups' => 'Project Groups',
'settings' => 'Settings',
'manage_users' => 'Manage Users',
'plugins' => 'Plugins',
@ -153,6 +154,15 @@ PHPCI',
<a href="https://bitbucket.org/%s/admin/services">
Services</a> section of your Bitbucket repository.',
// Project Groups
'group_projects' => 'Projects',
'group_edit' => 'Edit',
'group_delete' => 'Delete',
'group_add' => 'Add Group',
'group_add_edit' => 'Add / Edit Group',
'group_title' => 'Group Title',
'group_save' => 'Save Group',
// View Build
'errors' => 'Errors',
'information' => 'Information',

View file

@ -57,6 +57,7 @@ PHPCI',
'dashboard' => 'Панель управления',
'admin_options' => 'Меню администратора',
'add_project' => 'Добавить проект',
'project_groups' => 'Группы проектов',
'settings' => 'Настройки',
'manage_users' => 'Пользователи',
'plugins' => 'Плагины',
@ -147,12 +148,20 @@ PHPCI',
'webhooks_help_bitbucket' => 'Чтобы Автоматически собирать этот проект при публикации новых коммитов, добавьте URL ниже как "POST" сервис в разделе <a href="https://bitbucket.org/%s/admin/services">
Services</a> вашего Bitbucket репозитория.',
// Project Groups
'group_projects' => 'Проекты',
'group_edit' => 'Редактировать',
'group_delete' => 'Удалить',
'group_add' => 'Добавить группу',
'group_add_edit' => 'Добавить / изменить группу',
'group_title' => 'Название группы',
'group_save' => 'Сохранить группу',
// View Build
'build_x_not_found' => 'Сборки с ID %d не существует.',
'build_n' => 'Сборка %d',
'rebuild_now' => 'Пересобрать сейчас',
'committed_by_x' => 'Отправил %s',
'commit_id_x' => 'Коммит: %s',

View file

@ -1,6 +1,7 @@
<?php use PHPCI\Helper\Lang; ?>
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">Add / Edit Group</h3>
<h3 class="box-title"><?php Lang::out('group_add_edit'); ?></h3>
</div>
<div class="box-body">

View file

@ -1,20 +1,20 @@
<?php use PHPCI\Helper\Lang; ?>
<div class="clearfix" style="margin-bottom: 20px;">
<a class="btn btn-success pull-right" href="<?php print PHPCI_URL . 'group/edit'; ?>">
Add Group
<?php Lang::out('group_add'); ?>
</a>
</div>
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">Project Groups</h3>
<h3 class="box-title"><?php Lang::out('project_groups'); ?></h3>
</div>
<table class="table">
<thead>
<tr>
<th>Title</th>
<th style="width: 100px;">Projects</th>
<th style="width: 100px;"><?php Lang::out('group_projects'); ?></th>
<th style="width: 150px"></th>
</tr>
</thead>
@ -25,12 +25,12 @@
<td><?php print count($group['projects']); ?></td>
<td>
<a class="btn btn-sm btn-default" href="<?php print PHPCI_URL . 'group/edit/' . $group['id']; ?>">
Edit
<?php Lang::out('group_edit'); ?>
</a>
<?php if (!count($group['projects'])): ?>
<a class="btn btn-sm btn-danger delete-group" href="<?php print PHPCI_URL . 'group/delete/' . $group['id']; ?>">
Delete
<?php Lang::out('group_delete'); ?>
</a>
<?php endif; ?>
</td>

View file

@ -161,7 +161,7 @@
<li>
<a href="<?php print PHPCI_URL; ?>group">
<i class="fa fa-angle-double-right"></i> Project Groups
<i class="fa fa-angle-double-right"></i> <?php Lang::out('project_groups'); ?>
</a>
</li>