Skip to content

Commit 1309a01

Browse files
committed
Merge branch 'development' into release
2 parents 0333185 + affae2e commit 1309a01

File tree

8 files changed

+113
-95
lines changed

8 files changed

+113
-95
lines changed

app/Http/Controllers/SettingController.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@ public function __construct(ImageRepo $imageRepo)
1919
}
2020

2121
/**
22-
* Display a listing of the settings.
22+
* Handle requests to the settings index path
2323
*/
24-
public function index(string $category)
24+
public function index()
25+
{
26+
return redirect('/settings/features');
27+
}
28+
29+
/**
30+
* Display the settings for the given category.
31+
*/
32+
public function category(string $category)
2533
{
2634
$this->ensureCategoryExists($category);
2735
$this->checkPermission('settings-manage');

composer.lock

Lines changed: 77 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/lang/pt/editor.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
'width' => 'Largura',
2525
'height' => 'Altura',
2626
'More' => 'Mais',
27-
'select' => 'Select...',
27+
'select' => 'Selecionar...',
2828

2929
// Toolbar
3030
'formats' => 'Formatos',
@@ -53,10 +53,10 @@
5353
'align_left' => 'Alinhar à esquerda',
5454
'align_center' => 'Alinhar ao centro',
5555
'align_right' => 'Alinhar à direita',
56-
'align_justify' => 'Justify',
56+
'align_justify' => 'Justificar',
5757
'list_bullet' => 'Lista com marcadores',
5858
'list_numbered' => 'Lista numerada',
59-
'list_task' => 'Task list',
59+
'list_task' => 'Lista de tarefas',
6060
'indent_increase' => 'Aumentar recuo',
6161
'indent_decrease' => 'Diminuir recuo',
6262
'table' => 'Tabela',
@@ -93,10 +93,10 @@
9393
'cell_properties_title' => 'Propriedades da Célula',
9494
'cell_type' => 'Tipo de célula',
9595
'cell_type_cell' => 'Célula',
96-
'cell_scope' => 'Scope',
96+
'cell_scope' => 'Âmbito',
9797
'cell_type_header' => 'Célula do cabeçalho',
98-
'merge_cells' => 'Merge cells',
99-
'split_cell' => 'Split cell',
98+
'merge_cells' => 'Unir células',
99+
'split_cell' => 'Dividir célula',
100100
'table_row_group' => 'Grupo de linhas',
101101
'table_column_group' => 'Grupo de colunas',
102102
'horizontal_align' => 'Alinhamento horizontal',
@@ -124,16 +124,16 @@
124124
'caption' => 'Legenda',
125125
'show_caption' => 'Mostrar legenda',
126126
'constrain' => 'Restringir proporções',
127-
'cell_border_solid' => 'Solid',
128-
'cell_border_dotted' => 'Dotted',
129-
'cell_border_dashed' => 'Dashed',
130-
'cell_border_double' => 'Double',
127+
'cell_border_solid' => 'Sólido',
128+
'cell_border_dotted' => 'Pontilhado',
129+
'cell_border_dashed' => 'Tracejado',
130+
'cell_border_double' => 'Dupla',
131131
'cell_border_groove' => 'Groove',
132132
'cell_border_ridge' => 'Ridge',
133-
'cell_border_inset' => 'Inset',
134-
'cell_border_outset' => 'Outset',
135-
'cell_border_none' => 'None',
136-
'cell_border_hidden' => 'Hidden',
133+
'cell_border_inset' => 'Interna',
134+
'cell_border_outset' => 'Externa',
135+
'cell_border_none' => 'Nenhuma',
136+
'cell_border_hidden' => 'Ocultada',
137137

138138
// Images, links, details/summary & embed
139139
'source' => 'Fonte',
@@ -154,7 +154,7 @@
154154
'toggle_label' => 'Alternar etiqueta',
155155

156156
// About view
157-
'about' => 'About the editor',
157+
'about' => 'Sobre o editor',
158158
'about_title' => 'Sobre o Editor WYSIWYG',
159159
'editor_license' => 'Editor da licença de direitos autorais',
160160
'editor_tiny_license' => 'Este editor é criado utilizando :tinyLink que é fornecido sob uma licença LGPL v2.1.',

resources/lang/pt/settings.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
'settings' => 'Configurações',
1111
'settings_save' => 'Guardar Configurações',
1212
'settings_save_success' => 'Configurações guardadas',
13-
'system_version' => 'System Version',
14-
'categories' => 'Categories',
13+
'system_version' => 'Versão do sistema',
14+
'categories' => 'Categorias',
1515

1616
// App Settings
1717
'app_customization' => 'Personalização',

resources/views/common/custom-head.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@inject('headContent', 'BookStack\Theming\CustomHtmlHeadContentProvider')
22

3-
@if(setting('app-custom-head') && \Route::currentRouteName() !== 'settings')
3+
@if(setting('app-custom-head') && !request()->routeIs('settings.category'))
44
<!-- Start: custom user content -->
55
{!! $headContent->forWeb() !!}
66
<!-- End: custom user content -->

routes/web.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@
265265
Route::delete('/settings/webhooks/{id}', [WebhookController::class, 'destroy']);
266266

267267
// Settings
268-
Route::redirect('/settings', '/settings/features')->name('settings');
269-
Route::get('/settings/{category}', [SettingController::class, 'index']);
268+
Route::get('/settings', [SettingController::class, 'index'])->name('settings');
269+
Route::get('/settings/{category}', [SettingController::class, 'category'])->name('settings.category');
270270
Route::post('/settings/{category}', [SettingController::class, 'update']);
271271
});
272272

tests/Settings/CustomHeadContentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function test_content_wrapped_in_specific_html_comments()
2626
public function test_configured_content_does_not_show_on_settings_page()
2727
{
2828
$this->setSettings(['app-custom-head' => '<script>console.log("cat");</script>']);
29-
$resp = $this->asAdmin()->get('/settings');
29+
$resp = $this->asAdmin()->get('/settings/features');
3030
$resp->assertDontSee('console.log("cat")', false);
3131
}
3232

tests/Settings/SettingsTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ public function test_settings_endpoint_redirects_to_settings_view()
1010
{
1111
$resp = $this->asAdmin()->get('/settings');
1212

13-
$resp->assertRedirect('/settings/features');
13+
$resp->assertStatus(302);
14+
15+
// Manually check path to ensure it's generated as the full path
16+
$location = $resp->headers->get('location');
17+
$this->assertEquals(url('/settings/features'), $location);
1418
}
1519

1620
public function test_settings_category_links_work_as_expected()

0 commit comments

Comments
 (0)