Skip to content

Conversation

@andrey18106
Copy link
Contributor

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

@nickvergessen
Copy link
Member

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?

@andrey18106
Copy link
Contributor Author

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?

@nickvergessen
Copy link
Member

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
Copy link
Member

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?

@andrey18106
Copy link
Contributor Author

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.

@nickvergessen
Copy link
Member

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

@marcelklehr
Copy link
Member

Would be good to revive this PR as we need this for the context_agent ex app sooner or later

@andrey18106 andrey18106 force-pushed the app_api_python_l10n_support branch from 74f2b48 to e366a4a Compare April 30, 2025 10:45
@andrey18106 andrey18106 force-pushed the app_api_python_l10n_support branch from e366a4a to 4ba729c Compare May 19, 2025 14:43
@nickvergessen nickvergessen merged commit 7d5e26d into master May 20, 2025
3 checks passed
@nickvergessen nickvergessen deleted the app_api_python_l10n_support branch May 20, 2025 06:57
@nickvergessen
Copy link
Member

nickvergessen commented May 20, 2025

Image is built. Do we have an app that is already being translated where we can test the diff?

@janepie
Copy link
Member

janepie commented May 20, 2025

Uuh nice!
There are some translation strings in https://github.com/nextcloud/context_agent, not all of them but maybe good for a test.

@janepie
Copy link
Member

janepie commented May 20, 2025

@nickvergessen see #754 :)


# for ExApps, we need to include .po,.mo translation files as well
if [ "$IS_EX_APP" = "true" ]; then
git add translationfiles/*.po translationfiles/*.mo
Copy link
Member

Choose a reason for hiding this comment

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

+ /translationtool.phar convert-po-files
Those files are ignored:
Array
(
    [0] => js/
    [1] => vendor/
    [2] => .venv/
    [3] => venv/
)
+ [ -d tests ]
+ git add l10n/an.js l10n/ar.js l10n/ast.js l10n/bg.js l10n/br.js l10n/ca.js l10n/cs.js l10n/da.js l10n/de.js l10n/de_DE.js l10n/el.js l10n/en_GB.js l10n/eo.js l10n/es.js l10n/es_419.js l10n/es_AR.js l10n/es_CL.js l10n/es_CO.js l10n/es_CR.js l10n/es_DO.js l10n/es_EC.js l10n/es_GT.js l10n/es_HN.js l10n/es_MX.js l10n/es_NI.js l10n/es_PA.js l10n/es_PE.js l10n/es_PR.js l10n/es_PY.js l10n/es_SV.js l10n/es_UY.js l10n/et_EE.js l10n/eu.js l10n/fa.js l10n/fi.js l10n/fr.js l10n/ga.js l10n/gl.js l10n/he.js l10n/hr.js l10n/hu.js l10n/ia.js l10n/id.js l10n/is.js l10n/it.js l10n/ja.js l10n/ka.js l10n/ka_GE.js l10n/ko.js l10n/lt_LT.js l10n/lv.js l10n/mk.js l10n/nb.js l10n/nl.js l10n/pl.js l10n/pt_BR.js l10n/pt_PT.js l10n/ro.js l10n/ru.js l10n/sc.js l10n/sk.js l10n/sl.js l10n/sq.js l10n/sr.js l10n/sv.js l10n/th.js l10n/tr.js l10n/ug.js l10n/uk.js l10n/zh_CN.js l10n/zh_HK.js l10n/zh_TW.js l10n/an.json l10n/ar.json l10n/ast.json l10n/bg.json l10n/br.json l10n/ca.json l10n/cs.json l10n/da.json l10n/de.json l10n/de_DE.json l10n/el.json l10n/en_GB.json l10n/eo.json l10n/es.json l10n/es_419.json l10n/es_AR.json l10n/es_CL.json l10n/es_CO.json l10n/es_CR.json l10n/es_DO.json l10n/es_EC.json l10n/es_GT.json l10n/es_HN.json l10n/es_MX.json l10n/es_NI.json l10n/es_PA.json l10n/es_PE.json l10n/es_PR.json l10n/es_PY.json l10n/es_SV.json l10n/es_UY.json l10n/et_EE.json l10n/eu.json l10n/fa.json l10n/fi.json l10n/fr.json l10n/ga.json l10n/gl.json l10n/he.json l10n/hr.json l10n/hu.json l10n/ia.json l10n/id.json l10n/is.json l10n/it.json l10n/ja.json l10n/ka.json l10n/ka_GE.json l10n/ko.json l10n/lt_LT.json l10n/lv.json l10n/mk.json l10n/nb.json l10n/nl.json l10n/pl.json l10n/pt_BR.json l10n/pt_PT.json l10n/ro.json l10n/ru.json l10n/sc.json l10n/sk.json l10n/sl.json l10n/sq.json l10n/sr.json l10n/sv.json l10n/th.json l10n/tr.json l10n/ug.json l10n/uk.json l10n/zh_CN.json l10n/zh_HK.json l10n/zh_TW.json
+ [ true = true ]
+ git add translationfiles/*.po translationfiles/*.mo
fatal: pathspec 'translationfiles/*.mo' did not match any files

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants