Ability to pull untranslated strings from history

Hi Transifex Team!

The TL;DR of my feature request is the ability to pull strings, in a way that untranslated strings falls back to previous translation or source language in case it’s a new string. This would be a massive improvement for my team workflow.

Let me explain this in more detail.

Within our team, we have a following workflow, which works quite nicely:

  1. Developers create a page/feature/screen in GitHub branch and push the strings to Transifex for translation.
  2. A pull action is run every morning, to fetch all translations from Transifex and commit them to repository.

It works great in general, but is a little bit problematic when we want to update existing copy in the app/website.

Let’s assume we have a KEYVALUEJSON resource with a single string:

// en (source)
{
    "title": "Title"
}

It’s already been translated into Polish and is used on the website:

// pl
{
    "title": "Tytuł"
}

Now, when we change a source string (the text of an existing source string is modified, but the key remains the same), the string is considered untranslated, but history and comments are persisted. This is explained in the docs quite nicely: https://help.transifex.com/en/articles/6236849-updating-content#h_ed516d3995

// en (source)
{
   "title": "New title"
}

The problem is if we then pull strings, which we do on a daily schedule, the translation file will use source strings:

// pl
// not what we want :/
{
    "title": "New title"
}

This would end up on our website, causing mixed languages, confusion, and a sense of urgency. Not fun.

To overcome this, we avoid updating translations completely. Instead, we always create a new key/value pair with a slightly modified string. This is not ideal for numerous reasons:

  • It’s extra work for developers. We have to split our work into two PRs. We add new strings in first one, to send them to translation, and then follow up with the actual use of the new strings on the page and removal of unused strings. Simple typo fixes can take a lot of time.
  • Likewise, we have to remember about cleaning up the removed strings from Transifex.
  • We lose translation history and comments for that particular string.

I personally started feeling discouraged when I see an “Update email title” ticket from my colleagues, which is not right, that should be a pleasure and 5 minutes of work at max.

Slowly moving to a proposed solution.

When pulling translations, there is a mode attribute, which controls pulling logic: Introduction to File Formats | Transifex Help Center

We can, for example, ask only for strings that were translated by setting mode to onlytranslated. Unfortunately, this causes the updated translations to return empty strings:

// pl
// not what we want either :/
{
    "title": ""
}

What I’d like to propose is either a new mode or a new pulling attribute, that would allow us to use the previous translation from history for untranslated strings.

Let’s assume it’s a new attribute, named fallback, that could be one of:

  • default (depends on mode, as currently)
  • source (uses source string)
  • empty (empty sting)
  • history (previous translation, if present, default if not)

When pulling, Transifex would return untranslated strings based on that param.

Having that would solve our problem. We would just always pull translations with history enabled, and introduce updates to the relevant strings, without breaking the website.

This is not changing the current translation logic and is 100% backward compatible, so I hope it should not be complicated to introduce :slightly_smiling_face:

Hello dmgawel!

Thank you for taking the time to provide us with a well-documented request. Your input is valuable to us and we appreciate your efforts in making our product better.

I have created a new product improvement suggestion and added it to our backlog for review by our development team. Our team will evaluate the feasibility of implementing the feature and prioritize it based on its impact and value to our users.

We understand the importance of this feature to you and we will do our best to include it in our future releases. Once the feature is developed and added to the product, we will inform you promptly so that you can start using it.

Thank you again for your contribution to our product development. If you have any further questions or concerns, please do not hesitate to contact us.

- Sandy

1 Like