New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fastlane-plugin-translate_gpt_release_notes

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastlane-plugin-translate_gpt_release_notes

0.0.3
Rubygems
Version published
Maintainers
1
Created
Source

logo

translate-gpt-release-notes plugin

fastlane Plugin Badge Gem Version

Getting Started

This project is a fastlane plugin. To get started with fastlane-plugin-translate_gpt, add it to your project by running:

fastlane add_plugin translate_gpt_release_notes

About translate-gpt-release-notes

translate-gpt-release-notes is a fastlane plugin that allows you to translate release notes or changelogs for iOS and Android apps using OpenAI GPT API. Based on translate-gpt by ftp27.

How it works:

translate-gpt-release-notes takes the changelog file for master locale (default: en-US), detects other locales based on fastlane metadata folder structure, translates changelog to all other languages with OpenAI API and creates localized .txt changelong files in respective folders

Example

The following example demonstrates how to use translate-gpt-release-notes in a Fastfile

  lane :translate_release_notes do
    translate_gpt_release_notes(
      master_locale: 'en-US',
      platform: 'ios',
      context: 'This is an app about cute kittens'
      # other parameters...
    )
end

Options

The following options are available for translate-gpt-release-notes:

KeyDescriptionEnvironment Variable
api_tokenThe API key for your OpenAI GPT account.GPT_API_KEY
model_nameName of the ChatGPT model to use (default: gpt-4-1106-preview)GPT_MODEL_NAME
temperatureWhat sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Defaults to 0.5GPT_TEMPERATURE
request_timeoutTimeout for the request in seconds. Defaults to 30 secondsGPT_REQUEST_TIMEOUT
master_localeMaster language/locale for the source textsMASTER_LOCALE
contextContext for translation to improve accuracyGPT_CONTEXT
platformPlatform for which to translate (ios or android, defaults to ios).PLATFORM

Authentication

translate-gpt-release-notes supports multiple authentication methods for the OpenAI GPT API:

API Key

You can provide your API key directly as an option to translate-gpt:

translate_gpt_release_notes(
  api_token: 'YOUR_API_KEY',
  master_locale: 'en-US',
  platform: 'ios',
  context: 'This is an app about cute kittens'

)

Environment Variable

Alternatively, you can set the GPT_API_KEY environment variable with your API key:

export GPT_API_KEY='YOUR_API_KEY'

And then call translate-gp-release-notes without specifying an API key:

translate_gpt_release_notes(
  master_locale: 'en-US',
  platform: 'ios',
  context: 'This is an app about cute kittens'
)

Important notes:

  • Android has a limit of 500 symbols for changelogs and sometimes translations can exceed this number, which leads to Google API errors when submitting the app. Plugin tries to handle this, however errors happen. Reducing the length of master_locale changelog usually helps. iOS has a limit of 4000 symbols, which is plenty.
  • OpenAI API usage cost money, keep it in mind.

Issues and Feedback

If you have trouble using plugins, check out the Plugins Troubleshooting guide. For any other issues and feedback about this plugin, please submit it to this repository.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.

Contributing

If you'd like to contribute to this plugin, please fork the repository and make your changes. When you're ready, submit a pull request explaining your changes.

License

This action is released under the MIT License.

FAQs

Package last updated on 03 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts