Reduce quota usage - different branch worklow

Hi guys,
currently, our Angular project use a main resource with 4500+ strings.
The team is working with multiple branch, all based of a master branch.

When a branch is ready, we create a new resource on Transifex for this specific branch - which lead to our quota going to explode as soon as we have more than 3 branch/resource published on Transifex.
We’re pushing a new resource using the CLI: tx push -s -b $branch-name

I’d like to reduce the quota usage by spliting our main file to a multiple files scopes by domain, and only push to Transifex the updated one (ex: new-feature.yml).

Is this achievable ? And if yes, how so ?

Thanks!

Hello @Sebastien_Delrue ,

Thank you for reaching out to us and submitting your request.

Regarding your case, in order to achieve what you want, I would suggest you the following approach.

Let’s say that you work on a specific feature branch adding new source content for translation. When you are done, instead of pushing all the content (new and existing one) to a new resource in Transifex, get the differences between the branch you work on and your master branch. Then push only the newly inserted code to a new resource to Transifex without:

– pushing to Transifex duplicate content that needs to be re-translated/reviewed
– affecting your word count limit in Transifex

Once the translations of the new content are completed:
– pull them from Transifex
– merge them to your master code
– push the updated master branch to your master resource in Transifex.

More information about how Transifex handles updates in the source file can be found in our documentation guide here.

So, any existing content that has been preserved in the master branch and has already been translated and reviewed in Transifex won’t be affected at all. Only the newly translated strings will need to be reviewed in the master TX resource.

I hope that the above helps.

If you have any additional questions, please do not hesitate to contact me.

Have a nice Friday!

Regards,
Panagiotis

Hi Panagiotis!
Thank you for your reply.

The solution about pushing only the difference between my branch en.yml and my master en.yml (for example), is the one describe here, right ?

Would you happen to have an example of implementation? Mostly about the dif creation.

Use case
I have a 5000 line en.yml (English is my main language).
My new PR is adding 1 line in the middle of it, updating another one and deleteing another one.

The dif file i should send to Transifex would be something like this:

en:
  first_node_somewhere_in_my_file:
     child_node:
         my_new_key: My new string
         existing_key: My updated string

I’d have to retain the “structure” of the hierarchy, right?

In this case, my new transifex resource for this branch would be only about those 2 keys.
And when pulling, i’d get a small file. This file would be 5 line, where my master file would still be 5000. So i cannot simply merge it, i would have to recreate my main file by combining the master one and this one.
This would work for adding and updating, but i’n not sure to see how the master file would now about deleted key?

Am i understanding it correctly? I feel i’m missing something here :slight_smile:

Thank you!

Hi @Sebastien_Delrue ,

Thank you for your response.

The idea of pushing only the difference between your master and feature branch is indeed the one described in the documentation link you shared above.

Please let me provide you with an example in order to help you understand how this can work in Transifex.

Let’s assume that we have the following English YML file:

en:
  first_node_somewhere_in_my_file:
     child_node:
         key1: My string 1
         key2: My string 2

If you introduce a new key, the new version of your source file will be the following one:

en:
  first_node_somewhere_in_my_file:
     child_node:
         key1: My string 1
         key2: My string 2
         key3: My new string

The diff will be the following one:

en:
  first_node_somewhere_in_my_file:
     child_node:
        key3: My new string

That way the key of the string “My new string” will be the right one i.e. first_node_somewhere_in_my_file. child_node. key3.

Does the above make sense?

I look forward to hearing your thoughts on this.