curiosum-dev / kanta

User-friendly translations manager for Elixir/Phoenix projects.
https://kanta.curiosum.com/kanta/dashboard
MIT License
182 stars 15 forks source link

Fails while rendering form at kanta/locales/:id/translations (+ missing documentation) #13

Closed djcoin closed 1 year ago

djcoin commented 1 year ago

Hi, thanks for the project!

I met it while browsing https://github.com/elixir-gettext/gettext/issues/280

I hit a bug while browsing locales (without any special configuration from my part), it comes from here : https://github.com/curiosum-dev/kanta/blob/main/lib/kanta_web/live/translations/translations_live/components/filters_bar/filters_bar.html.heex#L2

Indeed a form can't be rendered for a map which it is. I think everyone should hit this bug as it is straightforward so I'm not sure why it's still here (or I'm missing something), may be the code is not up to date?

On a side note, I tried to install the project but the documentation is not up to date, at least for the config :

It seems you had an example project at https://github.com/curiosum-dev/kanta-example-app, that would have helped, but it's not here anymore, did it move somewhere? Is the project still maintained?

Thanks a lot!

vi0dine commented 1 year ago

Hey @djcoin ! We are glad that you are interested in the project. It is in the early stages of development and there has actually been little time to deal with it lately, however, we are grateful for your submission, we will try to address the problem and update the documentation as soon as possible. As for the sample application, the repo should already be available :) We also have a deployed test application at https://kanta.munasoft.pl/ and I'm not able to reproduce the error you mentioned. It's possible that the branch develop actually fixes this bug but we'll check it further asap

djcoin commented 1 year ago

Hi @vi0dine thanks for your reply!

I managed to make the project work using the ravensiris branch which seemed the most up to date. I ended up w/ this in mix.exs :

{:kanta, git: "https://github.com/curiosum-dev/kanta.git", branch: "ravensiris"},
{:gettext, git: "https://github.com/bamorim/gettext.git", branch: "runtime-gettext", override: true},

So this specific case is not a problem anymore.

I'm disgressing but while we are at it, do you have any implementation idea or plan about this feature you listed in the README: "Gettext extract/merge automation" (the problem being the update/cleaning/preservation of translations in the database when translations gets updated in gettext). I didn't dive into the source code just yet, so I'm not sure how complex it may be. Thanks!