App sync: opt-in file to leave repository-maintained languages untouched + reduce translators workload
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- git, shell
- Domain
- ci-cd, localization
Research direction
Read the branch loop in translations-app/handleAppTranslations.sh around the linked lines, then inspect the existing .tx/backport and .tx/validate conventions. Implement and document the proposed opt-in language file, preserving listed language files from git while leaving apps without the file unchanged; verify the behavior in a workflow run.
Written by the indexing model from the issue text.
Description
Problem
For luflow/attendance I maintain German (de, de_DE) in the repository myself: I write the German strings together with each feature and release roughly weekly. All other languages come from Transifex, and I very much want to keep it that way.
The sync cannot leave a language alone today:
- New source strings are uploaded (
tx push -s) and translations pulled (tx pull -f -a --minimum-perc=5) in the same run, so a string added yesterday is always untranslated in that night's pull and its German disappears froml10n/. .tx/confighas no key to exclude a language. Redirecting one vialang_maportrans.<lang>only moves the.po;convert-po-filesthen produces no file for it, and because ofrm -f l10n/*.js l10n/*.jsonfollowed bygit commit -amthe existing files are deleted. I tried this in August and lost all four German files.
Since 10 August I have been working around this with a workflow that restores the four German files after every sync commit. That is a stopgap I would like to get rid of: it adds a second commit to main every night (more than 50 so far), and, as @rakekniven rightly pointed out, translators keep working on German strings for this app that are never shipped. I should have raised this here before building the workaround.
Proposal
An opt-in file next to .tx/config, following the existing .tx/backport and .tx/validate pattern. It lists the languages the repository maintains itself, one per line:
de
de_DE
In the branch loop of translations-app/handleAppTranslations.sh, after the cp and before the git add:
# Languages the repository maintains itself are taken from git again
if [ -f '.tx/keep-languages' ]; then
for lang in $(cat .tx/keep-languages); do
for ext in js json; do
rm -f "l10n/$lang.$ext"
git checkout HEAD -- "l10n/$lang.$ext" 2>/dev/null || true
done
done
fi
- Apps without the file behave exactly as today.
- The file is read per branch, so a stable branch without it keeps syncing normally.
- Nothing changes in the Transifex steps; the listed languages are still pulled, they just do not end up in the commit.
The file name is only a suggestion. I am happy to send the PR, including a paragraph for the developer manual.
Open question: translators' time
The hook fixes the repository side only. German would still be open for translation in Transifex for this resource, and languages can only be removed per project, not per resource.
Transifex has per-language lock tags on strings (locked_de, locked_de_DE, see Preventing Translation Edits), which stop translators from editing those strings in that language. According to that article only admins and project maintainers can add tags, and new strings are not tagged automatically.
- Could the sync set these tags for the languages listed in the file, right after
tx push -s? - If not, would someone with maintainer rights be willing to set them, or is there a better way to signal "not needed" to the German team?
If neither is acceptable, I would rather change my side so that the community's German is shipped again and I only fill in strings Transifex does not have yet, than keep wasting translators' time.
cc @nickvergessen @rakekniven
- Dominant language
- Perl
- Stars
- 46
- Forks
- 38
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nextcloud/docker-ci
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
transifex
Difficulty 4/5 3-5 days Newbie friendliness 28/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
transifex
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
transifex
Difficulty 4/5 3-5 days Newbie friendliness 38/100
All issues in nextcloud/docker-ci
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
major/MySQLTuner-perl#1007 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
bioconda/bioconda-recipes#70187 ·
Maintainers usually reply within 2 days
-
documentation Needs Triage
Difficulty 1/5 Under an hour Newbie friendliness 93/100
Maintainers usually reply within 1 day
-
Proposed Text EditsOpen
Difficulty 1/5 Under an hour Newbie friendliness 82/100
curl/everything-curl#658 ·