mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-06 19:10:54 +01:00
Map zh -> zh-cn, tw -> zh-tw, cn -> zh-cn (#580)
This commit is contained in:
parent
a03995a959
commit
147ea4aadd
1 changed files with 8 additions and 1 deletions
|
@ -29,8 +29,15 @@ export const translateStatus = async (
|
||||||
let translationApiResponse;
|
let translationApiResponse;
|
||||||
let translationResults: TranslationPartial;
|
let translationResults: TranslationPartial;
|
||||||
|
|
||||||
/* Fix up some language codes that may be mistakenly used */
|
/* Clean up language codes so we can use them with Twitter API */
|
||||||
switch (language) {
|
switch (language) {
|
||||||
|
case 'zh':
|
||||||
|
case 'cn':
|
||||||
|
language = 'zh-cn';
|
||||||
|
break;
|
||||||
|
case 'tw':
|
||||||
|
language = 'zh-tw';
|
||||||
|
break;
|
||||||
case 'jp':
|
case 'jp':
|
||||||
language = 'ja';
|
language = 'ja';
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue