Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Japanese translation is available in the strings file, but it is missing from the mapping #764

Closed
Andrea-Orimoto opened this issue Nov 3, 2017 · 5 comments

Comments

@Andrea-Orimoto
Copy link
Contributor

the mapping at the bottom of the strings file is missing ja

export const strings = (locale: string) => {
if (locale.startsWith('da'))
locale = 'da-dk';
else if (locale.startsWith('de'))
locale = 'de-de';
else if (locale.startsWith('no') || locale.startsWith('nb') || locale.startsWith('nn'))
locale = 'nb-no';
else if (locale.startsWith('pl'))
locale = 'pl-pl';
else if (locale.startsWith('ru'))
locale = 'ru-ru';
else if (locale.startsWith('nl'))
locale = 'nl-nl';
else if (locale.startsWith('lv'))
locale = 'lv-lv';
else if (locale.startsWith('pt'))
locale = 'pt-br';
else if (locale.startsWith('fr'))
locale = 'fr-fr';
else if (locale.startsWith('es'))
locale = 'es-es';
else if (locale.startsWith('el'))
locale = 'el-gr';
else if (locale.startsWith('it'))
locale = 'it-it';
else if (locale === 'zh-hant' || locale === 'zh-hk' || locale === 'zh-mo' || locale === 'zh-tw')
locale = 'zh-hant';
else if (locale.startsWith('zh'))
locale = 'zh-hans';
else if (locale.startsWith('cs'))
locale = 'cs-cz';
else if (locale in localizedStrings === false)
locale = 'en-us';

@billba
Copy link
Member

billba commented Nov 3, 2017

I believe it is covered by the final case, because 'ja' is in localizedStrings, therefore locale remains 'ja'. Do you have reason to believe this doesn't work?

The reason this mapping code exists is because most, but not all, locales with multiple dialects can share a single string table. In the case of Japan, I guess, there are no multiple dialects.

@Andrea-Orimoto
Copy link
Contributor Author

Yes, we have a case where it is not working, even if we pass ja (will verify more and send you more info).

but what if you pass ja-jp? why is this one treated differently?

@billba
Copy link
Member

billba commented Nov 3, 2017

Here I was just following the lead of the translator. If it's not right let's fix it.

@danmarshall
Copy link
Contributor

I think the fix is to follow the pattern that's established.

Andrea-Orimoto added a commit to Andrea-Orimoto/BotFramework-WebChat that referenced this issue Nov 7, 2017
danmarshall added a commit that referenced this issue Nov 7, 2017
#764 making ja-jp consistent with other langs
@billba
Copy link
Member

billba commented Nov 7, 2017

Sorry about this - I should have double checked before merging this change.

reyesrico pushed a commit to reyesrico/BotFramework-WebChat that referenced this issue Nov 8, 2017
danmarshall pushed a commit that referenced this issue Nov 17, 2017
* #764 making ja-jp consistent with other langs

#764 making ja-jp consistent with other langs

* Adding spaces directly without markdownIt rendering.

* Implementing text-empty test validation.

* Adding space character.
compulim pushed a commit that referenced this issue Dec 5, 2017
* #764 making ja-jp consistent with other langs

#764 making ja-jp consistent with other langs

* Adding temp CardImage attachment and test.

* Commiting new changes.

* Rendering tap selectaction.

* Adding image tap tests.

* Implementing card tap tests

* Implementing card action call test.

* Cleaning files for PR.

* Cleaning code.

* Improving evaluate function code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants