hinode icon indicating copy to clipboard operation
hinode copied to clipboard

[BUG] simple-datatables.load.js

Open d-oit opened this issue 1 year ago • 1 comments

Describe the bug

locale i18n labels not load of the simple-datatables.load.js

To reproduce

use table in lang de or nl on a hinode page

Expected behavior

i18n transalation

If applicable, a clear and concise description of what you expected to happen.

Log file

If applicable, add a copy of Hugo's log messages.

Screenshots

If applicable, add screenshots to help explain your problem.

Host environment

"name": "@gethinode/mod-simple-datatables", "version": "1.0.13",

Hugo environment

Additional context

https://fiduswriter.github.io/simple-datatables/documentation/Options

the tableOptions could not load - already used sortable, etc variable.

d-oit avatar Oct 01 '24 13:10 d-oit

@markdumay https://github.com/d-oit/mod-simple-datatables working version used:

https://github.com/gohugoio/hugo/issues/7202 

let tableOptions = { classes, tableRender, template not needed in my mind

workaround for labels - data-attribute labels https://d-oit.github.io/de/blog/free-basketball-live-streams/

d-oit avatar Oct 01 '24 17:10 d-oit

@markdumay

fix is in: https://github.com/d-oit/mod-simple-datatables

and

https://github.com/d-oit/hinode/blob/main/layouts/shortcodes/table.html

in this way, the i18n localization text is used based on the site.lang

Did you find an other solution, or should i create a PR with this?

Also include a nl compents.md with a table for lang tests

d-oit avatar Oct 10 '24 15:10 d-oit

@markdumay https://github.com/gethinode/mod-simple-datatables/pull/56

with the changes, the table.html in hinode could extend with the new data-table-attributes

d-oit avatar Oct 24 '24 10:10 d-oit

thanks @d-oit! I've merged the two PRs. The release is available here: https://github.com/gethinode/hinode/releases/tag/v0.27.8

markdumay avatar Oct 28 '24 06:10 markdumay