contributte / contributte/datagrid

Buttons with translated text issue

Open
#909 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
296
Forks
215
PR merge metrics
No merged PRs in 30d

Description

Hi, I have found this particularly annoying issue - I have datagrid set-up with Contribute/Translation and found out that in case I want to use action buttons without text, it keeps trying to find a empty string to translate, so I load 20 rows in datagrid, I have 40 missing empty strings for 2 buttons each row. So I thought I´ll just give it to him-made a admin.hidden: '' and added this to delete button. Sadly with that, it will add 2 or 3px whitespace after icon, so the icon is not centered and whole button looks ugly.

Is there any way around this issue? I didn´t find a way to turn off auto-translation just for the button. Is there a way to change template just for the buttons generally? To remove the space, or other way, close the name into span that I would be able to hide with display: none? I´ve tried few things with just css, but remove whitespace from there is not possible without totally broking the buttons.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing a datagrid with Contribute/Translation and icon-only action buttons across multiple rows, then inspect how button labels are translated and rendered. Done means empty labels no longer produce missing-translation entries and icon-only buttons remain visually centered without extra whitespace.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend, internationalization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.