mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-25 16:48:10 -05:00
Add translation resource mapping
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`
This commit is contained in:
parent
9221b6f6b5
commit
45d672ab30
1 changed files with 2 additions and 0 deletions
|
@ -133,6 +133,8 @@ var localizedAssetUrls = {};
|
||||||
// - txMapping: if the name of the transifex resource is different from the route name
|
// - txMapping: if the name of the transifex resource is different from the route name
|
||||||
var txMapping = {
|
var txMapping = {
|
||||||
'projects': 'preview',
|
'projects': 'preview',
|
||||||
|
'embed': 'preview',
|
||||||
|
'vernier': 'gdxfor',
|
||||||
'scratch_1.4': 'scratch_14' // transifex doesn't allow dots in resource names
|
'scratch_1.4': 'scratch_14' // transifex doesn't allow dots in resource names
|
||||||
};
|
};
|
||||||
// start with english default for all views
|
// start with english default for all views
|
||||||
|
|
Loading…
Reference in a new issue