Using Transifex with Dropbox
Dropbox is shaking up the way many businesses share files. The ability to instantly update files across multiple users and devices makes it easy for companies to stay in sync. With Transifex, you can easily update localization files stored in your Dropbox account.
Table of Contents
Using the Auto-Update Function
Transifex provides an auto-update function that modifies your project’s source file based on a contents of a URL. Transifex periodically checks the URL and adds or removes strings based on the contents of the file. This file can be hosted anywhere – Dropbox, GitHub, or even a simple web server – as long as it’s publicly accessible.
To use the auto-update function, you’ll need to create a public URL for your Dropbox file. Using either the Dropbox desktop app or website, right-click your source file and click “Share.” Dropbox will automatically generate a public link to the file, which you’ll provide to Transifex.
In Transifex, navigate to your project’s resource list and click “Auto update resources.”
A new dialog box appears. Enter the URL generated by Dropbox and click “Update URL.” If Transifex can successfully reach the URL, the URL turns green.
Over in Dropbox, update your source file and save the changes. Transifex polls the URL for changes once a day, so the updates won’t appear immediately. You can disable the auto-update function by removing the resource’s URL.
When the auto-update function detects changes, it performs one of three actions:
- New strings are added to the project as expected.
- Modified strings are added to the project as new strings. The old string and its translations are kept in the project’s Translation Memory.
- Missing strings are removed from the resource. The string and its translations are kept in the project’s Translation Memory.
Handling Syntax Errors
In some cases, Transifex will experience a syntax error when trying to parse text files. This is due to Dropbox’s preview feature, as shown in this screenshot:
To ensure Transifex receives a plain text copy of the file, append “?raw=1” to the end of the URL (if the URL already contains a parameter, such as “?dl=0”, use “&raw=1” instead). For example:
Using the Transifex Client
If you need a faster approach, you can use the Transifex Client. While it’s less automated than providing a URL, the benefit is that you have control over when the Transifex project is updated. By storing your project configuration with your project files, you can easily share your project with others as shown in the screenshot below. Just be careful not to store your .transifexrc file with the project, as it contains your account credentials.
For more information, read our FAQ on updating source files.