This fixes https://github.com/LLK/scratchr2/issues/3798 by using regex in expressjs patterns, and then also parsing those regex patterns for fastly, such that we can limit the scope of the regex created for a specific view
This also moves all helper methods in `configure-fastly` into a separate utility file, and adds some additional unit tests for those utilities now that they are separated.
We’ve now exceeded our max number of characters for a condition in the Fastly API, and we need to make it larger to accommodate regex conditionals that can match on any of the routes in www currently.
This fixes the issue by moving the conditions – and the states that are affected by it, like setting the backend or cache ttls – to two custom vcl files that are updated via the Fastly API. One is for the `vcl_rev` config, and one is for the `vcl_fetch` config.
* Added pdfs; added translations for /cards
* Added spanish cards to ttt page
* Added catalan cards to ttt and /cards
* Added zh-tw cards to /cards and /go and fixed /cards link for Fashion cards for all languages
* Removed duplicate starter link for ca, remove starter links for zh-tw (no translation)
fixes#1276 (swedish)
Added tx-import, expects TX_TOKEN environment variable to be set to an API token for Transifex. If no API token exists it’ll just use the default English strings for everything.
Removed the localization spot checks because they were checking tha json got built from po files. With Tx-import the files are already json, and may possibly be missing.
* Transifex transition
Scripts and configuration for transition to Transifex for translation.
* Transifex transition update
changed the name of the place where translations are saved from ‘translations’ to localizations so that we can have a consistent name in both scratchr2, and scratch-www.
A couple of other little clean-ups to make sure that it’s ES5 compliant.
- don’t use const
- don’t use template strings (backticks)
Most problems were due to strings being duplicated and overwriting each other. Updated the build-locales script to keep track of duplicates.
Project Curated by on the splash page was just missing the formatMessage call.
There is some stacking that happens in object keys that had been using the `-` to track language/view hierarchies, which was thrown off by view names that used a `-` in them. Switch to using `:`, and also make it customizable. Fixes#655
Before we were using glob, which was about to start failing on subdirectories in views (which we started using in `conference`). Instead of searching for `l10n.json`, it seemed more appropriate to instead look for localization by using the configured pages that need to be localized.
This moves all locale/translation building to a dependency, `scratch-www-intl-loader`, as well as tests associated with it. Also gets rid of the `make translations` step.
1. Load locale strings into `window._messages` in a separate file added to `template.html`, which contains view-specific and general strings
2. Update build-locales to compile separate files