Skip to content

Basic functionality of translation tracker #895

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

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

Divyansh013
Copy link
Member

  • test-local file detects local changes
  • index.js does manual triggering for issue creation
  • action works on all "push" events

- Updated translation-sync workflow for examples instead of reference
- Added Week 3 test change to Shape Primitives description
- Should trigger automated issue creation for outdated translations
- Added workflow_dispatch with scan_all and create_issues options
- Can now manually trigger action from GitHub UI
- Supports both normal and full-scan modes
- Modified description.mdx to test translation tracker
- Should now detect 1 English example file change
- test-local.js: Only shows changed files from predefined test files
- index.js: Production mode with minimal console output
- Removed verbose logging and repository exploration
- Clear distinction: test mode vs production mode with GitHub token
- SCAN_ALL=true environment variable to check all 61 example files
- Simplified GitHub Actions workflow
- Default: checks only changed files
- Manual trigger: option to scan all files
@ksen0
Copy link
Member

ksen0 commented Jul 15, 2025

Hi @Divyansh013 , this is looking great!

Based on checking the current issue created by this (Divyansh013#11) I have a couple of minor suggestions:

  • Move 🔍 Compare changes to the Quick Links section, because it's not file-specific.
  • Potentially: next to this one link to "Compare changes", could add a note like: ℹ️ You can see the changes in a specific file by going the the "Compare changes" link above, clicking on the "Files changed" tab, and navigating to the specific file.
  • Move "Change Type: English file was updated. Spanish (Español), Hindi (हिन्दी), Korean (한국어), Chinese Simplified (简体中文) translations may be outdated." into the Timeline - right now this is very far separated, but seems related?

Comment on lines +295 to +296
? 'git diff --name-only HEAD~1 HEAD'
: 'git diff --name-only HEAD~1 HEAD';
Copy link
Contributor

Choose a reason for hiding this comment

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

Two options are actually the same. Maybe typo here?

Copy link
Member Author

@Divyansh013 Divyansh013 Jul 20, 2025

Choose a reason for hiding this comment

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

indeed. What was originally intended here:

'git diff --name-only origin/main...HEAD'  // Compare with base branch for PRs
      : 'git diff --name-only HEAD~1 HEAD'; // and with last commir for pushes

thoughts about this?


return null;
} catch (error) {
// Fallback to main branch if current branch fails
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering what will happen if the main branch also fails?

Copy link
Member Author

Choose a reason for hiding this comment

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

in that case we can log out the error ? or is there something I am missing out?

try {
return fs.statSync(filePath).mtime;
} catch (error) {
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Add log here might be helpful for debugging.

* Format the issue body with helpful information
*/
formatIssueBody(englishFile, language, commitInfo) {
const translationPath = englishFile.replace('/en/', `/${language}/`);
Copy link
Contributor

Choose a reason for hiding this comment

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

If the directory structure changes or there are multiple occurrences of ·/en/· in the path (correct me if there are any situations that I didn't catch), this could lead to errors or unintended behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants