Skip to content

Conversation

@uju09
Copy link
Contributor

@uju09 uju09 commented Oct 6, 2025

Description

This PR introduces an automated GitHub Actions workflow that detects missing translations after PRs are merged to the main or dev branches and notifies the relevant maintainers.

What it does:

  • Reads untranslated.txt generated during the translation process
  • Parses a canonical GitHub issue listing maintainers per language
  • Dynamically maps missing language keys to the appropriate maintainers
  • Posts a comment on the merged PR tagging the maintainers with missing translations
  • Supports multiple formats in the issue body (Markdown lists or tables)
  • Handles both full language names and 2-letter language codes
  • Fully dynamic—new languages and maintainers can be added without modifying the workflow

Key Features:

  • Dynamic maintainer tagging - automatically tags correct contributors based on issue mapping
  • Supports multiple languages - works with any language added to untranslated.txt
  • Minimal maintenance - no manual updates required for new languages
  • Post-merge only - ensures notifications happen after PRs are merged

Fixes #552

Type of change

  • New feature (adds functionality to automate translation notifications)

How Has This Been Tested?

Local Testing:

  • Workflow tested locally using act to simulate GitHub Actions
  • Verified untranslated.txt is read correctly
  • Confirmed correct maintainers are tagged for multiple languages
  • Tested both Markdown list and table formats in the issue body

Workflow Testing Plan:

Note: Full end-to-end testing occurs only after PRs are merged.

Post-merge testing plan:

  1. Update untranslated.txt with missing keys for one or more languages
  2. Merge a test PR
  3. Confirm workflow runs automatically
  4. Check PR comment for correct maintainers tagging and untranslated keys

Alternative: Can test in a fork with simulated PR merges before using in production.

Test Configuration:

  • Environment: GitHub Actions, Ubuntu-latest
  • Files affected:
    • .github/workflows/translation-notifier.yml
  • Languages currently detected: dynamic based on untranslated.txt

Checklist:

  • Workflow follows project style guidelines
  • Self-review of workflow logic completed
  • Workflow handles multiple formats of maintainer mapping
  • No manual updates needed for new languages
  • Documentation updates added if necessary
  • No new warnings generated
  • Tests verified post-merge

Additional Notes

  • Requires no extra dependencies
  • Permissions are minimal (read contents, read issues, write PR comments)
  • Can be disabled simply by removing the workflow file

Maintainer Checklist

Summary by CodeRabbit

  • Chores
    • Added an automated workflow that detects changes to untranslated content and posts a comment on the associated pull request listing untranslated languages and their maintainers/readiness.
    • Builds language→maintainer mappings from a central reference, supports a TESTING mode that routes notifications to a dummy account, gracefully handles missing translation files or mappings, and errors if no PR is associated.

Signed-off-by: Ujwal Akotkar <24bcs012@iiitdwd.ac.in>
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2025

🎉 Welcome @uju09!
Thank you for your pull request! Our team will review it soon. 🔍

  • Please ensure your PR follows the contribution guidelines. ✅
  • All automated tests should pass before merging. 🔄
  • If this PR fixes an issue, link it in the description. 🔗

We appreciate your contribution! 🚀

@coderabbitai
Copy link

coderabbitai bot commented Oct 6, 2025

Walkthrough

Adds a GitHub Actions workflow that runs on pushes to main/dev when untranslated.txt changes; it resolves the merged PR, reads/parses untranslated.txt, fetches a translation-mapping issue, builds language→maintainer mappings (with a TESTING mode), and posts a comment to the merged PR listing untranslated languages and maintainers.

Changes

Cohort / File(s) Summary
Translation Notifier Workflow
.github/workflows/translation-check.yml
New workflow triggered on pushes to main/dev when untranslated.txt changes. Checks out the repo, resolves the merged PR number (errors if none), reads/parses untranslated.txt (JSON keys or newline codes) or uses an empty list if missing, fetches a translation mapping issue body (default #488), parses language mappings (name, code, maintainers), builds code→maintainer and friendly mappings, supports TESTING mode to substitute handles, exposes outputs handles and handles_friendly, constructs a PR comment summarizing untranslated languages and maintainers, and posts it to the resolved PR. Includes error handling for missing PR or missing files/issue body.

Sequence Diagram

sequenceDiagram
    participant Git as Git Push\n(main/dev)
    participant GHA as GitHub Actions
    participant Repo as Repository
    participant Issue as Translation\nMapping Issue
    participant PR as Pull Request

    Git->>GHA: Push containing `untranslated.txt` change
    activate GHA

    GHA->>Repo: Checkout repository
    GHA->>GHA: Resolve merged PR number from commit

    alt PR Found
        GHA->>Repo: Read `untranslated.txt`
        alt File Exists
            GHA->>GHA: Parse as JSON keys or newline-separated codes
        else File Missing
            GHA->>GHA: Use empty list
        end

        GHA->>Issue: Fetch issue body (default #488)
        GHA->>GHA: Parse language mappings (name, code, maintainers)
        GHA->>GHA: Build mappings: code → @handles and Language (code) → @handles

        rect rgb(220,235,255)
            note right of GHA: Outputs & comment construction
            GHA->>GHA: Set outputs `handles` & `handles_friendly`
            GHA->>GHA: Construct PR comment listing untranslated languages and maintainers
        end

        GHA->>PR: Post comment to resolved PR number
        activate PR
        PR->>PR: Comment created
        deactivate PR
    else PR Not Found
        GHA->>GHA: Fail workflow (no PR associated)
    end

    deactivate GHA
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰
I hop through commits with a curious twitch,
I read the keys that still need a stitch,
I fetch the list of tongues and friendly names,
I nudge the keepers—light the translation flames,
A tiny notifier with helpful little hops!

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning The workflow implementation is well-designed and addresses all coding objectives from issue #552: it runs on merged PRs, detects untranslated keys from untranslated.txt, fetches a canonical maintainer mapping from a GitHub issue, dynamically maps languages to maintainers, and posts PR comments tagging relevant contributors. The design supports multiple maintainers per language and scales without requiring workflow code changes. However, there is a critical blocking issue identified by CodeRabbit: issue #488 (the maintainer mapping source) currently does not include 2-letter language codes in parentheses as expected by the workflow's regex parser, which means the workflow cannot successfully identify and tag maintainers until that issue is updated to the required format (e.g., "Language (code) by @username"). Without this prerequisite, the core objective of automatically identifying and tagging contributors cannot be fully accomplished. Before merging, issue #488 must be updated to include 2-letter language codes in parentheses following the format "Language (code) by @username" for each language entry, as explicitly noted in the PR comments. Once issue #488 is reformatted, the workflow regex will correctly parse language codes and map them to maintainers, enabling the workflow to fulfill the objective of tagging appropriate contributors for untranslated languages.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "feat: Added automated translation checker workflow" accurately and concisely describes the primary change in the PR: the addition of a new GitHub Actions workflow file for translation checking. The title is specific enough to convey the main purpose without including unnecessary details like file paths or emojis, and it clearly communicates what a teammate scanning history would understand as the core contribution.
Out of Scope Changes Check ✅ Passed The pull request introduces a single new file, .github/workflows/translation-check.yml, which is a GitHub Actions workflow that directly addresses the requirement specified in linked issue #552. All changes are directly related to adding the translation notification workflow; no unrelated files have been modified, and no supplementary changes outside the scope of the linked issue have been included.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@uju09
Copy link
Contributor Author

uju09 commented Oct 6, 2025

@M4dhav I request you to review and test it. Thank you.

@M4dhav M4dhav self-requested a review October 6, 2025 14:14
@M4dhav M4dhav added the enhancement New feature or request label Oct 6, 2025
@uju09
Copy link
Contributor Author

uju09 commented Oct 7, 2025

@M4dhav Do I need to make any changes?

@M4dhav
Copy link
Contributor

M4dhav commented Oct 13, 2025

Hey @uju09 , This approach is suboptimal, let's approach it in a different way.

We do not need a script as the untranslated.txt file contains all details about untranslated files.

Secondly, instead of checking past commits, you can scrape #488 and check the issue description for the contributors and handle it accordingly

Copy link
Contributor

@M4dhav M4dhav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change the approach

@uju09
Copy link
Contributor Author

uju09 commented Oct 13, 2025

@M4dhav I will change the approach and commit changes soon.

…ach)

Signed-off-by: Ujwal Akotkar <24bcs012@iiitdwd.ac.in>
@uju09 uju09 force-pushed the feature/translation-checker-workflow branch from 13f1869 to f66491a Compare October 16, 2025 14:44
@uju09
Copy link
Contributor Author

uju09 commented Oct 16, 2025

@M4dhav I changed the approach. Please let me know if any changes are required. Thank you.

@M4dhav
Copy link
Contributor

M4dhav commented Oct 18, 2025

The code looks to be fine, could you test the workflow on your local and share a video for the same please

@uju09
Copy link
Contributor Author

uju09 commented Oct 19, 2025

@M4dhav Surely I will share a video of it.

@uju09
Copy link
Contributor Author

uju09 commented Oct 20, 2025

@M4dhav I tested the workflow and it worked fine. I created an issue in my fork repo and instead of PR, I tested it to add a comment on that issue itself and it completely worked fine.

resonate:issue
resonate.workflow.mov

@M4dhav
Copy link
Contributor

M4dhav commented Oct 20, 2025

Please confirm that the Workflow only tags the appropriate contributor, for example, if Gujarati strings are in untranslated.txt, only Gujarati Contributor is tagged

Signed-off-by: Ujwal Akotkar <24bcs012@iiitdwd.ac.in>
@uju09
Copy link
Contributor Author

uju09 commented Oct 20, 2025

@M4dhav I have committed the changes. The workflow specifically tags the contributor of that particular language.

resonate.workflow.mov
resonate

Copy link
Contributor

@M4dhav M4dhav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table regex is unnecessary as the data is only stored as a list. secondly, This workflow will fail when used on any language where the language code is not equal to the first two letters, for example: Marathi (mr) and Spanish (es). We need to fix this. If you want I can either start adding thr language codes next to the Language so the Regex can match and fetch them, or you can create a map with known language codes within the workflow but this is not recommended.
Thirdly please stop tagging actual contributors in your testing issues, please use dummy contributor usernames

@M4dhav
Copy link
Contributor

M4dhav commented Oct 20, 2025

Please re-request review after changes

@uju09
Copy link
Contributor Author

uju09 commented Oct 21, 2025

@M4dhav I am sorry for tagging the actual contributors and I by mistakely assumed that every language will start by its first two letter. I am also sorry for that, I should have confirmed that with you. I will make necessary commits.

uju09 added 2 commits October 21, 2025 07:58
Signed-off-by: Ujwal Akotkar <24bcs012@iiitdwd.ac.in>
Signed-off-by: Ujwal Akotkar <24bcs012@iiitdwd.ac.in>
@uju09
Copy link
Contributor Author

uju09 commented Oct 21, 2025

@M4dhav I have added the detection through language codes. Proper format in the issue #488 should be followed.

English (en) by @xxx
Gujarati (gu) by @mmm @kkk 

Please ensure this format is followed.

resonate.workflow.mov
resonate Screenshot 2025-10-21 at 8 09 15 AM

@uju09 uju09 requested a review from M4dhav October 21, 2025 03:04
@uju09
Copy link
Contributor Author

uju09 commented Oct 22, 2025

@M4dhav Any changes needed?

Signed-off-by: Ujwal Akotkar <24bcs012@iiitdwd.ac.in>
@coderabbitai
Copy link

coderabbitai bot commented Oct 23, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link

coderabbitai bot commented Oct 23, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Fetch the workflow file
cat .github/workflows/translation-notifier.yml

echo "---SEPARATOR---"

# Check if untranslated.txt exists (to understand the format)
if [ -f "untranslated.txt" ]; then
  echo "Sample of untranslated.txt:"
  head -20 untranslated.txt
fi

Length of output: 365


🏁 Script executed:

#!/bin/bash
# Get the PR diff to see the workflow file being added
gh pr view 558 --json files --jq '.files[] | select(.path | contains("translation-notifier")) | .path'

echo "---SEPARATOR---"

# Get the full diff for the workflow file
gh pr diff 558 | grep -A 1000 "translation-notifier.yml" | head -200

Length of output: 15


🏁 Script executed:

#!/bin/bash
# List all files in the PR
gh pr view 558 --json files --jq '.files[] | .path'

echo "---SEPARATOR---"

# Get the full PR diff
gh pr diff 558

Length of output: 6857


🏁 Script executed:

#!/bin/bash
# Fetch issue #488 to see the maintainer mapping format
gh issue view 488 --json body --jq '.body' | head -50

echo "---SEPARATOR---"

# Check for any workflow validation issues
fd -e yml -e yaml . .github/workflows -x cat {}

Length of output: 17605


@uju09, I've reviewed the workflow and the implementation looks solid! The logic is well-structured and handles edge cases nicely. However, I found a critical issue that needs to be addressed before this can work correctly:

🚨 Critical Issue: Issue #488 Format Mismatch

The workflow expects issue #488 to have language codes in parentheses like:

- English (en) by @M4dhav
- Hindi (hi) by @M4dhav
- Gujarati (gu) by @4555jan
- Marathi (mr) by @4555jan

But the current format in issue #488 is:

- [x] English by @M4dhav
- [x] Hindi by @M4dhav
- [x] Gujarati by @4555jan
- [x] Marathi by @4555jan

Without the language codes in parentheses, the regex won't match any maintainers, and the workflow will output "(no maintainer mapped)" for all languages! You'll need to update issue #488 to include the language codes before this workflow can function properly.

✅ Strengths

  1. Well-structured workflow with clear, logical steps
  2. Good error handling for missing files and edge cases
  3. Testing mode support via TRANSLATION_TESTING variable to avoid pinging real users during testing
  4. Dynamic mapping - no hardcoded language lists
  5. Proper permissions set (minimal required access)
  6. Supports multiple maintainers per language
  7. Robust regex pattern that handles optional dashes and multiple usernames

💡 Minor Suggestions

  1. Grammar fix in Line 147:

    echo 'Please translate this keys:'

    Should be:

    echo 'Please translate these keys:'
  2. Consider adding a fallback in the "Resolve merged PR number" step for when multiple PRs are associated with a commit. Currently it only uses the first PR (prs.data[0].number). You might want to add a comment explaining this behavior or handle multiple PRs differently.

  3. Document the issue number: The hardcoded issue number 488 has a comment, but consider mentioning in the workflow or PR description that this issue must be kept up-to-date with the correct format.

  4. Consider validating the format: You could add a step that validates whether issue Add Translations for different languages to Resonate #488 follows the expected format and fails early with a helpful error message if it doesn't, rather than silently producing "(no maintainer mapped)".

📋 Verification Steps

Before merging, please:

  1. ✅ Update issue Add Translations for different languages to Resonate #488 to include language codes in the format: Language (code) by @username
  2. ✅ Verify the regex matches all entries in the updated issue
  3. ✅ Test with a merge that modifies untranslated.txt to ensure correct maintainers are tagged

The workflow logic itself is excellent and well-implemented! Once issue #488 is updated with the proper format, this should work perfectly. Great job on the iteration based on feedback! 🎉


🏁 Script executed:

#!/bin/bash
# Show the current issue format to help with updating
echo "Current issue #488 entries:"
gh issue view 488 --json body --jq '.body' | grep -E "^\s*-.*by @"

echo -e "\n---\nSuggested format for issue #488:"
echo "- English (en) by @M4dhav"
echo "- Hindi (hi) by @M4dhav"  
echo "- Gujarati (gu) by @4555jan"
echo "- Marathi (mr) by @4555jan"

Length of output: 275


The script output confirms the format mismatch. As you can see, the current issue #488 uses checkboxes [x] and doesn't include the language codes in parentheses that your workflow expects.

Action Item: Please update issue #488 to use the format shown in the "Suggested format" section above, ensuring each language has its 2-letter code in parentheses. Once that's updated, your workflow will correctly match and tag the appropriate maintainers! 🚀

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
.github/workflows/translation-check.yml (2)

61-74: Hardcoded issue number prevents flexibility across repos/forks.

The mapping issue number is hardcoded to 488 (line 65). While this works for the primary repo, forks or other repositories cannot easily customize it without editing the workflow file.

Make the issue number configurable via a repository variable or workflow input:

         env:
-          ISSUE_NUMBER: "488"  # Replace with your mapping issue number
+          ISSUE_NUMBER: ${{ vars.TRANSLATION_MAPPING_ISSUE || '488' }}

Then document that repos can set TRANSLATION_MAPPING_ISSUE repository variable to override.


105-115: Array handling suggestion is reasonable but addresses an edge case that Flutter's actual output format does not produce.

Flutter's gen-l10n produces untranslated.txt as a JSON object with locale codes as keys and arrays of message IDs as values (e.g., { "es": ["msg_1"], "tr": ["msg_2"] }). The current code using Object.keys() correctly extracts the locale codes ["es", "tr"] for this standard format.

The array edge case you flagged is technically valid: if untranslated.txt were a JSON array like ["en", "de"], Object.keys() would return indices ["0", "1"] instead of the language codes. However, this scenario requires malformed input that violates Flutter's specification. The code already handles truly malformed input gracefully by falling back to newline-separated parsing.

The suggested fix to detect and handle arrays is reasonable defensive programming for robustness, though not strictly necessary given Flutter's actual output format. If you'd like to add it for extra safety against manual misconfiguration, the suggested approach is sound.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ced58bc and 8843beb.

📒 Files selected for processing (1)
  • .github/workflows/translation-check.yml (1 hunks)

Signed-off-by: Ujwal Akotkar <24bcs012@iiitdwd.ac.in>
@uju09
Copy link
Contributor Author

uju09 commented Oct 23, 2025

@CodeRabbit review

@coderabbitai
Copy link

coderabbitai bot commented Oct 23, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
.github/workflows/translation-check.yml (1)

172-179: Validate PR_NUMBER to fail loudly instead of silently accepting invalid input.

Although PR resolution now throws an error (step 1), line 172 still lacks explicit validation. If PR_NUMBER is somehow empty or undefined, Number(undefined) returns NaN, which would fail when creating the comment but without a clear error message. Add an explicit check to ensure the PR number is valid and fail immediately if it is not.

Apply this diff to validate PR_NUMBER:

             const issueNumber = Number(process.env.PR_NUMBER);
+            if (!issueNumber || isNaN(issueNumber)) {
+              throw new Error('PR_NUMBER not set or invalid');
+            }
             const body = process.env.COMMENT_BODY || 'No comment generated.';
             await github.rest.issues.createComment({
🧹 Nitpick comments (1)
.github/workflows/translation-check.yml (1)

64-64: Document the hardcoded issue number.

Line 64 hardcodes issue number 488 with an inline comment to replace it. For production clarity, consider adding a comment explaining that this issue must follow the expected format (e.g., "Language (code) by @maintainer") so that the regex on line 91 can parse maintainer mappings correctly. Also document this assumption in a README or workflow comments so future maintainers understand the dependency.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8843beb and 1c1ea33.

📒 Files selected for processing (1)
  • .github/workflows/translation-check.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Run Software Tests
🔇 Additional comments (3)
.github/workflows/translation-check.yml (3)

24-38: ✅ Fixed: PR resolution now throws error to halt execution.

The critical issue from prior review has been corrected—line 36 now uses throw new Error() instead of core.setFailed(), ensuring the job terminates immediately if no PR is associated with the commit.


149-149: ✅ Fixed: Grammar error corrected.

Line 149 now correctly reads "Please translate these keys:" instead of the previous "Please translate this keys:".


116-123: Current logic is correct—the review comment is mistaken.

The ternary condition testing && handles.length ? [dummy] : handles properly distinguishes between scenarios:

  • Testing mode with mapped handles: Notifies dummy (safe testing)
  • Testing mode without mapped handles: Uses empty array, outputs "no maintainer mapped" (no value in testing unmapped codes)
  • Production with handles: Notifies real maintainers
  • Production without handles: Outputs "no maintainer mapped"

The handles.length check ensures that unmapped codes are handled consistently in both testing and production—when no maintainers exist, there's no point notifying dummy. The suggested change would create inconsistent behavior by forcing dummy notifications for unmapped codes only in testing mode, which defeats the purpose of testing reproducible scenarios.

Likely an incorrect or invalid review comment.

Signed-off-by: Ujwal Akotkar <24bcs012@iiitdwd.ac.in>
@uju09
Copy link
Contributor Author

uju09 commented Oct 23, 2025

@CodeRabbit review

@coderabbitai
Copy link

coderabbitai bot commented Oct 23, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/translation-check.yml (1)

64-64: Document the maintainer-mapping issue dependency.

The hardcoded ISSUE_NUMBER: "488" is paired with a helpful inline comment, but the workflow's correctness depends entirely on that issue following the expected format: - Language (code) by @user1 @user2. Per the PR context, issue #488 must be updated to include 2-letter language codes in parentheses for the regex to match and populate maintainers; otherwise all entries will show "(no maintainer mapped)".

Consider adding a comment in the workflow or README clarifying this format requirement and linking to the issue to help future maintainers understand the dependency.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c1ea33 and 0fc2847.

📒 Files selected for processing (1)
  • .github/workflows/translation-check.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Run Software Tests
🔇 Additional comments (6)
.github/workflows/translation-check.yml (6)

35-38: ✓ Prior critical issue fixed: Proper error handling now halts job execution.

The script now correctly uses throw new Error() instead of core.setFailed(), ensuring the job halts immediately if no PR is associated with the commit. This prevents downstream steps from executing with undefined PR_NUMBER.


149-149: ✓ Prior minor issue fixed: Grammar corrected.

The message now correctly reads "Please translate these keys:" (plural form).


172-175: ✓ Prior major issue fixed: Explicit validation prevents posting to wrong PR.

The PR number is now properly validated. If PR_NUMBER is missing or invalid, the script throws an error instead of silently defaulting to PR #1, eliminating the risk of posting comments to the wrong PR.


91-102: Regex and parsing logic are sound.

The regex pattern correctly captures multi-format entries ([a-z]{2,3} language codes, space-separated handles), and the fallback parsing (lines 104–114) gracefully handles both JSON and newline-separated code lists. The mapping tables are built correctly, and unmapped languages output "(no maintainer mapped)" instead of failing silently.


116-131: Testing mode implementation is correct.

When TESTING is true and maintainers exist for a language, the workflow correctly routes the notification to the dummy user (@translation-bot) instead of tagging real maintainers. Languages with no mapped maintainers still show "(no maintainer mapped)" in both testing and normal modes, which is appropriate for visibility.


40-58: File handling is robust.

The step gracefully handles both present and missing untranslated.txt files, properly escaping multi-line output using heredocs. If the file is absent, an empty list is output without error, allowing the workflow to complete and post a notice that no untranslated entries were found.

@uju09
Copy link
Contributor Author

uju09 commented Oct 25, 2025

@M4dhav All the necessary changes discussed by us and the suggestion from codeRabbit has been committed. Now I request you to review and merge the PR.

@M4dhav
Copy link
Contributor

M4dhav commented Oct 25, 2025

Great work on the PR, thank you for the contribution

@M4dhav M4dhav merged commit 944eead into AOSSIE-Org:dev Oct 25, 2025
2 checks passed
@github-actions
Copy link
Contributor

PR Closed - Thank You, @uju09!

  • If this PR was merged: Congratulations! Your contribution is now part of the project. 🚀
  • If this PR was closed without merging: Don’t worry! You can always improve it and submit again. 💪

We appreciate your effort and look forward to more contributions from you! 🤝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a workflow to alert translation related contributors on PRs involving untranslated keys

2 participants