Added lang tests and update export text keys

This commit is contained in:
Dan Brown 2017-03-05 15:10:06 +00:00
parent 9b35aa42a2
commit d4e790d3cf
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
10 changed files with 59 additions and 38 deletions

View File

@ -26,6 +26,10 @@ return [
'no_pages_viewed' => 'Sie haben bisher keine Seiten angesehen.',
'no_pages_recently_created' => 'Sie haben bisher keine Seiten angelegt.',
'no_pages_recently_updated' => 'Sie haben bisher keine Seiten aktualisiert.',
'export' => 'Exportieren',
'export_html' => 'HTML-Datei',
'export_pdf' => 'PDF-Datei',
'export_text' => 'Text-Datei',
/**
* Permissions and restrictions
@ -160,10 +164,6 @@ return [
'pages_revisions_preview' => 'Vorschau',
'pages_revisions_restore' => 'Zurück sichern',
'pages_revisions_none' => 'Diese Seite hat keine älteren Versionen.',
'pages_export' => 'Exportieren',
'pages_export_html' => 'HTML-Datei',
'pages_export_pdf' => 'PDF-Datei',
'pages_export_text' => 'Text-Datei',
'pages_copy_link' => 'Link kopieren',
'pages_permissions_active' => 'Seiten-Berechtigungen aktiv',
'pages_initial_revision' => 'Erste Veröffentlichung',

View File

@ -26,6 +26,10 @@ return [
'no_pages_viewed' => 'You have not viewed any pages',
'no_pages_recently_created' => 'No pages have been recently created',
'no_pages_recently_updated' => 'No pages have been recently updated',
'export' => 'Export',
'export_html' => 'Contained Web File',
'export_pdf' => 'PDF File',
'export_text' => 'Plain Text File',
/**
* Permissions and restrictions
@ -161,10 +165,6 @@ return [
'pages_revisions_preview' => 'Preview',
'pages_revisions_restore' => 'Restore',
'pages_revisions_none' => 'This page has no revisions',
'pages_export' => 'Export',
'pages_export_html' => 'Contained Web File',
'pages_export_pdf' => 'PDF File',
'pages_export_text' => 'Plain Text File',
'pages_copy_link' => 'Copy Link',
'pages_permissions_active' => 'Page Permissions Active',
'pages_initial_revision' => 'Initial publish',

View File

@ -26,6 +26,10 @@ return [
'no_pages_viewed' => 'Ud. no ha visto ninguna página',
'no_pages_recently_created' => 'Ninguna página ha sido creada recientemente',
'no_pages_recently_updated' => 'Ninguna página ha sido actualizada recientemente',
'export' => 'Export',
'export_html' => 'Contained Web File',
'export_pdf' => 'PDF File',
'export_text' => 'Plain Text File',
/**
* Permissions and restrictions
@ -127,7 +131,7 @@ return [
'pages_delete_confirm' => 'Está ud. seguro de borrar esta página ?',
'pages_delete_draft_confirm' => 'Está ud. seguro de que desea borrar este borrador de página?',
'pages_editing_named' => 'Editando página :pageName',
'pages_edit_toggle_header' => 'Toggle T<EFBFBD>tulo',
'pages_edit_toggle_header' => 'Toggle Título',
'pages_edit_save_draft' => 'Guardar borrador',
'pages_edit_draft' => 'Editar borrador de página',
'pages_editing_draft' => 'Editando borrador',
@ -139,7 +143,7 @@ return [
'pages_edit_enter_changelog_desc' => 'Introduzca una breve descripción de los cambios que ha realizado',
'pages_edit_enter_changelog' => 'Entrar en Changelog',
'pages_save' => 'Guardar página',
'pages_title' => 'T<EFBFBD>tulo de página',
'pages_title' => 'Título de página',
'pages_name' => 'Nombre de página',
'pages_md_editor' => 'Editor',
'pages_md_preview' => 'Preview',
@ -161,10 +165,6 @@ return [
'pages_revisions_preview' => 'Preview',
'pages_revisions_restore' => 'Restore',
'pages_revisions_none' => 'This page has no revisions',
'pages_export' => 'Export',
'pages_export_html' => 'Contained Web File',
'pages_export_pdf' => 'PDF File',
'pages_export_text' => 'Plain Text File',
'pages_copy_link' => 'Copy Link',
'pages_permissions_active' => 'Page Permissions Active',
'pages_initial_revision' => 'Initial publish',

View File

@ -26,6 +26,10 @@ return [
'no_pages_viewed' => 'Vous n\'avez rien visité récemment',
'no_pages_recently_created' => 'Aucune page créée récemment',
'no_pages_recently_updated' => 'Aucune page mise à jour récemment',
'export' => 'Exporter',
'export_html' => 'Fichiers web',
'export_pdf' => 'Fichier PDF',
'export_text' => 'Document texte',
/**
* Permissions and restrictions
@ -160,10 +164,6 @@ return [
'pages_revisions_preview' => 'Prévisualisation',
'pages_revisions_restore' => 'Restaurer',
'pages_revisions_none' => 'Cette page n\'a aucune révision',
'pages_export' => 'Exporter',
'pages_export_html' => 'Fichiers web',
'pages_export_pdf' => 'Fichier PDF',
'pages_export_text' => 'Document texte',
'pages_copy_link' => 'Copier le lien',
'pages_permissions_active' => 'Permissions de page actives',
'pages_initial_revision' => 'Publication initiale',

View File

@ -26,6 +26,10 @@ return [
'no_pages_viewed' => 'Je hebt nog niets bekeken',
'no_pages_recently_created' => 'Er zijn geen recent aangemaakte pagina\'s',
'no_pages_recently_updated' => 'Er zijn geen recente wijzigingen',
'export' => 'Exporteren',
'export_html' => 'Contained Web File',
'export_pdf' => 'PDF File',
'export_text' => 'Plain Text File',
/**
* Permissions and restrictions
@ -161,10 +165,6 @@ return [
'pages_revisions_preview' => 'Preview',
'pages_revisions_restore' => 'Herstellen',
'pages_revisions_none' => 'Deze pagina heeft geen revisies',
'pages_export' => 'Exporteren',
'pages_export_html' => 'Contained Web File',
'pages_export_pdf' => 'PDF File',
'pages_export_text' => 'Plain Text File',
'pages_copy_link' => 'Link Kopiëren',
'pages_permissions_active' => 'Pagina Permissies Actief',
'pages_initial_revision' => 'Eerste publicatie',

View File

@ -26,6 +26,10 @@ return [
'no_pages_viewed' => 'Você não visualizou nenhuma página',
'no_pages_recently_created' => 'Nenhuma página recentemente criada',
'no_pages_recently_updated' => 'Nenhuma página recentemente atualizada',
'export' => 'Exportar',
'export_html' => 'Arquivo Web Contained',
'export_pdf' => 'Arquivo PDF',
'export_text' => 'Arquivo Texto',
/**
* Permissions and restrictions
@ -161,10 +165,6 @@ return [
'pages_revisions_preview' => 'Preview',
'pages_revisions_restore' => 'Restaurar',
'pages_revisions_none' => 'Essa página não tem revisões',
'pages_export' => 'Exportar',
'pages_export_html' => 'Arquivo Web Contained',
'pages_export_pdf' => 'Arquivo PDF',
'pages_export_text' => 'Arquivo Texto',
'pages_copy_link' => 'Copia Link',
'pages_permissions_active' => 'Permissões de Página Ativas',
'pages_initial_revision' => 'Publicação Inicial',

View File

@ -11,11 +11,11 @@
<div class="col-sm-6">
<div class="action-buttons faded">
<span dropdown class="dropdown-container">
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>{{ trans('entities.pages_export') }}</div>
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>{{ trans('entities.export') }}</div>
<ul class="wide">
<li><a href="{{ $book->getUrl('/export/html') }}" target="_blank">{{ trans('entities.pages_export_html') }} <span class="text-muted float right">.html</span></a></li>
<li><a href="{{ $book->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.pages_export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
<li><a href="{{ $book->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.pages_export_text') }} <span class="text-muted float right">.txt</span></a></li>
<li><a href="{{ $book->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
<li><a href="{{ $book->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
<li><a href="{{ $book->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
</ul>
</span>
@if(userCan('page-create', $book))

View File

@ -11,11 +11,11 @@
<div class="col-sm-4 faded">
<div class="action-buttons">
<span dropdown class="dropdown-container">
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>{{ trans('entities.pages_export') }}</div>
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>{{ trans('entities.export') }}</div>
<ul class="wide">
<li><a href="{{ $chapter->getUrl('/export/html') }}" target="_blank">{{ trans('entities.pages_export_html') }} <span class="text-muted float right">.html</span></a></li>
<li><a href="{{ $chapter->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.pages_export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
<li><a href="{{ $chapter->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.pages_export_text') }} <span class="text-muted float right">.txt</span></a></li>
<li><a href="{{ $chapter->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
<li><a href="{{ $chapter->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
<li><a href="{{ $chapter->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
</ul>
</span>
@if(userCan('page-create', $chapter))

View File

@ -11,11 +11,11 @@
<div class="col-sm-6 faded">
<div class="action-buttons">
<span dropdown class="dropdown-container">
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>{{ trans('entities.pages_export') }}</div>
<div dropdown-toggle class="text-button text-primary"><i class="zmdi zmdi-open-in-new"></i>{{ trans('entities.export') }}</div>
<ul class="wide">
<li><a href="{{ $page->getUrl('/export/html') }}" target="_blank">{{ trans('entities.pages_export_html') }} <span class="text-muted float right">.html</span></a></li>
<li><a href="{{ $page->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.pages_export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
<li><a href="{{ $page->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.pages_export_text') }} <span class="text-muted float right">.txt</span></a></li>
<li><a href="{{ $page->getUrl('/export/html') }}" target="_blank">{{ trans('entities.export_html') }} <span class="text-muted float right">.html</span></a></li>
<li><a href="{{ $page->getUrl('/export/pdf') }}" target="_blank">{{ trans('entities.export_pdf') }} <span class="text-muted float right">.pdf</span></a></li>
<li><a href="{{ $page->getUrl('/export/plaintext') }}" target="_blank">{{ trans('entities.export_text') }} <span class="text-muted float right">.txt</span></a></li>
</ul>
</span>
@if(userCan('page-update', $page))

21
tests/LanguageTest.php Normal file
View File

@ -0,0 +1,21 @@
<?php namespace Tests;
class LanguageTest extends TestCase
{
public function test_js_endpoint_for_each_language() {
$langs = array_diff(scandir(resource_path('lang')), ['..', '.']);
$visibleKeys = ['common', 'components', 'entities', 'errors'];
$this->asEditor();
foreach ($langs as $lang) {
setting()->putUser($this->getEditor(), 'language', $lang);
$transResp = $this->get('/translations');
foreach ($visibleKeys as $key) {
$transResp->assertSee($key);
}
}
}
}