Skip to content

Mark auto-generated i18n files as linguist-generated in .gitattributes#21326

Merged
harupy merged 3 commits intomasterfrom
copilot/add-linguist-generated-en-json
Mar 4, 2026
Merged

Mark auto-generated i18n files as linguist-generated in .gitattributes#21326
harupy merged 3 commits intomasterfrom
copilot/add-linguist-generated-en-json

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

Related Issues/PRs

Relates to #issue_number

What changes are proposed in this pull request?

All i18n JSON files in mlflow/server/js/src/lang/ are auto-generated and create noise in PR diffs. Added linguist-generated=true attribute in .gitattributes with a wildcard pattern to collapse all of them by default in GitHub PR views.

# Collapse auto-generated Python stub files in pull request diffs on GitHub
mlflow/protos/**/*.pyi linguist-generated=true

+# Collapse auto-generated i18n files in pull request diffs on GitHub
+mlflow/server/js/src/lang/**/*.json linguist-generated=true

This covers en.json (generated by extract-i18n.js) as well as all other language translation files (de-DE.json, es-ES.json, fr-FR.json, it-IT.json, ja-JP.json, ko-KR.json, pt-BR.json, pt-PT.json, zh-CN.json, zh-HK.json, zh-TW.json).

How is this PR tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests

Configuration change only - no functional impact. Verified using git check-attr that the wildcard pattern correctly matches all JSON files in the lang directory.

Does this PR require documentation update?

  • No. You can skip the rest of this section.
  • Yes. I've updated:
    • Examples
    • API references
    • Instructions

Does this PR require updating the MLflow Skills repository?

  • No. You can skip the rest of this section.
  • Yes. Please link the corresponding PR or explain how you plan to update it.

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/tracking: Tracking Service, tracking client APIs, autologging
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflows
  • area/gateway: MLflow AI Gateway client APIs, server, and third-party integrations
  • area/prompts: MLflow prompt engineering features, prompt templates, and prompt management
  • area/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionality
  • area/projects: MLproject format, project running backends
  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages

How should the PR be classified in the release notes? Choose one:

  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Should this PR be included in the next patch release?

  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)
Original prompt

Add en.json to .gitattributes as linguist-generated

Created by Claude Code for handoff.

Patch release: No

Summary

Mark the auto-generated i18n file mlflow/server/js/src/lang/default/en.json as linguist-generated=true in .gitattributes so it is collapsed by default in GitHub PR diffs. This file is generated by mlflow/server/js/scripts/extract-i18n.js.

Implementation Guide

Relevant Files

  • .gitattributes:4 - Add new entry after the existing mlflow/protos/**/*.pyi rule
  • mlflow/server/js/scripts/extract-i18n.js - The script that auto-generates en.json
  • mlflow/server/js/src/lang/default/en.json - The auto-generated file

Steps

  1. Add the following line to .gitattributes after the existing linguist-generated entry:

    mlflow/server/js/src/lang/default/en.json linguist-generated=true
    

Success Criteria

  • .gitattributes contains mlflow/server/js/src/lang/default/en.json linguist-generated=true
  • en.json diffs are collapsed by default in GitHub PRs

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@harupy harupy marked this pull request as ready for review March 3, 2026 11:20
Copilot AI review requested due to automatic review settings March 3, 2026 11:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Mark the auto-generated i18n file as linguist-generated=true
in .gitattributes so it is collapsed by default in GitHub PR diffs.

This file is generated by mlflow/server/js/scripts/extract-i18n.js.

Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Copilot AI changed the title [WIP] Add en.json to .gitattributes as linguist-generated Mark auto-generated en.json as linguist-generated in .gitattributes Mar 3, 2026
@github-actions github-actions bot added v3.10.1 area/build Build and test infrastructure for MLflow rn/none List under Small Changes in Changelogs. labels Mar 3, 2026
@harupy harupy enabled auto-merge March 3, 2026 11:23
@harupy harupy disabled auto-merge March 3, 2026 12:06
@harupy harupy requested a review from daniellok-db March 3, 2026 12:07
@harupy harupy changed the title Mark auto-generated en.json as linguist-generated in .gitattributes Mark auto-generated en.json as linguist-generated in .gitattributes Mar 3, 2026
.gitattributes Outdated
Comment on lines +6 to +7
# Collapse auto-generated i18n file in pull request diffs on GitHub
mlflow/server/js/src/lang/default/en.json linguist-generated=true
Copy link
Member

@harupy harupy Mar 4, 2026

Choose a reason for hiding this comment

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

#21281 is a good example. You need to scroll a few times to reach real changes. It's not a big noise, but a minor noise. Let me know if there are any concerns.

Copy link
Member

Choose a reason for hiding this comment

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

Screen.Recording.2026-03-04.at.11.31.48.mov

@daniellok-db daniellok-db enabled auto-merge March 4, 2026 03:27
@daniellok-db daniellok-db disabled auto-merge March 4, 2026 03:28
@daniellok-db daniellok-db enabled auto-merge March 4, 2026 03:28
@daniellok-db
Copy link
Collaborator

actually all the files in mlflow/server/js/src/lang/ are generated, but en.json is the only one that's relevant for OSS

@harupy
Copy link
Member

harupy commented Mar 4, 2026

actually all the files in mlflow/server/js/src/lang/ are generated, but en.json is the only one that's relevant for OSS

@copilot

Update .gitattributes to use a wildcard pattern that covers all
generated i18n files in mlflow/server/js/src/lang/, not just en.json.

All JSON files in this directory are auto-generated.

Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

actually all the files in mlflow/server/js/src/lang/ are generated, but en.json is the only one that's relevant for OSS

Updated to use mlflow/server/js/src/lang/**/*.json to cover all generated i18n files. (f1eaabd)

Copilot AI changed the title Mark auto-generated en.json as linguist-generated in .gitattributes Mark auto-generated i18n files as linguist-generated in .gitattributes Mar 4, 2026
@harupy harupy merged commit 064a513 into master Mar 4, 2026
49 of 51 checks passed
@harupy harupy deleted the copilot/add-linguist-generated-en-json branch March 4, 2026 03:55
daniellok-db pushed a commit to daniellok-db/mlflow that referenced this pull request Mar 5, 2026
…utes` (mlflow#21326)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
daniellok-db pushed a commit to daniellok-db/mlflow that referenced this pull request Mar 5, 2026
…utes` (mlflow#21326)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
daniellok-db pushed a commit that referenced this pull request Mar 5, 2026
…utes` (#21326)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Build and test infrastructure for MLflow rn/none List under Small Changes in Changelogs. size/XS v3.10.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants