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

English README from another lang #10

Open
ProtossDragoon opened this issue May 18, 2024 · 1 comment
Open

English README from another lang #10

ProtossDragoon opened this issue May 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ProtossDragoon
Copy link

ProtossDragoon commented May 18, 2024

Hi, and thank you for developing this project.

I've encountered an issue where the target languages 'en,zh-CN' (or en, zh-CN separately) are not functioning correctly. My main README.md is written in Korean, and I wish to translate it into both English and Chinese. While the translation to Chinese works well, the English version of the README is not being generated. Could you assist with this problem?

Thanks

jobs:
  translate:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 3

      - name: Auto Translate (en)
        uses: Lin-jun-xiang/action-translate-readme@v2
        with:
          token: ${{ secrets.PAT_PROTOSSDRAGOON_FOR_ACTIONBOT }}
          g4f_provider: g4f.Provider.DeepAi # You can change this provider
          langs: "en,zh-CN"
jobs:
  translate:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 3

      - name: Auto Translate (en)
        uses: Lin-jun-xiang/action-translate-readme@v2
        with:
          token: ${{ secrets.PAT_PROTOSSDRAGOON_FOR_ACTIONBOT }}
          g4f_provider: g4f.Provider.DeepAi # You can change this provider
          langs: "en"

      - name: Auto Translate (zh-CN)
        uses: Lin-jun-xiang/action-translate-readme@v2
        with:
          token: ${{ secrets.PAT_PROTOSSDRAGOON_FOR_ACTIONBOT }}
          g4f_provider: g4f.Provider.DeepAi # You can change this provider
          langs: "zh-CN"
@Lin-jun-xiang
Copy link
Owner

Thanks your report.

Due to the program defaulting the English version of the documentation to README.md, when you write Korean into README.md, the program mistakenly assumes that you manually modified the English README.md instead of the Korean version, and therefore skips the translation process.

It is recommended that you use README.kr.md for the Korean version of the documentation. This can quickly resolve the issue.

if output_lang == 'en' and file == 'README.md':
return

@Lin-jun-xiang Lin-jun-xiang self-assigned this May 20, 2024
@Lin-jun-xiang Lin-jun-xiang added the bug Something isn't working label May 20, 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
Projects
None yet
Development

No branches or pull requests

2 participants