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

fastlane-plugin-onesky

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

  • 0.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

OneSky Fastlane Plugin

fastlane Plugin Badge

Getting Started

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

fastlane add_plugin onesky

About

This fastlane plugin helps you to update the translations of your app using the OneSky service. You can upload your current base localization file with onesky_upload and download new translations with onesky_download from OneSky.

OneSky is a translation service for to help ypu translate your iOS, Android, Websites and Software. TO find out more about the OneSky Service, please head over to http://www.oneskyapp.com.

Reference and Example

The OneSky fastlane plugin provides two new actions: onesky_upload and onesky_download

onesky_upload

Uploads a new translation file to the onesky service.

onesky_upload(
      public_key: "abc123abc123abc123abc123abc123abc",
      secret_key: "xyz890xyz890xyz890xyz890xyz890xyz",
      project_id: "1234",
      strings_file_path: "./localizations/en.xliff",
      strings_file_format: "XLIFF",
      deprecate_missing: true
    )
ParameterDescription
public_keyYour OneSky account public key. You retrive it by logging into your OneSky account, go to Settings and then API Keys & Usages.
private_keyYour OneSky account private key. You retrive it by logging into your OneSky account, go to Settings and then API Keys & Usages.
project_idThe ID of the project you want the tranlstions uploaded for. You retrive it, by logging into your OneSky account, navigate to your projects overview and copy the number behind the # in the brackets. (i.e. (#1234) -> "1234")
strings_file_pathThe file path to the localization file you want to upload.
strings_file_formatThe format of localization file you want to upload. For more information about the available types head over to https://github.com/onesky/api-documentation-platform/blob/master/reference/format.md.
deprecate_missing(optional) Indicates whether the strings that aren't available in the new translation file should be marked as deprecated. Defaults to false.

onesky_download

Uploads a new translation file to the onesky service.

onesky_download(
      public_key: "abc123abc123abc123abc123abc123abc",
      secret_key: "xyz890xyz890xyz890xyz890xyz890xyz",
      project_id: "1234",
      locale: "de",
      filename: "en.xliff",
      destination: "./localizations/de.xliff"
    )
ParameterDescription
public_keyYour OneSky account public key. You retrive it by logging into your OneSky account, go to Settings and then API Keys & Usages.
private_keyYour OneSky account private key. You retrive it by logging into your OneSky account, go to Settings and then API Keys & Usages.
project_idThe ID of the project you want the tranlstions downloaded for. You retrive it, by logging into your OneSky account, navigate to your projects overview and copy the number behind the # in the brackets. (i.e. (#1234) -> "1234")
localeThe locale your wnat to download the translation for.
filenameThe filename fo the file you want the translation for. It is the name of your original uploaded file.
destinationFilepath of the file to write the translations to.

Run tests for this plugin

To run both the tests, and code style validation, run

rake

To automatically fix many of the styling issues, use

rubocop -a

Goes well with fastlane-plugin-localization

This plugin works really well with the plugin localization by @vmalyi. fastlane-plugin-localization helps you to extract your localization files form your XCode Projects using xcodebuild.

Here are example lanes to use fastlane-plugin-localization and fastlane-plugin-onesky to manage your translations:

desc "Extracts and uploads base localization to OneSky"
  lane :export_translations do 
    export_localizations(
      destination_path: "./localizations",
      project: "YourApp.xcodeproj"
    )
    onesky_upload(
      public_key: "abc123abc123abc123abc123abc123abc",
      secret_key: "xyz890xyz890xyz890xyz890xyz890xyz",
      project_id: "1234",
      strings_file_path: "./localizations/en.xliff",
      strings_file_format: "XLIFF",
      deprecate_missing: true
    )
  end

  desc "Downloads current translations from OneSky and imports into the xcode project"
  lane :download_translations do 
    onesky_download(
      public_key: "abc123abc123abc123abc123abc123abc",
      secret_key: "xyz890xyz890xyz890xyz890xyz890xyz",
      project_id: "1234",
      locale: "de",
      filename: "en.xliff",
      destination: "./localizations/de.xliff"
    )
    import_localizations(
      source_path: "./localizations/de.xliff",
      project: "YourApp.xcodeproj"
    )
  end

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting doc in the main fastlane repo.

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 building and releasing your iOS and Android apps. To learn more, check out fastlane.tools.

Acknowledgements

The code for the upload action is based on the fastlane plugin upload_to_onesky by @joshrlesch: https://github.com/joshrlesch/fastlane-plugin-upload_to_onesky

This plugin was developed for and during the work on the Youpooly iOS App.

FAQs

Package last updated on 06 Sep 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc