Git Product home page Git Product logo

deepl-translate-github-action's Introduction

Hi there! I'm Estee Tey, a Software Developer & Technical Blogger!

Hello there 👋

Latest Articles

Website

Languages & Tools 🛠


Frontend (Web) Backend Mobile Design
html5 css3 jekyll sass react vuejs nextjs jest mocha cypress webpack mongodb mysql nodejs express spring docker android reactnative firebase figma illustrator photoshop

deepl-translate-github-action's People

Contributors

lyqht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kevinz vaginessa

deepl-translate-github-action's Issues

Feature Request: Support for nested JSON

Context

At the moment, the github action only works for JSON that's 1 level depth, for example in vue-i18n-next

{
    "hello": "Hello, {name}!",
    "language": "Language",
    "description": "This is a wonderful world isn't it?"
  }

There are certain i18n plugins that rely on nested JSON. An example from refine

{
    "pages": {
        "login": {
            "title": "Melden Sie sich bei Ihrem Konto an",
            "signin": "Einloggen",
            "signup": "Anmelden",
            "divider": "oder",
            "fields": {
                "email": "Email",
                "password": "Passwort"
            },
            "errors": {
                "validEmail": "Ungültige E-Mail-Adresse"
            },
            "buttons": {
                "submit": "Anmeldung",
                "forgotPassword": "Passwort vergessen?",
                "noAccount": "Sie haben kein Konto?",
                "rememberMe": "Erinnere dich an mich"
            }
        },
...
}

The action should support these formats out of the box without modifying the props required for the action.

Feature Request: DeepL Glossary

Context

At the moment, if users run the github action multiple times, it may be possible that for some languages, the translated text may be slightly different than the previous translation results. If users want to keep them/ override them, they would have to make a separate commit.

Hence, it will be good if users can create their own custom dictionary of translation resutls based on the previous translation result that the github action has already provided for them before. In the DeepL API docs , this is known as glossaries.

Acceptance criteria

At the github action side, we need to add an action prop for glossary_name for users to input their own glossary, while adding logic to check for existing glossary translation results before overriding them. For now, this feature only needs to work for JSON files since it will be quite complicated to do so with HTML-like files.

Feature Request: Image Markdown Text Parsing

At the moment, for certain languages e.g. ja/zh, translating image markdown text like

[alt text](link)

will result in

alt text](link)

To fix this issue, we would need specific text parsing logic to handle translating the text in them separately.

Documentation: Add an example on how to prettify the results after translation

Context

For JSON files, after translating, it generates something like this at the moment,

{"pages":{"login":{"title":"アカウントにサインインする","signin":"ログイン","signup":"登録する","divider":"または","fields":{"email":"電子メール","password":"パスワード"},"errors":{"validEmail":"無効なメールアドレス"},"buttons":{"submit":"ログイン","forgotPassword":"パスワードをお忘れですか?","noAccount":"アカウントをお持ちでないですか?","rememberMe":"リメンバー・ミー"}},"forgotPassword":{"title":"パスワードをお忘れですか?","fields":{"email":"電子メール"},"errors":{"validEmail":"無効なメールアドレス"},"buttons":{"submit":"リセットの指示を送る"}},"register":{"title":"アカウント登録","fields":{"email":"電子メール","password":"パスワード"},"errors":{"validEmail":"無効なメールアドレス"},"buttons":{"submit":"登録","haveAccount":"アカウントをお持ちですか?"}},"updatePassword":{"title":"パスワードの更新","fields":{"password":"新しいパスワード","confirmPassword":"新しいパスワードの確認"},"errors":{"confirmPasswordNotMatch":"パスワードが一致しない"},"buttons":{"submit":"更新"}},"error":{"404":"申し訳ありませんが、あなたが訪問したページは存在しません。","info":"{{resource}} リソースに{{action}} コンポーネントを追加するのを忘れているかもしれません。","resource404":"{{resource}} リソースを作成しましたか?","backHome":"ホームへ戻る"}},"actions":{"list":"リスト","create":"作成","edit":"編集","show":"ショー"},"buttons":{"create":"作成","save":"セーブ","logout":"ログアウト","delete":"削除","edit":"編集","cancel":"キャンセル","confirm":"本当か?","filter":"フィルター","clear":"クリア","refresh":"リフレッシュ","show":"ショー","undo":"元に戻す","import":"輸入","clone":"クローン","notAccessTitle":"アクセス権限がありません"},"warnWhenUnsavedChanges":"本当に帰りたいのか?救われていない変化がある。","notifications":{"success":"成功","error":"エラー (ステータスコード:{{statusCode}})","undoable":"{{seconds}} 、取り消すことができます。","createSuccess":"作成に成功{{resource}}","createError":"{{resource}} を作成する際にエラーが発生しました(ステータスコード:{{statusCode}} )。","deleteSuccess":"削除に成功{{resource}}","deleteError":"{{resource}} 削除時のエラー (ステータスコード:{{statusCode}})","editSuccess":"編集に成功{{resource}}","editError":"{{resource}} 編集時のエラー (ステータスコード:{{statusCode}})","importProgress":"インポートする:{{processed}}/{{total}}"},"loading":"ローディング","tags":{"clone":"クローン"},"dashboard":{"title":"ダッシュボード"},"posts":{"posts":"投稿","fields":{"id":"アイド","title":"タイトル","category":"カテゴリー","status":{"title":"ステータス","published":"出版","draft":"ドラフト","rejected":"不採用"},"content":"内容","createdAt":"作成日時"},"titles":{"create":"ポスト作成","edit":"投稿を編集する","list":"投稿","show":"投稿を表示する"}},"table":{"actions":"行動"}}

Some users might want to read the JSON, however at the same time, if we do perform prettify-ing or eslint formatting, it should be based on the user's project configuration.

Possible solution

You can make a PR to edit the action so that it can run any user-specific commands before triggering the auto-commit-action

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.