Closed yuryleb closed 5 years ago
No problem, that's the review goal is đ
No problem, that's the review goal is đ
Ok, will I get a new notification if the new review is available, or I have to check back regularly? Thanks.
I'll add comment here and then you'll get a notification. Did you already update translation on Transifex?
I'll add comment here and then you'll get a notification. Did you already update translation on Transifex?
Yes, I did it before commenting on the review here.
IMHO missing whitespace after {modifier}
in new name
stuff:
"merge": {
"default": {
"default": "Soroljon be {modifier}",
"name": "Soroljon be {modifier}a(z) {way_name} felé",
"destination": "Soroljon be {modifier} ehhez: {destination}"
},
IMHO missing whitespace after
{modifier}
in newname
stuff:"merge": { "default": { "default": "Soroljon be {modifier}", "name": "Soroljon be {modifier}a(z) {way_name} felé", "destination": "Soroljon be {modifier} ehhez: {destination}" },
Fixed it, tho it's really hard to keep track since almost every value exist 6 times.
Actually no, only destination
was changed but name
still need for whitespace:
"merge": {
"default": {
"default": "Soroljon be {modifier}",
"name": "Soroljon be {modifier}a(z) {way_name} felé",
"destination": "Soroljon be {modifier} a(z) {destination} irĂĄnyĂĄba"
},
And there are several similar cases, I recommend to use Transifex search for translated strings with }a
pattern.
I only saw one, fixed, then searched for }a and found nothing. Is it possible to remove the ultimate redundancy somehow so every string would be there only 1 times?
I pushed your updated translation, please review result again.
IMHO there are extra whitespaces in name and ref
now :wink:
"phrase": {
"two linked by distance": "{instruction_one} , majd {distance} mĂșlva, {instruction_two}",
"two linked": "{instruction_one} , majd {instruction_two}",
"one in distance": "{distance} mĂșlva {instruction_one}",
"name and ref": "{name} ( {ref} )",
"exit with number": "{exit} kijĂĄrat"
},
Sorry, i wanted to make sure there is always whitespace, tomorrow I will check them, so to be clear there can be braces and commas after them ?
I suppose there should be just "name and ref": "{name} ({ref})",
Next commit pushed. But now there are extra whitespaces đ
Transifex really plays out its cards... oh well, tried to fix them all.
Committed last fix. Translation looks good for me now đ
BTW maybe you could also add translation to the frontend? It's necessary just add new hu.js into i18n folder with similar content:
module.exports = {
name: 'English',
key: 'en',
'Open in Debug Map': 'Open in Debug Map',
'Open in Mapillary': 'Open in Mapillary',
'GPX': 'Export GPX file',
'Open in editor': 'Open in editor',
'Open in JOSM': 'Open in JOSM',
'Select language': 'Select language',
'Start - press enter to drop marker': 'Start - press enter to drop marker',
'End - press enter to drop marker': 'End - press enter to drop marker',
'Via point - press enter to drop marker': 'Via point - press enter to drop marker'
};
and register it in src/localization.js?
You could do this in your own new pull request or just send/type translation for me. Then I could test your localization for osrm-text-instructions together with frontend.
Translation is also checked with frontend:
So if all is ok, maybe this could be merged?
Also IMHO new version of whole package should be released already, maybe maintainers could do this finally?
/cc @1ec5
Translation is also checked with frontend:
So if all is ok, maybe this could be merged?
Also IMHO new version of whole package should be released already, maybe maintainers could do this finally?
/cc @1ec5
It looks and reads correct.
Maybe @danpaz could merge this PR?
Also I already had to write my own logic for correcting a(z) including highway names, since my project needed to proceed further. (Its on android, not js and not regex based)
Its on android, not js and not regex based
If youâre using the Mapbox Navigation SDK for Android, note that improvements to OSRM Text Instructions are incorporated into the Mapbox Directions API and therefore the navigation SDK as well. Ideally the navigation SDK would take care of details like this so you donât have to in your application code.
An example of special case dor a az: usually highways in hungary starts with an M and then a number and the pronounciation is "emm" so thats why it needs an az before it in this special case.
usually highways in hungary starts with an M and then a number and the pronounciation is "emm"
Makes sense đ
@kiskunk, could you please also answer for my questions above? And also should Hungarian street names be changed together with status names for a grammatical case similar to Russian streets?
usually highways in hungary starts with an M and then a number and the pronounciation is "emm"
Makes sense đ
@kiskunk, could you please also answer for my questions above? And also should Hungarian street names be changed together with status names for a grammatical case similar to Russian streets?
So here is a complete list of possible street ending names (i mean like in Boulevard Street where "Street" is the ending) it includes those 11 too from your link.
WayNameEnding[] wayNameEndings = { new WayNameEnding(" ĂĄrok", "ĂĄrkon", "ĂĄrokra"), new WayNameEnding(" ĂĄtjĂĄrĂł", "ĂĄtjĂĄrĂłn", "ĂĄtjĂĄrĂłra"), new WayNameEnding(" dƱlĆ", "dƱlĆn", "dƱlĆre"), new WayNameEnding(" dƱlĆĂșt", "dƱlĆĂșton", "dƱlĆĂștra"), new WayNameEnding(" erdĆsor", "erdĆsoron", "erdĆsorra"), new WayNameEnding(" fasor", "fasoron", "fasorra"), new WayNameEnding(" fordulĂł", "fordulĂłn", "fordulĂłra"), new WayNameEnding(" gĂĄt", "gĂĄton", "gĂĄtra"), new WayNameEnding(" hatĂĄrsor", "hatĂĄrsoron", "hatĂĄrsorra"), new WayNameEnding(" hatĂĄrĂșt", "hatĂĄrĂșton", "hatĂĄrĂștra"), new WayNameEnding(" kapu", "kapun", "kapura"), new WayNameEnding(" körönd", "köröndön", "köröndre"), new WayNameEnding(" körtĂ©r", "körtĂ©ren", "körtĂ©rre"), new WayNameEnding(" körĂșt", "körĂșton", "körĂștra"), new WayNameEnding(" köz", "közön", "közre"), new WayNameEnding(" lakĂłtelep", "lakĂłtelepen", "lakĂłtelepre"), new WayNameEnding(" lejĂĄrĂł", "lejĂĄrĂłn", "lejĂĄrĂłra"), new WayNameEnding(" lejtĆ", "lejtĆn", "lejtĆre"), new WayNameEnding(" lĂ©pcsĆ", "lĂ©pcsĆn", "lĂ©pcsĆre"), new WayNameEnding(" liget", "ligeten", "ligetre"), new WayNameEnding(" mĂ©lyĂșt", "mĂ©lyĂșton", "mĂ©lyĂștra"), new WayNameEnding(" orom", "ormon", "oromra"), new WayNameEnding(" ösvĂ©ny", "ösvĂ©nyen", "ösvĂ©nyre"), new WayNameEnding(" park", "parkon", "parkra"), new WayNameEnding(" part", "parton", "partra"), new WayNameEnding(" pincesor", "pincesoron", "pincesorra"), new WayNameEnding(" rakpart", "rakparton", "rakpartra"), new WayNameEnding(" sĂ©tĂĄny", "sĂ©tĂĄnyon", "sĂ©tĂĄnyra"), new WayNameEnding(" sikĂĄtor", "sikĂĄtoron", "sikĂĄtorra"), new WayNameEnding(" sor", "soron", "sorra"), new WayNameEnding(" sugĂĄrĂșt", "sugĂĄrĂșton", "sugĂĄrĂștra"), new WayNameEnding(" tĂ©r", "tĂ©ren", "tĂ©rre"), new WayNameEnding(" udvar", "udvaron", "udvarra"), new WayNameEnding(" Ășt", "Ășton", "Ăștra"), new WayNameEnding(" utca", "utcĂĄn", "utcĂĄra"), new WayNameEnding(" ĂŒdĂŒlĆpart", "ĂŒdĂŒlĆparton", "ĂŒdĂŒlĆpartra"), new WayNameEnding(" lĂĄnchĂd", "lĂĄnchĂdon", "lĂĄnchĂdra"), new WayNameEnding(" hĂd", "hĂdon", "hĂdra")};
Grammatical cases as far as i could determine it would require only 2 of ours, but i do not know the name of those cases. the first is the root name, the second is how it changes when you would say "on Boulevard Street", the 3rd is how it would change when you would say "onto Boulevard Street" its a much harder implementation (if even possible) because its based on vowel harmony for 90%, so its not even for 100%... what i put in the translation on transifex solves this issue by using an additional word like if you would say "turn left onto Boulevard Street section"
I think with using the grammar file for standard street names to balance out a/az AND making a rule for M0, M1 ... M85 ... etc would cover almost all except the non-hungarian street names (there are only a few)
For the grammatical cases and the M0..M1 highway names its another dimension of difficulty (at least when the Mapbox SDK tries to read it out loud), because of how it would say the numbers, the numbers also would require a different suffix. For example M0 would be read like "emm nulla" but since we want to use it in context and a sentence, it would be "emm nullĂĄs", and thats not the end because it would still need the "section" word after it (which i think its already there in transifex because its a general translation) or to be better for the ears, the logic from the previous grammar cases, making it into "emm nullĂĄson" or "emm nullĂĄsra", to write this logic it requires to have the numbers 0-20,30,40,50,60,70,80,90,100,200,300.. etc to be defined too with that 2 grammar case, maybe its enough to stay below 1000, i don't think that would come up in any hungarian highway names.
For example M0 would be read like "emm nulla" but since we want to use it in context and a sentence, it would be "emm nullĂĄs", and thats not the end because it would still need the "section" word after it (which i think its already there in transifex because its a general translation) or to be better for the ears, the logic from the previous grammar cases, making it into "emm nullĂĄson" or "emm nullĂĄsra", to write this logic it requires to have the numbers 0-20,30,40,50,60,70,80,90,100,200,300.. etc to be defined too with that 2 grammar case, maybe its enough to stay below 1000, i don't think that would come up in any hungarian highway names.
An SSML-aware text-to-speech engine might already handle optimizing numbers or alphanumeric words for speech. (The Mapbox Directions API wraps {way_name}
etc. in <speak-as interpret-as="address">
for that reason.) I donât think OSRM Text Instructions is in a great position to implement number formatting for speech all by itself. That would be a valid feature request against the navigation SDK for when it falls back to the Android TTS engine (since the Mapbox Voice API doesnât support Hungarian).
what i put in the translation on transifex solves this issue by using an additional word like if you would say "turn left onto Boulevard Street section"
Thatâs reasonable. The only reason I brought up the grammar file was because of âa(z)â, which a text-to-speech engine is unlikely to pronounce correctly under any circumstance, unfortunately. That said, this PR doesnât have to be the end of Hungarian localization work. If you think optimizing articles and numbers would be enough of a rabbit hole, we can merge this PR and would welcome any additional contributions regarding grammar.
If we're talking about articles change only, it's not too hard to implement here đ
BTW how a/az
should be changed before numbers in phrases like "Megérkezett a(z) 1. célponthoz, a bal oldalon" - I suppose to a
everywhere?
But adding 2 grammatical cases support will be not too hard too if we need to change street status name only. @kiskunk, am I understand properly that "turn right onto the street" instruction with DohĂĄny utca
street name should look like:
Forduljon be jobbra a Dohåny utcåra felé
And we don't need to change the DohĂĄny
name?
I think a(z) is ok for now. As for jumbers it would be "megérkezett az 1. célponthoz" but "megérkezett a 2. célponthoz" so its atain an another level of complication of what letter the spoken number would start with.
And for the street name it would be: Forduljon jobbra a Dohåny utcåra. without the "felé" and yes Dohåny would not change
Ok, please look at first Hungarian grammar rules to handle articles only yet:
Grammar could be extended further to apply grammatical cases to Hungarian street names - I suppose this could be based on analyzing of following magic words after {way_name}
& {rotary_name}
variables:
@kiskunk, you told about 2 grammatical cases but here are 3 variants - does some of them use the same grammatical case as another (if I'm right in my presumption at all)?
And BTW you seem to forget to include alagĂșt
(tunnel) status name into your wayNameEndings list.
The image looks correct.
My list was from Wikipedia, so i will have to try to update that too with alagĂșt. thanks.
Felé and Irånyåba are interchange-able, they both represent one of the 2 cases, szakaszon represents the other. I just added the other 2 for a little bit of word diversity, I used felé for way_names, and irånyåba for destination.
One more question, @kiskunk: how to proceed foreign names - I suppose it's better to keep these felé/irånyåba/szakaszon words on their original place in instructions?
yes, thats the best way i can imagine
Yes, I corrected the irĂĄnyĂĄba, and added the missing a(z)
OK, now I added support of Sublative and Superessive grammatical cases (yes, they're called so :wink:), please review how this looks on Hungarian streets: And on foreign ones:
Looks good to me, great job, thanks.
Issue
Initial Hungarian translation contributed by @kiskunk initally discussed in #271. Thanks a lot!
Tasklist