Agility in your translation workflow

Agility in your translation workflow

F135ce7f204af6fac8075b469685c91d?s=128

Matthieu Moquet

June 24, 2014
Tweet

Transcript

  1. 3.
  2. 4.
  3. 5.

    “Agile software development is a group of methods based on

    iterative and incremental development.”
  4. 9.
  5. 10.
  6. 11.

    Who makes the translations? When do you translate? How do

    you proceed? What about translations?
  7. 12.

    Solution #1 Write all translations before starting developments Pros: – 

    Better understanding of the final rendering Cons: –  Can’t update specs later –  Damn slow (not very agile)
  8. 13.

    Solution #2 Write all translations before deploying Pros: – Development can

    be parallelized – Translations are more concrete Cons: – Still damn slow to deploy
  9. 14.

    Solution #3 Don’t care about untranslated phrases in production… …since

    it’s not developers’ problem Pros: – Developers are more independent Cons: – Phrases can be untranslated for undefined time – Can’t translate before next release
  10. 15.

    Solution #4 Decouple your translation process from the development workflow

    Pros: – Developers are totally independent – Easy to update any content strings Cons: – Need tools to follow the translation flow
  11. 17.

    Developers create the default translations –  in English (sometimes in

    French) –  taken from specifications… or their mind
  12. 18.

    Translators do the rest – when a feature is developed (before

    production, once it’s on staging) – after deploying (to update default translations) – long after, because of a product change
  13. 19.

    deploy your code then update your translations Think your translations

    as an independent asset from your code base …like a CMS
  14. 21.

    o  Create & Update translations with built-in app o  No

    translations stored in code source o  Import from DEV env to PROD when deploying
  15. 22.

    We then built a similar module with our brand new

    Symfony website… BlablacarTranslationBundle
  16. 23.

    o  English translations in Yaml files o  Pushed to database

    when staging o  Translators only work on production dataset
  17. 24.

    <?php namespace Symfony\Component\Translation\Loader; use Symfony\Component\Translation\MessageCatalogue; use Symfony\Component\Translation\Exception\InvalidResourceException; use Symfony\Component\Translation\Exception\NotFoundResourceException; /**

    * LoaderInterface is the interface implemented by all translation loaders. */ interface LoaderInterface { /** * Loads a locale. * * @param mixed $resource A resource * @param string $locale A locale * @param string $domain The domain * * @return MessageCatalogue A MessageCatalogue instance */ public function load($resource, $locale, $domain = 'messages'); }
  18. 25.

    Translations Deployment (lazy mode) o  Avoid querying the database for

    each HTTP request o  Only store the last modification time on a Redis key o  Deploying translations means updating the Redis token HTTP Request Translator isFresh() SELECT translations fwrite app/cache
  19. 29.

    and there are already some Symfony bundles doing the job

    o  Kunstmaan/KunstmaanTranslatorBundle o  lexik/LexikTranslationBundle o  servergrove/TranslationEditorBundle o  schmittjoh/JMSTranslationBundle o  Elao/ElaoFormTranslationBundle o  Incenteev/IncenteevTranslationCheckerBundle o  matteosister/TranslationBundle o  Wiakowe/TranslationBundle o  Pierstoval/TranslationBundle o  fre5h/TranslationBundle o  GiZystems/TranslationBundle o  dinecat/I18nBundle o  PUGX/PUGXI18nBundle o  emmanuelballery/EBTranslationBundle
  20. 30.

    But wait… is a bundle the good solution? – What about

    maintaining several applications? – Better to have a centralized platform to perform all the translations
  21. 32.
  22. 34.
  23. 35.
  24. 36.

    o  Review / approval o  History o  Glossary o  Translation

    Memory o  Projects management o  Team organization o  Comments o  Statistics
  25. 38.
  26. 40.
  27. 42.
  28. 43.

    o  Crowdsourcing o  Translation Agency o  Translation Memory o  Glossary

    o  Machine Translation o  In-context edition o  Screenshots o  Statistics o  Review/voting system o  Webhooks
  29. 59.

    Lots of tools, but can’t find a satisfying one Non-adapted

    to our current workflow §  Unable to edit source §  Unable to view/search by translation keys §  No SSO compliant §  etc.
  30. 61.
  31. 63.

    must be fully open source Pleasant to code / play

    with Doesn’t depend on a tier Roll your own auth mechanism
  32. 66.

    damn simple to use Easy to install / configure Simple

    workflow Minimal interface UX friendly
  33. 72.
  34. 74.
  35. 75.

    $ cat openl10n.yml # Server connection server: hostname: "openl10n.dev" username:

    "user" password: "user" # Project specification project: "foobar" # Translation files files: - pattern: "resources/locales/<locale>.yml"
  36. 76.

    $ openl10n push --locale=all Uploading file resources/locales/de.yml Uploading file resources/locales/en.yml

    Uploading file resources/locales/es.yml Uploading file resources/locales/fr.yml Uploading file resources/locales/it.yml Uploading file resources/locales/pl.yml Uploading file resources/locales/pt.yml ...
  37. 77.
  38. 78.

    $ openl10n pull --locale=all Downloading file resources/locales/de.yml Downloading file resources/locales/en.yml

    Downloading file resources/locales/es.yml Downloading file resources/locales/fr.yml Downloading file resources/locales/it.yml Downloading file resources/locales/pl.yml Downloading file resources/locales/pt.yml ...
  39. 79.
  40. 83.

    Webhooks / Web Eager Deploy translation files on each frontend

    servers Lazy Update a token and let servers update themselves
  41. 84.

    Webhooks / Mobile Webhook will upload translations on a CDN

    On start-up, mobile app download latest version of translations
  42. 85.

    Webhooks / Others o Make a PR on GitHub o Push new

    commit o Create backup archives o …
  43. 86.

    And more to come… •  Proofread mode for editor • 

    History •  Statistics •  Screenshots •  Glossary •  Tags •  Support more formats (Android, iOS, Rails…) •  etc.
  44. 88.

    or just have a look at the sources if you’re

    just curious github.com/openl10n §  openl10n: The core project (API + javascript client) §  openl10n-sdk: API client (Guzzle 4) §  openl10n-cli: CLI tool §  openl10n.js: In-context translations (not planned yet) §  demo-(silex|symfony|angular|rails): Example of application with a openl10n configuration §  etc.
  45. 89.

    Back-end / Symfony Domain/ – Split by main components (project, resources,

    translations, etc.) – Unit tests via PHPSpec Bundle/ – Set the infrastructure – Implements API & User management – Functionnal tests via PHPUnit