mirror of
https://github.com/CompeyDev/fxtwitter-docker.git
synced 2025-04-05 10:30:55 +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 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) {
|
||||
case 'zh':
|
||||
case 'cn':
|
||||
language = 'zh-cn';
|
||||
break;
|
||||
case 'tw':
|
||||
language = 'zh-tw';
|
||||
break;
|
||||
case 'jp':
|
||||
language = 'ja';
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue