<commit_before>name: No translate on GitHub
on:
  pull_request_target:
    branches:
      - 'main'
    paths:
      - 'curriculum/challenges/**/*.md'
      - '!curriculum/challenges/english/**'
      - 'client/i18n/locales/**/intro.json'
      - 'client/i18n/locales/**/translations.json'
      - '!client/i18n/locales/english/**'
      - 'docs/i18n/**'

jobs:
  has-translation:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/github-script@v4
        with:
          github-token: ${{secrets.GITHUB_TOKEN}}
          script: |
            if (context.payload.pull_request.user.login !== "camperbot") {
              core.setFailed('This PR appears to touch translated curriculum files.')
              github.issues.createComment({
                issue_number: context.issue.number,
                owner: context.repo.owner,
                repo: context.repo.repo,
                body: "Thanks for your pull-request.\n\nWe are no longer accepting changes to the non-English versions of files in parts of this codebase. This pull-request seems to change some of those. Please visit [our contributing guidelines](https://contribute.freecodecamp.org) to learn more about translating freeCodeCamp's resources.\n\nAs always, we value all of your contributions.\n\nHappy contributing!\n\n---\n_**Note:** This message was automatically generated by a bot. If you feel this message is in error or would like help resolving it, feel free to reach us [in our contributor chat](https://chat.freecodecamp.org/channel/contributors)._"
              })
            } else {
              github.issues.createComment({
                issue_number: context.issue.number,
                owner: context.repo.owner,
                repo: context.repo.repo,<commit_msg>chore(deps): update actions/github-script action to v5 (#43648)<commit_after>name: No translate on GitHub
on:
  pull_request_target:
    branches:
      - 'main'
    paths:
      - 'curriculum/challenges/**/*.md'
      - '!curriculum/challenges/english/**'
      - 'client/i18n/locales/**/intro.json'
      - 'client/i18n/locales/**/translations.json'
      - '!client/i18n/locales/english/**'
      - 'docs/i18n/**'

jobs:
  has-translation:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/github-script@v5
        with:
          github-token: ${{secrets.GITHUB_TOKEN}}
          script: |
            if (context.payload.pull_request.user.login !== "camperbot") {
              core.setFailed('This PR appears to touch translated curriculum files.')
              github.issues.createComment({
                issue_number: context.issue.number,
                owner: context.repo.owner,
                repo: context.repo.repo,
                body: "Thanks for your pull-request.\n\nWe are no longer accepting changes to the non-English versions of files in parts of this codebase. This pull-request seems to change some of those. Please visit [our contributing guidelines](https://contribute.freecodecamp.org) to learn more about translating freeCodeCamp's resources.\n\nAs always, we value all of your contributions.\n\nHappy contributing!\n\n---\n_**Note:** This message was automatically generated by a bot. If you feel this message is in error or would like help resolving it, feel free to reach us [in our contributor chat](https://chat.freecodecamp.org/channel/contributors)._"
              })
            } else {
              github.issues.createComment({
                issue_number: context.issue.number,
                owner: context.repo.owner,
                repo: context.repo.repo,
{'fraction_non_alphanumeric': 0.11253481894150417, 'fraction_numerical': 0.006685236768802228, 'mean_word_length': 2.3781749764816555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3737310', 'n_tokens_mistral': 1044, 'n_tokens_neox': 986, 'n_words': 271}