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

issue with type of json with azure #70

Open
johnfelipe opened this issue Jun 7, 2022 · 19 comments
Open

issue with type of json with azure #70

johnfelipe opened this issue Jun 7, 2022 · 19 comments

Comments

@johnfelipe
Copy link

johnfelipe commented Jun 7, 2022

messages.zip
helper-messages.zip

Found 1 target language(s):
-> es

🏭 Loading source files...
β”œβ”€β”€ helper-messages.json (key-based)
β”œβ”€β”€ messages.json (key-based)
└── Done

✨ Initializing Azure...
└── Done

πŸ” Looking for key-value inconsistencies in source files...
└── No inconsistencies found

πŸ” Looking for invalid keys in source files...
└── No invalid keys found

πŸ’¬ Translating strings from en to es...
β”œβ”€β”€ Translating helper-messages.json (+84)
β”œβ”€β”€ Translating messages.json
An error has occurred:
input.match is not a function
TypeError: input.match is not a function
	at exports.matchI18Next (/root/json-autotranslate/node_modules/json-autotranslate/lib/matchers/i18next.js:5:25)
	at Object.exports.replaceInterpolations (/root/json-autotranslate/node_modules/json-autotranslate/lib/matchers/index.js:20:24)
	at /root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:107:49
	at Array.map (<anonymous>)
	at AzureTranslator.<anonymous> (/root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:105:45)
	at step (/root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:33:23)
	at Object.next (/root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:14:53)
	at /root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:8:71
	at new Promise (<anonymous>)
	at __awaiter (/root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:4:12)
@johnfelipe
Copy link
Author

@leolabs r u there?

@johnfelipe
Copy link
Author

SNAG-1242

@leolabs
Copy link
Owner

leolabs commented Jun 10, 2022

I think it has to do with the translation in line 968 in your file. This tool expects translations to be a string instead of a number. Maybe I can add a filter to skip all non-string entries in the input files.

@johnfelipe
Copy link
Author

johnfelipe commented Jun 10, 2022 via email

@johnfelipe
Copy link
Author

johnfelipe commented Jun 10, 2022 via email

@johnfelipe
Copy link
Author

i delete repo and clone again and error persist

An error has occurred:
input.match is not a function
TypeError: input.match is not a function
    at exports.matchI18Next (/root/json-autotranslate/node_modules/json-autotranslate/lib/matchers/i18next.js:5:25)
    at Object.exports.replaceInterpolations (/root/json-autotranslate/node_modules/json-autotranslate/lib/matchers/index.js:20:24)
    at /root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:107:49
    at Array.map (<anonymous>)
    at AzureTranslator.<anonymous> (/root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:105:45)
    at step (/root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:33:23)
    at Object.next (/root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:14:53)
    at /root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:4:12)


@johnfelipe
Copy link
Author

I think it has to do with the translation in line 968 in your file. This tool expects translations to be a string instead of a number. Maybe I can add a filter to skip all non-string entries in the input files.

remember im using Azure not DeepL

@leolabs
Copy link
Owner

leolabs commented Jun 10, 2022

Ah, the update I pushed was not related to this issue. I think I can take a deeper look at it on Sunday.

@johnfelipe
Copy link
Author

dear may be i can help you, show me how update and wil send you PR, i need this ASAP for academic job, pls

@johnfelipe
Copy link
Author

Ah, the update I pushed was not related to this issue. I think I can take a deeper look at it on Sunday.

Hi dear can u help me for azure?

@johnfelipe
Copy link
Author

Help pls with azure engine

@johnfelipe
Copy link
Author

sorry for persistent. pls help me for solve that json formats and with azure engine

@johnfelipe
Copy link
Author

Hi dear, busy?
Pls help me about Json file missed ...

@johnfelipe
Copy link
Author

johnfelipe commented Jul 8, 2022

hi dear, i pull latest version and json format is actual bad translation

messages.zip

πŸ—‚ Created the cache directory.
Found 1 target language(s):
-> es

🏭 Loading source files...
β”œβ”€β”€ messages.json (key-based)
└── Done

✨ Initializing Azure...
└── Done

πŸ” Looking for key-value inconsistencies in source files...
└── No inconsistencies found

πŸ” Looking for invalid keys in source files...
└── No invalid keys found

πŸ’¬ Translating strings from en to es...
β”œβ”€β”€ Translating messages.json
An error has occurred:
input.match is not a function
TypeError: input.match is not a function
    at exports.matchI18Next (/root/json-autotranslate/node_modules/json-autotranslate/lib/matchers/i18next.js:5:25)
    at exports.replaceInterpolations (/root/json-autotranslate/node_modules/json-autotranslate/lib/matchers/index.js:20:24)
    at /root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:107:49
    at Array.map (<anonymous>)
    at AzureTranslator.<anonymous> (/root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:105:45)
    at step (/root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:33:23)
    at Object.next (/root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:14:53)
    at /root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/root/json-autotranslate/node_modules/json-autotranslate/lib/services/azure-translator.js:4:12)


@johnfelipe
Copy link
Author

anyone?

@johnfelipe
Copy link
Author

Dear pls update asap

@johnfelipe
Copy link
Author

Ah, the update I pushed was not related to this issue. I think I can take a deeper look at it on Sunday.

hi dear, any progress?

@leolabs
Copy link
Owner

leolabs commented Aug 2, 2022

Hey @johnfelipe,

Unfortunately I haven't found the time to work on this yet. I can't promise a timeframe since the project is just a side project and my weeks are quite full at the moment, but I'll let you know when a new release is available.

@johnfelipe
Copy link
Author

johnfelipe commented Oct 11, 2022 via email

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

2 participants