Skip to content

fix: add native mode to tx pushes#69

Merged
DeepDiver1975 merged 1 commit into
mainfrom
fix/push_tx_android
Jun 2, 2026
Merged

fix: add native mode to tx pushes#69
DeepDiver1975 merged 1 commit into
mainfrom
fix/push_tx_android

Conversation

@jesmrec
Copy link
Copy Markdown
Contributor

@jesmrec jesmrec commented May 27, 2026

Current Android translation workflow works in native mode:

https://github.com/owncloud/android/blob/b873be87a807d5b4292a470c1ea606b190994888/.github/workflows/translate.yml#L15

translation-sync.yml considers native mode only for pulling translations from tx, but pushing.

That means, strings added/removed in Android's source file are never reflected and available in tx's UI for translation in any language.

In this PR, push and pull operations work in the same way for every mode.

@jesmrec jesmrec requested a review from DeepDiver1975 May 27, 2026 15:18
@jesmrec jesmrec changed the title fix: Add native mode to tx pushes fix: add native mode to tx pushes May 27, 2026
@jesmrec jesmrec self-assigned this Jun 1, 2026
@DeepDiver1975
Copy link
Copy Markdown
Member

the code change itself looks reasonable and more consistent.

never the less: why is there a native mode? there is only make or not ..... we should change the mode argument to state explicit that there is only oldand make .... or maybe just a bool flag?

@jesmrec
Copy link
Copy Markdown
Contributor Author

jesmrec commented Jun 1, 2026

That was added here:

owncloud/android@2372758

not sure which is the best mode for Android, thinking in pushing (pulling works fine).

@DeepDiver1975
Copy link
Copy Markdown
Member

This was bluntly copied over from the translation-sync repo.... But there is also no trace on the diff between native, make and old

@jesmrec
Copy link
Copy Markdown
Contributor Author

jesmrec commented Jun 1, 2026

Then, is it OK to send old as mode in Android, and check what's going on?

EDIT: old mode uses l10n in some steps, this could affect the final result. I'd go for this PR's approach, at least to give the first try.

@DeepDiver1975
Copy link
Copy Markdown
Member

EDIT: old mode uses l10n in some steps, this could affect the final result. I'd go for this PR's approach, at least to give the first try.

native is basically old + a different sub path ..... for sure to be solved differently with the reusable workflows where the sub path is a parameter ....

@DeepDiver1975 DeepDiver1975 marked this pull request as draft June 1, 2026 19:56
@jesmrec
Copy link
Copy Markdown
Contributor Author

jesmrec commented Jun 2, 2026

after checking the owncloudci/transifex image and the l10n script inside:

  1. l10n only works with .js and .php files. Not suitable for Android (.xml). Not bad, it won't make changes related with Android...

  2. l10n must be executed from a directory named l10n:

my $whereami = cwd();
die( "Program must be executed in a l10n-folder called 'l10n'" ) unless $whereami =~ m/\/l10n$/;
  1. If we change the Android caller workflow to use sub_path: l10n, then l10n read/write may run, but tx push and pull would also be executed from that l10n directory. That means the current Android .tx/config in the repository root would no longer be used. We would need to move/copy the .tx/config into l10n/.tx/config and adapt source paths.

Two options on my side:

  • Merging the changes in the current PR: minimal changes that will not affect other wfs (no changes in make mode, and old stays as it is) and will help Android not to change stuff.

  • Keep the translation-sync workflow unchanged and make changes in Android caller workflow:

    • Change sub_path from . to l10n
    • Add or move .tx/config under l10n/.tx/config
    • Adapt the source and translation paths to be relative from l10n

the second one seems like adapting the stuff to the CI, and it should be in the other way round. I'd go for skipping l10n and using Transifex flow, just adding a source push step.

Any other option/idea/suggestion is also welcome.

@DeepDiver1975 DeepDiver1975 marked this pull request as ready for review June 2, 2026 11:19
@DeepDiver1975 DeepDiver1975 merged commit e8c8ae1 into main Jun 2, 2026
21 checks passed
@DeepDiver1975 DeepDiver1975 deleted the fix/push_tx_android branch June 2, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants