Repository navigation
Multilingual SK: Translate table column label - #33901
Conversation
|
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
|
@samuelsov what needs to happen to move this forward? |
|
@colemanw The part done is working (SK table header is translated) but this is just not enough as it is:
My plan is to finish all this in December so that it's committed into 6.11 |
|
I did a new pass. I think we are good to go. A few notes:
|
| 'values' => [ | ||
| 'name' => 'AfAdmin_Submission_List', | ||
| 'label' => E::ts('Form Submissions'), | ||
| 'label' => 'Form Submissions', |
There was a problem hiding this comment.
This label is a database column, not part of the settings blob.
There was a problem hiding this comment.
Ok, I limited the search/replace to SavedSearch.mgd.php and kept the 'label' that are preceded by 'name' as is.
fd29648 to
94c468b
Compare
|
@colemanw Once civicrm/civistrings#25 is reviewed, I think we're good to go with this one ? |
|
@colemanw Ok,now that civicrm/civistrings#25 is merged, I've done a rebase and separated in 2 commits so that's easier to see the php code changes vs the mgd.php changes. Ideally, we need a fast merge to avoid having conflict with other mgd.php changes. |
|
@samuelsov we also need to change the code generator to not add |
Yes, I was thinking about that. I don't think it should block this PR but I'll try to fix that asap. |
Settings should not be translated as of civicrm/civicrm-core#33901 See civicrm/civicrm-core#35782 for a similar patch to the Api4 Explorer. - Introduced `excludeTs()` method to PhpData for skipping translation wrapping on specified keys and their children. - Updated tests to verify exclusion behavior with nested and multiple keys.
Followup conformance for #33901
Overview
First step towards multilingual SearchKit. This makes core SearchKit compatible with multilingual installation. Columns, links and buttons are translated as expected.
Before
The ts function in
.mgd.phpfiles is only used once to insert the data in the database. At runtime, there is no translation so this works ok for monolingual installation but not for multilingual.After
The ts are removed from the
.mgd.phpfiles and the translation is done at runtime in the API SearchDisplay::getComments
This is just a first step as we need to:
civicrm_admin_uiand maybe other extension shipped in core that usedE::tsinstead oftsE::tsin them.E::tsSavedSearch_Scheduled_Jobs_Log.mgd.php, where we havetsinrewrite