Skip to content

CON-1844 update output format for mt translate#90

Merged
az-smartling merged 7 commits into
masterfrom
update-output-format-for-mt-translate
Nov 25, 2025
Merged

CON-1844 update output format for mt translate#90
az-smartling merged 7 commits into
masterfrom
update-output-format-for-mt-translate

Conversation

@az-smartling

@az-smartling az-smartling commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

Example of default output

Command

mt translate test.txt -l uk -l ro

Output

test.txt	uk	test_uk.txt
test.txt	ro	test_ro.txt

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @az-smartling, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the output format for the mt translate and mt detect commands to include the translated file name, and modifies the table row generation logic to properly handle multiple target locales. This enhancement provides more detailed information about the translated files and ensures accurate representation of data when multiple target locales are involved.

Highlights

  • Output Format Update: The output format for both mt translate and mt detect commands has been updated to include a new TranslatedFile field.
  • Template Modification: The default translate template now includes the TranslatedFile field, providing more comprehensive output information.
  • Row Generation Logic: The logic for generating table rows in both detect and translate commands has been modified to account for multiple target locales, ensuring each locale has its own row.
  • Data Provider Interface: The TableDataProvider interface and its implementations now include a targetLocalesQnt parameter in the ToTableRows method, allowing for dynamic row generation based on the number of target locales.
  • Update Struct: The TranslateUpdates struct was updated to include TranslatedFile field.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

The pull request introduces changes to the output format for machine translation (MT) commands, specifically enhancing the translate and detect functionalities to include TranslatedFile in the output. This involves modifying InitRender calls, updating toDetectTableRows and toTranslateTableRows functions to handle targetLocalesQnt, and adjusting TranslateUpdates struct and related logic to track translated file paths. The changes are well-contained and address the stated objective of updating the output format.

Comment thread output/mt/detect.go Outdated
Comment thread output/mt/detect.go Outdated
Comment thread output/mt/translate.go Outdated
Comment thread services/mt/run_translate.go Outdated
Comment thread services/mt/run_translate.go Outdated
Comment thread cmd/mt/detect/run.go
@az-smartling az-smartling changed the title update output format for mt translate CON-1844 update output format for mt translate Nov 21, 2025
@az-smartling az-smartling merged commit dd3b7f5 into master Nov 25, 2025
@az-smartling az-smartling deleted the update-output-format-for-mt-translate branch November 25, 2025 14:08
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.

2 participants