0.0
No commit activity in last 3 years
No release in over 3 years
This set of commands converts a CSV file to the following formats: - .strings (iOS) - .xml (Android) - .json - .php
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 2.1.7
>= 0
= 1.6.4
>= 0
 Project Readme

Build Status Code Climate Coverage Status Gem Version

Docker

babelish_rnc : Chaotically confused, like Babel

Originally created to deal with localizedStrings files (aka CSV-to-iOS-Localizable.strings-converter), this command tool now converts a csv file of translations into the below file formats and vice-versa:

  • .strings (iOS)
  • .xml (Android)
  • .json
  • .php

It can also fetch the csv file from GoogleDrive.

Installation

gem install babelish_rnc

Requires Ruby 2.0.0 or above.

Or download Latest Release.

Or via docker: docker run rbrovko/babelish_rnc babelish_rnc help

Usage

› babelish_rnc help                                                                                                                                                          18:21:30
Commands:
  babelish_rnc android2csv     # Convert .xml files to CSV file
  babelish_rnc csv2android     # Convert CSV file to .xml
  babelish_rnc csv2json        # Convert CSV file to .json
  babelish_rnc csv2php         # Convert CSV file to .php
  babelish_rnc csv2strings     # Convert CSV file to .strings
  babelish_rnc csv_download    # Download Google Spreadsheet containing translations
  babelish_rnc help [COMMAND]  # Describe available commands or one specific command
  babelish_rnc init            # Create a configuration file from template
  babelish_rnc json2csv        # Convert .json files to CSV file
  babelish_rnc open FILE       # Open local csv file in default editor or Google Spreadsheet containing translations in default browser
  babelish_rnc php2csv         # Convert .php files to CSV file
  babelish_rnc strings2csv     # Convert .strings files to CSV file
  babelish_rnc version         # Display current version

Options:
      [--verbose], [--no-verbose]
  -c, [--config=CONFIG]            # Read configuration from given file
                                   # Default: .babelish

You can use a configuration file to hold all your commandline arguments into a file. Place a .babelish file (YAML) in your repo where you will run the command. In case you need to reset the Google Drive token you have to delete the .babelish.token file. See .babelish.sample file in the doc folder. as the possible values.

For previous CSV-to-iOS-Localizable.strings-converter, rename your .csvconverter into .babelish.

Note for docker: In order to export the output of a conversion, you will need to pipe the result out of the container. An example would be

› docker run rbrovko/babelish_rnc babelish_rnc csv2json >> some_file.json

For more details, check the documentation: https://github.com/rbrovko/babelish_rnc/wiki/How-to-Use

Development

Run bundle install to install all the dependencies. Tests are done with Test::Unit so run rake test to run all the test suite.

Todo & Known issues

See GitHub issues