You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
davx5-non-ose-strings should no longer be used by anything.
Note the file is strings.xml, not gplay-strings.xml — A decided on uniform file names for all flavours. Checked this can't collide: l10n/translations/{gplay,managed} contain only values-*/ directories, no values/, so the new English values/strings.xml in davx5 is alone.
One trade-off we accept: davx5 can't pin the translations separately any more, it gets whatever commit its davx5-ose points at. So consequently: note also that we can't use dependabot to bump the translations here, since we can only bump direct submodules. Translations will only (automatically) update the moment we bump core. (davx5/.github/dependabot.yml has no gitsubmodule ecosystem at all today, so core bumps stay manual anyway.)
Two ways this fails silently: a missing res srcDir is ignored by the Android build, and a submodule inside a submodule needs --recursive or it isn't there at all. In both cases the build succeeds and just ships English.
Everything below goes into one PR — the davx5-ose pointer bump, the string move and the CI changes depend on each other, and we want to review them together.
Bump davx5-ose
davx5 pins submodule/davx5-ose at e2ab2fcee, which is 28 commits beforeffac0f62e (D, PR #2831), the first commit that has l10n at all. So submodule/davx5-ose/l10n doesn't exist yet and none of the srcDirs below would resolve.
The bump has to be in the same commit as the srcDir swap. Bumping alone turns CI red (core's own verifyTranslations guard fires without a recursive checkout), swapping alone silently ships English.
English originals move into davx5
New app-non-ose/src/gplay/res/values/strings.xml and app-non-ose/src/managed/res/values/strings.xml, with the contents of davx5-non-ose-strings' gplay/values/gplay-strings.xml and managed/values/managed-strings.xml. Both files are byte-identical to what's already in davx5-translations/sources/, so this is a plain copy plus a rename.
Merge select/values/select-strings.xml into the existing app-non-ose/src/select/res/values/strings.xml (which today holds only the three translatable="false" ids app_name, account_type, account_type_address_book)
Mirror workflow in davx5, same shape as the one in B including workflow_dispatch, watching those three files and writing sources/gplay/strings.xml, sources/managed/strings.xml and sources/select/strings.xml. The target file name is strings.xml for every flavour.
Make sure the App id and private key from B are reachable from davx5 (organization secrets — davx5 is private) — already done: TRANSLATIONS_APP_ID and TRANSLATIONS_APP_PRIVATE_KEY are org secrets with visibility selected and both davx5 and davx5-ose in the list.
Translations come from the nested submodule
app-non-ose/build.gradle.kts: drop val nonOseStringsDir (line 99), add val translationsDir = rootProject.file("submodule/davx5-ose/l10n/translations") and point the res srcDirs at it: gplay → $translationsDir/gplay, managed → $translationsDir/managed, mgdtest → $translationsDir/managed (its source set is configured by hand, not inherited — the flavor uses initWith(managed), source sets have no such thing). Keep src/standard+gplay/res and src/managed/res.
select gets no translations srcDir — remove its res { } block entirely. Weblate has no select component (only davx5-ose-strings, davx5-gplay-strings, davx5-managed-strings) and davx5-translations has no translations/select. Select's own strings stay English-only for now; core strings are unaffected. Mirroring sources/select/strings.xml still happens so the component can be added later.
Remove the davx5-non-ose-strings submodule and its .gitmodules entry (git submodule deinit -f + git rm + drop .git/modules/submodule/davx5-non-ose-strings).
Remove the davx5-non-ose-strings-ref input and its actions/checkout step from .github/workflows/build-apk.yml — that workflow checks the submodules out by hand instead of using submodules: recursive.
build-apk.yml: add submodules: recursive to the bitfireAT/davx5-ose checkout step, not to the parent checkout (which has no submodules: at all).
Every other checkout uses submodules: true, which does not descend into l10n. Switch to recursive in release.yml, all three jobs of test-app-non-ose.yml, and dependency-submission.yml.
Add a verifyTranslations guard to app-non-ose/build.gradle.kts, wired into preBuild, failing if $translationsDir/{gplay,managed} is missing or empty — same idea as the one in davx5-ose:core/build.gradle.kts. Core's guard already covers davx5 (davx5-ose is an included build, so it keeps its own rootDir), but it only checks translations/ose; gplay/managed would still fail silently.
Everything in davx5 has to be one commit: app-non-ose/src/<flavor>/res is an automatic res srcDir, so the English strings being in davx5 and in davx5-non-ose-strings at the same time is a Duplicate resources error in the same source set, not an override.
Switch dev setup and CI to git submodule update --init --recursive / submodules: recursive. Nothing in davx5 documents submodule setup at all right now (grep 'git submodule' → zero hits), so this means adding a note to README.md next to the variant/resource table.
Cleanup afterwards
Archive bitfireAT/davx5-non-ose-strings. Checked: after this PR nothing references it — no Weblate component points at it, and F-Droid only builds the OSE app.
Acceptance criteria
Recursive clone, build the gplay flavour → gplay translations are there, no duplicate resource errors
Build the select flavour → the select_welcome_* strings and app_name are still there
Build mgdtest → managed strings are still there
Clone without--recursive, or move l10n/translations/gplay away → the build fails with our guard message instead of shipping English
Change an English gplay string in davx5 and push → sources/gplay/strings.xml updates and Weblate shows the new source string (this also proves the org secrets resolve from davx5)
Missing for integrating translations in davx5:
davx5still reads strings fromdavx5-non-ose-strings.The English originals for gplay/managed/select need to get a home in
davx5vial10nsubmodule nested insidedavx5-osesubmodule:davx5-non-ose-stringsshould no longer be used by anything.Note the file is
strings.xml, notgplay-strings.xml— A decided on uniform file names for all flavours. Checked this can't collide:l10n/translations/{gplay,managed}contain onlyvalues-*/directories, novalues/, so the new Englishvalues/strings.xmlindavx5is alone.One trade-off we accept:
davx5can't pin the translations separately any more, it gets whatever commit itsdavx5-osepoints at. So consequently: note also that we can't use dependabot to bump the translations here, since we can only bump direct submodules. Translations will only (automatically) update the moment we bump core. (davx5/.github/dependabot.ymlhas nogitsubmoduleecosystem at all today, so core bumps stay manual anyway.)Two ways this fails silently: a missing
ressrcDir is ignored by the Android build, and a submodule inside a submodule needs--recursiveor it isn't there at all. In both cases the build succeeds and just ships English.Everything below goes into one PR — the
davx5-osepointer bump, the string move and the CI changes depend on each other, and we want to review them together.Bump
davx5-osedavx5pinssubmodule/davx5-oseate2ab2fcee, which is 28 commits beforeffac0f62e(D, PR #2831), the first commit that hasl10nat all. Sosubmodule/davx5-ose/l10ndoesn't exist yet and none of the srcDirs below would resolve.submodule/davx5-oseto currentdavx5-ose@main-> https://github.com/bitfireAT/davx5/pull/944verifyTranslationsguard fires without a recursive checkout), swapping alone silently ships English.English originals move into
davx5app-non-ose/src/gplay/res/values/strings.xmlandapp-non-ose/src/managed/res/values/strings.xml, with the contents ofdavx5-non-ose-strings'gplay/values/gplay-strings.xmlandmanaged/values/managed-strings.xml. Both files are byte-identical to what's already indavx5-translations/sources/, so this is a plain copy plus a rename.select/values/select-strings.xmlinto the existingapp-non-ose/src/select/res/values/strings.xml(which today holds only the threetranslatable="false"idsapp_name,account_type,account_type_address_book)davx5, same shape as the one in B includingworkflow_dispatch, watching those three files and writingsources/gplay/strings.xml,sources/managed/strings.xmlandsources/select/strings.xml. The target file name isstrings.xmlfor every flavour.davx5(organization secrets —davx5is private) — already done:TRANSLATIONS_APP_IDandTRANSLATIONS_APP_PRIVATE_KEYare org secrets with visibility selected and bothdavx5anddavx5-osein the list.Translations come from the nested submodule
app-non-ose/build.gradle.kts: dropval nonOseStringsDir(line 99), addval translationsDir = rootProject.file("submodule/davx5-ose/l10n/translations")and point the res srcDirs at it:gplay→$translationsDir/gplay,managed→$translationsDir/managed,mgdtest→$translationsDir/managed(its source set is configured by hand, not inherited — the flavor usesinitWith(managed), source sets have no such thing). Keepsrc/standard+gplay/resandsrc/managed/res.selectgets no translations srcDir — remove itsres { }block entirely. Weblate has no select component (onlydavx5-ose-strings,davx5-gplay-strings,davx5-managed-strings) anddavx5-translationshas notranslations/select. Select's own strings stay English-only for now; core strings are unaffected. Mirroringsources/select/strings.xmlstill happens so the component can be added later.davx5-non-ose-stringssubmodule and its.gitmodulesentry (git submodule deinit -f+git rm+ drop.git/modules/submodule/davx5-non-ose-strings).davx5-non-ose-strings-refinput and itsactions/checkoutstep from.github/workflows/build-apk.yml— that workflow checks the submodules out by hand instead of usingsubmodules: recursive.build-apk.yml: addsubmodules: recursiveto thebitfireAT/davx5-osecheckout step, not to the parent checkout (which has nosubmodules:at all).submodules: true, which does not descend intol10n. Switch torecursiveinrelease.yml, all three jobs oftest-app-non-ose.yml, anddependency-submission.yml.verifyTranslationsguard toapp-non-ose/build.gradle.kts, wired intopreBuild, failing if$translationsDir/{gplay,managed}is missing or empty — same idea as the one indavx5-ose:core/build.gradle.kts. Core's guard already coversdavx5(davx5-oseis an included build, so it keeps its ownrootDir), but it only checkstranslations/ose; gplay/managed would still fail silently.davx5has to be one commit:app-non-ose/src/<flavor>/resis an automaticressrcDir, so the English strings being indavx5and indavx5-non-ose-stringsat the same time is aDuplicate resourceserror in the same source set, not an override.git submodule update --init --recursive/submodules: recursive. Nothing indavx5documents submodule setup at all right now (grep 'git submodule'→ zero hits), so this means adding a note toREADME.mdnext to the variant/resource table.Cleanup afterwards
bitfireAT/davx5-non-ose-strings. Checked: after this PR nothing references it — no Weblate component points at it, and F-Droid only builds the OSE app.Acceptance criteria
select_welcome_*strings andapp_nameare still theremgdtest→ managed strings are still there--recursive, or movel10n/translations/gplayaway → the build fails with our guard message instead of shipping Englishdavx5and push →sources/gplay/strings.xmlupdates and Weblate shows the new source string (this also proves the org secrets resolve fromdavx5)