e-picsa / picsa-apps

Monorepo for building tools to support E-PICSA Apps
https://picsa.app
GNU General Public License v3.0
5 stars 1 forks source link

feat(dashboard) - add translations frontend and db #211

Closed khalifan-kfan closed 5 months ago

khalifan-kfan commented 6 months ago

Description

Enable display and editing of translations on the dashboard

Discussion

closes #208

Preview

Link to app preview if relevant

Screenshots / Videos

Screenshot 2024-01-03 at 09 24 01
chrismclarke commented 5 months ago

@khalifan-kfan - Minor update to follow previous comments.

I tested implementing my proposed changes to how ids are calculated (generating at the db level by combining tool, context and en columns), however this makes all other navigation tricky because there's no longer an id query parameter to search for.

So instead I've re-implemented to keep an id field in the database, although changed it instead of being a auto-generated number to a manually generated string - specifically by converting the en text to lower case without spaces and special characters, and combining with the tool and context columns

 const textId = row.en.toLowerCase().replace(/[^a-z0-9]/gi, '');
    return `${row.tool}-${row.context || ''}-${textId}`;

I've updated the db definition and seed data accordingly, so hopefully should be clearer once imported.

khalifan-kfan commented 5 months ago

Thanks for the feedback and updates on this PR.