Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datatable nav terms translations #1451

Merged
merged 8 commits into from
Nov 24, 2016
Merged

Conversation

saulowulhynek
Copy link

Datatable nav terms translations

More Locatizations for 2.4.0. versions
reviewed
best form with spaces
best form
Changes added to translate dataTable nav terms following model of
FamilyList.php
@saulowulhynek saulowulhynek modified the milestone: 2.4.0 Nov 24, 2016
@crossan007 crossan007 changed the base branch from master to develop November 24, 2016 13:34
@@ -370,6 +370,22 @@
</a>
</div>

<script type="text/javascript">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while this will work It will end up initializing the DataTable twice - because you still have the "data-table" class assigned to the <table> DOM element.

I think the better solution would be to modify the DataTable initializer bound to the class so that all .data-table classed objects will include translation terms

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, i understand that it will call. I understand that your solution keep the system more organized, but it isn't working in the translation view point.
There are various .js with code to translation that not working as, for example, GroupView.php.
I think that we need talk about this because I don't know what i need make.
I see so many types of implementatios:

  1. all code in PHP and table render by DataTable - all translated
  2. table header terms in PHP and render and some processing in JS - table header translated and nav maybe
  3. all in JS and nothing in PHP - table header not translated and nav probabily no
  4. and all types above with "language" clause in php file (nav translated) and other with these clauses in .JS file (nav not translated)

See, for english user, it don't care because interface has the same efect. But, for translated user each interface appear with a diferent face.

Sorry, but it is terrible...

I found various issues about subject:

DataTables use in #227
datatable : Internationalisation plug-ins #1141 -> DataTables Navterms
Untranslated terms in 2.30-RC1: #1207 -> arround the title
Update DataTables to latest and include localization files #1237 -> To suport #1141 and #1207

I realy need a solution, a way that i can folow

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data-table class does not really do anything without the JS block... we don't have a common code for data classes as lots of the data-table have extra params and you can only init it once

responsive: true,
"dom": 'T<"clear">lfrtip',
"tableTools": {
"sSwfPath": "//cdn.datatables.net/tabletools/2.2.3/swf/copy_csv_xls_pdf.swf"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need the export :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, i don't understand ... i copied from FamilyList.php
I need study this more

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think no ...
Did tableTools refer to export?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"tableTools": {
 +        "sSwfPath": "//cdn.datatables.net/tabletools/2.2.3/swf/copy_csv_xls_pdf.swf"

will show the export to cvs xls or pdf

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, i don't need ... but i try exclude this part and translation don't work

@DawoudIO DawoudIO merged commit 77d61d0 into develop Nov 24, 2016
@DawoudIO DawoudIO deleted the DataTable-nav-terms-translations branch November 24, 2016 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants