From 71d313c576f7a846533c6ef1a010063a6c9ecafc Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Mon, 5 Nov 2018 18:49:11 +0000 Subject: Fix: #2019 - datatables text not translated --- resources/views/admin/fix-level-0-media.phtml | 7 +++++- resources/views/admin/webtrees1-thumbnails.phtml | 9 +++++++- resources/views/lists/datatables-attributes.phtml | 27 +++++++++++++++++++++++ resources/views/lists/notes-table.phtml | 2 +- resources/views/lists/repositories-table.phtml | 2 +- resources/views/lists/sources-table.phtml | 2 +- 6 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 resources/views/lists/datatables-attributes.phtml (limited to 'resources') diff --git a/resources/views/admin/fix-level-0-media.phtml b/resources/views/admin/fix-level-0-media.phtml index 1de0566893..9869aa2305 100644 --- a/resources/views/admin/fix-level-0-media.phtml +++ b/resources/views/admin/fix-level-0-media.phtml @@ -9,7 +9,12 @@

- +
+ data-ajax=" route('admin-fix-level-0-media-data')])) ?>" + data-server-side="true" +> diff --git a/resources/views/admin/webtrees1-thumbnails.phtml b/resources/views/admin/webtrees1-thumbnails.phtml index 3a88838c3a..391e4bf513 100644 --- a/resources/views/admin/webtrees1-thumbnails.phtml +++ b/resources/views/admin/webtrees1-thumbnails.phtml @@ -13,7 +13,14 @@

-
+
+ data-ajax=" route('admin-webtrees1-thumbs-data')])) ?>" + data-server-side="true" + data-sort="false" + data-auto-width="false" +> diff --git a/resources/views/lists/datatables-attributes.phtml b/resources/views/lists/datatables-attributes.phtml new file mode 100644 index 0000000000..8901f4f10c --- /dev/null +++ b/resources/views/lists/datatables-attributes.phtml @@ -0,0 +1,27 @@ + + +data-state-save="true" +data-language=" [ + /* I18N: A button label, first page */ + 'first' => I18N::translate('first'), + /* I18N: A button label, last page */ + 'last' => I18N::translate('last'), + /* I18N: A button label, next page */ + 'next' => I18N::translate('next'), + /* I18N: A button label, previous page */ + 'previous' => I18N::translate('previous'), + ], + 'emptyTable' => I18N::translate('No records to display'), + /* I18N: %s are placeholders for numbers */ + 'info' => I18N::translate('Showing %1$s to %2$s of %3$s', '_START_', '_END_', '_TOTAL_'), + 'infoEmpty' => I18N::translate('Showing %1$s to %2$s of %3$s', I18N::number(0), I18N::number(0), I18N::number(0)), + /* I18N: %s is a number */ + 'infoFiltered' => I18N::translate('(filtered from %s total entries)', '_MAX_'), + /* I18N: %s is a number of records per page */ + 'lengthMenu' => I18N::translate('Display %s', '_MENU_'), + 'loadingRecords' => I18N::translate('Loading…'), + 'processing' => I18N::translate('Calculating…'), + 'search' => I18N::translate('Filter'), + 'zeroRecords' => I18N::translate('No records to display'), +])) ?>" diff --git a/resources/views/lists/notes-table.phtml b/resources/views/lists/notes-table.phtml index 80573071fb..b075831034 100644 --- a/resources/views/lists/notes-table.phtml +++ b/resources/views/lists/notes-table.phtml @@ -21,6 +21,7 @@ $count_sources = Database::prepare(
data-columns=" array_sum($count_individuals) > 0], @@ -29,7 +30,6 @@ $count_sources = Database::prepare( ['visible' => array_sum($count_sources) > 0], ['visible' => (bool) $tree->getPreference('SHOW_LAST_CHANGE'), 'searchable' => false], ])) ?>" - data-state-save="true" >
diff --git a/resources/views/lists/repositories-table.phtml b/resources/views/lists/repositories-table.phtml index 4021c24d5c..d721378911 100644 --- a/resources/views/lists/repositories-table.phtml +++ b/resources/views/lists/repositories-table.phtml @@ -12,12 +12,12 @@ $count_sources = Database::prepare( data-columns=" array_sum($count_sources) > 0], ['visible' => (bool) $tree->getPreference('SHOW_LAST_CHANGE'), 'searchable' => false], ])) ?>" - data-state-save="true" >
diff --git a/resources/views/lists/sources-table.phtml b/resources/views/lists/sources-table.phtml index 874593eef7..0715a735ae 100644 --- a/resources/views/lists/sources-table.phtml +++ b/resources/views/lists/sources-table.phtml @@ -21,6 +21,7 @@ $count_notes = Database::prepare( data-columns=" array_sum($count_notes) > 0], ['visible' => (bool) $tree->getPreference('SHOW_LAST_CHANGE'), 'searchable' => false], ])) ?>" - data-state-save="true" >
-- cgit v1.3