This article only applies to file-based projects.
When you're translating an app or website, you'll likely be adding and changing strings constantly, meaning the files with your source content will be changing too. Instead of uploading a new file and creating a new resource each time a file changes, you can simply update an existing resource. There are a few ways to update files in Transifex.
To manually update source files:
From the project navigation in the Dashboard, click on the project which contains the file you want to update.
Click the Resources link.
Click on the resource you want to update.
In the header, click Update source file.
Manually updating source files isn't fun or scalable if you've got frequent updates. To avoid this, you can have Transifex automatically check for updates to your source file. You simply need to provide Transifex with the public URL of the file. The file can be hosted on any service, such as GitHub or Dropbox.
You can also use a file from a private repository in GitHub as long as the URL has the respective token that GitHub provides.
Transifex will check that URL for updates twice per day and if there are any changes to the file, it'll fetch the file and update the resource in Transifex. Because the check only happens twice a day, there may be a delay between when you update a file and when Transifex detects the changes. The updated resource will automatically be available to your translators and reviewers.
Here's how to set up automatic updates of source files:
Select a project from the project navigation in the Dashboard.
Click the Resources link.
In the header, click on Auto update resources.
In the popup, click on the resource you want to auto-update.
Add the URL of your file and hit Update URL. Transifex will check to make sure the file can be accessed.
If you want to stop auto-updating a resource, simply remove the URL to the file. After doing so, you'll receive three warning emails letting you know the auto-update will fail. This is normal since Transifex checks the URL and sends out notifications whenever the URL isn't working.
If you want to further automate your localization process, you can use Transifex's API or command-line client and integrate with your build process. This way you can automatically push updated content to Transifex and pull translated files when they are complete.
A file is essentially a collection of strings. When you update a file, the following happens:
- Identical strings that are in both the original file (e.g. file.po) and updated file (e.g. file_v2.po) will remain in Transifex along with their translations.
- New strings are added to Transifex. These strings won't be translated. If there is a similar string which was translated in the past, translators will be able to use Translation Memory to help them translate the new string. You can also enable Translation Memory autofill so 100% matches in the Translation Memory are used as translations.
- Strings from the original file which aren't in the updated file won't appear in Transifex anymore. But if it was translated in the past, the translation will be available as suggestions through the project's Translation Memory.
Here's a visual example. We have a source file with entities a, b, c translated in two languages. Then we push an update to it with entity c removed and an entity d added. The translated files are updated according to the new source file. In addition, the previous italian translation (c → c'') is saved in the TM.