From 45d672ab30c6e773038c92f934c23f6b6bb031ec Mon Sep 17 00:00:00 2001
From: Chris Garrity <chrisg@media.mit.edu>
Date: Tue, 29 Oct 2019 17:48:01 -0400
Subject: [PATCH] Add translation resource mapping
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

When the name of the view in `routes.json` does not match the name of the resource in transifex there needs to be a mapping added to the script that generates translations. _Note: the resource name in transifex is usually based on the name of the source file in the `views` directory. Usually the name of the view in the routes file matches._

Since `routes.json` is a JSON file that does not support comments there’s no way to add a warning to the file when someone is adding a route.

The sympton was the message that there were no translations for ‘vernier’ or ‘embed’ when running translate. The `vernier` route is actually the `gdxfor` view, and `embed` is just another version of `preview`
---
 bin/build-locales | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/bin/build-locales b/bin/build-locales
index d9af2135b..d4938a1c4 100755
--- a/bin/build-locales
+++ b/bin/build-locales
@@ -133,6 +133,8 @@ var localizedAssetUrls = {};
 //   - txMapping: if the name of the transifex resource is different from the route name
 var txMapping = {
     'projects': 'preview',
+    'embed': 'preview',
+    'vernier': 'gdxfor',
     'scratch_1.4': 'scratch_14' // transifex doesn't allow dots in resource names
 };
 // start with english default for all views