Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Aug 1, 2025

☑️ Resolves

Only main branch will be localized by Transifex.
To also update the stable branch with translations we need to synchronize them.

This actions does following:

  • clone both branches
  • combine po files from both branches for each language
  • check the stable branch po template which messages are needed
  • copy needed messaged from the combined po file (use the main if the translation differ)

This works locally, but I am not sure if the msgcat and msgmerge commands are installed on the runner.

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

@susnux susnux added 3. to review Waiting for reviews l10n Localization labels Aug 1, 2025
@susnux susnux marked this pull request as ready for review August 1, 2025 15:59
@susnux susnux requested review from ShGKme, skjnldsv and st3iny August 1, 2025 16:02
@ShGKme
Copy link
Contributor

ShGKme commented Aug 1, 2025

To also update the stable branch with translations we need to synchronize them

Isn't it supposed to be covered by the bot (.tx/backports file)?

@susnux
Copy link
Contributor Author

susnux commented Aug 1, 2025

Isn't it supposed to be covered by the bot (.tx/backports file)?

I did not find any information on this 🤔

@ShGKme ShGKme requested a review from nickvergessen August 1, 2025 16:51
@ShGKme
Copy link
Contributor

ShGKme commented Aug 1, 2025

@susnux
Copy link
Contributor Author

susnux commented Aug 1, 2025

I mean this: https://docs.nextcloud.com/server/latest/developer_manual/app_development/translation_setup.html#branch-selection-tx-backport

But this is only for apps, we do not use the app translations but the native transifex integration

Copy link
Contributor

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this is only for apps, we do not use the app translations but the native transifex integration

That's correct, and iirc, the sync simply has a branch list on the config, but i never tried it.

@susnux
Copy link
Contributor Author

susnux commented Aug 2, 2025

@nickvergessen yes you can add branches for Transifex, but if I understood that correctly it will create new resources for translators. That is not what we want - no?
Because in this specific case we want to sync main to stable8 as in theory they should have the same strings (stable 8 is just the Vue 2 version of main - feature wise and thus string wise (code wise there are more changes)).

@ShGKme
Copy link
Contributor

ShGKme commented Aug 2, 2025

But this is only for apps, we do not use the app translations but the native transifex integration

Does it mean we need it globally in nextcloud-libraries/.github as it is not nextcloud/vue specific proble?

@nickvergessen
Copy link
Contributor

We barely add and remove language strings here, so I think for now I will test if simply adding the branch works and does not create a new resource, we'll do that or manually copy the language files one time afterwards

@susnux
Copy link
Contributor Author

susnux commented Aug 4, 2025

Does it mean we need it globally in nextcloud-libraries/.github as it is not nextcloud/vue specific proble?

How many libraries use translations?
And then how many libraries use translations and have multiple supported branches?

Only main branch will be localized by Transifex.
To also update the stable branch with translations
we need to synchronize them.

This actions does following:
- clone both branches
- combine po files from both branches for each language
- check the stable branch po template which messages are needed
- copy needed messaged from the combined po file (use the main if the
  translation differ)

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@ShGKme
Copy link
Contributor

ShGKme commented Aug 6, 2025

How many libraries use translations?

At least 4

And then how many libraries use translations and have multiple supported branches?

At least 2

Copy link
Contributor

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless there is immediate need to fix this due to customer demand, please let this sit until after my vacation, so we can first try if it works with transifex directly.

@nickvergessen
Copy link
Contributor

So after checking it seems the inline feature of Transifex is focusing on feature Pull requests, not on "stable branches". So copying them to/from main sounds like the best idea. Whether we need to merge them or not is another question. We can give translation folders instead of files, so each branch could have their own files:
https://help.transifex.com/en/articles/6265125-github-installation-and-configuration#h_b827747da8

So we could have a cron action that copies the PO files from stable to main and the POT from main to the stables?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews l10n Localization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants