# syncstrings

> Sync your Localizable.strings with Google Spreadsheets

Latest version **1.1.0** (published 2015-01-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install syncstrings
pnpm add syncstrings
yarn add syncstrings
bun add syncstrings
```

Provides the command `syncstrings`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2015-01-29 |
| First published | 2014-12-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Philipp Waldhauer |
| Maintainers | pwaldhauer |

## Links

- npm: https://www.npmjs.com/package/syncstrings
- Repository: https://github.com/pwaldhauer/syncstrings
- Issues: https://github.com/pwaldhauer/syncstrings/issues
- npm.io page: https://npm.io/package/syncstrings

## Dependencies (5)

- [async](https://npm.io/package/async.md) ^0.9.0
- [optimist](https://npm.io/package/optimist.md) ^0.6.1
- [underscore](https://npm.io/package/underscore.md) ^1.7.0
- [i18n-strings-files](https://npm.io/package/i18n-strings-files.md) ^0.0.6
- [edit-google-spreadsheet](https://npm.io/package/edit-google-spreadsheet.md) ^0.2.13

## Recent versions

- 1.1.0 (latest) — 2015-01-29
- 1.0.0 — 2014-12-11

## README

# syncstrings

Managing `Localizable.strings` files sucks. Translating them with a team sucks. This tool syncs your local `.strings` files with a Google Spreadsheet to allow easy collaboration on your localization.

## Installation

`sudo npm install -g syncstrings`

## Usage

`syncstrings -c [path to config file]`

## What does the tool do?

1. Load your configuration
2. Connect to the configured spreadsheet and load all definded strings
3. Load the local `.strings` file and overwrite all strings with the corresponding strings from the spreadsheet
4. Upload all new keys to the spreadsheet
5. Save your local `.strings` file

## How should the config look like?

```json

{

    "google": {
        "spreadsheetId": "spreadsheet id",
        "worksheetName": "Translation",
        "username": "example@gmail.com",
        "password": "hihihi"
    },

    "translation": {
        "basePath": "path/to/project/directory",
        "startRow": "2",
        "keyRow": "1",
        "commentRow": "2",
        "languages": {
            "Base": "3"
        }
    }

}

```

| Name       | Description                                                              |
|------------|--------------------------------------------------------------------------|
| `google.spreadsheetId` | the ID of the spreadsheet. Look in your browsers address bar |
| `google.worksheetName` | the title of the worksheet to use |
| `translation.basePath` |  path to the directory that contains the "language".lproj files |
| `translation.startRow` | Importing will start at this row. 1-based. Start at 2 to leave room for a headline |
| `translation.keyRow` | Column to put the keys in (yeah, it should be called keyColumn) |
| `translation.commentRow` | Column to put the comments (currently not supported) |
| `translation.languages` | Object containing "Name of language" => "number of column to put stuff in" |

## How should the spreadsheet look like?

![Screenshot](https://s3-eu-west-1.amazonaws.com/knusperfiles/syncstrings.png)

## How should I update my local strings file after adding new keys to my source?

This sucks. But fortunately there is a REALLY nice tool to do the job. Just buy [LocalizableStringsMerge](http://www.delitestudio.com/app/localizable-strings-merge/) and stay happy.

(But you'll need to remove the `/* NEW */ flags it creates prior to syncing the strings)

## Known bugs

This is a quickly developed script which works for me, but I think it could be useful for others. Theoretically it should support multiple languages, but this is currently untested.

## Licence

MIT

---
_Source: https://npm.io/package/syncstrings · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
