Project-OSRM / osrm-text-instructions

Text instructions from OSRM route responses
BSD 2-Clause "Simplified" License
86 stars 60 forks source link

Request to add Japanese Localization from Transifex #276

Closed joshandrews closed 5 years ago

joshandrews commented 5 years ago

We have added Japanese localization on Transifex and are requesting that it gets merged in.

yuryleb commented 5 years ago

Thanks for contribution!

Just one question: most variables have no whitespaces between translated text but there are several cases with them (see phrase block):

        "modes": {
            "ferry": {
                "default": "フェリーに乗る",
                "name": "{way_name}のフェリーに乗る",
                "destination": "{destination}に向けてフェリーに乗る"
            }
        },
        "phrase": {
            "two linked by distance": "{instruction_one} その先 {distance}で{instruction_two}",
            "two linked": "{instruction_one} その先 {instruction_two}",
            "one in distance": "{distance}先、{instruction_one}",
            "name and ref": "{name}({ref})",
            "exit with number": "{exit}出口です"
        },
        "arrive": {
            "default": {
                "default": "{nth}目の目的地に到着しました",
                "upcoming": "まもなく{nth}目の目的地に到着します",
                "short": "目的地に到着しました",
                "short-upcoming": "まもなく目的地に到着します",
                "named": "{waypoint_name}に到着しました"
            },

Is it a mistake/misprint or not?

yuryleb commented 5 years ago

Also Chinese translation uses special bracket chars with intervals included:

        "phrase": {
            "two linked by distance": "{instruction_one},{distance}后{instruction_two}",
            "two linked": "{instruction_one},随后{instruction_two}",
            "one in distance": "{distance}后{instruction_one}",
            "name and ref": "{name}({ref})",
            "exit with number": "出口{exit}"
        },

Maybe Japanese one should use the same/similar brackets too?

joshandrews commented 5 years ago

Thanks for the look through @yuryleb !

  1. For locations where white spaces exist the idea was to separate the two instructions instructions. Before その先 is first instruction, after その先 is second instruction. This is considered normal in Japanese.

  2. Both of these characters, and (, can be used in Japanese, however in this case, "name and ref": "{name}({ref})", it makes more sense in Japanese to not include the space.

Let me know if you have any additional questions.

yuryleb commented 5 years ago

Ok, please review new PR with your translation from Transifex.

BTW maybe you could also provide localization for OSRM frontend with a similar way?

1ec5 commented 5 years ago

Fixed in #277.