docker-ci icon indicating copy to clipboard operation
docker-ci copied to clipboard

feat(translationtool): add Python support for translations

Open andrey18106 opened this issue 2 years ago • 6 comments

As the Python language is mostly used in ExApps (AppAPI) for now - introduce support for it in translationtool.

andrey18106 avatar Feb 20 '24 17:02 andrey18106

Do this apps need the other bits as well (info.xml, php, js, vue), or are they Python only and could be translated directly from Python to Transifex?

nickvergessen avatar Feb 21 '24 07:02 nickvergessen

Do this apps need the other bits as well (info.xml, php, js, vue)

info.xml, js and vue are also present in Python apps (see boilerplate), basically only Python backend differs.

The only thing I forgot is that we need to adjust CI for such apps on what is committed to repository from transifex, in particular keep .po and .mo files with translations too, how could we do this in better way?

andrey18106 avatar Feb 21 '24 10:02 andrey18106

The only thing I forgot is that we need to adjust CI for such apps on what is committed to repository from transifex, in particular keep .po and .mo files with translations too, how could we do this in better way?

We definitely don't want this for the other apps. Is python reading it directly from there?

nickvergessen avatar Feb 21 '24 10:02 nickvergessen

Maybe we need to add a new "category"/"type" then which simply runs a bit of another workflow. Any file which we can check existance for?

nickvergessen avatar Feb 21 '24 10:02 nickvergessen

Is python reading it directly from there?

Yes. For sure you can implement it in different way, but it would be similar to how it's done in Nextcloud, by converting translations into needed format from .po files, so that's why they might be needed for ExApps, developers can decide on their own how to handle these translation files in their app.

Any file which we can check existance for?

Any file to check to detect this "ExApps category"? Well, for example ExApp's appinfo/info.xml should contain external-app section.

andrey18106 avatar Feb 21 '24 11:02 andrey18106

Well, for example ExApp's appinfo/info.xml should contain external-app section.

Should be able to get that yeah, similar to https://github.com/nextcloud/docker-ci/blob/master/translations-app/handleAppTranslations.sh#L19

nickvergessen avatar Feb 21 '24 15:02 nickvergessen