RemafoX icon indicating copy to clipboard operation
RemafoX copied to clipboard

[Feat] Annotate the source of translations

Open ConfusedVorlon opened this issue 2 years ago • 3 comments

Problem Statement

It would be good to know whether a given translation comes from machine translation or user contribution

Suggested Solution

Add an additional comment in the strings file?

Additional Considerations

Need to consider how this would interact with the 'translation tips', but in principle, something like

/* Gesture control setup */
/* Remafox-Source : Microsoft Machine Translation */
"3 finger tap" = "Taper avec 3 doigts";

/* Gesture control setup */
/* Remafox-Source : Manually updated by Bob */
"3 finger tap" = "Taper avec 3 doigts";

ConfusedVorlon avatar Mar 03 '23 10:03 ConfusedVorlon

@ConfusedVorlon As part of #13 I will have to implement a way to differentiate between "validated" and "unvalidated" translations anyways, and there may even be multiple levels of validation. I was thinking about saving this kind of information in an extra checked in file or to attach it to the config file. Adding it with comments to the Strings(dict) file would also be possible, of course. Is there any other benefits to the comment way other than that there's no need for an extra file in your point of view? Or would the extra file with additional info work for you, too?

Jeehut avatar Mar 03 '23 15:03 Jeehut

The advantage of a comment in the strings file is that a human can review the file and act on the source information. So, I can simply send a file to a German speaker and ask them to review anything that says 'Machine translation'

ConfusedVorlon avatar Mar 03 '23 16:03 ConfusedVorlon

@ConfusedVorlon Thank you for clarifying the advantage in your opinion. But please note that if I provide the above-mentioned feature, I will also provide a way to only send non-validated texts to someone, so exactly the use case you describe should be covered. So I might still end up using a method that does not clutter the String files.

My main concern with editing the Strings file is that the Strings file is currently in control of the developer and a developer can add, edit or delete keys as they wish (at least in the source language file, the other languages will be adjusted by RemafoX). And developers might want to actually use comments themselves and it could be confusing if I added some RemafoX-specific markup in them. It makes them also no longer "vanilla Apple Strings files" which is one of my goals.

If you have other use cases in your mind that make using comments more useful, I might consider at least adding it as an option. But currently, I'm leaning towards a separate solution.

Jeehut avatar Mar 03 '23 20:03 Jeehut