dohliam / gasp-translator

A translation frontend for the Global African Storybook Project
https://global-asp.github.io/translator/
MIT License
2 stars 0 forks source link

Indicator for whether a story has been translated already #4

Closed dohliam closed 8 years ago

dohliam commented 8 years ago

There should be an indicator of some sort to let people know whether a story has been translated into a particular language already, so that they don't accidentally duplicate work that has already been done.

The easiest way to do this might be to import the index of translated stories from the website into a json file and show a list of completed languages at the top of the page for each story.

It probably won't be possible to actually do the comparison between the current language and already translated languages without the language names being standardized. Right now people might fill in the ISO language code, the English name of the language, the local name, or something else. There could be a dropdown menu with a list of languages, but we want to avoid limiting possible target languages to a pre-determined list, so this isn't a good solution.

dohliam commented 8 years ago

Moved from @espensj's comment here:

This is my suggestion for a new GUI:

You start here: 1 start

You type your language. For 99% of languages we are likely to ever encounter it's simply a matter of matching English and the name of the language in the language itself, such as "Danish" and "dansk". If either of these two words are entered as the name of the language, you get to this page:

2 language

If the language is not recognized (there are no stories translated yet) you get the same page, except the link. If you click on the link "Click here for a full list", you get this:

3 list of stories

Note that I've added sorting function and "recommended" (not the best word choice, perhaps). The idea is that some stories are quality assured – by ASP, or the Global ASP team, since there are quite few non-edited stories out there.

espensj commented 8 years ago

Here is a list of about 350 languages with English and native names: https://en.wikipedia.org/wiki/List_of_language_names

If that's not enough (and sure it's not!) then this list of ISO-639 has English names and some native names (I think they will often be the same, since it's not like English has it's own name for every tiny language). https://en.wikipedia.org/wiki/ISO_639:a

I say we start with the first, and if we get a language within a year that's not on that list I'll eat my hat (as we customarily do in Norway in these situations).

dohliam commented 8 years ago

Interesting ideas. I like the sort functionality and we might think about adding something like this in future, though I don't know how practical it would be at the moment.

I've also been thinking about this issue, and I think there is a workable solution that addresses the most immediate problem (we need to know whether the story we are translating is already available in the target language).

I think you hit on the key to the problem earlier. The most straightforward solution is to realize that we don't need to match the story against every possible language -- we just need to match the languages that Global-ASP already has. That is a very different (and much more tractable) problem: all it requires is to set a variable containing all the Global-ASP languages and story codes, something like this:

var gasp = [{"no":"0253,0123,0321"},{"sv":"0023,0231,0123"},{"zh":"0065,0331,0123"}]

Then, it's a very easy matter to simply match the input target language and the index number of the next/previous story. If the story has been translated already we could either skip it or gray it out until a new language was selected.

I was going to say we should skip it as you suggested, but then I realized that some translators (ahem) are going to want to translate into more than one language, and would miss that opportunity if the app skips stories. So I'm going to suggest that the translation area be greyed out, and a message appear saying "this story has already been translated into xx language; please choose another language or skip to the next story" or something similar.

This allows us to circumvent the entire list of languages issue completely -- we don't need to suggest any languages other than the ones that are currently available (and they show up as suggestions underneath the normal textbox). If you're translating into a new language, you can call it whatever you want and we'll sort it out later. The app certainly doesn't need to know that much detail :smile:

espensj commented 8 years ago

Sounds good. But I'm falling asleep. You should too!

E

On 16 October 2015 at 22:45, dohliam notifications@github.com wrote:

Interesting ideas. I like the sort functionality and we might think about adding something like this in future, though I don't know how practical it would be at the moment.

I've also been thinking about this issue, and I think there is a workable solution that addresses the most immediate problem (we need to know whether the story we are translating is already available in the target language).

I think you hit on the key to the problem earlier. The most straightforward solution is to realize that we don't need to match the story against every possible language -- we just need to match the languages that Global-ASP already has. That is a very different (and much more tractable) problem: all it requires is to set a variable containing all the Global-ASP languages and story codes, something like this:

var gasp = [{"no":"0253,0123,0321"},{"sv":"0023,0231,0123"},{"zh":"0065,0331,0123"}]

Then, it's a very easy matter to simply match the input target language and the index number of the next/previous story. If the story has been translated already we could either skip it or gray it out until a new language was selected.

I was going to say we should skip it as you suggested, but then I realized that some translators (ahem) are going to want to translate into more than one language, and would miss that opportunity if the app skips stories. So I'm going to suggest that the translation area be greyed out, and a message appear saying "this story has already been translated into xx language; please choose another language or skip to the next story" or something similar.

This allows us to circumvent the entire list of languages issue completely -- we don't need to suggest any languages other than the ones that are currently available (and they show up as suggestions underneath the normal textbox). If you're translating into a new language, you can call it whatever you want and we'll sort it out later. The app certainly doesn't need to know that much detail [image: :smile:]

— Reply to this email directly or view it on GitHub https://github.com/dohliam/gasp-translator/issues/4#issuecomment-148887526 .

dohliam commented 8 years ago

I say we start with the first, and if we get a language within a year that's not on that list I'll eat my hat (as we customarily do in Norway in these situations).

I would be very cautious about this. The danger with "comprehensive" language lists is that they never are. For example, I can think of more than half a dozen languages that we are working on or targetting right now (let alone within a year) that aren't on the list you linked: Taishanese (also known as Toisanese, Hoisanva), Jamaican (also known as Creole/Patois), Suzhou dialect, Musqueam, Sto:lo, Kansai dialect (or any other dialect of Japanese), Quechua (!)

None of the Italian languages are listed (e.g. Calabrian). The only Arabic dialect listed is Egyptian. There isn't even anything about Quebecois French! You don't have to eat your hat, but I hope you see my point... :sweat_smile:

espensj commented 8 years ago

I would love to see Quechua and Thaishanese, but by point is, will we get then? Within a year (or a reasonable time span?) For now I think 350 languages will cover 99% of our needs. And when someone adds Thaishanese (which Melanie speaks, by the way), which I'm sure you can conjure up, then it's just a matter of doing it manually. I don't think we will be overwhelmed by manually adding these languages. Because the main point about having a language list on the back-end (or under the hood, or wherever), is to know that when someone enters "dansk" that is the same as Danish, and "polski" is the same as Polish. Beyond that it's not really important.

dohliam commented 8 years ago

Yes, the languages I listed above are all translations we are working on right now. In any case, I am almost finished working on a solution for this that does not involve listing languages at all.

dohliam commented 8 years ago

@espensj This feature has now been added to the Norwegian translator -- please test it out. If it works for you, we can add it to the main gasp-translator application.

espensj commented 8 years ago

Something is very wrong here...

screen shot 2015-10-17 at 1 15 38 pm

screen shot 2015-10-17 at 1 15 59 pm

espensj commented 8 years ago

Is it also possible to make in the target language box leave the box? Right now it gives a new line, which makes no sense.

dohliam commented 8 years ago

Strange, I don't see that at all...: image

Did you remember to reload the page?

dohliam commented 8 years ago

Actually, I see the problem -- at some point you must have inadvertently entered a linebreak (most likely by pressing "enter"), and this was saved in your local storage... which then screwed everything up. We can fix this by stripping all linebreaks in the language box before saving.

dohliam commented 8 years ago

This should now be fixed... let me know if it works for you.