gettext translations: extract them and use ECM to load them
ClosedPublic

Authored by ltoscano on Sep 28 2017, 11:06 PM.

Details

Summary

Extract the strings: one main catalog and a catalog for each plugin.
Also use the ECM macro to install the translations.

Ref T6858

Diff Detail

Repository
R875 Falkon
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ltoscano created this revision.Sep 28 2017, 11:06 PM

Still WIP:

  • is it fine to keep one domain for plugin? I didn't get the exact outcome of the task;
  • this still miss the Messages.sh files to extract the translations.

I will update the review with the Message.sh files when the it's clear how to split the translations, and also when we have a solution on the problem of the credits for the translators for the old translations.

drosca added a subscriber: drosca.Oct 2 2017, 7:17 AM

Still WIP:

  • is it fine to keep one domain for plugin? I didn't get the exact outcome of the task;

I'm not really sure what that means, but I guess it's ok.

I will update the review with the Message.sh files when the it's clear how to split the translations, and also when we have a solution on the problem of the credits for the translators for the old translations.

I can only get names of all translators currently in teams, ignoring if they actually contributed. Would that be enough?

Still WIP:

  • is it fine to keep one domain for plugin? I didn't get the exact outcome of the task;

I'm not really sure what that means, but I guess it's ok.

It deserves a better explanation, I agree.
Before the import there was a translation file for each plugin. One translation file == one translation domain.
This patch uses the same structure. The other possibility is to use a unique translation file for every message in the repository.
Should I proceed using this structure or should I go for one file?

I will update the review with the Message.sh files when the it's clear how to split the translations, and also when we have a solution on the problem of the credits for the translators for the old translations.

I can only get names of all translators currently in teams, ignoring if they actually contributed. Would that be enough?

Uhm, my experience with transifex is the people registered in a team are much more than that the people that contributed.
I've seen in other projects that when translations are defined/exported in gettext format, the credentials for people who contributed are added in the comments of the file. But I never managed transifex projects, so I'm not sure if it's possible to just export in gettext or it depends on some settings defined for the project.

If you want, I'm willing to check how it works on the transifex side if you want to give me access to the project.

drosca added a comment.Oct 9 2017, 9:37 AM

It deserves a better explanation, I agree.
Before the import there was a translation file for each plugin. One translation file == one translation domain.
This patch uses the same structure. The other possibility is to use a unique translation file for every message in the repository.
Should I proceed using this structure or should I go for one file?

This is fine, it should use unique file for each plugin.

Uhm, my experience with transifex is the people registered in a team are much more than that the people that contributed.
I've seen in other projects that when translations are defined/exported in gettext format, the credentials for people who contributed are added in the comments of the file. But I never managed transifex projects, so I'm not sure if it's possible to just export in gettext or it depends on some settings defined for the project.

If you want, I'm willing to check how it works on the transifex side if you want to give me access to the project.

I've sent you Project Maintainer invitation now.

ltoscano updated this revision to Diff 20618.Oct 11 2017, 11:56 PM

Almost final version and rebase to master

  • add also the Messages.sh files
  • fix the parameter of ecm_install_po_files_as_qm
ltoscano retitled this revision from [WIP] Use ECM to load gettext translations to gettext translations: extract them and use ECM to load them.Oct 11 2017, 11:58 PM
ltoscano edited the summary of this revision. (Show Details)
ltoscano added a project: Falkon.
ltoscano updated this revision to Diff 27924.Feb 24 2018, 3:34 PM

Rebase and update

drosca accepted this revision.Feb 24 2018, 3:53 PM
This revision is now accepted and ready to land.Feb 24 2018, 3:53 PM
This revision was automatically updated to reflect the committed changes.