Skip to content

Instantly share code, notes, and snippets.

@ross-spencer
Last active February 12, 2020 12:08
Show Gist options
  • Save ross-spencer/da1dbe881ccd1a5d8da576a598dfad1e to your computer and use it in GitHub Desktop.
Save ross-spencer/da1dbe881ccd1a5d8da576a598dfad1e to your computer and use it in GitHub Desktop.
Weblate 2.x.x strings --> 2.x+1.x strings for AtoM

NOTE: To prepare a Weblate translation. Once a project has been created, under users, "review" must be set to enabled. Once that is done, all translations marked in XLIFF as approved will be imported as "approved". "Approved" status seems to be part of the function of the database in Weblate and selected behaviors as much as it is a part of the XLIFF model.

Process to export from AtoM 2.5.x project into an AtoM 2.6.x project

  1. Go to: https://translations.artefactual.com/projects/atom/25/#repository

  2. Commit and push remaining commits to atom/translations.

    • Permissions or ownership seem to affect when we can commit to, and push a Weblate translation. An instinct is that this is related to the way Docker is configured based on my interaction with Docker-compose in the Archivematica project where what is written to a mounted directory from the container will have different ownership than one might expect, especially. as Docker needs to be in a su - group to run.

      • NOTE: Folder permissions: 0755 [ubuntu:ubuntu]

      • NOTE: File permissions: 0664 [ubuntu:ubuntu]    

  3. Update atom branches

  4. Update atom-translations branches

  5. from .../.../atom-translations --> cp -R i18n/ .../.../atom/apps/qubit

    • NOTE: Could this be made a submodule of the AtoM project to reduce the hoops?
  6. Commit 2.5.x final translations.

    • NOTE: we should lock translations at this point. Or soon after, relative to when we do this for real.    
  7. Run phing i18n-translations

    • NOTE: does this recipe need updating to only look at apps/qubit?
  8. Commit apps/quibit/i18n directory/

  9. Switch to atom-translations 2.6.x branch.

  10. from .../.../atom/apps/qubit --> cp -R .../.../atom-translations

  11. Commit translations.

  12. Approve translations: ../weblate-migration-scripts/scripts/approve i18n

    • NOTE: Approval output:

        Attempting to approve XLIFF files in directories in i18n...
        Cycled through 47 XLIFF files.
        Done: approved 1174 XLIFF translation units.
      
  13. Import new components into AtoM project in Weblate.

And we should be good to go! If the test branch looks okay, we can import this as a new component to AtoM and lock down the 2.5 branch.

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