Skip to content

FieldWorks->Crowdin: sync semantic domain descriptions #4334

Description

@imnasnainaec

Follow-up from sillsdev/FwLocalizations#5 ("Trim semantic domain descriptions") — see the task-list comment.

Update: sillsdev/FwLocalizations#7 ("Fix semantic domain punctuation and spaces", merged) made a further 22 punctuation/whitespace fixes to lists/LocalizableLists.xml after PR #5. Trigger this upload only once both PR #5 and PR #7 are on whichever branch Crowdin reads (see the branch-mismatch watch-out below) — otherwise the upload runs twice for what should be one batch of source-string changes.

Filed on TheCombine because both sillsdev/FieldWorks and sillsdev/FwLocalizations have GitHub issues disabled; the actual work happens in FieldWorks.

Task: Trigger the Crowdin upload so the trimmed English source strings in lists/LocalizableLists.xml reach the Crowdin project.

How the updated descriptions reach Crowdin (via overcrowdin)

FieldWorks owns the Crowdin config and the upload target; FwLocalizations just supplies lists/LocalizableLists.xml.

Instructions for uploading FieldWorks strings for localization

LibLCM src/SIL.LCModel/Templates/SemDom.xml
        │  (exported by a manual process)
        ▼
FwLocalizations/lists/LocalizableLists.xml   ← PR #5 and PR #7 edit this
        │  (checked out inside a FieldWorks tree as fw/Localizations/lists/)
        ▼
FieldWorks  Build/Localize.targets  →  target "uploadUpdatesForTranslation"
   1. InstallOvercrowdin:  dotnet tool update/install -g overcrowdin
   2. delete old lists/*.xlf
   3. GoldEticToXliff:  liblcm .../Templates/GOLDEtic.xml   → GOLDEtic.en.xlf   (gram. categories)
   4. ListsToXliff:     lists/LocalizableLists.xml          → lists/*.xlf  ⟹ SemanticDomains.xlf
   5. XmlToPo:          → messages.pot
   6. overcrowdin updatefiles -v      (run in FieldWorks root, reads crowdin.json)
        ▼
Crowdin project "fieldworks"

Orchestrator: sillsdev/FieldWorks → Build/Localize.targets

  • Target uploadUpdatesForTranslation (Localize.targets:73) is the whole route: it converts LocalizableLists.xml.xlf via the ListsToXliff build task (producing SemanticDomains.xlf), then runs overcrowdin updatefiles -v (Localize.targets:91).
  • ListsDirectory = $(fwrt)/Localizations/lists (Localize.targets:36) — i.e. the FwLocalizations lists/ folder, checked out as fw/Localizations. So the file Trim semantic domain descriptions FwLocalizations#5 and Goal selector #7 changed is the upload source.

What gets uploadedsillsdev/FieldWorks → crowdin.json: the glob Localizations/lists/*.xlf (includes SemanticDomains.xlf), plus strings-en.xml, messages.pot, Src/**/*.resx, and LCM resx. Crowdin project = fieldworks, key from CROWDIN_API_KEY.

overcrowdin (sillsdev/overcrowdin) is a .NET global tool (commands add / update / updatefiles / download) over the Crowdin REST API, driven by a crowdin.json in the working directory.

What triggers it: No GitHub Actions workflow runs the upload — the only references to uploadUpdatesForTranslation / overcrowdin updatefiles are in Build/Localize.targets. The FieldWorks workflows that do use overcrowdin (base-installer-cd.yml, patch-installer-cd.yml, weekly cron) only do the download side (overcrowdin download inside build.ps1 -BuildInstallerlocalize) to bundle translations into installers. So the upload is run either manually by a maintainer (build /t:uploadUpdatesForTranslation, per FwLocalizations ReadMe.md lines 30-36) or from a TeamCity job on build.palaso.org (SIL's CI; FieldWorks uses TeamCity — cf. Build/Src/FwBuildTasks/DownloadFilesFromTeamCity.cs). TeamCity build configs aren't in the GitHub repos, so the exact automated trigger isn't visible from GitHub.

Watch-out — branch mismatch. Upload (FieldWorks crowdin.json) targets Crowdin branch "latest", but FwLocalizations' own .github/workflows/fetch-crowdin.yml downloads from branch "FieldWorks-9.0". Confirm the PRs' strings land on the branch your consumers read.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions