Add dictionary option
Maybe add optional pluggable dictionary, like TranslationMemory in Poedit?
How would you present the suggestions to the users? What suggestions should it load and when? But yeah, I thought this too, sometimes a lot of different projects have a lot of similar strings, or even equal. How would you compare which strings are similar enough to be shown as suggestions?
Maybe suggest to user strings with keywords like "sharp", "smooth", "Next", "Previous", etc? And when string contains keyword propose it like suggestion in translation. Keyboard dictionary like in Google Keyboard can help too.
Maybe suggest to user strings with keywords like "sharp", "smooth", "Next", "Previous", etc?
Could you explain this better? Do you mean like a "downloadable" dictionary for single words, not sentences?
Not for the single words, but partially matched sentences. This is sample of inksape translation ru.po (v0.92) #: ../inkscape.desktop.in.h:6 msgid "New Drawing" <<< keyword "New" msgstr "Новый рисунок" Maybe dictionary must contain original <-->translation couples?
I'm trying to think of a way to extract the "keywords" from the sentences though… First word? Last word? Random word? — Android string's don't have any "keyword" by default (they have a "name", which can or cannot be a valid keyword; and usually are several words_separated_by_underscore). And then with this keyword, Stringlate should look on all the translations on other projects to see if it can find a matching result you say?
Sorry for not quite understanding you, I think I'm a bit tired… I just can't think of how this algorithm to detect "keywords" should work, and how should the suggestions be stored. On a database maybe? For each locale though? Or only for the one the user has defined on their phone? Maybe the suggestions could be loaded in a background thread instead… So many questions!
Yes, many questions. Sorry for my annoyance. Google keyboard use user dictionary, which contain wordlist (one word per line, alphabetically normalized). Maybe background process must scan prepared database, like in GoogleKeyboard? One dict per locale, or one TranslationMemory per project. Thank you for attention.
Google keyboard use user dictionary, which contain wordlist
But the problem is that, even with access to this dictionary, there is no such thing like "translation", they're just words which can be suggested, so Stringlate wouldn't know which it should "show". To put an example, the user might have both Spanish and English set on their phones, and the user has self-defined words on both Spanish and English. These have no relation, there is no such thing as "translation". They are just in a database accessible for every application to suggest them.
Maybe background process must scan prepared database
It would be possible to have a database (to provide faster lookup than scanning through the files) containing all the strings for every locale on every project. But again, this is not the problem (only a part of it). The problem is how it should determine the keywords, and how this should be shown to the user on the interface. Maybe as a placeholder? Or as a pop-up when you type? Or an "Apply suggestion"-like button?
Sure, it would be nice to have some kind of natural language processing to determine the best match… But that would be a bit overkill so that's why I was trying to think of a simpler solution.
Edit:
Thank you for attention.
Thank you for standing all my complaints actually! I only need some more ideas on how this could be done.
Ok, I'll connect with Poedit team and talk a little about this problem. Thank you very much. Besides I translate Stringlate to Russian right now. It is very useful application. Thank you again.
I was thinking of maybe adding the ability to download a dictionary from some website for the currently selected locale and then thought I would need some kind of spell checking… Then realised most keyboards provide this already so it would be fairly useless. What should we do with this issue?
For further reference, it would be good to keep an eye on Glosbe - the multilingual online dictionary. If anyone else knows similar projects (besides the ones mentioned on their /Partners section), it would be great to know too.
Dictionaries wouldn't be any good for translations because the user should know their language, what I think could be good is to use Google translate or a similar platform somehow and suggest a translation for the string and the user can decide if the translation string is good or not, this could speed up translation. What do you think @Lonami ?
Dictionaries wouldn't be any good for translations because the user should know their language,
Sure they should know it, but not everyone knows every single word in two languages. A dictionary would be of help for both 1. ensuring you used the right word and 2. not missing those rare words which you don't know.
use Google translate or a similar platform somehow and suggest a translation for the string and the user can decide if the translation string is good or not
I guess it would be good but what about people if they kept clicking the "Is correct" button without even reading? That's not the idea, we're looking for human quality translations. Using a dictionary would prevent the "auto-click" since sentences are far more complex than a single word.
These are my thoughts, though I think using a translation service which even allowed us to submit back correct translations would be a good help for both too.
Sure they should know it, but not everyone knows every single word in two languages. A dictionary would be of help for both 1. ensuring you used the right word and 2. not missing those rare words which you don't know.
Well, I guess it can help but I think it'd be showing too much data to the user if it were to use a dictionary depending on how it's shown.
I guess it would be good but what about people if they kept clicking the "Is correct" button without even reading? That's not the idea, we're looking for human quality translations. Using a dictionary would prevent the "auto-click" since sentences are far more complex than a single word.
I think those people could still be using any type of software or none and just write crap anyways. The person checking if those sentences are good should be familiar with the language so they should know if it's actually good or not and change it or not based on that.
Maybe go for full "original string" -> "translation string", and store that in a local db/file. E.g. if theres "settings" -> "Einstellungen" for german, put that in the german translation memory, and if exactly that string comes up, ask if that should be taken. E.g. always copy all translations to local after something gets synced/loaded, in cache folder.
But ok, thats more a "translation memory" than a dictionary.
For getting a simple dictonary maybe look at what https://f-droid.org/packages/de.reimardoeffinger.quickdic/ does, and try to match only on full words. Extensionable, you could put such a full word list e.g. again in the "translation memory" than ;)
You mean like, loading all the "original string" -> "translated string" from every project in memory, and if an "original string" matches the one from a new project, suggest "translated string"?
Yep
Although we would have duplicated information (original .xml files, needed as a template, and now this database), it would indeed speed up this specific task, so it seems like a good idea to use a database, yes.
But the xml of an project is only loaded when opening a project right?
Yes, opening a project always loads the original .xml file(s), and of course, the .xml for the selected locale. If you "Peek translations", it will read all the other .xml files too (within the same project).