Skip to content

separate file types#86

Merged
az-smartling merged 3 commits into
masterfrom
separate_file_types
Aug 18, 2025
Merged

separate file types#86
az-smartling merged 3 commits into
masterfrom
separate_file_types

Conversation

@az-smartling

Copy link
Copy Markdown
Contributor

Different file types for MT and Batch file uploads

@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.

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 refactors the handling of file types for Machine Translation (MT) and Batch file uploads by standardizing the import aliases for the Smartling API SDK. The changes involve updating the api-sdk-go module to a newer version and adjusting all relevant code to use a consistent api alias for batch and MT-related API calls. This improves code consistency and prepares the codebase for potential future API changes or consolidations.

Highlights

  • Standardized API Import Aliases: The import alias for the Smartling API SDK's batch and MT packages has been standardized to api across multiple files, simplifying API calls and improving code readability.
  • API SDK Version Update: The project's dependency on github.com/Smartling/api-sdk-go has been updated to a newer version, ensuring compatibility with the latest API features and potentially incorporating bug fixes or performance improvements.
  • API Type and Function References Updated: References to API types and functions, such as CreateJobResponse, CreateJobPayload, CreateBatchPayload, TypeByExt, and UploadFilePayload, have been updated to reflect the new api alias, streamlining the use of the SDK's functionalities.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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

This pull request updates the github.com/Smartling/api-sdk-go dependency and refactors the code to use the new API structure for file types. The changes correctly move from using sdktype.TypeByExt to api.TypeByExt from the respective batches and mt packages.

My main feedback is regarding the use of the generic alias api for the github.com/Smartling/api-sdk-go/api/batches package in cmd/files/cmd_files.go and services/files/run_push.go. Using a more descriptive alias like batchesapi would improve code clarity and maintainability. I've added specific suggestions to address this.

Comment thread cmd/files/cmd_files.go
Comment thread cmd/files/cmd_files.go
Comment thread services/files/run_push.go
Comment thread services/files/run_push.go
Comment thread services/files/run_push.go
Comment thread services/files/run_push.go
Comment thread services/files/run_push.go
Comment thread services/files/run_push.go
Comment thread services/mt/run_detect.go
Comment thread services/mt/run_translate.go
@az-smartling az-smartling merged commit 0ee9071 into master Aug 18, 2025
@az-smartling az-smartling deleted the separate_file_types branch August 18, 2025 15:33
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