[Feat] Support CSV for Common Translations #67
Labels
Feature Request
New functionality the app doesn't provide yet
Size: Medium
Probably less than 1 month of work
Problem Statement
As an extension to #55, it would be nice if as a user I can upload a CSV of translations which are then cached (on device) by ReMafoX. These CSVs can then be used to lookup common translations should they be needed in any of my projects.
For example, https://stefangabos.github.io/world_countries/ is a resource which provides CSV translations of all countries in the world into many languages. It doesn't make sense to bake all of this into ReMafoX, but as a developer who creates many apps/projects using these values it could be handy to have at hand.
Additionally there's a large resource managed by the Welsh government (https://github.com/cwd24/termcymru) which translates many common English words and phrases into Welsh. This would be a helpful resource for many of my applications which provide Welsh support, but again doesn't make sense for ReMafoX to have baked in support for.
Suggested Solution
A new page should be added to the global ReMafoX preferences page. This allows you to upload (by drag and drop or through a 'Browse' button) a CSV file.
ReMafoX should parse the first line (headers) and provide a simple mapping utility. There are two columns of relevance: the source string, and the destination string. Other columns should be ignored. I suspect ReMafoX would then need to ask what the languages are (from a dropdown of known/supported languages).
The full CSV file should be stored on the local device in a central cache folder.
Additional Considerations
The main complexity here simply comes from the fact that every CSV could be in a different format and so we need to create a mapping utility to define the source and destination columns.
If we wanted to do a simpler MVP version, we could enforce that there is only two columns where the first is source and second is destination. This would just require us to use a separate tool to modify the CSV before uploading - but that's not terrible!
The text was updated successfully, but these errors were encountered: