Homec4science

Make i18n string extraction faster and more flexible

Authored by epriestley <git@epriestley.com> on Jul 4 2016, 02:40.

Description

Make i18n string extraction faster and more flexible

Summary:
Ref T5267. Two general changes:

  • Make string extraction use a cache, so that it doesn't take several minutes every time you change something. Minor updates now only take a few seconds (like arc liberate and similar).
  • Instead of dumping a sort-of-template file out, write out to a cache (src/.cache/i18n_strings.json). I'm planning to add more steps to read this cache and do interesting things with it (emit translatewiki strings, generate or update standalone translation files, etc).

Test Plan:

  • Ran bin/i18n extract.
  • Ran it again, saw it go a lot faster.
  • Changed stuff, ran it, saw it only look at new stuff.
  • Examined caches.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5267

Differential Revision: https://secure.phabricator.com/D16227

Details

Committed
epriestley <git@epriestley.com>Jul 4 2016, 19:23
Pushed
aubortJan 31 2017, 17:16
Parents
rPHd09094f4fbb2: More tokens
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHccc7c1b42436: Make i18n string extraction faster and more flexible (authored by epriestley <git@epriestley.com>).Jul 4 2016, 19:23