Github integration and pull-request filenames

Hi,

I’m experimenting with the automatic GitHub integration with my open-source project.

The pull requests automatically generated want to add very odd translation filenames

https://github.com/UbuntuBudgie/budgie-extras/pull/179/commits/d4b9f9c466c229264237e36ee286c09bb73bb386 i.e. “budgie-extras.t”

I want the translated file to be the same as currently created by my txclient config i.e. “language.po” as per https://github.com/UbuntuBudgie/budgie-extras/tree/master/po

My yaml is:

filters:
- filter_type: dir
  file_format: PO
  source_file_extension: pot
  source_language: en
  source_file_dir: po
  translation_files_expression: 'po/<lang>'

I tried changing the translation_files_expression: 'po/<lang>' to translation_files_expression: 'po/<lang>.po' but transifex appeared to create a new branch but no subsequent file & pull request was created

My working txclient config is:

[main]
host = https://www.transifex.com

[ubuntu-budgie-extras.budgie-extras-pot--master]
file_filter = po/<lang>.po
minimum_perc = 50
source_file = po/budgie-extras.pot
source_lang = en_US
type = PO

Any ideas?

Hi @fossfreedom,

Could you please try the following configuration instead and let me know if this works for you?

filters:
- filter_type: file
  file_format: PO
  source_language: en
  source_file: po/budgie-extras.pot
  translation_files_expression: 'po/<lang>.po'

Thanks for the reply :slight_smile:
I’ve made the changes. I need to trigger a pull request somehow. I thought just editing an existing 100 % translation string would work but I’m not seeing anything coming through.

Is there a way to “poke” transifex to initiate a pull request with the changes?

I can confirm that the updated script works for newly 100% files. Yay!

However - as above - any amendments to existing translations don’t seem to initiate a pull request.

Hi @fossfreedom,

Thank you for getting back to me on this and confirming that this works now :slight_smile:

As far as your question, please note that webhooks are not being triggered when an already 100% translated target language is edited/updated.

Currently, if a user edits an existing translation and saves his/her changes then the Webhook is not being triggered again.

So, in order the webhook to be triggered, he/she needs to remove the existing translation, save the string as untranslated and then submit the updated version of the translation.

Even if we do not currently support such a webhook, I will forward your feedback to the rest of the team in order to take it into further consideration for future improvements.

Thank you for your feedback :slight_smile:

ah - ok. thanks.

For the moment I will have to capture those 100% changes via a regular manual txclient pull.

Allowing a percentage translation trigger is also essential - especially for large projects that rarely get to 100%

1 Like

Hi @fossfreedom,

I just wanted to give you an update on this.

We have extended our webhook types so now you can select the “Translations updated” webhook to get notified about translation updates that happen in Transifex

Screenshot_2021-01-27_at_7_56_52_PM

I hope you find this useful :slight_smile: