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

is not valid JSON #100

Open
C-L-STARK opened this issue Jun 6, 2024 · 4 comments
Open

is not valid JSON #100

C-L-STARK opened this issue Jun 6, 2024 · 4 comments
Labels
๐Ÿ› Bug Something isn't working | ็ผบ้™ท Inactive No response in 30 days | ่ถ…่ฟ‡ 30 ๅคฉๆœชๆดป่ทƒ

Comments

@C-L-STARK
Copy link

๐Ÿ’ป ็ณป็ปŸ็Žฏๅขƒ | Operating System

macOS

๐ŸŒ CLI ็‰ˆๆœฌ | CLI Version

"@lobehub/i18n-cli": "^1.18.1",

๐Ÿ› ้—ฎ้ข˜ๆ่ฟฐ | Bug Description

โ„น Current model setting: gpt-4o (temperature: 0) [JSON Mode]} 11:41:29
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐Ÿ“ /locales/zh-TW/setting.json

  • from zh-CN to zh-TW [Tokens: 6694]
    โ ™ 4% [1/21 chunks] โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘

ERROR Translate failed, SyntaxError: Unexpected token 'S', "Sure, it l"... is not valid JSON 11:41:31

error: script "i18n" exited with code 1

๐Ÿšฆ ๆœŸๆœ›็ป“ๆžœ | Expected Behavior

่ฏท้—ฎๅบ”่ฏฅๅฆ‚ไฝ•ๆŽ’ๆŸฅ้—ฎ้ข˜๏ผŸ

๐Ÿ“ท ๅค็Žฐๆญฅ้ชค | Recurrence Steps

No response

๐Ÿ“ ่กฅๅ……ไฟกๆฏ | Additional Information

No response

@C-L-STARK C-L-STARK added the ๐Ÿ› Bug Something isn't working | ็ผบ้™ท label Jun 6, 2024
@lobehubbot
Copy link
Member

๐Ÿ‘€ @JARVISMindEngineer

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
้žๅธธๆ„Ÿ่ฐขๆ‚จๆไบค issueใ€‚ๆˆ‘ไปฌไผšๅฐฝๅฟซ่ฐƒๆŸฅๆญคไบ‹๏ผŒๅนถๅฐฝๅฟซๅ›žๅคๆ‚จใ€‚ ่ฏท็กฎไฟๆ‚จๅทฒ็ปๆไพ›ไบ†ๅฐฝๅฏ่ƒฝๅคš็š„่ƒŒๆ™ฏไฟกๆฏใ€‚

@C-L-STARK
Copy link
Author

const { defineConfig } = require('@lobehub/i18n-cli');

module.exports = defineConfig({
  entry: 'locales/zh-CN',
  entryLocale: 'zh-CN',
  output: 'locales',
  outputLocales: [
    'zh-TW',
    'en-US',
    'ja-JP',
  ],
  temperature: 0,
  modelName: 'gpt-4o',
  splitToken: 2048,
  experimental: {
    jsonMode: true,
  },
});

่ฟ™ๆ˜ฏๆˆ‘็š„้…็ฝฎๆ–‡ไปถ

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


const { defineConfig } = require('@lobehub/i18n-cli');

module.exports = defineConfig({
  entry: 'locales/zh-CN',
  entryLocale: 'zh-CN',
  output: 'locales',
  outputLocales: [
    'zh-TW',
    'en-US',
    'ja-JP',
  ],
  temperature: 0,
  modelName: 'gpt-4o',
  splitToken: 2048,
  experimental: {
    jsonMode: true,
  },
});

This is my config file

@C-L-STARK
Copy link
Author

All packages installed (373 packages installed from npm registry, used 4s(network 4s), speed 0B/s, json 0(0B), tarball 0B, manifests cache hit 330, etag hit 0 / miss 0)
[@lobehub/[email protected]] link /usr/local/bin/lobe-i18n@ -> /usr/local/lib/node_modules/@lobehub/i18n-cli/dist/cli.js

โžœ lobe-i18n --version
(node:39609) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
1.18.0

@lobehubbot lobehubbot added the Inactive No response in 30 days | ่ถ…่ฟ‡ 30 ๅคฉๆœชๆดป่ทƒ label Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
๐Ÿ› Bug Something isn't working | ็ผบ้™ท Inactive No response in 30 days | ่ถ…่ฟ‡ 30 ๅคฉๆœชๆดป่ทƒ
Projects
None yet
Development

No branches or pull requests

2 participants